mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBackend

type MockBackend struct {
	mock.Mock
}

MockBackend is an autogenerated mock type for the Backend type

func NewMockBackend

func NewMockBackend(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBackend

NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend) EXPECT

func (_m *MockBackend) EXPECT() *MockBackend_Expecter

func (*MockBackend) Handle

func (_m *MockBackend) Handle(conn wasabi.Connection, r wasabi.Request) error

Handle provides a mock function with given fields: conn, r

type MockBackend_Expecter

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

func (*MockBackend_Expecter) Handle

func (_e *MockBackend_Expecter) Handle(conn interface{}, r interface{}) *MockBackend_Handle_Call

Handle is a helper method to define mock.On call

  • conn wasabi.Connection
  • r wasabi.Request

type MockBackend_Handle_Call

type MockBackend_Handle_Call struct {
	*mock.Call
}

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

func (*MockBackend_Handle_Call) Return

func (*MockBackend_Handle_Call) Run

func (*MockBackend_Handle_Call) RunAndReturn

type MockChannel

type MockChannel struct {
	mock.Mock
}

MockChannel is an autogenerated mock type for the Channel type

func NewMockChannel

func NewMockChannel(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChannel

NewMockChannel creates a new instance of MockChannel. 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 (*MockChannel) Close

func (_m *MockChannel) Close(ctx ...context.Context) error

Close provides a mock function with given fields: ctx

func (*MockChannel) EXPECT

func (_m *MockChannel) EXPECT() *MockChannel_Expecter

func (*MockChannel) Handler

func (_m *MockChannel) Handler() http.Handler

Handler provides a mock function with given fields:

func (*MockChannel) Path

func (_m *MockChannel) Path() string

Path provides a mock function with given fields:

type MockChannel_Close_Call

type MockChannel_Close_Call struct {
	*mock.Call
}

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

func (*MockChannel_Close_Call) Return

func (*MockChannel_Close_Call) Run

func (_c *MockChannel_Close_Call) Run(run func(ctx ...context.Context)) *MockChannel_Close_Call

func (*MockChannel_Close_Call) RunAndReturn

func (_c *MockChannel_Close_Call) RunAndReturn(run func(...context.Context) error) *MockChannel_Close_Call

type MockChannel_Expecter

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

func (*MockChannel_Expecter) Close

func (_e *MockChannel_Expecter) Close(ctx ...interface{}) *MockChannel_Close_Call

Close is a helper method to define mock.On call

  • ctx ...context.Context

func (*MockChannel_Expecter) Handler

Handler is a helper method to define mock.On call

func (*MockChannel_Expecter) Path

Path is a helper method to define mock.On call

type MockChannel_Handler_Call

type MockChannel_Handler_Call struct {
	*mock.Call
}

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

func (*MockChannel_Handler_Call) Return

func (*MockChannel_Handler_Call) Run

func (*MockChannel_Handler_Call) RunAndReturn

func (_c *MockChannel_Handler_Call) RunAndReturn(run func() http.Handler) *MockChannel_Handler_Call

type MockChannel_Path_Call

type MockChannel_Path_Call struct {
	*mock.Call
}

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

func (*MockChannel_Path_Call) Return

func (*MockChannel_Path_Call) Run

func (_c *MockChannel_Path_Call) Run(run func()) *MockChannel_Path_Call

func (*MockChannel_Path_Call) RunAndReturn

func (_c *MockChannel_Path_Call) RunAndReturn(run func() string) *MockChannel_Path_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) Close

func (_m *MockConnection) Close(status websocket.StatusCode, reason string, closingCtx ...context.Context) error

Close provides a mock function with given fields: status, reason, closingCtx

func (*MockConnection) Context

func (_m *MockConnection) Context() context.Context

Context provides a mock function with given fields:

func (*MockConnection) EXPECT

func (*MockConnection) HandleRequests

func (_m *MockConnection) HandleRequests()

HandleRequests provides a mock function with given fields:

func (*MockConnection) ID

func (_m *MockConnection) ID() string

ID provides a mock function with given fields:

func (*MockConnection) Send

func (_m *MockConnection) Send(msgType websocket.MessageType, msg []byte) error

Send provides a mock function with given fields: msgType, msg

type MockConnectionRegistry

type MockConnectionRegistry struct {
	mock.Mock
}

MockConnectionRegistry is an autogenerated mock type for the ConnectionRegistry type

func NewMockConnectionRegistry

