Documentation ¶
Index ¶
- Variables
- func AnniversaryKey(mid int64) string
- func PromError(name string)
- func PromInfo(name string)
- type Dao
- func (d *Dao) Activity(c context.Context) (resp map[int64]*model.Activity, err error)
- func (d *Dao) AddApply(c context.Context, mid int64, content, category string) (err error)
- func (d *Dao) AddArtDraft(c context.Context, a *artmdl.Draft) (id int64, err error)
- func (d *Dao) AddArticleContentCache(c context.Context, id int64, content string) (err error)
- func (d *Dao) AddArticleKeywordsCache(c context.Context, id int64, keywords string) (err error)
- func (d *Dao) AddArticleStatsCache(c context.Context, id int64, v *model.Stats) (err error)
- func (d *Dao) AddArticlesMetaCache(c context.Context, vs ...*model.Meta) (err error)
- func (d *Dao) AddAudioCardsCache(c context.Context, vs map[int64]*model.AudioCard) (err error)
- func (d *Dao) AddAuthor(c context.Context, mid int64) (err error)
- func (d *Dao) AddBangumiCardsCache(c context.Context, vs map[int64]*model.BangumiCard) (err error)
- func (d *Dao) AddBangumiEpCardsCache(c context.Context, vs map[int64]*model.BangumiCard) (err error)
- func (d *Dao) AddCacheAidsByTag(c context.Context, id int64, val *model.TagArts) (err error)
- func (d *Dao) AddCacheArtsListID(c context.Context, values map[int64]int64) (err error)
- func (d *Dao) AddCacheAuthor(c context.Context, id int64, val *model.AuthorLimit) (err error)
- func (d *Dao) AddCacheHotspot(c context.Context, id int64, val *model.Hotspot) (err error)
- func (d *Dao) AddCacheHotspotArts(c context.Context, typ int8, id int64, arts [][2]int64, replace bool) (err error)
- func (d *Dao) AddCacheHotspots(c context.Context, val []*model.Hotspot) (err error)
- func (d *Dao) AddCacheList(c context.Context, id int64, val *model.List) (err error)
- func (d *Dao) AddCacheListArts(c context.Context, id int64, val []*model.ListArtMeta) (err error)
- func (d *Dao) AddCacheListArtsId(c context.Context, id string, val *model.ArticleViewList) (err error)
- func (d *Dao) AddCacheListReadCount(c context.Context, id int64, val int64) (err error)
- func (d *Dao) AddCacheLists(c context.Context, values map[int64]*model.List) (err error)
- func (d *Dao) AddCacheListsArts(c context.Context, values map[int64][]*model.ListArtMeta) (err error)
- func (d *Dao) AddCacheUpLists(c context.Context, id int64, val []int64) (err error)
- func (d *Dao) AddCacheUpStatDaily(c context.Context, id int64, val *model.UpStat) (err error)
- func (d *Dao) AddCheatFilter(c context.Context, aid int64, lv int) (err error)
- func (d *Dao) AddComplaint(c context.Context, aid, mid, ctype int64, reason, imageUrls string) (err error)
- func (d *Dao) AddComplaintCount(c context.Context, aid int64) (err error)
- func (d *Dao) AddListArticle(c context.Context, listID int64, aid int64, position int) (err error)
- func (d *Dao) AddMallCardsCache(c context.Context, vs map[int64]*model.MallCard) (err error)
- func (d *Dao) AddRankCache(c context.Context, cid int64, arts model.RankResp) (err error)
- func (d *Dao) AddReadPingSet(c context.Context, buvid string, aid int64, mid int64, ip string, cur int64, ...) (err error)
- func (d *Dao) AddSortCache(c context.Context, categoryID int64, field int, aid, score int64) (err error)
- func (d *Dao) AddSubmitCache(c context.Context, mid int64, title string) (err error)
- func (d *Dao) AddTicketCardsCache(c context.Context, vs map[int64]*model.TicketCard) (err error)
- func (d *Dao) AddUpperCache(c context.Context, mid, aid int64, ptime int64) (err error)
- func (d *Dao) AddUpperCaches(c context.Context, idsm map[int64][][2]int64) (err error)
- func (d *Dao) AllArticleMeta(c context.Context, id int64) (res *artmdl.Meta, err error)
- func (d *Dao) AllRecommendCount(c context.Context, t time.Time) (res int64, err error)
- func (d *Dao) AllRecommends(c context.Context, t time.Time, pn, ps int) (res []int64, err error)
- func (d *Dao) ApplyCount(c context.Context) (count int64, err error)
- func (d *Dao) ArtDraft(c context.Context, mid, aid int64) (res *artmdl.Draft, err error)
- func (d *Dao) ArtList(c context.Context, aid int64) (res *model.List, err error)
- func (d *Dao) Article(c context.Context, aid int64) (res *artmdl.Article, err error)
- func (d *Dao) ArticleContent(c context.Context, id int64) (res string, err error)
- func (d *Dao) ArticleContentCache(c context.Context, id int64) (res string, err error)
- func (d *Dao) ArticleKeywords(c context.Context, id int64) (res string, err error)
- func (d *Dao) ArticleKeywordsCache(c context.Context, id int64) (res string, err error)
- func (d *Dao) ArticleListCache(c context.Context, id int64) (res int64, err error)
- func (d *Dao) ArticleMeta(c context.Context, id int64) (res *artmdl.Meta, err error)
- func (d *Dao) ArticleMetaCache(c context.Context, aid int64) (res *model.Meta, err error)
- func (d *Dao) ArticleMetas(c context.Context, aids []int64) (res map[int64]*artmdl.Meta, err error)
- func (d *Dao) ArticleRemainCount(c context.Context, mid int64) (count int, err error)
- func (d *Dao) ArticleStats(c context.Context, id int64) (res *model.Stats, err error)
- func (d *Dao) ArticleStatsCache(c context.Context, id int64) (res *model.Stats, err error)
- func (d *Dao) ArticleVersion(c context.Context, aid int64) (a *artmdl.Article, err error)
- func (d *Dao) ArticlesMetaCache(c context.Context, ids []int64) (cached map[int64]*model.Meta, missed []int64, err error)
- func (d *Dao) ArticlesStats(c context.Context, ids []int64) (res map[int64]*model.Stats, err error)
- func (d *Dao) ArticlesStatsCache(c context.Context, ids []int64) (cached map[int64]*model.Stats, missed []int64, err error)
- func (d *Dao) ArtsList(c context.Context, aids []int64) (res map[int64]*model.List, err error)
- func (d *Dao) ArtsListID(c context.Context, keys []int64) (res map[int64]int64, err error)
- func (d *Dao) AudioCard(c context.Context, ids []int64) (resp map[int64]*model.AudioCard, err error)
- func (d *Dao) AudioCardsCache(c context.Context, ids []int64) (vs map[int64]*model.AudioCard, err error)
- func (d *Dao) Author(c context.Context, id int64) (res *model.AuthorLimit, err error)
- func (d *Dao) AuthorMostCategories(c context.Context, mid int64) (categories []int64, err error)
- func (d *Dao) Authors(c context.Context) (res map[int64]*artmdl.AuthorLimit, err error)
- func (d *Dao) BangumiCard(c context.Context, seasonIDs []int64, episodeIDs []int64) (resp map[int64]*model.BangumiCard, err error)
- func (d *Dao) BangumiCardsCache(c context.Context, ids []int64) (vs map[int64]*model.BangumiCard, err error)
- func (d *Dao) BangumiEpCardsCache(c context.Context, ids []int64) (vs map[int64]*model.BangumiCard, err error)
- func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)
- func (d *Dao) BerserkerTagArts(c context.Context, tags []int64) (aids []int64, err error)
- func (d *Dao) CacheAidsByTag(c context.Context, id int64) (res *model.TagArts, err error)
- func (d *Dao) CacheAnniversary(c context.Context, id int64) (res *model.AnniversaryInfo, err error)
- func (d *Dao) CacheArtsListID(c context.Context, ids []int64) (res map[int64]int64, err error)
- func (d *Dao) CacheAuthor(c context.Context, id int64) (res *model.AuthorLimit, err error)
- func (d *Dao) CacheHotspot(c context.Context, id int64) (res *model.Hotspot, err error)
- func (d *Dao) CacheHotspots(c context.Context) (res []*model.Hotspot, err error)
- func (d *Dao) CacheList(c context.Context, id int64) (res *model.List, err error)
- func (d *Dao) CacheListArts(c context.Context, id int64) (res []*model.ListArtMeta, err error)
- func (d *Dao) CacheListArtsId(c context.Context, id string) (res *model.ArticleViewList, err error)
- func (d *Dao) CacheListReadCount(c context.Context, id int64) (res int64, err error)
- func (d *Dao) CacheLists(c context.Context, ids []int64) (res map[int64]*model.List, err error)
- func (d *Dao) CacheListsArts(c context.Context, ids []int64) (res map[int64][]*model.ListArtMeta, err error)
- func (d *Dao) CacheListsReadCount(c context.Context, ids []int64) (res map[int64]int64, err error)
- func (d *Dao) CacheUpLists(c context.Context, id int64) (res []int64, err error)
- func (d *Dao) CacheUpStatDaily(c context.Context, id int64) (res *model.UpStat, err error)
- func (d *Dao) Capture(c context.Context, url string) (loc string, size int, err error)
- func (d *Dao) Categories(c context.Context) (res map[int64]*model.Category, err error)
- func (d *Dao) CategoryAuthors(c context.Context, category int64, count int) (authors []int64, err error)
- func (d *Dao) Close()
- func (d *Dao) ComplaintExist(c context.Context, aid, mid int64) (exist bool, err error)
- func (d *Dao) ComplaintProtected(c context.Context, aid int64) (protected bool, err error)
- func (d *Dao) CountUpperDraft(c context.Context, mid int64) (count int, err error)
- func (d *Dao) CreationArticleContent(c context.Context, aid int64) (res string, err error)
- func (d *Dao) CreationArticleMeta(c context.Context, id int64) (am *artmdl.Meta, err error)
- func (d *Dao) CreativeArticles(c context.Context, aids []int64) (res map[int64]*model.ListArtMeta, err error)
- func (d *Dao) CreativeCategoryArticles(c context.Context, mid int64) (res []*model.ListArtMeta, err error)
- func (d *Dao) CreativeCountArticles(c context.Context, mid int64, cids []int64) (res int64, err error)
- func (d *Dao) CreativeListAdd(c context.Context, mid int64, name, imageURL, summary string, ...) (res int64, err error)
- func (d *Dao) CreativeListArticles(c context.Context, listID int64) (res []*model.ListArtMeta, err error)
- func (d *Dao) CreativeListDel(c context.Context, id int64) (err error)
- func (d *Dao) CreativeListDelAllArticles(c context.Context, id int64) (err error)
- func (d *Dao) CreativeListUpdate(c context.Context, id int64, name, imageURL, summary string, ...) (err error)
- func (d *Dao) CreativeListUpdateTime(c context.Context, id int64, t time.Time) (err error)
- func (d *Dao) CreativeListsArticles(c context.Context, listIDs []int64) (res map[int64][]*model.ListArtMeta, err error)
- func (d *Dao) CreativeUpLists(c context.Context, mid int64) (res []*model.List, err error)
- func (d *Dao) DelActivity(c context.Context, aid int64, ip string) (err error)
- func (d *Dao) DelArtDraft(c context.Context, mid, aid int64) (err error)
- func (d *Dao) DelArticleContentCache(c context.Context, id int64) (err error)
- func (d *Dao) DelArticleMetaCache(c context.Context, id int64) (err error)
- func (d *Dao) DelArticleStatsCache(c context.Context, id int64) (err error)
- func (d *Dao) DelCacheAuthor(c context.Context, id int64) (err error)
- func (d *Dao) DelCacheHotspots(c context.Context) (err error)
- func (d *Dao) DelCacheListArtsId(c context.Context, id string) (err error)
- func (d *Dao) DelCheatFilter(c context.Context, aid int64) (err error)
- func (d *Dao) DelHotspotArtsCache(c context.Context, typ int8, hid int64, aid int64) (err error)
- func (d *Dao) DelListArticle(c context.Context, listID int64, aid int64) (err error)
- func (d *Dao) DelRecommend(c context.Context, aid int64) (err error)
- func (d *Dao) DelScore(c context.Context, aid, mediaID, mid int64) (err error)
- func (d *Dao) DelSortCache(c context.Context, categoryID int64, field int, aid int64) (err error)
- func (d *Dao) DelSubmitCache(c context.Context, mid int64, title string) (err error)
- func (d *Dao) DelUpperCache(c context.Context, mid int64, aid int64) (err error)
- func (d *Dao) DynamicCount(c context.Context, aid int64) (count int64, err error)
- func (d *Dao) EditTimes(c context.Context, id int64) (count int, err error)
- func (d *Dao) ExpireHotspotArtsCache(c context.Context, typ int8, id int64) (ok bool, err error)
- func (d *Dao) ExpireMaxLikeCache(c context.Context, aid int64) (res bool, err error)
- func (d *Dao) ExpireRankCache(c context.Context, cid int64) (res bool, err error)
- func (d *Dao) ExpireSortCache(c context.Context, categoryID int64, field int) (ok bool, err error)
- func (d *Dao) ExpireUpperCache(c context.Context, mid int64) (ok bool, err error)
- func (d *Dao) ExpireUppersCache(c context.Context, mids []int64) (res map[int64]bool, err error)
- func (d *Dao) GetsetReadPing(c context.Context, buvid string, aid int64, cur int64) (last int64, err error)
- func (d *Dao) HandleActivity(c context.Context, mid, aid, actID int64, state int, ip string) (err error)
- func (d *Dao) HotspotArtsCache(c context.Context, typ int8, id int64, start, end int) (res []int64, err error)
- func (d *Dao) HotspotArtsCacheCount(c context.Context, typ int8, id int64) (res int64, err error)
- func (d *Dao) Hotspots(c context.Context) (res []*model.Hotspot, err error)
- func (d *Dao) Identify(c context.Context, mid int64) (res *artmdl.Identify, err error)
- func (d *Dao) IsDraftDeleted(c context.Context, mid, aid int64) (deleted bool, err error)
- func (d *Dao) LastReason(c context.Context, id int64, state int32) (res string, err error)
- func (d *Dao) List(c context.Context, id int64) (res *model.List, err error)
- func (d *Dao) ListArts(c context.Context, id int64) (res []*model.ListArtMeta, err error)
- func (d *Dao) ListArtsCacheMap(c context.Context, id int64) (res map[int64]*model.ListArtMeta, err error)
- func (d *Dao) Lists(c context.Context, keys []int64) (res map[int64]*model.List, err error)
- func (d *Dao) ListsArts(c context.Context, keys []int64) (res map[int64][]*model.ListArtMeta, err error)
- func (d *Dao) MallCard(c context.Context, ids []int64) (resp map[int64]*model.MallCard, err error)
- func (d *Dao) MallCardsCache(c context.Context, ids []int64) (vs map[int64]*model.MallCard, err error)
- func (d *Dao) MaxLikeCache(c context.Context, aid int64) (res int64, err error)
- func (d *Dao) Media(c context.Context, mediaID, mid int64) (res *model.MediaResult, err error)
- func (d *Dao) MediaArticle(c context.Context, mediaID int64, mid int64) (id int64, err error)
- func (d *Dao) MediaIDByID(c context.Context, aid int64) (id int64, err error)
- func (d *Dao) MoreArtsCaches(c context.Context, mid, ptime int64, num int) (before []int64, after []int64, err error)
- func (d *Dao) NewArticleCount(c context.Context, ptime int64) (res int64, err error)
- func (d *Dao) NoticeState(c context.Context, mid int64) (res int64, err error)
- func (d *Dao) Notices(c context.Context, t time.Time) (res []*model.Notice, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubShare(c context.Context, mid int64, aid int64, ip string) (err error)
- func (d *Dao) PubView(c context.Context, mid int64, aid int64, ip string, cheat *artmdl.CheatInfo) (err error)
- func (d *Dao) Rank(c context.Context, cid int64, ip string) (res model.RankResp, err error)
- func (d *Dao) RankCache(c context.Context, cid int64) (res model.RankResp, err error)
- func (d *Dao) RawAllLists(c context.Context) (res []*model.List, err error)
- func (d *Dao) RawAllListsEx(c context.Context, start int, size int) (res []*model.List, err error)
- func (d *Dao) RawArtsListID(c context.Context, aids []int64) (res map[int64]int64, err error)
- func (d *Dao) RawAuthor(c context.Context, mid int64) (res *artmdl.AuthorLimit, err error)
- func (d *Dao) RawList(c context.Context, id int64) (res *model.List, err error)
- func (d *Dao) RawListArts(c context.Context, listID int64) (res []*model.ListArtMeta, err error)
- func (d *Dao) RawListReadCount(c context.Context, id int64) (res int64, err error)
- func (d *Dao) RawLists(c context.Context, ids []int64) (res map[int64]*model.List, err error)
- func (d *Dao) RawListsArts(c context.Context, ids []int64) (res map[int64][]*model.ListArtMeta, err error)
- func (d *Dao) RawUpLists(c context.Context, mid int64) (res []int64, err error)
- func (d *Dao) RebuildListReadCountCache(c context.Context, id int64) (err error)
- func (d *Dao) RebuildUpListsCache(c context.Context, mid int64) (err error)
- func (d *Dao) RecommendAuthors(c context.Context, platform string, mobiApp string, device string, build int, ...) (res []*model.RecommendAuthor, err error)
- func (d *Dao) RecommendByCategory(c context.Context, categoryID int64) (res []*artmdl.Recommend, err error)
- func (d *Dao) SearchArts(c context.Context, ptime int64) (res []*model.SearchArt, err error)
- func (d *Dao) SendMessage(c context.Context, tid, mid, aid int64, title, msg string) (err error)
- func (d *Dao) SetArticleListCache(c context.Context, listID int64, arts []*model.ListArtMeta) (err error)
- func (d *Dao) SetArticlesListCache(c context.Context, values map[int64]int64) (err error)
- func (d *Dao) SetMaxLikeCache(c context.Context, aid int64, value int64) (err error)
- func (d *Dao) SetScore(c context.Context, score, aid, mediaID, mid int64) (err error)
- func (d *Dao) Settings(c context.Context) (res map[string]string, err error)
- func (d *Dao) SkyHorse(c context.Context, mid int64, build int, buvid string, plat int8, ps int) (res *model.SkyHorseResp, err error)
- func (d *Dao) SortCache(c context.Context, categoryID int64, field int, start, end int) (res []int64, err error)
- func (d *Dao) SortCacheByValue(c context.Context, categoryID int64, field int, value, score int64, ps int) (res []int64, err error)
- func (d *Dao) SubmitCache(c context.Context, mid int64, title string) (exist bool, err error)
- func (d *Dao) TagArticles(c context.Context, tags []int64) (aids []int64, err error)
- func (d *Dao) ThirtyDayArticle(c context.Context, mid int64) (res []*model.ThirtyDayArticle, err error)
- func (d *Dao) TicketCard(c context.Context, ids []int64) (resp map[int64]*model.TicketCard, err error)
- func (d *Dao) TicketCardsCache(c context.Context, ids []int64) (vs map[int64]*model.TicketCard, err error)
- func (d *Dao) TxAddArticleContent(c context.Context, tx *xsql.Tx, aid int64, content string, tags []string) (err error)
- func (d *Dao) TxAddArticleMeta(c context.Context, tx *xsql.Tx, a *artmdl.Meta, actID int64) (id int64, err error)
- func (d *Dao) TxAddArticleVersion(c context.Context, tx *xsql.Tx, id int64, a *artmdl.Article, actID int64) (err error)
- func (d *Dao) TxAddListArticle(c context.Context, tx *xsql.Tx, listID int64, aid int64, position int) (err error)
- func (d *Dao) TxDelArticleList(tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxDelArticleVersion(c context.Context, tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxDelFilteredArtContent(c context.Context, tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxDelFilteredArtMeta(c context.Context, tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxDelListArticle(c context.Context, tx *xsql.Tx, listID int64, aid int64) (err error)
- func (d *Dao) TxDeleteArticleContent(c context.Context, tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxDeleteArticleDraft(c context.Context, tx *xsql.Tx, mid, aid int64) (err error)
- func (d *Dao) TxDeleteArticleMeta(c context.Context, tx *xsql.Tx, aid int64) (err error)
- func (d *Dao) TxUpdateArticleContent(c context.Context, tx *xsql.Tx, aid int64, content string, tags []string) (err error)
- func (d *Dao) TxUpdateArticleMeta(c context.Context, tx *xsql.Tx, a *artmdl.Meta) (err error)
- func (d *Dao) TxUpdateArticleState(c context.Context, tx *xsql.Tx, aid int64, state int32) (err error)
- func (d *Dao) TxUpdateArticleStateApplyTime(c context.Context, tx *xsql.Tx, aid int64, state int32) (err error)
- func (d *Dao) TxUpdateArticleVersion(c context.Context, tx *xsql.Tx, id int64, a *artmdl.Article, actID int64) (err error)
- func (d *Dao) UpLists(c context.Context, id int64) (res []int64, err error)
- func (d *Dao) UpStat(c context.Context, mid int64) (stat model.UpStat, err error)
- func (d *Dao) UpdateArticleState(c context.Context, aid int64, state int) (err error)
- func (d *Dao) UpdateNoticeState(c context.Context, mid int64, state int64) (err error)
- func (d *Dao) UploadImage(c context.Context, fileType string, bs []byte) (location string, err error)
- func (d *Dao) UpperArticleCount(c context.Context, mid int64) (res int, err error)
- func (d *Dao) UpperArticlesMeta(c context.Context, mid int64, group, category int) (as []*artmdl.Meta, err error)
- func (d *Dao) UpperArticlesTypeCount(c context.Context, mid int64) (res *artmdl.CreationArtsType, err error)
- func (d *Dao) UpperArtsCountCache(c context.Context, mid int64) (res int, err error)
- func (d *Dao) UpperDrafts(c context.Context, mid int64, start, ps int) (res []*artmdl.Draft, err error)
- func (d *Dao) UpperPassed(c context.Context, mid int64) (aids [][2]int64, err error)
- func (d *Dao) UppersCaches(c context.Context, mids []int64, start, end int) (res map[int64][]int64, err error)
- func (d *Dao) UppersPassed(c context.Context, mids []int64) (aidm map[int64][][2]int64, err error)
Constants ¶
This section is empty.
Variables ¶
var (
//HBaseArticleTable 文章作者概况
HBaseArticleTable = "read_auth_stats_daily"
)
Functions ¶
Types ¶
type Dao ¶
type Dao struct { // inteval UpdateRecommendsInterval int64 UpdateBannersInterval int64 // contains filtered or unexported fields }
Dao dao
func (*Dao) AddArtDraft ¶
AddArtDraft add article draft .
func (*Dao) AddArticleContentCache ¶
AddArticleContentCache add article content cache
func (*Dao) AddArticleKeywordsCache ¶
AddArticleKeywordsCache add article keywords cache.
func (*Dao) AddArticleStatsCache ¶
AddArticleStatsCache batch set article cache.
func (*Dao) AddArticlesMetaCache ¶
AddArticlesMetaCache add articles meta cache
func (*Dao) AddAudioCardsCache ¶
AddAudioCardsCache .
func (*Dao) AddBangumiCardsCache ¶
AddBangumiCardsCache .
func (*Dao) AddBangumiEpCardsCache ¶
func (d *Dao) AddBangumiEpCardsCache(c context.Context, vs map[int64]*model.BangumiCard) (err error)
AddBangumiEpCardsCache .
func (*Dao) AddCacheAidsByTag ¶
AddCacheAidsByTag Set data to mc
func (*Dao) AddCacheArtsListID ¶
AddCacheArtsListID Set data to mc
func (*Dao) AddCacheAuthor ¶
AddCacheAuthor 增加作者状态缓存
func (*Dao) AddCacheHotspot ¶
AddCacheHotspot Set data to mc
func (*Dao) AddCacheHotspotArts ¶
func (d *Dao) AddCacheHotspotArts(c context.Context, typ int8, id int64, arts [][2]int64, replace bool) (err error)
AddCacheHotspotArts .
func (*Dao) AddCacheHotspots ¶
AddCacheHotspots Set data to mc
func (*Dao) AddCacheList ¶
AddCacheList Set data to mc
func (*Dao) AddCacheListArts ¶
AddCacheListArts 增加文集含有的文章列表缓存
func (*Dao) AddCacheListArtsId ¶
func (d *Dao) AddCacheListArtsId(c context.Context, id string, val *model.ArticleViewList) (err error)
AddCacheListArtsId Set data to mc
func (*Dao) AddCacheListReadCount ¶
AddCacheListReadCount Set data to mc
func (*Dao) AddCacheLists ¶
AddCacheLists Set data to mc
func (*Dao) AddCacheListsArts ¶
func (d *Dao) AddCacheListsArts(c context.Context, values map[int64][]*model.ListArtMeta) (err error)
AddCacheListsArts Set data to mc
func (*Dao) AddCacheUpLists ¶
AddCacheUpLists Set data to mc
func (*Dao) AddCacheUpStatDaily ¶
AddCacheUpStatDaily Set data to mc
func (*Dao) AddCheatFilter ¶
AddCheatFilter .
func (*Dao) AddComplaint ¶
func (d *Dao) AddComplaint(c context.Context, aid, mid, ctype int64, reason, imageUrls string) (err error)
AddComplaint add complaint.
func (*Dao) AddComplaintCount ¶
AddComplaintCount .
func (*Dao) AddListArticle ¶
AddListArticle add list article
func (*Dao) AddMallCardsCache ¶
AddMallCardsCache .
func (*Dao) AddRankCache ¶
AddRankCache add rank cache
func (*Dao) AddReadPingSet ¶
func (d *Dao) AddReadPingSet(c context.Context, buvid string, aid int64, mid int64, ip string, cur int64, source string) (err error)
AddReadPingSet 添加新的阅读记录
func (*Dao) AddSortCache ¶
func (d *Dao) AddSortCache(c context.Context, categoryID int64, field int, aid, score int64) (err error)
AddSortCache add sort articles cache
func (*Dao) AddSubmitCache ¶
AddSubmitCache add submit cache into mc.
func (*Dao) AddTicketCardsCache ¶
AddTicketCardsCache .
func (*Dao) AddUpperCache ¶
AddUpperCache adds passed article of upper.
func (*Dao) AddUpperCaches ¶
AddUpperCaches batch add passed article of upper.
func (*Dao) AllArticleMeta ¶
AllArticleMeta 所有状态/删除 的文章
func (*Dao) AllRecommendCount ¶
AllRecommendCount .
func (*Dao) AllRecommends ¶
AllRecommends .
func (*Dao) ApplyCount ¶
ApplyCount get today apply count
func (*Dao) ArticleContent ¶
ArticleContent get article content
func (*Dao) ArticleContentCache ¶
ArticleContentCache article content cache
func (*Dao) ArticleKeywords ¶
ArticleKeywords get article keywords
func (*Dao) ArticleKeywordsCache ¶
ArticleKeywordsCache article Keywords cache
func (*Dao) ArticleListCache ¶
ArticleListCache 获取文章所属文集
func (*Dao) ArticleMeta ¶
ArticleMeta get article meta
func (*Dao) ArticleMetaCache ¶
ArticleMetaCache gets article's meta cache.
func (*Dao) ArticleMetas ¶
ArticleMetas get article metats
func (*Dao) ArticleRemainCount ¶
ArticleRemainCount returns the number that user could be use to posting new articles.
func (*Dao) ArticleStats ¶
ArticleStats get article stats
func (*Dao) ArticleStatsCache ¶
ArticleStatsCache article stats cache
func (*Dao) ArticleVersion ¶
ArticleVersion .
func (*Dao) ArticlesMetaCache ¶
func (d *Dao) ArticlesMetaCache(c context.Context, ids []int64) (cached map[int64]*model.Meta, missed []int64, err error)
ArticlesMetaCache articles meta cache
func (*Dao) ArticlesStats ¶
ArticlesStats get articles stats
func (*Dao) ArticlesStatsCache ¶
func (d *Dao) ArticlesStatsCache(c context.Context, ids []int64) (cached map[int64]*model.Stats, missed []int64, err error)
ArticlesStatsCache articles stats cache
func (*Dao) ArtsListID ¶
ArtsListID get data from cache if miss will call source method, then add to cache.
func (*Dao) AudioCard ¶
func (d *Dao) AudioCard(c context.Context, ids []int64) (resp map[int64]*model.AudioCard, err error)
AudioCard .
func (*Dao) AudioCardsCache ¶
func (d *Dao) AudioCardsCache(c context.Context, ids []int64) (vs map[int64]*model.AudioCard, err error)
AudioCardsCache .
func (*Dao) AuthorMostCategories ¶
AuthorMostCategories .
func (*Dao) BangumiCard ¶
func (d *Dao) BangumiCard(c context.Context, seasonIDs []int64, episodeIDs []int64) (resp map[int64]*model.BangumiCard, err error)
BangumiCard .
func (*Dao) BangumiCardsCache ¶
func (d *Dao) BangumiCardsCache(c context.Context, ids []int64) (vs map[int64]*model.BangumiCard, err error)
BangumiCardsCache .
func (*Dao) BangumiEpCardsCache ¶
func (d *Dao) BangumiEpCardsCache(c context.Context, ids []int64) (vs map[int64]*model.BangumiCard, err error)
BangumiEpCardsCache .
func (*Dao) BerserkerTagArts ¶
BerserkerTagArts .
func (*Dao) CacheAidsByTag ¶
CacheAidsByTag get data from mc
func (*Dao) CacheAnniversary ¶
CacheAnniversary get data from mc
func (*Dao) CacheArtsListID ¶
CacheArtsListID get data from mc
func (*Dao) CacheAuthor ¶
CacheAuthor get data from mc
func (*Dao) CacheHotspot ¶
CacheHotspot get data from mc
func (*Dao) CacheHotspots ¶
CacheHotspots .
func (*Dao) CacheListArts ¶
CacheListArts 获取文集文章列表缓存
func (*Dao) CacheListArtsId ¶
CacheListArtsId get data from mc
func (*Dao) CacheListReadCount ¶
CacheListReadCount get data from mc
func (*Dao) CacheLists ¶
CacheLists get data from mc
func (*Dao) CacheListsArts ¶
func (d *Dao) CacheListsArts(c context.Context, ids []int64) (res map[int64][]*model.ListArtMeta, err error)
CacheListsArts get data from mc
func (*Dao) CacheListsReadCount ¶
CacheListsReadCount get data from mc
func (*Dao) CacheUpLists ¶
CacheUpLists get data from mc
func (*Dao) CacheUpStatDaily ¶
CacheUpStatDaily get data from mc
func (*Dao) Categories ¶
Categories get Categories
func (*Dao) CategoryAuthors ¶
func (d *Dao) CategoryAuthors(c context.Context, category int64, count int) (authors []int64, err error)
CategoryAuthors .
func (*Dao) ComplaintExist ¶
ComplaintExist .
func (*Dao) ComplaintProtected ¶
ComplaintProtected .
func (*Dao) CountUpperDraft ¶
CountUpperDraft count upper's draft
func (*Dao) CreationArticleContent ¶
CreationArticleContent gets article's content.
func (*Dao) CreationArticleMeta ¶
CreationArticleMeta querys article's meta info for creation center by aid.
func (*Dao) CreativeArticles ¶
func (d *Dao) CreativeArticles(c context.Context, aids []int64) (res map[int64]*model.ListArtMeta, err error)
CreativeArticles get up all state articles
func (*Dao) CreativeCategoryArticles ¶
func (d *Dao) CreativeCategoryArticles(c context.Context, mid int64) (res []*model.ListArtMeta, err error)
CreativeCategoryArticles can add articles
func (*Dao) CreativeCountArticles ¶
func (d *Dao) CreativeCountArticles(c context.Context, mid int64, cids []int64) (res int64, err error)
CreativeCountArticles novel count
func (*Dao) CreativeListAdd ¶
func (d *Dao) CreativeListAdd(c context.Context, mid int64, name, imageURL, summary string, publishTime xtime.Time, words int64) (res int64, err error)
CreativeListAdd add list
func (*Dao) CreativeListArticles ¶
func (d *Dao) CreativeListArticles(c context.Context, listID int64) (res []*model.ListArtMeta, err error)
CreativeListArticles .
func (*Dao) CreativeListDel ¶
CreativeListDel del list
func (*Dao) CreativeListDelAllArticles ¶
CreativeListDelAllArticles del list
func (*Dao) CreativeListUpdate ¶
func (d *Dao) CreativeListUpdate(c context.Context, id int64, name, imageURL, summary string, publishTime xtime.Time, words int64) (err error)
CreativeListUpdate update list
func (*Dao) CreativeListUpdateTime ¶
CreativeListUpdateTime update list time
func (*Dao) CreativeListsArticles ¶
func (d *Dao) CreativeListsArticles(c context.Context, listIDs []int64) (res map[int64][]*model.ListArtMeta, err error)
CreativeListsArticles .
func (*Dao) CreativeUpLists ¶
CreativeUpLists get article lists
func (*Dao) DelActivity ¶
DelActivity delete activity
func (*Dao) DelArtDraft ¶
DelArtDraft deletes article draft.
func (*Dao) DelArticleContentCache ¶
DelArticleContentCache delete article content cache
func (*Dao) DelArticleMetaCache ¶
DelArticleMetaCache delete article meta cache
func (*Dao) DelArticleStatsCache ¶
DelArticleStatsCache delete article stats cache
func (*Dao) DelCacheAuthor ¶
DelCacheAuthor delete data from mc
func (*Dao) DelCacheHotspots ¶
DelCacheHotspots delete data from mc
func (*Dao) DelCacheListArtsId ¶
DelCacheListArtsId delete data from mc
func (*Dao) DelCheatFilter ¶
DelCheatFilter .
func (*Dao) DelHotspotArtsCache ¶
DelHotspotArtsCache .
func (*Dao) DelListArticle ¶
DelListArticle delete list article
func (*Dao) DelRecommend ¶
DelRecommend delete recommend
func (*Dao) DelSortCache ¶
DelSortCache delete sort cache
func (*Dao) DelSubmitCache ¶
DelSubmitCache del submit cache into mc.
func (*Dao) DelUpperCache ¶
DelUpperCache delete article of upper cache.
func (*Dao) DynamicCount ¶
DynamicCount get dynamic count from api
func (*Dao) ExpireHotspotArtsCache ¶
ExpireHotspotArtsCache .
func (*Dao) ExpireMaxLikeCache ¶
ExpireMaxLikeCache expire max like cache
func (*Dao) ExpireRankCache ¶
ExpireRankCache expire rank cache
func (*Dao) ExpireSortCache ¶
ExpireSortCache expire sort cache
func (*Dao) ExpireUpperCache ¶
ExpireUpperCache expire the upper key.
func (*Dao) ExpireUppersCache ¶
ExpireUppersCache expire the upper key.
func (*Dao) GetsetReadPing ¶
func (d *Dao) GetsetReadPing(c context.Context, buvid string, aid int64, cur int64) (last int64, err error)
GetsetReadPing 设置并获取上次阅读心跳时间,不存在则返回0
func (*Dao) HandleActivity ¶
func (d *Dao) HandleActivity(c context.Context, mid, aid, actID int64, state int, ip string) (err error)
HandleActivity add or delete activity
func (*Dao) HotspotArtsCache ¶
func (d *Dao) HotspotArtsCache(c context.Context, typ int8, id int64, start, end int) (res []int64, err error)
HotspotArtsCache .
func (*Dao) HotspotArtsCacheCount ¶
HotspotArtsCacheCount .
func (*Dao) IsDraftDeleted ¶
IsDraftDeleted judges is draft has been deleted.
func (*Dao) LastReason ¶
LastReason return last reason from article_versions by aid and state.
func (*Dao) ListArts ¶
ListArts get data from cache if miss will call source method, then add to cache.
func (*Dao) ListArtsCacheMap ¶
func (d *Dao) ListArtsCacheMap(c context.Context, id int64) (res map[int64]*model.ListArtMeta, err error)
ListArtsCacheMap get read list articles cache
func (*Dao) ListsArts ¶
func (d *Dao) ListsArts(c context.Context, keys []int64) (res map[int64][]*model.ListArtMeta, err error)
ListsArts get data from cache if miss will call source method, then add to cache.
func (*Dao) MallCardsCache ¶
func (d *Dao) MallCardsCache(c context.Context, ids []int64) (vs map[int64]*model.MallCard, err error)
MallCardsCache .
func (*Dao) MaxLikeCache ¶
MaxLikeCache max like cache
func (*Dao) MediaArticle ¶
MediaArticle .
func (*Dao) MediaIDByID ¶
MediaIDByID .
func (*Dao) MoreArtsCaches ¶
func (d *Dao) MoreArtsCaches(c context.Context, mid, ptime int64, num int) (before []int64, after []int64, err error)
MoreArtsCaches batch get early articles of upper by publish time.
func (*Dao) NewArticleCount ¶
NewArticleCount get new article count
func (*Dao) NoticeState ¶
NoticeState .
func (*Dao) PubView ¶
func (d *Dao) PubView(c context.Context, mid int64, aid int64, ip string, cheat *artmdl.CheatInfo) (err error)
PubView adds a view count.
func (*Dao) RawAllLists ¶
RawAllLists get lists from db
func (*Dao) RawAllListsEx ¶
RawAllListsEx get lists from db
func (*Dao) RawArtsListID ¶
RawArtsListID get articles list from db
func (*Dao) RawListArts ¶
RawListArts .
func (*Dao) RawListReadCount ¶
RawListReadCount .
func (*Dao) RawListsArts ¶
func (d *Dao) RawListsArts(c context.Context, ids []int64) (res map[int64][]*model.ListArtMeta, err error)
RawListsArts .
func (*Dao) RawUpLists ¶
RawUpLists .
func (*Dao) RebuildListReadCountCache ¶
RebuildListReadCountCache .
func (*Dao) RebuildUpListsCache ¶
RebuildUpListsCache .
func (*Dao) RecommendAuthors ¶
func (d *Dao) RecommendAuthors(c context.Context, platform string, mobiApp string, device string, build int, clientIP string, userID int64, buvid string, recType string, serviceArea string, _rapagesizen int, mid int64) (res []*model.RecommendAuthor, err error)
RecommendAuthors .
func (*Dao) RecommendByCategory ¶
func (d *Dao) RecommendByCategory(c context.Context, categoryID int64) (res []*artmdl.Recommend, err error)
RecommendByCategory find recommend by category
func (*Dao) SearchArts ¶
SearchArts get articles publish time after ptime
func (*Dao) SendMessage ¶
SendMessage .
func (*Dao) SetArticleListCache ¶
func (d *Dao) SetArticleListCache(c context.Context, listID int64, arts []*model.ListArtMeta) (err error)
SetArticleListCache set article list cache
func (*Dao) SetArticlesListCache ¶
SetArticlesListCache 增加文章所属文集缓存
func (*Dao) SetMaxLikeCache ¶
SetMaxLikeCache set max like cache
func (*Dao) SkyHorse ¶
func (d *Dao) SkyHorse(c context.Context, mid int64, build int, buvid string, plat int8, ps int) (res *model.SkyHorseResp, err error)
SkyHorse sky horse
func (*Dao) SortCache ¶
func (d *Dao) SortCache(c context.Context, categoryID int64, field int, start, end int) (res []int64, err error)
SortCache get sort cache
func (*Dao) SortCacheByValue ¶
func (d *Dao) SortCacheByValue(c context.Context, categoryID int64, field int, value, score int64, ps int) (res []int64, err error)
SortCacheByValue get new articles cache by aid
func (*Dao) SubmitCache ¶
SubmitCache get user submit cache.
func (*Dao) TagArticles ¶
TagArticles .
func (*Dao) ThirtyDayArticle ¶
func (d *Dao) ThirtyDayArticle(c context.Context, mid int64) (res []*model.ThirtyDayArticle, err error)
ThirtyDayArticle for Read/Reply/Like/Fav/Coin for article 30 days.
func (*Dao) TicketCard ¶
func (d *Dao) TicketCard(c context.Context, ids []int64) (resp map[int64]*model.TicketCard, err error)
TicketCard get ticket card from api
func (*Dao) TicketCardsCache ¶
func (d *Dao) TicketCardsCache(c context.Context, ids []int64) (vs map[int64]*model.TicketCard, err error)
TicketCardsCache .
func (*Dao) TxAddArticleContent ¶
func (d *Dao) TxAddArticleContent(c context.Context, tx *xsql.Tx, aid int64, content string, tags []string) (err error)
TxAddArticleContent adds article's body via transaction.
func (*Dao) TxAddArticleMeta ¶
func (d *Dao) TxAddArticleMeta(c context.Context, tx *xsql.Tx, a *artmdl.Meta, actID int64) (id int64, err error)
TxAddArticleMeta adds article's meta via transaction.
func (*Dao) TxAddArticleVersion ¶
func (d *Dao) TxAddArticleVersion(c context.Context, tx *xsql.Tx, id int64, a *artmdl.Article, actID int64) (err error)
TxAddArticleVersion adds article version.
func (*Dao) TxAddListArticle ¶
func (d *Dao) TxAddListArticle(c context.Context, tx *xsql.Tx, listID int64, aid int64, position int) (err error)
TxAddListArticle tx add list article
func (*Dao) TxDelArticleList ¶
TxDelArticleList .
func (*Dao) TxDelArticleVersion ¶
TxDelArticleVersion deletes article version.
func (*Dao) TxDelFilteredArtContent ¶
TxDelFilteredArtContent delete filtered article content
func (*Dao) TxDelFilteredArtMeta ¶
TxDelFilteredArtMeta delete filetered article meta
func (*Dao) TxDelListArticle ¶
TxDelListArticle tx del list article
func (*Dao) TxDeleteArticleContent ¶
TxDeleteArticleContent deletes article's meta via transaction.
func (*Dao) TxDeleteArticleDraft ¶
TxDeleteArticleDraft deletes article draft via transaction.
func (*Dao) TxDeleteArticleMeta ¶
TxDeleteArticleMeta deletes article's meta via transaction.
func (*Dao) TxUpdateArticleContent ¶
func (d *Dao) TxUpdateArticleContent(c context.Context, tx *xsql.Tx, aid int64, content string, tags []string) (err error)
TxUpdateArticleContent updates article's body via transaction.
func (*Dao) TxUpdateArticleMeta ¶
TxUpdateArticleMeta updates article's meta via transaction.
func (*Dao) TxUpdateArticleState ¶
func (d *Dao) TxUpdateArticleState(c context.Context, tx *xsql.Tx, aid int64, state int32) (err error)
TxUpdateArticleState updates article's state.
func (*Dao) TxUpdateArticleStateApplyTime ¶
func (d *Dao) TxUpdateArticleStateApplyTime(c context.Context, tx *xsql.Tx, aid int64, state int32) (err error)
TxUpdateArticleStateApplyTime updates article's state and apply time.
func (*Dao) TxUpdateArticleVersion ¶
func (d *Dao) TxUpdateArticleVersion(c context.Context, tx *xsql.Tx, id int64, a *artmdl.Article, actID int64) (err error)
TxUpdateArticleVersion updates article version.
func (*Dao) UpLists ¶
UpLists get data from cache if miss will call source method, then add to cache.
func (*Dao) UpdateArticleState ¶
UpdateArticleState updates article's state.
func (*Dao) UpdateNoticeState ¶
UpdateNoticeState update notice state
func (*Dao) UploadImage ¶
func (d *Dao) UploadImage(c context.Context, fileType string, bs []byte) (location string, err error)
UploadImage upload bfs.
func (*Dao) UpperArticleCount ¶
UpperArticleCount get upper article count
func (*Dao) UpperArticlesMeta ¶
func (d *Dao) UpperArticlesMeta(c context.Context, mid int64, group, category int) (as []*artmdl.Meta, err error)
UpperArticlesMeta gets article list by mid.
func (*Dao) UpperArticlesTypeCount ¶
func (d *Dao) UpperArticlesTypeCount(c context.Context, mid int64) (res *artmdl.CreationArtsType, err error)
UpperArticlesTypeCount gets article count by type.
func (*Dao) UpperArtsCountCache ¶
UpperArtsCountCache get upper articles count
func (*Dao) UpperDrafts ¶
func (d *Dao) UpperDrafts(c context.Context, mid int64, start, ps int) (res []*artmdl.Draft, err error)
UpperDrafts batch get draft by mid.
func (*Dao) UpperPassed ¶
UpperPassed upper passed articles
Source Files ¶
- activity.go
- anniversary_mc.go
- author.go
- berserker.go
- bfs.go
- bigdata.go
- cache.go
- cards.go
- creation.go
- creation_mc.go
- dao.cache.go
- dao.go
- databus.go
- dynamic.go
- list_mc.go
- mc.cache.go
- media.go
- memcached.go
- message.go
- mysql.go
- mysql_article.go
- mysql_author.go
- mysql_complaint.go
- mysql_draft.go
- mysql_list.go
- mysql_recommend.go
- mysql_upper.go
- rank.go
- redis.go
- redis_like.go
- redis_read.go
- redis_sort.go