mocks

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConn added in v1.22.0

type MockConn struct {
	mock.Mock
}

MockConn is an autogenerated mock type for the conn type

func NewMockConn added in v1.22.0

func NewMockConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConn

NewMockConn creates a new instance of MockConn. 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 (*MockConn) Close added in v1.22.0

func (_m *MockConn) Close() error

Close provides a mock function with given fields:

func (*MockConn) EXPECT added in v1.22.0

func (_m *MockConn) EXPECT() *MockConn_Expecter

func (*MockConn) LocalAddr added in v1.22.0

func (_m *MockConn) LocalAddr() net.Addr

LocalAddr provides a mock function with given fields:

func (*MockConn) Read added in v1.22.0

func (_m *MockConn) Read(b []byte) (int, error)

Read provides a mock function with given fields: b

func (*MockConn) RemoteAddr added in v1.22.0

func (_m *MockConn) RemoteAddr() net.Addr

RemoteAddr provides a mock function with given fields:

func (*MockConn) SetDeadline added in v1.22.0

func (_m *MockConn) SetDeadline(t time.Time) error

SetDeadline provides a mock function with given fields: t

func (*MockConn) SetReadDeadline added in v1.22.0

func (_m *MockConn) SetReadDeadline(t time.Time) error

SetReadDeadline provides a mock function with given fields: t

func (*MockConn) SetWriteDeadline added in v1.22.0

func (_m *MockConn) SetWriteDeadline(t time.Time) error

SetWriteDeadline provides a mock function with given fields: t

func (*MockConn) Write added in v1.22.0

func (_m *MockConn) Write(b []byte) (int, error)

Write provides a mock function with given fields: b

type MockConn_Close_Call added in v1.22.0

type MockConn_Close_Call struct {
	*mock.Call
}

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

func (*MockConn_Close_Call) Return added in v1.22.0

func (*MockConn_Close_Call) Run added in v1.22.0

func (_c *MockConn_Close_Call) Run(run func()) *MockConn_Close_Call

func (*MockConn_Close_Call) RunAndReturn added in v1.22.0

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

type MockConn_Expecter added in v1.22.0

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

func (*MockConn_Expecter) Close added in v1.22.0

Close is a helper method to define mock.On call

func (*MockConn_Expecter) LocalAddr added in v1.22.0

func (_e *MockConn_Expecter) LocalAddr() *MockConn_LocalAddr_Call

LocalAddr is a helper method to define mock.On call

func (*MockConn_Expecter) Read added in v1.22.0

func (_e *MockConn_Expecter) Read(b interface{}) *MockConn_Read_Call

Read is a helper method to define mock.On call

  • b []byte

func (*MockConn_Expecter) RemoteAddr added in v1.22.0

func (_e *MockConn_Expecter) RemoteAddr() *MockConn_RemoteAddr_Call

RemoteAddr is a helper method to define mock.On call

func (*MockConn_Expecter) SetDeadline added in v1.22.0

func (_e *MockConn_Expecter) SetDeadline(t interface{}) *MockConn_SetDeadline_Call

SetDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) SetReadDeadline added in v1.22.0

func (_e *MockConn_Expecter) SetReadDeadline(t interface{}) *MockConn_SetReadDeadline_Call

SetReadDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) SetWriteDeadline added in v1.22.0

func (_e *MockConn_Expecter) SetWriteDeadline(t interface{}) *MockConn_SetWriteDeadline_Call

SetWriteDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) Write added in v1.22.0

func (_e *MockConn_Expecter) Write(b interface{}) *MockConn_Write_Call

Write is a helper method to define mock.On call

  • b []byte

type MockConn_LocalAddr_Call added in v1.22.0

type MockConn_LocalAddr_Call struct {
	*mock.Call
}

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

func (*MockConn_LocalAddr_Call) Return added in v1.22.0

func (*MockConn_LocalAddr_Call) Run added in v1.22.0

func (_c *MockConn_LocalAddr_Call) Run(run func()) *MockConn_LocalAddr_Call

func (*MockConn_LocalAddr_Call) RunAndReturn added in v1.22.0

