mock

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 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 WithRetrieveChequeFunc

func WithRetrieveChequeFunc(f func(ctx context.Context, cheque *chequebook.SignedCheque) (*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) (*big.Int, error)

Jump to

Keyboard shortcuts

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