Documentation ¶
Index ¶
- 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) Write(ctx context.Context, typ websocket.MessageType, p []byte) error
- type WebsocketClient
- type WebsocketClient_Dial_Call
- func (_c *WebsocketClient_Dial_Call) Return(_a0 consumer.Websocket, _a1 *http.Response, _a2 error) *WebsocketClient_Dial_Call
- func (_c *WebsocketClient_Dial_Call) Run(run func(ctx context.Context, u string, opts *websocket.DialOptions)) *WebsocketClient_Dial_Call
- func (_c *WebsocketClient_Dial_Call) RunAndReturn(...) *WebsocketClient_Dial_Call
- type WebsocketClient_Expecter
- type Websocket_Close_Call
- type Websocket_Expecter
- 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_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 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
type WebsocketClient ¶
WebsocketClient is an autogenerated mock type for the WebsocketClient type
func NewWebsocketClient ¶
func NewWebsocketClient(t mockConstructorTestingTNewWebsocketClient) *WebsocketClient
NewWebsocketClient creates a new instance of WebsocketClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*WebsocketClient) Dial ¶
func (_m *WebsocketClient) Dial(ctx context.Context, u string, opts *websocket.DialOptions) (consumer.Websocket, *http.Response, error)
Dial provides a mock function with given fields: ctx, u, opts
func (*WebsocketClient) EXPECT ¶
func (_m *WebsocketClient) EXPECT() *WebsocketClient_Expecter
type WebsocketClient_Dial_Call ¶
WebsocketClient_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial'
func (*WebsocketClient_Dial_Call) Return ¶
func (_c *WebsocketClient_Dial_Call) Return(_a0 consumer.Websocket, _a1 *http.Response, _a2 error) *WebsocketClient_Dial_Call
func (*WebsocketClient_Dial_Call) Run ¶
func (_c *WebsocketClient_Dial_Call) Run(run func(ctx context.Context, u string, opts *websocket.DialOptions)) *WebsocketClient_Dial_Call
func (*WebsocketClient_Dial_Call) RunAndReturn ¶
func (_c *WebsocketClient_Dial_Call) RunAndReturn(run func(context.Context, string, *websocket.DialOptions) (consumer.Websocket, *http.Response, error)) *WebsocketClient_Dial_Call
type WebsocketClient_Expecter ¶
type WebsocketClient_Expecter struct {
// contains filtered or unexported fields
}
func (*WebsocketClient_Expecter) Dial ¶
func (_e *WebsocketClient_Expecter) Dial(ctx interface{}, u interface{}, opts interface{}) *WebsocketClient_Dial_Call
Dial is a helper method to define mock.On call
- ctx context.Context
- u string
- opts *websocket.DialOptions
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) 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_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