cms

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromError

func PromError(name string)

PromError prom error

func PromInfo

func PromInfo(name string)

PromInfo add prom info

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao is account dao.

func New

func New(c *conf.Config) (d *Dao)

New account dao.

func (*Dao) AddArcMetaCache

func (d *Dao) AddArcMetaCache(arc *model.ArcCMS)

AddArcMetaCache add view relates

func (*Dao) AddEpAuthCache

func (d *Dao) AddEpAuthCache(c context.Context, ep *model.EpAuth) (err error)

AddEpAuthCache save model.EpAuth to memcache

func (*Dao) AddEpMetaCache

func (d *Dao) AddEpMetaCache(c context.Context, vs ...*model.EpCMS) (err error)

AddEpMetaCache add ep meta cache

func (*Dao) AddSeasonMetaCache

func (d *Dao) AddSeasonMetaCache(c context.Context, vs ...*model.SeasonCMS) (err error)

AddSeasonMetaCache add season meta cache

func (*Dao) AddSnAuthCache

func (d *Dao) AddSnAuthCache(c context.Context, s *model.SnAuth) (err error)

AddSnAuthCache save model.SnAuth to memcache

func (*Dao) AddVideoMetaCache

func (d *Dao) AddVideoMetaCache(video *model.VideoCMS)

AddVideoMetaCache add view relates

func (*Dao) ArcCMSCacheKey

func (d *Dao) ArcCMSCacheKey(aid int64) string

ArcCMSCacheKey .

func (*Dao) ArcMetaCache

func (d *Dao) ArcMetaCache(c context.Context, aid int64) (s *model.ArcCMS, err error)

ArcMetaCache get arc cms cache.

func (*Dao) ArcMetaDB

func (d *Dao) ArcMetaDB(c context.Context, aid int64) (meta *model.ArcCMS, err error)

ArcMetaDB picks arc from DB

func (*Dao) ArcMetas

func (d *Dao) ArcMetas(c context.Context, aids []int64) (metas map[int64]*model.ArcCMS, err error)

ArcMetas picks seasons from DB

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

func (d *Dao) AuditingMsg() (bool, string)

AuditingMsg returns the msg for the archive whose all videos are being audited

func (*Dao) EPCacheKey

func (d *Dao) EPCacheKey(epid int64) string

EPCacheKey .

func (*Dao) EpAuth

func (d *Dao) EpAuth(c context.Context, epid int64) (ep *model.EpAuth, err error)

EpAuth get's ep auth info from Cache & DB

func (*Dao) EpAuthDB

func (d *Dao) EpAuthDB(c context.Context, cid int64) (ep *model.EpAuth, err error)

EpAuthDB pick ep data from DB for Cache missing case

func (*Dao) EpCMS

func (d *Dao) EpCMS(c context.Context, epid int64) (ep *model.EpCMS, err error)

EpCMS gets the fields that can be changed from tv-cms side to offer the TV APP

func (*Dao) EpErrMsg

func (d *Dao) EpErrMsg(ep *model.EpAuth) (bool, string)

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

func (d *Dao) EpMetas(c context.Context, epids []int64) (metas map[int64]*model.EpCMS, err error)

EpMetas picks ep info from DB

func (*Dao) EpsAuthDB

func (d *Dao) EpsAuthDB(c context.Context, epids []int64) (epsAuth map[int64]*model.EpAuth, err error)

EpsAuthDB def.

func (*Dao) GetEPCache

func (d *Dao) GetEPCache(c context.Context, epid int64) (ep *model.EpAuth, err error)

GetEPCache get EpAuth cache.

func (*Dao) GetEpCMSCache

func (d *Dao) GetEpCMSCache(c context.Context, epid int64) (s *model.EpCMS, err error)

GetEpCMSCache get EpCMS cache.

func (*Dao) GetSeasonCache

func (d *Dao) GetSeasonCache(c context.Context, sid int64) (s *model.SnAuth, err error)

GetSeasonCache get SnAuth cache.

func (*Dao) GetSnCMSCache

