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: 17 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 redis dao.

func New

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

New new a archive dao.

func (*Dao) AICover

func (d *Dao) AICover(c context.Context, filename string) (covers []string, err error)

AICover get covers from ai

func (*Dao) AddDBus

func (d *Dao) AddDBus(c context.Context, group, topic string, partition int32, offset int64) (rows int64, err error)

AddDBus add databus

func (*Dao) AddFirstPass

func (d *Dao) AddFirstPass(tx *sql.Tx, aid int64) (err error)

AddFirstPass 添加一条 第一次过审的记录

func (*Dao) AddRdsCovers

func (d *Dao) AddRdsCovers(c context.Context, covers []*archive.Cover) (ok bool, err error)

AddRdsCovers fn.

func (*Dao) AddVideoShot

func (d *Dao) AddVideoShot(c context.Context, cid int64, count int) (rows int64, err error)

AddVideoShot add a videoshot into mysql.

func (*Dao) Addit

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

Addit get archive addit.

func (*Dao) Archive

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

Archive get a archive by avid.

func (*Dao) ArchiveOper

func (d *Dao) ArchiveOper(c context.Context, aid int64, typeID int16, state int8, round int8, attr int32, lastID int64, content string) (rows int64, err error)

ArchiveOper add archive oper log

func (*Dao) AuditTypesConf

func (d *Dao) AuditTypesConf(c context.Context) (atps map[int16]struct{}, err error)

AuditTypesConf wait_audit_arctype 状态正常的配置

func (*Dao) BeginTran

func (d *Dao) BeginTran(c context.Context) (tx *xsql.Tx, err error)

BeginTran begin transcation.

func (*Dao) Close

func (d *Dao) Close()

Close fn

func (*Dao) DBus

func (d *Dao) DBus(c context.Context, group, topic string, partition int32) (dbus *archive.Databus, err error)

DBus get DBus by group+topic+partition

func (*Dao) DelAdminDelay

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

DelAdminDelay delete admin delay by aid

func (*Dao) DelArcEditHistoryBefore

func (d *Dao) DelArcEditHistoryBefore(c context.Context, t time.Time, limit int64) (rows int64, err error)

DelArcEditHistoryBefore delete archive_edit_history before t.

func (*Dao) DelArcVideoEditHistoryBefore

func (d *Dao) DelArcVideoEditHistoryBefore(c context.Context, t time.Time, limit int64) (rows int64, err error)

DelArcVideoEditHistoryBefore delete archive_video_edit_history before t.

func (*Dao) DelDelayByIds

func (d *Dao) DelDelayByIds(c context.Context, ids []int64) (rows int64, err error)

DelDelayByIds delete delays by ids

func (*Dao) Delay

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

Delay get delay by aid

func (*Dao) FansConf

func (d *Dao) FansConf(c context.Context) (fans int64, err error)

FansConf round_limit_fans正常状态的配置

func (*Dao) FirstPassCount

func (d *Dao) FirstPassCount(c context.Context, aids []int64) (count int, err error)

FirstPassCount 根据aid获取第一次过审的数量

func (*Dao) Forbid

func (d *Dao) Forbid(c context.Context, aid int64) (af *archive.ForbidAttr, err error)

Forbid get a archive forbid.

func (*Dao) GetFirstPassByAID

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

GetFirstPassByAID 根据aid获取第一次过审的记录

func (*Dao) HistoryCount

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

HistoryCount get a archive history count.

func (*Dao) NewSumDuration

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

NewSumDuration get all video duration by aid.

func (*Dao) NewVideo

func (d *Dao) NewVideo(c context.Context, filename string) (v *archive.Video, err error)

NewVideo get video info by filename.

func (*Dao) NewVideoByAid

func (d *Dao) NewVideoByAid(c context.Context, filename string, aid int64) (v *archive.Video, err error)

NewVideoByAid get video info by filename. and aid

func (*Dao) NewVideoCount

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

NewVideoCount get all video duration by aid.

func (*Dao) NewVideoCountCapable

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

NewVideoCountCapable get all video duration by aid.

func (*Dao) NewVideos

func (d *Dao) NewVideos(c context.Context, aid int64) (vs []*archive.Video, err error)

NewVideos get videos info by aid.

func (*Dao) NowDelays

func (d *Dao) NowDelays(c context.Context, dtime time.Time) (delays []*archive.Delay, err error)

NowDelays get current minute dalay archive

func (*Dao) POI

func (d *Dao) POI(c context.Context, aid int64) (data []byte, err error)

POI get a archive POI by avid.

func (*Dao) PassedOper

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

PassedOper check archive passed

