Documentation ¶
Index ¶
- func Params(req *http.Request) httprouter.Params
- type Hitch
- func (h *Hitch) Delete(path string, handler http.Handler, ...)
- func (h *Hitch) Get(path string, handler http.Handler, ...)
- func (h *Hitch) Handle(method, path string, handler http.Handler, ...)
- func (h *Hitch) HandleFunc(method, path string, handler func(http.ResponseWriter, *http.Request), ...)
- func (h *Hitch) HandleIf(branch func(http.Handler, http.Handler) http.Handler, next http.Handler)
- func (h *Hitch) Handler() http.Handler
- func (h *Hitch) Next(handler http.Handler)
- func (h *Hitch) Options(path string, handler http.Handler, ...)
- func (h *Hitch) Patch(path string, handler http.Handler, ...)
- func (h *Hitch) Post(path string, handler http.Handler, ...)
- func (h *Hitch) Put(path string, handler http.Handler, ...)
- func (h *Hitch) Use(middleware ...func(http.Handler) http.Handler)
- func (h *Hitch) UseHandler(handler http.Handler)
- func (h *Hitch) UseIf(cond func(req *http.Request) bool, handler http.Handler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hitch ¶
Hitch ties httprouter, httpcontext, and middleware up in a bow.
func (*Hitch) Delete ¶
func (h *Hitch) Delete(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Delete registers a DELETE handler for the given path.
func (*Hitch) Get ¶
func (h *Hitch) Get(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Get registers a GET handler for the given path.
func (*Hitch) Handle ¶
func (h *Hitch) Handle(method, path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Handle registers a handler for the given method and path.
func (*Hitch) HandleFunc ¶
func (h *Hitch) HandleFunc(method, path string, handler func(http.ResponseWriter, *http.Request), middleware ...func(http.Handler) http.Handler)
HandleFunc registers a func handler for the given method and path.
func (*Hitch) Options ¶
func (h *Hitch) Options(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Options registers a OPTIONS handler for the given path.
func (*Hitch) Patch ¶
func (h *Hitch) Patch(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Patch registers a PATCH handler for the given path.
func (*Hitch) Post ¶
func (h *Hitch) Post(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Post registers a POST handler for the given path.
func (*Hitch) Put ¶
func (h *Hitch) Put(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler)
Put registers a PUT handler for the given path.
func (*Hitch) UseHandler ¶
UseHandler registers an http.Handler as a middleware.
Click to show internal directories.
Click to hide internal directories.