Documentation
¶
Index ¶
- func GetRolesForEmail(ctx context.Context, queries *sqlc.Queries, email string) ([]string, error)
- func NewFakeUserMiddleware(secret string) gin.HandlerFunc
- func NewProfileMiddleware(queries *sqlc.Queries, client *remotecache.Client) func(*gin.Context)
- func NewUserMiddleware(queries *sqlc.Queries, remoteCache *remotecache.Client, ...) func(*gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRolesForEmail ¶
GetRolesForEmail returns all roles applicable for a specific email address. The roles are fetched from a local cache or if that is not available from the DB
func NewFakeUserMiddleware ¶
func NewFakeUserMiddleware(secret string) gin.HandlerFunc
func NewProfileMiddleware ¶
NewProfileMiddleware prefills context with a profileID
func NewUserMiddleware ¶
func NewUserMiddleware(queries *sqlc.Queries, remoteCache *remotecache.Client, ls *common.BatchLoaders, auth0Client *auth0.Client) func(*gin.Context)
NewUserMiddleware returns a gin middleware that ingests a populated User struct into the gin context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.