Documentation ¶
Index ¶
- Constants
- type Article
- type Blog
- func (blog *Blog) AddOrRemoveGroup(articleId string, addGroup []string, removeGroup []string)
- func (blog *Blog) GetArticle(articleId string) (*Article, error)
- func (blog *Blog) GetArticleListByGroupScore(group string, page int) ([]*Article, error)
- func (blog *Blog) GetArticleListByScore(page int, key string) ([]*Article, error)
- func (blog *Blog) GetArticleListByTime(page int) ([]*Article, error)
- func (blog *Blog) PostArticle(userId string, link string, group []string) error
- func (blog *Blog) Vote(userId string, articleId string) error
Constants ¶
View Source
const ARTICLES_PER_DAY = 200
View Source
const ARTICLE_PER_PAGE = 10
View Source
const ONE_DAY_SECONDS = 86400
View Source
const ONE_WEEK_SECONDS = 604800
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blog ¶
func (*Blog) AddOrRemoveGroup ¶
func (*Blog) GetArticleListByGroupScore ¶
func (*Blog) GetArticleListByScore ¶
GetArticleListByScore: 获得对应page的列表
func (*Blog) GetArticleListByTime ¶
GetArticleListByTime:
func (*Blog) PostArticle ¶
PostArticle: 发布文章
Click to show internal directories.
Click to hide internal directories.