Documentation ¶
Index ¶
- func Contexter() macaron.Handler
- type Context
- func (ctx *Context) APIError(status int, title string, obj interface{})
- func (ctx *Context) GetErrMsg() string
- func (ctx *Context) HTML(status int, name base.TplName)
- func (ctx *Context) Handle(status int, title string, err error)
- func (ctx *Context) HandleText(status int, title string)
- func (ctx *Context) HasApiError() bool
- func (ctx *Context) HasError() bool
- func (ctx *Context) HasValue(name string) bool
- func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, form interface{})
- func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{})
- type ToggleOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { *macaron.Context Cache cache.Cache Flash *session.Flash Session session.Store User *models.User IsSigned bool IsBasicAuth bool // contains filtered or unexported fields }
Context represents context of a request.
func (*Context) HandleText ¶
func (*Context) HasApiError ¶
HasError returns true if error occurs in form validation.
func (*Context) RenderWithErr ¶
RenderWithErr used for page has form validation but need to prompt error to users.
func (*Context) ServeContent ¶
func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{})
Click to show internal directories.
Click to hide internal directories.