Documentation ¶
Overview ¶
Package middleware provides middleware for http Handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
A Chain is a middleware chain use for http request processing.
func NewChain ¶
func NewChain(middlewares ...MiddlewareFunc) Chain
NewChain creates a new Middleware chain
type MiddlewareFunc ¶
MiddlewareFunc is a function that acts as middleware for http Handlers.
func Conditional ¶
func Conditional(middleware MiddlewareFunc, condition func(r *http.Request) bool) MiddlewareFunc
Conditional is a middleware that only executes middleware if the condition returns true for the request. If the condition returns false, the middleware is skipped, and request handling moves on to the next handler in the chain.
Directories ¶
Path | Synopsis |
---|---|
Package cors does cors stuff
|
Package cors does cors stuff |
Package echocontext adds the echo context to the parent context
|
Package echocontext adds the echo context to the parent context |
Package mime does mime stuff
|
Package mime does mime stuff |
Package redirect does redirect stuff
|
Package redirect does redirect stuff |
Click to show internal directories.
Click to hide internal directories.