Documentation ¶
Index ¶
- type HandlerFuncWithParam
- type Param
- type PathParams
- type Router
- func (rtr *Router) Add(path string, method string, handler HandlerFuncWithParam)
- func (rtr *Router) AddDelete(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddGet(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddHead(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddOptions(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddPatch(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddPost(path string, handler HandlerFuncWithParam)
- func (rtr *Router) AddPut(path string, handler HandlerFuncWithParam)
- func (rtr *Router) ServeHTTP(w http.ResponseWriter, request *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFuncWithParam ¶
type HandlerFuncWithParam func(w http.ResponseWriter, request *http.Request, param PathParams)
type PathParams ¶
type PathParams []Param
func (PathParams) ByName ¶
func (params PathParams) ByName(name string) string
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Add ¶
func (rtr *Router) Add(path string, method string, handler HandlerFuncWithParam)
func (*Router) AddDelete ¶
func (rtr *Router) AddDelete(path string, handler HandlerFuncWithParam)
AddDelete registers a new request handle with the given path and Delete-method.
func (*Router) AddGet ¶
func (rtr *Router) AddGet(path string, handler HandlerFuncWithParam)
AddGet registers a new request handle with the given path and Get-method.
func (*Router) AddHead ¶
func (rtr *Router) AddHead(path string, handler HandlerFuncWithParam)
AddHead registers a new request handle with the given path and Head-method.
func (*Router) AddOptions ¶
func (rtr *Router) AddOptions(path string, handler HandlerFuncWithParam)
AddOptions registers a new request handle with the given path and Options-method.
func (*Router) AddPatch ¶
func (rtr *Router) AddPatch(path string, handler HandlerFuncWithParam)
AddPatch registers a new request handle with the given path and Patch-method.
func (*Router) AddPost ¶
func (rtr *Router) AddPost(path string, handler HandlerFuncWithParam)
AddPost registers a new request handle with the given path and Post-method.
func (*Router) AddPut ¶
func (rtr *Router) AddPut(path string, handler HandlerFuncWithParam)
AddPut registers a new request handle with the given path and Put-method.
Click to show internal directories.
Click to hide internal directories.