Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddArticle(c context.Context, art *artMdl.ArtParam) (id int64, err error)
- func (d *Dao) AddDraft(c context.Context, art *artMdl.ArtParam) (id int64, err error)
- func (d *Dao) Article(c context.Context, aid, mid int64, ip string) (res *model.Article, err error)
- func (d *Dao) ArticleMetas(c context.Context, aids []int64, ip string) (res map[int64]*model.Meta, err error)
- func (d *Dao) ArticleStat(c context.Context, mid int64, ip string) (res model.UpStat, err error)
- func (d *Dao) Articles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (res *model.CreationArts, err error)
- func (d *Dao) Categories(c context.Context, ip string) (res *model.Categories, err error)
- func (d *Dao) CategoriesMap(c context.Context, ip string) (res map[int64]*model.Category, err error)
- func (d *Dao) DelArticle(c context.Context, aid, mid int64, ip string) (err error)
- func (d *Dao) DelDraft(c context.Context, aid, mid int64, ip string) (err error)
- func (d *Dao) Draft(c context.Context, aid, mid int64, ip string) (res *model.Draft, err error)
- func (d *Dao) Drafts(c context.Context, mid int64, pn, ps int, ip string) (res *model.Drafts, err error)
- func (d *Dao) IsAuthor(c context.Context, mid int64, ip string) (res bool, err error)
- func (d *Dao) RemainCount(c context.Context, mid int64, ip string) (res int, err error)
- func (d *Dao) ThirtyDayArticle(c context.Context, mid int64, ip string) (res []*model.ThirtyDayArticle, err error)
- func (d *Dao) UpdateArticle(c context.Context, art *artMdl.ArtParam) (err error)
- func (d *Dao) WithDrawArticle(c context.Context, aid, mid int64, ip string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao is archive dao.
func (*Dao) AddArticle ¶
AddArticle add article.
func (*Dao) ArticleMetas ¶
func (d *Dao) ArticleMetas(c context.Context, aids []int64, ip string) (res map[int64]*model.Meta, err error)
ArticleMetas batch get articles by aids.
func (*Dao) ArticleStat ¶
ArticleStat article stat
func (*Dao) Articles ¶
func (d *Dao) Articles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (res *model.CreationArts, err error)
Articles get article list.
func (*Dao) Categories ¶
Categories list all category contain child.
func (*Dao) CategoriesMap ¶
func (d *Dao) CategoriesMap(c context.Context, ip string) (res map[int64]*model.Category, err error)
CategoriesMap list all category.
func (*Dao) DelArticle ¶
DelArticle delete article.
func (*Dao) Drafts ¶
func (d *Dao) Drafts(c context.Context, mid int64, pn, ps int, ip string) (res *model.Drafts, err error)
Drafts get draft list.
func (*Dao) RemainCount ¶
RemainCount article up limit.
func (*Dao) ThirtyDayArticle ¶
func (d *Dao) ThirtyDayArticle(c context.Context, mid int64, ip string) (res []*model.ThirtyDayArticle, err error)
ThirtyDayArticle thirty day article
func (*Dao) UpdateArticle ¶
UpdateArticle update article.
Click to show internal directories.
Click to hide internal directories.