Documentation
¶
Index ¶
- type Dao
- func (d *Dao) AICover(c context.Context, filename string) (covers []string, err error)
- func (d *Dao) AddDBus(c context.Context, group, topic string, partition int32, offset int64) (rows int64, err error)
- func (d *Dao) AddFirstPass(tx *sql.Tx, aid int64) (err error)
- func (d *Dao) AddRdsCovers(c context.Context, covers []*archive.Cover) (ok bool, err error)
- func (d *Dao) AddVideoShot(c context.Context, cid int64, count int) (rows int64, err error)
- func (d *Dao) Addit(c context.Context, aid int64) (addit *archive.Addit, err error)
- func (d *Dao) Archive(c context.Context, aid int64) (a *archive.Archive, err error)
- func (d *Dao) ArchiveOper(c context.Context, aid int64, typeID int16, state int8, round int8, attr int32, ...) (rows int64, err error)
- func (d *Dao) AuditTypesConf(c context.Context) (atps map[int16]struct{}, err error)
- func (d *Dao) BeginTran(c context.Context) (tx *xsql.Tx, err error)
- func (d *Dao) Close()
- func (d *Dao) DBus(c context.Context, group, topic string, partition int32) (dbus *archive.Databus, err error)
- func (d *Dao) DelAdminDelay(c context.Context, aid int64) (rows int64, err error)
- func (d *Dao) DelArcEditHistoryBefore(c context.Context, t time.Time, limit int64) (rows int64, err error)
- func (d *Dao) DelArcVideoEditHistoryBefore(c context.Context, t time.Time, limit int64) (rows int64, err error)
- func (d *Dao) DelDelayByIds(c context.Context, ids []int64) (rows int64, err error)
- func (d *Dao) Delay(c context.Context, aid int64) (delay *archive.Delay, err error)
- func (d *Dao) FansConf(c context.Context) (fans int64, err error)
- func (d *Dao) FirstPassCount(c context.Context, aids []int64) (count int, err error)
- func (d *Dao) Forbid(c context.Context, aid int64) (af *archive.ForbidAttr, err error)
- func (d *Dao) GetFirstPassByAID(c context.Context, aid int64) (id int64, err error)
- func (d *Dao) HistoryCount(c context.Context, aid int64) (count int, err error)
- func (d *Dao) NewSumDuration(c context.Context, aid int64) (sumDura int64, err error)
- func (d *Dao) NewVideo(c context.Context, filename string) (v *archive.Video, err error)
- func (d *Dao) NewVideoByAid(c context.Context, filename string, aid int64) (v *archive.Video, err error)
- func (d *Dao) NewVideoCount(c context.Context, aid int64) (count int, err error)
- func (d *Dao) NewVideoCountCapable(c context.Context, cid int64) (count int, err error)
- func (d *Dao) NewVideos(c context.Context, aid int64) (vs []*archive.Video, err error)
- func (d *Dao) NowDelays(c context.Context, dtime time.Time) (delays []*archive.Delay, err error)
- func (d *Dao) POI(c context.Context, aid int64) (data []byte, err error)
- func (d *Dao) PassedOper(c context.Context, aid int64) (id int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) Reason(c context.Context, vid int64) (reason string, err error)
- func (d *Dao) RoundEndConf(c context.Context) (days int64, err error)
- func (d *Dao) RoundTypeConf(c context.Context) (roundTypes map[int16]struct{}, err error)
- func (d *Dao) Staffs(c context.Context, AID int64) (fs []*archive.Staff, err error)
- func (d *Dao) Stat(c context.Context, aid int64) (click int, err error)
- func (d *Dao) SumDuration(c context.Context, aid int64) (sumDura int64, err error)
- func (d *Dao) ThresholdConf(c context.Context) (tpThr map[int16]int, err error)
- func (d *Dao) TranVideoOper(c context.Context, tx *sql.Tx, aid, vid int64, status int16, attr int32) (rows int64, err error)
- func (d *Dao) TxAddAudit(tx *xsql.Tx, vid, aid int64, reason string) (rows int64, err error)
- func (d *Dao) TxArchiveOper(tx *sql.Tx, aid int64, typeID int16, state int8, round int8, attr int32, ...) (rows int64, err error)
- func (d *Dao) TxUpAccess(tx *xsql.Tx, aid int64, access int16) (rows int64, err error)
- func (d *Dao) TxUpArcDuration(tx *xsql.Tx, aid, duration int64) (rows int64, err error)
- func (d *Dao) TxUpAttr(tx *xsql.Tx, aid int64, attr archive.Attr) (rows int64, err error)
- func (d *Dao) TxUpAttrBit(tx *xsql.Tx, aid int64, v int32, bit uint) (rows int64, err error)
- func (d *Dao) TxUpCover(tx *xsql.Tx, aid int64, cover string) (rows int64, err error)
- func (d *Dao) TxUpFailCode(tx *xsql.Tx, filename string, fileCode int8) (rows int64, err error)
- func (d *Dao) TxUpFilesize(tx *xsql.Tx, filename string, filesize int64) (rows int64, err error)
- func (d *Dao) TxUpForbid(tx *sql.Tx, af *archive.ForbidAttr) (rows int64, err error)
- func (d *Dao) TxUpPTime(tx *xsql.Tx, aid int64, ptime time.Time) (rows int64, err error)
- func (d *Dao) TxUpPlayurl(tx *xsql.Tx, filename, playurl string) (rows int64, err error)
- func (d *Dao) TxUpRelationStatus(tx *xsql.Tx, cid int64, status int8) (rows int64, err error)
- func (d *Dao) TxUpResolutions(tx *xsql.Tx, filename, resolutions string) (rows int64, err error)
- func (d *Dao) TxUpRound(tx *xsql.Tx, aid int64, round int8) (rows int64, err error)
- func (d *Dao) TxUpState(tx *xsql.Tx, aid int64, state int8) (rows int64, err error)
- func (d *Dao) TxUpStatus(tx *xsql.Tx, filename string, status int16) (rows int64, err error)
- func (d *Dao) TxUpVDuration(tx *xsql.Tx, filename string, duration int64) (rows int64, err error)
- func (d *Dao) TxUpVideoDuration(tx *xsql.Tx, filename string, duration int64) (rows int64, err error)
- func (d *Dao) TxUpVideoFailCode(tx *xsql.Tx, filename string, fileCode int8) (rows int64, err error)
- func (d *Dao) TxUpVideoFilesize(tx *xsql.Tx, filename string, filesize int64) (rows int64, err error)
- func (d *Dao) TxUpVideoPlayurl(tx *xsql.Tx, filename, playurl string) (rows int64, err error)
- func (d *Dao) TxUpVideoResolutionsAndDimensions(tx *xsql.Tx, filename, resolutions, dimensions string) (rows int64, err error)
- func (d *Dao) TxUpVideoStatus(tx *xsql.Tx, filename string, status int16) (rows int64, err error)
- func (d *Dao) TxUpVideoXState(tx *xsql.Tx, filename string, xState int8) (rows int64, err error)
- func (d *Dao) TxUpXcodeState(tx *xsql.Tx, filename string, xState int8) (rows int64, err error)
- func (d *Dao) TypeMapping(c context.Context) (rmap map[int16]int16, err error)
- func (d *Dao) TypeNaming(c context.Context) (nmap map[int16]string, err error)
- func (d *Dao) UpCover(c context.Context, aid int64, cover string) (rows int64, err error)
- func (d *Dao) UpDBus(c context.Context, group, topic string, partition int32, offset int64) (rows int64, err error)
- func (d *Dao) UpDelayRound(c context.Context, minTime, maxTime time.Time) (rows int64, err error)
- func (d *Dao) UpperArcStateMap(c context.Context, mid int64) (sMap map[int64]int8, err error)
- func (d *Dao) ValidAidByCid(c context.Context, cid int64) (aids []int64, err error)
- func (d *Dao) VdoWithArcCntCapable(c context.Context, cid int64) (count int, err error)
- func (d *Dao) Video(c context.Context, filename string) (v *archive.Video, err error)
- func (d *Dao) VideoByAid(c context.Context, filename string, aid int64) (v *archive.Video, err error)
- func (d *Dao) VideoCount(c context.Context, aid int64) (count int, err error)
- func (d *Dao) VideoCountCapable(c context.Context, cid int64) (count int, err error)
- func (d *Dao) Videos(c context.Context, aid int64) (vs []*archive.Video, err error)
- func (d *Dao) Vote(c context.Context, aid int64) (data []byte, err error)
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 (*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 ¶
AddFirstPass 添加一条 第一次过审的记录
func (*Dao) AddRdsCovers ¶
AddRdsCovers fn.
func (*Dao) AddVideoShot ¶
AddVideoShot add a videoshot into mysql.
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 ¶
AuditTypesConf wait_audit_arctype 状态正常的配置
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 ¶
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 ¶
DelDelayByIds delete delays by ids
func (*Dao) FirstPassCount ¶
FirstPassCount 根据aid获取第一次过审的数量
func (*Dao) GetFirstPassByAID ¶
GetFirstPassByAID 根据aid获取第一次过审的记录
func (*Dao) HistoryCount ¶
HistoryCount get a archive history count.
func (*Dao) NewSumDuration ¶
NewSumDuration get all video duration by aid.
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 ¶
NewVideoCount get all video duration by aid.
func (*Dao) NewVideoCountCapable ¶
NewVideoCountCapable get all video duration by aid.
func (*Dao) PassedOper ¶
PassedOper check archive passed
func (*Dao) RoundEndConf ¶
RoundEndConf round_delay_time 正常状态的配置
func (*Dao) RoundTypeConf ¶
RoundTypeConf round_limit_tids 正常状态的配置
func (*Dao) SumDuration ¶
SumDuration get all video duration by aid. NOTE Deprecated
func (*Dao) ThresholdConf ¶
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 ¶
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 ¶
TxUpAccess update access of a archive by id.
func (*Dao) TxUpArcDuration ¶
TxUpArcDuration update duration of a archive by id.
func (*Dao) TxUpAttrBit ¶
TxUpAttrBit update attribute bit value of a archive by id.
func (*Dao) TxUpFailCode ¶
TxUpFailCode update video fail info.
func (*Dao) TxUpFilesize ¶
TxUpFilesize update video filesize.
func (*Dao) TxUpForbid ¶
TxUpForbid insert archive_oper.
func (*Dao) TxUpPlayurl ¶
TxUpPlayurl update video playurl and duration.
func (*Dao) TxUpRelationStatus ¶
TxUpRelationStatus update video status.
func (*Dao) TxUpResolutions ¶
TxUpResolutions update video resolutions.
func (*Dao) TxUpStatus ¶
TxUpStatus update video status.
func (*Dao) TxUpVDuration ¶
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 ¶
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 ¶
TxUpVideoStatus update video status.
func (*Dao) TxUpVideoXState ¶
TxUpVideoXState update video xcodestate.
func (*Dao) TxUpXcodeState ¶
TxUpXcodeState update video state.
func (*Dao) TypeMapping ¶
TypeMapping is second types opposite first types.
func (*Dao) TypeNaming ¶
TypeNaming is all type name
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 ¶
UpDelayRound update round to the end by conf
func (*Dao) UpperArcStateMap ¶
UpperArcStateMap 获取UP主的稿件状态
func (*Dao) ValidAidByCid ¶
ValidAidByCid get all video duration by aid.
func (*Dao) VdoWithArcCntCapable ¶
VdoWithArcCntCapable get all video duration by aid. 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 ¶
VideoCount get all video duration by aid. NOTE Deprecated
func (*Dao) VideoCountCapable ¶
VideoCountCapable get all video duration by aid. NOTE Deprecated