Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentTypeJSON ¶
func ContentTypeJSON(next httprouter.Handle) httprouter.Handle
ContentTypeJSON for the HTTP response.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain represents helper struct that is able to wrap httprouter.Handle with chain.
func NewChain ¶
func NewChain(middlewares ...HandleFunc) Chain
NewChain create a chain out of middlewares.
func (Chain) Wrap ¶
func (chain Chain) Wrap(handler httprouter.Handle) httprouter.Handle
Wrap the handler with Chain.
type HandleFunc ¶
type HandleFunc func(httprouter.Handle) httprouter.Handle
HandleFunc is a method type that represents Middleware HandleFunc function.
Click to show internal directories.
Click to hide internal directories.