mocks

package
v0.0.0-...-40beec6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerManager

type PeerManager struct {
	mock.Mock
}

PeerManager is an autogenerated mock type for the PeerManager type

func NewPeerManager

func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager

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

func (*PeerManager) BanPeer

func (_m *PeerManager) BanPeer(_a0 peer.ID, _a1 time.Time) error

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

func (*PeerManager) EXPECT

func (_m *PeerManager) EXPECT() *PeerManager_Expecter

func (*PeerManager) GetPeerScore

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

GetPeerScore provides a mock function with given fields: id

func (*PeerManager) IsStatic

func (_m *PeerManager) IsStatic(_a0 peer.ID) bool

IsStatic provides a mock function with given fields: _a0

func (*PeerManager) Peers

func (_m *PeerManager) Peers() []peer.ID

Peers provides a mock function with given fields:

type PeerManager_BanPeer_Call

type PeerManager_BanPeer_Call struct {
	*mock.Call
}

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

func (*PeerManager_BanPeer_Call) Return

func (*PeerManager_BanPeer_Call) Run

func (_c *PeerManager_BanPeer_Call) Run(run func(_a0 peer.ID, _a1 time.Time)) *PeerManager_BanPeer_Call

func (*PeerManager_BanPeer_Call) RunAndReturn

func (_c *PeerManager_BanPeer_Call) RunAndReturn(run func(peer.ID, time.Time) error) *PeerManager_BanPeer_Call

type PeerManager_Expecter

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

func (*PeerManager_Expecter) BanPeer

func (_e *PeerManager_Expecter) BanPeer(_a0 interface{}, _a1 interface{}) *PeerManager_BanPeer_Call

BanPeer is a helper method to define mock.On call

  • _a0 peer.ID
  • _a1 time.Time

func (*PeerManager_Expecter) GetPeerScore

func (_e *PeerManager_Expecter) GetPeerScore(id interface{}) *PeerManager_GetPeerScore_Call

GetPeerScore is a helper method to define mock.On call

  • id peer.ID

func (*PeerManager_Expecter) IsStatic

func (_e *PeerManager_Expecter) IsStatic(_a0 interface{}) *PeerManager_IsStatic_Call

IsStatic is a helper method to define mock.On call

  • _a0 peer.ID

func (*PeerManager_Expecter) Peers

Peers is a helper method to define mock.On call

type PeerManager_GetPeerScore_Call

type PeerManager_GetPeerScore_Call struct {
	*mock.Call
}

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

func (*PeerManager_GetPeerScore_Call) Return

func (*PeerManager_GetPeerScore_Call) Run

func (*PeerManager_GetPeerScore_Call) RunAndReturn

type PeerManager_IsStatic_Call

type PeerManager_IsStatic_Call struct {
	*mock.Call
}

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

func (*PeerManager_IsStatic_Call) Return

func (*PeerManager_IsStatic_Call) Run

func (*PeerManager_IsStatic_Call) RunAndReturn

func (_c *PeerManager_IsStatic_Call) RunAndReturn(run func(peer.ID) bool) *PeerManager_IsStatic_Call

type PeerManager_Peers_Call

type PeerManager_Peers_Call struct {
	*mock.Call
}

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

func (*PeerManager_Peers_Call) Return

func (*PeerManager_Peers_Call) Run

func (_c *PeerManager_Peers_Call) Run(run func()) *PeerManager_Peers_Call

func (*PeerManager_Peers_Call) RunAndReturn

func (_c *PeerManager_Peers_Call) RunAndReturn(run func() []peer.ID) *PeerManager_Peers_Call

Jump to

Keyboard shortcuts

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