Documentation
¶
Index ¶
- Constants
- type Handler
- type Result
- type Route
- type Router
- func (router *Router) Delete(path string, handler Handler) (err error)
- func (router *Router) Get(path string, handler Handler) (err error)
- func (router *Router) Patch(path string, handler Handler) (err error)
- func (router *Router) Post(path string, handler Handler) (err error)
- func (router *Router) Put(path string, handler Handler) (err error)
- func (router *Router) Search(path string, method string) (_result *Result, err error)
- func (router *Router) ServeHTTP(res http.ResponseWriter, req *http.Request)
Constants ¶
View Source
const ( //GET ... GET = "GET" //POST ... POST = "POST" //PUT ... PUT = "PUT" //DELETE ... DELETE = "DELETE" //PATCH ... PATCH = "PATCH" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Route ¶
type Route struct {
ID string
Children map[string]*Route
Handler map[string]Handler
Parameters map[string]string
Method string
}
Route holds a route, it's parameters, in a tree
type Router ¶
Router object contains routes
Click to show internal directories.
Click to hide internal directories.