service

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is service.

func New

func New(c *conf.Config) (s *Service)

New new a Service and return.

func (*Service) AddRegionArc

func (s *Service) AddRegionArc(c context.Context, aid int64) (err error)

AddRegionArc add a archive cache by aid.

func (*Service) AddRegionArcs

func (s *Service) AddRegionArcs(c context.Context, rid int16) (err error)

AddRegionArcs load region arcs into redis.

func (*Service) AddUpperPassedCache

func (s *Service) AddUpperPassedCache(c context.Context, aid int64) (err error)

AddUpperPassedCache add up passed archive cache.

func (*Service) AllTypes

func (s *Service) AllTypes(c context.Context) (types map[int16]*archive.ArcType)

AllTypes return all types

func (*Service) Archive3

func (s *Service) Archive3(c context.Context, aid int64) (a *api.Arc, err error)

Archive3 get a archive by aid.

func (*Service) Archives3

func (s *Service) Archives3(c context.Context, aids []int64) (as map[int64]*api.Arc, err error)

Archives3 multi get archives.

func (*Service) ArchivesWithPlayer

func (s *Service) ArchivesWithPlayer(c context.Context, arg *archive.ArgPlayer, showPGCPlayurl bool) (ap map[int64]*archive.ArchiveWithPlayer, err error)

ArchivesWithPlayer with player

func (*Service) CacheUpdate

func (s *Service) CacheUpdate(c context.Context, aid int64, tp string, oldMid int64) (err error)

CacheUpdate job update/del/add archive cache

func (*Service) Click3

func (s *Service) Click3(c context.Context, aid int64) (clk *api.Click, err error)

Click3 get archive click.

func (*Service) Close

func (s *Service) Close()

Close resource.

func (*Service) DelRegionArc

func (s *Service) DelRegionArc(c context.Context, aid int64, rid int16) (err error)

DelRegionArc delete a archive cache by aid.

func (*Service) DelUpperPassedCache

func (s *Service) DelUpperPassedCache(c context.Context, aid, mid int64) (err error)

DelUpperPassedCache delete up passed archive cache.

func (*Service) DelVideo

func (s *Service) DelVideo(c context.Context, aid, cid int64) (err error)

DelVideo delete video by aid & cid

func (*Service) Description

func (s *Service) Description(c context.Context, aid int64) (des string, err error)

Description update page by aid & cid

func (*Service) FieldCacheUpdate

func (s *Service) FieldCacheUpdate(c context.Context, aid int64, oldType, nwType int16) (err error)

FieldCacheUpdate job update field cache

func (*Service) MaxAID

func (s *Service) MaxAID(c context.Context) (id int64, err error)

MaxAID get max aid

func (*Service) Page3

func (s *Service) Page3(c context.Context, aid int64) (ps []*api.Page, err error)

Page3 get page by aid

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping ping success.

func (*Service) RegionAllArcs3

func (s *Service) RegionAllArcs3(c context.Context, pn, ps int) (as *archive.RankArchives3, err error)

RegionAllArcs3 get left 7 days all region arcs

func (*Service) RegionArcs3

func (s *Service) RegionArcs3(c context.Context, rid int16, pn, ps int) (as []*api.Arc, count int, err error)

RegionArcs3 region archives.

func (*Service) RegionOriginArcs3

func (s *Service) RegionOriginArcs3(c context.Context, rid int16, pn, ps int) (as []*api.Arc, count int, err error)

RegionOriginArcs3 region origin archives.

func (*Service) RegionTopArcs3

func (s *Service) RegionTopArcs3(c context.Context, reid int16, pn, ps int) (as []*api.Arc, err error)

RegionTopArcs3 top region archives order by pubtime.

func (*Service) RegionTopCount

func (s *Service) RegionTopCount(c context.Context, reids []int16) (res map[int16]int, err error)

RegionTopCount top region count when one day.

func (*Service) SetStat

func (s *Service) SetStat(c context.Context, st *api.Stat) (err error)

SetStat set all stat

func (*Service) Stat3

func (s *Service) Stat3(c context.Context, aid int64) (st *api.Stat, err error)

Stat3 get archive stat.

func (*Service) Stats3

func (s *Service) Stats3(c context.Context, aids []int64) (stm map[int64]*api.Stat, err error)

Stats3 get archive stat.

func (*Service) UpVideo

func (s *Service) UpVideo(c context.Context, aid, cid int64) (err error)

UpVideo update video by aid & cid

func (*Service) UpperCache

func (s *Service) UpperCache(c context.Context, mid int64, action string) (err error)

UpperCache update upper cache.

func (*Service) UpperCount

func (s *Service) UpperCount(c context.Context, mid int64) (count int, err error)

UpperCount upper count.

func (*Service) UpperPassed3

func (s *Service) UpperPassed3(c context.Context, mid int64, pn, ps int) (as []*api.Arc, err error)

UpperPassed3 upper passed.

func (*Service) UpperReommend

func (s *Service) UpperReommend(c context.Context, aid int64) (as []*api.Arc, err error)

UpperReommend from archive_recommend by aid

func (*Service) UppersAidPubTime

func (s *Service) UppersAidPubTime(c context.Context, mids []int64, pn, ps int) (mas map[int64][]*archive.AidPubTime, err error)

UppersAidPubTime get aid and pime by mids

func (*Service) UppersCount

func (s *Service) UppersCount(c context.Context, mids []int64) (uc map[int64]int, err error)

UppersCount uppers count

func (*Service) UppersPassed3

func (s *Service) UppersPassed3(c context.Context, mids []int64, pn, ps int) (mas map[int64][]*api.Arc, err error)

UppersPassed3 get archives by mids.

func (*Service) Video3

func (s *Service) Video3(c context.Context, aid, cid int64) (video *api.Page, err error)

Video3 get video by aid & cid

func (*Service) Videoshot

func (s *Service) Videoshot(c context.Context, aid, cid int64) (shot *archive.Videoshot, err error)

Videoshot get video shot.

func (*Service) View3

func (s *Service) View3(c context.Context, aid int64) (v *api.ViewReply, err error)

View3 get archive with video.

func (*Service) Views3

func (s *Service) Views3(c context.Context, aids []int64) (vm map[int64]*api.ViewReply, err error)

Views3 get archives with videos.

Jump to

Keyboard shortcuts

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