Documentation
¶
Index ¶
- type MockHoneypot
- func (_m *MockHoneypot) ConnectionByFlow(_a0 [2]uint64) connection.Metadata
- func (_m *MockHoneypot) EXPECT() *MockHoneypot_Expecter
- func (_m *MockHoneypot) MetadataByConnection(_a0 net.Conn) (connection.Metadata, error)
- func (_m *MockHoneypot) ProduceTCP(protocol string, conn net.Conn, md connection.Metadata, payload []byte, ...) error
- func (_m *MockHoneypot) ProduceUDP(handler string, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, ...) error
- func (_m *MockHoneypot) UpdateConnectionTimeout(ctx context.Context, conn net.Conn) error
- type MockHoneypot_ConnectionByFlow_Call
- func (_c *MockHoneypot_ConnectionByFlow_Call) Return(_a0 connection.Metadata) *MockHoneypot_ConnectionByFlow_Call
- func (_c *MockHoneypot_ConnectionByFlow_Call) Run(run func(_a0 [2]uint64)) *MockHoneypot_ConnectionByFlow_Call
- func (_c *MockHoneypot_ConnectionByFlow_Call) RunAndReturn(run func([2]uint64) connection.Metadata) *MockHoneypot_ConnectionByFlow_Call
- type MockHoneypot_Expecter
- func (_e *MockHoneypot_Expecter) ConnectionByFlow(_a0 interface{}) *MockHoneypot_ConnectionByFlow_Call
- func (_e *MockHoneypot_Expecter) MetadataByConnection(_a0 interface{}) *MockHoneypot_MetadataByConnection_Call
- func (_e *MockHoneypot_Expecter) ProduceTCP(protocol interface{}, conn interface{}, md interface{}, payload interface{}, ...) *MockHoneypot_ProduceTCP_Call
- func (_e *MockHoneypot_Expecter) ProduceUDP(handler interface{}, srcAddr interface{}, dstAddr interface{}, md interface{}, ...) *MockHoneypot_ProduceUDP_Call
- func (_e *MockHoneypot_Expecter) UpdateConnectionTimeout(ctx interface{}, conn interface{}) *MockHoneypot_UpdateConnectionTimeout_Call
- type MockHoneypot_MetadataByConnection_Call
- func (_c *MockHoneypot_MetadataByConnection_Call) Return(_a0 connection.Metadata, _a1 error) *MockHoneypot_MetadataByConnection_Call
- func (_c *MockHoneypot_MetadataByConnection_Call) Run(run func(_a0 net.Conn)) *MockHoneypot_MetadataByConnection_Call
- func (_c *MockHoneypot_MetadataByConnection_Call) RunAndReturn(run func(net.Conn) (connection.Metadata, error)) *MockHoneypot_MetadataByConnection_Call
- type MockHoneypot_ProduceTCP_Call
- func (_c *MockHoneypot_ProduceTCP_Call) Return(_a0 error) *MockHoneypot_ProduceTCP_Call
- func (_c *MockHoneypot_ProduceTCP_Call) Run(...) *MockHoneypot_ProduceTCP_Call
- func (_c *MockHoneypot_ProduceTCP_Call) RunAndReturn(run func(string, net.Conn, connection.Metadata, []byte, interface{}) error) *MockHoneypot_ProduceTCP_Call
- type MockHoneypot_ProduceUDP_Call
- func (_c *MockHoneypot_ProduceUDP_Call) Return(_a0 error) *MockHoneypot_ProduceUDP_Call
- func (_c *MockHoneypot_ProduceUDP_Call) Run(run func(handler string, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, ...)) *MockHoneypot_ProduceUDP_Call
- func (_c *MockHoneypot_ProduceUDP_Call) RunAndReturn(...) *MockHoneypot_ProduceUDP_Call
- type MockHoneypot_UpdateConnectionTimeout_Call
- func (_c *MockHoneypot_UpdateConnectionTimeout_Call) Return(_a0 error) *MockHoneypot_UpdateConnectionTimeout_Call
- func (_c *MockHoneypot_UpdateConnectionTimeout_Call) Run(run func(ctx context.Context, conn net.Conn)) *MockHoneypot_UpdateConnectionTimeout_Call
- func (_c *MockHoneypot_UpdateConnectionTimeout_Call) RunAndReturn(run func(context.Context, net.Conn) error) *MockHoneypot_UpdateConnectionTimeout_Call
- type MockLogger
- func (_m *MockLogger) Debug(msg string, fields ...interface{})
- func (_m *MockLogger) EXPECT() *MockLogger_Expecter
- func (_m *MockLogger) Error(msg string, fields ...interface{})
- func (_m *MockLogger) Info(msg string, fields ...interface{})
- func (_m *MockLogger) Warn(msg string, fields ...interface{})
- type MockLogger_Debug_Call
- type MockLogger_Error_Call
- type MockLogger_Expecter
- func (_e *MockLogger_Expecter) Debug(msg interface{}, fields ...interface{}) *MockLogger_Debug_Call
- func (_e *MockLogger_Expecter) Error(msg interface{}, fields ...interface{}) *MockLogger_Error_Call
- func (_e *MockLogger_Expecter) Info(msg interface{}, fields ...interface{}) *MockLogger_Info_Call
- func (_e *MockLogger_Expecter) Warn(msg interface{}, fields ...interface{}) *MockLogger_Warn_Call
- type MockLogger_Info_Call
- type MockLogger_Warn_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockHoneypot ¶
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 ¶
UpdateConnectionTimeout provides a mock function with given fields: ctx, conn
type MockHoneypot_ConnectionByFlow_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 (_c *MockHoneypot_ConnectionByFlow_Call) Return(_a0 connection.Metadata) *MockHoneypot_ConnectionByFlow_Call
func (*MockHoneypot_ConnectionByFlow_Call) Run ¶
func (_c *MockHoneypot_ConnectionByFlow_Call) Run(run func(_a0 [2]uint64)) *MockHoneypot_ConnectionByFlow_Call
func (*MockHoneypot_ConnectionByFlow_Call) RunAndReturn ¶
func (_c *MockHoneypot_ConnectionByFlow_Call) RunAndReturn(run func([2]uint64) connection.Metadata) *MockHoneypot_ConnectionByFlow_Call
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 ¶
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 (_c *MockHoneypot_MetadataByConnection_Call) Return(_a0 connection.Metadata, _a1 error) *MockHoneypot_MetadataByConnection_Call
func (*MockHoneypot_MetadataByConnection_Call) Run ¶
func (_c *MockHoneypot_MetadataByConnection_Call) Run(run func(_a0 net.Conn)) *MockHoneypot_MetadataByConnection_Call
func (*MockHoneypot_MetadataByConnection_Call) RunAndReturn ¶
func (_c *MockHoneypot_MetadataByConnection_Call) RunAndReturn(run func(net.Conn) (connection.Metadata, error)) *MockHoneypot_MetadataByConnection_Call
type MockHoneypot_ProduceTCP_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 (_c *MockHoneypot_ProduceTCP_Call) Return(_a0 error) *MockHoneypot_ProduceTCP_Call
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 ¶
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 (_c *MockHoneypot_ProduceUDP_Call) Return(_a0 error) *MockHoneypot_ProduceUDP_Call
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 ¶
func (_c *MockHoneypot_ProduceUDP_Call) RunAndReturn(run func(string, *net.UDPAddr, *net.UDPAddr, connection.Metadata, []byte, interface{}) error) *MockHoneypot_ProduceUDP_Call
type MockHoneypot_UpdateConnectionTimeout_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 (_c *MockHoneypot_UpdateConnectionTimeout_Call) Return(_a0 error) *MockHoneypot_UpdateConnectionTimeout_Call
func (*MockHoneypot_UpdateConnectionTimeout_Call) Run ¶
func (_c *MockHoneypot_UpdateConnectionTimeout_Call) Run(run func(ctx context.Context, conn net.Conn)) *MockHoneypot_UpdateConnectionTimeout_Call
func (*MockHoneypot_UpdateConnectionTimeout_Call) RunAndReturn ¶
func (_c *MockHoneypot_UpdateConnectionTimeout_Call) RunAndReturn(run func(context.Context, net.Conn) error) *MockHoneypot_UpdateConnectionTimeout_Call
type MockLogger ¶
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 ¶
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 (_c *MockLogger_Debug_Call) Return() *MockLogger_Debug_Call
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 ¶
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 (_c *MockLogger_Error_Call) Return() *MockLogger_Error_Call
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 ¶
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 (_c *MockLogger_Info_Call) Return() *MockLogger_Info_Call
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 ¶
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 (_c *MockLogger_Warn_Call) Return() *MockLogger_Warn_Call
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