mocks

package
v1.5.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v1.4.3

type API struct {
	mock.Mock
}

API is an autogenerated mock type for the API type

func NewAPI added in v1.4.3

func NewAPI(t mockConstructorTestingTNewAPI) *API

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

func (*API) BlockAddr added in v1.4.3

func (_m *API) BlockAddr(ctx context.Context, ip net.IP) error

BlockAddr provides a mock function with given fields: ctx, ip

func (*API) BlockPeer added in v1.4.3

func (_m *API) BlockPeer(ctx context.Context, p peer.ID) error

BlockPeer provides a mock function with given fields: ctx, p

func (*API) BlockSubnet added in v1.4.3

func (_m *API) BlockSubnet(ctx context.Context, ipnet *net.IPNet) error

BlockSubnet provides a mock function with given fields: ctx, ipnet

func (*API) ConnectPeer added in v1.4.3

func (_m *API) ConnectPeer(ctx context.Context, addr string) error

ConnectPeer provides a mock function with given fields: ctx, addr

func (*API) DisconnectPeer added in v1.4.3

func (_m *API) DisconnectPeer(ctx context.Context, id peer.ID) error

DisconnectPeer provides a mock function with given fields: ctx, id

func (*API) DiscoveryTable added in v1.4.3

func (_m *API) DiscoveryTable(ctx context.Context) ([]*enode.Node, error)

DiscoveryTable provides a mock function with given fields: ctx

func (*API) EXPECT added in v1.4.3

func (_m *API) EXPECT() *API_Expecter

func (*API) ListBlockedAddrs added in v1.4.3

func (_m *API) ListBlockedAddrs(ctx context.Context) ([]net.IP, error)

ListBlockedAddrs provides a mock function with given fields: ctx

func (*API) ListBlockedPeers added in v1.4.3

func (_m *API) ListBlockedPeers(ctx context.Context) ([]peer.ID, error)

ListBlockedPeers provides a mock function with given fields: ctx

func (*API) ListBlockedSubnets added in v1.4.3

func (_m *API) ListBlockedSubnets(ctx context.Context) ([]*net.IPNet, error)

ListBlockedSubnets provides a mock function with given fields: ctx

func (*API) PeerStats added in v1.4.3

func (_m *API) PeerStats(ctx context.Context) (*p2p.PeerStats, error)

PeerStats provides a mock function with given fields: ctx

func (*API) Peers added in v1.4.3

func (_m *API) Peers(ctx context.Context, connected bool) (*p2p.PeerDump, error)

Peers provides a mock function with given fields: ctx, connected

func (*API) ProtectPeer added in v1.4.3

func (_m *API) ProtectPeer(ctx context.Context, p peer.ID) error

ProtectPeer provides a mock function with given fields: ctx, p

func (*API) Self added in v1.4.3

func (_m *API) Self(ctx context.Context) (*p2p.PeerInfo, error)

Self provides a mock function with given fields: ctx

func (*API) UnblockAddr added in v1.4.3

func (_m *API) UnblockAddr(ctx context.Context, ip net.IP) error

UnblockAddr provides a mock function with given fields: ctx, ip

func (*API) UnblockPeer added in v1.4.3

func (_m *API) UnblockPeer(ctx context.Context, p peer.ID) error

UnblockPeer provides a mock function with given fields: ctx, p

func (*API) UnblockSubnet added in v1.4.3

func (_m *API) UnblockSubnet(ctx context.Context, ipnet *net.IPNet) error

UnblockSubnet provides a mock function with given fields: ctx, ipnet

func (*API) UnprotectPeer added in v1.4.3

func (_m *API) UnprotectPeer(ctx context.Context, p peer.ID) error

UnprotectPeer provides a mock function with given fields: ctx, p

type API_BlockAddr_Call added in v1.4.3

type API_BlockAddr_Call struct {
	*mock.Call
}

API_BlockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockAddr'

func (*API_BlockAddr_Call) Return added in v1.4.3

func (_c *API_BlockAddr_Call) Return(_a0 error) *API_BlockAddr_Call

func (*API_BlockAddr_Call) Run added in v1.4.3

func (_c *API_BlockAddr_Call) Run(run func(ctx context.Context, ip net.IP)) *API_BlockAddr_Call

func (*API_BlockAddr_Call) RunAndReturn added in v1.4.3

func (_c *API_BlockAddr_Call) RunAndReturn(run func(context.Context, net.IP) error) *API_BlockAddr_Call

type API_BlockPeer_Call added in v1.4.3

type API_BlockPeer_Call struct {
	*mock.Call
}

API_BlockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockPeer'

func (*API_BlockPeer_Call) Return added in v1.4.3

func (_c *API_BlockPeer_Call) Return(_a0 error) *API_BlockPeer_Call

func (*API_BlockPeer_Call) Run added in v1.4.3

func (_c *API_BlockPeer_Call) Run(run func(ctx context.Context, p peer.ID)) *API_BlockPeer_Call

func (*API_BlockPeer_Call) RunAndReturn added in v1.4.3

func (_c *API_BlockPeer_Call) RunAndReturn(run func(context.Context, peer.ID) error) *API_BlockPeer_Call

type API_BlockSubnet_Call added in v1.4.3

type API_BlockSubnet_Call struct {
	*mock.Call
}

API_BlockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSubnet'

func (*API_BlockSubnet_Call) Return added in v1.4.3

func (*API_BlockSubnet_Call) Run added in v1.4.3

func (_c *API_BlockSubnet_Call) Run(run func(ctx context.Context, ipnet *net.IPNet)) *API_BlockSubnet_Call

func (*API_BlockSubnet_Call) RunAndReturn added in v1.4.3

func (_c *API_BlockSubnet_Call) RunAndReturn(run func(context.Context, *net.IPNet) error) *API_BlockSubnet_Call

type API_ConnectPeer_Call added in v1.4.3

type API_ConnectPeer_Call struct {
	*mock.Call
}

API_ConnectPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectPeer'

func (*API_ConnectPeer_Call) Return added in v1.4.3

func (*API_ConnectPeer_Call) Run added in v1.4.3

func (_c *API_ConnectPeer_Call) Run(run func(ctx context.Context, addr string)) *API_ConnectPeer_Call

func (*API_ConnectPeer_Call) RunAndReturn added in v1.4.3

func (_c *API_ConnectPeer_Call) RunAndReturn(run func(context.Context, string) error) *API_ConnectPeer_Call

type API_DisconnectPeer_Call added in v1.4.3

type API_DisconnectPeer_Call struct {
	*mock.Call
}

API_DisconnectPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectPeer'

func (*API_DisconnectPeer_Call) Return added in v1.4.3

func (*API_DisconnectPeer_Call) Run added in v1.4.3

func (*API_DisconnectPeer_Call) RunAndReturn added in v1.4.3

type API_DiscoveryTable_Call added in v1.4.3

type API_DiscoveryTable_Call struct {
	*mock.Call
}

API_DiscoveryTable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiscoveryTable'

func (*API_DiscoveryTable_Call) Return added in v1.4.3

func (*API_DiscoveryTable_Call) Run added in v1.4.3

func (*API_DiscoveryTable_Call) RunAndReturn added in v1.4.3

func (_c *API_DiscoveryTable_Call) RunAndReturn(run func(context.Context) ([]*enode.Node, error)) *API_DiscoveryTable_Call

type API_Expecter added in v1.4.3

type API_Expecter struct {
	// contains filtered or unexported fields
}

func (*API_Expecter) BlockAddr added in v1.4.3

func (_e *API_Expecter) BlockAddr(ctx interface{}, ip interface{}) *API_BlockAddr_Call

BlockAddr is a helper method to define mock.On call

  • ctx context.Context
  • ip net.IP

func (*API_Expecter) BlockPeer added in v1.4.3

func (_e *API_Expecter) BlockPeer(ctx interface{}, p interface{}) *API_BlockPeer_Call

BlockPeer is a helper method to define mock.On call

  • ctx context.Context
  • p peer.ID

func (*API_Expecter) BlockSubnet added in v1.4.3

func (_e *API_Expecter) BlockSubnet(ctx interface{}, ipnet interface{}) *API_BlockSubnet_Call

BlockSubnet is a helper method to define mock.On call

  • ctx context.Context
  • ipnet *net.IPNet

func (*API_Expecter) ConnectPeer added in v1.4.3

func (_e *API_Expecter) ConnectPeer(ctx interface{}, addr interface{}) *API_ConnectPeer_Call

ConnectPeer is a helper method to define mock.On call

  • ctx context.Context
  • addr string

func (*API_Expecter) DisconnectPeer added in v1.4.3

func (_e *API_Expecter) DisconnectPeer(ctx interface{}, id interface{}) *API_DisconnectPeer_Call

DisconnectPeer is a helper method to define mock.On call

  • ctx context.Context
  • id peer.ID

func (*API_Expecter) DiscoveryTable added in v1.4.3

func (_e *API_Expecter) DiscoveryTable(ctx interface{}) *API_DiscoveryTable_Call

DiscoveryTable is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) ListBlockedAddrs added in v1.4.3

func (_e *API_Expecter) ListBlockedAddrs(ctx interface{}) *API_ListBlockedAddrs_Call

ListBlockedAddrs is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) ListBlockedPeers added in v1.4.3

func (_e *API_Expecter) ListBlockedPeers(ctx interface{}) *API_ListBlockedPeers_Call

ListBlockedPeers is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) ListBlockedSubnets added in v1.4.3

func (_e *API_Expecter) ListBlockedSubnets(ctx interface{}) *API_ListBlockedSubnets_Call

ListBlockedSubnets is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) PeerStats added in v1.4.3

func (_e *API_Expecter) PeerStats(ctx interface{}) *API_PeerStats_Call

PeerStats is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) Peers added in v1.4.3

func (_e *API_Expecter) Peers(ctx interface{}, connected interface{}) *API_Peers_Call

Peers is a helper method to define mock.On call

  • ctx context.Context
  • connected bool

func (*API_Expecter) ProtectPeer added in v1.4.3

func (_e *API_Expecter) ProtectPeer(ctx interface{}, p interface{}) *API_ProtectPeer_Call

ProtectPeer is a helper method to define mock.On call

  • ctx context.Context
  • p peer.ID

func (*API_Expecter) Self added in v1.4.3

func (_e *API_Expecter) Self(ctx interface{}) *API_Self_Call

Self is a helper method to define mock.On call

  • ctx context.Context

func (*API_Expecter) UnblockAddr added in v1.4.3

func (_e *API_Expecter) UnblockAddr(ctx interface{}, ip interface{}) *API_UnblockAddr_Call

UnblockAddr is a helper method to define mock.On call

  • ctx context.Context
  • ip net.IP

func (*API_Expecter) UnblockPeer added in v1.4.3

func (_e *API_Expecter) UnblockPeer(ctx interface{}, p interface{}) *API_UnblockPeer_Call

UnblockPeer is a helper method to define mock.On call

  • ctx context.Context
  • p peer.ID

func (*API_Expecter) UnblockSubnet added in v1.4.3

func (_e *API_Expecter) UnblockSubnet(ctx interface{}, ipnet interface{}) *API_UnblockSubnet_Call

UnblockSubnet is a helper method to define mock.On call

  • ctx context.Context
  • ipnet *net.IPNet

func (*API_Expecter) UnprotectPeer added in v1.4.3

func (_e *API_Expecter) UnprotectPeer(ctx interface{}, p interface{}) *API_UnprotectPeer_Call

UnprotectPeer is a helper method to define mock.On call

  • ctx context.Context
  • p peer.ID

type API_ListBlockedAddrs_Call added in v1.4.3

type API_ListBlockedAddrs_Call struct {
	*mock.Call
}

API_ListBlockedAddrs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedAddrs'

func (*API_ListBlockedAddrs_Call) Return added in v1.4.3

func (*API_ListBlockedAddrs_Call) Run added in v1.4.3

func (*API_ListBlockedAddrs_Call) RunAndReturn added in v1.4.3

type API_ListBlockedPeers_Call added in v1.4.3

type API_ListBlockedPeers_Call struct {
	*mock.Call
}

API_ListBlockedPeers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedPeers'

func (*API_ListBlockedPeers_Call) Return added in v1.4.3

func (*API_ListBlockedPeers_Call) Run added in v1.4.3

func (*API_ListBlockedPeers_Call) RunAndReturn added in v1.4.3

type API_ListBlockedSubnets_Call added in v1.4.3

type API_ListBlockedSubnets_Call struct {
	*mock.Call
}

API_ListBlockedSubnets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedSubnets'

func (*API_ListBlockedSubnets_Call) Return added in v1.4.3

func (*API_ListBlockedSubnets_Call) Run added in v1.4.3

func (*API_ListBlockedSubnets_Call) RunAndReturn added in v1.4.3

type API_PeerStats_Call added in v1.4.3

type API_PeerStats_Call struct {
	*mock.Call
}

API_PeerStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PeerStats'

func (*API_PeerStats_Call) Return added in v1.4.3

func (_c *API_PeerStats_Call) Return(_a0 *p2p.PeerStats, _a1 error) *API_PeerStats_Call

func (*API_PeerStats_Call) Run added in v1.4.3

func (_c *API_PeerStats_Call) Run(run func(ctx context.Context)) *API_PeerStats_Call

func (*API_PeerStats_Call) RunAndReturn added in v1.4.3

func (_c *API_PeerStats_Call) RunAndReturn(run func(context.Context) (*p2p.PeerStats, error)) *API_PeerStats_Call

type API_Peers_Call added in v1.4.3

type API_Peers_Call struct {
	*mock.Call
}

API_Peers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Peers'

func (*API_Peers_Call) Return added in v1.4.3

func (_c *API_Peers_Call) Return(_a0 *p2p.PeerDump, _a1 error) *API_Peers_Call

func (*API_Peers_Call) Run added in v1.4.3

func (_c *API_Peers_Call) Run(run func(ctx context.Context, connected bool)) *API_Peers_Call

func (*API_Peers_Call) RunAndReturn added in v1.4.3

func (_c *API_Peers_Call) RunAndReturn(run func(context.Context, bool) (*p2p.PeerDump, error)) *API_Peers_Call

type API_ProtectPeer_Call added in v1.4.3

type API_ProtectPeer_Call struct {
	*mock.Call
}

API_ProtectPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProtectPeer'

func (*API_ProtectPeer_Call) Return added in v1.4.3

func (*API_ProtectPeer_Call) Run added in v1.4.3

func (_c *API_ProtectPeer_Call) Run(run func(ctx context.Context, p peer.ID)) *API_ProtectPeer_Call

func (*API_ProtectPeer_Call) RunAndReturn added in v1.4.3

func (_c *API_ProtectPeer_Call) RunAndReturn(run func(context.Context, peer.ID) error) *API_ProtectPeer_Call

type API_Self_Call added in v1.4.3

type API_Self_Call struct {
	*mock.Call
}

API_Self_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Self'

func (*API_Self_Call) Return added in v1.4.3

func (_c *API_Self_Call) Return(_a0 *p2p.PeerInfo, _a1 error) *API_Self_Call

func (*API_Self_Call) Run added in v1.4.3

func (_c *API_Self_Call) Run(run func(ctx context.Context)) *API_Self_Call

func (*API_Self_Call) RunAndReturn added in v1.4.3

func (_c *API_Self_Call) RunAndReturn(run func(context.Context) (*p2p.PeerInfo, error)) *API_Self_Call

type API_UnblockAddr_Call added in v1.4.3

type API_UnblockAddr_Call struct {
	*mock.Call
}

API_UnblockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockAddr'

func (*API_UnblockAddr_Call) Return added in v1.4.3

func (*API_UnblockAddr_Call) Run added in v1.4.3

func (_c *API_UnblockAddr_Call) Run(run func(ctx context.Context, ip net.IP)) *API_UnblockAddr_Call

func (*API_UnblockAddr_Call) RunAndReturn added in v1.4.3

func (_c *API_UnblockAddr_Call) RunAndReturn(run func(context.Context, net.IP) error) *API_UnblockAddr_Call

type API_UnblockPeer_Call added in v1.4.3

type API_UnblockPeer_Call struct {
	*mock.Call
}

API_UnblockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockPeer'

func (*API_UnblockPeer_Call) Return added in v1.4.3

func (*API_UnblockPeer_Call) Run added in v1.4.3

func (_c *API_UnblockPeer_Call) Run(run func(ctx context.Context, p peer.ID)) *API_UnblockPeer_Call

func (*API_UnblockPeer_Call) RunAndReturn added in v1.4.3

func (_c *API_UnblockPeer_Call) RunAndReturn(run func(context.Context, peer.ID) error) *API_UnblockPeer_Call

type API_UnblockSubnet_Call added in v1.4.3

type API_UnblockSubnet_Call struct {
	*mock.Call
}

API_UnblockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockSubnet'

func (*API_UnblockSubnet_Call) Return added in v1.4.3

func (*API_UnblockSubnet_Call) Run added in v1.4.3

func (_c *API_UnblockSubnet_Call) Run(run func(ctx context.Context, ipnet *net.IPNet)) *API_UnblockSubnet_Call

func (*API_UnblockSubnet_Call) RunAndReturn added in v1.4.3

type API_UnprotectPeer_Call added in v1.4.3

type API_UnprotectPeer_Call struct {
	*mock.Call
}

API_UnprotectPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnprotectPeer'

func (*API_UnprotectPeer_Call) Return added in v1.4.3

func (*API_UnprotectPeer_Call) Run added in v1.4.3

func (*API_UnprotectPeer_Call) RunAndReturn added in v1.4.3

type GossipMetricer

type GossipMetricer struct {
	mock.Mock
}

GossipMetricer is an autogenerated mock type for the GossipMetricer type

func NewGossipMetricer

func NewGossipMetricer(t mockConstructorTestingTNewGossipMetricer) *GossipMetricer

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

func (*GossipMetricer) RecordGossipEvent

func (_m *GossipMetricer) RecordGossipEvent(evType int32)

RecordGossipEvent provides a mock function with given fields: evType

type PeerGater

type PeerGater struct {
	mock.Mock
}

PeerGater is an autogenerated mock type for the PeerGater type

func NewPeerGater

func NewPeerGater(t mockConstructorTestingTNewPeerGater) *PeerGater

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

func (*PeerGater) IsBlocked

func (_m *PeerGater) IsBlocked(_a0 peer.ID) bool

IsBlocked provides a mock function with given fields: _a0

func (*PeerGater) Update

func (_m *PeerGater) Update(_a0 peer.ID, _a1 float64)

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

type Peerstore

type Peerstore struct {
	mock.Mock
}

Peerstore is an autogenerated mock type for the Peerstore type

func NewPeerstore

func NewPeerstore(t mockConstructorTestingTNewPeerstore) *Peerstore

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

func (*Peerstore) PeerInfo

func (_m *Peerstore) PeerInfo(_a0 peer.ID) peer.AddrInfo

PeerInfo provides a mock function with given fields: _a0

func (*Peerstore) Peers

func (_m *Peerstore) Peers() peer.IDSlice

Peers provides a mock function with given fields:

func (*Peerstore) SetScore added in v1.1.2

func (_m *Peerstore) SetScore(id peer.ID, diff store.ScoreDiff) (store.PeerScores, error)

SetScore provides a mock function with given fields: id, diff

type ScoreMetrics added in v1.1.2

type ScoreMetrics struct {
	mock.Mock
}

ScoreMetrics is an autogenerated mock type for the ScoreMetrics type

func NewScoreMetrics added in v1.1.2

func NewScoreMetrics(t mockConstructorTestingTNewScoreMetrics) *ScoreMetrics

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

func (*ScoreMetrics) SetPeerScores added in v1.1.2

func (_m *ScoreMetrics) SetPeerScores(_a0 []store.PeerScores)

SetPeerScores provides a mock function with given fields: _a0

Jump to

Keyboard shortcuts

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