controllers

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EachFun added in v0.7.1

func EachFun(prefix, dpath string, c *DocumentController, book *models.BookResult, item *models.Document, paths *list.List)

func RecursiveFun added in v0.5.1

func RecursiveFun(parentId int, prefix, dpath string, c *DocumentController, book *models.BookResult, docs []*models.Document, paths *list.List)

递归生成文档序列数组

Types

type AccountController

type AccountController struct {
	BaseController
}

AccountController 用户登录与注册

func (*AccountController) Captcha

func (c *AccountController) Captcha()

验证码

func (*AccountController) FindPassword

func (c *AccountController) FindPassword()

找回密码

func (*AccountController) LoggedIn added in v0.7.1

func (c *AccountController) LoggedIn(isPost bool) interface{}

登录成功后的操作,如重定向到原始请求页面

func (*AccountController) Login

func (c *AccountController) Login()

Login 用户登录

func (*AccountController) Logout

func (c *AccountController) Logout()

Logout 退出登录

func (*AccountController) Register

func (c *AccountController) Register()

用户注册

func (*AccountController) ValidEmail

func (c *AccountController) ValidEmail()

校验邮件并修改密码

type BaseController

type BaseController struct {
	beego.Controller
	Member                *models.Member
	Option                map[string]string
	EnableAnonymous       bool
	EnableDocumentHistory bool
}

func (*BaseController) BaseUrl

func (c *BaseController) BaseUrl() string

func (*BaseController) ExecuteViewPathTemplate

func (c *BaseController) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error)

ExecuteViewPathTemplate 执行指定的模板并返回执行结果.

func (*BaseController) JsonResult

func (c *BaseController) JsonResult(errCode int, errMsg string, data ...interface{})

JsonResult 响应 json 结果

func (*BaseController) Prepare

func (c *BaseController) Prepare()

Prepare 预处理.

func (*BaseController) SetMember

func (c *BaseController) SetMember(member models.Member)

SetMember 获取或设置当前登录用户信息,如果 MemberId 小于 0 则标识删除 Session

func (*BaseController) ShowErrorPage added in v0.5.1

func (c *BaseController) ShowErrorPage(errCode int, errMsg string)

显示错误信息页面.

type BlogController added in v0.13.1

type BlogController struct {
	BaseController
}

func (*BlogController) Download added in v0.13.1

func (c *BlogController) Download()

下载附件

func (*BlogController) Index added in v0.13.1

func (c *BlogController) Index()

文章阅读

func (*BlogController) List added in v0.13.1

func (c *BlogController) List()

文章列表

func (*BlogController) ManageDelete added in v0.13.1

func (c *BlogController) ManageDelete()

删除文章

func (*BlogController) ManageEdit added in v0.13.1

func (c *BlogController) ManageEdit()

文章创建或编辑

func (*BlogController) ManageList added in v0.13.1

func (c *BlogController) ManageList()

管理后台文章列表

func (*BlogController) ManageSetting added in v0.13.1

func (c *BlogController) ManageSetting()

文章设置

func (*BlogController) Prepare added in v1.0.1

func (c *BlogController) Prepare()

func (*BlogController) RemoveAttachment added in v0.13.1

func (c *BlogController) RemoveAttachment()

删除附件

func (*BlogController) Upload added in v0.13.1

func (c *BlogController) Upload()

上传附件或图片

type BookController

type BookController struct {
	BaseController
}

func (*BookController) Copy added in v0.13.1

func (c *BookController) Copy()

复制项目

func (*BookController) Create

func (c *BookController) Create()

Create 创建项目.

func (*BookController) CreateToken

func (c *BookController) CreateToken()

CreateToken 创建访问来令牌.

func (*BookController) Dashboard

func (c *BookController) Dashboard()

Dashboard 项目概要 .

func (*BookController) Delete

func (c *BookController) Delete()

Delete 删除项目.

func (*BookController) Import added in v0.8.1

func (c *BookController) Import()

导入zip压缩包

func (*BookController) Index

func (c *BookController) Index()

func (*BookController) IsPermission

func (c *BookController) IsPermission() (*models.BookResult, error)

func (*BookController) PrivatelyOwned

func (c *BookController) PrivatelyOwned()

设置项目私有状态.

func (*BookController) Release

func (c *BookController) Release()

发布项目.

func (*BookController) SaveBook

func (c *BookController) SaveBook()

保存项目信息

func (*BookController) SaveSort

func (c *BookController) SaveSort()

文档排序.

func (*BookController) Setting

func (c *BookController) Setting()

Setting 项目设置 .

func (*BookController) Transfer

func (c *BookController) Transfer()

Transfer 转让项目.

func (*BookController) UploadCover

func (c *BookController) UploadCover()

上传项目封面.

func (*BookController) Users

func (c *BookController) Users()

Users 用户列表.

type BookMemberController

type BookMemberController struct {
	BaseController
}

func (*BookMemberController) AddMember

func (c *BookMemberController) AddMember()

AddMember 参加参与用户.

func (*BookMemberController) ChangeRole

func (c *BookMemberController) ChangeRole()

变更指定用户在指定项目中的权限

func (*BookMemberController) IsPermission

func (c *BookMemberController) IsPermission() (*models.BookResult, error)

func (*BookMemberController) RemoveMember

func (c *BookMemberController) RemoveMember()

删除参与者.

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 CookieRemember added in v0.10.1

type CookieRemember struct {
	MemberId int
	Account  string
	Time     time.Time
}

type DocumentController

type DocumentController struct {
	BaseController
}

DocumentController struct

func (*DocumentController) Compare added in v0.5.1

func (c *DocumentController) Compare()

func (*DocumentController) Content

func (c *DocumentController) Content()

获取文档内容

func (*DocumentController) Create

