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: 14 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 struct

func New

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

New init

func (*Service) AddPoint

func (s *Service) AddPoint(c context.Context, pc *model.ArgPoint) (status int8, err error)

AddPoint .

func (*Service) AllConfig

func (s *Service) AllConfig(c context.Context) map[string]int64

AllConfig all point config

func (*Service) Close

func (s *Service) Close()

Close Service

func (*Service) Config

func (s *Service) Config(c context.Context, changeType int, mid int64, bp float64) (point int64, err error)

Config get point config.

func (*Service) ConsumePoint

func (s *Service) ConsumePoint(c context.Context, pc *model.ArgPointConsume) (status int8, err error)

ConsumePoint .

func (*Service) OldPointHistory

func (s *Service) OldPointHistory(c context.Context, mid int64, pn, ps int) (phs []*model.OldPointHistory, total int, err error)

OldPointHistory old point history .

func (*Service) Ping

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

Ping Service

func (*Service) PointAddByBp

func (s *Service) PointAddByBp(c context.Context, pa *model.ArgPointAdd) (p int64, err error)

PointAddByBp by bp.

func (*Service) PointHistory

func (s *Service) PointHistory(c context.Context, mid int64, cursor, ps int) (phs []*model.PointHistory, total int, ncursor int, err error)

PointHistory .

func (*Service) PointInfo

func (s *Service) PointInfo(c context.Context, mid int64) (pi *model.PointInfo, err error)

PointInfo .

Jump to

Keyboard shortcuts

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