mock

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facade

type Facade struct {
	GetAccountHandler      func(address string) (*data.Account, error)
	SendTransactionHandler func(nonce uint64, sender string, receiver string, value *big.Int, code string, signature []byte) (string, error)
}

Facade is the mock implementation of a node router handler

func (*Facade) GetAccount

func (f *Facade) GetAccount(address string) (*data.Account, error)

GetAccount is the mock implementation of a handler's GetAccount method

func (*Facade) SendTransaction

func (f *Facade) SendTransaction(nonce uint64, sender string, receiver string, value *big.Int, code string, signature []byte) (string, error)

SendTransaction is the mock implementation of a handler's SendTransaction method

type WrongFacade

type WrongFacade struct {
}

WrongFacade is a struct that can be used as a wrong implementation of the node router handler

Jump to

Keyboard shortcuts

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