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: 21 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 dao.

func (*Dao) AddArcReport

func (d *Dao) AddArcReport(c context.Context, aa *archive.ArcReport) (id int64, err error)

AddArcReport insert archive_report.

func (*Dao) AddCacheStaffData

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

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

func (*Dao) AddNetSafeMd5

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

AddNetSafeMd5 fn

func (*Dao) AddNewVideo

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

AddNewVideo insert new video.

func (*Dao) Addit

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

Addit get a archive addit by avid.

func (*Dao) AppFeedAids

func (d *Dao) AppFeedAids(c context.Context, startTime, endTime time.Time) (aids []int64, err error)

AppFeedAids get aids by appFeed flow.

func (*Dao) Apply

func (d *Dao) Apply(c context.Context, ID int64) (p *archive.StaffApply, err error)

Apply get archive Apply

func (*Dao) Applys

func (d *Dao) Applys(c context.Context, ids []int64) (as []*archive.StaffApply, err error)

Applys get .

func (*Dao) ApplysByAID

func (d *Dao) ApplysByAID(c context.Context, aid int64) (as []*archive.StaffApply, err error)

ApplysByAID get .

func (*Dao) ApplysByMIDAndStaff

func (d *Dao) ApplysByMIDAndStaff(c context.Context, upMID, staffMID int64) (as []*archive.StaffApply, err error)

ApplysByMIDAndStaff get .

func (*Dao) ArcHistory

func (d *Dao) ArcHistory(c context.Context, hid int64) (ah *archive.ArcHistory, err error)

ArcHistory select archive edit history by hid.

func (*Dao) ArcHistorys

func (d *Dao) ArcHistorys(c context.Context, aid int64, stime time.Time) (ahs []*archive.ArcHistory, err error)

ArcHistorys select archive edit history by aid.

func (*Dao) ArcReport

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

ArcReport get archive_report by aid and mid.

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

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

ArchiveAllUpCount get all archive count by mid.

func (*Dao) ArchiveOpenUpCount

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

ArchiveOpenUpCount get open archive count by mid.

func (*Dao) ArchiveUnOpenUpCount

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

ArchiveUnOpenUpCount get un open archive count by mid.

func (*Dao) ArchivesUpAll

func (d *Dao) ArchivesUpAll(c context.Context, mid int64, offset int, ps int) (aids []int64, err error)

ArchivesUpAll get archive all aids by mid.

func (*Dao) ArchivesUpOpen

func (d *Dao) ArchivesUpOpen(c context.Context, mid int64, offset int, ps int) (aids []int64, err error)

ArchivesUpOpen get archive open aids by mid.

func (*Dao) ArchivesUpUnOpen

func (d *Dao) ArchivesUpUnOpen(c context.Context, mid int64, offset int, ps int) (aids []int64, err error)

ArchivesUpUnOpen get archive unopen aids by mid.

func (*Dao) BeginTran

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

BeginTran begin transcation.

func (*Dao) CacheStaffData

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

CacheStaffData get data from mc

func (*Dao) CheckActGroupID

func (d *Dao) CheckActGroupID(c context.Context, groupID int64) (state int8, err error)

CheckActGroupID check active GroupID

func (*Dao) CheckFlowGroupID

func (d *Dao) CheckFlowGroupID(c context.Context, pool int8, oid, groupID int64) (flowID int64, err error)

CheckFlowGroupID check active GroupID

func (*Dao) CheckFlowMid

func (d *Dao) CheckFlowMid(c context.Context, pool int8, oid int64) (flows []*archive.FlowData, err error)

CheckFlowMid 通用 mid 流量导向到flow_design

func (*Dao) CheckNewVideosTimeout

func (d *Dao) CheckNewVideosTimeout(c context.Context, fns []string) (has bool, filename string, err error)

CheckNewVideosTimeout check 48 timeout by add filenames.

func (*Dao) Close

func (d *Dao) Close()

Close close dao.

func (*Dao) CountByGID

func (d *Dao) CountByGID(c context.Context, pool, gid int64) (count int64, err error)

CountByGID count buy state.

func (*Dao) DelCacheStaffData

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

DelCacheStaffData delete data from mc

func (*Dao) DelLock

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

DelLock del lock.

func (*Dao) Delay

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

Delay get a delay time by avid.

func (*Dao) DescFormats

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

DescFormats get desc_format info.

func (*Dao) FilterApplys

func (d *Dao) FilterApplys(c context.Context, aids []int64, mid int64) (as []*archive.StaffApply, err error)

