mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHoneypot

type MockHoneypot struct {
	mock.Mock
}

MockHoneypot is an autogenerated mock type for the Honeypot type

func NewMockHoneypot

func NewMockHoneypot(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHoneypot

NewMockHoneypot creates a new instance of MockHoneypot. 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 (*MockHoneypot) ConnectionByFlow

func (_m *MockHoneypot) ConnectionByFlow(_a0 [2]uint64) connection.Metadata

ConnectionByFlow provides a mock function with given fields: _a0

func (*MockHoneypot) EXPECT

func (_m *MockHoneypot) EXPECT() *MockHoneypot_Expecter

func (*MockHoneypot) MetadataByConnection

func (_m *MockHoneypot) MetadataByConnection(_a0 net.Conn) (connection.Metadata, error)

MetadataByConnection provides a mock function with given fields: _a0

func (*MockHoneypot) ProduceTCP

func (_m *MockHoneypot) ProduceTCP(protocol string, conn net.Conn, md connection.Metadata, payload []byte, decoded interface{}) error

ProduceTCP provides a mock function with given fields: protocol, conn, md, payload, decoded

func (*MockHoneypot) ProduceUDP

func (_m *MockHoneypot) ProduceUDP(handler string, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, md connection.Metadata, payload []byte, decoded interface{}) error

ProduceUDP provides a mock function with given fields: handler, srcAddr, dstAddr, md, payload, decoded

func (*MockHoneypot) UpdateConnectionTimeout

func (_m *MockHoneypot) UpdateConnectionTimeout(ctx context.Context, conn net.Conn) error

UpdateConnectionTimeout provides a mock function with given fields: ctx, conn

type MockHoneypot_ConnectionByFlow_Call

type MockHoneypot_ConnectionByFlow_Call struct {
	*mock.Call
}

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

func (*MockHoneypot_ConnectionByFlow_Call) Return

func (*MockHoneypot_ConnectionByFlow_Call) Run

func (*MockHoneypot_ConnectionByFlow_Call) RunAndReturn

type MockHoneypot_Expecter

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

func (*MockHoneypot_Expecter) ConnectionByFlow

func (_e *MockHoneypot_Expecter) ConnectionByFlow(_a0 interface{}) *MockHoneypot_ConnectionByFlow_Call

ConnectionByFlow is a helper method to define mock.On call

  • _a0 [2]uint64

func (*MockHoneypot_Expecter) MetadataByConnection

func (_e *MockHoneypot_Expecter) MetadataByConnection(_a0 interface{}) *MockHoneypot_MetadataByConnection_Call

MetadataByConnection is a helper method to define mock.On call

  • _a0 net.Conn

func (*MockHoneypot_Expecter) ProduceTCP

func (_e *MockHoneypot_Expecter) ProduceTCP(protocol interface{}, conn interface{}, md interface{}, payload interface{}, decoded interface{}) *MockHoneypot_ProduceTCP_Call

ProduceTCP is a helper method to define mock.On call

  • protocol string
  • conn net.Conn
  • md connection.Metadata
  • payload []byte
  • decoded interface{}

func (*MockHoneypot_Expecter) ProduceUDP

func (_e *MockHoneypot_Expecter) ProduceUDP(handler interface{}, srcAddr interface{}, dstAddr interface{}, md interface{}, payload interface{}, decoded interface{}) *MockHoneypot_ProduceUDP_Call

ProduceUDP is a helper method to define mock.On call

  • handler string
  • srcAddr *net.UDPAddr
  • dstAddr *net.UDPAddr
  • md connection.Metadata
  • payload []byte
  • decoded interface{}

func (*MockHoneypot_Expecter) UpdateConnectionTimeout

func (_e *MockHoneypot_Expecter) UpdateConnectionTimeout(ctx interface{}, conn interface{}) *MockHoneypot_UpdateConnectionTimeout_Call

UpdateConnectionTimeout is a helper method to define mock.On call

  • ctx context.Context
  • conn net.Conn

type MockHoneypot_MetadataByConnection_Call

type MockHoneypot_MetadataByConnection_Call struct {
	*mock.Call
}

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

func (*MockHoneypot_MetadataByConnection_Call) Return

func (*MockHoneypot_MetadataByConnection_Call) Run

func (*MockHoneypot_MetadataByConnection_Call) RunAndReturn

type MockHoneypot_ProduceTCP_Call

type MockHoneypot_ProduceTCP_Call struct {
	*mock.Call
}

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

func (*MockHoneypot_ProduceTCP_Call) Return

func (*MockHoneypot_ProduceTCP_Call) Run

func (_c *MockHoneypot_ProduceTCP_Call) Run(run func(protocol string, conn net.Conn, md connection.Metadata, payload []byte, decoded interface{})) *MockHoneypot_ProduceTCP_Call

func (*MockHoneypot_ProduceTCP_Call) RunAndReturn

func (_c *MockHoneypot_ProduceTCP_Call) RunAndReturn(run func(string, net.Conn, connection.Metadata, []byte, interface{}) error) *MockHoneypot_ProduceTCP_Call

type MockHoneypot_ProduceUDP_Call

type MockHoneypot_ProduceUDP_Call struct {
	*mock.Call
}

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

func (*MockHoneypot_ProduceUDP_Call) Return

func (*MockHoneypot_ProduceUDP_Call) Run

func (_c *MockHoneypot_ProduceUDP_Call) Run(run func(handler string, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, md connection.Metadata, payload []byte, decoded interface{})) *MockHoneypot_ProduceUDP_Call

func (*MockHoneypot_ProduceUDP_Call) RunAndReturn

type MockHoneypot_UpdateConnectionTimeout_Call

type MockHoneypot_UpdateConnectionTimeout_Call struct {
	*mock.Call
}

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

func (*MockHoneypot_UpdateConnectionTimeout_Call) Return

func (*MockHoneypot_UpdateConnectionTimeout_Call) Run

func (*MockHoneypot_UpdateConnectionTimeout_Call) RunAndReturn

type MockLogger

type MockLogger struct {
	mock.Mock
}

MockLogger is an autogenerated mock type for the Logger type

func NewMockLogger

func NewMockLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLogger

NewMockLogger creates a new instance of MockLogger. 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 (*MockLogger) Debug

func (_m *MockLogger) Debug(msg string, fields ...interface{})

Debug provides a mock function with given fields: msg, fields

func (*MockLogger) EXPECT

func (_m *MockLogger) EXPECT() *MockLogger_Expecter

func (*MockLogger) Error

func (_m *MockLogger) Error(msg string, fields ...interface{})

Error provides a mock function with given fields: msg, fields

func (*MockLogger) Info

func (_m *MockLogger) Info(msg string, fields ...interface{})

Info provides a mock function with given fields: msg, fields

func (*MockLogger) Warn

func (_m *MockLogger) Warn(msg string, fields ...interface{})

Warn provides a mock function with given fields: msg, fields

type MockLogger_Debug_Call

type MockLogger_Debug_Call struct {
	*mock.Call
}

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

func (*MockLogger_Debug_Call) Return

func (*MockLogger_Debug_Call) Run

func (_c *MockLogger_Debug_Call) Run(run func(msg string, fields ...interface{})) *MockLogger_Debug_Call

func (*MockLogger_Debug_Call) RunAndReturn

func (_c *MockLogger_Debug_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Debug_Call

type MockLogger_Error_Call

type MockLogger_Error_Call struct {
	*mock.Call
}

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

func (*MockLogger_Error_Call) Return

func (*MockLogger_Error_Call) Run

func (_c *MockLogger_Error_Call) Run(run func(msg string, fields ...interface{})) *MockLogger_Error_Call

func (*MockLogger_Error_Call) RunAndReturn

func (_c *MockLogger_Error_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Error_Call

type MockLogger_Expecter

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

func (*MockLogger_Expecter) Debug

func (_e *MockLogger_Expecter) Debug(msg interface{}, fields ...interface{}) *MockLogger_Debug_Call

Debug is a helper method to define mock.On call

  • msg string
  • fields ...interface{}

func (*MockLogger_Expecter) Error

func (_e *MockLogger_Expecter) Error(msg interface{}, fields ...interface{}) *MockLogger_Error_Call

Error is a helper method to define mock.On call

  • msg string
  • fields ...interface{}

func (*MockLogger_Expecter) Info

func (_e *MockLogger_Expecter) Info(msg interface{}, fields ...interface{}) *MockLogger_Info_Call

Info is a helper method to define mock.On call

  • msg string
  • fields ...interface{}

func (*MockLogger_Expecter) Warn

func (_e *MockLogger_Expecter) Warn(msg interface{}, fields ...interface{}) *MockLogger_Warn_Call

Warn is a helper method to define mock.On call

  • msg string
  • fields ...interface{}

type MockLogger_Info_Call

type MockLogger_Info_Call struct {
	*mock.Call
}

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

func (*MockLogger_Info_Call) Return

func (*MockLogger_Info_Call) Run

func (_c *MockLogger_Info_Call) Run(run func(msg string, fields ...interface{})) *MockLogger_Info_Call

func (*MockLogger_Info_Call) RunAndReturn

func (_c *MockLogger_Info_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Info_Call

type MockLogger_Warn_Call

type MockLogger_Warn_Call struct {
	*mock.Call
}

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

func (*MockLogger_Warn_Call) Return

func (*MockLogger_Warn_Call) Run

func (_c *MockLogger_Warn_Call) Run(run func(msg string, fields ...interface{})) *MockLogger_Warn_Call

func (*MockLogger_Warn_Call) RunAndReturn

func (_c *MockLogger_Warn_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Warn_Call

Jump to

Keyboard shortcuts

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