Documentation
¶
Index ¶
- func Params(req *http.Request) httprouter.Params
- type Hitch
- func (h *Hitch) Delete(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Get(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Handle(method, path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) HandleFunc(method, path string, handler func(http.ResponseWriter, *http.Request), ...)
- func (h *Hitch) Handler() http.Handler
- func (h *Hitch) Next(handler http.Handler)
- func (h *Hitch) Options(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Patch(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Post(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Put(path string, handler http.Handler, middleware ...Middleware)
- func (h *Hitch) Use(middleware ...Middleware)
- func (h *Hitch) UseHandler(handler http.Handler)
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hitch ¶
type Hitch struct { Router *httprouter.Router // contains filtered or unexported fields }
Hitch ties httprouter, context, and middleware up in a bow.
func (*Hitch) Delete ¶
func (h *Hitch) Delete(path string, handler http.Handler, middleware ...Middleware)
Delete registers a DELETE handler for the given path.
func (*Hitch) Get ¶
func (h *Hitch) Get(path string, handler http.Handler, middleware ...Middleware)
Get registers a GET handler for the given path.
func (*Hitch) Handle ¶
func (h *Hitch) Handle(method, path string, handler http.Handler, middleware ...Middleware)
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 ...Middleware)
HandleFunc registers a func handler for the given method and path.
func (*Hitch) Options ¶
func (h *Hitch) Options(path string, handler http.Handler, middleware ...Middleware)
Options registers a OPTIONS handler for the given path.
func (*Hitch) Patch ¶
func (h *Hitch) Patch(path string, handler http.Handler, middleware ...Middleware)
Patch registers a PATCH handler for the given path.
func (*Hitch) Post ¶
func (h *Hitch) Post(path string, handler http.Handler, middleware ...Middleware)
Post registers a POST handler for the given path.
func (*Hitch) Put ¶
func (h *Hitch) Put(path string, handler http.Handler, middleware ...Middleware)
Put registers a PUT handler for the given path.
func (*Hitch) Use ¶
func (h *Hitch) Use(middleware ...Middleware)
Use installs one or more middleware in the Hitch request cycle.
func (*Hitch) UseHandler ¶
UseHandler registers an http.Handler as a middleware.
Click to show internal directories.
Click to hide internal directories.