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: 25 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 {
	DB *gorm.DB
	// contains filtered or unexported fields
}

Service biz service def.

func New

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

New new a Service and return.

func (*Service) AddDPTask

func (s *Service) AddDPTask(ctx context.Context, task *model.DPTask) (err error)

AddDPTask add data platform task

func (*Service) AddTask

func (s *Service) AddTask(c context.Context, task *model.Task) (err error)

AddTask add task.

func (*Service) CheckDpData

func (s *Service) CheckDpData(ctx context.Context) (err error)

CheckDpData check whether data platform data is ready

func (*Service) CheckUploadMid

func (s *Service) CheckUploadMid(c context.Context, data []byte) (err error)

CheckUploadMid checks uploaded mid validation.

func (*Service) CheckUploadToken

func (s *Service) CheckUploadToken(c context.Context, data []byte) (err error)

CheckUploadToken checks uploaded token validation.

func (*Service) Close

func (s *Service) Close()

Close close all dao.

func (*Service) DpTaskInfo

func (s *Service) DpTaskInfo(ctx context.Context, id int64, job string) (res *model.DPTask, err error)

DpTaskInfo .

func (*Service) Ping

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

Ping check dao health.

func (*Service) TestPushMid

func (s *Service) TestPushMid(c context.Context, mid string, task *model.Task) (err error)

TestPushMid test push by mid.

func (*Service) TestPushToken

func (s *Service) TestPushToken(c context.Context, info *pushmdl.PushInfo, platform int, token string) (err error)

TestPushToken test push by token.

func (*Service) UpdateDpCondtionStatus

func (s *Service) UpdateDpCondtionStatus(ctx context.Context, job string, status int) (err error)

UpdateDpCondtionStatus .

func (*Service) Upimg

func (s *Service) Upimg(ctx context.Context, file multipart.File, header *multipart.FileHeader) (url string, err error)

Upimg upload image

func (*Service) Upload

func (s *Service) Upload(c context.Context, dir, path string, data []byte) (err error)

Upload add mids file.

func (*Service) Wait

func (s *Service) Wait()

Wait wait all closed.

Jump to

Keyboard shortcuts

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