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: 30 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 {

	// PasterAIDCache
	PasterAIDCache []map[int64]int64
	// contains filtered or unexported fields
}

Service define resource service

func New

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

New return service object

func (*Service) AbTest

func (s *Service) AbTest(c context.Context, names, ipaddr string) (res map[string]*model.AbTest)

AbTest get abtest by group name

func (*Service) AssignmentAll

func (s *Service) AssignmentAll(c context.Context) (ass []*model.Assignment)

AssignmentAll get all assignment

func (*Service) Audit

func (s *Service) Audit(c context.Context) map[string][]int

Audit all audit config.

func (*Service) Banners

func (s *Service) Banners(c context.Context, plat int8, build int, aid, mid int64, resIdsStr, channel, ip, buvid, network, mobiApp, device, openEvent, adExtra, version string, isAd bool) (res *model.Banners)

Banners get banners by plat, build channel, ip for app-feed.

func (*Service) Close

func (s *Service) Close()

Close close service

func (*Service) Cmtbox

func (s *Service) Cmtbox(c context.Context, id int64) (re *model.Cmtbox, err error)

Cmtbox get live danmaku box

func (*Service) DefBanner

func (s *Service) DefBanner(c context.Context) (defbanner *model.Assignment)

DefBanner get defbanner config

func (*Service) IndexIcon

func (s *Service) IndexIcon(c context.Context) (icons map[string][]*model.IndexIcon)

IndexIcon get index icon

func (*Service) Monitor

func (s *Service) Monitor(c context.Context)

Monitor for monitorURL

func (*Service) PasterAPP

func (s *Service) PasterAPP(c context.Context, plat, adType int8, aid, typeID, buvid string) (res *model.Paster, err error)

PasterAPP get paster for app nologin

func (*Service) PasterCID

func (s *Service) PasterCID(c context.Context) (res map[int64]int64, err error)

PasterCID get all Paster's cid.

func (*Service) PasterPGC

func (s *Service) PasterPGC(c context.Context, plat, adType int8, sid string) (res *model.Paster, err error)

PasterPGC get paster for pgc

func (*Service) Ping

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

Ping ping service

func (*Service) PlayerIcon

func (s *Service) PlayerIcon(c context.Context) (re *model.PlayerIcon, err error)

PlayerIcon get player icon

func (*Service) RegionCard

func (s *Service) RegionCard(c context.Context, plat int8, build int) (res *model.Head, err error)

RegionCard get voice card.

func (*Service) Relate

func (s *Service) Relate(ctx context.Context, req *pb.RelateRequest) (special *pb.SpecialReply, err error)

Relate Relate card grpc

func (*Service) Resource

func (s *Service) Resource(c context.Context, resID int) (res *model.Resource)

Resource get resource by resource_id or positon_id

func (*Service) ResourceAll

func (s *Service) ResourceAll(c context.Context) (res []*model.Resource)

ResourceAll get all resource

func (*Service) Resources

func (s *Service) Resources(c context.Context, resIDs []int) (res map[int]*model.Resource)

Resources get resources by resource_ids or position_ids

func (*Service) SideBars

func (s *Service) SideBars(c context.Context) (res *model.SideBars)

SideBars get side bars

func (*Service) UpdateAbTestCache

func (s *Service) UpdateAbTestCache(nabs []*model.AbTest)

UpdateAbTestCache update abtest

Jump to

Keyboard shortcuts

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