func (_c *MockConn_LocalAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_LocalAddr_Call

type MockConn_Read_Call added in v1.22.0

type MockConn_Read_Call struct {
	*mock.Call
}

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

func (*MockConn_Read_Call) Return added in v1.22.0

func (_c *MockConn_Read_Call) Return(n int, err error) *MockConn_Read_Call

func (*MockConn_Read_Call) Run added in v1.22.0

func (_c *MockConn_Read_Call) Run(run func(b []byte)) *MockConn_Read_Call

func (*MockConn_Read_Call) RunAndReturn added in v1.22.0

func (_c *MockConn_Read_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Read_Call

type MockConn_RemoteAddr_Call added in v1.22.0

type MockConn_RemoteAddr_Call struct {
	*mock.Call
}

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

func (*MockConn_RemoteAddr_Call) Return added in v1.22.0

func (*MockConn_RemoteAddr_Call) Run added in v1.22.0

func (*MockConn_RemoteAddr_Call) RunAndReturn added in v1.22.0

func (_c *MockConn_RemoteAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_RemoteAddr_Call

type MockConn_SetDeadline_Call added in v1.22.0

type MockConn_SetDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetDeadline_Call) Return added in v1.22.0

func (*MockConn_SetDeadline_Call) Run added in v1.22.0

func (*MockConn_SetDeadline_Call) RunAndReturn added in v1.22.0

func (_c *MockConn_SetDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetDeadline_Call

type MockConn_SetReadDeadline_Call added in v1.22.0

type MockConn_SetReadDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetReadDeadline_Call) Return added in v1.22.0

func (*MockConn_SetReadDeadline_Call) Run added in v1.22.0

func (*MockConn_SetReadDeadline_Call) RunAndReturn added in v1.22.0

type MockConn_SetWriteDeadline_Call added in v1.22.0

type MockConn_SetWriteDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetWriteDeadline_Call) Return added in v1.22.0

func (*MockConn_SetWriteDeadline_Call) Run added in v1.22.0

func (*MockConn_SetWriteDeadline_Call) RunAndReturn added in v1.22.0

type MockConn_Write_Call added in v1.22.0

type MockConn_Write_Call struct {
	*mock.Call
}

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

func (*MockConn_Write_Call) Return added in v1.22.0

func (_c *MockConn_Write_Call) Return(n int, err error) *MockConn_Write_Call

func (*MockConn_Write_Call) Run added in v1.22.0

func (_c *MockConn_Write_Call) Run(run func(b []byte)) *MockConn_Write_Call

func (*MockConn_Write_Call) RunAndReturn added in v1.22.0

func (_c *MockConn_Write_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Write_Call

type MockConnection

type MockConnection struct {
	mock.Mock
}

MockConnection is an autogenerated mock type for the Connection type

func NewMockConnection

func NewMockConnection(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnection

NewMockConnection creates a new instance of MockConnection. 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 (*MockConnection) Connection added in v1.22.0

func (_m *MockConnection) Connection() net.Conn

Connection provides a mock function with given fields:

func (*MockConnection) Disconnect added in v1.22.0

func (_m *MockConnection) Disconnect() error

Disconnect provides a mock function with given fields:

func (*MockConnection) EXPECT added in v1.22.0

func (*MockConnection) Send

func (_m *MockConnection) Send(ctx context.Context, message *protobufs.ServerToAgent) error

Send provides a mock function with given fields: ctx, message

type MockConnection_Connection_Call added in v1.22.0

type MockConnection_Connection_Call struct {
	*mock.Call
}

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

func (*MockConnection_Connection_Call) Return added in v1.22.0

func (*MockConnection_Connection_Call) Run added in v1.22.0

func (*MockConnection_Connection_Call) RunAndReturn added in v1.22.0

type MockConnection_Disconnect_Call added in v1.22.0

type MockConnection_Disconnect_Call struct {
	*mock.Call
}

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

func (*MockConnection_Disconnect_Call) Return added in v1.22.0

func (*MockConnection_Disconnect_Call) Run added in v1.22.0

func (*MockConnection_Disconnect_Call) RunAndReturn added in v1.22.0

type MockConnection_Expecter added in v1.22.0

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

func (*MockConnection_Expecter) Connection added in v1.22.0

Connection is a helper method to define mock.On call

func (*MockConnection_Expecter) Disconnect added in v1.22.0

Disconnect is a helper method to define mock.On call

func (*MockConnection_Expecter) Send added in v1.22.0

func (_e *MockConnection_Expecter) Send(ctx interface{}, message interface{}) *MockConnection_Send_Call

Send is a helper method to define mock.On call

  • ctx context.Context
  • message *protobufs.ServerToAgent

type MockConnection_Send_Call added in v1.22.0

type MockConnection_Send_Call struct {
	*mock.Call
}

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

func (*MockConnection_Send_Call) Return added in v1.22.0

func (*MockConnection_Send_Call) Run added in v1.22.0

func (*MockConnection_Send_Call) RunAndReturn added in v1.22.0

type MockConnections

type MockConnections[S interface{}] struct {
	mock.Mock
}

MockConnections is an autogenerated mock type for the Connections type

func NewMockConnections

func NewMockConnections[S interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnections[S]

NewMockConnections creates a new instance of MockConnections. 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 (*MockConnections[S]) Connected

func (_m *MockConnections[S]) Connected(agentID string) bool

Connected provides a mock function with given fields: agentID

func (*MockConnections[S]) ConnectedAgentIDs

func (_m *MockConnections[S]) ConnectedAgentIDs(_a0 context.Context) []string

ConnectedAgentIDs provides a mock function with given fields: _a0

func (*MockConnections[S]) ConnectedAgentsCount

func (_m *MockConnections[S]) ConnectedAgentsCount(_a0 context.Context) int

ConnectedAgentsCount provides a mock function with given fields: _a0

func (*MockConnections[S]) OnConnecting

func (_m *MockConnections[S]) OnConnecting(ctx context.Context, agentID string) S

OnConnecting provides a mock function with given fields: ctx, agentID

func (*MockConnections[S]) OnConnectionClose

func (_m *MockConnections[S]) OnConnectionClose(conn types.Connection) (S, int)

OnConnectionClose provides a mock function with given fields: conn

func (*MockConnections[S]) OnMessage

func (_m *MockConnections[S]) OnMessage(agentID string, conn types.Connection) (S, error)

OnMessage provides a mock function with given fields: agentID, conn

func (*MockConnections[S]) StateForAgentID

func (_m *MockConnections[S]) StateForAgentID(agentID string) S

StateForAgentID provides a mock function with given fields: agentID

func (*MockConnections[S]) StateForConnection

func (_m *MockConnections[S]) StateForConnection(_a0 types.Connection) S

StateForConnection provides a mock function with given fields: _a0

Jump to

Keyboard shortcuts

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