mock

package
v1.17.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChequeStore

func NewChequeStore(opts ...Option) chequebook.ChequeStore

NewChequeStore creates the mock chequeStore implementation

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is the option passed to the mock ChequeStore service

func WithLastChequeFunc

func WithLastChequeFunc(f func(chequebook common.Address) (*chequebook.SignedCheque, error)) Option

func WithLastChequesFunc

func WithLastChequesFunc(f func() (map[common.Address]*chequebook.SignedCheque, error)) Option

func WithReceiveChequeFunc added in v1.0.0

func WithReceiveChequeFunc(f func(ctx context.Context, cheque *chequebook.SignedCheque, exchangeRate *big.Int, deduction *big.Int) (*big.Int, error)) Option

type Service

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

Service is the mock chequeStore service.

func (*Service) LastCheque

func (s *Service) LastCheque(chequebook common.Address) (*chequebook.SignedCheque, error)

func (*Service) LastCheques

func (s *Service) LastCheques() (map[common.Address]*chequebook.SignedCheque, error)

func (*Service) ReceiveCheque

func (s *Service) ReceiveCheque(ctx context.Context, cheque *chequebook.SignedCheque, exchangeRate, deduction *big.Int) (*big.Int, error)

Jump to

Keyboard shortcuts

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