Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddRegionArcCache(c context.Context, rid, reid int16, as ...*api.RegionArc) (err error)
- func (d *Dao) AddUpperCountCache(c context.Context, mid int64, count int) (err error)
- func (d *Dao) AddUpperPassedCache(c context.Context, mid int64, aids []int64, ptimes []time.Time, ...) (err error)
- func (d *Dao) Addit(c context.Context, aid int64) (addit *archive.Addit, err error)
- func (d *Dao) Archive3(c context.Context, aid int64) (a *api.Arc, err error)
- func (d *Dao) Archives3(c context.Context, aids []int64) (am map[int64]*api.Arc, err error)
- func (d *Dao) Click3(c context.Context, aid int64) (clk *api.Click, err error)
- func (d *Dao) Close()
- func (d *Dao) DelRegionArcCache(c context.Context, rid, reid int16, aid int64) (err error)
- func (d *Dao) DelUpperPassedCache(c context.Context, mid, aid int64) (err error)
- func (d *Dao) DelVideoCache3(c context.Context, aid, cid int64) (err error)
- func (d *Dao) Description(c context.Context, aid int64) (desc string, err error)
- func (d *Dao) ExpireUpperPassedCache(c context.Context, mid int64) (ok bool, err error)
- func (d *Dao) ExpireUppersCountCache(c context.Context, mids []int64) (cachedUp, missed []int64, err error)
- func (d *Dao) ExpireUppersPassedCache(c context.Context, mids []int64) (res map[int64]bool, err error)
- func (d *Dao) InitStatCache3(c context.Context, aid int64) (err error)
- func (d *Dao) MaxAID(c context.Context) (id int64, err error)
- func (d *Dao) PGCPlayerInfos(c context.Context, aids []int64, platform, ip, session string, ...) (pgcm map[int64]*archive.PlayerInfo, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PlayerInfos(c context.Context, cids []int64, qn int, platform, ip string, ...) (pm map[uint32]*archive.BvcVideoItem, err error)
- func (d *Dao) RegionAllCountCache(c context.Context) (count int, err error)
- func (d *Dao) RegionArcs(c context.Context, rid int16, start, length int) (ras []*api.RegionArc, err error)
- func (d *Dao) RegionArcsCache(c context.Context, rid int16, start, end int) (aids []int64, err error)
- func (d *Dao) RegionCountCache(c context.Context, rid int16) (count int, err error)
- func (d *Dao) RegionOriginArcsCache(c context.Context, rid int16, start, end int) (aids []int64, err error)
- func (d *Dao) RegionOriginCountCache(c context.Context, rid int16) (count int, err error)
- func (d *Dao) RegionTopArcsCache(c context.Context, reid int16, start, end int) (aids []int64, err error)
- func (d *Dao) RegionTopCountCache(c context.Context, reids []int16, min, max int64) (recm map[int16]int, err error)
- func (d *Dao) ReportResults(c context.Context) (res map[int64]*arcmdl.ReportResult, err error)
- func (d *Dao) SetStat3(c context.Context, st *api.Stat) (err error)
- func (d *Dao) Stat3(c context.Context, aid int64) (st *api.Stat, err error)
- func (d *Dao) Stats3(c context.Context, aids []int64) (stm map[int64]*api.Stat, err error)
- func (d *Dao) Types(c context.Context) (types map[int16]*archive.ArcType, err error)
- func (d *Dao) UpArchiveCache(c context.Context, aid int64) (err error)
- func (d *Dao) UpVideo3(c context.Context, aid, cid int64) (err error)
- func (d *Dao) UpperCache(c context.Context, mid int64, action string, oldname string, oldface string)
- func (d *Dao) UpperCount(c context.Context, mid int64) (count int, err error)
- func (d *Dao) UpperCountCache(c context.Context, mid int64) (count int, err error)
- func (d *Dao) UpperPassed(c context.Context, mid int64) (aids []int64, ptimes []time.Time, copyrights []int8, err error)
- func (d *Dao) UpperPassedCache(c context.Context, mid int64, start, end int) (aids []int64, err error)
- func (d *Dao) UpperReommend(c context.Context, aid int64) (reAids []int64, err error)
- func (d *Dao) UppersCount(c context.Context, mids []int64) (uc map[int64]int, err error)
- func (d *Dao) UppersCountCache(c context.Context, mids []int64) (cached map[int64]int, missed []int64, err error)
- func (d *Dao) UppersPassed(c context.Context, mids []int64) (aidm map[int64][]int64, ptimes map[int64][]time.Time, ...)
- func (d *Dao) UppersPassedCache(c context.Context, mids []int64, start, end int) (aidm map[int64][]int64, err error)
- func (d *Dao) UppersPassedCacheWithScore(c context.Context, mids []int64, start, end int) (aidm map[int64][]*archive.AidPubTime, err error)
- func (d *Dao) ValidateQn(c context.Context, qn int) (allow bool)
- func (d *Dao) Video3(c context.Context, aid, cid int64) (p *api.Page, err error)
- func (d *Dao) Videos3(c context.Context, aid int64) (ps []*api.Page, err error)
- func (d *Dao) VideosByAids3(c context.Context, aids []int64) (vs map[int64][]*api.Page, err error)
- func (d *Dao) VideosByCids(c context.Context, cids []int64) (vs map[int64]map[int64]*api.Page, err error)
- func (d *Dao) VipQn(c context.Context, qn int) (isVipQn bool)
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) AddRegionArcCache ¶
func (d *Dao) AddRegionArcCache(c context.Context, rid, reid int16, as ...*api.RegionArc) (err error)
AddRegionArcCache add archives into region cache.
func (*Dao) AddUpperCountCache ¶
AddUpperCountCache the count of up's archives
func (*Dao) AddUpperPassedCache ¶
func (d *Dao) AddUpperPassedCache(c context.Context, mid int64, aids []int64, ptimes []time.Time, copyrights []int8) (err error)
AddUpperPassedCache add up paassed cache.
func (*Dao) DelRegionArcCache ¶
DelRegionArcCache delete from zset.
func (*Dao) DelUpperPassedCache ¶
DelUpperPassedCache delete up passed cache.
func (*Dao) DelVideoCache3 ¶
DelVideoCache3 del video2 cache by aid & cid.
func (*Dao) Description ¶
Description get Description from by aid || aid+cid.
func (*Dao) ExpireUpperPassedCache ¶
ExpireUpperPassedCache expire up passed cache.
func (*Dao) ExpireUppersCountCache ¶
func (d *Dao) ExpireUppersCountCache(c context.Context, mids []int64) (cachedUp, missed []int64, err error)
ExpireUppersCountCache expire ups count cache
func (*Dao) ExpireUppersPassedCache ¶
func (d *Dao) ExpireUppersPassedCache(c context.Context, mids []int64) (res map[int64]bool, err error)
ExpireUppersPassedCache expire uppers passed cache.
func (*Dao) InitStatCache3 ¶
InitStatCache3 if db is nil, set nil cache
func (*Dao) PGCPlayerInfos ¶
func (d *Dao) PGCPlayerInfos(c context.Context, aids []int64, platform, ip, session string, fnval, fnver int) (pgcm map[int64]*archive.PlayerInfo, err error)
PGCPlayerInfos cid with pgc player info
func (*Dao) PlayerInfos ¶
func (d *Dao) PlayerInfos(c context.Context, cids []int64, qn int, platform, ip string, fnver, fnval, forceHost int) (pm map[uint32]*archive.BvcVideoItem, err error)
PlayerInfos cid with player info
func (*Dao) RegionAllCountCache ¶
RegionAllCountCache count of all type
func (*Dao) RegionArcs ¶
func (d *Dao) RegionArcs(c context.Context, rid int16, start, length int) (ras []*api.RegionArc, err error)
RegionArcs multi get archvies by rid.
func (*Dao) RegionArcsCache ¶
func (d *Dao) RegionArcsCache(c context.Context, rid int16, start, end int) (aids []int64, err error)
RegionArcsCache region archives.
func (*Dao) RegionCountCache ¶
RegionCountCache count of arcs.
func (*Dao) RegionOriginArcsCache ¶
func (d *Dao) RegionOriginArcsCache(c context.Context, rid int16, start, end int) (aids []int64, err error)
RegionOriginArcsCache region origin archives.
func (*Dao) RegionOriginCountCache ¶
RegionOriginCountCache count of arcs.
func (*Dao) RegionTopArcsCache ¶
func (d *Dao) RegionTopArcsCache(c context.Context, reid int16, start, end int) (aids []int64, err error)
RegionTopArcsCache top region archives.
func (*Dao) RegionTopCountCache ¶
func (d *Dao) RegionTopCountCache(c context.Context, reids []int16, min, max int64) (recm map[int16]int, err error)
RegionTopCountCache top region count of archives.
func (*Dao) ReportResults ¶
ReportResults get all report
func (*Dao) Types ¶
Types get type relation. func (d *Dao) Types(c context.Context) (nm map[int16]string, rids []int16, sf map[int16]int16, err error) {
func (*Dao) UpArchiveCache ¶
UpArchiveCache update archive cache by aid.
func (*Dao) UpperCache ¶
func (d *Dao) UpperCache(c context.Context, mid int64, action string, oldname string, oldface string)
UpperCache is
func (*Dao) UpperCount ¶
UpperCount get the count of archives by mid of Up.
func (*Dao) UpperCountCache ¶
UpperCountCache get up count from cache.
func (*Dao) UpperPassed ¶
func (d *Dao) UpperPassed(c context.Context, mid int64) (aids []int64, ptimes []time.Time, copyrights []int8, err error)
UpperPassed get upper passed archives.
func (*Dao) UpperPassedCache ¶
func (d *Dao) UpperPassedCache(c context.Context, mid int64, start, end int) (aids []int64, err error)
UpperPassedCache get upper passed archives from cache.
func (*Dao) UpperReommend ¶
UpperReommend get up recommend
func (*Dao) UppersCount ¶
UppersCount get mids count
func (*Dao) UppersCountCache ¶
func (d *Dao) UppersCountCache(c context.Context, mids []int64) (cached map[int64]int, missed []int64, err error)
UppersCountCache return uppers count cache
func (*Dao) UppersPassed ¶
func (d *Dao) UppersPassed(c context.Context, mids []int64) (aidm map[int64][]int64, ptimes map[int64][]time.Time, copyrights map[int64][]int8, err error)
UppersPassed get uppers passed archives.
func (*Dao) UppersPassedCache ¶
func (d *Dao) UppersPassedCache(c context.Context, mids []int64, start, end int) (aidm map[int64][]int64, err error)
UppersPassedCache get uppers passed archives from cache.
func (*Dao) UppersPassedCacheWithScore ¶
func (d *Dao) UppersPassedCacheWithScore(c context.Context, mids []int64, start, end int) (aidm map[int64][]*archive.AidPubTime, err error)
UppersPassedCacheWithScore get uppers passed archive from cache with score
func (*Dao) ValidateQn ¶
ValidateQn validate qn
func (*Dao) VideosByAids3 ¶
VideosByAids3 get videos by aids