mocks

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConnectionFactory

type MockConnectionFactory struct {
	mock.Mock
}

MockConnectionFactory is an autogenerated mock type for the ConnectionFactory type

func NewMockConnectionFactory

func NewMockConnectionFactory(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnectionFactory

NewMockConnectionFactory creates a new instance of MockConnectionFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockConnectionFactory) CreateIPv4Conn

func (_mock *MockConnectionFactory) CreateIPv4Conn(ifaces []net.Interface) (api.PacketConn, error)

CreateIPv4Conn provides a mock function for the type MockConnectionFactory

func (*MockConnectionFactory) CreateIPv6Conn

func (_mock *MockConnectionFactory) CreateIPv6Conn(ifaces []net.Interface) (api.PacketConn, error)

CreateIPv6Conn provides a mock function for the type MockConnectionFactory

func (*MockConnectionFactory) EXPECT

type MockConnectionFactory_CreateIPv4Conn_Call

type MockConnectionFactory_CreateIPv4Conn_Call struct {
	*mock.Call
}

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

func (*MockConnectionFactory_CreateIPv4Conn_Call) Return

func (*MockConnectionFactory_CreateIPv4Conn_Call) Run

func (*MockConnectionFactory_CreateIPv4Conn_Call) RunAndReturn

type MockConnectionFactory_CreateIPv6Conn_Call

type MockConnectionFactory_CreateIPv6Conn_Call struct {
	*mock.Call
}

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

func (*MockConnectionFactory_CreateIPv6Conn_Call) Return

func (*MockConnectionFactory_CreateIPv6Conn_Call) Run

func (*MockConnectionFactory_CreateIPv6Conn_Call) RunAndReturn

type MockConnectionFactory_Expecter

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

func (*MockConnectionFactory_Expecter) CreateIPv4Conn

func (_e *MockConnectionFactory_Expecter) CreateIPv4Conn(ifaces interface{}) *MockConnectionFactory_CreateIPv4Conn_Call

CreateIPv4Conn is a helper method to define mock.On call

  • ifaces []net.Interface

func (*MockConnectionFactory_Expecter) CreateIPv6Conn

func (_e *MockConnectionFactory_Expecter) CreateIPv6Conn(ifaces interface{}) *MockConnectionFactory_CreateIPv6Conn_Call

CreateIPv6Conn is a helper method to define mock.On call

  • ifaces []net.Interface

type MockInterfaceProvider

type MockInterfaceProvider struct {
	mock.Mock
}

MockInterfaceProvider is an autogenerated mock type for the InterfaceProvider type

func NewMockInterfaceProvider

func NewMockInterfaceProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockInterfaceProvider

NewMockInterfaceProvider creates a new instance of MockInterfaceProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockInterfaceProvider) EXPECT

func (*MockInterfaceProvider) MulticastInterfaces

func (_mock *MockInterfaceProvider) MulticastInterfaces() []net.Interface

MulticastInterfaces provides a mock function for the type MockInterfaceProvider

type MockInterfaceProvider_Expecter

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

func (*MockInterfaceProvider_Expecter) MulticastInterfaces

MulticastInterfaces is a helper method to define mock.On call

type MockInterfaceProvider_MulticastInterfaces_Call

type MockInterfaceProvider_MulticastInterfaces_Call struct {
	*mock.Call
}

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

func (*MockInterfaceProvider_MulticastInterfaces_Call) Return

func (*MockInterfaceProvider_MulticastInterfaces_Call) Run

func (*MockInterfaceProvider_MulticastInterfaces_Call) RunAndReturn

type MockPacketConn

type MockPacketConn struct {
	mock.Mock
}

MockPacketConn is an autogenerated mock type for the PacketConn type

func NewMockPacketConn

func NewMockPacketConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPacketConn

NewMockPacketConn creates a new instance of MockPacketConn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockPacketConn) Close

func (_mock *MockPacketConn) Close() error

Close provides a mock function for the type MockPacketConn

func (*MockPacketConn) EXPECT

func (*MockPacketConn) JoinGroup

func (_mock *MockPacketConn) JoinGroup(ifi *net.Interface, group net.Addr) error

JoinGroup provides a mock function for the type MockPacketConn

func (*MockPacketConn) LeaveGroup

func (_mock *MockPacketConn) LeaveGroup(ifi *net.Interface, group net.Addr) error

LeaveGroup provides a mock function for the type MockPacketConn

func (*MockPacketConn) ReadFrom

func (_mock *MockPacketConn) ReadFrom(b []byte) (int, int, net.Addr, error)

ReadFrom provides a mock function for the type MockPacketConn

func (*MockPacketConn) SetMulticastHopLimit

func (_mock *MockPacketConn) SetMulticastHopLimit(hopLimit int) error

SetMulticastHopLimit provides a mock function for the type MockPacketConn

func (*MockPacketConn) SetMulticastInterface

func (_mock *MockPacketConn) SetMulticastInterface(ifi *net.Interface) error

SetMulticastInterface provides a mock function for the type MockPacketConn

func (*MockPacketConn) SetMulticastTTL

func (_mock *MockPacketConn) SetMulticastTTL(ttl int) error

SetMulticastTTL provides a mock function for the type MockPacketConn

func (*MockPacketConn) WriteTo

func (_mock *MockPacketConn) WriteTo(b []byte, ifIndex int, dst net.Addr) (int, error)

WriteTo provides a mock function for the type MockPacketConn

type MockPacketConn_Close_Call