FilterApplys get .

func (*Dao) FindGroupIDByScope

func (d *Dao) FindGroupIDByScope(c context.Context, pool int8, IndustryID, brandID int64, official int8) (groupID int64, err error)

FindGroupIDByScope check active GroupID

func (*Dao) FlowGroupPools

func (d *Dao) FlowGroupPools(c context.Context, ids []int64) (res map[int64]int8, err error)

FlowGroupPools 获取指定流量套餐的pool

func (*Dao) FlowPage

func (d *Dao) FlowPage(c context.Context, pool, gid, pn, ps int64) (res []*archive.FlowData, err error)

FlowPage page.

func (*Dao) FlowUnique

func (d *Dao) FlowUnique(c context.Context, oid, groupID int64, pool int8) (f *archive.FlowData, err error)

FlowUnique 获取命中 指定流量套餐的记录

func (*Dao) Flows

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

Flows get flow_control id and remark.

func (*Dao) FlowsByOID

func (d *Dao) FlowsByOID(c context.Context, oid int64) (res []*archive.FlowData, err error)

FlowsByOID 获取所有命中的流量套餐记录

func (*Dao) ForbidMids

func (d *Dao) ForbidMids(c context.Context) (mids map[int64][]string, err error)

ForbidMids 稿件 mid 禁止配置 ForbidMids get forbid mids.

func (*Dao) GetVideoJam

func (d *Dao) GetVideoJam(c context.Context) (seconds int, err error)

GetVideoJam get video traffic jam time

func (*Dao) MidCount

func (d *Dao) MidCount(c context.Context, ID int64) (count int64, err error)

MidCount get

func (*Dao) Mids

func (d *Dao) Mids(c context.Context, aids []int64) (mm map[int64]int64, err error)

Mids multi get archive mid by aids.

func (*Dao) NewCidsByFns

func (d *Dao) NewCidsByFns(c context.Context, nvs []*archive.Video) (cids map[string]int64, err error)

NewCidsByFns get cids map in batches by filenames and hash64s.

func (*Dao) NewVideoByCID

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

NewVideoByCID get video by cid.

func (*Dao) NewVideoByFn

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

NewVideoByFn get video by filename

func (*Dao) NewVideoFn

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

NewVideoFn get video by filename

func (*Dao) NewVideoMap

func (d *Dao) NewVideoMap(c context.Context, aid int64) (vm map[string]*archive.Video, cvm map[int64]*archive.Video, err error)

NewVideoMap get video map info 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) NewVideosByCID

func (d *Dao) NewVideosByCID(c context.Context, cids []int64) (vm map[int64]map[int64]*archive.Video, err error)

NewVideosByCID multi get video by cids.

func (*Dao) NewVideosByFn

func (d *Dao) NewVideosByFn(c context.Context, fns []string) (vm map[int64]map[string]*archive.Video, err error)

NewVideosByFn multi get video by filenames.

func (*Dao) NewVideosReason

func (d *Dao) NewVideosReason(c context.Context, aid int64) (res map[int64]string, err error)

NewVideosReason get videos audit reason.

func (*Dao) OidsFlowByGID

func (d *Dao) OidsFlowByGID(c context.Context, pool, gid int64, oids string) (res []*archive.FlowData, err error)

OidsFlowByGID 判断指定oids 是否是gid禁止的

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

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

Ping ping cpdb

func (*Dao) Porder

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

Porder get archive Proder

func (*Dao) PorderArcList

func (d *Dao) PorderArcList(c context.Context, begin, end time.Time) (res []*archive.PorderArc, err error)

PorderArcList fn

func (*Dao) PorderCfgList

func (d *Dao) PorderCfgList(c context.Context) (pcfgs []*archive.Pconfig, err error)

PorderCfgList fn

func (*Dao) RecoUpdate

func (d *Dao) RecoUpdate(c context.Context, aid int64, recoIDs []int64) (effCnt int64, err error)

RecoUpdate fn

func (*Dao) Recos

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

Recos fn

func (*Dao) RejectedArchives

func (d *Dao) RejectedArchives(c context.Context, mid int64, state, offset, limit int32, start *time.Time) (arcs []*archive.Archive, count int32, err error)

RejectedArchives list rejected archives

func (*Dao) SetNXLock

func (d *Dao) SetNXLock(c context.Context, aid int64, times int64) (res bool, err error)

SetNXLock redis lock.

func (*Dao) SimpleArcVideos

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

