servers

package
Version: v0.0.0-...-a6a5f53 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAccountsServer

type FakeAccountsServer struct {
	*bufconn.Listener
	accounts.UnimplementedAccountsServiceServer

	// Functions to be mocked if needed
	OnDeposit    func(ctx context.Context, req *accounts.Request) (*accounts.Response, error)
	OnWithdrawal func(ctx context.Context, req *accounts.Request) (*accounts.Response, error)
	OnReserve    func(ctx context.Context, req *accounts.Request) (*accounts.Response, error)
}

func NewFakeAccountsServer

func NewFakeAccountsServer() *FakeAccountsServer

func (*FakeAccountsServer) Deposit

func (*FakeAccountsServer) ReserveCreditLimit

func (s *FakeAccountsServer) ReserveCreditLimit(ctx context.Context, req *accounts.Request) (*accounts.Response, error)

func (*FakeAccountsServer) Withdrawal

Source Files

Jump to

Keyboard shortcuts

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