Documentation ¶
Index ¶
- type Service
- func (s *Service) EpMsg(epid, build int64) (ok bool, msg string, err error)
- func (s *Service) EsPgcIdx(ctx context.Context, req *search.ReqPgcIdx) (res *search.EsPager, err error)
- func (s *Service) EsUgcIdx(ctx context.Context, req *search.ReqUgcIdx) (res *search.EsPager, err error)
- func (s *Service) FollowData(ctx context.Context, accessKey string) (res []*model.Follow)
- func (s *Service) HomeFollow(ctx context.Context, req *model.ReqHomeFollow) (data *model.Homepage, err error)
- func (s *Service) HomeJP(zoneData []*model.Card) (latest []*model.Card, list []*model.Card)
- func (s *Service) HomeList() (list map[string][]*model.Card, latest []*model.Card)
- func (s *Service) HomeRecom(ctx context.Context) (homeRecom []*model.Card, err error)
- func (s *Service) LoadZoneIdx(page int, category int) (idxSns []*model.IdxSeason, pager *model.IdxPager, err error)
- func (s *Service) ModHome() (homepage []*model.Module, err error)
- func (s *Service) PageFollow(c context.Context, req *model.ReqPageFollow) (res []*model.Module, err error)
- func (s *Service) PgcCards(ids []int64) (res map[int64]string, err error)
- func (s *Service) RecomFilter(sid string, stype string) (res []*model.Recom, err error)
- func (s *Service) Regions(ctx context.Context) (res []*model.Region, err error)
- func (s *Service) SearchTypes() (res []*model.ArcType, err error)
- func (s *Service) SnMsg(sid int64) (ok bool, msg string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { TVAppInfo *conf.TVApp // tv app basic info // memory HomeData *model.Homepage // homepage data ZoneData map[int][]*model.Card // zone list data for homepage RankData map[int]map[string][]*model.Card // zone pages data HeaderSids map[int]int // use to remove duplicated ones ZoneSids map[int]map[int]int // same use as HeaderSids ZonesInfo map[int]*conf.PageCfg // zones information data PGCOrigins map[int][]*model.Card // pgc zone list data UGCOrigins map[int][]*model.Card // pgc types data PGCIndexShow map[int64]string // pgc index show data ModPages map[int][]*model.Module // module pages IdxIntervs *seaMdl.IdxIntervSave // index intervention storage RegionInfo []*model.Region // region all MaxTime int64 // contains filtered or unexported fields }
Service .
func (*Service) EsPgcIdx ¶
func (s *Service) EsPgcIdx(ctx context.Context, req *search.ReqPgcIdx) (res *search.EsPager, err error)
EsPgcIdx returns the elastic search index page result
func (*Service) EsUgcIdx ¶
func (s *Service) EsUgcIdx(ctx context.Context, req *search.ReqUgcIdx) (res *search.EsPager, err error)
EsUgcIdx def.
func (*Service) FollowData ¶
FollowData gets the follow data from pgc api
func (*Service) HomeFollow ¶
func (s *Service) HomeFollow(ctx context.Context, req *model.ReqHomeFollow) (data *model.Homepage, err error)
HomeFollow picks the homepage with follow data
func (*Service) HomeRecom ¶
HomeRecom for the Homepage header, merge the rank data and the intervention data and gets the final header data
func (*Service) LoadZoneIdx ¶
func (s *Service) LoadZoneIdx(page int, category int) (idxSns []*model.IdxSeason, pager *model.IdxPager, err error)
LoadZoneIdx loads zone index page data
func (*Service) PageFollow ¶
func (s *Service) PageFollow(c context.Context, req *model.ReqPageFollow) (res []*model.Module, err error)
PageFollow serves the http level, it picks the follow location and fill in with follow data and then output
func (*Service) RecomFilter ¶
RecomFilter gets the recommend data from PGC API and filter the not passed seasons
func (*Service) SearchTypes ¶
SearchTypes return the ugc types
Click to show internal directories.
Click to hide internal directories.