Documentation ¶
Index ¶
- type Client
- type ClientListener
- type ClientListener_Expecter
- type ClientListener_ServeHTTP_Call
- func (_c *ClientListener_ServeHTTP_Call) Return() *ClientListener_ServeHTTP_Call
- func (_c *ClientListener_ServeHTTP_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *ClientListener_ServeHTTP_Call
- func (_c *ClientListener_ServeHTTP_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *ClientListener_ServeHTTP_Call
- type ClientManager
- func (_m *ClientManager) AddClient(conn publisher.Client)
- func (_m *ClientManager) AddClientRouting(id string, conn publisher.Client)
- func (_m *ClientManager) CloseAllClients()
- func (_m *ClientManager) EXPECT() *ClientManager_Expecter
- func (_m *ClientManager) GetClientRouting(id string) (publisher.Client, error)
- func (_m *ClientManager) Process(ctx context.Context, conn publisher.Websocket)
- func (_m *ClientManager) RemoveClientRouting(id string)
- type ClientManager_AddClientRouting_Call
- func (_c *ClientManager_AddClientRouting_Call) Return() *ClientManager_AddClientRouting_Call
- func (_c *ClientManager_AddClientRouting_Call) Run(run func(id string, conn publisher.Client)) *ClientManager_AddClientRouting_Call
- func (_c *ClientManager_AddClientRouting_Call) RunAndReturn(run func(string, publisher.Client)) *ClientManager_AddClientRouting_Call
- type ClientManager_AddClient_Call
- type ClientManager_CloseAllClients_Call
- type ClientManager_Expecter
- func (_e *ClientManager_Expecter) AddClient(conn interface{}) *ClientManager_AddClient_Call
- func (_e *ClientManager_Expecter) AddClientRouting(id interface{}, conn interface{}) *ClientManager_AddClientRouting_Call
- func (_e *ClientManager_Expecter) CloseAllClients() *ClientManager_CloseAllClients_Call
- func (_e *ClientManager_Expecter) GetClientRouting(id interface{}) *ClientManager_GetClientRouting_Call
- func (_e *ClientManager_Expecter) Process(ctx interface{}, conn interface{}) *ClientManager_Process_Call
- func (_e *ClientManager_Expecter) RemoveClientRouting(id interface{}) *ClientManager_RemoveClientRouting_Call
- type ClientManager_GetClientRouting_Call
- func (_c *ClientManager_GetClientRouting_Call) Return(_a0 publisher.Client, _a1 error) *ClientManager_GetClientRouting_Call
- func (_c *ClientManager_GetClientRouting_Call) Run(run func(id string)) *ClientManager_GetClientRouting_Call
- func (_c *ClientManager_GetClientRouting_Call) RunAndReturn(run func(string) (publisher.Client, error)) *ClientManager_GetClientRouting_Call
- type ClientManager_Process_Call
- func (_c *ClientManager_Process_Call) Return() *ClientManager_Process_Call
- func (_c *ClientManager_Process_Call) Run(run func(ctx context.Context, conn publisher.Websocket)) *ClientManager_Process_Call
- func (_c *ClientManager_Process_Call) RunAndReturn(run func(context.Context, publisher.Websocket)) *ClientManager_Process_Call
- type ClientManager_RemoveClientRouting_Call
- func (_c *ClientManager_RemoveClientRouting_Call) Return() *ClientManager_RemoveClientRouting_Call
- func (_c *ClientManager_RemoveClientRouting_Call) Run(run func(id string)) *ClientManager_RemoveClientRouting_Call
- func (_c *ClientManager_RemoveClientRouting_Call) RunAndReturn(run func(string)) *ClientManager_RemoveClientRouting_Call
- type Client_Close_Call
- type Client_Expecter
- type Client_HandleMessage_Call
- func (_c *Client_HandleMessage_Call) Return(_a0 error) *Client_HandleMessage_Call
- func (_c *Client_HandleMessage_Call) Run(run func(ctx context.Context, msg funcie.Message)) *Client_HandleMessage_Call
- func (_c *Client_HandleMessage_Call) RunAndReturn(run func(context.Context, funcie.Message) error) *Client_HandleMessage_Call
- type Websocket
- func (_m *Websocket) Close(code websocket.StatusCode, reason string) error
- func (_m *Websocket) EXPECT() *Websocket_Expecter
- func (_m *Websocket) Read(ctx context.Context) (websocket.MessageType, []byte, error)
- func (_m *Websocket) Subprotocol() string
- func (_m *Websocket) Write(ctx context.Context, typ websocket.MessageType, p []byte) error
- type WebsocketServer
- type WebsocketServer_Accept_Call
- type WebsocketServer_Expecter
- type Websocket_Close_Call
- type Websocket_Expecter
- func (_e *Websocket_Expecter) Close(code interface{}, reason interface{}) *Websocket_Close_Call
- func (_e *Websocket_Expecter) Read(ctx interface{}) *Websocket_Read_Call
- func (_e *Websocket_Expecter) Subprotocol() *Websocket_Subprotocol_Call
- func (_e *Websocket_Expecter) Write(ctx interface{}, typ interface{}, p interface{}) *Websocket_Write_Call
- type Websocket_Read_Call
- func (_c *Websocket_Read_Call) Return(_a0 websocket.MessageType, _a1 []byte, _a2 error) *Websocket_Read_Call
- func (_c *Websocket_Read_Call) Run(run func(ctx context.Context)) *Websocket_Read_Call
- func (_c *Websocket_Read_Call) RunAndReturn(run func(context.Context) (websocket.MessageType, []byte, error)) *Websocket_Read_Call
- type Websocket_Subprotocol_Call
- type Websocket_Write_Call
- func (_c *Websocket_Write_Call) Return(_a0 error) *Websocket_Write_Call
- func (_c *Websocket_Write_Call) Run(run func(ctx context.Context, typ websocket.MessageType, p []byte)) *Websocket_Write_Call
- func (_c *Websocket_Write_Call) RunAndReturn(run func(context.Context, websocket.MessageType, []byte) error) *Websocket_Write_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
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) EXPECT ¶
func (_m *Client) EXPECT() *Client_Expecter
type ClientListener ¶
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 (_m *ClientListener) EXPECT() *ClientListener_Expecter
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 ¶
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 (_c *ClientListener_ServeHTTP_Call) Return() *ClientListener_ServeHTTP_Call
func (*ClientListener_ServeHTTP_Call) Run ¶
func (_c *ClientListener_ServeHTTP_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *ClientListener_ServeHTTP_Call
func (*ClientListener_ServeHTTP_Call) RunAndReturn ¶
func (_c *ClientListener_ServeHTTP_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *ClientListener_ServeHTTP_Call
type ClientManager ¶
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 ¶
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 (_c *ClientManager_AddClientRouting_Call) Return() *ClientManager_AddClientRouting_Call
func (*ClientManager_AddClientRouting_Call) Run ¶
func (_c *ClientManager_AddClientRouting_Call) Run(run func(id string, conn publisher.Client)) *ClientManager_AddClientRouting_Call
func (*ClientManager_AddClientRouting_Call) RunAndReturn ¶
func (_c *ClientManager_AddClientRouting_Call) RunAndReturn(run func(string, publisher.Client)) *ClientManager_AddClientRouting_Call
type ClientManager_AddClient_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 (_c *ClientManager_AddClient_Call) Return() *ClientManager_AddClient_Call
func (*ClientManager_AddClient_Call) Run ¶
func (_c *ClientManager_AddClient_Call) Run(run func(conn publisher.Client)) *ClientManager_AddClient_Call
func (*ClientManager_AddClient_Call) RunAndReturn ¶
func (_c *ClientManager_AddClient_Call) RunAndReturn(run func(publisher.Client)) *ClientManager_AddClient_Call
type ClientManager_CloseAllClients_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 (_c *ClientManager_CloseAllClients_Call) Return() *ClientManager_CloseAllClients_Call
func (*ClientManager_CloseAllClients_Call) Run ¶
func (_c *ClientManager_CloseAllClients_Call) Run(run func()) *ClientManager_CloseAllClients_Call
func (*ClientManager_CloseAllClients_Call) RunAndReturn ¶
func (_c *ClientManager_CloseAllClients_Call) RunAndReturn(run func()) *ClientManager_CloseAllClients_Call
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 ¶
func (_e *ClientManager_Expecter) CloseAllClients() *ClientManager_CloseAllClients_Call
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 ¶
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 (_c *ClientManager_GetClientRouting_Call) Return(_a0 publisher.Client, _a1 error) *ClientManager_GetClientRouting_Call
func (*ClientManager_GetClientRouting_Call) Run ¶
func (_c *ClientManager_GetClientRouting_Call) Run(run func(id string)) *ClientManager_GetClientRouting_Call
func (*ClientManager_GetClientRouting_Call) RunAndReturn ¶
func (_c *ClientManager_GetClientRouting_Call) RunAndReturn(run func(string) (publisher.Client, error)) *ClientManager_GetClientRouting_Call
type ClientManager_Process_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 (_c *ClientManager_Process_Call) Return() *ClientManager_Process_Call
func (*ClientManager_Process_Call) Run ¶
func (_c *ClientManager_Process_Call) Run(run func(ctx context.Context, conn publisher.Websocket)) *ClientManager_Process_Call
func (*ClientManager_Process_Call) RunAndReturn ¶
func (_c *ClientManager_Process_Call) RunAndReturn(run func(context.Context, publisher.Websocket)) *ClientManager_Process_Call
type ClientManager_RemoveClientRouting_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 (_c *ClientManager_RemoveClientRouting_Call) Return() *ClientManager_RemoveClientRouting_Call
func (*ClientManager_RemoveClientRouting_Call) Run ¶
func (_c *ClientManager_RemoveClientRouting_Call) Run(run func(id string)) *ClientManager_RemoveClientRouting_Call
func (*ClientManager_RemoveClientRouting_Call) RunAndReturn ¶
func (_c *ClientManager_RemoveClientRouting_Call) RunAndReturn(run func(string)) *ClientManager_RemoveClientRouting_Call
type Client_Close_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 ¶
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 (_c *Client_HandleMessage_Call) Return(_a0 error) *Client_HandleMessage_Call
func (*Client_HandleMessage_Call) Run ¶
func (_c *Client_HandleMessage_Call) Run(run func(ctx context.Context, msg funcie.Message)) *Client_HandleMessage_Call
func (*Client_HandleMessage_Call) RunAndReturn ¶
func (_c *Client_HandleMessage_Call) RunAndReturn(run func(context.Context, funcie.Message) error) *Client_HandleMessage_Call
type Websocket ¶
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) Subprotocol ¶
Subprotocol provides a mock function with given fields:
type WebsocketServer ¶
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 ¶
func (_m *WebsocketServer) Accept(w http.ResponseWriter, r *http.Request, opts *websocket.AcceptOptions) (publisher.Websocket, error)
Accept provides a mock function with given fields: w, r, opts
func (*WebsocketServer) EXPECT ¶
func (_m *WebsocketServer) EXPECT() *WebsocketServer_Expecter
type WebsocketServer_Accept_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 (_c *WebsocketServer_Accept_Call) Return(_a0 publisher.Websocket, _a1 error) *WebsocketServer_Accept_Call
func (*WebsocketServer_Accept_Call) Run ¶
func (_c *WebsocketServer_Accept_Call) Run(run func(w http.ResponseWriter, r *http.Request, opts *websocket.AcceptOptions)) *WebsocketServer_Accept_Call
func (*WebsocketServer_Accept_Call) RunAndReturn ¶
func (_c *WebsocketServer_Accept_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request, *websocket.AcceptOptions) (publisher.Websocket, error)) *WebsocketServer_Accept_Call
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 ¶
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 (_c *Websocket_Close_Call) Return(_a0 error) *Websocket_Close_Call
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 ¶
func (_c *Websocket_Close_Call) RunAndReturn(run func(websocket.StatusCode, string) error) *Websocket_Close_Call
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 ¶
func (_e *Websocket_Expecter) Subprotocol() *Websocket_Subprotocol_Call
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 ¶
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 (_c *Websocket_Read_Call) Return(_a0 websocket.MessageType, _a1 []byte, _a2 error) *Websocket_Read_Call
func (*Websocket_Read_Call) Run ¶
func (_c *Websocket_Read_Call) Run(run func(ctx context.Context)) *Websocket_Read_Call
func (*Websocket_Read_Call) RunAndReturn ¶
func (_c *Websocket_Read_Call) RunAndReturn(run func(context.Context) (websocket.MessageType, []byte, error)) *Websocket_Read_Call
type Websocket_Subprotocol_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 (_c *Websocket_Subprotocol_Call) Return(_a0 string) *Websocket_Subprotocol_Call
func (*Websocket_Subprotocol_Call) Run ¶
func (_c *Websocket_Subprotocol_Call) Run(run func()) *Websocket_Subprotocol_Call
func (*Websocket_Subprotocol_Call) RunAndReturn ¶
func (_c *Websocket_Subprotocol_Call) RunAndReturn(run func() string) *Websocket_Subprotocol_Call
type Websocket_Write_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 (_c *Websocket_Write_Call) Return(_a0 error) *Websocket_Write_Call
func (*Websocket_Write_Call) Run ¶
func (_c *Websocket_Write_Call) Run(run func(ctx context.Context, typ websocket.MessageType, p []byte)) *Websocket_Write_Call
func (*Websocket_Write_Call) RunAndReturn ¶
func (_c *Websocket_Write_Call) RunAndReturn(run func(context.Context, websocket.MessageType, []byte) error) *Websocket_Write_Call