Documentation ¶
Index ¶
- func NewChequeStore(opts ...Option) chequebook.ChequeStore
- type Option
- func WithLastChequeFunc(f func(chequebook common.Address) (*chequebook.SignedCheque, error)) Option
- func WithLastChequesFunc(f func() (map[common.Address]*chequebook.SignedCheque, error)) Option
- func WithRetrieveChequeFunc(f func(ctx context.Context, cheque *chequebook.SignedCheque) (*big.Int, error)) Option
- type Service
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)
Click to show internal directories.
Click to hide internal directories.