Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMiddlewareStack = &MiddlewareStack{}
DefaultMiddlewareStack default middleware stack
Functions ¶
Types ¶
type Middleware ¶
type Middleware struct { Name string Handler func(http.Handler) http.Handler InsertAfter []string InsertBefore []string Requires []string }
Middleware middleware struct
type MiddlewareStack ¶
type MiddlewareStack struct {
// contains filtered or unexported fields
}
MiddlewareStack middlewares stack
func (*MiddlewareStack) Apply ¶
func (stack *MiddlewareStack) Apply(handler http.Handler) http.Handler
Apply apply middlewares to handler
func (*MiddlewareStack) Remove ¶
func (stack *MiddlewareStack) Remove(name string)
Remove remove middleware by name
func (*MiddlewareStack) String ¶
func (stack *MiddlewareStack) String() string
func (*MiddlewareStack) Use ¶
func (stack *MiddlewareStack) Use(middleware Middleware)
Use use middleware
Click to show internal directories.
Click to hide internal directories.