Documentation ¶
Index ¶
- Variables
- func AuthMiddleware(cfg configlib.Configer, parser authlib.TokenParser, excludedRoutes []string) mux.MiddlewareFunc
- func CheckContentType()
- func CorsMiddleware(origins []string) mux.MiddlewareFunc
- func RecoverPanicMiddleWare() mux.MiddlewareFunc
- func RoleMiddleware(roles []EndpointRole) mux.MiddlewareFunc
- func TimeoutMiddleware(timeoutDuration time.Duration) mux.MiddlewareFunc
- type EndpointRole
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedHeaders = "Content-Type,Authorization,Origin"
View Source
var AllowedMethods = "GET,HEAD,POST,PUT,DELETE,OPTIONS,PATCH"
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(cfg configlib.Configer, parser authlib.TokenParser, excludedRoutes []string) mux.MiddlewareFunc
func CheckContentType ¶
func CheckContentType()
func CorsMiddleware ¶
func CorsMiddleware(origins []string) mux.MiddlewareFunc
func RecoverPanicMiddleWare ¶
func RecoverPanicMiddleWare() mux.MiddlewareFunc
func RoleMiddleware ¶
func RoleMiddleware(roles []EndpointRole) mux.MiddlewareFunc
func TimeoutMiddleware ¶
func TimeoutMiddleware(timeoutDuration time.Duration) mux.MiddlewareFunc
Types ¶
type EndpointRole ¶
Click to show internal directories.
Click to hide internal directories.