Documentation ¶
Index ¶
- type BaseController
- func (this *BaseController) CheckLogin() int
- func (this *BaseController) DocExist()
- func (this *BaseController) Pages()
- func (this *BaseController) Prepare()
- func (this *BaseController) ResetCookie()
- func (this *BaseController) ResponseJson(isSuccess bool, msg string, data ...interface{})
- func (this *BaseController) SetCookieLogin(uid interface{})
- func (this *BaseController) Xsrf()
- type CollectController
- type ErrorsController
- type IndexController
- type InstallController
- type ListController
- type Output
- type ReportController
- type SearchController
- type StaticController
- type UploadController
- type UserController
- func (this *UserController) Avatar()
- func (this *UserController) CheckLogin()
- func (this *UserController) Coin()
- func (this *UserController) Collect()
- func (this *UserController) CollectCancel()
- func (this *UserController) CollectFolderDel()
- func (this *UserController) CreateCollectFolder()
- func (this *UserController) DocDel()
- func (this *UserController) DocEdit()
- func (this *UserController) Edit()
- func (this *UserController) FindPwd()
- func (this *UserController) Get()
- func (this *UserController) Login()
- func (this *UserController) Logout()
- func (this *UserController) Prepare()
- func (this *UserController) Reg()
- func (this *UserController) SendMail()
- func (this *UserController) Sign()
- type ViewController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct { beego.Controller TplTheme string //模板主题 TplStatic string //模板静态文件 IsLogin int //用户是否已登录 Sys models.Sys Out Output }
func (*BaseController) CheckLogin ¶
func (this *BaseController) CheckLogin() int
是否已经登录,如果已登录,则返回用户的id
func (*BaseController) ResponseJson ¶
func (this *BaseController) ResponseJson(isSuccess bool, msg string, data ...interface{})
响应json
func (*BaseController) SetCookieLogin ¶
func (this *BaseController) SetCookieLogin(uid interface{})
设置用户登录的cookie,其实uid是时间戳的加密,而token才是真正的uid @param uid interface{} 用户UID
func (*BaseController) Xsrf ¶
func (this *BaseController) Xsrf()
防止跨站攻击,在有表单的控制器放大中调用,不要直接在base控制器中调用,因为用户每访问一个页面都重新刷新cookie了
type CollectController ¶
type CollectController struct {
BaseController
}
type ErrorsController ¶
type ErrorsController struct {
beego.Controller
}
type IndexController ¶
type IndexController struct {
BaseController
}
func (*IndexController) Get ¶
func (this *IndexController) Get()
type InstallController ¶
type InstallController struct {
beego.Controller
}
type ListController ¶
type ListController struct {
BaseController
}
func (*ListController) Get ¶
func (this *ListController) Get()
type ReportController ¶
type ReportController struct {
BaseController
}
type SearchController ¶
type SearchController struct {
BaseController
}
func (*SearchController) Get ¶
func (this *SearchController) Get()
type StaticController ¶
type StaticController struct {
beego.Controller
}
type UploadController ¶
type UploadController struct {
BaseController
}
func (*UploadController) Post ¶
func (this *UploadController) Post()
文档执行操作 处理流程: 1、检测用户是否已登录,未登录不允许上传 2、检测是否存在了该文档的md5,如果已存在,则根据md5查询存储在文档存档表中的数据;如果文档已经在文档存储表中存在,则该文档不需要再获取封面、大小、页码等数据 3、检测文档格式是否符合要求。 4、计算文档md5,然后根据md5再比对一次文档是否在存档表中存在 5、文档未存在,则将文档数据录入文档存储表(document_store) 6、执行文档转pdf,并获取文档页数、封面、摘要等 7、获取文档大小
type UserController ¶
type UserController struct {
BaseController
}
func (*UserController) CollectFolderDel ¶
func (this *UserController) CollectFolderDel()
删除收藏(针对收藏夹)
func (*UserController) CreateCollectFolder ¶
func (this *UserController) CreateCollectFolder()
创建收藏夹
func (*UserController) Prepare ¶
func (this *UserController) Prepare()
type ViewController ¶
type ViewController struct {
BaseController
}
func (*ViewController) Get ¶
func (this *ViewController) Get()
Click to show internal directories.
Click to hide internal directories.