Documentation ¶
Index ¶
- type Dao
- func (d *Dao) ActVideos(c context.Context, aid int64) (has bool, err error)
- func (d *Dao) ArcVideoCnt(c context.Context, aid int64) (count int, err error)
- func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)
- func (d *Dao) Close()
- func (d *Dao) CountUpArcs(c context.Context, mid int64) (count int64, err error)
- func (d *Dao) DelVideoArc(ctx context.Context, req *ugc.DelVideos) (arcValid bool, err error)
- func (d *Dao) DelVideos(ctx context.Context, aid int64) (err error)
- func (d *Dao) DeletedArc(c context.Context) (aid int64, err error)
- func (d *Dao) DeletedUp(c context.Context) (mid int64, err error)
- func (d *Dao) DeletedVideos(c context.Context) (delIds []int, err error)
- func (d *Dao) FilterExist(c context.Context, res *map[int64]*api.Arc, aids []int64) (err error)
- func (d *Dao) FinishArc(c context.Context, aid int64) (err error)
- func (d *Dao) FinishDelArc(c context.Context, aid int64) (err error)
- func (d *Dao) FinishDelUp(c context.Context, mid int64) (err error)
- func (d *Dao) FinishDelVideos(c context.Context, delIds []int) (err error)
- func (d *Dao) FinishReport(c context.Context, cids []int64) (err error)
- func (d *Dao) FinishUpper(c context.Context, mid int64) (err error)
- func (d *Dao) FinishVideos(c context.Context, videos []*ugcmdl.SimpleVideo, aid int64) (err error)
- func (d *Dao) Import(c context.Context) (res []*ugcmdl.Upper, err error)
- func (d *Dao) Manual(c context.Context) (res []*ugcmdl.Archive, err error)
- func (d *Dao) ParseArc(c context.Context, aid int64) (res *ugcmdl.Archive, err error)
- func (d *Dao) ParseVideos(c context.Context, aid int64, ps int) (res [][]*ugcmdl.SimpleVideo, err error)
- func (d *Dao) PassedArcs(c context.Context, tids []int64) (res []*common.IdxRank, err error)
- func (d *Dao) PickArcVideo(ctx context.Context, aid int64, LastID int, nbData int) (res []*ugcmdl.VideoCMS, myLast int, err error)
- func (d *Dao) PickUpArcs(ctx context.Context, mid, nbPiece, nbData int) (res []*ugcmdl.ArcFull, err error)
- func (d *Dao) PickVideos(c context.Context, aid int64) (res map[int64]*ugcmdl.SimpleVideo, err error)
- func (d *Dao) PpDelArc(c context.Context, aid int64) (err error)
- func (d *Dao) PpDelUp(c context.Context, mid int64) (err error)
- func (d *Dao) PpDelVideos(c context.Context, delIds []int) (err error)
- func (d *Dao) PpUpper(c context.Context, mid int64) (err error)
- func (d *Dao) PpVideos(c context.Context, cids []int64) (err error)
- func (d *Dao) Ppmnl(c context.Context, aid int64) (err error)
- func (d *Dao) RepCidBatch(c context.Context, cidReq []*ugcmdl.CidReq) (err error)
- func (d *Dao) SetArcCMS(ctx context.Context, res *ugcmdl.ArcCMS) (err error)
- func (d *Dao) SetVideoCMS(ctx context.Context, res *ugcmdl.VideoCMS) (err error)
- func (d *Dao) ShouldAudit(c context.Context, aid int64) (res bool, err error)
- func (d *Dao) TotalVideos(c context.Context) (count int, err error)
- func (d *Dao) TransFailVideos(ctx context.Context, aid int64) (cids []int64, err error)
- func (d *Dao) TxAddVideos(tx *sql.Tx, pages []*arccli.Page, aid int64) (err error)
- func (d *Dao) TxAutoArc(tx *sql.Tx, arc *ugcmdl.Archive) (err error)
- func (d *Dao) TxDelArc(tx *sql.Tx, aid int64) (err error)
- func (d *Dao) TxDelVideo(tx *sql.Tx, cid int64) (err error)
- func (d *Dao) TxDelVideos(tx *sql.Tx, aid int64) (err error)
- func (d *Dao) TxImportArc(tx *sql.Tx, arc *api.Arc) (err error)
- func (d *Dao) TxMnlArc(tx *sql.Tx, arc *ugcmdl.Archive) (err error)
- func (d *Dao) TxMnlStatus(tx *sql.Tx, aid int64) (err error)
- func (d *Dao) TxMnlVideos(tx *sql.Tx, view *arccli.ViewReply) (err error)
- func (d *Dao) TxUpAdd(tx *sql.Tx, mid int64) (err error)
- func (d *Dao) TxUpdateVideo(tx *sql.Tx, video *arccli.Page) (err error)
- func (d *Dao) UgcCnt(ctx context.Context) (upCnt int, err error)
- func (d *Dao) UgcCont(ctx context.Context, aid int, limit int) (res []*model.SearUgcCon, maxID int, err error)
- func (d *Dao) UpArcs(c context.Context, mid int64) (aids []int64, err error)
- func (d *Dao) UpArcsCnt(c context.Context, mid int64) (count int, err error)
- func (d *Dao) UpInList(c context.Context, mid int64) (realID int64, err error)
- func (d *Dao) UpdateArc(c context.Context, arc *ugcmdl.ArchDatabus) (err error)
- func (d *Dao) VideoSubmit(c context.Context, aid int64) (cid int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
Dao dao.
func (*Dao) ArcVideoCnt ¶
ArcVideoCnt counts one archive's video
func (*Dao) CountUpArcs ¶
CountUpArcs counts the upper's archives
func (*Dao) DelVideoArc ¶
DelVideoArc deletes some videos of an archive, if the archive is empty, also delete it
func (*Dao) DeletedArc ¶
DeletedArc picks the deleted archive to sync
func (*Dao) DeletedVideos ¶
DeletedVideos picks the deleted videos to sync
func (*Dao) FilterExist ¶
FilterExist filters the existing archives and remove them from the res, to have only non-existing data to insert
func (*Dao) FinishDelArc ¶
FinishDelArc updates the submit status from 1 to 0
func (*Dao) FinishDelUp ¶
FinishDelUp updates the submit toinit from 2 to 0
func (*Dao) FinishDelVideos ¶
FinishDelVideos updates the submit status from 1 to 0
func (*Dao) FinishReport ¶
FinishReport change's the ugc_video's state from 0 to 1, means it has already been reported
func (*Dao) FinishUpper ¶
FinishUpper updates the upper's to_init status to 0 means we finish the import operation
func (*Dao) FinishVideos ¶
FinishVideos updates the submit status from 1 to 0
func (*Dao) ParseVideos ¶
func (d *Dao) ParseVideos(c context.Context, aid int64, ps int) (res [][]*ugcmdl.SimpleVideo, err error)
ParseVideos picks 20 videos of one qualified archive
func (*Dao) PassedArcs ¶
PassedArcs picks the passed Arc data for Idx Page
func (*Dao) PickArcVideo ¶
func (d *Dao) PickArcVideo(ctx context.Context, aid int64, LastID int, nbData int) (res []*ugcmdl.VideoCMS, myLast int, err error)
PickArcVideo picks data by Piece to sync in MC
func (*Dao) PickUpArcs ¶
func (d *Dao) PickUpArcs(ctx context.Context, mid, nbPiece, nbData int) (res []*ugcmdl.ArcFull, err error)
PickUpArcs picks data by Piece to sync in MC, attention: nbPiece begins from zero
func (*Dao) PickVideos ¶
func (d *Dao) PickVideos(c context.Context, aid int64) (res map[int64]*ugcmdl.SimpleVideo, err error)
PickVideos picks the videos of an archive in one shot
func (*Dao) PpDelVideos ¶
PpDelVideos postpones the archive's videos submit in 30 mins
func (*Dao) RepCidBatch ¶
RepCidBatch reports cid info to VideoCloud api
func (*Dao) SetVideoCMS ¶
SetVideoCMS in MC
func (*Dao) ShouldAudit ¶
ShouldAudit distinguishes whether the archive should ask for audit or not
func (*Dao) TotalVideos ¶
TotalVideos counts the total number of arcs, including the deleted ones
func (*Dao) TransFailVideos ¶
TransFailVideos picks transcoding failure videos
func (*Dao) TxAddVideos ¶
TxAddVideos add into the db the new videos
func (*Dao) TxDelVideo ¶
TxDelVideo deletes a video
func (*Dao) TxDelVideos ¶
TxDelVideos deletes the videos of an arc
func (*Dao) TxImportArc ¶
TxImportArc imports an arc
func (*Dao) TxMnlStatus ¶
TxMnlStatus updates the aid's manual status to 0
func (*Dao) TxMnlVideos ¶
TxMnlVideos updates the db with data from API, if the
func (*Dao) TxUpdateVideo ¶
TxUpdateVideo updates the ugc video's status, for databus update
func (*Dao) UgcCont ¶
func (d *Dao) UgcCont(ctx context.Context, aid int, limit int) (res []*model.SearUgcCon, maxID int, err error)
UgcCont is used for getting valid ugc archive data