auth

package
v0.4.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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")
	ErrMiddlewareNotFound      = errors.New("auth middleware 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 Middleware interface {
	Handle(*fiber.Ctx) error
}

type NamedMiddleware

type NamedMiddleware interface {
	Middleware
	Name() string
}

func GetMiddleware

func GetMiddleware(name string) (NamedMiddleware, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL