mocks

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 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 BlockingConnectionGater

type BlockingConnectionGater struct {
	mock.Mock
}

BlockingConnectionGater is an autogenerated mock type for the BlockingConnectionGater type

func NewBlockingConnectionGater

func NewBlockingConnectionGater(t mockConstructorTestingTNewBlockingConnectionGater) *BlockingConnectionGater

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

func (*BlockingConnectionGater) BlockAddr

func (_m *BlockingConnectionGater) BlockAddr(ip net.IP) error

BlockAddr provides a mock function with given fields: ip

func (*BlockingConnectionGater) BlockPeer

func (_m *BlockingConnectionGater) BlockPeer(p peer.ID) error

BlockPeer provides a mock function with given fields: p

func (*BlockingConnectionGater) BlockSubnet

func (_m *BlockingConnectionGater) BlockSubnet(ipnet *net.IPNet) error

BlockSubnet provides a mock function with given fields: ipnet

func (*BlockingConnectionGater) EXPECT

func (*BlockingConnectionGater) InterceptAccept

func (_m *BlockingConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool

InterceptAccept provides a mock function with given fields: _a0

func (*BlockingConnectionGater) InterceptAddrDial

func (_m *BlockingConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool

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

func (*BlockingConnectionGater) InterceptPeerDial

func (_m *BlockingConnectionGater) InterceptPeerDial(p peer.ID) bool

InterceptPeerDial provides a mock function with given fields: p

func (*BlockingConnectionGater) InterceptSecured

func (_m *BlockingConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool

InterceptSecured provides a mock function with given fields: _a0, _a1, _a2

func (*BlockingConnectionGater) InterceptUpgraded

func (_m *BlockingConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason)

InterceptUpgraded provides a mock function with given fields: _a0

func (*BlockingConnectionGater) ListBlockedAddrs

func (_m *BlockingConnectionGater) ListBlockedAddrs() []net.IP

ListBlockedAddrs provides a mock function with given fields:

func (*BlockingConnectionGater) ListBlockedPeers

func (_m *BlockingConnectionGater) ListBlockedPeers() []peer.ID

ListBlockedPeers provides a mock function with given fields:

func (*BlockingConnectionGater) ListBlockedSubnets

func (_m *BlockingConnectionGater) ListBlockedSubnets() []*net.IPNet

ListBlockedSubnets provides a mock function with given fields:

func (*BlockingConnectionGater) UnblockAddr

func (_m *BlockingConnectionGater) UnblockAddr(ip net.IP) error

UnblockAddr provides a mock function with given fields: ip

func (*BlockingConnectionGater) UnblockPeer

func (_m *BlockingConnectionGater) UnblockPeer(p peer.ID) error

UnblockPeer provides a mock function with given fields: p

func (*BlockingConnectionGater) UnblockSubnet

func (_m *BlockingConnectionGater) UnblockSubnet(ipnet *net.IPNet) error

UnblockSubnet provides a mock function with given fields: ipnet

type BlockingConnectionGater_BlockAddr_Call

type BlockingConnectionGater_BlockAddr_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_BlockAddr_Call) Return

func (*BlockingConnectionGater_BlockAddr_Call) Run

func (*BlockingConnectionGater_BlockAddr_Call) RunAndReturn

type BlockingConnectionGater_BlockPeer_Call

type BlockingConnectionGater_BlockPeer_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_BlockPeer_Call) Return

func (*BlockingConnectionGater_BlockPeer_Call) Run

func (*BlockingConnectionGater_BlockPeer_Call) RunAndReturn

type BlockingConnectionGater_BlockSubnet_Call

type BlockingConnectionGater_BlockSubnet_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_BlockSubnet_Call) Return

func (*BlockingConnectionGater_BlockSubnet_Call) Run

func (*BlockingConnectionGater_BlockSubnet_Call) RunAndReturn

type BlockingConnectionGater_Expecter

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

func (*BlockingConnectionGater_Expecter) BlockAddr

BlockAddr is a helper method to define mock.On call

  • ip net.IP

func (*BlockingConnectionGater_Expecter) BlockPeer

BlockPeer is a helper method to define mock.On call

  • p peer.ID

func (*BlockingConnectionGater_Expecter) BlockSubnet

BlockSubnet is a helper method to define mock.On call

  • ipnet *net.IPNet

func (*BlockingConnectionGater_Expecter) InterceptAccept

InterceptAccept is a helper method to define mock.On call

  • _a0 network.ConnMultiaddrs

func (*BlockingConnectionGater_Expecter) InterceptAddrDial

func (_e *BlockingConnectionGater_Expecter) InterceptAddrDial(_a0 interface{}, _a1 interface{}) *BlockingConnectionGater_InterceptAddrDial_Call

InterceptAddrDial is a helper method to define mock.On call

  • _a0 peer.ID
  • _a1 multiaddr.Multiaddr

func (*BlockingConnectionGater_Expecter) InterceptPeerDial

InterceptPeerDial is a helper method to define mock.On call

  • p peer.ID

func (*BlockingConnectionGater_Expecter) InterceptSecured

func (_e *BlockingConnectionGater_Expecter) InterceptSecured(_a0 interface{}, _a1 interface{}, _a2 interface{}) *BlockingConnectionGater_InterceptSecured_Call

InterceptSecured is a helper method to define mock.On call

  • _a0 network.Direction
  • _a1 peer.ID
  • _a2 network.ConnMultiaddrs

func (*BlockingConnectionGater_Expecter) InterceptUpgraded

InterceptUpgraded is a helper method to define mock.On call

  • _a0 network.Conn

func (*BlockingConnectionGater_Expecter) ListBlockedAddrs

ListBlockedAddrs is a helper method to define mock.On call

func (*BlockingConnectionGater_Expecter) ListBlockedPeers

ListBlockedPeers is a helper method to define mock.On call

func (*BlockingConnectionGater_Expecter) ListBlockedSubnets

ListBlockedSubnets is a helper method to define mock.On call

func (*BlockingConnectionGater_Expecter) UnblockAddr

UnblockAddr is a helper method to define mock.On call

  • ip net.IP

func (*BlockingConnectionGater_Expecter) UnblockPeer

UnblockPeer is a helper method to define mock.On call

  • p peer.ID

func (*BlockingConnectionGater_Expecter) UnblockSubnet

UnblockSubnet is a helper method to define mock.On call

  • ipnet *net.IPNet

type BlockingConnectionGater_InterceptAccept_Call

type BlockingConnectionGater_InterceptAccept_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_InterceptAccept_Call) Return

func (*BlockingConnectionGater_InterceptAccept_Call) Run

func (*BlockingConnectionGater_InterceptAccept_Call) RunAndReturn

type BlockingConnectionGater_InterceptAddrDial_Call

type BlockingConnectionGater_InterceptAddrDial_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_InterceptAddrDial_Call) Return

func (*BlockingConnectionGater_InterceptAddrDial_Call) Run

func (*BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn

type BlockingConnectionGater_InterceptPeerDial_Call

type BlockingConnectionGater_InterceptPeerDial_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_InterceptPeerDial_Call) Return

func (*BlockingConnectionGater_InterceptPeerDial_Call) Run

func (*BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn

type BlockingConnectionGater_InterceptSecured_Call

type BlockingConnectionGater_InterceptSecured_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_InterceptSecured_Call) Return

func (*BlockingConnectionGater_InterceptSecured_Call) Run

func (*BlockingConnectionGater_InterceptSecured_Call) RunAndReturn

type BlockingConnectionGater_InterceptUpgraded_Call

type BlockingConnectionGater_InterceptUpgraded_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_InterceptUpgraded_Call) Return

func (*BlockingConnectionGater_InterceptUpgraded_Call) Run

func (*BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn

type BlockingConnectionGater_ListBlockedAddrs_Call

type BlockingConnectionGater_ListBlockedAddrs_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_ListBlockedAddrs_Call) Return

func (*BlockingConnectionGater_ListBlockedAddrs_Call) Run

func (*BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn

type BlockingConnectionGater_ListBlockedPeers_Call

type BlockingConnectionGater_ListBlockedPeers_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_ListBlockedPeers_Call) Return

func (*BlockingConnectionGater_ListBlockedPeers_Call) Run

func (*BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn

type BlockingConnectionGater_ListBlockedSubnets_Call

type BlockingConnectionGater_ListBlockedSubnets_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_ListBlockedSubnets_Call) Return

func (*BlockingConnectionGater_ListBlockedSubnets_Call) Run

func (*BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn

type BlockingConnectionGater_UnblockAddr_Call

type BlockingConnectionGater_UnblockAddr_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_UnblockAddr_Call) Return

func (*BlockingConnectionGater_UnblockAddr_Call) Run

func (*BlockingConnectionGater_UnblockAddr_Call) RunAndReturn

type BlockingConnectionGater_UnblockPeer_Call

type BlockingConnectionGater_UnblockPeer_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_UnblockPeer_Call) Return

func (*BlockingConnectionGater_UnblockPeer_Call) Run

func (*BlockingConnectionGater_UnblockPeer_Call) RunAndReturn

type BlockingConnectionGater_UnblockSubnet_Call

type BlockingConnectionGater_UnblockSubnet_Call struct {
	*mock.Call
}

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

func (*BlockingConnectionGater_UnblockSubnet_Call) Return

func (*BlockingConnectionGater_UnblockSubnet_Call) Run

func (*BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn

type ExpiryStore

type ExpiryStore struct {
	mock.Mock
}

ExpiryStore is an autogenerated mock type for the ExpiryStore type

func NewExpiryStore

func NewExpiryStore(t mockConstructorTestingTNewExpiryStore) *ExpiryStore

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

func (*ExpiryStore) EXPECT

func (_m *ExpiryStore) EXPECT() *ExpiryStore_Expecter

func (*ExpiryStore) GetIPBanExpiration

func (_m *ExpiryStore) GetIPBanExpiration(ip net.IP) (time.Time, error)

GetIPBanExpiration provides a mock function with given fields: ip

func (*ExpiryStore) GetPeerBanExpiration

func (_m *ExpiryStore) GetPeerBanExpiration(id peer.ID) (time.Time, error)

GetPeerBanExpiration provides a mock function with given fields: id

func (*ExpiryStore) SetIPBanExpiration

func (_m *ExpiryStore) SetIPBanExpiration(ip net.IP, expiry time.Time) error

SetIPBanExpiration provides a mock function with given fields: ip, expiry

func (*ExpiryStore) SetPeerBanExpiration

func (_m *ExpiryStore) SetPeerBanExpiration(id peer.ID, expiry time.Time) error

SetPeerBanExpiration provides a mock function with given fields: id, expiry

type ExpiryStore_Expecter

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

func (*ExpiryStore_Expecter) GetIPBanExpiration

func (_e *ExpiryStore_Expecter) GetIPBanExpiration(ip interface{}) *ExpiryStore_GetIPBanExpiration_Call

GetIPBanExpiration is a helper method to define mock.On call

  • ip net.IP

func (*ExpiryStore_Expecter) GetPeerBanExpiration

func (_e *ExpiryStore_Expecter) GetPeerBanExpiration(id interface{}) *ExpiryStore_GetPeerBanExpiration_Call

GetPeerBanExpiration is a helper method to define mock.On call

  • id peer.ID

func (*ExpiryStore_Expecter) SetIPBanExpiration

func (_e *ExpiryStore_Expecter) SetIPBanExpiration(ip interface{}, expiry interface{}) *ExpiryStore_SetIPBanExpiration_Call

SetIPBanExpiration is a helper method to define mock.On call

  • ip net.IP
  • expiry time.Time

func (*ExpiryStore_Expecter) SetPeerBanExpiration

func (_e *ExpiryStore_Expecter) SetPeerBanExpiration(id interface{}, expiry interface{}) *ExpiryStore_SetPeerBanExpiration_Call

SetPeerBanExpiration is a helper method to define mock.On call

  • id peer.ID
  • expiry time.Time

type ExpiryStore_GetIPBanExpiration_Call

type ExpiryStore_GetIPBanExpiration_Call struct {
	*mock.Call
}

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

func (*ExpiryStore_GetIPBanExpiration_Call) Return

func (*ExpiryStore_GetIPBanExpiration_Call) Run

func (*ExpiryStore_GetIPBanExpiration_Call) RunAndReturn

type ExpiryStore_GetPeerBanExpiration_Call

type ExpiryStore_GetPeerBanExpiration_Call struct {
	*mock.Call
}

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

func (*ExpiryStore_GetPeerBanExpiration_Call) Return

func (*ExpiryStore_GetPeerBanExpiration_Call) Run

func (*ExpiryStore_GetPeerBanExpiration_Call) RunAndReturn

type ExpiryStore_SetIPBanExpiration_Call

type ExpiryStore_SetIPBanExpiration_Call struct {
	*mock.Call
}

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

func (*ExpiryStore_SetIPBanExpiration_Call) Return

func (*ExpiryStore_SetIPBanExpiration_Call) Run

func (*ExpiryStore_SetIPBanExpiration_Call) RunAndReturn

type ExpiryStore_SetPeerBanExpiration_Call

type ExpiryStore_SetPeerBanExpiration_Call struct {
	*mock.Call
}

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

func (*ExpiryStore_SetPeerBanExpiration_Call) Return

func (*ExpiryStore_SetPeerBanExpiration_Call) Run

func (*ExpiryStore_SetPeerBanExpiration_Call) RunAndReturn

type Scores

type Scores struct {
	mock.Mock
}

Scores is an autogenerated mock type for the Scores type

func NewScores

func NewScores(t mockConstructorTestingTNewScores) *Scores

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

func (*Scores) EXPECT

func (_m *Scores) EXPECT() *Scores_Expecter

func (*Scores) GetPeerScore

func (_m *Scores) GetPeerScore(id peer.ID) (float64, error)

GetPeerScore provides a mock function with given fields: id

type Scores_Expecter

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

func (*Scores_Expecter) GetPeerScore

func (_e *Scores_Expecter) GetPeerScore(id interface{}) *Scores_GetPeerScore_Call

GetPeerScore is a helper method to define mock.On call

  • id peer.ID

type Scores_GetPeerScore_Call

type Scores_GetPeerScore_Call struct {
	*mock.Call
}

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

func (*Scores_GetPeerScore_Call) Return

func (*Scores_GetPeerScore_Call) Run

func (*Scores_GetPeerScore_Call) RunAndReturn

func (_c *Scores_GetPeerScore_Call) RunAndReturn(run func(peer.ID) (float64, error)) *Scores_GetPeerScore_Call

Jump to

Keyboard shortcuts

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