SimpleArcVideos get simple videos from avr

func (*Dao) SimpleArchive

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

SimpleArchive get a archive by avid.

func (*Dao) Staff

func (d *Dao) Staff(c context.Context, ID int64) (s *archive.Staff, err error)

Staff get .

func (*Dao) StaffByAidAndMid

func (d *Dao) StaffByAidAndMid(c context.Context, AID, StaffMid int64) (s *archive.Staff, err error)

StaffByAidAndMid get .

func (*Dao) StaffData

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

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

func (*Dao) Staffs

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

Staffs get .

func (*Dao) TxAddApply

func (d *Dao) TxAddApply(tx *sql.Tx, param *archive.ApplyParam) (id int64, err error)

TxAddApply tx.

func (*Dao) TxAddArcHistory

func (d *Dao) TxAddArcHistory(tx *sql.Tx, aid, mid int64, title, content, cover, tag string) (hid int64, err error)

TxAddArcHistory insert archive_edit_history.

func (*Dao) TxAddArchive

func (d *Dao) TxAddArchive(tx *xsql.Tx, a *archive.Archive) (aid int64, err error)

TxAddArchive insert archive.

func (*Dao) TxAddAudit

func (d *Dao) TxAddAudit(tx *sql.Tx, vs []*archive.Video) (rows int64, err error)

TxAddAudit insert video audit.

func (*Dao) TxAddDelay

func (d *Dao) TxAddDelay(tx *sql.Tx, mid int64, aid int64, state, tp int8, dTime xtime.Time) (rows int64, err error)

TxAddDelay insert delay.

func (*Dao) TxAddFlow

func (d *Dao) TxAddFlow(tx *sql.Tx, old, uid, groupID int64, pool int8, remark string) (id int64, err error)

TxAddFlow tx add flow_design.

func (*Dao) TxAddFlowLog

func (d *Dao) TxAddFlowLog(tx *sql.Tx, old, uid, groupID int64, pool int8, remark string) (rows int64, err error)

TxAddFlowLog tx add flow_design log.

func (*Dao) TxAddNewVideo

func (d *Dao) TxAddNewVideo(tx *sql.Tx, v *archive.Video) (cid int64, err error)

TxAddNewVideo insert new video.

func (*Dao) TxAddRelation

func (d *Dao) TxAddRelation(tx *sql.Tx, v *archive.Video) (vid int64, err error)

TxAddRelation insert archive_video_relation.

func (*Dao) TxAddStaff

func (d *Dao) TxAddStaff(tx *sql.Tx, param *archive.Staff) (id int64, err error)

TxAddStaff tx.

func (*Dao) TxAddVideo

func (d *Dao) TxAddVideo(tx *sql.Tx, v *archive.Video) (id int64, err error)

TxAddVideo insert archive video.

func (*Dao) TxAddVideoCid

func (d *Dao) TxAddVideoCid(tx *sql.Tx, v *archive.Video) (cid int64, err error)

TxAddVideoCid insert video to get cid.

func (*Dao) TxAddVideoHistory

func (d *Dao) TxAddVideoHistory(tx *sql.Tx, hid int64, v *archive.Video) (rows int64, err error)

TxAddVideoHistory insert archive_video_edit_history.

func (*Dao) TxAddVideoHistorys

func (d *Dao) TxAddVideoHistorys(tx *sql.Tx, hid int64, vs []*archive.Video) (err error)

TxAddVideoHistorys batch add archive_video_history.

func (*Dao) TxAddVideoRelation

func (d *Dao) TxAddVideoRelation(tx *sql.Tx, v *archive.Video) (vid int64, err error)

TxAddVideoRelation insert archive_video_relation to get vid.

func (*Dao) TxDelDelay

func (d *Dao) TxDelDelay(tx *sql.Tx, aid int64, tp int8) (rows int64, err error)

TxDelDelay delete delay

func (*Dao) TxUpAddit

func (d *Dao) TxUpAddit(tx *xsql.Tx, aid, missionID, orderID, flowID, descFormatID int64, ipv6 []byte, source, advertiser, flowRemark, desc, dynamic string, upFrom int8) (rows int64, err error)

TxUpAddit update archive addit.

func (*Dao) TxUpAdditReason

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

TxUpAdditReason update archive recheck_reason

func (*Dao) TxUpAdditRedirect

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

TxUpAdditRedirect update archive redirect url.

func (*Dao) TxUpArcAttr

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

TxUpArcAttr update attribute by aid.

func (*Dao) TxUpArchive

