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: 33 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 init api url

func (*Dao) AddArcCMCache

func (d *Dao) AddArcCMCache(c context.Context, aid int64, st *arcmdl.Commercial) (err error)

AddArcCMCache add stat cache.

func (*Dao) AddCacheStaffData

func (d *Dao) AddCacheStaffData(c context.Context, id int64, val []*arcMdl.Staff) (err error)

AddCacheStaffData 这里也支持自定义注释 会替换默认的注释

func (*Dao) AddCacheViewPoint

func (d *Dao) AddCacheViewPoint(c context.Context, id int64, val *arcMdl.ViewPointRow, cid int64) (err error)

AddCacheViewPoint Set data to mc

func (*Dao) AddNetSafeMd5

func (d *Dao) AddNetSafeMd5(c context.Context, nid int64, md5 string) (err error)

AddNetSafeMd5 fn

func (*Dao) AddPOrderCache

func (d *Dao) AddPOrderCache(c context.Context, aid int64, st *arcmdl.Porder) (err error)

AddPOrderCache add stat cache.

func (*Dao) AllMusics

func (d *Dao) AllMusics(c context.Context) (res map[int64]*music.Music, err error)

AllMusics fn

func (*Dao) ArcCMCache

func (d *Dao) ArcCMCache(c context.Context, aid int64) (st *arcmdl.Commercial, err error)

ArcCMCache get stat cache.

func (*Dao) Archive

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

Archive get archive.

func (*Dao) Archives

func (d *Dao) Archives(c context.Context, aids []int64, ip string) (a map[int64]*api.Arc, err error)

Archives get archive list.

func (*Dao) BIZsByTime

func (d *Dao) BIZsByTime(c context.Context, start, end *time.Time, tp int8) (bizs []*model.BIZ, err error)

BIZsByTime list businesses by time and type

func (*Dao) CacheStaffData

func (d *Dao) CacheStaffData(c context.Context, id int64) (res []*arcMdl.Staff, err error)

CacheStaffData get data from mc

func (*Dao) CacheViewPoint

func (d *Dao) CacheViewPoint(c context.Context, id int64, cid int64) (res *arcMdl.ViewPointRow, err error)

CacheViewPoint get data from mc

func (*Dao) Close

func (d *Dao) Close() (err error)

Close fn

func (*Dao) CountByMID

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

CountByMID .

func (*Dao) Del

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

Del delete archive.

func (*Dao) DelCacheStaffData

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

DelCacheStaffData delete data from mc

func (*Dao) DelSubmitCache

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

DelSubmitCache func

func (*Dao) DescFormat

func (d *Dao) DescFormat(c context.Context) (descs []*archive.DescFormat, err error)

DescFormat get desc format by typeid and copyright

func (*Dao) FavTypes

func (d *Dao) FavTypes(c context.Context, mid int64) (items map[string]int64, err error)

FavTypes fn

func (*Dao) FlowJudge

func (d *Dao) FlowJudge(c context.Context, business, groupID int64, oids []int64) (hitOids []int64, err error)

FlowJudge fn

func (*Dao) Flows

func (d *Dao) Flows(c context.Context) (flows []*archive.Flow, err error)

Flows fn

func (*Dao) HistoryList

func (d *Dao) HistoryList(c context.Context, mid, aid int64, ip string) (historys []*archive.ArcHistory, err error)

HistoryList get the history of aid

func (*Dao) HistoryView

func (d *Dao) HistoryView(c context.Context, mid, hid int64, ip string) (history *archive.ArcHistory, err error)

HistoryView get the history of hid

func (*Dao) NotifyNetSafe

func (d *Dao) NotifyNetSafe(c context.Context, nid int64) (err error)

NotifyNetSafe fn

func (*Dao) POrderCache

func (d *Dao) POrderCache(c context.Context, aid int64) (st *arcmdl.Porder, err error)

POrderCache get stat cache.

func (*Dao) Ping

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

Ping fn

func (*Dao) Porder

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

Porder NOTE: move to up service

func (*Dao) RawStaffData

func (d *Dao) RawStaffData(c context.Context, aid int64) (res []*archive.Staff, err error)

RawStaffData get staff data from db

func (*Dao) RawViewPoint

func (d *Dao) RawViewPoint(c context.Context, aid, cid int64) (vp *archive.ViewPointRow, err error)

RawViewPoint get video highlight viewpoint

func (*Dao) RawViewPoints

func (d *Dao) RawViewPoints(c context.Context, aid, cid int64, count int) (vps []*archive.ViewPointRow, err error)

RawViewPoints 获取多个版本的高能看点

func (*Dao) SimpleArchive

func (d *Dao) SimpleArchive(c context.Context, aid int64, ip string) (sa *archive.SpArchive, err error)

SimpleArchive fn

func (*Dao) SimpleVideos

func (d *Dao) SimpleVideos(c context.Context, aid int64, ip string) (vs []*archive.SpVideo, err error)

SimpleVideos fn

func (*Dao) StaffApplies

func (d *Dao) StaffApplies(c context.Context, staffMid int64, aids []int64) (apply []*archive.StaffApply, err error)

StaffApplies fn

func (*Dao) StaffApplySubmit

func (d *Dao) StaffApplySubmit(c context.Context, id, aid, mid, state, atype int64, flagAddBlack, flagRefuse int) (err error)

StaffApplySubmit fn

func (*Dao) StaffData

func (d *Dao) StaffData(c context.Context, id int64) (res []*arcMdl.Staff, err error)

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

func (*Dao) StaffMidValidate

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

StaffMidValidate fn

func (*Dao) Stats

func (d *Dao) Stats(c context.Context, aids []int64, ip string) (a map[int64]*api.Stat, err error)

Stats get archives stat.

func (*Dao) UpArchives

func (d *Dao) UpArchives(c context.Context, mid, pn, ps, group int64, ip string) (aids []int64, count int64, err error)

UpArchives get archives by mid.

func (*Dao) UpCount

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

UpCount get archives count.

func (*Dao) Video

func (d *Dao) Video(c context.Context, aid, cid int64, ip string) (v *api.Page, err error)

Video get video.

func (*Dao) VideoByCid

func (d *Dao) VideoByCid(c context.Context, cid int64, ip string) (v *archive.Video, err error)

VideoByCid get videos by cids.

func (*Dao) VideoJam

func (d *Dao) VideoJam(c context.Context, ip string) (level int8, err error)

VideoJam get video-check traffic jam level

func (*Dao) View

func (d *Dao) View(c context.Context, mid, aid int64, ip string, needPOI, needVote int) (av *archive.ArcVideo, err error)

View get archive

func (*Dao) ViewPoint

func (d *Dao) ViewPoint(c context.Context, id int64, cid int64) (res *arcMdl.ViewPointRow, err error)

ViewPoint cache: -singleflight=true -nullcache=[]*arcMdl.Staff{{ID:-1}} -check_null_code=len($)==1&&$[0].ID==-1

func (*Dao) Views

func (d *Dao) Views(c context.Context, mid int64, aids []int64, ip string) (avm map[int64]*archive.ArcVideo, err error)

Views get archives

Jump to

Keyboard shortcuts

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