dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

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 New

func New(c *conf.Config) (d *Dao)

New new dao.

func (*Dao) AccTags

func (d *Dao) AccTags(c context.Context, mid int64) (data json.RawMessage, err error)

AccTags get account tags.

func (*Dao) AddCacheMasterpiece

func (d *Dao) AddCacheMasterpiece(c context.Context, id int64, val *model.AidReasons) (err error)

AddCacheMasterpiece set top archive data to mc cache.

func (*Dao) AddCacheNotice

func (d *Dao) AddCacheNotice(c context.Context, id int64, val *model.Notice) (err error)

AddCacheNotice set notice data to mc cache.

func (*Dao) AddCacheTheme

func (d *Dao) AddCacheTheme(c context.Context, id int64, val *model.ThemeDetails) (err error)

AddCacheTheme set theme data to mc cache.

func (*Dao) AddCacheTopArc

func (d *Dao) AddCacheTopArc(c context.Context, id int64, val *model.AidReason) (err error)

AddCacheTopArc set top archive data to mc cache.

func (*Dao) AddCacheTopDynamic

func (d *Dao) AddCacheTopDynamic(c context.Context, id int64, val int64) (err error)

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

func (d *Dao) AddMasterpiece(c context.Context, mid, aid int64, reason string) (err error)

AddMasterpiece add masterpiece data.

func (*Dao) AddTopArc

func (d *Dao) AddTopArc(c context.Context, mid, aid int64, reason string) (err error)

AddTopArc add top archive.

func (*Dao) AddTopDynamic

func (d *Dao) AddTopDynamic(c context.Context, mid, dyID int64) (err error)

AddTopDynamic add top archive.

func (*Dao) AlbumCount

func (d *Dao) AlbumCount(c context.Context, mid int64) (count int64, err error)

AlbumCount get album count.

func (*Dao) AlbumList

func (d *Dao) AlbumList(c context.Context, mid int64, pn, ps int) (list []*model.Album, err error)

AlbumList get album list.

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) AudioCnt

func (d *Dao) AudioCnt(c context.Context, mid int64) (count int, err error)

AudioCnt get audio cnt.

func (*Dao) AudioUpperCert

func (d *Dao) AudioUpperCert(c context.Context, uid int64) (cert *model.AudioUpperCert, err error)

AudioUpperCert get audio upper cert.

func (*Dao) BangumiConcern

func (d *Dao) BangumiConcern(c context.Context, mid, seasonID int64) (err error)

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

func (d *Dao) BangumiUnConcern(c context.Context, mid, seasonID int64) (err error)

BangumiUnConcern bangumi cancel sub.

func (*Dao) Blacklist

func (d *Dao) Blacklist(c context.Context) (blacklist []int64, err error)

Blacklist get blacklist from db.

func (*Dao) CacheMasterpiece

func (d *Dao) CacheMasterpiece(c context.Context, id int64) (res *model.AidReasons, err error)

CacheMasterpiece get top archive data from mc cache.

func (*Dao) CacheNotice

func (d *Dao) CacheNotice(c context.Context, id int64) (res *model.Notice, err error)

CacheNotice get notice data from mc cache.

func (*Dao) CacheTheme

func (d *Dao) CacheTheme(c context.Context, id int64) (res *model.ThemeDetails, err error)

CacheTheme get theme data from mc cache.

func (*Dao) CacheTopArc

func (d *Dao) CacheTopArc(c context.Context, id int64) (res *model.AidReason, err error)

CacheTopArc get top archive data from mc cache.

func (*Dao) CacheTopDynamic

func (d *Dao) CacheTopDynamic(c context.Context, id int64) (res int64, err error)

CacheTopDynamic get top dynamic id cache.

func (*Dao) Channel

func (d *Dao) Channel(c context.Context, mid, cid int64) (channel *model.Channel, err error)

Channel get channel simple info

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

func (d *Dao) ChannelCache(c context.Context, mid, cid int64) (channel *model.Channel, err error)

ChannelCache get channel cache.

func (*Dao) ChannelCnt

func (d *Dao) ChannelCnt(c context.Context, mid int64) (count int, err error)

ChannelCnt get channel count by mid

func (*Dao) ChannelExtra

func (d *Dao) ChannelExtra(c context.Context, mid, cid int64) (res *model.ChannelExtra, err error)

ChannelExtra get channel count and cover aid