func (*Dao) Ping

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

Ping hbase

func (*Dao) Reason

func (d *Dao) Reason(c context.Context, vid int64) (reason string, err error)

Reason get a archive video reject reason by vid.

func (*Dao) RoundEndConf

func (d *Dao) RoundEndConf(c context.Context) (days int64, err error)

RoundEndConf round_delay_time 正常状态的配置

func (*Dao) RoundTypeConf

func (d *Dao) RoundTypeConf(c context.Context) (roundTypes map[int16]struct{}, err error)

RoundTypeConf round_limit_tids 正常状态的配置

func (*Dao) Staffs

func (d *Dao) Staffs(c context.Context, AID int64) (fs []*archive.Staff, err error)

Staffs get .

func (*Dao) Stat

func (d *Dao) Stat(c context.Context, aid int64) (click int, err error)

Stat get archive stat.

func (*Dao) SumDuration

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

SumDuration get all video duration by aid. NOTE Deprecated

func (*Dao) ThresholdConf

func (d *Dao) ThresholdConf(c context.Context) (tpThr map[int16]int, err error)

ThresholdConf ThresholdConf is second types opposite first types.

func (*Dao) TranVideoOper

func (d *Dao) TranVideoOper(c context.Context, tx *sql.Tx, aid, vid int64, status int16, attr int32) (rows int64, err error)

TranVideoOper insert a record

func (*Dao) TxAddAudit

func (d *Dao) TxAddAudit(tx *xsql.Tx, vid, aid int64, reason string) (rows int64, err error)

TxAddAudit add video audit by vid.

func (*Dao) TxArchiveOper

func (d *Dao) TxArchiveOper(tx *sql.Tx, aid int64, typeID int16, state int8, round int8, attr int32, lastID int64, content string) (rows int64, err error)

TxArchiveOper add archive oper log

func (*Dao) TxUpAccess

func (d *Dao) TxUpAccess(tx *xsql.Tx, aid int64, access int16) (rows int64, err error)

TxUpAccess update access of a archive by id.

func (*Dao) TxUpArcDuration

func (d *Dao) TxUpArcDuration(tx *xsql.Tx, aid, duration int64) (rows int64, err error)

TxUpArcDuration update duration of a archive by id.

func (*Dao) TxUpAttr

func (d *Dao) TxUpAttr(tx *xsql.Tx, aid int64, attr archive.Attr) (rows int64, err error)

TxUpAttr update attribute value of a archive by id.

func (*Dao) TxUpAttrBit

func (d *Dao) TxUpAttrBit(tx *xsql.Tx, aid int64, v int32, bit uint) (rows int64, err error)

TxUpAttrBit update attribute bit value of a archive by id.

func (*Dao) TxUpCover

func (d *Dao) TxUpCover(tx *xsql.Tx, aid int64, cover string) (rows int64, err error)

TxUpCover update cover of a archive by id.

func (*Dao) TxUpFailCode

func (d *Dao) TxUpFailCode(tx *xsql.Tx, filename string, fileCode int8) (rows int64, err error)

TxUpFailCode update video fail info.

func (*Dao) TxUpFilesize

func (d *Dao) TxUpFilesize(tx *xsql.Tx, filename string, filesize int64) (rows int64, err error)

TxUpFilesize update video filesize.

func (*Dao) TxUpForbid

func (d *Dao) TxUpForbid(tx *sql.Tx, af *archive.ForbidAttr) (rows int64, err error)

TxUpForbid insert archive_oper.

func (*Dao) TxUpPTime

func (d *Dao) TxUpPTime(tx *xsql.Tx, aid int64, ptime time.Time) (rows int64, err error)

TxUpPTime update ptime by aid

func (*Dao) TxUpPlayurl

func (d *Dao) TxUpPlayurl(tx *xsql.Tx, filename, playurl string) (rows int64, err error)

TxUpPlayurl update video playurl and duration.

func (*Dao) TxUpRelationStatus

func (d *Dao) TxUpRelationStatus(tx *xsql.Tx, cid int64, status int8) (rows int64, err error)

TxUpRelationStatus update video status.

func (*Dao) TxUpResolutions

func (d *Dao) TxUpResolutions(tx *xsql.Tx, filename, resolutions string) (rows int64, err error)

TxUpResolutions update video resolutions.

func (*Dao) TxUpRound

func (d *Dao) TxUpRound(tx *xsql.Tx, aid int64, round int8) (rows int64, err error)

TxUpRound update round of a archive by id.

func (*Dao) TxUpState

func (d *Dao) TxUpState(tx *xsql.Tx, aid int64, state int8) (rows int64, err error)

