mocks

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t mockConstructorTestingTNewClient) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with given fields:

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) HandleMessage

func (_m *Client) HandleMessage(ctx context.Context, msg funcie.Message) error

HandleMessage provides a mock function with given fields: ctx, msg

type ClientListener

type ClientListener struct {
	mock.Mock
}

ClientListener is an autogenerated mock type for the ClientListener type

func NewClientListener

func NewClientListener(t mockConstructorTestingTNewClientListener) *ClientListener

NewClientListener creates a new instance of ClientListener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ClientListener) EXPECT

func (*ClientListener) ServeHTTP

func (_m *ClientListener) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP provides a mock function with given fields: w, r

type ClientListener_Expecter

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

func (*ClientListener_Expecter) ServeHTTP

func (_e *ClientListener_Expecter) ServeHTTP(w interface{}, r interface{}) *ClientListener_ServeHTTP_Call

ServeHTTP is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request

type ClientListener_ServeHTTP_Call

type ClientListener_ServeHTTP_Call struct {
	*mock.Call
}

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

func (*ClientListener_ServeHTTP_Call) Return

func (*ClientListener_ServeHTTP_Call) Run

func (*ClientListener_ServeHTTP_Call) RunAndReturn

type ClientManager

type ClientManager struct {
	mock.Mock
}

ClientManager is an autogenerated mock type for the ClientManager type

func NewClientManager

func NewClientManager(t mockConstructorTestingTNewClientManager) *ClientManager

NewClientManager creates a new instance of ClientManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ClientManager) AddClient

func (_m *ClientManager) AddClient(conn publisher.Client)

AddClient provides a mock function with given fields: conn

func (*ClientManager) AddClientRouting

func (_m *ClientManager) AddClientRouting(id string, conn publisher.Client)

AddClientRouting provides a mock function with given fields: id, conn

func (*ClientManager) CloseAllClients

func (_m *ClientManager) CloseAllClients()

CloseAllClients provides a mock function with given fields:

func (*ClientManager) EXPECT

func (_m *ClientManager) EXPECT() *ClientManager_Expecter

func (*ClientManager) GetClientRouting

func (_m *ClientManager) GetClientRouting(id string) (publisher.Client, error)

GetClientRouting provides a mock function with given fields: id

func (*ClientManager) Process

func (_m *ClientManager) Process(ctx context.Context, conn publisher.Websocket)

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

func (*ClientManager) RemoveClientRouting

func (_m *ClientManager) RemoveClientRouting(id string)

RemoveClientRouting provides a mock function with given fields: id

type ClientManager_AddClientRouting_Call

type ClientManager_AddClientRouting_Call struct {
	*mock.Call
}

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

func (*ClientManager_AddClientRouting_Call) Return

func (*ClientManager_AddClientRouting_Call) Run

func (*ClientManager_AddClientRouting_Call) RunAndReturn

type ClientManager_AddClient_Call

type ClientManager_AddClient_Call struct {
	*mock.Call
}

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

func (*ClientManager_AddClient_Call) Return

func (*ClientManager_AddClient_Call) Run

func (*ClientManager_AddClient_Call) RunAndReturn

type ClientManager_CloseAllClients_Call

type ClientManager_CloseAllClients_Call struct {
	*mock.Call
}

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

func (*ClientManager_CloseAllClients_Call) Return

func (*ClientManager_CloseAllClients_Call) Run

func (*ClientManager_CloseAllClients_Call) RunAndReturn

type ClientManager_Expecter

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

func (*ClientManager_Expecter) AddClient

func (_e *ClientManager_Expecter) AddClient(conn interface{}) *ClientManager_AddClient_Call

AddClient is a helper method to define mock.On call

  • conn publisher.Client

func (*ClientManager_Expecter) AddClientRouting

func (_e *ClientManager_Expecter) AddClientRouting(id interface{}, conn interface{}) *ClientManager_AddClientRouting_Call

AddClientRouting is a helper method to define mock.On call

  • id string
  • conn publisher.Client

func (*ClientManager_Expecter) CloseAllClients

CloseAllClients is a helper method to define mock.On call

func (*ClientManager_Expecter) GetClientRouting

func (_e *ClientManager_Expecter) GetClientRouting(id interface{}) *ClientManager_GetClientRouting_Call

GetClientRouting is a helper method to define mock.On call

  • id string

func (*ClientManager_Expecter) Process

func (_e *ClientManager_Expecter) Process(ctx interface{}, conn interface{}) *ClientManager_Process_Call

Process is a helper method to define mock.On call

  • ctx context.Context
  • conn publisher.Websocket

func (*ClientManager_Expecter) RemoveClientRouting

func (_e *ClientManager_Expecter) RemoveClientRouting(id interface{}) *ClientManager_RemoveClientRouting_Call

RemoveClientRouting is a helper method to define mock.On call

  • id string

type ClientManager_GetClientRouting_Call

type ClientManager_GetClientRouting_Call struct {
	*mock.Call
}

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

func (*ClientManager_GetClientRouting_Call) Return

func (*ClientManager_GetClientRouting_Call) Run

func (*ClientManager_GetClientRouting_Call) RunAndReturn

type ClientManager_Process_Call

type ClientManager_Process_Call struct {
	*mock.Call
}

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

func (*ClientManager_Process_Call) Return

func (*ClientManager_Process_Call) Run

func (*ClientManager_Process_Call) RunAndReturn

