Documentation ¶
Index ¶
- func Handle(h HandlerFunc) gin.HandlerFunc
- type Context
- func (c *Context) BaseUrl() string
- func (c *Context) Download(file string, filename ...string)
- func (c *Context) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error)
- func (c *Context) ForbidGeneralRole() bool
- func (c *Context) GetPostFormString(key string) string
- func (c *Context) GetSeoByPage(page string, defSeo map[string]string)
- func (c *Context) GetSession(key string) interface{}
- func (c *Context) Html(path string)
- func (c *Context) Html404()
- func (c *Context) JSONCode(Code int, data ...interface{})
- func (c *Context) JSONErr(Code int, err error)
- func (c *Context) JSONErrStr(Code int, err string)
- func (c *Context) JSONOK(result ...interface{})
- func (c *Context) Logout() error
- func (c *Context) Member() *mysql.Member
- func (c *Context) ReplaceLinks(bookIdentify string, docHtml string, isSummary ...bool) string
- func (c *Context) SaveToFile(fromfile, tofile string) error
- func (c *Context) SetSession(key, value string) error
- func (c *Context) Tpl() *tplbeego.Tmpl
- func (c *Context) UpdateUser(a *mysql.Member) error
- type HandlerFunc
- type JSONResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handle ¶
func Handle(h HandlerFunc) gin.HandlerFunc
Types ¶
type Context ¶
func (*Context) ExecuteViewPathTemplate ¶
ExecuteViewPathTemplate 执行指定的模板并返回执行结果.
func (*Context) ForbidGeneralRole ¶
func (*Context) GetPostFormString ¶
func (*Context) GetSeoByPage ¶
根据页面获取seo @param page 页面标识 @param defSeo 默认的seo的map,必须有title、keywords和description字段
func (*Context) GetSession ¶
func (*Context) JSONErrStr ¶
func (*Context) ReplaceLinks ¶
替换链接 如果是summary,则根据这个进行排序调整
func (*Context) SaveToFile ¶
SaveToFile saves uploaded file to new path. it only operates the first one of mutil-upload form file field.
func (*Context) SetSession ¶
type HandlerFunc ¶
type HandlerFunc func(c *Context)
type JSONResult ¶
type JSONResult struct { Code int `json:"code"` Message string `json:"msg"` Data interface{} `json:"data"` }
JSONResult json
Click to show internal directories.
Click to hide internal directories.