Versions in this module Expand all Collapse all v0 v0.1.1 Jul 27, 2017 Changes in this version type Context + SignError error v0.1.0 Jul 24, 2017 Changes in this version + const TOKEN_TYPE_ACCESS + const TOKEN_TYPE_AUTH + func APIContexter() macaron.Handler + func APIToggle(options *ToggleOptions) macaron.Handler + func Contexter() macaron.Handler + func HTMLContexter() macaron.Handler + func InitContextConfig(reverseProxyAuthAble, installLock, registerEmailConfirmAble, ... bool, ...) + func IsAPIPath(url string) bool + func Toggle(options *ToggleOptions) macaron.Handler + type APIContext struct + func (ctx *APIContext) Auth() + func (ctx *APIContext) Error(obj interface{}) + func (ctx *APIContext) GetToken() string + func (ctx *APIContext) JSON(status int, obj interface{}) + type Context struct + Cache cache.Cache + IsBasicAuth bool + IsSigned bool + User *model.User + func (ctx *Context) Auth() + func (ctx *Context) Handle(status int, title string, err error) + func (ctx *Context) Query(name string) string + func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{}) + func (ctx *Context) ServeFile(file string, names ...string) + type HTMLContext struct + Flash *session.Flash + Session session.Store + func (ctx *HTMLContext) Auth() + func (ctx *HTMLContext) GetErrMsg() string + func (ctx *HTMLContext) HTML(status int, name infrastructure.TplName) + func (ctx *HTMLContext) Handle(status int, title string, err error) + func (ctx *HTMLContext) HasError() bool + func (ctx *HTMLContext) RenderWithErr(msg string, tpl infrastructure.TplName, form interface{}) + type ToggleOptions struct + AdminRequire bool + DisableCSRF bool + SignInRequire bool + SignOutRequire bool