Documentation
¶
Index ¶
- func ConvertDBRole(dbRole database.CustomRole) (rbac.Role, error)
- func ConvertRoleToDB(role rbac.Role) (database.CustomRole, error)
- func CustomRoleCacheContext(ctx context.Context) context.Context
- func CustomRoleMW(next http.Handler) http.Handler
- func Expand(ctx context.Context, db database.Store, names []string) (rbac.Roles, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDBRole ¶
func ConvertDBRole(dbRole database.CustomRole) (rbac.Role, error)
func ConvertRoleToDB ¶
func ConvertRoleToDB(role rbac.Role) (database.CustomRole, error)
func CustomRoleCacheContext ¶
CustomRoleCacheContext prevents needing to lookup custom roles within the same request lifecycle. Optimizing this to span requests should be done in the future.
func CustomRoleMW ¶
CustomRoleMW adds a custom role cache on the ctx to prevent duplicate db fetches.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.