Versions in this module Expand all Collapse all v0 v0.2.0 Feb 11, 2014 Changes in this version + func DefaultNavigators() + func GetNavigators() []*navItem + func LoadMessages() + func LoadNavigators() + func RecycleComments() + func RecycleMessages() + func SaveMessageRead(m *Message) + func SetMessageGenerator(name string, fn func(v interface{}) string) + func SetNavigators(order []string, text []string, title []string, link []string) + func SortNavigators() + func StartCommentsTimer() + func StartMessageTimer() + func SyncAll() + func SyncMessages() + func SyncNavigators() + func UpdateCommentAdmin(user *User) type Comment + func (c *Comment) IsRemovable() bool type Content + func GetPublishArticleList(page, size int) ([]*Content, *utils.Pager) + type Message struct + CreateTime int64 + Data string + Id int + IsRead bool + Type string + func CreateMessage(tp string, data interface{}) *Message + func GetMessage(id int) *Message + func GetMessages() []*Message + func GetTypedMessages(tp string, unread bool) []*Message + func GetUnreadMessages() []*Message v0.1.6 Jan 27, 2014 v0.1.5 Jan 25, 2014 Changes in this version + func All() + func GetVersion() *version + func SyncVersion() + type Statis struct + Articles int + Comments int + Files int + Pages int + Version int + func NewStatis() *Statis v0.1.1 Jan 16, 2014 Changes in this version + var Storage *jsonStorage + func CheckVersion() bool + func CleanTokens() + func CreateComment(cid int, c *Comment) + func CreateFilePath(dir string, f *File) string + func CreateReader(c *Comment) + func CreateUser(u *User) error + func GetCustomSettings() map[string]string + func GetSetting(key string) string + func Init() + func LoadComments() + func LoadContents() + func LoadFiles() + func LoadReaders() + func LoadSettings() + func LoadTokens() + func LoadUsers() + func RemoveComment(cid int, id int) + func RemoveContent(c *Content) + func RemoveFile(id int) + func RemoveToken(v string) + func RemoveUser(u *User) + func SaveComment(c *Comment) + func SaveContent(c *Content) + func SetSetting(key string, v string) + func SetVersion(v int) + func StartContentsTimer() + func SyncContent(c *Content) + func SyncContents() + func SyncFiles() + func SyncReaders() + func SyncSettings() + func SyncTokens() + func SyncUsers() + type Comment struct + Author string + Avatar string + Cid int + Content string + CreateTime int64 + Email string + Id int + Ip string + IsAdmin bool + Pid int + Status string + Url string + UserAgent string + func GetCommentById(id int) *Comment + func GetCommentList(page, size int) ([]*Comment, *utils.Pager) + func (c *Comment) GetContent() *Content + func (c *Comment) GetReader() *Reader + func (c *Comment) IsValid() bool + func (c *Comment) ParentMd() string + func (c *Comment) ToJson() map[string]interface{} + type Content struct + AuthorId int + Comments []*Comment + CreateTime int64 + EditTime int64 + Format string + Hits int + Id int + IsComment bool + IsLinked bool + Slug string + Status string + Tags []string + Template string + Text string + Title string + Type string + UpdateTime int64 + func CreateContent(c *Content, t string) (*Content, error) + func GetArticleList(page, size int) ([]*Content, *utils.Pager) + func GetContentById(id int) *Content + func GetContentBySlug(slug string) *Content + func GetPageList(page, size int) ([]*Content, *utils.Pager) + func (cnt *Content) ChangeSlug(slug string) bool + func (cnt *Content) CommentNum() int + func (cnt *Content) Content() string + func (cnt *Content) Link() string + func (cnt *Content) Summary() string + func (cnt *Content) TagString() string + func (cnt *Content) User() *User + type File struct + Author int + ContentType string + Hits int + Id int + IsUsed bool + Name string + Size int64 + Type string + UploadTime int64 + Url string + func CreateFile(f *File) *File + func GetFileList(page, size int) ([]*File, *utils.Pager) + type Reader struct + Active bool + Author string + Comments int + Email string + Rank int + Url string + func (r *Reader) Dec() + func (r *Reader) Inc() + type Token struct + CreateTime int64 + ExpireTime int64 + UserId int + Value string + func CreateToken(u *User, context *GoInk.Context, expire int64) *Token + func GetTokenByValue(v string) *Token + func GetTokensByUser(u *User) []*Token + func (t *Token) IsValid() bool + type User struct + Avatar string + Bio string + CreateTime int64 + Email string + Id int + LastLoginTime int64 + Name string + Nick string + Password string + Role string + Url string + func GetUserByEmail(email string) *User + func GetUserById(id int) *User + func GetUserByName(name string) *User + func GetUsersByRole(role string) []*User + func (u *User) ChangeEmail(email string) bool + func (u *User) ChangePassword(pwd string) + func (u *User) CheckPassword(pwd string) bool