type ClientManager_RemoveClientRouting_Call

type ClientManager_RemoveClientRouting_Call struct {
	*mock.Call
}

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

func (*ClientManager_RemoveClientRouting_Call) Return

func (*ClientManager_RemoveClientRouting_Call) Run

func (*ClientManager_RemoveClientRouting_Call) RunAndReturn

type Client_Close_Call

type Client_Close_Call struct {
	*mock.Call
}

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

func (*Client_Close_Call) Return

func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call

func (*Client_Close_Call) Run

func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call

func (*Client_Close_Call) RunAndReturn

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

type Client_Expecter

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

func (*Client_Expecter) Close

func (_e *Client_Expecter) Close() *Client_Close_Call

Close is a helper method to define mock.On call

func (*Client_Expecter) HandleMessage

func (_e *Client_Expecter) HandleMessage(ctx interface{}, msg interface{}) *Client_HandleMessage_Call

HandleMessage is a helper method to define mock.On call

  • ctx context.Context
  • msg funcie.Message

type Client_HandleMessage_Call

type Client_HandleMessage_Call struct {
	*mock.Call
}

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

func (*Client_HandleMessage_Call) Return

func (*Client_HandleMessage_Call) Run

func (*Client_HandleMessage_Call) RunAndReturn

type Websocket

type Websocket struct {
	mock.Mock
}

Websocket is an autogenerated mock type for the Websocket type

func NewWebsocket

func NewWebsocket(t mockConstructorTestingTNewWebsocket) *Websocket

NewWebsocket creates a new instance of Websocket. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Websocket) Close

func (_m *Websocket) Close(code websocket.StatusCode, reason string) error

Close provides a mock function with given fields: code, reason

func (*Websocket) EXPECT

func (_m *Websocket) EXPECT() *Websocket_Expecter

func (*Websocket) Read

func (_m *Websocket) Read(ctx context.Context) (websocket.MessageType, []byte, error)

Read provides a mock function with given fields: ctx

func (*Websocket) Subprotocol

func (_m *Websocket) Subprotocol() string

Subprotocol provides a mock function with given fields:

func (*Websocket) Write

func (_m *Websocket) Write(ctx context.Context, typ websocket.MessageType, p []byte) error

Write provides a mock function with given fields: ctx, typ, p

type WebsocketServer

type WebsocketServer struct {
	mock.Mock
}

WebsocketServer is an autogenerated mock type for the WebsocketServer type

func NewWebsocketServer

func NewWebsocketServer(t mockConstructorTestingTNewWebsocketServer) *WebsocketServer

NewWebsocketServer creates a new instance of WebsocketServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*WebsocketServer) Accept

Accept provides a mock function with given fields: w, r, opts

func (*WebsocketServer) EXPECT

type WebsocketServer_Accept_Call

type WebsocketServer_Accept_Call struct {
	*mock.Call
}

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

func (*WebsocketServer_Accept_Call) Return

func (*WebsocketServer_Accept_Call) Run

type WebsocketServer_Expecter

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

func (*WebsocketServer_Expecter) Accept

func (_e *WebsocketServer_Expecter) Accept(w interface{}, r interface{}, opts interface{}) *WebsocketServer_Accept_Call

Accept is a helper method to define mock.On call

  • w http.ResponseWriter
  • r *http.Request
  • opts *websocket.AcceptOptions

type Websocket_Close_Call

type Websocket_Close_Call struct {
	*mock.Call
}

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

func (*Websocket_Close_Call) Return

func (*Websocket_Close_Call) Run

func (_c *Websocket_Close_Call) Run(run func(code websocket.StatusCode, reason string)) *Websocket_Close_Call

func (*Websocket_Close_Call) RunAndReturn

type Websocket_Expecter

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

func (*Websocket_Expecter) Close

func (_e *Websocket_Expecter) Close(code interface{}, reason interface{}) *Websocket_Close_Call

Close is a helper method to define mock.On call

  • code websocket.StatusCode
  • reason string

func (*Websocket_Expecter) Read

func (_e *Websocket_Expecter) Read(ctx interface{}) *Websocket_Read_Call

Read is a helper method to define mock.On call

  • ctx context.Context

func (*Websocket_Expecter) Subprotocol

Subprotocol is a helper method to define mock.On call

func (*Websocket_Expecter) Write

func (_e *Websocket_Expecter) Write(ctx interface{}, typ interface{}, p interface{}) *Websocket_Write_Call

Write is a helper method to define mock.On call

  • ctx context.Context
  • typ websocket.MessageType
  • p []byte

type Websocket_Read_Call

type Websocket_Read_Call struct {
	*mock.Call
}

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

func (*Websocket_Read_Call) Return

func (*Websocket_Read_Call) Run

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

func (*Websocket_Read_Call) RunAndReturn

type Websocket_Subprotocol_Call

type Websocket_Subprotocol_Call struct {
	*mock.Call
}

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

func (*Websocket_Subprotocol_Call) Return

func (*Websocket_Subprotocol_Call) Run

func (*Websocket_Subprotocol_Call) RunAndReturn

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

type Websocket_Write_Call

type Websocket_Write_Call struct {
	*mock.Call
}

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

func (*Websocket_Write_Call) Return

func (*Websocket_Write_Call) Run

func (*Websocket_Write_Call) RunAndReturn

Jump to

Keyboard shortcuts

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