func (c *DocumentController) Create()

创建一个文档

func (*DocumentController) Delete

func (c *DocumentController) Delete()

删除文档

func (*DocumentController) DeleteHistory added in v0.5.1

func (c *DocumentController) DeleteHistory()

func (*DocumentController) DownloadAttachment

func (c *DocumentController) DownloadAttachment()

下载附件

func (*DocumentController) Edit

func (c *DocumentController) Edit()

编辑文档

func (*DocumentController) Export added in v0.5.1

func (c *DocumentController) Export()

导出

func (*DocumentController) History added in v0.5.1

func (c *DocumentController) History()

文档历史列表

func (*DocumentController) Index

func (c *DocumentController) Index()

文档首页

func (*DocumentController) QrCode added in v0.5.1

func (c *DocumentController) QrCode()

生成项目访问的二维码

func (*DocumentController) Read

func (c *DocumentController) Read()

阅读文档

func (*DocumentController) RemoveAttachment added in v0.5.1

func (c *DocumentController) RemoveAttachment()

删除附件

func (*DocumentController) RestoreHistory added in v0.5.1

func (c *DocumentController) RestoreHistory()

通过文档历史恢复文档

func (*DocumentController) Search added in v0.5.1

func (c *DocumentController) Search()

项目内搜索

func (*DocumentController) Upload

func (c *DocumentController) Upload()

上传附件或图片

type ErrorController

type ErrorController struct {
	BaseController
}

func (*ErrorController) Error403

func (c *ErrorController) Error403()

func (*ErrorController) Error404

func (c *ErrorController) Error404()

func (*ErrorController) Error500

func (c *ErrorController) Error500()

type HomeController

type HomeController struct {
	BaseController
}

func (*HomeController) Index

func (c *HomeController) Index()

func (*HomeController) Prepare added in v1.0.1

func (c *HomeController) Prepare()

type LabelController added in v0.7.1

type LabelController struct {
	BaseController
}

func (*LabelController) Index added in v0.7.1

func (c *LabelController) Index()

查看包含标签的文档列表.

func (*LabelController) List added in v0.7.1

func (c *LabelController) List()

func (*LabelController) Prepare added in v0.7.1

func (c *LabelController) Prepare()

type ManagerController

type ManagerController struct {
	BaseController
}

func (*ManagerController) AttachDelete added in v0.5.1

func (c *ManagerController) AttachDelete()

删除附件.

func (*ManagerController) AttachDetailed added in v0.5.1

func (c *ManagerController) AttachDetailed()

附件详情.

func (*ManagerController) AttachList added in v0.5.1

func (c *ManagerController) AttachList()

附件列表.

func (*ManagerController) Books

func (c *ManagerController) Books()

项目列表.

func (*ManagerController) ChangeMemberRole

func (c *ManagerController) ChangeMemberRole()

变更用户权限.

func (*ManagerController) Comments

func (c *ManagerController) Comments()

func (*ManagerController) Config added in v1.0.1

func (c *ManagerController) Config()

func (*ManagerController) CreateMember

func (c *ManagerController) CreateMember()

添加用户.

func (*ManagerController) CreateToken

func (c *ManagerController) CreateToken()

CreateToken 创建访问来令牌.

func (*ManagerController) DeleteBook

func (c *ManagerController) DeleteBook()

删除项目.

func (*ManagerController) DeleteComment

func (c *ManagerController) DeleteComment()

DeleteComment 标记评论为已删除

func (*ManagerController) DeleteMember added in v0.7.1

func (c *ManagerController) DeleteMember()

删除一个用户,并将该用户的所有信息转移到超级管理员上.

func (*ManagerController) EditBook

func (c *ManagerController) EditBook()

编辑项目.

func (*ManagerController) EditMember added in v0.5.1

func (c *ManagerController) EditMember()

编辑用户信息.

func (*ManagerController) Index

func (c *ManagerController) Index()

func (*ManagerController) LabelDelete added in v0.10.1

func (c *ManagerController) LabelDelete()

删除标签

func (*ManagerController) LabelList added in v0.10.1

func (c *ManagerController) LabelList()

标签列表

func (*ManagerController) Prepare added in v0.5.1

func (c *ManagerController) Prepare()

func (*ManagerController) PrivatelyOwned added in v0.5.1

func (c *ManagerController) PrivatelyOwned()

设置项目私有状态.

func (*ManagerController) Setting

func (c *ManagerController) Setting()

项目设置.

func (*ManagerController) Transfer added in v0.5.1

func (c *ManagerController) Transfer()

Transfer 转让项目.

func (*ManagerController) UpdateMemberStatus

func (c *ManagerController) UpdateMemberStatus()

更新用户状态.

func (*ManagerController) Users

func (c *ManagerController) Users()

用户列表.

type SearchController

type SearchController struct {
	BaseController
}

func (*SearchController) Index

func (c *SearchController) Index()

搜索首页

func (*SearchController) User added in v0.8.1

func (c *SearchController) User()

搜索用户

type SettingController

type SettingController struct {
	BaseController
}

func (*SettingController) Index

func (c *SettingController) Index()

func (*SettingController) Password

func (c *SettingController) Password()

func (*SettingController) Upload

func (c *SettingController) Upload()

Upload 上传图片

type TemplateController added in v0.13.1

type TemplateController struct {
	BaseController
	BookId int
}

func (*TemplateController) Add added in v0.13.1

func (c *TemplateController) Add()

添加模板

func (*TemplateController) Delete added in v0.13.1

func (c *TemplateController) Delete()

删除模板

func (*TemplateController) Get added in v0.13.1

func (c *TemplateController) Get()

获取指定模板信息

func (*TemplateController) List added in v0.13.1

func (c *TemplateController) List()

获取模板列表

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL