middleware

package
v0.0.0-...-8eba3d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRolesForEmail

func GetRolesForEmail(ctx context.Context, queries *sqlc.Queries, email string) ([]string, error)

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

func NewProfileMiddleware(queries *sqlc.Queries, client *remotecache.Client) func(*gin.Context)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL