Documentation ¶
Index ¶
- func PromError(name string)
- func PromInfo(name string)
- type Dao
- func (d *Dao) AddArcMetaCache(arc *model.ArcCMS)
- func (d *Dao) AddEpAuthCache(c context.Context, ep *model.EpAuth) (err error)
- func (d *Dao) AddEpMetaCache(c context.Context, vs ...*model.EpCMS) (err error)
- func (d *Dao) AddSeasonMetaCache(c context.Context, vs ...*model.SeasonCMS) (err error)
- func (d *Dao) AddSnAuthCache(c context.Context, s *model.SnAuth) (err error)
- func (d *Dao) AddVideoMetaCache(video *model.VideoCMS)
- func (d *Dao) ArcCMSCacheKey(aid int64) string
- func (d *Dao) ArcMetaCache(c context.Context, aid int64) (s *model.ArcCMS, err error)
- func (d *Dao) ArcMetaDB(c context.Context, aid int64) (meta *model.ArcCMS, err error)
- func (d *Dao) ArcMetas(c context.Context, aids []int64) (metas map[int64]*model.ArcCMS, err error)
- func (d *Dao) ArcsMetaCache(c context.Context, ids []int64) (cached map[int64]*model.ArcCMS, missed []int64, err error)
- func (d *Dao) AuditingMsg() (bool, string)
- func (d *Dao) EPCacheKey(epid int64) string
- func (d *Dao) EpAuth(c context.Context, epid int64) (ep *model.EpAuth, err error)
- func (d *Dao) EpAuthDB(c context.Context, cid int64) (ep *model.EpAuth, err error)
- func (d *Dao) EpCMS(c context.Context, epid int64) (ep *model.EpCMS, err error)
- func (d *Dao) EpErrMsg(ep *model.EpAuth) (bool, string)
- func (d *Dao) EpMetaCache(c context.Context, ids []int64) (cached map[int64]*model.EpCMS, missed []int64, err error)
- func (d *Dao) EpMetas(c context.Context, epids []int64) (metas map[int64]*model.EpCMS, err error)
- func (d *Dao) EpsAuthDB(c context.Context, epids []int64) (epsAuth map[int64]*model.EpAuth, err error)
- func (d *Dao) GetEPCache(c context.Context, epid int64) (ep *model.EpAuth, err error)
- func (d *Dao) GetEpCMSCache(c context.Context, epid int64) (s *model.EpCMS, err error)
- func (d *Dao) GetSeasonCache(c context.Context, sid int64) (s *model.SnAuth, err error)
- func (d *Dao) GetSnCMSCache(c context.Context, sid int64) (s *model.SeasonCMS, err error)
- func (d *Dao) LoadArcMeta(ctx context.Context, aid int64) (arcMeta *model.ArcCMS, err error)
- func (d *Dao) LoadArcsMedia(ctx context.Context, aids []int64) (arcs []*model.ArcCMS, err error)
- func (d *Dao) LoadArcsMediaMap(ctx context.Context, aids []int64) (resMetas map[int64]*model.ArcCMS, err error)
- func (d *Dao) LoadEpCMS(ctx context.Context, epid int64) (ep *model.EpCMS, err error)
- func (d *Dao) LoadEpsAuthMap(ctx context.Context, epids []int64) (resMetas map[int64]*model.EpAuth, err error)
- func (d *Dao) LoadEpsCMS(ctx context.Context, epids []int64) (resMetas map[int64]*model.EpCMS, err error)
- func (d *Dao) LoadSnCMS(ctx context.Context, sid int64) (sn *model.SeasonCMS, err error)
- func (d *Dao) LoadSnsAuthMap(ctx context.Context, sids []int64) (resMetas map[int64]*model.SnAuth, err error)
- func (d *Dao) LoadSnsCMS(ctx context.Context, sids []int64) (seasons []*model.SeasonCMS, newestEpids []int64, err error)
- func (d *Dao) LoadSnsCMSMap(ctx context.Context, sids []int64) (resMetas map[int64]*model.SeasonCMS, err error)
- func (d *Dao) LoadVideoMeta(ctx context.Context, cid int64) (videoMeta *model.VideoCMS, err error)
- func (d *Dao) LoadVideosMeta(ctx context.Context, cids []int64) (resMetas map[int64]*model.VideoCMS, err error)
- func (d *Dao) MixedFilter(ctx context.Context, sids []int64, aids []int64) (okSids map[int64]int, okAids map[int64]int)
- func (d *Dao) NewestOrder(c context.Context, sid int64) (epid int64, newestOrder int, err error)
- func (d *Dao) SeaCacheKey(sid int64) string
- func (d *Dao) SeasonCMS(c context.Context, sid int64) (season *model.SeasonCMS, err error)
- func (d *Dao) SeasonMetas(c context.Context, sids []int64) (metas map[int64]*model.SeasonCMS, err error)
- func (d *Dao) SeasonsMetaCache(c context.Context, ids []int64) (cached map[int64]*model.SeasonCMS, missed []int64, err error)
- func (d *Dao) SetArcMetaCache(c context.Context, s *model.ArcCMS) (err error)
- func (d *Dao) SetEpCMSCache(c context.Context, s *model.EpCMS) (err error)
- func (d *Dao) SetSnCMSCache(c context.Context, s *model.SeasonCMS) (err error)
- func (d *Dao) SetVideoMetaCache(c context.Context, s *model.VideoCMS) (err error)
- func (d *Dao) SnAuth(c context.Context, sid int64) (sn *model.SnAuth, err error)
- func (d *Dao) SnAuthDB(c context.Context, cid int64) (s *model.SnAuth, err error)
- func (d *Dao) SnErrMsg(season *model.SnAuth) (bool, string)
- func (d *Dao) SnsAuthDB(c context.Context, sids []int64) (snsAuth map[int64]*model.SnAuth, err error)
- func (d *Dao) UgcErrMsg(deleted int, result int, valid int) (bool, string)
- func (d *Dao) UnshelveArcs(c context.Context, ids []int64) (err error)
- func (d *Dao) VideoCMSCacheKey(cid int64) string
- func (d *Dao) VideoMetaCache(c context.Context, cid int64) (s *model.VideoCMS, err error)
- func (d *Dao) VideoMetaDB(c context.Context, cid int64) (meta *model.VideoCMS, err error)
- func (d *Dao) VideoMetas(c context.Context, cids []int64) (meta map[int64]*model.VideoCMS, err error)
- func (d *Dao) VideosMetaCache(c context.Context, ids []int64) (cached map[int64]*model.VideoCMS, missed []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 is account dao.
func (*Dao) AddArcMetaCache ¶
AddArcMetaCache add view relates
func (*Dao) AddEpAuthCache ¶
AddEpAuthCache save model.EpAuth to memcache
func (*Dao) AddEpMetaCache ¶
AddEpMetaCache add ep meta cache
func (*Dao) AddSeasonMetaCache ¶
AddSeasonMetaCache add season meta cache
func (*Dao) AddSnAuthCache ¶
AddSnAuthCache save model.SnAuth to memcache
func (*Dao) AddVideoMetaCache ¶
AddVideoMetaCache add view relates
func (*Dao) ArcMetaCache ¶
ArcMetaCache get arc cms cache.
func (*Dao) ArcsMetaCache ¶
func (d *Dao) ArcsMetaCache(c context.Context, ids []int64) (cached map[int64]*model.ArcCMS, missed []int64, err error)
ArcsMetaCache pick archive cms meta cache
func (*Dao) AuditingMsg ¶
AuditingMsg returns the msg for the archive whose all videos are being audited
func (*Dao) EpErrMsg ¶
EpErrMsg returns the ep auth result and the error message in case of auth failure
func (*Dao) EpMetaCache ¶
func (d *Dao) EpMetaCache(c context.Context, ids []int64) (cached map[int64]*model.EpCMS, missed []int64, err error)
EpMetaCache season cms meta cache
func (*Dao) EpsAuthDB ¶
func (d *Dao) EpsAuthDB(c context.Context, epids []int64) (epsAuth map[int64]*model.EpAuth, err error)
EpsAuthDB def.
func (*Dao) GetEPCache ¶
GetEPCache get EpAuth cache.
func (*Dao) GetEpCMSCache ¶
GetEpCMSCache get EpCMS cache.
func (*Dao) GetSeasonCache ¶
GetSeasonCache get SnAuth cache.
func (*Dao) GetSnCMSCache ¶
GetSnCMSCache get SeasonCMS cache.
func (*Dao) LoadArcMeta ¶
LoadArcMeta loads the arc meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadArcsMedia ¶
LoadArcsMedia loads the arc meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadArcsMediaMap ¶
func (d *Dao) LoadArcsMediaMap(ctx context.Context, aids []int64) (resMetas map[int64]*model.ArcCMS, err error)
LoadArcsMediaMap loads a batch of arc meta
func (*Dao) LoadEpCMS ¶
LoadEpCMS loads the sn meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadEpsAuthMap ¶
func (d *Dao) LoadEpsAuthMap(ctx context.Context, epids []int64) (resMetas map[int64]*model.EpAuth, err error)
LoadEpsAuthMap loads a batch of arc meta
func (*Dao) LoadEpsCMS ¶
func (d *Dao) LoadEpsCMS(ctx context.Context, epids []int64) (resMetas map[int64]*model.EpCMS, err error)
LoadEpsCMS picks ep meta information from Cache & DB
func (*Dao) LoadSnCMS ¶
LoadSnCMS loads the sn meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadSnsAuthMap ¶
func (d *Dao) LoadSnsAuthMap(ctx context.Context, sids []int64) (resMetas map[int64]*model.SnAuth, err error)
LoadSnsAuthMap loads a batch of arc meta
func (*Dao) LoadSnsCMS ¶
func (d *Dao) LoadSnsCMS(ctx context.Context, sids []int64) (seasons []*model.SeasonCMS, newestEpids []int64, err error)
LoadSnsCMS loads the seasons meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadSnsCMSMap ¶
func (d *Dao) LoadSnsCMSMap(ctx context.Context, sids []int64) (resMetas map[int64]*model.SeasonCMS, err error)
LoadSnsCMSMap loads season cms meta data from cache and db
func (*Dao) LoadVideoMeta ¶
LoadVideoMeta loads the video meta cms data from cache, for missed ones, pick them from the DB
func (*Dao) LoadVideosMeta ¶
func (d *Dao) LoadVideosMeta(ctx context.Context, cids []int64) (resMetas map[int64]*model.VideoCMS, err error)
LoadVideosMeta picks the videos meta info
func (*Dao) MixedFilter ¶
func (d *Dao) MixedFilter(ctx context.Context, sids []int64, aids []int64) (okSids map[int64]int, okAids map[int64]int)
MixedFilter filters ugc and pgc data to get the allowed data
func (*Dao) NewestOrder ¶
NewestOrder picks one season's newest passed ep's order column value
func (*Dao) SeasonCMS ¶
SeasonCMS gets the fields that can be changed from tv-cms side to offer the TV APP
func (*Dao) SeasonMetas ¶
func (d *Dao) SeasonMetas(c context.Context, sids []int64) (metas map[int64]*model.SeasonCMS, err error)
SeasonMetas picks seasons from DB
func (*Dao) SeasonsMetaCache ¶
func (d *Dao) SeasonsMetaCache(c context.Context, ids []int64) (cached map[int64]*model.SeasonCMS, missed []int64, err error)
SeasonsMetaCache season cms meta cache
func (*Dao) SetArcMetaCache ¶
SetArcMetaCache save model.ArcCMS to memcache
func (*Dao) SetEpCMSCache ¶
SetEpCMSCache save model.EpCMS to memcache
func (*Dao) SetSnCMSCache ¶
SetSnCMSCache save model.SeasonCMS to memcache
func (*Dao) SetVideoMetaCache ¶
SetVideoMetaCache save model.VideoCMS to memcache
func (*Dao) SnErrMsg ¶
SnErrMsg returns the season auth result and the error message in case of auth failure
func (*Dao) SnsAuthDB ¶
func (d *Dao) SnsAuthDB(c context.Context, sids []int64) (snsAuth map[int64]*model.SnAuth, err error)
SnsAuthDB .
func (*Dao) UgcErrMsg ¶
UgcErrMsg returns the arc auth result and the error message in case of auth failure
func (*Dao) UnshelveArcs ¶
UnshelveArcs unshelves the arcs
func (*Dao) VideoMetaCache ¶
VideoMetaCache get video cms cache.
func (*Dao) VideoMetaDB ¶
VideoMetaDB picks video from DB