TxUpState update state of a archive by id.

func (*Dao) TxUpStatus

func (d *Dao) TxUpStatus(tx *xsql.Tx, filename string, status int16) (rows int64, err error)

TxUpStatus update video status.

func (*Dao) TxUpVDuration

func (d *Dao) TxUpVDuration(tx *xsql.Tx, filename string, duration int64) (rows int64, err error)

TxUpVDuration update video playurl and duration.

func (*Dao) TxUpVideoDuration

func (d *Dao) TxUpVideoDuration(tx *xsql.Tx, filename string, duration int64) (rows int64, err error)

TxUpVideoDuration update video playurl and duration.

func (*Dao) TxUpVideoFailCode

func (d *Dao) TxUpVideoFailCode(tx *xsql.Tx, filename string, fileCode int8) (rows int64, err error)

TxUpVideoFailCode update video fail info.

func (*Dao) TxUpVideoFilesize

func (d *Dao) TxUpVideoFilesize(tx *xsql.Tx, filename string, filesize int64) (rows int64, err error)

TxUpVideoFilesize update video filesize.

func (*Dao) TxUpVideoPlayurl

func (d *Dao) TxUpVideoPlayurl(tx *xsql.Tx, filename, playurl string) (rows int64, err error)

TxUpVideoPlayurl update video playurl and duration.

func (*Dao) TxUpVideoResolutionsAndDimensions

func (d *Dao) TxUpVideoResolutionsAndDimensions(tx *xsql.Tx, filename, resolutions, dimensions string) (rows int64, err error)

TxUpVideoResolutionsAndDimensions update video resolutions and dimensions.

func (*Dao) TxUpVideoStatus

func (d *Dao) TxUpVideoStatus(tx *xsql.Tx, filename string, status int16) (rows int64, err error)

TxUpVideoStatus update video status.

func (*Dao) TxUpVideoXState

func (d *Dao) TxUpVideoXState(tx *xsql.Tx, filename string, xState int8) (rows int64, err error)

TxUpVideoXState update video xcodestate.

func (*Dao) TxUpXcodeState

func (d *Dao) TxUpXcodeState(tx *xsql.Tx, filename string, xState int8) (rows int64, err error)

TxUpXcodeState update video state.

func (*Dao) TypeMapping

func (d *Dao) TypeMapping(c context.Context) (rmap map[int16]int16, err error)

TypeMapping is second types opposite first types.

func (*Dao) TypeNaming

func (d *Dao) TypeNaming(c context.Context) (nmap map[int16]string, err error)

TypeNaming is all type name

func (*Dao) UpCover

func (d *Dao) UpCover(c context.Context, aid int64, cover string) (rows int64, err error)

UpCover update cover of a archive by id.

func (*Dao) UpDBus

func (d *Dao) UpDBus(c context.Context, group, topic string, partition int32, offset int64) (rows int64, err error)

UpDBus update databus offset

func (*Dao) UpDelayRound

func (d *Dao) UpDelayRound(c context.Context, minTime, maxTime time.Time) (rows int64, err error)

UpDelayRound update round to the end by conf

func (*Dao) UpperArcStateMap

func (d *Dao) UpperArcStateMap(c context.Context, mid int64) (sMap map[int64]int8, err error)

UpperArcStateMap 获取UP主的稿件状态

func (*Dao) ValidAidByCid

func (d *Dao) ValidAidByCid(c context.Context, cid int64) (aids []int64, err error)

ValidAidByCid get all video duration by aid.

func (*Dao) VdoWithArcCntCapable

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

VdoWithArcCntCapable get all video duration by aid. NOTE Deprecated

func (*Dao) Video

func (d *Dao) Video(c context.Context, filename string) (v *archive.Video, err error)

Video get video info by filename. NOTE Deprecated

func (*Dao) VideoByAid

func (d *Dao) VideoByAid(c context.Context, filename string, aid int64) (v *archive.Video, err error)

VideoByAid get video info by filename. and aid. NOTE Deprecated

func (*Dao) VideoCount

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

VideoCount get all video duration by aid. NOTE Deprecated

func (*Dao) VideoCountCapable

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

VideoCountCapable get all video duration by aid. NOTE Deprecated

func (*Dao) Videos

func (d *Dao) Videos(c context.Context, aid int64) (vs []*archive.Video, err error)

Videos get videos info by aid. NOTE Deprecated

func (*Dao) Vote

func (d *Dao) Vote(c context.Context, aid int64) (data []byte, err error)

Vote get a archive Vote by avid.

Jump to

Keyboard shortcuts

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