Documentation
¶
Index ¶
- func ProcessParams(req *http.Request, params map[string]string)
- type Route
- type Router
- func (self *Router) AddRoute(method string, path string, h http.Handler)
- func (self *Router) Delete(path string, h http.Handler)
- func (self *Router) ErrorPage(w http.ResponseWriter, req *http.Request, code int, errMsg string)
- func (self *Router) Get(path string, h http.Handler)
- func (self *Router) Post(path string, h http.Handler)
- func (self *Router) Put(path string, h http.Handler)
- func (self *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Router ¶
type Router struct {
/* This is the template for error pages */
Fallback template.Template
/* StaticPaths can be filled from outside when constructing the Router.
* key = uri
* value = file path
*/
StaticPaths map[string]string
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.