Documentation
¶
Index ¶
- func NewChequeStore(opts ...Option) vault.ChequeStore
- type Option
- func WithLastChequeFunc(f func(vault common.Address) (*vault.SignedCheque, error)) Option
- func WithLastChequesFunc(f func() (map[common.Address]*vault.SignedCheque, error)) Option
- func WithLastReceivedChequeFunc(f func(vault common.Address) (*vault.SignedCheque, error)) Option
- func WithLastReceivedChequesFunc(f func() (map[common.Address]*vault.SignedCheque, error)) Option
- func WithReceiveChequeFunc(...) Option
- func WithReceivedChequeRecordsAllFunc(f func() (map[common.Address][]vault.ChequeRecord, error)) Option
- func WithReceivedChequeRecordsByPeerFunc(f func(vault common.Address) ([]vault.ChequeRecord, error)) Option
- func WithReceivedStatsHistoryFunc(f func(days int) ([]vault.DailyReceivedStats, error)) Option
- func WithSendChequeRecordsAllFunc(f func() (map[common.Address][]vault.ChequeRecord, error)) Option
- func WithSendChequeRecordsByPeerFunc(f func(beneficiary common.Address) ([]vault.ChequeRecord, error)) Option
- func WithSentStatsHistoryFunc(f func(days int) ([]vault.DailySentStats, error)) Option
- func WithStoreSendChequeRecordFunc(f func(vault, beneficiary common.Address, amount *big.Int) error) Option
- type Service
- func (s *Service) LastCheque(vault common.Address) (*vault.SignedCheque, error)
- func (s *Service) LastCheques() (map[common.Address]*vault.SignedCheque, error)
- func (s *Service) LastReceivedCheque(vault common.Address, token common.Address) (*vault.SignedCheque, error)
- func (s *Service) LastReceivedCheques(token common.Address) (map[common.Address]*vault.SignedCheque, error)
- func (s *Service) ReceiveCheque(ctx context.Context, cheque *vault.SignedCheque, exchangeRate *big.Int, ...) (*big.Int, error)
- func (s *Service) ReceivedChequeRecordsAll() (map[common.Address][]vault.ChequeRecord, error)
- func (s *Service) ReceivedChequeRecordsByPeer(vault common.Address) ([]vault.ChequeRecord, error)
- func (s *Service) ReceivedStatsHistory(days int, token common.Address) ([]vault.DailyReceivedStats, error)
- func (s *Service) SendChequeRecordsAll() (map[common.Address][]vault.ChequeRecord, error)
- func (s *Service) SendChequeRecordsByPeer(beneficiary common.Address) ([]vault.ChequeRecord, error)
- func (s *Service) SentStatsHistory(days int, token common.Address) ([]vault.DailySentStats, error)
- func (s *Service) StoreSendChequeRecord(vault, beneficiary common.Address, amount *big.Int, token common.Address) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChequeStore ¶
func NewChequeStore(opts ...Option) vault.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 WithLastChequesFunc ¶
func WithReceiveChequeFunc ¶
func WithReceivedStatsHistoryFunc ¶
func WithReceivedStatsHistoryFunc(f func(days int) ([]vault.DailyReceivedStats, error)) Option
func WithSentStatsHistoryFunc ¶
func WithSentStatsHistoryFunc(f func(days int) ([]vault.DailySentStats, error)) Option
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the mock chequeStore service.
func (*Service) LastCheque ¶
func (*Service) LastCheques ¶
func (*Service) LastReceivedCheque ¶
func (s *Service) LastReceivedCheque(vault common.Address, token common.Address) (*vault.SignedCheque, error)
LastReceivedCheque returns the last cheque we received from a specific vault.
func (*Service) LastReceivedCheques ¶
func (s *Service) LastReceivedCheques(token common.Address) (map[common.Address]*vault.SignedCheque, error)
LastReceivedCheques return map[vault]cheque
func (*Service) ReceiveCheque ¶
func (*Service) ReceivedChequeRecordsAll ¶
ListReceivedChequeRecords returns the records we received from a specific vault.
func (*Service) ReceivedChequeRecordsByPeer ¶
ReceivedChequeRecordsByPeer returns the records we received from a specific vault.
func (*Service) ReceivedStatsHistory ¶
func (*Service) SendChequeRecordsAll ¶
SendChequeRecordsAll returns the records we send to a specific vault.
func (*Service) SendChequeRecordsByPeer ¶
SendChequeRecordsByPeer returns the records we send to a specific vault.
func (*Service) SentStatsHistory ¶
Click to show internal directories.
Click to hide internal directories.