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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Round

func Round(x float64) float64

Round 保留两位小数

Types

type Service

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

Service define service.

func New

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

New new a Service and return.

func (*Service) AddCoin

func (s *Service) AddCoin(c context.Context, arg *pb.AddCoinReq) (res *pb.AddCoinReply, err error)

AddCoin add coin to archive.

func (*Service) AddUserCoinExp

func (s *Service) AddUserCoinExp(c context.Context, arg *pb.AddUserCoinExpReq) (res *pb.AddUserCoinExpReply, err error)

AddUserCoinExp .

func (*Service) AddedCoins

func (s *Service) AddedCoins(c context.Context, mid, upMid int64) (a *coin.AddCoins, err error)

AddedCoins get coin added to up.

func (*Service) CheckBusiness

func (s *Service) CheckBusiness(bs string) (id int64, err error)

CheckBusiness .

func (*Service) Close

func (s *Service) Close() (err error)

Close .

func (*Service) CoinsLog

func (s *Service) CoinsLog(c context.Context, arg *pb.CoinsLogReq) (res *pb.CoinsLogReply, err error)

CoinsLog coins log

func (*Service) GetBusinessName

func (s *Service) GetBusinessName(id int64) (res string, err error)

GetBusinessName .

func (*Service) ItemCoin

func (s *Service) ItemCoin(c context.Context, aid, tp int64) (count int64, err error)

ItemCoin get creat count cache.

func (*Service) ItemUserCoins

func (s *Service) ItemUserCoins(c context.Context, arg *pb.ItemUserCoinsReq) (res *pb.ItemUserCoinsReply, err error)

ItemUserCoins get coins added of archive.

func (*Service) List

func (s *Service) List(c context.Context, arg *pb.ListReq) (res *pb.ListReply, err error)

List get coin added list.

func (*Service) ModifyCoins

func (s *Service) ModifyCoins(c context.Context, arg *pb.ModifyCoinsReq) (res *pb.ModifyCoinsReply, err error)

ModifyCoins modify user coins.

func (*Service) MustCheckBusiness

func (s *Service) MustCheckBusiness(bs string) (id int64, err error)

MustCheckBusiness . +wd:ignore

func (*Service) Ping

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

Ping check service health.

func (*Service) TodayExp

func (s *Service) TodayExp(c context.Context, arg *pb.TodayExpReq) (res *pb.TodayExpReply, err error)

TodayExp get today coin added exp.

func (*Service) UpdateAddCoin

func (s *Service) UpdateAddCoin(c context.Context, arg *pb.UpdateAddCoinReq) (res *pb.UpdateAddCoinReply, err error)

UpdateAddCoin .

func (*Service) UpdateItemCoins

func (s *Service) UpdateItemCoins(c context.Context, aid, tp, coins int64) (err error)

UpdateItemCoins set archive coin added.

func (*Service) UpdateSettle

func (s *Service) UpdateSettle(c context.Context, aid, tp, expSub int64, describe string) (err error)

UpdateSettle coin settle.

func (*Service) UserCoins

func (s *Service) UserCoins(c context.Context, arg *pb.UserCoinsReq) (res *pb.UserCoinsReply, err error)

UserCoins get user coins.

func (*Service) WebAddCoin

func (s *Service) WebAddCoin(c context.Context, mid, upmid, maxCoin, aid, tp, multiply int64, typeid int16) (err error)

WebAddCoin http api old api some day need remove

Jump to

Keyboard shortcuts

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