func (*Dao) ChannelList

func (d *Dao) ChannelList(c context.Context, mid int64) (res []*model.Channel, err error)

ChannelList get channel list by mid

func (*Dao) ChannelListCache

func (d *Dao) ChannelListCache(c context.Context, mid int64) (channels []*model.Channel, err error)

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

func (d *Dao) DelCacheNotice(c context.Context, id int64) (err error)

DelCacheNotice delete data from mc

func (*Dao) DelCacheTheme

func (d *Dao) DelCacheTheme(c context.Context, id int64) (err error)

DelCacheTheme delete data from mc

func (*Dao) DelChannel

func (d *Dao) DelChannel(c context.Context, mid, cid int64) (affected int64, err error)

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

func (d *Dao) DelChannelArcCache(c context.Context, mid, cid, aid int64) (err error)

DelChannelArcCache delete channel archive cache from cache list.

func (*Dao) DelChannelArcsCache

func (d *Dao) DelChannelArcsCache(c context.Context, mid, cid int64) (err error)

DelChannelArcsCache delete all channel arcs cache when delete channel

func (*Dao) DelChannelCache

func (d *Dao) DelChannelCache(c context.Context, mid, cid int64) (err error)

DelChannelCache delete channel cache from list.

func (*Dao) DelIndexOrderCache

func (d *Dao) DelIndexOrderCache(c context.Context, mid int64) (err error)

DelIndexOrderCache delete index order cache.

func (*Dao) DelMasterpiece

func (d *Dao) DelMasterpiece(c context.Context, mid, aid int64) (err error)

DelMasterpiece delete masterpiece.

func (*Dao) DelPrivacyCache

func (d *Dao) DelPrivacyCache(c context.Context, mid int64) (err error)

DelPrivacyCache delete privacy cache.

func (*Dao) DelTopArc

func (d *Dao) DelTopArc(c context.Context, mid int64) (err error)

DelTopArc delete top archive.

func (*Dao) DelTopDynamic

func (d *Dao) DelTopDynamic(c context.Context, mid int64, now time.Time) (err error)

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

func (d *Dao) DynamicCnt(c context.Context, mid int64) (cnt int64, err error)

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

func (d *Dao) EditMasterpiece(c context.Context, mid, aid, preAid int64, reason string) (err error)

EditMasterpiece edit masterpiece data.

func (*Dao) ElecInfo

func (d *Dao) ElecInfo(c context.Context, mid, paymid int64) (data *model.ElecInfo, err error)

ElecInfo .

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) FavFolder

func (d *Dao) FavFolder(c context.Context, mid, vmid int64) (res []*favmdl.VideoFolder, err error)

FavFolder favorite folder list.

func (*Dao) GroupsCount

func (d *Dao) GroupsCount(c context.Context, mid, vmid int64) (count int, err error)

GroupsCount .

func (*Dao) IndexOrder

func (d *Dao) IndexOrder(c context.Context, mid int64) (indexOrder string, err error)

IndexOrder get index order info.

func (*Dao) IndexOrderCache

func (d *Dao) IndexOrderCache(c context.Context, mid int64) (data []*model.IndexOrder, err error)

IndexOrderCache get index order cache.

func (*Dao) IndexOrderModify

func (d *Dao) IndexOrderModify(c context.Context, mid int64, orderStr string) (err error)

IndexOrderModify index order modify.

func (*Dao) IsAnswered

func (d *Dao) IsAnswered(c context.Context, mid, start int64) (status int, err error)

IsAnswered get if block account answered.

func (*Dao) LastPlayGame

func (d *Dao) LastPlayGame(c context.Context, mid int64) (data []*model.Game, err error)

LastPlayGame get last play game.

func (*Dao) Live

func (d *Dao) Live(c context.Context, mid int64, platform string) (live *model.Live, err error)

Live is space live data.

func (*Dao) LiveFavCount

func (d *Dao) LiveFavCount(c context.Context, mid int64, favType int) (count int, err error)

LiveFavCount get live(vc or album) favorite count.

func (*Dao) LiveMetal

func (d *Dao) LiveMetal(c context.Context, mid int64) (rs bool, err error)

LiveMetal get live metal

func (*Dao) Masterpiece

func (d *Dao) Masterpiece(c context.Context, id int64) (res *model.AidReasons, err error)

Masterpiece get data from cache if miss will call source method, then add to cache.

func (*Dao) MovieFavCount

