Documentation ¶
Index ¶
- func PromCacheHit(name string, v int64)
- func PromCacheMiss(name string, v int64)
- func PromError(name string)
- type Dao
- func (d *Dao) AddAdvanceCmtCache(c context.Context, oid, mid int64, mode string, adv *model.AdvanceCmt) (err error)
- func (d *Dao) AddAdvanceLock(c context.Context, mid, cid int64) (succeed bool)
- func (d *Dao) AddAjaxDMCache(c context.Context, oid int64, msgs []string) (err error)
- func (d *Dao) AddDMLimitCache(c context.Context, mid int64, limiter *model.Limiter) (err error)
- func (d *Dao) AddGlobalFilter(c context.Context, fType int8, filter string) (lastID int64, err error)
- func (d *Dao) AddGlobalFilterCache(c context.Context, data []*model.GlobalFilter) (err error)
- func (d *Dao) AddHisIdxCache(c context.Context, tp int32, oid int64, month string, dates []string) (err error)
- func (d *Dao) AddHistoryCache(c context.Context, tp int32, oid, timestamp int64, value []byte) (err error)
- func (d *Dao) AddIdxContentCache(c context.Context, tp int32, oid int64, dms []*model.DM, realname bool) (err error)
- func (d *Dao) AddMaskCache(c context.Context, tp int32, mask *model.Mask) (err error)
- func (d *Dao) AddMsgPubLock(c context.Context, mid, color, rnd int64, mode, fontsize int32, ip, msg string) (err error)
- func (d *Dao) AddOidPubLock(c context.Context, mid, oid int64, ip string) (err error)
- func (d *Dao) AddSubjectCache(c context.Context, sub *model.Subject) (err error)
- func (d *Dao) AddSubtitle(c context.Context, subtitle *model.Subtitle) (insertID int64, err error)
- func (d *Dao) AddSubtitleSubject(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
- func (d *Dao) AddUpFilterCache(c context.Context, mid int64, data []*model.UpFilter) (err error)
- func (d *Dao) AddUpperConfig(c context.Context, mid int64, advPermit int8) (affect int64, err error)
- func (d *Dao) AddUserFilter(tx *sql.Tx, mid int64, fType int8, filter, comment string) (lastID int64, err error)
- func (d *Dao) AddUserFilterCache(c context.Context, mid int64, data []*model.UserFilter) (err error)
- func (d *Dao) AddXMLCache(c context.Context, oid int64, value []byte) (err error)
- func (d *Dao) Advance(c context.Context, mid, id int64) (adv *model.Advance, err error)
- func (d *Dao) AdvanceCmt(c context.Context, oid, mid int64, mode string) (adv *model.AdvanceCmt, err error)
- func (d *Dao) AdvanceCmtCache(c context.Context, oid, mid int64, mode string) (adv *model.AdvanceCmt, err error)
- func (d *Dao) AdvanceType(c context.Context, cid int64, mid int64, mode string) (typ string, err error)
- func (d *Dao) Advances(c context.Context, owner int64) (res []*model.Advance, err error)
- func (d *Dao) AjaxDMCache(c context.Context, oid int64) (msgs []string, err error)
- func (d *Dao) BeginBiliDMTrans(c context.Context) (*sql.Tx, error)
- func (d *Dao) Broadcast(c context.Context, cid, aid int64, msg string) (err error)
- func (d *Dao) BroadcastInGoim(c context.Context, cid, aid int64, info json.RawMessage) (err error)
- func (d *Dao) BroadcastLimit(c context.Context, oid int64, tp int32, count, interval int) (err error)
- func (d *Dao) BuyAdvance(c context.Context, mid, cid, owner, refund int64, typ, mode string) (id int64, err error)
- func (d *Dao) CharPubCnt(c context.Context, mid, oid int64) (count int64, err error)
- func (d *Dao) Content(c context.Context, oid, dmid int64) (ct *model.Content, err error)
- func (d *Dao) Contents(c context.Context, oid int64, dmids []int64) (ctsMap map[int64]*model.Content, err error)
- func (d *Dao) ContentsSpecial(c context.Context, dmids []int64) (res map[int64]*model.ContentSpecial, err error)
- func (d *Dao) CountSubtitles(c context.Context, mid int64, upMids []int64, aid, oid int64, tp int32) (countSubtitle *model.CountSubtitleResult, err error)
- func (d *Dao) DMAdvert(c context.Context, aid, cid, mid, build int64, buvid, mobiApp, adExtra string) (data *model.AD, err error)
- func (d *Dao) DMCache(c context.Context, tp int32, oid int64) (res [][]byte, err error)
- func (d *Dao) DMCount(c context.Context, typ int32, oid int64, states []int64) (count int64, err error)
- func (d *Dao) DMIDCache(c context.Context, tp int32, oid int64, cnt, n, limit int64) (dmids []int64, err error)
- func (d *Dao) DMIDSpecialsCache(c context.Context, tp int32, oid int64) (dmids []int64, err error)
- func (d *Dao) DMIDSubtitlesCache(c context.Context, tp int32, oid int64, ps, pe, limit int64) (dmids []int64, err error)
- func (d *Dao) DMIDs(c context.Context, tp int32, oid, ps, pe, limit int64, pool int32) (dmids []int64, err error)
- func (d *Dao) DMJudgeCache(c context.Context, tp int8, oid, dmid int64) (l *model.JudgeDMList, err error)
- func (d *Dao) DMLimitCache(c context.Context, mid int64) (limiter *model.Limiter, err error)
- func (d *Dao) DMMaskCache(c context.Context, tp int32, oid int64, plat int8) (mask *model.Mask, err error)
- func (d *Dao) DMSegCache(c context.Context, tp int32, oid, total, num int64) (dmSeg *model.DMSeg, err error)
- func (d *Dao) DelAdvCache(c context.Context, mid, cid int64, mode string) (err error)
- func (d *Dao) DelAdvance(c context.Context, id int64) (affect int64, err error)
- func (d *Dao) DelAdvanceLock(c context.Context, mid, cid int64) (err error)
- func (d *Dao) DelCharPubCnt(c context.Context, mid, oid int64) (err error)
- func (d *Dao) DelGlobalFilterCache(c context.Context) (err error)
- func (d *Dao) DelGlobalFilters(c context.Context, ids []int64) (affect 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 int64) (err error)
- func (d *Dao) DelUserFilter(tx *sql.Tx, mid int64, ids []int64) (affect int64, err error)
- func (d *Dao) DelUserFilterCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelVideoSubtitleCache(c context.Context, oid int64, tp int32) (err error)
- func (d *Dao) DelWaveFormCache(c context.Context, oid int64, tp int32) (err error)
- func (d *Dao) DelXMLCache(c context.Context, oid int64) (err error)
- func (d *Dao) DurationCache(c context.Context, oid int64) (duration int64, err error)
- func (d *Dao) ExpireDMCache(c context.Context, tp int32, oid int64) (ok bool, err error)
- func (d *Dao) GetDmDailyLimitCache(c context.Context, mid int64) (limiter *model.DailyLimiter, err error)
- func (d *Dao) GetSubtitle(c context.Context, oid int64, subtitleID int64) (subtitle *model.Subtitle, err error)
- func (d *Dao) GetSubtitleDraft(c context.Context, oid int64, tp int32, mid int64, lan uint8) (subtitle *model.Subtitle, err error)
- func (d *Dao) GetSubtitleIds(c context.Context, oid int64, tp int32) (subtitlIds []int64, 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) GetWaveForm(c context.Context, oid int64, tp int32) (waveForm *model.WaveForm, err error)
- func (d *Dao) GlobalFilter(c context.Context, fType int8, filter string) (res []*model.GlobalFilter, err error)
- func (d *Dao) GlobalFilterCache(c context.Context) (data []*model.GlobalFilter, err error)
- func (d *Dao) GlobalFilters(c context.Context, sid, limit int64) (res []*model.GlobalFilter, err error)
- func (d *Dao) HistoryCache(c context.Context, tp int32, oid, timestamp int64) (data []byte, err error)
- func (d *Dao) HistoryIdxCache(c context.Context, tp int32, oid int64, month string) (dates []string, err error)
- func (d *Dao) IdxContentCache(c context.Context, tp int32, oid int64, dmids []int64) (res []byte, missed []int64, err error)
- func (d *Dao) IdxContentCacheV2(c context.Context, tp int32, oid int64, dmids []int64) (elems []*model.Elem, missed []int64, err error)
- func (d *Dao) IncrCharPubCnt(c context.Context, mid, oid int64) (err error)
- func (d *Dao) IncrPubCnt(c context.Context, mid, color int64, mode, fontsize int32, ip, msg string) (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) IndexByid(c context.Context, tp int8, oid, dmid int64) (idx *model.DM, err error)
- func (d *Dao) Indexs(c context.Context, tp int32, oid int64) (idxMap map[int64]*model.DM, dmids, special []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) InsertUpFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count int) (id int64, err error)
- func (d *Dao) InsertUserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count int) (id int64, err error)
- func (d *Dao) JudgeIndex(c context.Context, tp int8, oid int64, ctime1, ctime2 time.Time, ...) (idxs []*model.DM, special []int64, err error)
- func (d *Dao) MaskList(c context.Context, cid int64, plat int8) (m *model.Mask, err error)
- func (d *Dao) MsgPublock(c context.Context, mid, color, rnd int64, mode, fontsize int32, ip, msg string) (cached bool, err error)
- func (d *Dao) MultiAddUpFilter(tx *sql.Tx, mid int64, fType int8, fltMap map[string]string) (affect int64, err error)
- func (d *Dao) OidPubLock(c context.Context, mid, oid int64, ip string) (cached bool, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubCnt(c context.Context, mid, color int64, mode, fontsize int32, ip, msg string) (count int64, err error)
- func (d *Dao) PubDatabus(c context.Context, tp int32, pid, oid, cnt, n, duration int64) (err error)
- func (d *Dao) RecFlag(c context.Context, mid, aid, oid, limit, ps, pe int64, plat int32) (data []byte, err error)
- func (d *Dao) RecentDM(c context.Context, mid, start, end int64) (dms []*model.DM, oids []int64, total int64, err error)
- func (d *Dao) ReportDmGarbageLog(c context.Context, dm *model.DM) (err error)
- func (d *Dao) ReportDmLog(c context.Context, dm *model.DM) (err error)
- func (d *Dao) SearchDM(c context.Context, p *model.SearchDMParams) (res *model.SearchDMData, err error)
- func (d *Dao) SearchDMHisIndex(c context.Context, tp int32, oid int64, month string) (dates []string, err error)
- func (d *Dao) SearchDMHistory(c context.Context, tp int32, oid, ctimeTo int64, pn, ps int) (dmids []int64, err error)
- func (d *Dao) SearchSubtitles(c context.Context, page, size int32, mid int64, upMids []int64, aid, oid int64, ...) (res *model.SearchSubtitleResult, err error)
- func (d *Dao) SearhcDmRecent(c context.Context, param *model.SearchRecentDMParam) (res *model.SearchRecentDMResult, err error)
- func (d *Dao) SendAction(c context.Context, k string, act *model.Action) (err error)
- func (d *Dao) SendNotify(c context.Context, title, content, dataType string, mids []int64) (err error)
- func (d *Dao) SendSubtitleCheck(c context.Context, key string, msg *model.SubtitleCheckMsg) (err error)
- func (d *Dao) SetDMJudgeCache(c context.Context, tp int8, oid, dmid int64, l *model.JudgeDMList) (err error)
- func (d *Dao) SetDMSegCache(c context.Context, tp int32, oid, total, num int64, dmSeg *model.DMSeg) (err error)
- func (d *Dao) SetDmDailyLimitCache(c context.Context, mid int64, limiter *model.DailyLimiter) (err error)
- func (d *Dao) SetDurationCache(c context.Context, oid, duration int64) (err error)
- func (d *Dao) SetSubtitleCache(c context.Context, subtitle *model.Subtitle) (err error)
- func (d *Dao) SetSubtitleDraftCache(c context.Context, subtitle *model.Subtitle) (err error)
- func (d *Dao) SetSubtitleSubjectCache(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
- func (d *Dao) SetSubtitleWorlFlowTagCache(c context.Context, bid, rid int64, data []*model.WorkFlowTag) (err error)
- func (d *Dao) SetVideoSubtitleCache(c context.Context, oid int64, tp int32, res *model.VideoSubtitleCache) (err error)
- func (d *Dao) SetWaveFormCache(c context.Context, waveForm *model.WaveForm) (err error)
- func (d *Dao) SetXMLSegCache(c context.Context, tp int32, oid, cnt, num int64, value []byte) (err error)
- func (d *Dao) SpecalDMs(c context.Context, tp int32, oid int64) (dms map[int64]*model.DM, dmids []int64, err error)
- func (d *Dao) SpecialDmLocation(c context.Context, tp int32, oid int64) (ds *model.DmSpecial, err error)
- func (d *Dao) Subject(c context.Context, tp int32, oid int64) (s *model.Subject, err error)
- func (d *Dao) SubjectCache(c context.Context, tp int32, oid int64) (sub *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) SubjectsCache(c context.Context, tp int32, oids []int64) (cached map[int64]*model.Subject, missed []int64, err error)
- func (d *Dao) SubtitleCache(c context.Context, oid int64, subtitleID int64) (subtitle *model.Subtitle, err error)
- func (d *Dao) SubtitleDraftCache(c context.Context, oid int64, tp int32, mid int64, lan uint8) (subtitle *model.Subtitle, err error)
- func (d *Dao) SubtitleLanAdd(c context.Context, subtitleLan *model.SubtitleLan) (err error)
- func (d *Dao) SubtitleLans(c context.Context) (subtitleLans []*model.SubtitleLan, err error)
- func (d *Dao) SubtitleSubjectCache(c context.Context, aid int64) (subtitleSubject *model.SubtitleSubject, err error)
- func (d *Dao) SubtitleWorlFlowTagCache(c context.Context, bid, rid int64) (data []*model.WorkFlowTag, err error)
- func (d *Dao) SubtitlesCache(c context.Context, oid int64, subtitleIds []int64) (res map[int64]*model.Subtitle, missed []int64, err error)
- func (d *Dao) TrimDMCache(c context.Context, tp int32, oid, count int64) (err error)
- func (d *Dao) TrimUpRecent(c context.Context, mid, count int64) (err error)
- func (d *Dao) TxAddSubtitlePub(tx *xsql.Tx, subtitlePub *model.SubtitlePub) (err error)
- func (d *Dao) TxGetSubtitleOne(tx *xsql.Tx, oid int64, tp int32, lan uint8) (subtitle *model.Subtitle, err error)
- func (d *Dao) TxUpdateSubtitle(tx *xsql.Tx, subtitle *model.Subtitle) (err error)
- func (d *Dao) TypeMapping(c context.Context) (rmap map[int16]int16, err error)
- func (d *Dao) UpFilter(c context.Context, mid int64, fType int8) (res []*model.UpFilter, err error)
- func (d *Dao) UpFilterCache(c context.Context, mid int64) (data []*model.UpFilter, err error)
- func (d *Dao) UpFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8) (count int, err error)
- func (d *Dao) UpFilters(c context.Context, mid int64) (res []*model.UpFilter, err error)
- func (d *Dao) UpSubjectMCount(c context.Context, tp int32, oid, cnt 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) UpdateAdvType(c context.Context, id int64, typ string) (affect int64, err error)
- func (d *Dao) UpdateDMAttr(c context.Context, tp int32, oid, dmid int64, attr int32) (affect int64, err error)
- func (d *Dao) UpdateDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (affect int64, err error)
- func (d *Dao) UpdateDMStat(c context.Context, tp int32, oid int64, state int32, dmids []int64) (affect int64, err error)
- func (d *Dao) UpdateMask(c context.Context, cid, maskTime int64, fps int32, plat int8, list string) (err error)
- func (d *Dao) UpdateSubtitle(c context.Context, subtitle *model.Subtitle) (err error)
- func (d *Dao) UpdateUpFilter(tx *sql.Tx, mid int64, fType, active int8, filters []string) (affect int64, err error)
- func (d *Dao) UpdateUpFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count, limit int) (affect int64, err error)
- func (d *Dao) UpdateUserDMStat(c context.Context, tp int32, oid, mid int64, state int32, dmids []int64) (affect int64, err error)
- func (d *Dao) UpdateUserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count, limit int64) (affect int64, err error)
- func (d *Dao) UploadBfs(c context.Context, fileName string, bs []byte) (location string, err error)
- func (d *Dao) Upos(c context.Context, oid int64) (saveTo string, err error)
- func (d *Dao) UpperConfig(c context.Context, mid int64) (advPermit int8, err error)
- func (d *Dao) UpsertWaveFrom(c context.Context, waveForm *model.WaveForm) (err error)
- func (d *Dao) UptSearchDMAttr(c context.Context, dmids []int64, oid int64, attr, tp int32) (err error)
- func (d *Dao) UptSearchDMPool(c context.Context, dmids []int64, oid int64, pool, tp int32) (err error)
- func (d *Dao) UptSearchDMState(c context.Context, dmids []int64, oid int64, state, tp int32) (err error)
- func (d *Dao) UptSearchRecentAttr(c context.Context, dmids []int64, oid int64, attr, tp int32) (err error)
- func (d *Dao) UptSearchRecentPool(c context.Context, dmids []int64, oid int64, pool, tp int32) (err error)
- func (d *Dao) UptSearchRecentState(c context.Context, dmids []int64, oid int64, state, tp int32) (err error)
- func (d *Dao) UptSubAttr(c context.Context, tp int32, oid int64, attr int32) (affect int64, err error)
- func (d *Dao) UserFilter(c context.Context, mid int64, fType int8) (res []*model.UserFilter, err error)
- func (d *Dao) UserFilterCache(c context.Context, mid int64) (data []*model.UserFilter, err error)
- func (d *Dao) UserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8) (count int, err error)
- func (d *Dao) UserFilters(c context.Context, mid int64) (res []*model.UserFilter, err error)
- func (d *Dao) UserFiltersByID(c context.Context, mid int64, ids []int64) (res []*model.UserFilter, err error)
- func (d *Dao) VideoSubtitleCache(c context.Context, oid int64, tp int32) (res *model.VideoSubtitleCache, err error)
- func (d *Dao) WaveFormCache(c context.Context, oid int64, tp int32) (waveForm *model.WaveForm, err error)
- func (d *Dao) WorkFlowAppealAdd(c context.Context, req *model.WorkFlowAppealAddReq) (err error)
- func (d *Dao) WorkFlowAppealDelete(c context.Context, bid, oid, subtitleID int64) (err error)
- func (d *Dao) WorkFlowTagList(c context.Context, bid, rid int64) (data []*model.WorkFlowTag, err error)
- func (d *Dao) XMLCache(c context.Context, oid int64) (data []byte, err error)
- func (d *Dao) XMLSegCache(c context.Context, tp int32, oid, cnt, num int64) (res []byte, err error)
- type UposReq
- type UposResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dm dao.
func (*Dao) AddAdvanceCmtCache ¶
func (d *Dao) AddAdvanceCmtCache(c context.Context, oid, mid int64, mode string, adv *model.AdvanceCmt) (err error)
AddAdvanceCmtCache return
func (*Dao) AddAdvanceLock ¶
AddAdvanceLock 购买高级弹幕锁
func (*Dao) AddAjaxDMCache ¶
AddAjaxDMCache set ajax dm to memcache.
func (*Dao) AddDMLimitCache ¶
AddDMLimitCache add Dmlimit in cache
func (*Dao) AddGlobalFilter ¶
func (d *Dao) AddGlobalFilter(c context.Context, fType int8, filter string) (lastID int64, err error)
AddGlobalFilter add filter rule
func (*Dao) AddGlobalFilterCache ¶
AddGlobalFilterCache set global rules into cache.
func (*Dao) AddHisIdxCache ¶
func (d *Dao) AddHisIdxCache(c context.Context, tp int32, oid int64, month string, dates []string) (err error)
AddHisIdxCache add dm history date index to memcache.
func (*Dao) AddHistoryCache ¶
func (d *Dao) AddHistoryCache(c context.Context, tp int32, oid, timestamp int64, value []byte) (err error)
AddHistoryCache add dm history to memcache.
func (*Dao) AddIdxContentCache ¶
func (d *Dao) AddIdxContentCache(c context.Context, tp int32, oid int64, dms []*model.DM, realname bool) (err error)
AddIdxContentCache add index content cache to redis.
func (*Dao) AddMaskCache ¶
AddMaskCache add dm mask cache
func (*Dao) AddMsgPubLock ¶
func (d *Dao) AddMsgPubLock(c context.Context, mid, color, rnd int64, mode, fontsize int32, ip, msg string) (err error)
AddMsgPubLock set publock into memcache
func (*Dao) AddOidPubLock ¶
AddOidPubLock set publock into memcache
func (*Dao) AddSubjectCache ¶
AddSubjectCache add subject cache.
func (*Dao) AddSubtitle ¶
AddSubtitle .
func (*Dao) AddSubtitleSubject ¶
func (d *Dao) AddSubtitleSubject(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
AddSubtitleSubject .
func (*Dao) AddUpFilterCache ¶
AddUpFilterCache add upper filter cache.
func (*Dao) AddUpperConfig ¶
func (d *Dao) AddUpperConfig(c context.Context, mid int64, advPermit int8) (affect int64, err error)
AddUpperConfig add upper config.
func (*Dao) AddUserFilter ¶
func (d *Dao) AddUserFilter(tx *sql.Tx, mid int64, fType int8, filter, comment string) (lastID int64, err error)
AddUserFilter add filter rule
func (*Dao) AddUserFilterCache ¶
func (d *Dao) AddUserFilterCache(c context.Context, mid int64, data []*model.UserFilter) (err error)
AddUserFilterCache set user filters into cache.
func (*Dao) AddXMLCache ¶
AddXMLCache add xml content to memcache.
func (*Dao) AdvanceCmt ¶
func (d *Dao) AdvanceCmt(c context.Context, oid, mid int64, mode string) (adv *model.AdvanceCmt, err error)
AdvanceCmt get advance comment.
func (*Dao) AdvanceCmtCache ¶
func (d *Dao) AdvanceCmtCache(c context.Context, oid, mid int64, mode string) (adv *model.AdvanceCmt, err error)
AdvanceCmtCache return advance comment from memcache.
func (*Dao) AdvanceType ¶
func (d *Dao) AdvanceType(c context.Context, cid int64, mid int64, mode string) (typ string, err error)
AdvanceType get advance type by cid,mid and mode.
func (*Dao) AjaxDMCache ¶
AjaxDMCache get ajax dm from memcache.
func (*Dao) BeginBiliDMTrans ¶
BeginBiliDMTrans begin db transaction.
func (*Dao) BroadcastInGoim ¶
BroadcastInGoim send dm msg in realtime.
func (*Dao) BroadcastLimit ¶
func (d *Dao) BroadcastLimit(c context.Context, oid int64, tp int32, count, interval int) (err error)
BroadcastLimit .
func (*Dao) BuyAdvance ¶
func (d *Dao) BuyAdvance(c context.Context, mid, cid, owner, refund int64, typ, mode string) (id int64, err error)
BuyAdvance 购买高级弹幕功能
func (*Dao) CharPubCnt ¶
CharPubCnt get character pub count of user.
func (*Dao) Contents ¶
func (d *Dao) Contents(c context.Context, oid int64, dmids []int64) (ctsMap map[int64]*model.Content, err error)
Contents multi get dm content by dmids.
func (*Dao) ContentsSpecial ¶
func (d *Dao) ContentsSpecial(c context.Context, dmids []int64) (res map[int64]*model.ContentSpecial, err error)
ContentsSpecial multi get special dm content by dmids.
func (*Dao) CountSubtitles ¶
func (d *Dao) CountSubtitles(c context.Context, mid int64, upMids []int64, aid, oid int64, tp int32) (countSubtitle *model.CountSubtitleResult, err error)
CountSubtitles .
func (*Dao) DMAdvert ¶
func (d *Dao) DMAdvert(c context.Context, aid, cid, mid, build int64, buvid, mobiApp, adExtra string) (data *model.AD, err error)
DMAdvert dm advert.
func (*Dao) DMCount ¶
func (d *Dao) DMCount(c context.Context, typ int32, oid int64, states []int64) (count int64, err error)
DMCount statistics dm count by dm state.
func (*Dao) DMIDCache ¶
func (d *Dao) DMIDCache(c context.Context, tp int32, oid int64, cnt, n, limit int64) (dmids []int64, err error)
DMIDCache return dm index id.
func (*Dao) DMIDSpecialsCache ¶
DMIDSpecialsCache return special dmids
func (*Dao) DMIDSubtitlesCache ¶
func (d *Dao) DMIDSubtitlesCache(c context.Context, tp int32, oid int64, ps, pe, limit int64) (dmids []int64, err error)
DMIDSubtitlesCache return subtitle dm ids.
func (*Dao) DMIDs ¶
func (d *Dao) DMIDs(c context.Context, tp int32, oid, ps, pe, limit int64, pool int32) (dmids []int64, err error)
DMIDs normal dm ids
func (*Dao) DMJudgeCache ¶
func (d *Dao) DMJudgeCache(c context.Context, tp int8, oid, dmid int64) (l *model.JudgeDMList, err error)
DMJudgeCache memcache cache of dm judge list.
func (*Dao) DMLimitCache ¶
DMLimitCache get dm limit from memcache.
func (*Dao) DMMaskCache ¶
func (d *Dao) DMMaskCache(c context.Context, tp int32, oid int64, plat int8) (mask *model.Mask, err error)
DMMaskCache get dm mask cache
func (*Dao) DMSegCache ¶
func (d *Dao) DMSegCache(c context.Context, tp int32, oid, total, num int64) (dmSeg *model.DMSeg, err error)
DMSegCache dm segment pb cache.
func (*Dao) DelAdvCache ¶
DelAdvCache delete from cache.
func (*Dao) DelAdvance ¶
DelAdvance 删除购买高级弹幕记录
func (*Dao) DelAdvanceLock ¶
DelAdvanceLock 删除购买高级弹幕锁
func (*Dao) DelCharPubCnt ¶
DelCharPubCnt delete char
func (*Dao) DelGlobalFilterCache ¶
DelGlobalFilterCache delete global rules from cache.
func (*Dao) DelGlobalFilters ¶
DelGlobalFilters batch delete filter rules
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) DelUserFilter ¶
DelUserFilter batch delete filter rules by mid
func (*Dao) DelUserFilterCache ¶
DelUserFilterCache delete user filters from cache.
func (*Dao) DelVideoSubtitleCache ¶
DelVideoSubtitleCache .
func (*Dao) DelWaveFormCache ¶
DelWaveFormCache .
func (*Dao) DelXMLCache ¶
DelXMLCache delete xml content.
func (*Dao) DurationCache ¶
DurationCache return duration of video.
func (*Dao) ExpireDMCache ¶
ExpireDMCache expire dm.
func (*Dao) GetDmDailyLimitCache ¶
func (d *Dao) GetDmDailyLimitCache(c context.Context, mid int64) (limiter *model.DailyLimiter, err error)
GetDmDailyLimitCache .
func (*Dao) GetSubtitle ¶
func (d *Dao) GetSubtitle(c context.Context, oid int64, subtitleID int64) (subtitle *model.Subtitle, err error)
GetSubtitle query a SubtitleDrfat
func (*Dao) GetSubtitleDraft ¶
func (d *Dao) GetSubtitleDraft(c context.Context, oid int64, tp int32, mid int64, lan uint8) (subtitle *model.Subtitle, err error)
GetSubtitleDraft query a SubtitleDrfat
func (*Dao) GetSubtitleIds ¶
func (d *Dao) GetSubtitleIds(c context.Context, oid int64, tp int32) (subtitlIds []int64, err error)
GetSubtitleIds .
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) GetWaveForm ¶
func (d *Dao) GetWaveForm(c context.Context, oid int64, tp int32) (waveForm *model.WaveForm, err error)
GetWaveForm .
func (*Dao) GlobalFilter ¶
func (d *Dao) GlobalFilter(c context.Context, fType int8, filter string) (res []*model.GlobalFilter, err error)
GlobalFilter select global filters by type and filter.
func (*Dao) GlobalFilterCache ¶
GlobalFilterCache get up filters from cache.
func (*Dao) GlobalFilters ¶
func (d *Dao) GlobalFilters(c context.Context, sid, limit int64) (res []*model.GlobalFilter, err error)
GlobalFilters return all filter rules
func (*Dao) HistoryCache ¶
func (d *Dao) HistoryCache(c context.Context, tp int32, oid, timestamp int64) (data []byte, err error)
HistoryCache history cache.
func (*Dao) HistoryIdxCache ¶
func (d *Dao) HistoryIdxCache(c context.Context, tp int32, oid int64, month string) (dates []string, err error)
HistoryIdxCache get history date index.
func (*Dao) IdxContentCache ¶
func (d *Dao) IdxContentCache(c context.Context, tp int32, oid int64, dmids []int64) (res []byte, missed []int64, err error)
IdxContentCache get xml info by dmid.
func (*Dao) IdxContentCacheV2 ¶
func (d *Dao) IdxContentCacheV2(c context.Context, tp int32, oid int64, dmids []int64) (elems []*model.Elem, missed []int64, err error)
IdxContentCacheV2 get elems info by dmid.
func (*Dao) IncrCharPubCnt ¶
IncrCharPubCnt increase character pub count of user.
func (*Dao) IncrPubCnt ¶
func (d *Dao) IncrPubCnt(c context.Context, mid, color int64, mode, fontsize int32, ip, msg string) (err error)
IncrPubCnt increase pub count of user.
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) Indexs ¶
func (d *Dao) Indexs(c context.Context, tp int32, oid int64) (idxMap map[int64]*model.DM, dmids, special []int64, err error)
Indexs get dm index by oid.
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) InsertUpFilterCnt ¶
func (d *Dao) InsertUpFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count int) (id int64, err error)
InsertUpFilterCnt insert up rule count.
func (*Dao) InsertUserFilterCnt ¶
func (d *Dao) InsertUserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count int) (id int64, err error)
InsertUserFilterCnt add a new row
func (*Dao) JudgeIndex ¶
func (d *Dao) JudgeIndex(c context.Context, tp int8, oid int64, ctime1, ctime2 time.Time, prog1, prog2 int32) (idxs []*model.DM, special []int64, err error)
JudgeIndex get judget index.
func (*Dao) MsgPublock ¶
func (d *Dao) MsgPublock(c context.Context, mid, color, rnd int64, mode, fontsize int32, ip, msg string) (cached bool, err error)
MsgPublock get publock
func (*Dao) MultiAddUpFilter ¶
func (d *Dao) MultiAddUpFilter(tx *sql.Tx, mid int64, fType int8, fltMap map[string]string) (affect int64, err error)
MultiAddUpFilter add filter rule,the key of fltMap is filter content,value is comment. TODO add comment field in table:dm_filter_up_xx and insert comment
func (*Dao) OidPubLock ¶
OidPubLock get publock
func (*Dao) PubCnt ¶
func (d *Dao) PubCnt(c context.Context, mid, color int64, mode, fontsize int32, ip, msg string) (count int64, err error)
PubCnt get dm pub count of user.
func (*Dao) PubDatabus ¶
PubDatabus pub cache update message to databus.
func (*Dao) RecFlag ¶
func (d *Dao) RecFlag(c context.Context, mid, aid, oid, limit, ps, pe int64, plat int32) (data []byte, err error)
RecFlag get recommend flags from bigdata.
func (*Dao) RecentDM ¶
func (d *Dao) RecentDM(c context.Context, mid, start, end int64) (dms []*model.DM, oids []int64, total int64, err error)
RecentDM get recent dm of up.
func (*Dao) ReportDmGarbageLog ¶
ReportDmGarbageLog report garbage dm
func (*Dao) ReportDmLog ¶
ReportDmLog report dm post log
func (*Dao) SearchDM ¶
func (d *Dao) SearchDM(c context.Context, p *model.SearchDMParams) (res *model.SearchDMData, err error)
SearchDM 搜索弹幕
func (*Dao) SearchDMHisIndex ¶
func (d *Dao) SearchDMHisIndex(c context.Context, tp int32, oid int64, month string) (dates []string, err error)
SearchDMHisIndex get dm date index by oid from search.
func (*Dao) SearchDMHistory ¶
func (d *Dao) SearchDMHistory(c context.Context, tp int32, oid, ctimeTo int64, pn, ps int) (dmids []int64, err error)
SearchDMHistory get history dmid from search. 搜索定制api,改动需要沟通
func (*Dao) SearchSubtitles ¶
func (d *Dao) SearchSubtitles(c context.Context, page, size int32, mid int64, upMids []int64, aid, oid int64, tp int32, status []int64) (res *model.SearchSubtitleResult, err error)
SearchSubtitles .
func (*Dao) SearhcDmRecent ¶
func (d *Dao) SearhcDmRecent(c context.Context, param *model.SearchRecentDMParam) (res *model.SearchRecentDMResult, err error)
SearhcDmRecent .
func (*Dao) SendAction ¶
SendAction send action to job.
func (*Dao) SendNotify ¶
func (d *Dao) SendNotify(c context.Context, title, content, dataType string, mids []int64) (err error)
SendNotify 发送站内信
func (*Dao) SendSubtitleCheck ¶
func (d *Dao) SendSubtitleCheck(c context.Context, key string, msg *model.SubtitleCheckMsg) (err error)
SendSubtitleCheck .
func (*Dao) SetDMJudgeCache ¶
func (d *Dao) SetDMJudgeCache(c context.Context, tp int8, oid, dmid int64, l *model.JudgeDMList) (err error)
SetDMJudgeCache dm fengjiwei list
func (*Dao) SetDMSegCache ¶
func (d *Dao) SetDMSegCache(c context.Context, tp int32, oid, total, num int64, dmSeg *model.DMSeg) (err error)
SetDMSegCache set segment dm to cache.
func (*Dao) SetDmDailyLimitCache ¶
func (d *Dao) SetDmDailyLimitCache(c context.Context, mid int64, limiter *model.DailyLimiter) (err error)
SetDmDailyLimitCache .
func (*Dao) SetDurationCache ¶
SetDurationCache set video duration to redis.
func (*Dao) SetSubtitleCache ¶
SetSubtitleCache .
func (*Dao) SetSubtitleDraftCache ¶
SetSubtitleDraftCache .
func (*Dao) SetSubtitleSubjectCache ¶
func (d *Dao) SetSubtitleSubjectCache(c context.Context, subtitleSubject *model.SubtitleSubject) (err error)
SetSubtitleSubjectCache .
func (*Dao) SetSubtitleWorlFlowTagCache ¶
func (d *Dao) SetSubtitleWorlFlowTagCache(c context.Context, bid, rid int64, data []*model.WorkFlowTag) (err error)
SetSubtitleWorlFlowTagCache .
func (*Dao) SetVideoSubtitleCache ¶
func (d *Dao) SetVideoSubtitleCache(c context.Context, oid int64, tp int32, res *model.VideoSubtitleCache) (err error)
SetVideoSubtitleCache .
func (*Dao) SetWaveFormCache ¶
SetWaveFormCache .
func (*Dao) SetXMLSegCache ¶
func (d *Dao) SetXMLSegCache(c context.Context, tp int32, oid, cnt, num int64, value []byte) (err error)
SetXMLSegCache set dm xml content into memcache.
func (*Dao) SpecalDMs ¶
func (d *Dao) SpecalDMs(c context.Context, tp int32, oid int64) (dms map[int64]*model.DM, dmids []int64, err error)
SpecalDMs .
func (*Dao) SpecialDmLocation ¶
func (d *Dao) SpecialDmLocation(c context.Context, tp int32, oid int64) (ds *model.DmSpecial, err error)
SpecialDmLocation get special dm localtion url
func (*Dao) SubjectCache ¶
SubjectCache get subject from memcache.
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) SubjectsCache ¶
func (d *Dao) SubjectsCache(c context.Context, tp int32, oids []int64) (cached map[int64]*model.Subject, missed []int64, err error)
SubjectsCache multi get subject from memcache.
func (*Dao) SubtitleCache ¶
func (d *Dao) SubtitleCache(c context.Context, oid int64, subtitleID int64) (subtitle *model.Subtitle, err error)
SubtitleCache .
func (*Dao) SubtitleDraftCache ¶
func (d *Dao) SubtitleDraftCache(c context.Context, oid int64, tp int32, mid int64, lan uint8) (subtitle *model.Subtitle, err error)
SubtitleDraftCache .
func (*Dao) SubtitleLanAdd ¶
SubtitleLanAdd .
func (*Dao) SubtitleLans ¶
SubtitleLans .
func (*Dao) SubtitleSubjectCache ¶
func (d *Dao) SubtitleSubjectCache(c context.Context, aid int64) (subtitleSubject *model.SubtitleSubject, err error)
SubtitleSubjectCache .
func (*Dao) SubtitleWorlFlowTagCache ¶
func (d *Dao) SubtitleWorlFlowTagCache(c context.Context, bid, rid int64) (data []*model.WorkFlowTag, err error)
SubtitleWorlFlowTagCache .
func (*Dao) SubtitlesCache ¶
func (d *Dao) SubtitlesCache(c context.Context, oid int64, subtitleIds []int64) (res map[int64]*model.Subtitle, missed []int64, err error)
SubtitlesCache .
func (*Dao) TrimDMCache ¶
TrimDMCache 从redis列表中pop掉count条弹幕.
func (*Dao) TrimUpRecent ¶
TrimUpRecent zrange remove recent dm of up.
func (*Dao) TxAddSubtitlePub ¶
TxAddSubtitlePub .
func (*Dao) TxGetSubtitleOne ¶
func (d *Dao) TxGetSubtitleOne(tx *xsql.Tx, oid int64, tp int32, lan uint8) (subtitle *model.Subtitle, err error)
TxGetSubtitleOne .
func (*Dao) TxUpdateSubtitle ¶
TxUpdateSubtitle .
func (*Dao) TypeMapping ¶
TypeMapping is second types opposite first types.
func (*Dao) UpFilterCache ¶
UpFilterCache get user filter from memcache.
func (*Dao) UpFilterCnt ¶
UpFilterCnt get count by mid and type
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) 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) UpdateAdvType ¶
UpdateAdvType 更新购买高级弹幕类型
func (*Dao) UpdateDMAttr ¶
func (d *Dao) UpdateDMAttr(c context.Context, tp int32, oid, dmid int64, attr int32) (affect int64, err error)
UpdateDMAttr update dm attr
func (*Dao) UpdateDMPool ¶
func (d *Dao) UpdateDMPool(c context.Context, tp int32, oid int64, pool int32, dmids []int64) (affect int64, err error)
UpdateDMPool edit dm pool.
func (*Dao) UpdateDMStat ¶
func (d *Dao) UpdateDMStat(c context.Context, tp int32, oid int64, state int32, dmids []int64) (affect int64, err error)
UpdateDMStat edit dm state
func (*Dao) UpdateMask ¶
func (d *Dao) UpdateMask(c context.Context, cid, maskTime int64, fps int32, plat int8, list string) (err error)
UpdateMask replace dm_masking table for web
func (*Dao) UpdateSubtitle ¶
UpdateSubtitle .
func (*Dao) UpdateUpFilter ¶
func (d *Dao) UpdateUpFilter(tx *sql.Tx, mid int64, fType, active int8, filters []string) (affect int64, err error)
UpdateUpFilter batch edit filter.
func (*Dao) UpdateUpFilterCnt ¶
func (d *Dao) UpdateUpFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count, limit int) (affect int64, err error)
UpdateUpFilterCnt set count
func (*Dao) UpdateUserDMStat ¶
func (d *Dao) UpdateUserDMStat(c context.Context, tp int32, oid, mid int64, state int32, dmids []int64) (affect int64, err error)
UpdateUserDMStat edit user dm state
func (*Dao) UpdateUserFilterCnt ¶
func (d *Dao) UpdateUserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8, count, limit int64) (affect int64, err error)
UpdateUserFilterCnt set count
func (*Dao) UpperConfig ¶
UpperConfig get upper config.
func (*Dao) UpsertWaveFrom ¶
UpsertWaveFrom .
func (*Dao) UptSearchDMAttr ¶
func (d *Dao) UptSearchDMAttr(c context.Context, dmids []int64, oid int64, attr, tp int32) (err error)
UptSearchDMAttr update dm search attr
func (*Dao) UptSearchDMPool ¶
func (d *Dao) UptSearchDMPool(c context.Context, dmids []int64, oid int64, pool, tp int32) (err error)
UptSearchDMPool update dm search pool
func (*Dao) UptSearchDMState ¶
func (d *Dao) UptSearchDMState(c context.Context, dmids []int64, oid int64, state, tp int32) (err error)
UptSearchDMState update dm search state
func (*Dao) UptSearchRecentAttr ¶
func (d *Dao) UptSearchRecentAttr(c context.Context, dmids []int64, oid int64, attr, tp int32) (err error)
UptSearchRecentAttr .
func (*Dao) UptSearchRecentPool ¶
func (d *Dao) UptSearchRecentPool(c context.Context, dmids []int64, oid int64, pool, tp int32) (err error)
UptSearchRecentPool .
func (*Dao) UptSearchRecentState ¶
func (d *Dao) UptSearchRecentState(c context.Context, dmids []int64, oid int64, state, tp int32) (err error)
UptSearchRecentState .
func (*Dao) UptSubAttr ¶
func (d *Dao) UptSubAttr(c context.Context, tp int32, oid int64, attr int32) (affect int64, err error)
UptSubAttr update subject attr
func (*Dao) UserFilter ¶
func (d *Dao) UserFilter(c context.Context, mid int64, fType int8) (res []*model.UserFilter, err error)
UserFilter select user filter by mid and type.
func (*Dao) UserFilterCache ¶
UserFilterCache get user filters from cache.
func (*Dao) UserFilterCnt ¶
func (d *Dao) UserFilterCnt(c context.Context, tx *sql.Tx, mid int64, tp int8) (count int, err error)
UserFilterCnt get count by mid and type
func (*Dao) UserFilters ¶
UserFilters return all filter.
func (*Dao) UserFiltersByID ¶
func (d *Dao) UserFiltersByID(c context.Context, mid int64, ids []int64) (res []*model.UserFilter, err error)
UserFiltersByID return all filters specified by ids
func (*Dao) VideoSubtitleCache ¶
func (d *Dao) VideoSubtitleCache(c context.Context, oid int64, tp int32) (res *model.VideoSubtitleCache, err error)
VideoSubtitleCache .
func (*Dao) WaveFormCache ¶
func (d *Dao) WaveFormCache(c context.Context, oid int64, tp int32) (waveForm *model.WaveForm, err error)
WaveFormCache .
func (*Dao) WorkFlowAppealAdd ¶
WorkFlowAppealAdd add a record to workflow
func (*Dao) WorkFlowAppealDelete ¶
WorkFlowAppealDelete .
func (*Dao) WorkFlowTagList ¶
func (d *Dao) WorkFlowTagList(c context.Context, bid, rid int64) (data []*model.WorkFlowTag, err error)
WorkFlowTagList get tag list from workflow