func (d *Dao) TxUpArchive(tx *xsql.Tx, a *archive.Archive) (rows int64, err error)

TxUpArchive update archive.

func (*Dao) TxUpArchiveBiz

func (d *Dao) TxUpArchiveBiz(tx *xsql.Tx, aid, bizType int64, data string) (rows int64, err error)

TxUpArchiveBiz update archive biz.

func (*Dao) TxUpArchiveMid

func (d *Dao) TxUpArchiveMid(tx *xsql.Tx, a *archive.Archive) (rows int64, err error)

TxUpArchiveMid update archive mid.

func (*Dao) TxUpArchiveState

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

TxUpArchiveState update Archive state.

func (*Dao) TxUpDelay

func (d *Dao) TxUpDelay(tx *sql.Tx, mid, aid int64, state, tp int8, dTime xtime.Time) (rows int64, err error)

TxUpDelay update delay

func (*Dao) TxUpFlowState

func (d *Dao) TxUpFlowState(tx *sql.Tx, state int8, id int64) (rows int64, err error)

TxUpFlowState tx set flow_design.state=1.

func (*Dao) TxUpForbid

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

TxUpForbid update archive addit.

func (*Dao) TxUpForbidAttr

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

TxUpForbidAttr insert archive forbid.

func (*Dao) TxUpNewVideo

func (d *Dao) TxUpNewVideo(tx *sql.Tx, v *archive.Video) (rows int64, err error)

TxUpNewVideo update video SrcType\Status\XcodeState by cid.

func (*Dao) TxUpPorder

func (d *Dao) TxUpPorder(tx *sql.Tx, aid int64, ap *archive.ArcParam) (rows int64, err error)

TxUpPorder add or update archive_porder

func (*Dao) TxUpRelationState

func (d *Dao) TxUpRelationState(tx *sql.Tx, aid, cid int64, state int16) (rows int64, err error)

TxUpRelationState update archive_video_relation state by aid and cid.

func (*Dao) TxUpStaffState

func (d *Dao) TxUpStaffState(tx *sql.Tx, state int8, id int64) (rows int64, err error)

TxUpStaffState tx .

func (*Dao) TxUpTag

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

TxUpTag update tag by aid.

func (*Dao) TxUpVdoStatus

func (d *Dao) TxUpVdoStatus(tx *sql.Tx, cid int64, status int16) (rows int64, err error)

TxUpVdoStatus update video state by cid.

func (*Dao) TxUpVideo

func (d *Dao) TxUpVideo(tx *sql.Tx, v *archive.Video) (rows int64, err error)

TxUpVideo update video.

func (*Dao) TxUpVideoAttr

func (d *Dao) TxUpVideoAttr(tx *sql.Tx, aid int64, filename string, attribute int32) (rows int64, err error)

TxUpVideoAttr update video attribute.

func (*Dao) TxUpVideoCid

func (d *Dao) TxUpVideoCid(tx *sql.Tx, aid int64, filename string, cid int64) (rows int64, err error)

TxUpVideoCid update video attribute.

func (*Dao) TxUpVideoHistory

func (d *Dao) TxUpVideoHistory(tx *sql.Tx, aid, cid int64, filename string) (rows int64, err error)

TxUpVideoHistory update cid to archive_video_edit_history

func (*Dao) TxUpVideoRelation

func (d *Dao) TxUpVideoRelation(tx *sql.Tx, v *archive.Video) (rows int64, err error)

TxUpVideoRelation update archive_video_relation info by aid and cid.

func (*Dao) TxUpVideoStatus

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

TxUpVideoStatus update video status.

func (*Dao) TxUpVideoXcode

func (d *Dao) TxUpVideoXcode(tx *sql.Tx, aid int64, filename string, xCodeState int8) (rows int64, err error)

TxUpVideoXcode update video fail_code.

func (*Dao) TypeMapping

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

TypeMapping is second types opposite first types.

func (*Dao) UpMissionID

func (d *Dao) UpMissionID(c context.Context, aa *archive.ArcMissionParam) (rows int64, err error)

UpMissionID update mission_id for archive.

func (*Dao) VideoHistory

func (d *Dao) VideoHistory(c context.Context, hid int64) (vhs []*archive.VideoHistory, err error)

VideoHistory select archive video edit history by hid.

func (*Dao) Vote

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

Vote get a archive Vote by avid.

func (*Dao) WhiteMids

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

WhiteMids get white mids.

Jump to

Keyboard shortcuts

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