Documentation
¶
Index ¶
- func GetAPIKeyFromParam(c *fiber.Ctx) *models.APIKey
- func GetAuth(c *fiber.Ctx) *auth.Helper
- func GetDbConn(c *fiber.Ctx) db.Connection
- func GetKey(c *fiber.Ctx) *models.APIKey
- func GetLogger(c *fiber.Ctx) *log.Entry
- func GetProfile(c *fiber.Ctx) *models.Profile
- func GetRequestID(c *fiber.Ctx) primitive.ObjectID
- func ResetMatcherProfilesCache(ctx context.Context) context.Context
- func SetAPIKeyFromParam(ctx context.Context, value *models.APIKey) context.Context
- func SetAuth(ctx context.Context, value *auth.Helper) context.Context
- func SetDbConn(ctx context.Context, value db.Connection) context.Context
- func SetKey(ctx context.Context, value *models.APIKey) context.Context
- func SetLogger(ctx context.Context, value *log.Entry) context.Context
- func SetProfile(ctx context.Context, value *models.Profile) context.Context
- func SetRequestID(ctx context.Context, value primitive.ObjectID) context.Context
- type MatcherProfilesCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIKeyFromParam ¶
GetAPIKeyFromParam returns the api key specified in the url
func GetAuth ¶
GetAuth returns the auth key used to make the request If the request is not authenticated this function panics
func GetDbConn ¶
func GetDbConn(c *fiber.Ctx) db.Connection
GetDbConn returns the database connection
func GetProfile ¶
GetProfile returns a profile (probably based on the profile id specified in the url)
func GetRequestID ¶
GetRequestID returns the request id We bind this to every request so we can debug things more easily in the case of many requests
func ResetMatcherProfilesCache ¶
ResetMatcherProfilesCache sets the profiles cache to an empty object
func SetAPIKeyFromParam ¶
SetAPIKeyFromParam sets an api key based on the route
func SetProfile ¶
SetProfile sets a profile
Types ¶
type MatcherProfilesCache ¶
MatcherProfilesCache contains the matcher profiles cache
func GetMatcherProfilesCache ¶
func GetMatcherProfilesCache(c *fiber.Ctx) *MatcherProfilesCache
GetMatcherProfilesCache returns the cached profiles used by the matcher