Documentation ¶
Index ¶
- func DefaultHandler(h func(w http.ResponseWriter, r *http.Request, params httprouter.Params)) func(w http.ResponseWriter, r *http.Request)
- type Action
- type App
- func (t *App) ActionHandler(action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (t *App) HandleAction(w http.ResponseWriter, r *http.Request, action Action)
- func (t *App) HandleError(w http.ResponseWriter, e error)
- func (t *App) Handler(action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (t *App) LayoutHandler(layout Layout, action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (a *App) Url(name string, params ...interface{}) string
- type Layout
- type LoadAction
- type LoadWithParamsAction
- type NamedRoute
- type Router
- type UrlFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHandler ¶
func DefaultHandler(h func(w http.ResponseWriter, r *http.Request, params httprouter.Params)) func(w http.ResponseWriter, r *http.Request)
Types ¶
type App ¶
type App struct { Layout Layout DefaultTitle string Funcs template.FuncMap // contains filtered or unexported fields }
func (*App) ActionHandler ¶
func (t *App) ActionHandler(action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*App) HandleAction ¶
func (*App) HandleError ¶
func (t *App) HandleError(w http.ResponseWriter, e error)
allow registering error pages
func (*App) Handler ¶
func (t *App) Handler(action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*App) LayoutHandler ¶
func (t *App) LayoutHandler(layout Layout, action Action) func(w http.ResponseWriter, r *http.Request, params httprouter.Params)
type LoadWithParamsAction ¶
type NamedRoute ¶
type NamedRoute struct { Name string Handler interface{} }
type Router ¶
type Router map[string]map[string]func(http.ResponseWriter, *http.Request, httprouter.Params)
Click to show internal directories.
Click to hide internal directories.