tcc

package
v0.0.0-...-daf8b82 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TccRmBankServiceBasePath = "/transfer/tcc"
)

Functions

func StartRm

func StartRm(listen string, db *gorm.DB, protocol string) error

Types

type BankAccount

type BankAccount struct {
	Id      int
	Balance int
	Freeze  int `gorm:"balance_freeze"`
}

func (*BankAccount) TableName

func (*BankAccount) TableName() string

type BankAccountRecord

type BankAccountRecord struct {
	UserID  int
	Account int
	Fail    bool
}

type TccRmBankGrpcService

type TccRmBankGrpcService struct {
	pb.UnimplementedTccBankServiceServer
	// contains filtered or unexported fields
}

func NewTccRmBankGrpcService

func NewTccRmBankGrpcService(listen string, db *gorm.DB) *TccRmBankGrpcService

func (*TccRmBankGrpcService) Cancel

func (rm *TccRmBankGrpcService) Cancel(ctx context.Context, request *pb.TccRequest) (*pb.TccResponse, error)

func (*TccRmBankGrpcService) Confirm

func (rm *TccRmBankGrpcService) Confirm(ctx context.Context, request *pb.TccRequest) (*pb.TccResponse, error)

func (*TccRmBankGrpcService) Start

func (rm *TccRmBankGrpcService) Start() error

func (*TccRmBankGrpcService) Try

func (rm *TccRmBankGrpcService) Try(ctx context.Context, request *pb.TccRequest) (*pb.TccResponse, error)

func (*TccRmBankGrpcService) Try2

func (rm *TccRmBankGrpcService) Try2(ctx context.Context, request *pb.TccRequest) (*pb.TccResponse, error)

type TccRmBankService

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

func NewTccRmBankService

func NewTccRmBankService(listen string, db *gorm.DB) *TccRmBankService

func (*TccRmBankService) Start

func (rm *TccRmBankService) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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