Documentation ¶
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
}
func NewChain ¶
func NewChain(middlewares ...Middleware) Chain
NewChain creates a new chain of middlewares.
func (Chain) Extend ¶
func (c Chain) Extend(middlewares ...Middleware) Chain
Extend returns a new chain of middlewares that contains the middlewares of the current chain and the given middlewares.
type Middleware ¶
type Middleware interface { // Middleware wraps the given handler with the middleware. Middleware(http.Handler) http.Handler }
Middleware is a type that wraps an http.Handler with additional logic.
type MiddlewareFunc ¶
MiddlewareFunc is a function that implements the Middleware interface.
func (MiddlewareFunc) Middleware ¶
func (m MiddlewareFunc) Middleware(h http.Handler) http.Handler
Click to show internal directories.
Click to hide internal directories.