Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AccTags(c context.Context, mid int64) (data json.RawMessage, err error)
- func (d *Dao) AddCacheMasterpiece(c context.Context, id int64, val *model.AidReasons) (err error)
- func (d *Dao) AddCacheNotice(c context.Context, id int64, val *model.Notice) (err error)
- func (d *Dao) AddCacheTheme(c context.Context, id int64, val *model.ThemeDetails) (err error)
- func (d *Dao) AddCacheTopArc(c context.Context, id int64, val *model.AidReason) (err error)
- func (d *Dao) AddCacheTopDynamic(c context.Context, id int64, val int64) (err error)
- func (d *Dao) AddChannel(c context.Context, mid int64, name, intro string, ts time.Time) (lastID int64, err error)
- func (d *Dao) AddChannelArc(c context.Context, mid, cid int64, ts time.Time, chs []*model.ChannelArcSort) (lastID int64, err error)
- func (d *Dao) AddChannelArcCache(c context.Context, mid, cid int64, arcs []*model.ChannelArc) (err error)
- func (d *Dao) AddMasterpiece(c context.Context, mid, aid int64, reason string) (err error)
- func (d *Dao) AddTopArc(c context.Context, mid, aid int64, reason string) (err error)
- func (d *Dao) AddTopDynamic(c context.Context, mid, dyID int64) (err error)
- func (d *Dao) AlbumCount(c context.Context, mid int64) (count int64, err error)
- func (d *Dao) AlbumList(c context.Context, mid int64, pn, ps int) (list []*model.Album, err error)
- func (d *Dao) AppPlayedGame(c context.Context, mid int64, platform string, pn, ps int) (data []*model.AppGame, count int, err error)
- func (d *Dao) ArcSearchList(c context.Context, arg *model.SearchArg) (data *model.SearchRes, total int, err error)
- func (d *Dao) AudioCard(c context.Context, mid ...int64) (cardm map[int64]*model.AudioCard, err error)
- func (d *Dao) AudioCnt(c context.Context, mid int64) (count int, err error)
- func (d *Dao) AudioUpperCert(c context.Context, uid int64) (cert *model.AudioUpperCert, err error)
- func (d *Dao) BangumiConcern(c context.Context, mid, seasonID int64) (err error)
- func (d *Dao) BangumiList(c context.Context, mid int64, pn, ps int) (data []*model.Bangumi, count int, err error)
- func (d *Dao) BangumiUnConcern(c context.Context, mid, seasonID int64) (err error)
- func (d *Dao) Blacklist(c context.Context) (blacklist []int64, err error)
- func (d *Dao) CacheMasterpiece(c context.Context, id int64) (res *model.AidReasons, err error)
- func (d *Dao) CacheNotice(c context.Context, id int64) (res *model.Notice, err error)
- func (d *Dao) CacheTheme(c context.Context, id int64) (res *model.ThemeDetails, err error)
- func (d *Dao) CacheTopArc(c context.Context, id int64) (res *model.AidReason, err error)
- func (d *Dao) CacheTopDynamic(c context.Context, id int64) (res int64, err error)
- func (d *Dao) Channel(c context.Context, mid, cid int64) (channel *model.Channel, err error)
- func (d *Dao) ChannelArcsCache(c context.Context, mid, cid int64, start, end int, order bool) (arcs []*model.ChannelArc, err error)
- func (d *Dao) ChannelCache(c context.Context, mid, cid int64) (channel *model.Channel, err error)
- func (d *Dao) ChannelCnt(c context.Context, mid int64) (count int, err error)
- func (d *Dao) ChannelExtra(c context.Context, mid, cid int64) (res *model.ChannelExtra, err error)
- func (d *Dao) ChannelList(c context.Context, mid int64) (res []*model.Channel, err error)
- func (d *Dao) ChannelListCache(c context.Context, mid int64) (channels []*model.Channel, err error)
- func (d *Dao) ChannelVideos(c context.Context, mid, cid int64, order bool) (res []*model.ChannelArc, err error)
- func (d *Dao) DelCacheNotice(c context.Context, id int64) (err error)
- func (d *Dao) DelCacheTheme(c context.Context, id int64) (err error)
- func (d *Dao) DelChannel(c context.Context, mid, cid int64) (affected int64, err error)
- func (d *Dao) DelChannelArc(c context.Context, mid, cid, aid int64, orderNum int) (affected int64, err error)
- func (d *Dao) DelChannelArcCache(c context.Context, mid, cid, aid int64) (err error)
- func (d *Dao) DelChannelArcsCache(c context.Context, mid, cid int64) (err error)
- func (d *Dao) DelChannelCache(c context.Context, mid, cid int64) (err error)
- func (d *Dao) DelIndexOrderCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelMasterpiece(c context.Context, mid, aid int64) (err error)
- func (d *Dao) DelPrivacyCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelTopArc(c context.Context, mid int64) (err error)
- func (d *Dao) DelTopDynamic(c context.Context, mid int64, now time.Time) (err error)
- func (d *Dao) Dynamic(c context.Context, mid, dynamicID int64, qn int) (data *model.DyCard, err error)
- func (d *Dao) DynamicCnt(c context.Context, mid int64) (cnt int64, err error)
- func (d *Dao) DynamicList(c context.Context, mid, vmid, dyID int64, qn, page int) (data *model.DyList, err error)
- func (d *Dao) EditChannel(c context.Context, mid, cid int64, name, intro string, ts time.Time) (affected int64, err error)
- func (d *Dao) EditChannelArc(c context.Context, mid, cid int64, ts time.Time, ...) (affected int64, err error)
- func (d *Dao) EditMasterpiece(c context.Context, mid, aid, preAid int64, reason string) (err error)
- func (d *Dao) ElecInfo(c context.Context, mid, paymid int64) (data *model.ElecInfo, err error)
- func (d *Dao) FavArchive(c context.Context, mid int64, arg *model.FavArcArg) (res *favmdl.SearchArchive, err error)
- func (d *Dao) FavFolder(c context.Context, mid, vmid int64) (res []*favmdl.VideoFolder, err error)
- func (d *Dao) GroupsCount(c context.Context, mid, vmid int64) (count int, err error)
- func (d *Dao) IndexOrder(c context.Context, mid int64) (indexOrder string, err error)
- func (d *Dao) IndexOrderCache(c context.Context, mid int64) (data []*model.IndexOrder, err error)
- func (d *Dao) IndexOrderModify(c context.Context, mid int64, orderStr string) (err error)
- func (d *Dao) IsAnswered(c context.Context, mid, start int64) (status int, err error)
- func (d *Dao) LastPlayGame(c context.Context, mid int64) (data []*model.Game, err error)
- func (d *Dao) Live(c context.Context, mid int64, platform string) (live *model.Live, err error)
- func (d *Dao) LiveFavCount(c context.Context, mid int64, favType int) (count int, err error)
- func (d *Dao) LiveMetal(c context.Context, mid int64) (rs bool, err error)
- func (d *Dao) Masterpiece(c context.Context, id int64) (res *model.AidReasons, err error)
- func (d *Dao) MovieFavCount(c context.Context, mid int64, favType int) (count int, err error)
- func (d *Dao) Notice(c context.Context, id int64) (res *model.Notice, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) Privacy(c context.Context, mid int64) (data map[string]int, err error)
- func (d *Dao) PrivacyCache(c context.Context, mid int64) (data map[string]int, err error)
- func (d *Dao) PrivacyModify(c context.Context, mid int64, field string, value int) (err error)
- func (d *Dao) RawMasterpiece(c context.Context, mid int64) (res *model.AidReasons, err error)
- func (d *Dao) RawNotice(c context.Context, mid int64) (res *model.Notice, err error)
- func (d *Dao) RawTheme(c context.Context, mid int64) (res *model.ThemeDetails, err error)
- func (d *Dao) RawTopArc(c context.Context, mid int64) (res *model.AidReason, err error)
- func (d *Dao) RawTopDynamic(c context.Context, mid int64) (dyID int64, err error)
- func (d *Dao) SetAccTags(c context.Context, tags, ck string) (err error)
- func (d *Dao) SetChannelArcSortCache(c context.Context, mid, cid int64, sort []*model.ChannelArcSort) (err error)
- func (d *Dao) SetChannelArcsCache(c context.Context, mid, cid int64, arcs []*model.ChannelArc) (err error)
- func (d *Dao) SetChannelCache(c context.Context, mid, cid int64, channel *model.Channel) (err error)
- func (d *Dao) SetChannelListCache(c context.Context, mid int64, channelList []*model.Channel) (err error)
- func (d *Dao) SetIndexOrderCache(c context.Context, mid int64, data []*model.IndexOrder) (err error)
- func (d *Dao) SetNotice(c context.Context, mid int64, notice string) (err error)
- func (d *Dao) SetPrivacyCache(c context.Context, mid int64, data map[string]int) (err error)
- func (d *Dao) SetUpArcCache(c context.Context, mid int64, data *model.UpArcStat) (err error)
- func (d *Dao) SetUpArtCache(c context.Context, mid int64, data *model.UpArtStat) (err error)
- func (d *Dao) ShopInfo(c context.Context, mid int64) (data *model.ShopInfo, err error)
- func (d *Dao) ShopLink(c context.Context, mid int64, platform int) (data *model.ShopLinkInfo, err error)
- func (d *Dao) TagCancelSub(c context.Context, mid, tid int64) (err error)
- func (d *Dao) TagSub(c context.Context, mid, tid int64) (err error)
- func (d *Dao) TagSubList(c context.Context, mid int64, pn, ps int) (rs []*model.Tag, total int, err error)
- func (d *Dao) Theme(c context.Context, id int64) (res *model.ThemeDetails, err error)
- func (d *Dao) ThemeActive(c context.Context, mid, themeID int64) (err error)
- func (d *Dao) ThemeDetail(c context.Context, themeIDs []int64) (res []*model.ThemeDetail, err error)
- func (d *Dao) ThemeInfoByMid(c context.Context, mid int64) (res []*model.ThemeInfo, err error)
- func (d *Dao) TopArc(c context.Context, id int64) (res *model.AidReason, err error)
- func (d *Dao) TopDynamic(c context.Context, id int64) (res int64, err error)
- func (d *Dao) TopPhoto(c context.Context, mid, vmid int64, platform, device string) (imgURL string, err error)
- func (d *Dao) UpArcCache(c context.Context, mid int64) (data *model.UpArcStat, err error)
- func (d *Dao) UpArcStat(c context.Context, mid int64, date string) (stat *model.UpArcStat, err error)
- func (d *Dao) UpArtCache(c context.Context, mid int64) (data *model.UpArtStat, err error)
- func (d *Dao) UpArtStat(c context.Context, mid int64) (stat *model.UpArtStat, err error)
- func (d *Dao) WebTopPhoto(c context.Context, mid int64) (space *model.TopPhoto, 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 dao struct.
func (*Dao) AddCacheMasterpiece ¶
AddCacheMasterpiece set top archive data to mc cache.
func (*Dao) AddCacheNotice ¶
AddCacheNotice set notice data to mc cache.
func (*Dao) AddCacheTheme ¶
AddCacheTheme set theme data to mc cache.
func (*Dao) AddCacheTopArc ¶
AddCacheTopArc set top archive data to mc cache.
func (*Dao) AddCacheTopDynamic ¶
AddCacheTopDynamic set top dynamic id cache.
func (*Dao) AddChannel ¶
func (d *Dao) AddChannel(c context.Context, mid int64, name, intro string, ts time.Time) (lastID int64, err error)
AddChannel add channel
func (*Dao) AddChannelArc ¶
func (d *Dao) AddChannelArc(c context.Context, mid, cid int64, ts time.Time, chs []*model.ChannelArcSort) (lastID int64, err error)
AddChannelArc add archives to channel
func (*Dao) AddChannelArcCache ¶
func (d *Dao) AddChannelArcCache(c context.Context, mid, cid int64, arcs []*model.ChannelArc) (err error)
AddChannelArcCache add channel archives cache.
func (*Dao) AddMasterpiece ¶
AddMasterpiece add masterpiece data.
func (*Dao) AddTopDynamic ¶
AddTopDynamic add top archive.
func (*Dao) AlbumCount ¶
AlbumCount get album count.
func (*Dao) AppPlayedGame ¶
func (d *Dao) AppPlayedGame(c context.Context, mid int64, platform string, pn, ps int) (data []*model.AppGame, count int, err error)
AppPlayedGame get app player games.
func (*Dao) ArcSearchList ¶
func (d *Dao) ArcSearchList(c context.Context, arg *model.SearchArg) (data *model.SearchRes, total int, err error)
ArcSearchList archive search.
func (*Dao) AudioCard ¶
func (d *Dao) AudioCard(c context.Context, mid ...int64) (cardm map[int64]*model.AudioCard, err error)
AudioCard get audio card info.
func (*Dao) AudioUpperCert ¶
AudioUpperCert get audio upper cert.
func (*Dao) BangumiConcern ¶
BangumiConcern bangumi concern.
func (*Dao) BangumiList ¶
func (d *Dao) BangumiList(c context.Context, mid int64, pn, ps int) (data []*model.Bangumi, count int, err error)
BangumiList get bangumi sub list by mid.
func (*Dao) BangumiUnConcern ¶
BangumiUnConcern bangumi cancel sub.
func (*Dao) CacheMasterpiece ¶
CacheMasterpiece get top archive data from mc cache.
func (*Dao) CacheNotice ¶
CacheNotice get notice data from mc cache.
func (*Dao) CacheTheme ¶
CacheTheme get theme data from mc cache.
func (*Dao) CacheTopArc ¶
CacheTopArc get top archive data from mc cache.
func (*Dao) CacheTopDynamic ¶
CacheTopDynamic get top dynamic id cache.
func (*Dao) ChannelArcsCache ¶
func (d *Dao) ChannelArcsCache(c context.Context, mid, cid int64, start, end int, order bool) (arcs []*model.ChannelArc, err error)
ChannelArcsCache get channel archives cache.
func (*Dao) ChannelCache ¶
ChannelCache get channel cache.
func (*Dao) ChannelCnt ¶
ChannelCnt get channel count by mid
func (*Dao) ChannelExtra ¶
ChannelExtra get channel count and cover aid
func (*Dao) ChannelList ¶
ChannelList get channel list by mid
func (*Dao) ChannelListCache ¶
ChannelListCache get channel list cache.
func (*Dao) ChannelVideos ¶
func (d *Dao) ChannelVideos(c context.Context, mid, cid int64, order bool) (res []*model.ChannelArc, err error)
ChannelVideos get channel video list
func (*Dao) DelCacheNotice ¶
DelCacheNotice delete data from mc
func (*Dao) DelCacheTheme ¶
DelCacheTheme delete data from mc
func (*Dao) DelChannel ¶
DelChannel delete channel
func (*Dao) DelChannelArc ¶
func (d *Dao) DelChannelArc(c context.Context, mid, cid, aid int64, orderNum int) (affected int64, err error)
DelChannelArc delete channel archives
func (*Dao) DelChannelArcCache ¶
DelChannelArcCache delete channel archive cache from cache list.
func (*Dao) DelChannelArcsCache ¶
DelChannelArcsCache delete all channel arcs cache when delete channel
func (*Dao) DelChannelCache ¶
DelChannelCache delete channel cache from list.
func (*Dao) DelIndexOrderCache ¶
DelIndexOrderCache delete index order cache.
func (*Dao) DelMasterpiece ¶
DelMasterpiece delete masterpiece.
func (*Dao) DelPrivacyCache ¶
DelPrivacyCache delete privacy cache.
func (*Dao) DelTopDynamic ¶
DelTopDynamic delete top archive.
func (*Dao) Dynamic ¶
func (d *Dao) Dynamic(c context.Context, mid, dynamicID int64, qn int) (data *model.DyCard, err error)
Dynamic .
func (*Dao) DynamicCnt ¶
DynamicCnt dynamic count.
func (*Dao) DynamicList ¶
func (d *Dao) DynamicList(c context.Context, mid, vmid, dyID int64, qn, page int) (data *model.DyList, err error)
DynamicList .
func (*Dao) EditChannel ¶
func (d *Dao) EditChannel(c context.Context, mid, cid int64, name, intro string, ts time.Time) (affected int64, err error)
EditChannel edit channel name or intro
func (*Dao) EditChannelArc ¶
func (d *Dao) EditChannelArc(c context.Context, mid, cid int64, ts time.Time, chSort []*model.ChannelArcSort) (affected int64, err error)
EditChannelArc edit channel archive order num
func (*Dao) EditMasterpiece ¶
EditMasterpiece edit masterpiece data.
func (*Dao) FavArchive ¶
func (d *Dao) FavArchive(c context.Context, mid int64, arg *model.FavArcArg) (res *favmdl.SearchArchive, err error)
FavArchive fav archive.
func (*Dao) GroupsCount ¶
GroupsCount .
func (*Dao) IndexOrder ¶
IndexOrder get index order info.
func (*Dao) IndexOrderCache ¶
IndexOrderCache get index order cache.
func (*Dao) IndexOrderModify ¶
IndexOrderModify index order modify.
func (*Dao) IsAnswered ¶
IsAnswered get if block account answered.
func (*Dao) LastPlayGame ¶
LastPlayGame get last play game.
func (*Dao) LiveFavCount ¶
LiveFavCount get live(vc or album) favorite count.
func (*Dao) Masterpiece ¶
Masterpiece get data from cache if miss will call source method, then add to cache.
func (*Dao) MovieFavCount ¶
MovieFavCount get movie fav count
func (*Dao) PrivacyCache ¶
PrivacyCache get privacy cache.
func (*Dao) PrivacyModify ¶
PrivacyModify modify privacy.
func (*Dao) RawMasterpiece ¶
RawMasterpiece get masterpiece from db.
func (*Dao) RawTopDynamic ¶
RawTopDynamic get top dynamic data from mysql.
func (*Dao) SetAccTags ¶
SetAccTags set account tags.
func (*Dao) SetChannelArcSortCache ¶
func (d *Dao) SetChannelArcSortCache(c context.Context, mid, cid int64, sort []*model.ChannelArcSort) (err error)
SetChannelArcSortCache set channel archives sort cache
func (*Dao) SetChannelArcsCache ¶
func (d *Dao) SetChannelArcsCache(c context.Context, mid, cid int64, arcs []*model.ChannelArc) (err error)
SetChannelArcsCache add channel archive cache.
func (*Dao) SetChannelCache ¶
func (d *Dao) SetChannelCache(c context.Context, mid, cid int64, channel *model.Channel) (err error)
SetChannelCache add channel data cache.
func (*Dao) SetChannelListCache ¶
func (d *Dao) SetChannelListCache(c context.Context, mid int64, channelList []*model.Channel) (err error)
SetChannelListCache add channel data cache.
func (*Dao) SetIndexOrderCache ¶
func (d *Dao) SetIndexOrderCache(c context.Context, mid int64, data []*model.IndexOrder) (err error)
SetIndexOrderCache set index order cache.
func (*Dao) SetPrivacyCache ¶
SetPrivacyCache set privacy cache.
func (*Dao) SetUpArcCache ¶
SetUpArcCache set up archive cache.
func (*Dao) SetUpArtCache ¶
SetUpArtCache set up article cache.
func (*Dao) ShopLink ¶
func (d *Dao) ShopLink(c context.Context, mid int64, platform int) (data *model.ShopLinkInfo, err error)
ShopLink only get simply data for h5.
func (*Dao) TagCancelSub ¶
TagCancelSub cancel subscribe tag.
func (*Dao) TagSubList ¶
func (d *Dao) TagSubList(c context.Context, mid int64, pn, ps int) (rs []*model.Tag, total int, err error)
TagSubList get tag subscribe list by mid.
func (*Dao) ThemeActive ¶
ThemeActive active theme.
func (*Dao) ThemeDetail ¶
func (d *Dao) ThemeDetail(c context.Context, themeIDs []int64) (res []*model.ThemeDetail, err error)
ThemeDetail get theme details.
func (*Dao) ThemeInfoByMid ¶
ThemeInfoByMid get theme info by mid.
func (*Dao) TopDynamic ¶
TopDynamic get data from cache if miss will call source method, then add to cache.
func (*Dao) TopPhoto ¶
func (d *Dao) TopPhoto(c context.Context, mid, vmid int64, platform, device string) (imgURL string, err error)
TopPhoto getTopPhoto from space php.
func (*Dao) UpArcCache ¶
UpArcCache get up archive cache.
func (*Dao) UpArcStat ¶
func (d *Dao) UpArcStat(c context.Context, mid int64, date string) (stat *model.UpArcStat, err error)
UpArcStat get up archive stat.
func (*Dao) UpArtCache ¶
UpArtCache get up article cache.