mid

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(a *auth.Auth) web.Middleware

Authenticate validates a JWT from the `Authorization` header.

func Authorize

func Authorize(a *auth.Auth, rule string) web.Middleware

Authorize validates that an authenticated user has at least one role from a specified list. This method constructs the actual function that is used.

func Cors

func Cors() web.Middleware

func Errors

func Errors(log *zerolog.Logger) web.Middleware

Errors handles errors coming out of the call chain. It detects normal application errors which are used to respond to the client in a uniform way. Unexpected errors (status >= 500) are logged.

func Logger

func Logger(log *zerolog.Logger) web.Middleware

func Panics

func Panics() web.Middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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