Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(ms []Func, f http.HandlerFunc) http.HandlerFunc
Chain allows to easily chain a sclice of middlewares around a handler
func Logging ¶
func Logging(f http.HandlerFunc) http.HandlerFunc
Logging is a simple request logging middleware
Types ¶
type Func ¶
type Func func(http.HandlerFunc) http.HandlerFunc
Func is a middleware function that allows pre-/post-processing of requests It returns a wrapped handler function allowing to intercept the HTTP call made to the original handler.
func CorsWithOrigin ¶
CorsWithOrigin returns a middleware writing CORS headers for the given origin, all methods and most common headers
Click to show internal directories.
Click to hide internal directories.