mocks

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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 WebsocketClient

type WebsocketClient struct {
	mock.Mock
}

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

Dial provides a mock function with given fields: ctx, u, opts

func (*WebsocketClient) EXPECT

type WebsocketClient_Dial_Call

type WebsocketClient_Dial_Call struct {
	*mock.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 (*WebsocketClient_Dial_Call) Run

func (*WebsocketClient_Dial_Call) RunAndReturn

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

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) 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_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