Documentation ¶
Index ¶
- Constants
- type Callback
- type Data
- type Params
- type Router
- func (router *Router) ClearCache(str string)
- func (router *Router) DELETE(str string, cb Callback)
- func (router *Router) Dir(str string) string
- func (router *Router) EmptyCache()
- func (router *Router) GET(str string, cb Callback)
- func (router *Router) HEAD(str string, cb Callback)
- func (router *Router) LateRoute(method string, str string, cb Callback)
- func (router *Router) PATCH(str string, cb Callback)
- func (router *Router) POST(str string, cb Callback)
- func (router *Router) PUT(str string, cb Callback)
- func (router *Router) RemoveRoute(str string)
- func (router *Router) Route(method string, str string, cb Callback)
- func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (router *Router) Set404(cb Callback)
- func (router *Router) Set500(cb Callback)
- func (router *Router) SetLogLevel(i int)
- func (router *Router) SetLogger(logger *log.Logger)
- func (router *Router) StaticDir(dir string) func(*Data)
- func (router *Router) StaticFile(fn string) func(*Data)
Constants ¶
View Source
const ( LOG_ERRORS int = iota LOG_INFO LOG_DEBUG )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Writer http.ResponseWriter // http writer Request *http.Request // http request Params Params // url params HTML string // html response to be parsed // contains filtered or unexported fields }
route callback data
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) ClearCache ¶
clear cache that matches a pattern
func (*Router) RemoveRoute ¶
removes routes that patch a pattern
func (*Router) StaticFile ¶
returns a Callback function for serving a single static file
Click to show internal directories.
Click to hide internal directories.