Documentation
¶
Overview ¶
Package utilities provides utility endpoints like heartbeat, OpenAPI, contribute, etc.
Index ¶
Constants ¶
View Source
const DoormanContextKey string = "doorman"
DoormanContextKey is the Gin context key to obtain the *Doorman instance.
View Source
const PrincipalsContextKey string = "principals"
PrincipalsContextKey is the Gin context key to obtain the current user principals.
Variables ¶
This section is empty.
Functions ¶
func AuthnMiddleware ¶
func AuthnMiddleware(d doorman.Doorman) gin.HandlerFunc
AuthnMiddleware relies on the authenticator if authentication was enabled for the origin.
func ContextMiddleware ¶
func ContextMiddleware(d doorman.Doorman) gin.HandlerFunc
ContextMiddleware adds the Doorman instance to the Gin context.
func SetupRoutes ¶
SetupRoutes adds HTTP endpoints to the gin.Engine.
func YAMLAsJSONHandler ¶
func YAMLAsJSONHandler(filename string) gin.HandlerFunc
YAMLAsJSONHandler is a handler function factory to serve specified YAML file as JSON.
func Yaml2JSON ¶
func Yaml2JSON(i interface{}) interface{}
Yaml2JSON converts an unmarshalled YAML object to a JSON one.
Types ¶
This section is empty.
Source Files
¶
- allowed.go
- api.go
- authn_middleware.go
- reload.go
- utilities.go
Click to show internal directories.
Click to hide internal directories.