middleware

package
v0.0.0-...-9004257 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtKey key

JwtKey var to set the key for the context

Functions

func EnableCORS

func EnableCORS(next httprouter.Handle) httprouter.Handle

EnableCORS sets the CORS header

func JWTAuthMiddleware

func JWTAuthMiddleware(next httprouter.Handle) httprouter.Handle

JWTAuthMiddleware creates a log of the calls

func LoggingHTTP

func LoggingHTTP(next http.Handler) http.Handler

LoggingHTTP uses the native handler for the middleware This is when httprouter can not find a route or OPTIONS method we still want to log it

func LoggingHTTPRouter

func LoggingHTTPRouter(next httprouter.Handle) httprouter.Handle

LoggingHTTPRouter creates a log of the calls

Types

type Middleware

type Middleware func(httprouter.Handle) httprouter.Handle

Middleware we can use

func (Middleware) Then

func (m Middleware) Then(mw Middleware) Middleware

Then allows us to iterate through the middleware

Jump to

Keyboard shortcuts

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