archive

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: 26 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 is archive dao.

func New

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

New new a Dao and return.

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

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

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

func (d *Dao) Addit(c context.Context, aid int64) (addit *archive.Addit, err error)

Addit get archive addit.

func (*Dao) Archive3

func (d *Dao) Archive3(c context.Context, aid int64) (a *api.Arc, err error)

Archive3 get archive by aid.

func (*Dao) Archives3

func (d *Dao) Archives3(c context.Context, aids []int64) (am map[int64]*api.Arc, err error)

Archives3 get archives by aids.

func (*Dao) Click3

func (d *Dao) Click3(c context.Context, aid int64) (clk *api.Click, err error)

Click3 get archive click.

func (*Dao) Close

func (d *Dao) Close()

Close close resource.

func (*Dao) DelRegionArcCache

func (d *Dao) DelRegionArcCache(c context.Context, rid, reid int16, aid int64) (err error)

DelRegionArcCache delete from zset.

func (*Dao) DelUpperPassedCache

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

DelUpperPassedCache delete up passed cache.

func (*Dao) DelVideoCache3

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

DelVideoCache3 del video2 cache by aid & cid.

func (*Dao) Description

func (d *Dao) Description(c context.Context, aid int64) (desc string, err error)

Description get Description from by aid || aid+cid.

func (*Dao) ExpireUpperPassedCache

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

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

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

InitStatCache3 if db is nil, set nil cache

func (*Dao) MaxAID

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

MaxAID get max aid

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

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

Ping ping success.

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

func (d *Dao) RegionAllCountCache(c context.Context) (count int, err error)

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

func (d *Dao) RegionCountCache(c context.Context, rid int16) (count int, err error)

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

func (d *Dao) RegionOriginCountCache(c context.Context, rid int16) (count int, err error)

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

func (d *Dao) ReportResults(c context.Context) (res map[int64]*arcmdl.ReportResult, err error)

ReportResults get all report

func (*Dao) SetStat3

func (d *Dao) SetStat3(c context.Context, st *api.Stat) (err error)

SetStat3 set all stat

func (*Dao) Stat3

func (d *Dao) Stat3(c context.Context, aid int64) (st *api.Stat, err error)

Stat3 get archive stat.

func (*Dao) Stats3

func (d *Dao) Stats3(c context.Context, aids []int64) (stm map[int64]*api.Stat, err error)

Stats3 get archives stat.

func (*Dao) Types

func (d *Dao) Types(c context.Context) (types map[int16]*archive.ArcType, err error)

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

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

UpArchiveCache update archive cache by aid.

func (*Dao) UpVideo3

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

UpVideo3 update video by aid & cid.

func (*Dao) UpperCache

func (d *Dao) UpperCache(c context.Context, mid int64, action string, oldname string, oldface string)

UpperCache is

func (*Dao) UpperCount

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

UpperCount get the count of archives by mid of Up.

func (*Dao) UpperCountCache

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

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

func (d *Dao) UpperReommend(c context.Context, aid int64) (reAids []int64, err error)

UpperReommend get up recommend

func (*Dao) UppersCount

func (d *Dao) UppersCount(c context.Context, mids []int64) (uc map[int64]int, err error)

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

func (d *Dao) ValidateQn(c context.Context, qn int) (allow bool)

ValidateQn validate qn

func (*Dao) Video3

func (d *Dao) Video3(c context.Context, aid, cid int64) (p *api.Page, err error)

Video3 get video by aid & cid.

func (*Dao) Videos3

func (d *Dao) Videos3(c context.Context, aid int64) (ps []*api.Page, err error)

Videos3 get archive videos by aid.

func (*Dao) VideosByAids3

func (d *Dao) VideosByAids3(c context.Context, aids []int64) (vs map[int64][]*api.Page, err error)

VideosByAids3 get videos by aids

func (*Dao) VideosByCids

func (d *Dao) VideosByCids(c context.Context, cids []int64) (vs map[int64]map[int64]*api.Page, err error)

VideosByCids get videos by cids.

func (*Dao) VipQn

func (d *Dao) VipQn(c context.Context, qn int) (isVipQn bool)

VipQn vip qn

Jump to

Keyboard shortcuts

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