func (d *Dao) GetSnCMSCache(c context.Context, sid int64) (s *model.SeasonCMS, err error)

GetSnCMSCache get SeasonCMS cache.

func (*Dao) LoadArcMeta

func (d *Dao) LoadArcMeta(ctx context.Context, aid int64) (arcMeta *model.ArcCMS, err error)

LoadArcMeta loads the arc meta cms data from cache, for missed ones, pick them from the DB

func (*Dao) LoadArcsMedia

func (d *Dao) LoadArcsMedia(ctx context.Context, aids []int64) (arcs []*model.ArcCMS, err error)

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

func (d *Dao) LoadEpCMS(ctx context.Context, epid int64) (ep *model.EpCMS, err error)

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

func (d *Dao) LoadSnCMS(ctx context.Context, sid int64) (sn *model.SeasonCMS, err error)

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

func (d *Dao) LoadVideoMeta(ctx context.Context, cid int64) (videoMeta *model.VideoCMS, err error)

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

func (d *Dao) NewestOrder(c context.Context, sid int64) (epid int64, newestOrder int, err error)

NewestOrder picks one season's newest passed ep's order column value

func (*Dao) SeaCacheKey

func (d *Dao) SeaCacheKey(sid int64) string

SeaCacheKey .

func (*Dao) SeasonCMS

func (d *Dao) SeasonCMS(c context.Context, sid int64) (season *model.SeasonCMS, err error)

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

func (d *Dao) SetArcMetaCache(c context.Context, s *model.ArcCMS) (err error)

SetArcMetaCache save model.ArcCMS to memcache

func (*Dao) SetEpCMSCache

func (d *Dao) SetEpCMSCache(c context.Context, s *model.EpCMS) (err error)

SetEpCMSCache save model.EpCMS to memcache

func (*Dao) SetSnCMSCache

func (d *Dao) SetSnCMSCache(c context.Context, s *model.SeasonCMS) (err error)

SetSnCMSCache save model.SeasonCMS to memcache

func (*Dao) SetVideoMetaCache

func (d *Dao) SetVideoMetaCache(c context.Context, s *model.VideoCMS) (err error)

SetVideoMetaCache save model.VideoCMS to memcache

func (*Dao) SnAuth

func (d *Dao) SnAuth(c context.Context, sid int64) (sn *model.SnAuth, err error)

SnAuth get's season auth info from Cache & DB

func (*Dao) SnAuthDB

func (d *Dao) SnAuthDB(c context.Context, cid int64) (s *model.SnAuth, err error)

SnAuthDB .

func (*Dao) SnErrMsg

func (d *Dao) SnErrMsg(season *model.SnAuth) (bool, string)

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

func (d *Dao) UgcErrMsg(deleted int, result int, valid int) (bool, string)

UgcErrMsg returns the arc auth result and the error message in case of auth failure

func (*Dao) UnshelveArcs

func (d *Dao) UnshelveArcs(c context.Context, ids []int64) (err error)

UnshelveArcs unshelves the arcs

func (*Dao) VideoCMSCacheKey

func (d *Dao) VideoCMSCacheKey(cid int64) string

VideoCMSCacheKey .

func (*Dao) VideoMetaCache

func (d *Dao) VideoMetaCache(c context.Context, cid int64) (s *model.VideoCMS, err error)

VideoMetaCache get video cms cache.

func (*Dao) VideoMetaDB

func (d *Dao) VideoMetaDB(c context.Context, cid int64) (meta *model.VideoCMS, err error)

VideoMetaDB picks video from DB

func (*Dao) VideoMetas

func (d *Dao) VideoMetas(c context.Context, cids []int64) (meta map[int64]*model.VideoCMS, err error)

VideoMetas picks video from DB

func (*Dao) VideosMetaCache

func (d *Dao) VideosMetaCache(c context.Context, ids []int64) (cached map[int64]*model.VideoCMS, missed []int64, err error)

VideosMetaCache pick video cms meta cache

Jump to

Keyboard shortcuts

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