Documentation
¶
Index ¶
- Variables
- func Proxy(basePath string, redirectUrl string)
- func Register(handler Handler)
- func Run(addr string) error
- func StaticContent(url, dirname string)
- type Context
- func (c *Context) ReadBytes() []byte
- func (c *Context) ReadForm(data interface{})
- func (c *Context) ReadJson(data interface{})
- func (c *Context) ReadString() string
- func (c *Context) SendJson(data interface{})
- func (c *Context) SendString(data string)
- func (c *Context) SendTemplate(data interface{})
- type Handler
- type HandlerFunc
- type HandlerFuncSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TemplatePath = "./templates" AdditionalFuncs template.FuncMap Dev = false )
Functions ¶
func StaticContent ¶
func StaticContent(url, dirname string)
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Request *http.Request Template *template.Template ContextData map[string]interface{} }
func (*Context) ReadString ¶ added in v0.0.2
func (*Context) SendString ¶
func (*Context) SendTemplate ¶
func (c *Context) SendTemplate(data interface{})
type Handler ¶
type Handler struct { Url string Func HandlerFunc TemplateFile string LayoutFile string }
type HandlerFunc ¶
type HandlerFunc func(c *Context)
type HandlerFuncSet ¶
type HandlerFuncSet []HandlerFunc
var ( PreHandlerFuncs HandlerFuncSet PostHandlerFuncs HandlerFuncSet )
func (*HandlerFuncSet) Add ¶
func (h *HandlerFuncSet) Add(handler HandlerFunc)
Click to show internal directories.
Click to hide internal directories.