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: 27 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 service struct info.

func New

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

New service.

func (*Service) CheckDid

func (s *Service) CheckDid(did string) (ip, ft string)

CheckDid check did.

func (*Service) Decrypt

func (s *Service) Decrypt(src []byte, aesKey, aesIv string) (res []byte, err error)

Decrypt decrypt bytes by aes key and iv.

func (*Service) ErrReport

func (s *Service) ErrReport(ctx context.Context, req *model.ErrReport)

ErrReport reports the failures of calling the api "heartbeat/mobile"

func (*Service) FlashSigned

func (s *Service) FlashSigned(params url.Values, secret string, now time.Time) (err error)

FlashSigned flash Signed.

func (*Service) GenDid

func (s *Service) GenDid(ip string, now time.Time) string

GenDid gen did.

func (*Service) Play

func (s *Service) Play(c context.Context, plat, aid, cid, part, mid, level, ftime, stime, did, ip, agent, buvid, cookieSid, refer, typeID, subType, sid, epid, playMode, platform, device, mobiAapp, autoPlay, session string)

Play send play count to kafka.

func (*Service) Report

func (s *Service) Report(c context.Context, proStr, cidStr, tpStr, subType, realtimeStr, aidStr, midstr, sidStr, epidStr, dtStr, tsStr string) (err error)

Report report to history.

func (*Service) SuccReport

func (s *Service) SuccReport(ctx context.Context, req *model.SuccReport)

SuccReport reports the success of calling the api "heartbeat/mobile"

func (*Service) Verify

func (s *Service) Verify(src []byte, aesSalt string, now time.Time) (p url.Values, err error)

Verify verify bytes from post body.

Directories

Path Synopsis
crypto
aes

Jump to

Keyboard shortcuts

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