Documentation ¶
Index ¶
- func Register(mux *mux.Router, stopKeyReset chan struct{}) (err error)
- type Context
- func (c *Context) Admin() bool
- func (c *Context) Auth() (auth string)
- func (c *Context) CheckToken() bool
- func (c *Context) Exec()
- func (c *Context) Form(name string) string
- func (c *Context) FormSlice(name string) []string
- func (c *Context) Group() (group string)
- func (c *Context) InitToken()
- func (c *Context) JWT() string
- func (c *Context) LoggedOn() (ok bool)
- func (c *Context) Method() string
- func (c *Context) Path() string
- func (c *Context) Redirect(uri string, code int)
- func (c *Context) SetData(user, jwt, auth string, admin bool)
- func (c *Context) SetGroup(group string)
- func (c *Context) SetHeader(name, value string)
- func (c *Context) Template(name string)
- func (c *Context) UnsetData()
- func (c *Context) User() string
- func (c *Context) Var(name string) (ret string)
- func (c *Context) Write(buf []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Request *http.Request Response http.ResponseWriter T *template.Template Status int Data webData }
Context is the context object shared between http handlers
func (*Context) CheckToken ¶
CheckToken validates the xsrf token
Click to show internal directories.
Click to hide internal directories.