type MockPacketConn_Close_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_Close_Call) Return

func (*MockPacketConn_Close_Call) Run

func (*MockPacketConn_Close_Call) RunAndReturn

func (_c *MockPacketConn_Close_Call) RunAndReturn(run func() error) *MockPacketConn_Close_Call

type MockPacketConn_Expecter

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

func (*MockPacketConn_Expecter) Close

Close is a helper method to define mock.On call

func (*MockPacketConn_Expecter) JoinGroup

func (_e *MockPacketConn_Expecter) JoinGroup(ifi interface{}, group interface{}) *MockPacketConn_JoinGroup_Call

JoinGroup is a helper method to define mock.On call

  • ifi *net.Interface
  • group net.Addr

func (*MockPacketConn_Expecter) LeaveGroup

func (_e *MockPacketConn_Expecter) LeaveGroup(ifi interface{}, group interface{}) *MockPacketConn_LeaveGroup_Call

LeaveGroup is a helper method to define mock.On call

  • ifi *net.Interface
  • group net.Addr

func (*MockPacketConn_Expecter) ReadFrom

func (_e *MockPacketConn_Expecter) ReadFrom(b interface{}) *MockPacketConn_ReadFrom_Call

ReadFrom is a helper method to define mock.On call

  • b []byte

func (*MockPacketConn_Expecter) SetMulticastHopLimit

func (_e *MockPacketConn_Expecter) SetMulticastHopLimit(hopLimit interface{}) *MockPacketConn_SetMulticastHopLimit_Call

SetMulticastHopLimit is a helper method to define mock.On call

  • hopLimit int

func (*MockPacketConn_Expecter) SetMulticastInterface

func (_e *MockPacketConn_Expecter) SetMulticastInterface(ifi interface{}) *MockPacketConn_SetMulticastInterface_Call

SetMulticastInterface is a helper method to define mock.On call

  • ifi *net.Interface

func (*MockPacketConn_Expecter) SetMulticastTTL

func (_e *MockPacketConn_Expecter) SetMulticastTTL(ttl interface{}) *MockPacketConn_SetMulticastTTL_Call

SetMulticastTTL is a helper method to define mock.On call

  • ttl int

func (*MockPacketConn_Expecter) WriteTo

func (_e *MockPacketConn_Expecter) WriteTo(b interface{}, ifIndex interface{}, dst interface{}) *MockPacketConn_WriteTo_Call

WriteTo is a helper method to define mock.On call

  • b []byte
  • ifIndex int
  • dst net.Addr

type MockPacketConn_JoinGroup_Call

type MockPacketConn_JoinGroup_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_JoinGroup_Call) Return

func (*MockPacketConn_JoinGroup_Call) Run

func (*MockPacketConn_JoinGroup_Call) RunAndReturn

func (_c *MockPacketConn_JoinGroup_Call) RunAndReturn(run func(ifi *net.Interface, group net.Addr) error) *MockPacketConn_JoinGroup_Call

type MockPacketConn_LeaveGroup_Call

type MockPacketConn_LeaveGroup_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_LeaveGroup_Call) Return

func (*MockPacketConn_LeaveGroup_Call) Run

func (*MockPacketConn_LeaveGroup_Call) RunAndReturn

func (_c *MockPacketConn_LeaveGroup_Call) RunAndReturn(run func(ifi *net.Interface, group net.Addr) error) *MockPacketConn_LeaveGroup_Call

type MockPacketConn_ReadFrom_Call

type MockPacketConn_ReadFrom_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_ReadFrom_Call) Return

func (*MockPacketConn_ReadFrom_Call) Run

func (*MockPacketConn_ReadFrom_Call) RunAndReturn

func (_c *MockPacketConn_ReadFrom_Call) RunAndReturn(run func(b []byte) (int, int, net.Addr, error)) *MockPacketConn_ReadFrom_Call

type MockPacketConn_SetMulticastHopLimit_Call

type MockPacketConn_SetMulticastHopLimit_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_SetMulticastHopLimit_Call) Return

func (*MockPacketConn_SetMulticastHopLimit_Call) Run

func (*MockPacketConn_SetMulticastHopLimit_Call) RunAndReturn

type MockPacketConn_SetMulticastInterface_Call

type MockPacketConn_SetMulticastInterface_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_SetMulticastInterface_Call) Return

func (*MockPacketConn_SetMulticastInterface_Call) Run

func (*MockPacketConn_SetMulticastInterface_Call) RunAndReturn

type MockPacketConn_SetMulticastTTL_Call

type MockPacketConn_SetMulticastTTL_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_SetMulticastTTL_Call) Return

func (*MockPacketConn_SetMulticastTTL_Call) Run

func (*MockPacketConn_SetMulticastTTL_Call) RunAndReturn

type MockPacketConn_WriteTo_Call

type MockPacketConn_WriteTo_Call struct {
	*mock.Call
}

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

func (*MockPacketConn_WriteTo_Call) Return

func (*MockPacketConn_WriteTo_Call) Run

func (_c *MockPacketConn_WriteTo_Call) Run(run func(b []byte, ifIndex int, dst net.Addr)) *MockPacketConn_WriteTo_Call

func (*MockPacketConn_WriteTo_Call) RunAndReturn

func (_c *MockPacketConn_WriteTo_Call) RunAndReturn(run func(b []byte, ifIndex int, dst net.Addr) (int, error)) *MockPacketConn_WriteTo_Call

Jump to

Keyboard shortcuts

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