service

package
v0.0.0-...-3a05b22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankService

type BankService struct {
	Money map[int]int
}

func GetBankServiceRpc

func GetBankServiceRpc() (*BankService, error)

func InitBankService

func InitBankService(b *BankService) (*BankService, error)

func (*BankService) AddMoney

func (b *BankService) AddMoney(id, num int) error

func (*BankService) AddMoneyRollback

func (b *BankService) AddMoneyRollback(id, num int, errMsg string)

func (*BankService) GetMoney

func (b *BankService) GetMoney(id int) int

func (*BankService) RemoveMoney

func (b *BankService) RemoveMoney(id, num int) error

func (*BankService) RemoveMoneyRollback

func (b *BankService) RemoveMoneyRollback(id, num int, errMsg string)

type BankServiceConstructFunc

type BankServiceConstructFunc func(impl *BankService) (*BankService, error)

type BankServiceIOCInterface

type BankServiceIOCInterface interface {
	GetMoney(id int) int
	AddMoney(id, num int) error
	AddMoneyRollback(id, num int, errMsg string)
	RemoveMoney(id, num int) error
	RemoveMoneyRollback(id, num int, errMsg string)
}

func GetBankServiceIOCInterfaceRpc

func GetBankServiceIOCInterfaceRpc() (BankServiceIOCInterface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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