Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidMiddlewareName = errors.New("invalid or empty auth middleware name") ErrMiddlewareAlreadyExists = errors.New("auth middleware already exists") ErrNilMiddleware = errors.New("auth middleware is nil") ErrInvalidConfig = errors.New("middleware config must be a non-nil pointer to a struct") ErrMiddlewareNotFound = errors.New("auth middleware not found") ErrMiddlewareConfigNotFound = errors.New("auth middleware config not found") )
Functions ¶
func NamedMiddlewareAs ¶
func NamedMiddlewareAs[T Middleware](nmw NamedMiddleware) T
func RegisterMiddleware ¶
func RegisterMiddleware(name string, m Middleware) error
func ResetMiddlewares ¶
func ResetMiddlewares()
Types ¶
type Middleware ¶
type NamedMiddleware ¶
type NamedMiddleware interface { Middleware Name() string }
func GetMiddleware ¶
func GetMiddleware(name string) (NamedMiddleware, error)
Click to show internal directories.
Click to hide internal directories.