Documentation ¶
Index ¶
- func RecursiveFun(parent_id int, prefix, dpath string, this *DocumentController, ...)
- type AccountController
- type BaseController
- func (this *BaseController) BaseUrl() string
- func (this *BaseController) Crawl()
- func (this *BaseController) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error)
- func (this *BaseController) GetSeoByPage(page string, defSeo map[string]string)
- func (this *BaseController) JsonResult(errCode int, errMsg string, data ...interface{})
- func (this *BaseController) Prepare()
- func (this *BaseController) Search()
- func (this *BaseController) SetFollow()
- func (this *BaseController) SetMember(member models.Member)
- func (this *BaseController) ShowErrorPage(errCode int, errMsg string)
- func (this *BaseController) Sitemap()
- func (this *BaseController) StaticFile()
- type BookController
- func (this *BookController) Comment()
- func (this *BookController) Create()
- func (this *BookController) CreateToken()
- func (this *BookController) Dashboard()
- func (this *BookController) Delete()
- func (this *BookController) DownloadProject()
- func (this *BookController) Generate()
- func (this *BookController) Index()
- func (this *BookController) IsPermission() (*models.BookResult, error)
- func (this *BookController) PrivatelyOwned()
- func (this *BookController) Release()
- func (this *BookController) SaveBook()
- func (this *BookController) SaveSort()
- func (this *BookController) Score()
- func (this *BookController) Setting()
- func (this *BookController) Star()
- func (this *BookController) Transfer()
- func (this *BookController) UploadCover()
- func (this *BookController) UploadProject()
- func (this *BookController) Users()
- type BookMemberController
- type CateController
- type CommentController
- type CookieRemember
- type DocumentController
- func (this *DocumentController) Compare()
- func (this *DocumentController) Content()
- func (this *DocumentController) Create()
- func (this *DocumentController) CreateMulti()
- func (this *DocumentController) Delete()
- func (this *DocumentController) DeleteHistory()
- func (this *DocumentController) DownloadAttachment()
- func (this *DocumentController) Edit()
- func (this *DocumentController) Export()
- func (this *DocumentController) History()
- func (this *DocumentController) Index()
- func (this *DocumentController) QrCode()
- func (this *DocumentController) Read()
- func (this *DocumentController) RemoveAttachment()
- func (this *DocumentController) RestoreHistory()
- func (this *DocumentController) Search()
- func (this *DocumentController) Upload()
- type ErrorController
- type HomeController
- type LabelController
- type LocalhostController
- type ManagerController
- func (this *ManagerController) AddFriendlink()
- func (this *ManagerController) AttachDelete()
- func (this *ManagerController) AttachDetailed()
- func (this *ManagerController) AttachList()
- func (this *ManagerController) Books()
- func (this *ManagerController) Category()
- func (this *ManagerController) ChangeMemberRole()
- func (this *ManagerController) Comments()
- func (this *ManagerController) CreateMember()
- func (this *ManagerController) CreateToken()
- func (this *ManagerController) DelCate()
- func (this *ManagerController) DelFriendlink()
- func (this *ManagerController) DeleteBook()
- func (this *ManagerController) DeleteComment()
- func (this *ManagerController) DeleteMember()
- func (this *ManagerController) EditBook()
- func (this *ManagerController) EditMember()
- func (this *ManagerController) FriendLink()
- func (this *ManagerController) Index()
- func (this *ManagerController) Prepare()
- func (this *ManagerController) PrivatelyOwned()
- func (this *ManagerController) Seo()
- func (this *ManagerController) Setting()
- func (this *ManagerController) Sitemap()
- func (this *ManagerController) Transfer()
- func (this *ManagerController) UpdateBookSort()
- func (this *ManagerController) UpdateCate()
- func (this *ManagerController) UpdateCateIcon()
- func (this *ManagerController) UpdateFriendlink()
- func (this *ManagerController) UpdateMemberStatus()
- func (this *ManagerController) Users()
- type SearchController
- type SettingController
- type Sort
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecursiveFun ¶
func RecursiveFun(parent_id int, prefix, dpath string, this *DocumentController, book *models.BookResult, docs []*models.Document, paths *list.List)
递归生成文档序列数组.
Types ¶
type AccountController ¶
type AccountController struct {
BaseController
}
AccountController 用户登录与注册.
func (*AccountController) Bind ¶
func (this *AccountController) Bind()
用户注册.[移除用户注册,直接叫用户绑定] 注意:如果用户输入的账号密码跟现有的账号密码相一致,则表示绑定账号,否则表示注册新账号。
func (*AccountController) Oauth ¶
func (this *AccountController) Oauth()
第三方登录回调 封装一个内部调用的函数,loginByMemberId
type BaseController ¶
type BaseController struct { beego.Controller Member *models.Member Option map[string]string EnableAnonymous bool EnableDocumentHistory bool Sitename string OssDomain string }
func (*BaseController) BaseUrl ¶
func (this *BaseController) BaseUrl() string
func (*BaseController) ExecuteViewPathTemplate ¶
func (this *BaseController) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error)
ExecuteViewPathTemplate 执行指定的模板并返回执行结果.
func (*BaseController) GetSeoByPage ¶
func (this *BaseController) GetSeoByPage(page string, defSeo map[string]string)
根据页面获取seo @param page 页面标识 @param defSeo 默认的seo的map,必须有title、keywords和description字段
func (*BaseController) JsonResult ¶
func (this *BaseController) JsonResult(errCode int, errMsg string, data ...interface{})
JsonResult 响应 json 结果
func (*BaseController) SetMember ¶
func (this *BaseController) SetMember(member models.Member)
SetMember 获取或设置当前登录用户信息,如果 MemberId 小于 0 则标识删除 Session
func (*BaseController) ShowErrorPage ¶
func (this *BaseController) ShowErrorPage(errCode int, errMsg string)
显示错误信息页面.
type BookController ¶
type BookController struct {
BaseController
}
func (*BookController) DownloadProject ¶
func (this *BookController) DownloadProject()
从github等拉取下载markdown项目
func (*BookController) Generate ¶
func (this *BookController) Generate()
生成下载文档 加锁,防止用户不停地点击生成下载文档造成服务器资源开销.
func (*BookController) Index ¶
func (this *BookController) Index()
func (*BookController) IsPermission ¶
func (this *BookController) IsPermission() (*models.BookResult, error)
type BookMemberController ¶
type BookMemberController struct {
BaseController
}
func (*BookMemberController) AddMember ¶
func (this *BookMemberController) AddMember()
AddMember 参加参与用户.
func (*BookMemberController) ChangeRole ¶
func (this *BookMemberController) ChangeRole()
变更指定用户在指定项目中的权限
func (*BookMemberController) IsPermission ¶
func (this *BookMemberController) IsPermission() (*models.BookResult, error)
type CateController ¶
type CateController struct {
BaseController
}
type CommentController ¶
type CommentController struct {
BaseController
}
func (*CommentController) Create ¶
func (c *CommentController) Create()
func (*CommentController) Index ¶
func (c *CommentController) Index()
func (*CommentController) Lists ¶
func (c *CommentController) Lists()
type DocumentController ¶
type DocumentController struct {
BaseController
}
DocumentController struct.
func (*DocumentController) Compare ¶
func (this *DocumentController) Compare()
func (*DocumentController) DeleteHistory ¶
func (this *DocumentController) DeleteHistory()
func (*DocumentController) DownloadAttachment ¶
func (this *DocumentController) DownloadAttachment()
DownloadAttachment 下载附件.
func (*DocumentController) QrCode ¶
func (this *DocumentController) QrCode()
func (*DocumentController) RemoveAttachment ¶
func (this *DocumentController) RemoveAttachment()
删除附件.
func (*DocumentController) RestoreHistory ¶
func (this *DocumentController) RestoreHistory()
type ErrorController ¶
type ErrorController struct {
BaseController
}
func (*ErrorController) Error403 ¶
func (this *ErrorController) Error403()
func (*ErrorController) Error404 ¶
func (this *ErrorController) Error404()
func (*ErrorController) Error500 ¶
func (this *ErrorController) Error500()
type HomeController ¶
type HomeController struct {
BaseController
}
func (*HomeController) Index ¶
func (this *HomeController) Index()
type LabelController ¶
type LabelController struct {
BaseController
}
func (*LabelController) List ¶
func (this *LabelController) List()
func (*LabelController) Prepare ¶
func (this *LabelController) Prepare()
type LocalhostController ¶
type LocalhostController struct {
BaseController
}
只有请求头的host为localhost的才能访问。
func (*LocalhostController) RenderMarkdown ¶
func (this *LocalhostController) RenderMarkdown()
渲染markdown. 根据文档id来。
type ManagerController ¶
type ManagerController struct {
BaseController
}
func (*ManagerController) ChangeMemberRole ¶
func (this *ManagerController) ChangeMemberRole()
变更用户权限.
func (*ManagerController) Comments ¶
func (this *ManagerController) Comments()
func (*ManagerController) CreateToken ¶
func (this *ManagerController) CreateToken()
CreateToken 创建访问来令牌.
func (*ManagerController) DeleteComment ¶
func (this *ManagerController) DeleteComment()
DeleteComment 标记评论为已删除
func (*ManagerController) DeleteMember ¶
func (this *ManagerController) DeleteMember()
删除一个用户,并将该用户的所有信息转移到超级管理员上.
func (*ManagerController) Index ¶
func (this *ManagerController) Index()
func (*ManagerController) Prepare ¶
func (this *ManagerController) Prepare()
func (*ManagerController) PrivatelyOwned ¶
func (this *ManagerController) PrivatelyOwned()
设置项目私有状态.
func (*ManagerController) Setting ¶
func (this *ManagerController) Setting()
func (*ManagerController) Sitemap ¶
func (this *ManagerController) Sitemap()
func (*ManagerController) UpdateBookSort ¶
func (this *ManagerController) UpdateBookSort()
更行书籍项目的排序
func (*ManagerController) UpdateMemberStatus ¶
func (this *ManagerController) UpdateMemberStatus()
更新用户状态.
type SearchController ¶
type SearchController struct {
BaseController
}
func (*SearchController) Index ¶
func (this *SearchController) Index()
type SettingController ¶
type SettingController struct {
BaseController
}
type UserController ¶
type UserController struct { BaseController UcenterMember models.Member }
func (*UserController) Prepare ¶
func (this *UserController) Prepare()