func (d *Dao) MovieFavCount(c context.Context, mid int64, favType int) (count int, err error)

MovieFavCount get movie fav count

func (*Dao) Notice

func (d *Dao) Notice(c context.Context, id int64) (res *model.Notice, err error)

Notice get data from cache if miss will call source method, then add to cache.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping dao

func (*Dao) Privacy

func (d *Dao) Privacy(c context.Context, mid int64) (data map[string]int, err error)

Privacy get privacy data.

func (*Dao) PrivacyCache

func (d *Dao) PrivacyCache(c context.Context, mid int64) (data map[string]int, err error)

PrivacyCache get privacy cache.

func (*Dao) PrivacyModify

func (d *Dao) PrivacyModify(c context.Context, mid int64, field string, value int) (err error)

PrivacyModify modify privacy.

func (*Dao) RawMasterpiece

func (d *Dao) RawMasterpiece(c context.Context, mid int64) (res *model.AidReasons, err error)

RawMasterpiece get masterpiece from db.

func (*Dao) RawNotice

func (d *Dao) RawNotice(c context.Context, mid int64) (res *model.Notice, err error)

RawNotice get notice from db.

func (*Dao) RawTheme

func (d *Dao) RawTheme(c context.Context, mid int64) (res *model.ThemeDetails, err error)

RawTheme get themes by mid.

func (*Dao) RawTopArc

func (d *Dao) RawTopArc(c context.Context, mid int64) (res *model.AidReason, err error)

RawTopArc get top aid from db.

func (*Dao) RawTopDynamic

func (d *Dao) RawTopDynamic(c context.Context, mid int64) (dyID int64, err error)

RawTopDynamic get top dynamic data from mysql.

func (*Dao) SetAccTags

func (d *Dao) SetAccTags(c context.Context, tags, ck string) (err error)

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) SetNotice

func (d *Dao) SetNotice(c context.Context, mid int64, notice string) (err error)

SetNotice change notice.

func (*Dao) SetPrivacyCache

func (d *Dao) SetPrivacyCache(c context.Context, mid int64, data map[string]int) (err error)

SetPrivacyCache set privacy cache.

func (*Dao) SetUpArcCache

func (d *Dao) SetUpArcCache(c context.Context, mid int64, data *model.UpArcStat) (err error)

SetUpArcCache set up archive cache.

func (*Dao) SetUpArtCache

func (d *Dao) SetUpArtCache(c context.Context, mid int64, data *model.UpArtStat) (err error)

SetUpArtCache set up article cache.

func (*Dao) ShopInfo

func (d *Dao) ShopInfo(c context.Context, mid int64) (data *model.ShopInfo, err error)

ShopInfo get shop info data for pc.

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

func (d *Dao) TagCancelSub(c context.Context, mid, tid int64) (err error)

TagCancelSub cancel subscribe tag.

func (*Dao) TagSub

func (d *Dao) TagSub(c context.Context, mid, tid int64) (err error)

TagSub 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) Theme

func (d *Dao) Theme(c context.Context, id int64) (res *model.ThemeDetails, err error)

Theme get data from cache if miss will call source method, then add to cache.

func (*Dao) ThemeActive

func (d *Dao) ThemeActive(c context.Context, mid, themeID int64) (err error)

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

func (d *Dao) ThemeInfoByMid(c context.Context, mid int64) (res []*model.ThemeInfo, err error)

ThemeInfoByMid get theme info by mid.

func (*Dao) TopArc

func (d *Dao) TopArc(c context.Context, id int64) (res *model.AidReason, err error)

TopArc get data from cache if miss will call source method, then add to cache.

func (*Dao) TopDynamic

func (d *Dao) TopDynamic(c context.Context, id int64) (res int64, err error)

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

func (d *Dao) UpArcCache(c context.Context, mid int64) (data *model.UpArcStat, err error)

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

func (d *Dao) UpArtCache(c context.Context, mid int64) (data *model.UpArtStat, err error)

UpArtCache get up article cache.

func (*Dao) UpArtStat

func (d *Dao) UpArtStat(c context.Context, mid int64) (stat *model.UpArtStat, err error)

UpArtStat get up article stat.

func (*Dao) WebTopPhoto

func (d *Dao) WebTopPhoto(c context.Context, mid int64) (space *model.TopPhoto, err error)

WebTopPhoto getTopPhoto from space

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL