mocks

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockAPI

type BlockAPI struct {
	mock.Mock
}

BlockAPI is an autogenerated mock type for the BlockAPI type

func NewBlockAPI

func NewBlockAPI(t mockConstructorTestingTNewBlockAPI) *BlockAPI

NewBlockAPI creates a new instance of BlockAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BlockAPI) BestBlockHash

func (_m *BlockAPI) BestBlockHash() common.Hash

BestBlockHash provides a mock function with given fields:

func (*BlockAPI) FreeFinalisedNotifierChannel

func (_m *BlockAPI) FreeFinalisedNotifierChannel(ch chan *types.FinalisationInfo)

FreeFinalisedNotifierChannel provides a mock function with given fields: ch

func (*BlockAPI) FreeImportedBlockNotifierChannel

func (_m *BlockAPI) FreeImportedBlockNotifierChannel(ch chan *types.Block)

FreeImportedBlockNotifierChannel provides a mock function with given fields: ch

func (*BlockAPI) GetBlockByHash

func (_m *BlockAPI) GetBlockByHash(hash common.Hash) (*types.Block, error)

GetBlockByHash provides a mock function with given fields: hash

func (*BlockAPI) GetFinalisedHash

func (_m *BlockAPI) GetFinalisedHash(_a0 uint64, _a1 uint64) (common.Hash, error)

GetFinalisedHash provides a mock function with given fields: _a0, _a1

func (*BlockAPI) GetFinalisedNotifierChannel

func (_m *BlockAPI) GetFinalisedNotifierChannel() chan *types.FinalisationInfo

GetFinalisedNotifierChannel provides a mock function with given fields:

func (*BlockAPI) GetHashByNumber

func (_m *BlockAPI) GetHashByNumber(blockNumber uint) (common.Hash, error)

GetHashByNumber provides a mock function with given fields: blockNumber

func (*BlockAPI) GetHeader

func (_m *BlockAPI) GetHeader(hash common.Hash) (*types.Header, error)

GetHeader provides a mock function with given fields: hash

func (*BlockAPI) GetHighestFinalisedHash

func (_m *BlockAPI) GetHighestFinalisedHash() (common.Hash, error)

GetHighestFinalisedHash provides a mock function with given fields:

func (*BlockAPI) GetImportedBlockNotifierChannel

func (_m *BlockAPI) GetImportedBlockNotifierChannel() chan *types.Block

GetImportedBlockNotifierChannel provides a mock function with given fields:

func (*BlockAPI) GetJustification

func (_m *BlockAPI) GetJustification(hash common.Hash) ([]byte, error)

GetJustification provides a mock function with given fields: hash

func (*BlockAPI) GetRuntime

func (_m *BlockAPI) GetRuntime(blockHash common.Hash) (runtime.Instance, error)

GetRuntime provides a mock function with given fields: blockHash

func (*BlockAPI) HasJustification

func (_m *BlockAPI) HasJustification(hash common.Hash) (bool, error)

HasJustification provides a mock function with given fields: hash

func (*BlockAPI) RegisterRuntimeUpdatedChannel

func (_m *BlockAPI) RegisterRuntimeUpdatedChannel(ch chan<- runtime.Version) (uint32, error)

RegisterRuntimeUpdatedChannel provides a mock function with given fields: ch

func (*BlockAPI) SubChain

func (_m *BlockAPI) SubChain(start common.Hash, end common.Hash) ([]common.Hash, error)

SubChain provides a mock function with given fields: start, end

func (*BlockAPI) UnregisterRuntimeUpdatedChannel

func (_m *BlockAPI) UnregisterRuntimeUpdatedChannel(id uint32) bool

UnregisterRuntimeUpdatedChannel provides a mock function with given fields: id

type BlockFinalityAPI

type BlockFinalityAPI struct {
	mock.Mock
}

BlockFinalityAPI is an autogenerated mock type for the BlockFinalityAPI type

func NewBlockFinalityAPI

func NewBlockFinalityAPI(t mockConstructorTestingTNewBlockFinalityAPI) *BlockFinalityAPI

NewBlockFinalityAPI creates a new instance of BlockFinalityAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BlockFinalityAPI) GetRound

func (_m *BlockFinalityAPI) GetRound() uint64

GetRound provides a mock function with given fields:

func (*BlockFinalityAPI) GetSetID

func (_m *BlockFinalityAPI) GetSetID() uint64

GetSetID provides a mock function with given fields:

func (*BlockFinalityAPI) GetVoters

func (_m *BlockFinalityAPI) GetVoters() types.GrandpaVoters

GetVoters provides a mock function with given fields:

func (*BlockFinalityAPI) PreCommits

func (_m *BlockFinalityAPI) PreCommits() []ed25519.PublicKeyBytes

PreCommits provides a mock function with given fields:

func (*BlockFinalityAPI) PreVotes

func (_m *BlockFinalityAPI) PreVotes() []ed25519.PublicKeyBytes

PreVotes provides a mock function with given fields:

type BlockProducerAPI

type BlockProducerAPI struct {
	mock.Mock
}

BlockProducerAPI is an autogenerated mock type for the BlockProducerAPI type

func NewBlockProducerAPI

func NewBlockProducerAPI(t mockConstructorTestingTNewBlockProducerAPI) *BlockProducerAPI

NewBlockProducerAPI creates a new instance of BlockProducerAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BlockProducerAPI) EpochLength

func (_m *BlockProducerAPI) EpochLength() uint64

EpochLength provides a mock function with given fields:

func (*BlockProducerAPI) Pause

func (_m *BlockProducerAPI) Pause() error

Pause provides a mock function with given fields:

func (*BlockProducerAPI) Resume

func (_m *BlockProducerAPI) Resume() error

Resume provides a mock function with given fields:

func (*BlockProducerAPI) SlotDuration

func (_m *BlockProducerAPI) SlotDuration() uint64

SlotDuration provides a mock function with given fields:

type CoreAPI

type CoreAPI struct {
	mock.Mock
}

CoreAPI is an autogenerated mock type for the CoreAPI type

func NewCoreAPI

func NewCoreAPI(t mockConstructorTestingTNewCoreAPI) *CoreAPI

NewCoreAPI creates a new instance of CoreAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CoreAPI) DecodeSessionKeys

func (_m *CoreAPI) DecodeSessionKeys(enc []byte) ([]byte, error)

DecodeSessionKeys provides a mock function with given fields: enc

func (*CoreAPI) GetMetadata

func (_m *CoreAPI) GetMetadata(bhash *common.Hash) ([]byte, error)

GetMetadata provides a mock function with given fields: bhash

func (*CoreAPI) GetReadProofAt

func (_m *CoreAPI) GetReadProofAt(block common.Hash, keys [][]byte) (common.Hash, [][]byte, error)

GetReadProofAt provides a mock function with given fields: block, keys

func (*CoreAPI) GetRuntimeVersion

func (_m *CoreAPI) GetRuntimeVersion(bhash *common.Hash) (runtime.Version, error)

GetRuntimeVersion provides a mock function with given fields: bhash

func (*CoreAPI) HandleSubmittedExtrinsic

func (_m *CoreAPI) HandleSubmittedExtrinsic(_a0 types.Extrinsic) error

HandleSubmittedExtrinsic provides a mock function with given fields: _a0

func (*CoreAPI) HasKey

func (_m *CoreAPI) HasKey(pubKeyStr string, keyType string) (bool, error)

HasKey provides a mock function with given fields: pubKeyStr, keyType

func (*CoreAPI) InsertKey

func (_m *CoreAPI) InsertKey(kp crypto.Keypair, keystoreType string) error

InsertKey provides a mock function with given fields: kp, keystoreType

type NetworkAPI

type NetworkAPI struct {
	mock.Mock
}

NetworkAPI is an autogenerated mock type for the NetworkAPI type

func NewNetworkAPI

func NewNetworkAPI(t mockConstructorTestingTNewNetworkAPI) *NetworkAPI

NewNetworkAPI creates a new instance of NetworkAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*NetworkAPI) AddReservedPeers

func (_m *NetworkAPI) AddReservedPeers(addrs ...string) error

AddReservedPeers provides a mock function with given fields: addrs

func (*NetworkAPI) Health

func (_m *NetworkAPI) Health() common.Health

Health provides a mock function with given fields:

func (*NetworkAPI) IsStopped

func (_m *NetworkAPI) IsStopped() bool

IsStopped provides a mock function with given fields:

func (*NetworkAPI) NetworkState

func (_m *NetworkAPI) NetworkState() common.NetworkState

NetworkState provides a mock function with given fields:

func (*NetworkAPI) NodeRoles

func (_m *NetworkAPI) NodeRoles() common.Roles

NodeRoles provides a mock function with given fields:

func (*NetworkAPI) Peers

func (_m *NetworkAPI) Peers() []common.PeerInfo

Peers provides a mock function with given fields:

func (*NetworkAPI) RemoveReservedPeers

func (_m *NetworkAPI) RemoveReservedPeers(addrs ...string) error

RemoveReservedPeers provides a mock function with given fields: addrs

func (*NetworkAPI) Start

func (_m *NetworkAPI) Start() error

Start provides a mock function with given fields:

func (*NetworkAPI) StartingBlock

func (_m *NetworkAPI) StartingBlock() int64

StartingBlock provides a mock function with given fields:

func (*NetworkAPI) Stop

func (_m *NetworkAPI) Stop() error

Stop provides a mock function with given fields:

type RPCAPI

type RPCAPI struct {
	mock.Mock
}

RPCAPI is an autogenerated mock type for the RPCAPI type

func NewRPCAPI

func NewRPCAPI(t mockConstructorTestingTNewRPCAPI) *RPCAPI

NewRPCAPI creates a new instance of RPCAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RPCAPI) BuildMethodNames

func (_m *RPCAPI) BuildMethodNames(rcvr interface{}, name string)

BuildMethodNames provides a mock function with given fields: rcvr, name

func (*RPCAPI) Methods

func (_m *RPCAPI) Methods() []string

Methods provides a mock function with given fields:

type RuntimeStorageAPI

type RuntimeStorageAPI struct {
	mock.Mock
}

RuntimeStorageAPI is an autogenerated mock type for the RuntimeStorageAPI type

func NewRuntimeStorageAPI

func NewRuntimeStorageAPI(t mockConstructorTestingTNewRuntimeStorageAPI) *RuntimeStorageAPI

NewRuntimeStorageAPI creates a new instance of RuntimeStorageAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RuntimeStorageAPI) GetLocal

func (_m *RuntimeStorageAPI) GetLocal(k []byte) ([]byte, error)

GetLocal provides a mock function with given fields: k

func (*RuntimeStorageAPI) GetPersistent

func (_m *RuntimeStorageAPI) GetPersistent(k []byte) ([]byte, error)

GetPersistent provides a mock function with given fields: k

func (*RuntimeStorageAPI) SetLocal

func (_m *RuntimeStorageAPI) SetLocal(k []byte, v []byte) error

SetLocal provides a mock function with given fields: k, v

func (*RuntimeStorageAPI) SetPersistent

func (_m *RuntimeStorageAPI) SetPersistent(k []byte, v []byte) error

SetPersistent provides a mock function with given fields: k, v

type StorageAPI

type StorageAPI struct {
	mock.Mock
}

StorageAPI is an autogenerated mock type for the StorageAPI type

func NewStorageAPI

func NewStorageAPI(t mockConstructorTestingTNewStorageAPI) *StorageAPI

NewStorageAPI creates a new instance of StorageAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*StorageAPI) Entries

func (_m *StorageAPI) Entries(root *common.Hash) (map[string][]byte, error)

Entries provides a mock function with given fields: root

func (*StorageAPI) GetKeysWithPrefix

func (_m *StorageAPI) GetKeysWithPrefix(root *common.Hash, prefix []byte) ([][]byte, error)

GetKeysWithPrefix provides a mock function with given fields: root, prefix

func (*StorageAPI) GetStateRootFromBlock

func (_m *StorageAPI) GetStateRootFromBlock(bhash *common.Hash) (*common.Hash, error)

GetStateRootFromBlock provides a mock function with given fields: bhash

func (*StorageAPI) GetStorage

func (_m *StorageAPI) GetStorage(root *common.Hash, key []byte) ([]byte, error)

GetStorage provides a mock function with given fields: root, key

func (*StorageAPI) GetStorageByBlockHash

func (_m *StorageAPI) GetStorageByBlockHash(bhash *common.Hash, key []byte) ([]byte, error)

GetStorageByBlockHash provides a mock function with given fields: bhash, key

func (*StorageAPI) GetStorageChild

func (_m *StorageAPI) GetStorageChild(root *common.Hash, keyToChild []byte) (*trie.Trie, error)

GetStorageChild provides a mock function with given fields: root, keyToChild

func (*StorageAPI) GetStorageFromChild

func (_m *StorageAPI) GetStorageFromChild(root *common.Hash, keyToChild []byte, key []byte) ([]byte, error)

GetStorageFromChild provides a mock function with given fields: root, keyToChild, key

func (*StorageAPI) RegisterStorageObserver

func (_m *StorageAPI) RegisterStorageObserver(observer state.Observer)

RegisterStorageObserver provides a mock function with given fields: observer

func (*StorageAPI) UnregisterStorageObserver

func (_m *StorageAPI) UnregisterStorageObserver(observer state.Observer)

UnregisterStorageObserver provides a mock function with given fields: observer

type SyncStateAPI

type SyncStateAPI struct {
	mock.Mock
}

SyncStateAPI is an autogenerated mock type for the SyncStateAPI type

func NewSyncStateAPI

func NewSyncStateAPI(t mockConstructorTestingTNewSyncStateAPI) *SyncStateAPI

NewSyncStateAPI creates a new instance of SyncStateAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SyncStateAPI) GenSyncSpec

func (_m *SyncStateAPI) GenSyncSpec(raw bool) (*genesis.Genesis, error)

GenSyncSpec provides a mock function with given fields: raw

type SystemAPI

type SystemAPI struct {
	mock.Mock
}

SystemAPI is an autogenerated mock type for the SystemAPI type

func NewSystemAPI

func NewSystemAPI(t mockConstructorTestingTNewSystemAPI) *SystemAPI

NewSystemAPI creates a new instance of SystemAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SystemAPI) ChainName

func (_m *SystemAPI) ChainName() string

ChainName provides a mock function with given fields:

func (*SystemAPI) ChainType

func (_m *SystemAPI) ChainType() string

ChainType provides a mock function with given fields:

func (*SystemAPI) Properties

func (_m *SystemAPI) Properties() map[string]interface{}

Properties provides a mock function with given fields:

func (*SystemAPI) SystemName

func (_m *SystemAPI) SystemName() string

SystemName provides a mock function with given fields:

func (*SystemAPI) SystemVersion

func (_m *SystemAPI) SystemVersion() string

SystemVersion provides a mock function with given fields:

type TransactionStateAPI

type TransactionStateAPI struct {
	mock.Mock
}

TransactionStateAPI is an autogenerated mock type for the TransactionStateAPI type

func NewTransactionStateAPI

func NewTransactionStateAPI(t mockConstructorTestingTNewTransactionStateAPI) *TransactionStateAPI

NewTransactionStateAPI creates a new instance of TransactionStateAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TransactionStateAPI) FreeStatusNotifierChannel

func (_m *TransactionStateAPI) FreeStatusNotifierChannel(ch chan transaction.Status)

FreeStatusNotifierChannel provides a mock function with given fields: ch

func (*TransactionStateAPI) GetStatusNotifierChannel

func (_m *TransactionStateAPI) GetStatusNotifierChannel(ext types.Extrinsic) chan transaction.Status

GetStatusNotifierChannel provides a mock function with given fields: ext

func (*TransactionStateAPI) Pending

Pending provides a mock function with given fields:

Jump to

Keyboard shortcuts

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