Documentation
¶
Index ¶
- Variables
- type FaultyBlockchain
- type MockBlockchain
- func (blockchain *MockBlockchain) Balances() (map[tokens.Name]blockchain.Balance, error)
- func (bc *MockBlockchain) GetAddress(password string, blockchainName tokens.BlockchainName) (string, error)
- func (bc *MockBlockchain) Lookup(token tokens.Token, txHash string) (transfer.UpdateReceipt, error)
- func (bc *MockBlockchain) Transfer(password string, token tokens.Token, to string, amount *big.Int, ...) (string, blockchain.Cost, error)
- func (blockchain *MockBlockchain) UpdateBalance(balance map[tokens.Name]blockchain.Balance)
- type MockCallback
- type MockStorage
- func (store *MockStorage) PutReceipt(receipt swap.SwapReceipt) error
- func (store *MockStorage) PutTransfer(receipt transfer.TransferReceipt) error
- func (store *MockStorage) Receipt(id swap.SwapID) (swap.SwapReceipt, error)
- func (store *MockStorage) Receipts() ([]swap.SwapReceipt, error)
- func (store *MockStorage) Transfers() ([]transfer.TransferReceipt, error)
- func (store *MockStorage) UpdateReceipt(update swap.ReceiptUpdate) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type FaultyBlockchain ¶
type FaultyBlockchain struct {
// contains filtered or unexported fields
}
func NewFaultyBlockchain ¶
func NewFaultyBlockchain(balance map[tokens.Name]blockchain.Balance) *FaultyBlockchain
func (*FaultyBlockchain) Balances ¶
func (blockchain *FaultyBlockchain) Balances() (map[tokens.Name]blockchain.Balance, error)
type MockBlockchain ¶
type MockBlockchain struct {
// contains filtered or unexported fields
}
MockBlockchain implements the `balance.Blockchain` interface.
func NewMockBlockchain ¶
func NewMockBlockchain(balance map[tokens.Name]blockchain.Balance) *MockBlockchain
NewMockBlockchain creates a new `MockBlockchain`.
func (*MockBlockchain) Balances ¶
func (blockchain *MockBlockchain) Balances() (map[tokens.Name]blockchain.Balance, error)
Balances implements the `balance.Blockchain` interface.
func (*MockBlockchain) GetAddress ¶
func (bc *MockBlockchain) GetAddress(password string, blockchainName tokens.BlockchainName) (string, error)
func (*MockBlockchain) Lookup ¶
func (bc *MockBlockchain) Lookup(token tokens.Token, txHash string) (transfer.UpdateReceipt, error)
func (*MockBlockchain) Transfer ¶
func (bc *MockBlockchain) Transfer(password string, token tokens.Token, to string, amount *big.Int, speed blockchain.TxExecutionSpeed, sendAll bool) (string, blockchain.Cost, error)
func (*MockBlockchain) UpdateBalance ¶
func (blockchain *MockBlockchain) UpdateBalance(balance map[tokens.Name]blockchain.Balance)
UpdateBalance with given data.
type MockCallback ¶
type MockCallback struct {
// contains filtered or unexported fields
}
func NewMockCallback ¶
func NewMockCallback(err error) *MockCallback
func (*MockCallback) DelayCallback ¶
type MockStorage ¶
type MockStorage struct {
// contains filtered or unexported fields
}
func NewMockStorage ¶
func NewMockStorage() *MockStorage
func (*MockStorage) PutReceipt ¶
func (store *MockStorage) PutReceipt(receipt swap.SwapReceipt) error
func (*MockStorage) PutTransfer ¶
func (store *MockStorage) PutTransfer(receipt transfer.TransferReceipt) error
func (*MockStorage) Receipt ¶
func (store *MockStorage) Receipt(id swap.SwapID) (swap.SwapReceipt, error)
func (*MockStorage) Receipts ¶
func (store *MockStorage) Receipts() ([]swap.SwapReceipt, error)
func (*MockStorage) Transfers ¶
func (store *MockStorage) Transfers() ([]transfer.TransferReceipt, error)
func (*MockStorage) UpdateReceipt ¶
func (store *MockStorage) UpdateReceipt(update swap.ReceiptUpdate) error
Click to show internal directories.
Click to hide internal directories.