Documentation ¶
Index ¶
Constants ¶
View Source
const CurrentAccount = "current_account"
CurrentAccount ...
Variables ¶
This section is empty.
Functions ¶
func WebAPIControllerFunc ¶
func WebAPIControllerFunc(ctlFunc func(ctx *WebAPIContext)) gin.HandlerFunc
WebAPIControllerFunc WebAPI控制器函数
func WebControllerFunc ¶
func WebControllerFunc(ctlFunc func(ctx *WebContext), pageName string) gin.HandlerFunc
WebControllerFunc Web控制器函数
Types ¶
type EngineTemplate ¶
type EngineTemplate struct { Errors <-chan error // contains filtered or unexported fields }
EngineTemplate gin引擎模板
func NewEngineTemplate ¶
func NewEngineTemplate(templateDir string, engine *gin.Engine, tmplFunc LoadTemplateFunc) (*EngineTemplate, error)
NewEngineTemplate 创建一个gin引擎模板
func (*EngineTemplate) LoadTemplate ¶
func (tmpl *EngineTemplate) LoadTemplate() multitemplate.Render
LoadTemplate 加载模板
func (*EngineTemplate) Watching ¶
func (tmpl *EngineTemplate) Watching() error
Watching 监听模板文件夹中是否有变动
type LoadTemplateFunc ¶
type LoadTemplateFunc func(templatesDir string) multitemplate.Render
LoadTemplateFunc 加载模板函数类
type WebAPIContext ¶
WebAPIContext Web上下文
func (*WebAPIContext) DelCurrentAccount ¶
func (ctx *WebAPIContext) DelCurrentAccount() error
DelCurrentAccount 删除当前账户
func (*WebAPIContext) GetCurrentAccount ¶
func (ctx *WebAPIContext) GetCurrentAccount() interface{}
GetCurrentAccount 设置当前账户
func (*WebAPIContext) ResultError ¶
func (ctx *WebAPIContext) ResultError(err error)
ResultError 返回错误
func (*WebAPIContext) SetCurrentAccount ¶
func (ctx *WebAPIContext) SetCurrentAccount(data interface{}) error
SetCurrentAccount 设置当前账户
type WebContext ¶
WebContext Web上下文
func (*WebContext) DelCurrentAccount ¶
func (ctx *WebContext) DelCurrentAccount() error
DelCurrentAccount 删除当前账户
func (*WebContext) GetCurrentAccount ¶
func (ctx *WebContext) GetCurrentAccount() interface{}
GetCurrentAccount 设置当前账户
func (*WebContext) RenderSinglePage ¶
func (ctx *WebContext) RenderSinglePage(data gin.H)
RenderSinglePage 渲染单页面
func (*WebContext) SetCurrentAccount ¶
func (ctx *WebContext) SetCurrentAccount(data interface{}) error
SetCurrentAccount 设置当前账户
Click to show internal directories.
Click to hide internal directories.