Documentation ¶
Overview ¶
Package middleware pkg/api/middleware/http_headers.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapt ¶
func Adapt(h HandlerFunc, middlewares ...Middleware) gofr.Handler
Adapt converts a HandlerFunc and middlewares into a gofr.Handler
func CustomHeadersMiddleware ¶
func CustomHeadersMiddleware() gofrHTTP.Middleware
func DebugHeadersMiddleware ¶
func DebugHeadersMiddleware() gofrHTTP.Middleware
Types ¶
type Handler ¶
Handler is an interface that wraps the basic Handle method.
func RequireTenant ¶
RequireTenant is a middleware that ensures a tenant ID is present
func RequireUser ¶
RequireUser is a middleware that ensures a user ID is present
type HandlerFunc ¶
HandlerFunc is a function type that implements the Handler interface.
type Middleware ¶
Middleware defines the standard middleware signature.
func RequireRole ¶
func RequireRole(roles ...string) Middleware
RequireRole is a middleware that checks if the user has any of the required roles
Click to show internal directories.
Click to hide internal directories.