func NewMockConnectionRegistry(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnectionRegistry

NewMockConnectionRegistry creates a new instance of MockConnectionRegistry. 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 (*MockConnectionRegistry) AddConnection

AddConnection provides a mock function with given fields: ctx, ws, cb

func (*MockConnectionRegistry) Close

func (_m *MockConnectionRegistry) Close(ctx ...context.Context) error

Close provides a mock function with given fields: ctx

func (*MockConnectionRegistry) EXPECT

func (*MockConnectionRegistry) GetConnection

func (_m *MockConnectionRegistry) GetConnection(id string) wasabi.Connection

GetConnection provides a mock function with given fields: id

type MockConnectionRegistry_AddConnection_Call

type MockConnectionRegistry_AddConnection_Call struct {
	*mock.Call
}

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

func (*MockConnectionRegistry_AddConnection_Call) Return

func (*MockConnectionRegistry_AddConnection_Call) Run

type MockConnectionRegistry_Close_Call

type MockConnectionRegistry_Close_Call struct {
	*mock.Call
}

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

func (*MockConnectionRegistry_Close_Call) Return

func (*MockConnectionRegistry_Close_Call) Run

func (*MockConnectionRegistry_Close_Call) RunAndReturn

type MockConnectionRegistry_Expecter

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

func (*MockConnectionRegistry_Expecter) AddConnection

func (_e *MockConnectionRegistry_Expecter) AddConnection(ctx interface{}, ws interface{}, cb interface{}) *MockConnectionRegistry_AddConnection_Call

AddConnection is a helper method to define mock.On call

  • ctx context.Context
  • ws *websocket.Conn
  • cb wasabi.OnMessage

func (*MockConnectionRegistry_Expecter) Close

Close is a helper method to define mock.On call

  • ctx ...context.Context

func (*MockConnectionRegistry_Expecter) GetConnection

GetConnection is a helper method to define mock.On call

  • id string

type MockConnectionRegistry_GetConnection_Call

type MockConnectionRegistry_GetConnection_Call struct {
	*mock.Call
}

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

func (*MockConnectionRegistry_GetConnection_Call) Return

func (*MockConnectionRegistry_GetConnection_Call) Run

func (*MockConnectionRegistry_GetConnection_Call) RunAndReturn

type MockConnection_Close_Call

type MockConnection_Close_Call struct {
	*mock.Call
}

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

func (*MockConnection_Close_Call) Return

func (*MockConnection_Close_Call) Run

func (_c *MockConnection_Close_Call) Run(run func(status websocket.StatusCode, reason string, closingCtx ...context.Context)) *MockConnection_Close_Call

func (*MockConnection_Close_Call) RunAndReturn

type MockConnection_Context_Call

type MockConnection_Context_Call struct {
	*mock.Call
}

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

func (*MockConnection_Context_Call) Return

func (*MockConnection_Context_Call) Run

func (*MockConnection_Context_Call) RunAndReturn

type MockConnection_Expecter

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

func (*MockConnection_Expecter) Close

func (_e *MockConnection_Expecter) Close(status interface{}, reason interface{}, closingCtx ...interface{}) *MockConnection_Close_Call

Close is a helper method to define mock.On call

  • status websocket.StatusCode
  • reason string
  • closingCtx ...context.Context

func (*MockConnection_Expecter) Context

Context is a helper method to define mock.On call

func (*MockConnection_Expecter) HandleRequests

HandleRequests is a helper method to define mock.On call

func (*MockConnection_Expecter) ID

ID is a helper method to define mock.On call

func (*MockConnection_Expecter) Send

func (_e *MockConnection_Expecter) Send(msgType interface{}, msg interface{}) *MockConnection_Send_Call

Send is a helper method to define mock.On call

  • msgType websocket.MessageType
  • msg []byte

type MockConnection_HandleRequests_Call

type MockConnection_HandleRequests_Call struct {
	*mock.Call
}

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

func (*MockConnection_HandleRequests_Call) Return

func (*MockConnection_HandleRequests_Call) Run

func (*MockConnection_HandleRequests_Call) RunAndReturn

type MockConnection_ID_Call

type MockConnection_ID_Call struct {
	*mock.Call
}

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

func (*MockConnection_ID_Call) Return

func (*MockConnection_ID_Call) Run

func (_c *MockConnection_ID_Call) Run(run func()) *MockConnection_ID_Call

func (*MockConnection_ID_Call) RunAndReturn

func (_c *MockConnection_ID_Call) RunAndReturn(run func() string) *MockConnection_ID_Call

type MockConnection_Send_Call

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

func (*MockConnection_Send_Call) Run

func (_c *MockConnection_Send_Call) Run(run func(msgType websocket.MessageType, msg []byte)) *MockConnection_Send_Call

func (*MockConnection_Send_Call) RunAndReturn

type MockDispatcher

type MockDispatcher struct {
	mock.Mock
}

MockDispatcher is an autogenerated mock type for the Dispatcher type

func NewMockDispatcher

func NewMockDispatcher(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDispatcher

NewMockDispatcher creates a new instance of MockDispatcher. 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 (*MockDispatcher) Dispatch

func (_m *MockDispatcher) Dispatch(conn wasabi.Connection, msgType websocket.MessageType, data []byte)

Dispatch provides a mock function with given fields: conn, msgType, data

func (*MockDispatcher) EXPECT

type MockDispatcher_Dispatch_Call

type MockDispatcher_Dispatch_Call struct {
	*mock.Call
}

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

func (*MockDispatcher_Dispatch_Call) Return

func (*MockDispatcher_Dispatch_Call) Run

func (*MockDispatcher_Dispatch_Call) RunAndReturn

type MockDispatcher_Expecter

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

func (*MockDispatcher_Expecter) Dispatch

func (_e *MockDispatcher_Expecter) Dispatch(conn interface{}, msgType interface{}, data interface{}) *MockDispatcher_Dispatch_Call

Dispatch is a helper method to define mock.On call

  • conn wasabi.Connection
  • msgType websocket.MessageType
  • data []byte

type MockRequest

type MockRequest struct {
	mock.Mock
}

MockRequest is an autogenerated mock type for the Request type

func NewMockRequest

func NewMockRequest(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRequest

NewMockRequest creates a new instance of MockRequest. 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 (*MockRequest) Context

func (_m *MockRequest) Context() context.Context

Context provides a mock function with given fields:

func (*MockRequest) Data

func (_m *MockRequest) Data() []byte

Data provides a mock function with given fields:

func (*MockRequest) EXPECT

func (_m *MockRequest) EXPECT() *MockRequest_Expecter

func (*MockRequest) RoutingKey

func (_m *MockRequest) RoutingKey() string

RoutingKey provides a mock function with given fields:

func (*MockRequest) WithContext

func (_m *MockRequest) WithContext(ctx context.Context) wasabi.Request

WithContext provides a mock function with given fields: ctx

type MockRequestHandler

type MockRequestHandler struct {
	mock.Mock
}

MockRequestHandler is an autogenerated mock type for the RequestHandler type

func NewMockRequestHandler

func NewMockRequestHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRequestHandler

NewMockRequestHandler creates a new instance of MockRequestHandler. 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 (*MockRequestHandler) EXPECT

func (*MockRequestHandler) Handle

func (_m *MockRequestHandler) Handle(conn wasabi.Connection, req wasabi.Request) error

Handle provides a mock function with given fields: conn, req

type MockRequestHandler_Expecter

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

func (*MockRequestHandler_Expecter) Handle

func (_e *MockRequestHandler_Expecter) Handle(conn interface{}, req interface{}) *MockRequestHandler_Handle_Call

Handle is a helper method to define mock.On call

  • conn wasabi.Connection
  • req wasabi.Request

type MockRequestHandler_Handle_Call

type MockRequestHandler_Handle_Call struct {
	*mock.Call
}

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

func (*MockRequestHandler_Handle_Call) Return

func (*MockRequestHandler_Handle_Call) Run

func (*MockRequestHandler_Handle_Call) RunAndReturn

type MockRequest_Context_Call

type MockRequest_Context_Call struct {
	*mock.Call
}

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

func (*MockRequest_Context_Call) Return

func (*MockRequest_Context_Call) Run

func (*MockRequest_Context_Call) RunAndReturn

func (_c *MockRequest_Context_Call) RunAndReturn(run func() context.Context) *MockRequest_Context_Call

type MockRequest_Data_Call

type MockRequest_Data_Call struct {
	*mock.Call
}

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

func (*MockRequest_Data_Call) Return

func (*MockRequest_Data_Call) Run

func (_c *MockRequest_Data_Call) Run(run func()) *MockRequest_Data_Call

func (*MockRequest_Data_Call) RunAndReturn

func (_c *MockRequest_Data_Call) RunAndReturn(run func() []byte) *MockRequest_Data_Call

type MockRequest_Expecter

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

func (*MockRequest_Expecter) Context

Context is a helper method to define mock.On call

func (*MockRequest_Expecter) Data

Data is a helper method to define mock.On call

func (*MockRequest_Expecter) RoutingKey

RoutingKey is a helper method to define mock.On call

func (*MockRequest_Expecter) WithContext

func (_e *MockRequest_Expecter) WithContext(ctx interface{}) *MockRequest_WithContext_Call

WithContext is a helper method to define mock.On call

  • ctx context.Context

type MockRequest_RoutingKey_Call

type MockRequest_RoutingKey_Call struct {
	*mock.Call
}

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

func (*MockRequest_RoutingKey_Call) Return

func (*MockRequest_RoutingKey_Call) Run

func (*MockRequest_RoutingKey_Call) RunAndReturn

func (_c *MockRequest_RoutingKey_Call) RunAndReturn(run func() string) *MockRequest_RoutingKey_Call

type MockRequest_WithContext_Call

type MockRequest_WithContext_Call struct {
	*mock.Call
}

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

func (*MockRequest_WithContext_Call) Return

func (*MockRequest_WithContext_Call) Run

func (*MockRequest_WithContext_Call) RunAndReturn

Jump to

Keyboard shortcuts

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