Documentation ¶
Index ¶
- func AuthInterceptor(c *revel.Controller) revel.Result
- func InitService()
- type Album
- type Attach
- type Auth
- func (c Auth) Demo() revel.Result
- func (c Auth) DoFindPassword(email string) revel.Result
- func (c Auth) DoLogin(email, pwd string, captcha string) revel.Result
- func (c Auth) DoRegister(email, pwd, iu string) revel.Result
- func (c Auth) FindPassword() revel.Result
- func (c Auth) FindPassword2(token string) revel.Result
- func (c Auth) FindPasswordUpdate(token, pwd string) revel.Result
- func (c Auth) Login(email, from string) revel.Result
- func (c Auth) Logout() revel.Result
- func (c Auth) Register(from, iu string) revel.Result
- type BaseController
- func (c BaseController) ClearSession()
- func (c BaseController) E404() revel.Result
- func (c BaseController) GetEmail() string
- func (c BaseController) GetObjectUserId() bson.ObjectId
- func (c BaseController) GetPage() int
- func (c BaseController) GetSession(key string) string
- func (c BaseController) GetTotalPage(page, count int) int
- func (c BaseController) GetUserAndBlogUrl() info.UserAndBlogUrl
- func (c BaseController) GetUserId() string
- func (c BaseController) GetUserInfo() info.User
- func (c BaseController) GetUsername() string
- func (c BaseController) Has(key string) bool
- func (c BaseController) HasLogined() bool
- func (c BaseController) Json(i interface{}) string
- func (c *BaseController) Message(message string, args ...interface{}) (value string)
- func (c BaseController) RenderRe(re info.Re) revel.Result
- func (c BaseController) RenderTemplateStr(templatePath string) string
- func (c BaseController) SetLocale() string
- func (c BaseController) SetSession(userInfo info.User)
- func (c BaseController) SetUserInfo() info.User
- func (c BaseController) UpdateSession(key, value string)
- type Blog
- func (c Blog) Archives(userIdOrEmail string, cateId string, year, month int) (re revel.Result)
- func (c Blog) Cate(userIdOrEmail string, notebookId string) (re revel.Result)
- func (c Blog) Cates(userIdOrEmail string) (re revel.Result)
- func (c Blog) CommentPost(noteId, content, toCommentId string, callback string) revel.Result
- func (c Blog) DeleteComment(noteId, commentId string, callback string) revel.Result
- func (c Blog) E(userIdOrEmail, tag string) revel.Result
- func (c Blog) GetComments(noteId string, callback string) revel.Result
- func (c Blog) GetLikes(noteId string, callback string) revel.Result
- func (c Blog) GetLikesAndComments(noteId, callback string) revel.Result
- func (c Blog) GetPostStat(noteId string) revel.Result
- func (c Blog) IncReadNum(noteId string) revel.Result
- func (c Blog) Index(userIdOrEmail string) (re revel.Result)
- func (c Blog) LikeComment(commentId string, callback string) revel.Result
- func (c Blog) LikePost(noteId string, callback string) revel.Result
- func (c Blog) ListCateLatest(notebookId, callback string) revel.Result
- func (c Blog) Post(userIdOrEmail, noteId string) (re revel.Result)
- func (c Blog) Search(userIdOrEmail, keywords string) (re revel.Result)
- func (c Blog) Single(userIdOrEmail, singleId string) (re revel.Result)
- func (c Blog) Tag(userIdOrEmail, tag string) (re revel.Result)
- func (c Blog) Tags(userIdOrEmail string) (re revel.Result)
- type Ca
- type Captcha
- type DragNotebooksInfo
- type File
- func (c File) CopyHttpImage(src string) revel.Result
- func (c File) CopyImage(userId, fileId, toUserId string) revel.Result
- func (c File) DeleteImage(fileId string) revel.Result
- func (c File) GetImages(albumId, key string, page int) revel.Result
- func (c File) OutputImage(noteId, fileId string) revel.Result
- func (c File) PasteImage(noteId string) revel.Result
- func (c File) UpdateImageTitle(fileId, title string) revel.Result
- func (c File) UploadAvatar() revel.Result
- func (c File) UploadBlogLogo() revel.Result
- func (c File) UploadImageLeaui(albumId string) revel.Result
- type Index
- type Note
- func (c Note) CopyNote(noteIds []string, notebookId string) revel.Result
- func (c Note) CopySharedNote(noteIds []string, notebookId, fromUserId string) revel.Result
- func (c Note) DeleteNote(noteIds []string, isShared bool) revel.Result
- func (c Note) DeleteTrash(noteId string) revel.Result
- func (c Note) ExportPdf(noteId string) revel.Result
- func (c Note) GetNoteAndContent(noteId string) revel.Result
- func (c Note) GetNoteAndContentBySrc(src string) revel.Result
- func (c Note) GetNoteContent(noteId string) revel.Result
- func (c Note) Index(noteId, online string) revel.Result
- func (c Note) ListNotes(notebookId string) revel.Result
- func (c Note) ListTrashNotes() revel.Result
- func (c Note) MoveNote(noteIds []string, notebookId string) revel.Result
- func (c Note) SearchNote(key string) revel.Result
- func (c Note) SearchNoteByTags(tags []string) revel.Result
- func (c Note) SetNote2Blog(noteIds []string, isBlog, isTop bool) revel.Result
- func (c Note) ToPdf(noteId, appKey string) revel.Result
- func (c Note) UpdateNoteOrContent(noteOrContent info.NoteOrContent) revel.Result
- type NoteContentHistory
- type Notebook
- func (c Notebook) AddNotebook(notebookId, title, parentNotebookId string) revel.Result
- func (c Notebook) DeleteNotebook(notebookId string) revel.Result
- func (c Notebook) DragNotebooks(data string) revel.Result
- func (c Notebook) GetNotebooks() revel.Result
- func (c Notebook) Index(notebook info.Notebook, i int, name string) revel.Result
- func (c Notebook) SetNotebook2Blog(notebookId string, isBlog bool) revel.Result
- func (c Notebook) UpdateNotebookTitle(notebookId, title string) revel.Result
- type Preview
- func (c Preview) Archives(userIdOrEmail string, notebookId string, year, month int) revel.Result
- func (c Preview) Cate(userIdOrEmail, notebookId string) revel.Result
- func (c Preview) Cates(userIdOrEmail string) revel.Result
- func (c Preview) Index(userIdOrEmail string, themeId string) revel.Result
- func (c Preview) Post(userIdOrEmail, noteId string) revel.Result
- func (c Preview) Search(userIdOrEmail, keywords string) revel.Result
- func (c Preview) Single(userIdOrEmail, singleId string) revel.Result
- func (c Preview) Tag(userIdOrEmail, tag string) revel.Result
- func (c Preview) Tags(userIdOrEmail string) revel.Result
- type Share
- func (c Share) AddShareNote(noteId string, emails []string, perm int) revel.Result
- func (c Share) AddShareNoteGroup(noteId, groupId string, perm int) revel.Result
- func (c Share) AddShareNotebook(notebookId string, emails []string, perm int) revel.Result
- func (c Share) AddShareNotebookGroup(notebookId, groupId string, perm int) revel.Result
- func (c Share) DeleteShareNote(noteId string, toUserId string) revel.Result
- func (c Share) DeleteShareNoteBySharedUser(noteId string, fromUserId string) revel.Result
- func (c Share) DeleteShareNoteGroup(noteId, groupId string) revel.Result
- func (c Share) DeleteShareNotebook(notebookId string, toUserId string) revel.Result
- func (c Share) DeleteShareNotebookBySharedUser(notebookId string, fromUserId string) revel.Result
- func (c Share) DeleteShareNotebookGroup(notebookId, groupId string) revel.Result
- func (c Share) DeleteUserShareNoteAndNotebook(fromUserId string) revel.Result
- func (c Share) GetShareNoteContent(noteId, sharedUserId string) revel.Result
- func (c Share) ListNoteShareUserInfo(noteId string) revel.Result
- func (c Share) ListNotebookShareUserInfo(notebookId string) revel.Result
- func (c Share) ListShareNotes(notebookId, userId string) revel.Result
- func (c Share) UpdateShareNoteGroupPerm(noteId, groupId string, perm int) revel.Result
- func (c Share) UpdateShareNotePerm(noteId string, perm int, toUserId string) revel.Result
- func (c Share) UpdateShareNotebookGroupPerm(notebookId, groupId string, perm int) revel.Result
- func (c Share) UpdateShareNotebookPerm(notebookId string, perm int, toUserId string) revel.Result
- type Tag
- type User
- func (c User) Account(tab int) revel.Result
- func (c User) ActiveEmail(token string) revel.Result
- func (c User) ReSendActiveEmail() revel.Result
- func (c User) SendRegisterEmail(content, toEmail string) revel.Result
- func (c User) UpdateColumnWidth(notebookWidth, noteListWidth, mdEditorWidth int) revel.Result
- func (c User) UpdateEmail(token string) revel.Result
- func (c User) UpdateEmailSendActiveEmail(email, pwd string) revel.Result
- func (c User) UpdateLeftIsMin(leftIsMin bool) revel.Result
- func (c User) UpdatePwd(oldPwd, pwd string) revel.Result
- func (c User) UpdateTheme(theme string) revel.Result
- func (c User) UpdateUsername(username string) revel.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthInterceptor ¶
func AuthInterceptor(c *revel.Controller) revel.Result
Types ¶
type Attach ¶
type Attach struct {
BaseController
}
附件
func (Attach) GetAttachs ¶
get all attachs by noteId
type BaseController ¶
type BaseController struct {
*revel.Controller
}
公用Controller, 其它Controller继承它
func (BaseController) ClearSession ¶
func (c BaseController) ClearSession()
func (BaseController) GetEmail ¶
func (c BaseController) GetEmail() string
func (BaseController) GetObjectUserId ¶
func (c BaseController) GetObjectUserId() bson.ObjectId
func (BaseController) GetSession ¶
func (c BaseController) GetSession(key string) string
这里的session都是cookie中的, 与数据库session无关
func (BaseController) GetTotalPage ¶
func (c BaseController) GetTotalPage(page, count int) int
func (BaseController) GetUserAndBlogUrl ¶
func (c BaseController) GetUserAndBlogUrl() info.UserAndBlogUrl
func (BaseController) GetUserId ¶
func (c BaseController) GetUserId() string
func (BaseController) GetUsername ¶
func (c BaseController) GetUsername() string
func (*BaseController) Message ¶
func (c *BaseController) Message(message string, args ...interface{}) (value string)
覆盖revel.Message
func (BaseController) RenderRe ¶
func (c BaseController) RenderRe(re info.Re) revel.Result
json, result 为了msg msg-v1-v2-v3
func (BaseController) RenderTemplateStr ¶
func (c BaseController) RenderTemplateStr(templatePath string) string
life 返回解析后的字符串, 只是为了解析模板得到字符串
func (BaseController) SetSession ¶
func (c BaseController) SetSession(userInfo info.User)
func (BaseController) UpdateSession ¶
func (c BaseController) UpdateSession(key, value string)
修改session
type Blog ¶
type Blog struct {
BaseController
}
func (Blog) CommentPost ¶
jsonp
func (Blog) DeleteComment ¶
jsonp
func (Blog) GetLikesAndComments ¶
func (Blog) LikeComment ¶
jsonp
func (Blog) ListCateLatest ¶
显示分类的最近博客, jsonp
type DragNotebooksInfo ¶
调整notebooks, 可能是排序, 可能是移动到其它笔记本下
type File ¶
type File struct {
BaseController
}
首页
func (File) OutputImage ¶
输出image 权限判断
func (File) PasteImage ¶
拖拉上传, pasteImage noteId 是为了判断是否是协作的note, 如果是则需要复制一份到note owner中
func (File) UploadBlogLogo ¶
上传的是博客logo TODO logo不要设置权限, 另外的目录
type Index ¶
type Index struct {
BaseController
}
type Note ¶
type Note struct {
BaseController
}
func (Note) CopySharedNote ¶
复制别人共享的笔记给我
func (Note) DeleteNote ¶
删除note/ 删除别人共享给我的笔记 userId 是note.UserId
func (Note) DeleteTrash ¶
删除trash, 已弃用, 用DeleteNote
func (Note) GetNoteAndContent ¶
得到note和内容
func (Note) ListNotes ¶
首页, 判断是否已登录 已登录, 得到用户基本信息(notebook, shareNotebook), 跳转到index.html中 否则, 转向登录页面
func (Note) SearchNote ¶
------------ search 通过title搜索
func (Note) SetNote2Blog ¶
设置/取消Blog; 置顶
func (Note) UpdateNoteOrContent ¶
func (c Note) UpdateNoteOrContent(noteOrContent info.NoteOrContent) revel.Result
这里不能用json, 要用post
type NoteContentHistory ¶
type NoteContentHistory struct {
BaseController
}
func (NoteContentHistory) DeleteHistory ¶
func (c NoteContentHistory) DeleteHistory(noteId, userId, timeToDel string) revel.Result
func (NoteContentHistory) ListHistories ¶
func (c NoteContentHistory) ListHistories(noteId string) revel.Result
得到list
type Notebook ¶
type Notebook struct {
BaseController
}
func (Notebook) AddNotebook ¶
添加notebook
func (Notebook) DragNotebooks ¶
传过来的data是JSON.stringfy数据
func (Notebook) SetNotebook2Blog ¶
设置notebook <-> blog
type Share ¶
type Share struct {
}func (Share) AddShareNote ¶
添加共享note
func (Share) AddShareNoteGroup ¶
将笔记分享给分组
func (Share) AddShareNotebook ¶
添加共享notebook
func (Share) AddShareNotebookGroup ¶
将笔记分享给分组
func (Share) DeleteShareNote ¶
--------------- 删除share note
func (Share) DeleteShareNoteBySharedUser ¶
删除share note, 被共享方删除
func (Share) DeleteShareNoteGroup ¶
删除
func (Share) DeleteShareNotebook ¶
删除share notebook
func (Share) DeleteShareNotebookBySharedUser ¶
删除share notebook, 被共享方删除
func (Share) DeleteShareNotebookGroup ¶
删除
func (Share) DeleteUserShareNoteAndNotebook ¶
删除fromUserId分享给我的所有note, notebook
func (Share) GetShareNoteContent ¶
得到内容 sharedUserId 是谁的笔记
func (Share) ListNoteShareUserInfo ¶
查看note的分享信息 分享给了哪些用户和权限 ShareNotes表 userId = me, noteId = ... 还要查看该note的notebookId分享的信息
func (Share) ListNotebookShareUserInfo ¶
func (Share) ListShareNotes ¶
得到notes userId 该userId分享给我的
func (Share) UpdateShareNoteGroupPerm ¶
更新, 也是一样, 先删后加
func (Share) UpdateShareNotePerm ¶
------------ 改变share note 权限
func (Share) UpdateShareNotebookGroupPerm ¶
更新, 也是一样, 先删后加
type Tag ¶
type Tag struct {
BaseController
}
type User ¶
type User struct {
BaseController
}
func (User) SendRegisterEmail ¶
发送邀请链接
func (User) UpdateColumnWidth ¶
----------------- 用户偏爱
func (User) UpdateEmailSendActiveEmail ¶
发送更新邮箱的激活邮件
Source Files ¶
- AlbumController.go
- AttachController.go
- AuthController.go
- BaseController.go
- BlogController.go
- CaptchaController.go
- FileController.go
- IndexController.go
- NoteContentHistoryController.go
- NoteController.go
- NotebookController.go
- PreviewController.go
- ShareController.go
- TagController.go
- UserController.go
- init.go