Documentation
¶
Index ¶
- func LogTable(dmid int64) int64
- func RptTable(cid int64) int64
- func UserTable(dmid int64) int64
- type Dao
- func (d *Dao) AddReportLog(c context.Context, tableID int64, lg []*model.ReportLog) (err error)
- func (d *Dao) AddSubTask(tx *sql.Tx, taskID int64, operation int32, start string, rate int32) (id int64, err error)
- func (d *Dao) AddSubtitleSubject(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
- func (d *Dao) AddTask(tx *sql.Tx, v *model.AddTaskArg, sub int32) (taskID int64, err error)
- func (d *Dao) Advances(c context.Context, dmInid int64, typ, mode string, pn, ps int64) (res []*model.Advance, total int64, err error)
- func (d *Dao) ArchiveVideos(c context.Context, aids []int64) (avm map[int64]*model.ArcVideo, err error)
- func (d *Dao) BeginBiliDMTrans(c context.Context) (*sql.Tx, error)
- func (d *Dao) BlockUser(c context.Context, blu *model.BlockUser) (err error)
- func (d *Dao) ChangeReportStat(c context.Context, cid int64, dmids []int64, state int8) (err error)
- func (d *Dao) CheckTransferID(c context.Context, id int64) (job *model.TransferJobInfo, err error)
- func (d *Dao) Contents(c context.Context, oid int64, dmids []int64) (res []*model.Content, err error)
- func (d *Dao) CountSubtitleDraft(c context.Context, oid int64, mid int64, lan uint8, tp int32) (count int64, err error)
- func (d *Dao) DMCount(c context.Context, tp int32, oid int64, states []int64) (count int64, err error)
- func (d *Dao) DelSubtitleCache(c context.Context, oid int64, subtitleID int64) (err error)
- func (d *Dao) DelSubtitleDraftCache(c context.Context, oid int64, tp int32, mid int64, lan uint8) (err error)
- func (d *Dao) DelSubtitleSubjectCache(c context.Context, aid int64) (err error)
- func (d *Dao) DelUpFilterCache(c context.Context, mid, oid int64) (err error)
- func (d *Dao) DelVideoSubtitleCache(c context.Context, oid int64, tp int32) (err error)
- func (d *Dao) EditTaskPriority(c context.Context, ids string, priority int64) (affected int64, err error)
- func (d *Dao) EditTaskState(c context.Context, v *model.EditTasksStateArg) (affected int64, err error)
- func (d *Dao) GenerateMask(c context.Context, cid, mid int64, plat int8, force int8, aid int64, ...) (err error)
- func (d *Dao) GetSubtitle(c context.Context, oid, subtitleID int64) (subtitle *model.Subtitle, err error)
- func (d *Dao) GetSubtitleSubject(c context.Context, aid int64) (subtitleSubject *model.SubtitleSubject, err error)
- func (d *Dao) GetSubtitles(c context.Context, oid int64, subtitleIds []int64) (subtitles []*model.Subtitle, err error)
- func (d *Dao) IgnoreReport(c context.Context, cid int64, dmids []int64, state int8) (err error)
- func (d *Dao) IncrSubMoveCount(c context.Context, tp int32, oid, count int64) (affect int64, err error)
- func (d *Dao) IncrSubjectCount(c context.Context, tp int32, oid, count int64) (affect int64, err error)
- func (d *Dao) IndexsByID(c context.Context, tp int32, oid int64, dmids []int64) (idxMap map[int64]*model.DM, special []int64, err error)
- func (d *Dao) InsertTransferJob(c context.Context, from, to, mid int64, offset float64, state int8) (affect int64, err error)
- func (d *Dao) MaskUpOpen(c context.Context, mid int64, state int32, comment string) (affect int64, err error)
- func (d *Dao) MaskUps(c context.Context, pn, ps int64) (maskUps []*model.MaskUp, total int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) ReduceMoral(c context.Context, moral *model.ReduceMoral) (err error)
- func (d *Dao) ReportLog(c context.Context, dmid int64) (res []*model.ReportLog, err error)
- func (d *Dao) ReportUsers(c context.Context, tableID int64, dmids []int64, state int8) (res map[int64][]*model.ReportUser, err error)
- func (d *Dao) Reports(c context.Context, cid int64, dmids []int64) (res []*model.Report, err error)
- func (d *Dao) ReviewTask(c context.Context, v *model.ReviewTaskArg) (affected int64, err error)
- func (d *Dao) SearchDM(c context.Context, p *model.SearchDMParams) (data *model.SearchDMData, err error)
- func (d *Dao) SearchMonitor(c context.Context, tp int32, pid, oid, mid int64, attr int32, ...) (data *model.SearchMonitorResult, err error)
- func (d *Dao) SearchProtectCount(c context.Context, tp int32, oid int64) (count int64, err error)
- func (d *Dao) SearchReport(c context.Context, page, size int64, start, end, order, sort, keyword string, ...) (data *model.SearchReportResult, err error)
- func (d *Dao) SearchReport2(c context.Context, params *model.ReportListParams) (data *model.SearchReportResult, err error)
- func (d *Dao) SearchReportByID(c context.Context, dmids []int64) (data *model.SearchReportResult, err error)
- func (d *Dao) SearchSubject(c context.Context, req *model.SearchSubjectReq) (data []int64, page *model.Page, err error)
- func (d *Dao) SearchSubjectLog(c context.Context, tp int32, oid int64) (data []*model.SubjectLog, err error)
- func (d *Dao) SearchSubtitle(c context.Context, arg *model.SubtitleSearchArg) (res *model.SearchSubtitleResult, err error)
- func (d *Dao) SeasonInfos(c context.Context, IDType string, id int64) (aids, oids []int64, err error)
- func (d *Dao) SendAction(c context.Context, k string, action *model.Action) (err error)
- func (d *Dao) SendJudgement(c context.Context, judges []*model.ReportJudge) (err error)
- func (d *Dao) SendMsgToPoster(c context.Context, rptMsg *model.ReportMsg) (err error)
- func (d *Dao) SendMsgToReporter(c context.Context, rptMsg *model.ReportMsg) (err error)
- func (d *Dao) SendMsgToSubtitleUp(c context.Context, arg *model.NotifySubtitleUp) (err error)
- func (d *Dao) SendMsgToSubtitleUser(c context.Context, arg *model.NotifySubtitleUser) (err error)
- func (d *Dao) SendTask(c context.Context, taskSQL []string) (statusURL string, err error)
- func (d *Dao) SetAttrByIDs(c context.Context, tp int32, oid int64, ids []int64, val int32) (affect int64, err error)
- func (d *Dao) SetPoolIDByIDs(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (affect int64, err error)
- func (d *Dao) SetStateByIDs(c context.Context, tp int32, oid int64, ids []int64, state int32) (affect int64, err error)
- func (d *Dao) SetTransferState(c context.Context, id int64, state int8) (affect int64, err error)
- func (d *Dao) SpecialContents(c context.Context, dmids []int64) (res map[int64]*model.ContentSpecial, err error)
- func (d *Dao) SubTask(c context.Context, id int64) (subTask *model.SubTask, err error)
- func (d *Dao) Subject(c context.Context, tp int32, oid int64) (s *model.Subject, err error)
- func (d *Dao) Subjects(c context.Context, tp int32, oids []int64) (res map[int64]*model.Subject, err error)
- func (d *Dao) SubtitleLans(c context.Context) (subtitleLans []*model.SubtitleLan, err error)
- func (d *Dao) TaskList(c context.Context, taskSQL []string, pn, ps int64) (tasks []*model.TaskInfo, total int64, err error)
- func (d *Dao) TaskView(c context.Context, id int64) (task *model.TaskView, err error)
- func (d *Dao) TransferList(c context.Context, cid, state, pn, ps int64) (res []*model.TransList, total int64, err error)
- func (d *Dao) TxGetSubtitleID(tx *sql.Tx, oid int64, tp int32, lan uint8) (subtitleID int64, err error)
- func (d *Dao) TxUpdateSubtitle(tx *sql.Tx, subtitle *model.Subtitle) (err error)
- func (d *Dao) TxUpdateSubtitlePub(tx *sql.Tx, subtitlePub *model.SubtitlePub) (err error)
- func (d *Dao) TypeInfo(c context.Context) (types map[int64]*model.ArchiveType, err error)
- func (d *Dao) UpFilters(c context.Context, mid, tp, pn, ps int64) (res []*model.UpFilter, total int64, err error)
- func (d *Dao) UpFiltersAll(c context.Context, mid, pn, ps int64) (res []*model.UpFilter, total int64, err error)
- func (d *Dao) UpReportUserState(c context.Context, tableID int64, dmids []int64, state int8) (affect int64, err error)
- func (d *Dao) UpSearchDMAttr(c context.Context, tp int32, oid int64, attr int32, dmids []int64) (err error)
- func (d *Dao) UpSearchDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (err error)
- func (d *Dao) UpSearchDMState(c context.Context, tp int32, state int32, dmidM map[int64][]int64) (err error)
- func (d *Dao) UpSearchRecentDMAttr(c context.Context, tp int32, oid int64, attr int32, dmids []int64) (err error)
- func (d *Dao) UpSearchRecentDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (err error)
- func (d *Dao) UpSearchRecentDMState(c context.Context, tp int32, state int32, dmidM map[int64][]int64) (err error)
- func (d *Dao) UpSubjectAttr(c context.Context, tp int32, oid int64, attr int32) (affect int64, err error)
- func (d *Dao) UpSubjectCount(c context.Context, tp int32, oid, acount, count int64) (affect int64, err error)
- func (d *Dao) UpSubjectMCount(c context.Context, tp int32, oid, cnt int64) (affect int64, err error)
- func (d *Dao) UpSubjectMaxlimit(c context.Context, tp int32, oid, maxlimit int64) (affect int64, err error)
- func (d *Dao) UpSubjectPool(c context.Context, tp int32, oid int64, childpool int32) (affect int64, err error)
- func (d *Dao) UpSubjectState(c context.Context, tp int32, oid int64, state int32) (affect int64, err error)
- func (d *Dao) UpdateSubtitle(c context.Context, subtitle *model.Subtitle) (err error)
- func (d *Dao) UpdateUpFilter(tx *sql.Tx, mid, id int64, active int8) (affect int64, err error)
- func (d *Dao) UpdateUpFilterCnt(tx *sql.Tx, mid int64, ftype int8, count, limit int) (affect int64, err error)
- func (d *Dao) Upload(c context.Context, bucket, fileName, contentType string, file []byte) (err error)
- func (d *Dao) UptSearchReport(c context.Context, uptRpts []*model.UptSearchReport) (err error)
- func (d *Dao) WorkFlowAppealDelete(c context.Context, bid, oid, subtitleID int64) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao layer.
func (*Dao) AddReportLog ¶
AddReportLog add dm report admin log.
func (*Dao) AddSubTask ¶
func (d *Dao) AddSubTask(tx *sql.Tx, taskID int64, operation int32, start string, rate int32) (id int64, err error)
AddSubTask add dm sub task
func (*Dao) AddSubtitleSubject ¶
func (d *Dao) AddSubtitleSubject(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
AddSubtitleSubject .
func (*Dao) Advances ¶
func (d *Dao) Advances(c context.Context, dmInid int64, typ, mode string, pn, ps int64) (res []*model.Advance, total int64, err error)
Advances 获取高级弹幕申请
func (*Dao) ArchiveVideos ¶
func (d *Dao) ArchiveVideos(c context.Context, aids []int64) (avm map[int64]*model.ArcVideo, err error)
ArchiveVideos return archive and video info.
func (*Dao) BeginBiliDMTrans ¶
BeginBiliDMTrans begin a transsaction of biliDM
func (*Dao) ChangeReportStat ¶
ChangeReportStat change report state
func (*Dao) CheckTransferID ¶
CheckTransferID check transfer job state by id
func (*Dao) Contents ¶
func (d *Dao) Contents(c context.Context, oid int64, dmids []int64) (res []*model.Content, err error)
Contents multi get dm content by dmids.
func (*Dao) CountSubtitleDraft ¶
func (d *Dao) CountSubtitleDraft(c context.Context, oid int64, mid int64, lan uint8, tp int32) (count int64, err error)
CountSubtitleDraft .
func (*Dao) DMCount ¶
func (d *Dao) DMCount(c context.Context, tp int32, oid int64, states []int64) (count int64, err error)
DMCount statistics dm count by dm state.
func (*Dao) DelSubtitleCache ¶
DelSubtitleCache .
func (*Dao) DelSubtitleDraftCache ¶
func (d *Dao) DelSubtitleDraftCache(c context.Context, oid int64, tp int32, mid int64, lan uint8) (err error)
DelSubtitleDraftCache .
func (*Dao) DelSubtitleSubjectCache ¶
DelSubtitleSubjectCache .
func (*Dao) DelUpFilterCache ¶
DelUpFilterCache delete up filters from cache.
func (*Dao) DelVideoSubtitleCache ¶
DelVideoSubtitleCache .
func (*Dao) EditTaskPriority ¶
func (d *Dao) EditTaskPriority(c context.Context, ids string, priority int64) (affected int64, err error)
EditTaskPriority .
func (*Dao) EditTaskState ¶
func (d *Dao) EditTaskState(c context.Context, v *model.EditTasksStateArg) (affected int64, err error)
EditTaskState .
func (*Dao) GenerateMask ¶
func (d *Dao) GenerateMask(c context.Context, cid, mid int64, plat int8, force int8, aid int64, duration int64, typeID int32) (err error)
GenerateMask ask AI to generate dm mask
func (*Dao) GetSubtitle ¶
func (d *Dao) GetSubtitle(c context.Context, oid, subtitleID int64) (subtitle *model.Subtitle, err error)
GetSubtitle .
func (*Dao) GetSubtitleSubject ¶
func (d *Dao) GetSubtitleSubject(c context.Context, aid int64) (subtitleSubject *model.SubtitleSubject, err error)
GetSubtitleSubject .
func (*Dao) GetSubtitles ¶
func (d *Dao) GetSubtitles(c context.Context, oid int64, subtitleIds []int64) (subtitles []*model.Subtitle, err error)
GetSubtitles .
func (*Dao) IgnoreReport ¶
IgnoreReport change report state to SecondIgnore or FirstIngnore
func (*Dao) IncrSubMoveCount ¶
func (d *Dao) IncrSubMoveCount(c context.Context, tp int32, oid, count int64) (affect int64, err error)
IncrSubMoveCount update move_count in dm_subject.
func (*Dao) IncrSubjectCount ¶
func (d *Dao) IncrSubjectCount(c context.Context, tp int32, oid, count int64) (affect int64, err error)
IncrSubjectCount update count.
func (*Dao) IndexsByID ¶
func (d *Dao) IndexsByID(c context.Context, tp int32, oid int64, dmids []int64) (idxMap map[int64]*model.DM, special []int64, err error)
IndexsByID get dm index by dmids.
func (*Dao) InsertTransferJob ¶
func (d *Dao) InsertTransferJob(c context.Context, from, to, mid int64, offset float64, state int8) (affect int64, err error)
InsertTransferJob add transfer job
func (*Dao) MaskUpOpen ¶
func (d *Dao) MaskUpOpen(c context.Context, mid int64, state int32, comment string) (affect int64, err error)
MaskUpOpen mask up open.
func (*Dao) MaskUps ¶
func (d *Dao) MaskUps(c context.Context, pn, ps int64) (maskUps []*model.MaskUp, total int64, err error)
MaskUps get mask up info from db.
func (*Dao) ReduceMoral ¶
ReduceMoral change moral
func (*Dao) ReportUsers ¶
func (d *Dao) ReportUsers(c context.Context, tableID int64, dmids []int64, state int8) (res map[int64][]*model.ReportUser, err error)
ReportUsers get user list.
func (*Dao) ReviewTask ¶
ReviewTask .
func (*Dao) SearchDM ¶
func (d *Dao) SearchDM(c context.Context, p *model.SearchDMParams) (data *model.SearchDMData, err error)
SearchDM 搜索弹幕
func (*Dao) SearchMonitor ¶
func (d *Dao) SearchMonitor(c context.Context, tp int32, pid, oid, mid int64, attr int32, kw, sort, order string, page, size int64) (data *model.SearchMonitorResult, err error)
SearchMonitor get monitor list from search
func (*Dao) SearchProtectCount ¶
SearchProtectCount get protected dm count.
func (*Dao) SearchReport ¶
func (d *Dao) SearchReport(c context.Context, page, size int64, start, end, order, sort, keyword string, tid, rpID, state, upOp []int64, rt *model.Report) (data *model.SearchReportResult, err error)
SearchReport get report list from search
func (*Dao) SearchReport2 ¶
func (d *Dao) SearchReport2(c context.Context, params *model.ReportListParams) (data *model.SearchReportResult, err error)
SearchReport2 .
func (*Dao) SearchReportByID ¶
func (d *Dao) SearchReportByID(c context.Context, dmids []int64) (data *model.SearchReportResult, err error)
SearchReportByID search report by cid and dmids.
func (*Dao) SearchSubject ¶
func (d *Dao) SearchSubject(c context.Context, req *model.SearchSubjectReq) (data []int64, page *model.Page, err error)
SearchSubject get subject log list from search
func (*Dao) SearchSubjectLog ¶
func (d *Dao) SearchSubjectLog(c context.Context, tp int32, oid int64) (data []*model.SubjectLog, err error)
SearchSubjectLog get subject log
func (*Dao) SearchSubtitle ¶
func (d *Dao) SearchSubtitle(c context.Context, arg *model.SubtitleSearchArg) (res *model.SearchSubtitleResult, err error)
SearchSubtitle .
func (*Dao) SeasonInfos ¶
func (d *Dao) SeasonInfos(c context.Context, IDType string, id int64) (aids, oids []int64, err error)
SeasonInfos return season infos
func (*Dao) SendAction ¶
SendAction send action to job.
func (*Dao) SendJudgement ¶
SendJudgement send to judgement
func (*Dao) SendMsgToPoster ¶
SendMsgToPoster send message
func (*Dao) SendMsgToReporter ¶
SendMsgToReporter send message
func (*Dao) SendMsgToSubtitleUp ¶
SendMsgToSubtitleUp .
func (*Dao) SendMsgToSubtitleUser ¶
SendMsgToSubtitleUser .
func (*Dao) SetAttrByIDs ¶
func (d *Dao) SetAttrByIDs(c context.Context, tp int32, oid int64, ids []int64, val int32) (affect int64, err error)
SetAttrByIDs set attr by mult dmids in new db
func (*Dao) SetPoolIDByIDs ¶
func (d *Dao) SetPoolIDByIDs(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (affect int64, err error)
SetPoolIDByIDs change danmu poolid
func (*Dao) SetStateByIDs ¶
func (d *Dao) SetStateByIDs(c context.Context, tp int32, oid int64, ids []int64, state int32) (affect int64, err error)
SetStateByIDs change danmu state in new db
func (*Dao) SetTransferState ¶
SetTransferState change transfer state
func (*Dao) SpecialContents ¶
func (d *Dao) SpecialContents(c context.Context, dmids []int64) (res map[int64]*model.ContentSpecial, err error)
SpecialContents multi get special dm content by dmids.
func (*Dao) Subjects ¶
func (d *Dao) Subjects(c context.Context, tp int32, oids []int64) (res map[int64]*model.Subject, err error)
Subjects multi get subjects.
func (*Dao) SubtitleLans ¶
SubtitleLans .
func (*Dao) TaskList ¶
func (d *Dao) TaskList(c context.Context, taskSQL []string, pn, ps int64) (tasks []*model.TaskInfo, total int64, err error)
TaskList dm task list
func (*Dao) TransferList ¶
func (d *Dao) TransferList(c context.Context, cid, state, pn, ps int64) (res []*model.TransList, total int64, err error)
TransferList transfer list
func (*Dao) TxGetSubtitleID ¶
func (d *Dao) TxGetSubtitleID(tx *sql.Tx, oid int64, tp int32, lan uint8) (subtitleID int64, err error)
TxGetSubtitleID .
func (*Dao) TxUpdateSubtitle ¶
TxUpdateSubtitle .
func (*Dao) TxUpdateSubtitlePub ¶
TxUpdateSubtitlePub .
func (*Dao) UpFilters ¶
func (d *Dao) UpFilters(c context.Context, mid, tp, pn, ps int64) (res []*model.UpFilter, total int64, err error)
UpFilters return filter rules according type
func (*Dao) UpFiltersAll ¶
func (d *Dao) UpFiltersAll(c context.Context, mid, pn, ps int64) (res []*model.UpFilter, total int64, err error)
UpFiltersAll return all filter rules
func (*Dao) UpReportUserState ¶
func (d *Dao) UpReportUserState(c context.Context, tableID int64, dmids []int64, state int8) (affect int64, err error)
UpReportUserState update report user state.
func (*Dao) UpSearchDMAttr ¶
func (d *Dao) UpSearchDMAttr(c context.Context, tp int32, oid int64, attr int32, dmids []int64) (err error)
UpSearchDMAttr 通知搜索服务更新弹幕属性
func (*Dao) UpSearchDMPool ¶
func (d *Dao) UpSearchDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (err error)
UpSearchDMPool 通知搜索服务更新弹幕池
func (*Dao) UpSearchDMState ¶
func (d *Dao) UpSearchDMState(c context.Context, tp int32, state int32, dmidM map[int64][]int64) (err error)
UpSearchDMState 通知搜索服务更新弹幕状态
func (*Dao) UpSearchRecentDMAttr ¶
func (d *Dao) UpSearchRecentDMAttr(c context.Context, tp int32, oid int64, attr int32, dmids []int64) (err error)
UpSearchRecentDMAttr .
func (*Dao) UpSearchRecentDMPool ¶
func (d *Dao) UpSearchRecentDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (err error)
UpSearchRecentDMPool .
func (*Dao) UpSearchRecentDMState ¶
func (d *Dao) UpSearchRecentDMState(c context.Context, tp int32, state int32, dmidM map[int64][]int64) (err error)
UpSearchRecentDMState .
func (*Dao) UpSubjectAttr ¶
func (d *Dao) UpSubjectAttr(c context.Context, tp int32, oid int64, attr int32) (affect int64, err error)
UpSubjectAttr update subject attr.
func (*Dao) UpSubjectCount ¶
func (d *Dao) UpSubjectCount(c context.Context, tp int32, oid, acount, count int64) (affect int64, err error)
UpSubjectCount update acount,count of subject.
func (*Dao) UpSubjectMCount ¶
func (d *Dao) UpSubjectMCount(c context.Context, tp int32, oid, cnt int64) (affect int64, err error)
UpSubjectMCount update monitor dm count.
func (*Dao) UpSubjectMaxlimit ¶
func (d *Dao) UpSubjectMaxlimit(c context.Context, tp int32, oid, maxlimit int64) (affect int64, err error)
UpSubjectMaxlimit update maxlimit in dm subject.
func (*Dao) UpSubjectPool ¶
func (d *Dao) UpSubjectPool(c context.Context, tp int32, oid int64, childpool int32) (affect int64, err error)
UpSubjectPool update childpool in dm subject.
func (*Dao) UpSubjectState ¶
func (d *Dao) UpSubjectState(c context.Context, tp int32, oid int64, state int32) (affect int64, err error)
UpSubjectState update state in dm subject.
func (*Dao) UpdateSubtitle ¶
UpdateSubtitle .
func (*Dao) UpdateUpFilter ¶
UpdateUpFilter batch edit filter.
func (*Dao) UpdateUpFilterCnt ¶
func (d *Dao) UpdateUpFilterCnt(tx *sql.Tx, mid int64, ftype int8, count, limit int) (affect int64, err error)
UpdateUpFilterCnt set count
func (*Dao) Upload ¶
func (d *Dao) Upload(c context.Context, bucket, fileName, contentType string, file []byte) (err error)
Upload .
func (*Dao) UptSearchReport ¶
UptSearchReport 强制更新举报搜索索引 使用 v3