Documentation ¶
Index ¶
- func GetParam(r *http.Request, key string) string
- type Groupable
- type Handler
- type Min
- func (m *Min) Delete(path string, handler http.HandlerFunc)
- func (m *Min) Get(path string, handler http.HandlerFunc)
- func (m *Min) GetBaseRouter() *httprouter.Router
- func (m *Min) Group(root string) Router
- func (m *Min) Head(path string, handler http.HandlerFunc)
- func (m *Min) Options(path string, handler http.HandlerFunc)
- func (m *Min) Patch(path string, handler http.HandlerFunc)
- func (m *Min) Post(path string, handler http.HandlerFunc)
- func (m *Min) Put(path string, handler http.HandlerFunc)
- func (m *Min) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (m *Min) Use(f func(http.Handler) http.Handler)
- type Pluggable
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface { Post(string, http.HandlerFunc) Get(string, http.HandlerFunc) Put(string, http.HandlerFunc) Patch(string, http.HandlerFunc) Delete(string, http.HandlerFunc) Head(string, http.HandlerFunc) Options(string, http.HandlerFunc) }
Handler represents anything that can be used to register routes
type Min ¶
type Min struct {
// contains filtered or unexported fields
}
Min is the main type. It contains an httprouter.Router, and wraps around it to provide extra functionality.
func New ¶
func New(router *httprouter.Router) *Min
New returns a new Min with the provided httprouter.Router as the base router. If router is nil, a new, default one is created.
func (*Min) Delete ¶
func (m *Min) Delete(path string, handler http.HandlerFunc)
Delete registers a handler for DELETE requests
func (*Min) Get ¶
func (m *Min) Get(path string, handler http.HandlerFunc)
Get registers a handler for GET requests
func (*Min) GetBaseRouter ¶
func (m *Min) GetBaseRouter() *httprouter.Router
GetBaseRouter returns a pointer to the contained httprouter.Router, which enables users to change and configure the router as they please
func (*Min) Head ¶
func (m *Min) Head(path string, handler http.HandlerFunc)
Head registers a handler for HEAD requests
func (*Min) Options ¶
func (m *Min) Options(path string, handler http.HandlerFunc)
Options registers a handler for OPTIONS requests
func (*Min) Patch ¶
func (m *Min) Patch(path string, handler http.HandlerFunc)
Patch registers a handler for PATCH requests
func (*Min) Post ¶
func (m *Min) Post(path string, handler http.HandlerFunc)
Post registers a handler for POST requests