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 ¶
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
Click to show internal directories.
Click to hide internal directories.