mocks

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func (_m *MockChannel) EXPECT() *MockChannel_Expecter

func (*MockChannel) ID

func (_m *MockChannel) ID() string

ID provides a mock function with no fields

func (*MockChannel) IsConnected

func (_m *MockChannel) IsConnected() bool

IsConnected provides a mock function with no fields

func (*MockChannel) RemoteAddr

func (_m *MockChannel) RemoteAddr() net.Addr

RemoteAddr provides a mock function with no fields

func (*MockChannel) TLSConnectionState

func (_m *MockChannel) TLSConnectionState() *tls.ConnectionState

TLSConnectionState provides a mock function with no fields

type MockChannel_Expecter

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

func (*MockChannel_Expecter) ID

ID is a helper method to define mock.On call

func (*MockChannel_Expecter) IsConnected

IsConnected is a helper method to define mock.On call

func (*MockChannel_Expecter) RemoteAddr

RemoteAddr is a helper method to define mock.On call

func (*MockChannel_Expecter) TLSConnectionState

TLSConnectionState is a helper method to define mock.On call

type MockChannel_ID_Call

type MockChannel_ID_Call struct {
	*mock.Call
}

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

func (*MockChannel_ID_Call) Return

func (*MockChannel_ID_Call) Run

func (_c *MockChannel_ID_Call) Run(run func()) *MockChannel_ID_Call

func (*MockChannel_ID_Call) RunAndReturn

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

type MockChannel_IsConnected_Call

type MockChannel_IsConnected_Call struct {
	*mock.Call
}

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

func (*MockChannel_IsConnected_Call) Return

func (*MockChannel_IsConnected_Call) Run

func (*MockChannel_IsConnected_Call) RunAndReturn

func (_c *MockChannel_IsConnected_Call) RunAndReturn(run func() bool) *MockChannel_IsConnected_Call

type MockChannel_RemoteAddr_Call

type MockChannel_RemoteAddr_Call struct {
	*mock.Call
}

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

func (*MockChannel_RemoteAddr_Call) Return

func (*MockChannel_RemoteAddr_Call) Run

func (*MockChannel_RemoteAddr_Call) RunAndReturn

func (_c *MockChannel_RemoteAddr_Call) RunAndReturn(run func() net.Addr) *MockChannel_RemoteAddr_Call

type MockChannel_TLSConnectionState_Call

type MockChannel_TLSConnectionState_Call struct {
	*mock.Call
}

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

func (*MockChannel_TLSConnectionState_Call) Return

func (*MockChannel_TLSConnectionState_Call) Run

func (*MockChannel_TLSConnectionState_Call) RunAndReturn

type MockCheckClientHandler

type MockCheckClientHandler struct {
	mock.Mock
}

MockCheckClientHandler is an autogenerated mock type for the CheckClientHandler type

func NewMockCheckClientHandler

func NewMockCheckClientHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCheckClientHandler

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

func (*MockCheckClientHandler) Execute

func (_m *MockCheckClientHandler) Execute(id string, r *http.Request) bool

Execute provides a mock function with given fields: id, r

type MockCheckClientHandler_Execute_Call

type MockCheckClientHandler_Execute_Call struct {
	*mock.Call
}

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

func (*MockCheckClientHandler_Execute_Call) Return

func (*MockCheckClientHandler_Execute_Call) Run

func (*MockCheckClientHandler_Execute_Call) RunAndReturn

type MockCheckClientHandler_Expecter

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

func (*MockCheckClientHandler_Expecter) Execute

func (_e *MockCheckClientHandler_Expecter) Execute(id interface{}, r interface{}) *MockCheckClientHandler_Execute_Call

Execute is a helper method to define mock.On call

  • id string
  • r *http.Request

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. 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 (*MockClient) AddOption

func (_m *MockClient) AddOption(option interface{})

AddOption provides a mock function with given fields: option

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Errors

func (_m *MockClient) Errors() <-chan error

Errors provides a mock function with no fields

func (*MockClient) IsConnected

func (_m *MockClient) IsConnected() bool

IsConnected provides a mock function with no fields

func (*MockClient) SetBasicAuth

func (_m *MockClient) SetBasicAuth(username string, password string)

SetBasicAuth provides a mock function with given fields: username, password

func (*MockClient) SetDisconnectedHandler

func (_m *MockClient) SetDisconnectedHandler(handler func(error))

SetDisconnectedHandler provides a mock function with given fields: handler

func (*MockClient) SetHeaderValue

func (_m *MockClient) SetHeaderValue(key string, value string)

SetHeaderValue provides a mock function with given fields: key, value

func (*MockClient) SetMessageHandler

func (_m *MockClient) SetMessageHandler(handler func([]byte) error)

SetMessageHandler provides a mock function with given fields: handler

func (*MockClient) SetReconnectedHandler

func (_m *MockClient) SetReconnectedHandler(handler func())

SetReconnectedHandler provides a mock function with given fields: handler

func (*MockClient) SetRequestedSubProtocol

func (_m *MockClient) SetRequestedSubProtocol(subProto string)

SetRequestedSubProtocol provides a mock function with given fields: subProto

func (*MockClient) SetTimeoutConfig

func (_m *MockClient) SetTimeoutConfig(config ws.ClientTimeoutConfig)

SetTimeoutConfig provides a mock function with given fields: config

func (*MockClient) Start

func (_m *MockClient) Start(url string) error

Start provides a mock function with given fields: url

func (*MockClient) StartWithRetries

func (_m *MockClient) StartWithRetries(url string)

StartWithRetries provides a mock function with given fields: url

func (*MockClient) Stop

func (_m *MockClient) Stop()

Stop provides a mock function with no fields

func (*MockClient) Write

func (_m *MockClient) Write(data []byte) error

Write provides a mock function with given fields: data

type MockClientOpt

type MockClientOpt struct {
	mock.Mock
}

MockClientOpt is an autogenerated mock type for the ClientOpt type

func NewMockClientOpt

func NewMockClientOpt(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClientOpt

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

func (_m *MockClientOpt) EXPECT() *MockClientOpt_Expecter

func (*MockClientOpt) Execute

func (_m *MockClientOpt) Execute(c *ws.client)

Execute provides a mock function with given fields: c

type MockClientOpt_Execute_Call

type MockClientOpt_Execute_Call struct {
	*mock.Call
}

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

func (*MockClientOpt_Execute_Call) Return

func (*MockClientOpt_Execute_Call) Run

func (_c *MockClientOpt_Execute_Call) Run(run func(c *ws.client)) *MockClientOpt_Execute_Call

func (*MockClientOpt_Execute_Call) RunAndReturn

func (_c *MockClientOpt_Execute_Call) RunAndReturn(run func(*ws.client)) *MockClientOpt_Execute_Call

type MockClientOpt_Expecter

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

func (*MockClientOpt_Expecter) Execute

func (_e *MockClientOpt_Expecter) Execute(c interface{}) *MockClientOpt_Execute_Call

Execute is a helper method to define mock.On call

  • c *ws.client

type MockClient_AddOption_Call

type MockClient_AddOption_Call struct {
	*mock.Call
}

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

func (*MockClient_AddOption_Call) Return

func (*MockClient_AddOption_Call) Run

func (_c *MockClient_AddOption_Call) Run(run func(option interface{})) *MockClient_AddOption_Call

func (*MockClient_AddOption_Call) RunAndReturn

func (_c *MockClient_AddOption_Call) RunAndReturn(run func(interface{})) *MockClient_AddOption_Call

type MockClient_Errors_Call

type MockClient_Errors_Call struct {
	*mock.Call
}

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

func (*MockClient_Errors_Call) Return

func (_c *MockClient_Errors_Call) Return(_a0 <-chan error) *MockClient_Errors_Call

func (*MockClient_Errors_Call) Run

func (_c *MockClient_Errors_Call) Run(run func()) *MockClient_Errors_Call

func (*MockClient_Errors_Call) RunAndReturn

func (_c *MockClient_Errors_Call) RunAndReturn(run func() <-chan error) *MockClient_Errors_Call

type MockClient_Expecter

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

func (*MockClient_Expecter) AddOption

func (_e *MockClient_Expecter) AddOption(option interface{}) *MockClient_AddOption_Call

AddOption is a helper method to define mock.On call

  • option interface{}

func (*MockClient_Expecter) Errors

Errors is a helper method to define mock.On call

func (*MockClient_Expecter) IsConnected

IsConnected is a helper method to define mock.On call

func (*MockClient_Expecter) SetBasicAuth

func (_e *MockClient_Expecter) SetBasicAuth(username interface{}, password interface{}) *MockClient_SetBasicAuth_Call

SetBasicAuth is a helper method to define mock.On call

  • username string
  • password string

func (*MockClient_Expecter) SetDisconnectedHandler

func (_e *MockClient_Expecter) SetDisconnectedHandler(handler interface{}) *MockClient_SetDisconnectedHandler_Call

SetDisconnectedHandler is a helper method to define mock.On call

  • handler func(error)

func (*MockClient_Expecter) SetHeaderValue

func (_e *MockClient_Expecter) SetHeaderValue(key interface{}, value interface{}) *MockClient_SetHeaderValue_Call

SetHeaderValue is a helper method to define mock.On call

  • key string
  • value string

func (*MockClient_Expecter) SetMessageHandler

func (_e *MockClient_Expecter) SetMessageHandler(handler interface{}) *MockClient_SetMessageHandler_Call

SetMessageHandler is a helper method to define mock.On call

  • handler func([]byte) error

func (*MockClient_Expecter) SetReconnectedHandler

func (_e *MockClient_Expecter) SetReconnectedHandler(handler interface{}) *MockClient_SetReconnectedHandler_Call

SetReconnectedHandler is a helper method to define mock.On call

  • handler func()

func (*MockClient_Expecter) SetRequestedSubProtocol

func (_e *MockClient_Expecter) SetRequestedSubProtocol(subProto interface{}) *MockClient_SetRequestedSubProtocol_Call

SetRequestedSubProtocol is a helper method to define mock.On call

  • subProto string

func (*MockClient_Expecter) SetTimeoutConfig

func (_e *MockClient_Expecter) SetTimeoutConfig(config interface{}) *MockClient_SetTimeoutConfig_Call

SetTimeoutConfig is a helper method to define mock.On call

  • config ws.ClientTimeoutConfig

func (*MockClient_Expecter) Start

func (_e *MockClient_Expecter) Start(url interface{}) *MockClient_Start_Call

Start is a helper method to define mock.On call

  • url string

func (*MockClient_Expecter) StartWithRetries

func (_e *MockClient_Expecter) StartWithRetries(url interface{}) *MockClient_StartWithRetries_Call

StartWithRetries is a helper method to define mock.On call

  • url string

func (*MockClient_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockClient_Expecter) Write

func (_e *MockClient_Expecter) Write(data interface{}) *MockClient_Write_Call

Write is a helper method to define mock.On call

  • data []byte

type MockClient_IsConnected_Call

type MockClient_IsConnected_Call struct {
	*mock.Call
}

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

func (*MockClient_IsConnected_Call) Return

func (*MockClient_IsConnected_Call) Run

func (*MockClient_IsConnected_Call) RunAndReturn

func (_c *MockClient_IsConnected_Call) RunAndReturn(run func() bool) *MockClient_IsConnected_Call

type MockClient_SetBasicAuth_Call

type MockClient_SetBasicAuth_Call struct {
	*mock.Call
}

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

func (*MockClient_SetBasicAuth_Call) Return

func (*MockClient_SetBasicAuth_Call) Run

func (_c *MockClient_SetBasicAuth_Call) Run(run func(username string, password string)) *MockClient_SetBasicAuth_Call

func (*MockClient_SetBasicAuth_Call) RunAndReturn

type MockClient_SetDisconnectedHandler_Call

type MockClient_SetDisconnectedHandler_Call struct {
	*mock.Call
}

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

func (*MockClient_SetDisconnectedHandler_Call) Return

func (*MockClient_SetDisconnectedHandler_Call) Run

func (*MockClient_SetDisconnectedHandler_Call) RunAndReturn

type MockClient_SetHeaderValue_Call

type MockClient_SetHeaderValue_Call struct {
	*mock.Call
}

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

func (*MockClient_SetHeaderValue_Call) Return

func (*MockClient_SetHeaderValue_Call) Run

func (*MockClient_SetHeaderValue_Call) RunAndReturn

type MockClient_SetMessageHandler_Call

type MockClient_SetMessageHandler_Call struct {
	*mock.Call
}

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

func (*MockClient_SetMessageHandler_Call) Return

func (*MockClient_SetMessageHandler_Call) Run

func (*MockClient_SetMessageHandler_Call) RunAndReturn

type MockClient_SetReconnectedHandler_Call

type MockClient_SetReconnectedHandler_Call struct {
	*mock.Call
}

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

func (*MockClient_SetReconnectedHandler_Call) Return

func (*MockClient_SetReconnectedHandler_Call) Run

func (*MockClient_SetReconnectedHandler_Call) RunAndReturn

type MockClient_SetRequestedSubProtocol_Call

type MockClient_SetRequestedSubProtocol_Call struct {
	*mock.Call
}

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

func (*MockClient_SetRequestedSubProtocol_Call) Return

func (*MockClient_SetRequestedSubProtocol_Call) Run

func (*MockClient_SetRequestedSubProtocol_Call) RunAndReturn

type MockClient_SetTimeoutConfig_Call

type MockClient_SetTimeoutConfig_Call struct {
	*mock.Call
}

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

func (*MockClient_SetTimeoutConfig_Call) Return

func (*MockClient_SetTimeoutConfig_Call) Run

func (*MockClient_SetTimeoutConfig_Call) RunAndReturn

type MockClient_StartWithRetries_Call

type MockClient_StartWithRetries_Call struct {
	*mock.Call
}

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

func (*MockClient_StartWithRetries_Call) Return

func (*MockClient_StartWithRetries_Call) Run

func (*MockClient_StartWithRetries_Call) RunAndReturn

type MockClient_Start_Call

type MockClient_Start_Call struct {
	*mock.Call
}

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

func (*MockClient_Start_Call) Return

func (*MockClient_Start_Call) Run

func (_c *MockClient_Start_Call) Run(run func(url string)) *MockClient_Start_Call

func (*MockClient_Start_Call) RunAndReturn

func (_c *MockClient_Start_Call) RunAndReturn(run func(string) error) *MockClient_Start_Call

type MockClient_Stop_Call

type MockClient_Stop_Call struct {
	*mock.Call
}

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

func (*MockClient_Stop_Call) Return

func (*MockClient_Stop_Call) Run

func (_c *MockClient_Stop_Call) Run(run func()) *MockClient_Stop_Call

func (*MockClient_Stop_Call) RunAndReturn

func (_c *MockClient_Stop_Call) RunAndReturn(run func()) *MockClient_Stop_Call

type MockClient_Write_Call

type MockClient_Write_Call struct {
	*mock.Call
}

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

func (*MockClient_Write_Call) Return

func (*MockClient_Write_Call) Run

func (_c *MockClient_Write_Call) Run(run func(data []byte)) *MockClient_Write_Call

func (*MockClient_Write_Call) RunAndReturn

func (_c *MockClient_Write_Call) RunAndReturn(run func([]byte) error) *MockClient_Write_Call

type MockConnectedHandler

type MockConnectedHandler struct {
	mock.Mock
}

MockConnectedHandler is an autogenerated mock type for the ConnectedHandler type

func NewMockConnectedHandler

func NewMockConnectedHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnectedHandler

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

func (*MockConnectedHandler) Execute

func (_m *MockConnectedHandler) Execute(c ws.Channel)

Execute provides a mock function with given fields: c

type MockConnectedHandler_Execute_Call

type MockConnectedHandler_Execute_Call struct {
	*mock.Call
}

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

func (*MockConnectedHandler_Execute_Call) Return

func (*MockConnectedHandler_Execute_Call) Run

func (*MockConnectedHandler_Execute_Call) RunAndReturn

type MockConnectedHandler_Expecter

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

func (*MockConnectedHandler_Expecter) Execute

Execute is a helper method to define mock.On call

  • c ws.Channel

type MockDisconnectedHandler

type MockDisconnectedHandler struct {
	mock.Mock
}

MockDisconnectedHandler is an autogenerated mock type for the DisconnectedHandler type

func NewMockDisconnectedHandler

func NewMockDisconnectedHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDisconnectedHandler

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

func (*MockDisconnectedHandler) Execute

func (_m *MockDisconnectedHandler) Execute(c ws.Channel, err error)

Execute provides a mock function with given fields: c, err

type MockDisconnectedHandler_Execute_Call

type MockDisconnectedHandler_Execute_Call struct {
	*mock.Call
}

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

func (*MockDisconnectedHandler_Execute_Call) Return

func (*MockDisconnectedHandler_Execute_Call) Run

func (*MockDisconnectedHandler_Execute_Call) RunAndReturn

type MockDisconnectedHandler_Expecter

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

func (*MockDisconnectedHandler_Expecter) Execute

func (_e *MockDisconnectedHandler_Expecter) Execute(c interface{}, err interface{}) *MockDisconnectedHandler_Execute_Call

Execute is a helper method to define mock.On call

  • c ws.Channel
  • err error

type MockErrorHandler

type MockErrorHandler struct {
	mock.Mock
}

MockErrorHandler is an autogenerated mock type for the ErrorHandler type

func NewMockErrorHandler

func NewMockErrorHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockErrorHandler

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

func (*MockErrorHandler) Execute

func (_m *MockErrorHandler) Execute(c ws.Channel, err error)

Execute provides a mock function with given fields: c, err

type MockErrorHandler_Execute_Call

type MockErrorHandler_Execute_Call struct {
	*mock.Call
}

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

func (*MockErrorHandler_Execute_Call) Return

func (*MockErrorHandler_Execute_Call) Run

func (*MockErrorHandler_Execute_Call) RunAndReturn

type MockErrorHandler_Expecter

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

func (*MockErrorHandler_Expecter) Execute

func (_e *MockErrorHandler_Expecter) Execute(c interface{}, err interface{}) *MockErrorHandler_Execute_Call

Execute is a helper method to define mock.On call

  • c ws.Channel
  • err error

type MockMessageHandler

type MockMessageHandler struct {
	mock.Mock
}

MockMessageHandler is an autogenerated mock type for the MessageHandler type

func NewMockMessageHandler

func NewMockMessageHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMessageHandler

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

func (*MockMessageHandler) Execute

func (_m *MockMessageHandler) Execute(c ws.Channel, data []byte) error

Execute provides a mock function with given fields: c, data

type MockMessageHandler_Execute_Call

type MockMessageHandler_Execute_Call struct {
	*mock.Call
}

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

func (*MockMessageHandler_Execute_Call) Return

func (*MockMessageHandler_Execute_Call) Run

func (*MockMessageHandler_Execute_Call) RunAndReturn

type MockMessageHandler_Expecter

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

func (*MockMessageHandler_Expecter) Execute

func (_e *MockMessageHandler_Expecter) Execute(c interface{}, data interface{}) *MockMessageHandler_Execute_Call

Execute is a helper method to define mock.On call

  • c ws.Channel
  • data []byte

type MockServer

type MockServer struct {
	mock.Mock
}

MockServer is an autogenerated mock type for the Server type

func NewMockServer

func NewMockServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockServer

NewMockServer creates a new instance of MockServer. 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 (*MockServer) AddSupportedSubprotocol

func (_m *MockServer) AddSupportedSubprotocol(subProto string)

AddSupportedSubprotocol provides a mock function with given fields: subProto

func (*MockServer) Addr

func (_m *MockServer) Addr() *net.TCPAddr

Addr provides a mock function with no fields

func (*MockServer) EXPECT

func (_m *MockServer) EXPECT() *MockServer_Expecter

func (*MockServer) Errors

func (_m *MockServer) Errors() <-chan error

Errors provides a mock function with no fields

func (*MockServer) GetChannel

func (_m *MockServer) GetChannel(websocketId string) (ws.Channel, bool)

GetChannel provides a mock function with given fields: websocketId

func (*MockServer) SetBasicAuthHandler

func (_m *MockServer) SetBasicAuthHandler(handler func(string, string) bool)

SetBasicAuthHandler provides a mock function with given fields: handler

func (*MockServer) SetChargePointIdResolver

func (_m *MockServer) SetChargePointIdResolver(resolver func(*http.Request) (string, error))

SetChargePointIdResolver provides a mock function with given fields: resolver

func (*MockServer) SetCheckClientHandler

func (_m *MockServer) SetCheckClientHandler(handler ws.CheckClientHandler)

SetCheckClientHandler provides a mock function with given fields: handler

func (*MockServer) SetCheckOriginHandler

func (_m *MockServer) SetCheckOriginHandler(handler func(*http.Request) bool)

SetCheckOriginHandler provides a mock function with given fields: handler

func (*MockServer) SetDisconnectedClientHandler

func (_m *MockServer) SetDisconnectedClientHandler(handler func(ws.Channel))

SetDisconnectedClientHandler provides a mock function with given fields: handler

func (*MockServer) SetMessageHandler

func (_m *MockServer) SetMessageHandler(handler ws.MessageHandler)

SetMessageHandler provides a mock function with given fields: handler

func (*MockServer) SetNewClientHandler

func (_m *MockServer) SetNewClientHandler(handler ws.ConnectedHandler)

SetNewClientHandler provides a mock function with given fields: handler

func (*MockServer) SetTimeoutConfig

func (_m *MockServer) SetTimeoutConfig(config ws.ServerTimeoutConfig)

SetTimeoutConfig provides a mock function with given fields: config

func (*MockServer) Start

func (_m *MockServer) Start(port int, listenPath string)

Start provides a mock function with given fields: port, listenPath

func (*MockServer) Stop

func (_m *MockServer) Stop()

Stop provides a mock function with no fields

func (*MockServer) StopConnection

func (_m *MockServer) StopConnection(id string, closeError websocket.CloseError) error

StopConnection provides a mock function with given fields: id, closeError

func (*MockServer) Write

func (_m *MockServer) Write(webSocketId string, data []byte) error

Write provides a mock function with given fields: webSocketId, data

type MockServerOpt

type MockServerOpt struct {
	mock.Mock
}

MockServerOpt is an autogenerated mock type for the ServerOpt type

func NewMockServerOpt

func NewMockServerOpt(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockServerOpt

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

func (_m *MockServerOpt) EXPECT() *MockServerOpt_Expecter

func (*MockServerOpt) Execute

func (_m *MockServerOpt) Execute(s *ws.server)

Execute provides a mock function with given fields: s

type MockServerOpt_Execute_Call

type MockServerOpt_Execute_Call struct {
	*mock.Call
}

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

func (*MockServerOpt_Execute_Call) Return

func (*MockServerOpt_Execute_Call) Run

func (_c *MockServerOpt_Execute_Call) Run(run func(s *ws.server)) *MockServerOpt_Execute_Call

func (*MockServerOpt_Execute_Call) RunAndReturn

func (_c *MockServerOpt_Execute_Call) RunAndReturn(run func(*ws.server)) *MockServerOpt_Execute_Call

type MockServerOpt_Expecter

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

func (*MockServerOpt_Expecter) Execute

func (_e *MockServerOpt_Expecter) Execute(s interface{}) *MockServerOpt_Execute_Call

Execute is a helper method to define mock.On call

  • s *ws.server

type MockServer_AddSupportedSubprotocol_Call

type MockServer_AddSupportedSubprotocol_Call struct {
	*mock.Call
}

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

func (*MockServer_AddSupportedSubprotocol_Call) Return

func (*MockServer_AddSupportedSubprotocol_Call) Run

func (*MockServer_AddSupportedSubprotocol_Call) RunAndReturn

type MockServer_Addr_Call

type MockServer_Addr_Call struct {
	*mock.Call
}

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

func (*MockServer_Addr_Call) Return

func (*MockServer_Addr_Call) Run

func (_c *MockServer_Addr_Call) Run(run func()) *MockServer_Addr_Call

func (*MockServer_Addr_Call) RunAndReturn

func (_c *MockServer_Addr_Call) RunAndReturn(run func() *net.TCPAddr) *MockServer_Addr_Call

type MockServer_Errors_Call

type MockServer_Errors_Call struct {
	*mock.Call
}

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

func (*MockServer_Errors_Call) Return

func (_c *MockServer_Errors_Call) Return(_a0 <-chan error) *MockServer_Errors_Call

func (*MockServer_Errors_Call) Run

func (_c *MockServer_Errors_Call) Run(run func()) *MockServer_Errors_Call

func (*MockServer_Errors_Call) RunAndReturn

func (_c *MockServer_Errors_Call) RunAndReturn(run func() <-chan error) *MockServer_Errors_Call

type MockServer_Expecter

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

func (*MockServer_Expecter) AddSupportedSubprotocol

func (_e *MockServer_Expecter) AddSupportedSubprotocol(subProto interface{}) *MockServer_AddSupportedSubprotocol_Call

AddSupportedSubprotocol is a helper method to define mock.On call

  • subProto string

func (*MockServer_Expecter) Addr

Addr is a helper method to define mock.On call

func (*MockServer_Expecter) Errors

Errors is a helper method to define mock.On call

func (*MockServer_Expecter) GetChannel

func (_e *MockServer_Expecter) GetChannel(websocketId interface{}) *MockServer_GetChannel_Call

GetChannel is a helper method to define mock.On call

  • websocketId string

func (*MockServer_Expecter) SetBasicAuthHandler

func (_e *MockServer_Expecter) SetBasicAuthHandler(handler interface{}) *MockServer_SetBasicAuthHandler_Call

SetBasicAuthHandler is a helper method to define mock.On call

  • handler func(string , string) bool

func (*MockServer_Expecter) SetChargePointIdResolver

func (_e *MockServer_Expecter) SetChargePointIdResolver(resolver interface{}) *MockServer_SetChargePointIdResolver_Call

SetChargePointIdResolver is a helper method to define mock.On call

  • resolver func(*http.Request)(string , error)

func (*MockServer_Expecter) SetCheckClientHandler

func (_e *MockServer_Expecter) SetCheckClientHandler(handler interface{}) *MockServer_SetCheckClientHandler_Call

SetCheckClientHandler is a helper method to define mock.On call

  • handler ws.CheckClientHandler

func (*MockServer_Expecter) SetCheckOriginHandler

func (_e *MockServer_Expecter) SetCheckOriginHandler(handler interface{}) *MockServer_SetCheckOriginHandler_Call

SetCheckOriginHandler is a helper method to define mock.On call

  • handler func(*http.Request) bool

func (*MockServer_Expecter) SetDisconnectedClientHandler

func (_e *MockServer_Expecter) SetDisconnectedClientHandler(handler interface{}) *MockServer_SetDisconnectedClientHandler_Call

SetDisconnectedClientHandler is a helper method to define mock.On call

  • handler func(ws.Channel)

func (*MockServer_Expecter) SetMessageHandler

func (_e *MockServer_Expecter) SetMessageHandler(handler interface{}) *MockServer_SetMessageHandler_Call

SetMessageHandler is a helper method to define mock.On call

  • handler ws.MessageHandler

func (*MockServer_Expecter) SetNewClientHandler

func (_e *MockServer_Expecter) SetNewClientHandler(handler interface{}) *MockServer_SetNewClientHandler_Call

SetNewClientHandler is a helper method to define mock.On call

  • handler ws.ConnectedHandler

func (*MockServer_Expecter) SetTimeoutConfig

func (_e *MockServer_Expecter) SetTimeoutConfig(config interface{}) *MockServer_SetTimeoutConfig_Call

SetTimeoutConfig is a helper method to define mock.On call

  • config ws.ServerTimeoutConfig

func (*MockServer_Expecter) Start

func (_e *MockServer_Expecter) Start(port interface{}, listenPath interface{}) *MockServer_Start_Call

Start is a helper method to define mock.On call

  • port int
  • listenPath string

func (*MockServer_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockServer_Expecter) StopConnection

func (_e *MockServer_Expecter) StopConnection(id interface{}, closeError interface{}) *MockServer_StopConnection_Call

StopConnection is a helper method to define mock.On call

  • id string
  • closeError websocket.CloseError

func (*MockServer_Expecter) Write

func (_e *MockServer_Expecter) Write(webSocketId interface{}, data interface{}) *MockServer_Write_Call

Write is a helper method to define mock.On call

  • webSocketId string
  • data []byte

type MockServer_GetChannel_Call

type MockServer_GetChannel_Call struct {
	*mock.Call
}

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

func (*MockServer_GetChannel_Call) Return

func (*MockServer_GetChannel_Call) Run

func (_c *MockServer_GetChannel_Call) Run(run func(websocketId string)) *MockServer_GetChannel_Call

func (*MockServer_GetChannel_Call) RunAndReturn

type MockServer_SetBasicAuthHandler_Call

type MockServer_SetBasicAuthHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetBasicAuthHandler_Call) Return

func (*MockServer_SetBasicAuthHandler_Call) Run

func (*MockServer_SetBasicAuthHandler_Call) RunAndReturn

type MockServer_SetChargePointIdResolver_Call

type MockServer_SetChargePointIdResolver_Call struct {
	*mock.Call
}

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

func (*MockServer_SetChargePointIdResolver_Call) Return

func (*MockServer_SetChargePointIdResolver_Call) Run

func (*MockServer_SetChargePointIdResolver_Call) RunAndReturn

type MockServer_SetCheckClientHandler_Call

type MockServer_SetCheckClientHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetCheckClientHandler_Call) Return

func (*MockServer_SetCheckClientHandler_Call) Run

func (*MockServer_SetCheckClientHandler_Call) RunAndReturn

type MockServer_SetCheckOriginHandler_Call

type MockServer_SetCheckOriginHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetCheckOriginHandler_Call) Return

func (*MockServer_SetCheckOriginHandler_Call) Run

func (*MockServer_SetCheckOriginHandler_Call) RunAndReturn

type MockServer_SetDisconnectedClientHandler_Call

type MockServer_SetDisconnectedClientHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetDisconnectedClientHandler_Call) Return

func (*MockServer_SetDisconnectedClientHandler_Call) Run

func (*MockServer_SetDisconnectedClientHandler_Call) RunAndReturn

type MockServer_SetMessageHandler_Call

type MockServer_SetMessageHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetMessageHandler_Call) Return

func (*MockServer_SetMessageHandler_Call) Run

func (*MockServer_SetMessageHandler_Call) RunAndReturn

type MockServer_SetNewClientHandler_Call

type MockServer_SetNewClientHandler_Call struct {
	*mock.Call
}

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

func (*MockServer_SetNewClientHandler_Call) Return

func (*MockServer_SetNewClientHandler_Call) Run

func (*MockServer_SetNewClientHandler_Call) RunAndReturn

type MockServer_SetTimeoutConfig_Call

type MockServer_SetTimeoutConfig_Call struct {
	*mock.Call
}

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

func (*MockServer_SetTimeoutConfig_Call) Return

func (*MockServer_SetTimeoutConfig_Call) Run

func (*MockServer_SetTimeoutConfig_Call) RunAndReturn

type MockServer_Start_Call

type MockServer_Start_Call struct {
	*mock.Call
}

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

func (*MockServer_Start_Call) Return

func (*MockServer_Start_Call) Run

func (_c *MockServer_Start_Call) Run(run func(port int, listenPath string)) *MockServer_Start_Call

func (*MockServer_Start_Call) RunAndReturn

func (_c *MockServer_Start_Call) RunAndReturn(run func(int, string)) *MockServer_Start_Call

type MockServer_StopConnection_Call

type MockServer_StopConnection_Call struct {
	*mock.Call
}

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

func (*MockServer_StopConnection_Call) Return

func (*MockServer_StopConnection_Call) Run

func (*MockServer_StopConnection_Call) RunAndReturn

type MockServer_Stop_Call

type MockServer_Stop_Call struct {
	*mock.Call
}

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

func (*MockServer_Stop_Call) Return

func (*MockServer_Stop_Call) Run

func (_c *MockServer_Stop_Call) Run(run func()) *MockServer_Stop_Call

func (*MockServer_Stop_Call) RunAndReturn

func (_c *MockServer_Stop_Call) RunAndReturn(run func()) *MockServer_Stop_Call

type MockServer_Write_Call

type MockServer_Write_Call struct {
	*mock.Call
}

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

func (*MockServer_Write_Call) Return

func (*MockServer_Write_Call) Run

func (_c *MockServer_Write_Call) Run(run func(webSocketId string, data []byte)) *MockServer_Write_Call

func (*MockServer_Write_Call) RunAndReturn

func (_c *MockServer_Write_Call) RunAndReturn(run func(string, []byte) error) *MockServer_Write_Call

type MockWsClient

type MockWsClient struct {
	mock.Mock
}

MockWsClient is an autogenerated mock type for the WsClient type

func NewMockWsClient

func NewMockWsClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWsClient

NewMockWsClient creates a new instance of MockWsClient. 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 (*MockWsClient) AddOption

func (_m *MockWsClient) AddOption(option interface{})

AddOption provides a mock function with given fields: option

func (*MockWsClient) EXPECT

func (_m *MockWsClient) EXPECT() *MockWsClient_Expecter

func (*MockWsClient) Errors

func (_m *MockWsClient) Errors() <-chan error

Errors provides a mock function with no fields

func (*MockWsClient) IsConnected

func (_m *MockWsClient) IsConnected() bool

IsConnected provides a mock function with no fields

func (*MockWsClient) SetBasicAuth

func (_m *MockWsClient) SetBasicAuth(username string, password string)

SetBasicAuth provides a mock function with given fields: username, password

func (*MockWsClient) SetDisconnectedHandler

func (_m *MockWsClient) SetDisconnectedHandler(handler func(error))

SetDisconnectedHandler provides a mock function with given fields: handler

func (*MockWsClient) SetHeaderValue

func (_m *MockWsClient) SetHeaderValue(key string, value string)

SetHeaderValue provides a mock function with given fields: key, value

func (*MockWsClient) SetMessageHandler

func (_m *MockWsClient) SetMessageHandler(handler func([]byte) error)

SetMessageHandler provides a mock function with given fields: handler

func (*MockWsClient) SetReconnectedHandler

func (_m *MockWsClient) SetReconnectedHandler(handler func())

SetReconnectedHandler provides a mock function with given fields: handler

func (*MockWsClient) SetRequestedSubProtocol

func (_m *MockWsClient) SetRequestedSubProtocol(subProto string)

SetRequestedSubProtocol provides a mock function with given fields: subProto

func (*MockWsClient) SetTimeoutConfig

func (_m *MockWsClient) SetTimeoutConfig(config ws.ClientTimeoutConfig)

SetTimeoutConfig provides a mock function with given fields: config

func (*MockWsClient) Start

func (_m *MockWsClient) Start(url string) error

Start provides a mock function with given fields: url

func (*MockWsClient) StartWithRetries

func (_m *MockWsClient) StartWithRetries(url string)

StartWithRetries provides a mock function with given fields: url

func (*MockWsClient) Stop

func (_m *MockWsClient) Stop()

Stop provides a mock function with no fields

func (*MockWsClient) Write

func (_m *MockWsClient) Write(data []byte) error

Write provides a mock function with given fields: data

type MockWsClient_AddOption_Call

type MockWsClient_AddOption_Call struct {
	*mock.Call
}

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

func (*MockWsClient_AddOption_Call) Return

func (*MockWsClient_AddOption_Call) Run

func (_c *MockWsClient_AddOption_Call) Run(run func(option interface{})) *MockWsClient_AddOption_Call

func (*MockWsClient_AddOption_Call) RunAndReturn

func (_c *MockWsClient_AddOption_Call) RunAndReturn(run func(interface{})) *MockWsClient_AddOption_Call

type MockWsClient_Errors_Call

type MockWsClient_Errors_Call struct {
	*mock.Call
}

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

func (*MockWsClient_Errors_Call) Return

func (*MockWsClient_Errors_Call) Run

func (*MockWsClient_Errors_Call) RunAndReturn

func (_c *MockWsClient_Errors_Call) RunAndReturn(run func() <-chan error) *MockWsClient_Errors_Call

type MockWsClient_Expecter

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

func (*MockWsClient_Expecter) AddOption

func (_e *MockWsClient_Expecter) AddOption(option interface{}) *MockWsClient_AddOption_Call

AddOption is a helper method to define mock.On call

  • option interface{}

func (*MockWsClient_Expecter) Errors

Errors is a helper method to define mock.On call

func (*MockWsClient_Expecter) IsConnected

IsConnected is a helper method to define mock.On call

func (*MockWsClient_Expecter) SetBasicAuth

func (_e *MockWsClient_Expecter) SetBasicAuth(username interface{}, password interface{}) *MockWsClient_SetBasicAuth_Call

SetBasicAuth is a helper method to define mock.On call

  • username string
  • password string

func (*MockWsClient_Expecter) SetDisconnectedHandler

func (_e *MockWsClient_Expecter) SetDisconnectedHandler(handler interface{}) *MockWsClient_SetDisconnectedHandler_Call

SetDisconnectedHandler is a helper method to define mock.On call

  • handler func(error)

func (*MockWsClient_Expecter) SetHeaderValue

func (_e *MockWsClient_Expecter) SetHeaderValue(key interface{}, value interface{}) *MockWsClient_SetHeaderValue_Call

SetHeaderValue is a helper method to define mock.On call

  • key string
  • value string

func (*MockWsClient_Expecter) SetMessageHandler

func (_e *MockWsClient_Expecter) SetMessageHandler(handler interface{}) *MockWsClient_SetMessageHandler_Call

SetMessageHandler is a helper method to define mock.On call

  • handler func([]byte) error

func (*MockWsClient_Expecter) SetReconnectedHandler

func (_e *MockWsClient_Expecter) SetReconnectedHandler(handler interface{}) *MockWsClient_SetReconnectedHandler_Call

SetReconnectedHandler is a helper method to define mock.On call

  • handler func()

func (*MockWsClient_Expecter) SetRequestedSubProtocol

func (_e *MockWsClient_Expecter) SetRequestedSubProtocol(subProto interface{}) *MockWsClient_SetRequestedSubProtocol_Call

SetRequestedSubProtocol is a helper method to define mock.On call

  • subProto string

func (*MockWsClient_Expecter) SetTimeoutConfig

func (_e *MockWsClient_Expecter) SetTimeoutConfig(config interface{}) *MockWsClient_SetTimeoutConfig_Call

SetTimeoutConfig is a helper method to define mock.On call

  • config ws.ClientTimeoutConfig

func (*MockWsClient_Expecter) Start

func (_e *MockWsClient_Expecter) Start(url interface{}) *MockWsClient_Start_Call

Start is a helper method to define mock.On call

  • url string

func (*MockWsClient_Expecter) StartWithRetries

func (_e *MockWsClient_Expecter) StartWithRetries(url interface{}) *MockWsClient_StartWithRetries_Call

StartWithRetries is a helper method to define mock.On call

  • url string

func (*MockWsClient_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockWsClient_Expecter) Write

func (_e *MockWsClient_Expecter) Write(data interface{}) *MockWsClient_Write_Call

Write is a helper method to define mock.On call

  • data []byte

type MockWsClient_IsConnected_Call

type MockWsClient_IsConnected_Call struct {
	*mock.Call
}

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

func (*MockWsClient_IsConnected_Call) Return

func (*MockWsClient_IsConnected_Call) Run

func (*MockWsClient_IsConnected_Call) RunAndReturn

type MockWsClient_SetBasicAuth_Call

type MockWsClient_SetBasicAuth_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetBasicAuth_Call) Return

func (*MockWsClient_SetBasicAuth_Call) Run

func (_c *MockWsClient_SetBasicAuth_Call) Run(run func(username string, password string)) *MockWsClient_SetBasicAuth_Call

func (*MockWsClient_SetBasicAuth_Call) RunAndReturn

type MockWsClient_SetDisconnectedHandler_Call

type MockWsClient_SetDisconnectedHandler_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetDisconnectedHandler_Call) Return

func (*MockWsClient_SetDisconnectedHandler_Call) Run

func (*MockWsClient_SetDisconnectedHandler_Call) RunAndReturn

type MockWsClient_SetHeaderValue_Call

type MockWsClient_SetHeaderValue_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetHeaderValue_Call) Return

func (*MockWsClient_SetHeaderValue_Call) Run

func (*MockWsClient_SetHeaderValue_Call) RunAndReturn

type MockWsClient_SetMessageHandler_Call

type MockWsClient_SetMessageHandler_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetMessageHandler_Call) Return

func (*MockWsClient_SetMessageHandler_Call) Run

func (*MockWsClient_SetMessageHandler_Call) RunAndReturn

type MockWsClient_SetReconnectedHandler_Call

type MockWsClient_SetReconnectedHandler_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetReconnectedHandler_Call) Return

func (*MockWsClient_SetReconnectedHandler_Call) Run

func (*MockWsClient_SetReconnectedHandler_Call) RunAndReturn

type MockWsClient_SetRequestedSubProtocol_Call

type MockWsClient_SetRequestedSubProtocol_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetRequestedSubProtocol_Call) Return

func (*MockWsClient_SetRequestedSubProtocol_Call) Run

func (*MockWsClient_SetRequestedSubProtocol_Call) RunAndReturn

type MockWsClient_SetTimeoutConfig_Call

type MockWsClient_SetTimeoutConfig_Call struct {
	*mock.Call
}

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

func (*MockWsClient_SetTimeoutConfig_Call) Return

func (*MockWsClient_SetTimeoutConfig_Call) Run

func (*MockWsClient_SetTimeoutConfig_Call) RunAndReturn

type MockWsClient_StartWithRetries_Call

type MockWsClient_StartWithRetries_Call struct {
	*mock.Call
}

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

func (*MockWsClient_StartWithRetries_Call) Return

func (*MockWsClient_StartWithRetries_Call) Run

func (*MockWsClient_StartWithRetries_Call) RunAndReturn

type MockWsClient_Start_Call

type MockWsClient_Start_Call struct {
	*mock.Call
}

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

func (*MockWsClient_Start_Call) Return

func (*MockWsClient_Start_Call) Run

func (_c *MockWsClient_Start_Call) Run(run func(url string)) *MockWsClient_Start_Call

func (*MockWsClient_Start_Call) RunAndReturn

func (_c *MockWsClient_Start_Call) RunAndReturn(run func(string) error) *MockWsClient_Start_Call

type MockWsClient_Stop_Call

type MockWsClient_Stop_Call struct {
	*mock.Call
}

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

func (*MockWsClient_Stop_Call) Return

func (*MockWsClient_Stop_Call) Run

func (_c *MockWsClient_Stop_Call) Run(run func()) *MockWsClient_Stop_Call

func (*MockWsClient_Stop_Call) RunAndReturn

func (_c *MockWsClient_Stop_Call) RunAndReturn(run func()) *MockWsClient_Stop_Call

type MockWsClient_Write_Call

type MockWsClient_Write_Call struct {
	*mock.Call
}

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

func (*MockWsClient_Write_Call) Return

func (*MockWsClient_Write_Call) Run

func (_c *MockWsClient_Write_Call) Run(run func(data []byte)) *MockWsClient_Write_Call

func (*MockWsClient_Write_Call) RunAndReturn

func (_c *MockWsClient_Write_Call) RunAndReturn(run func([]byte) error) *MockWsClient_Write_Call

type MockWsServer

type MockWsServer struct {
	mock.Mock
}

MockWsServer is an autogenerated mock type for the WsServer type

func NewMockWsServer

func NewMockWsServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWsServer

NewMockWsServer creates a new instance of MockWsServer. 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 (*MockWsServer) AddSupportedSubprotocol

func (_m *MockWsServer) AddSupportedSubprotocol(subProto string)

AddSupportedSubprotocol provides a mock function with given fields: subProto

func (*MockWsServer) Addr

func (_m *MockWsServer) Addr() *net.TCPAddr

Addr provides a mock function with no fields

func (*MockWsServer) Connections

func (_m *MockWsServer) Connections(websocketId string) *ws.WebSocket

Connections provides a mock function with given fields: websocketId

func (*MockWsServer) EXPECT

func (_m *MockWsServer) EXPECT() *MockWsServer_Expecter

func (*MockWsServer) Errors

func (_m *MockWsServer) Errors() <-chan error

Errors provides a mock function with no fields

func (*MockWsServer) SetBasicAuthHandler

func (_m *MockWsServer) SetBasicAuthHandler(handler func(string, string) bool)

SetBasicAuthHandler provides a mock function with given fields: handler

func (*MockWsServer) SetCheckClientHandler

func (_m *MockWsServer) SetCheckClientHandler(handler func(string, *http.Request) bool)

SetCheckClientHandler provides a mock function with given fields: handler

func (*MockWsServer) SetCheckOriginHandler

func (_m *MockWsServer) SetCheckOriginHandler(handler func(*http.Request) bool)

SetCheckOriginHandler provides a mock function with given fields: handler

func (*MockWsServer) SetDisconnectedClientHandler

func (_m *MockWsServer) SetDisconnectedClientHandler(handler func(ws.Channel))

SetDisconnectedClientHandler provides a mock function with given fields: handler

func (*MockWsServer) SetMessageHandler

func (_m *MockWsServer) SetMessageHandler(handler func(ws.Channel, []byte) error)

SetMessageHandler provides a mock function with given fields: handler

func (*MockWsServer) SetNewClientHandler

func (_m *MockWsServer) SetNewClientHandler(handler func(ws.Channel))

SetNewClientHandler provides a mock function with given fields: handler

func (*MockWsServer) SetTimeoutConfig

func (_m *MockWsServer) SetTimeoutConfig(config ws.ServerTimeoutConfig)

SetTimeoutConfig provides a mock function with given fields: config

func (*MockWsServer) Start

func (_m *MockWsServer) Start(port int, listenPath string)

Start provides a mock function with given fields: port, listenPath

func (*MockWsServer) Stop

func (_m *MockWsServer) Stop()

Stop provides a mock function with no fields

func (*MockWsServer) StopConnection

func (_m *MockWsServer) StopConnection(id string, closeError websocket.CloseError) error

StopConnection provides a mock function with given fields: id, closeError

func (*MockWsServer) Write

func (_m *MockWsServer) Write(webSocketId string, data []byte) error

Write provides a mock function with given fields: webSocketId, data

type MockWsServer_AddSupportedSubprotocol_Call

type MockWsServer_AddSupportedSubprotocol_Call struct {
	*mock.Call
}

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

func (*MockWsServer_AddSupportedSubprotocol_Call) Return

func (*MockWsServer_AddSupportedSubprotocol_Call) Run

func (*MockWsServer_AddSupportedSubprotocol_Call) RunAndReturn

type MockWsServer_Addr_Call

type MockWsServer_Addr_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Addr_Call) Return

func (*MockWsServer_Addr_Call) Run

func (_c *MockWsServer_Addr_Call) Run(run func()) *MockWsServer_Addr_Call

func (*MockWsServer_Addr_Call) RunAndReturn

func (_c *MockWsServer_Addr_Call) RunAndReturn(run func() *net.TCPAddr) *MockWsServer_Addr_Call

type MockWsServer_Connections_Call

type MockWsServer_Connections_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Connections_Call) Return

func (*MockWsServer_Connections_Call) Run

func (_c *MockWsServer_Connections_Call) Run(run func(websocketId string)) *MockWsServer_Connections_Call

func (*MockWsServer_Connections_Call) RunAndReturn

type MockWsServer_Errors_Call

type MockWsServer_Errors_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Errors_Call) Return

func (*MockWsServer_Errors_Call) Run

func (*MockWsServer_Errors_Call) RunAndReturn

func (_c *MockWsServer_Errors_Call) RunAndReturn(run func() <-chan error) *MockWsServer_Errors_Call

type MockWsServer_Expecter

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

func (*MockWsServer_Expecter) AddSupportedSubprotocol

func (_e *MockWsServer_Expecter) AddSupportedSubprotocol(subProto interface{}) *MockWsServer_AddSupportedSubprotocol_Call

AddSupportedSubprotocol is a helper method to define mock.On call

  • subProto string

func (*MockWsServer_Expecter) Addr

Addr is a helper method to define mock.On call

func (*MockWsServer_Expecter) Connections

func (_e *MockWsServer_Expecter) Connections(websocketId interface{}) *MockWsServer_Connections_Call

Connections is a helper method to define mock.On call

  • websocketId string

func (*MockWsServer_Expecter) Errors

Errors is a helper method to define mock.On call

func (*MockWsServer_Expecter) SetBasicAuthHandler

func (_e *MockWsServer_Expecter) SetBasicAuthHandler(handler interface{}) *MockWsServer_SetBasicAuthHandler_Call

SetBasicAuthHandler is a helper method to define mock.On call

  • handler func(string , string) bool

func (*MockWsServer_Expecter) SetCheckClientHandler

func (_e *MockWsServer_Expecter) SetCheckClientHandler(handler interface{}) *MockWsServer_SetCheckClientHandler_Call

SetCheckClientHandler is a helper method to define mock.On call

  • handler func(string , *http.Request) bool

func (*MockWsServer_Expecter) SetCheckOriginHandler

func (_e *MockWsServer_Expecter) SetCheckOriginHandler(handler interface{}) *MockWsServer_SetCheckOriginHandler_Call

SetCheckOriginHandler is a helper method to define mock.On call

  • handler func(*http.Request) bool

func (*MockWsServer_Expecter) SetDisconnectedClientHandler

func (_e *MockWsServer_Expecter) SetDisconnectedClientHandler(handler interface{}) *MockWsServer_SetDisconnectedClientHandler_Call

SetDisconnectedClientHandler is a helper method to define mock.On call

  • handler func(ws.Channel)

func (*MockWsServer_Expecter) SetMessageHandler

func (_e *MockWsServer_Expecter) SetMessageHandler(handler interface{}) *MockWsServer_SetMessageHandler_Call

SetMessageHandler is a helper method to define mock.On call

  • handler func(ws.Channel , []byte) error

func (*MockWsServer_Expecter) SetNewClientHandler

func (_e *MockWsServer_Expecter) SetNewClientHandler(handler interface{}) *MockWsServer_SetNewClientHandler_Call

SetNewClientHandler is a helper method to define mock.On call

  • handler func(ws.Channel)

func (*MockWsServer_Expecter) SetTimeoutConfig

func (_e *MockWsServer_Expecter) SetTimeoutConfig(config interface{}) *MockWsServer_SetTimeoutConfig_Call

SetTimeoutConfig is a helper method to define mock.On call

  • config ws.ServerTimeoutConfig

func (*MockWsServer_Expecter) Start

func (_e *MockWsServer_Expecter) Start(port interface{}, listenPath interface{}) *MockWsServer_Start_Call

Start is a helper method to define mock.On call

  • port int
  • listenPath string

func (*MockWsServer_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockWsServer_Expecter) StopConnection

func (_e *MockWsServer_Expecter) StopConnection(id interface{}, closeError interface{}) *MockWsServer_StopConnection_Call

StopConnection is a helper method to define mock.On call

  • id string
  • closeError websocket.CloseError

func (*MockWsServer_Expecter) Write

func (_e *MockWsServer_Expecter) Write(webSocketId interface{}, data interface{}) *MockWsServer_Write_Call

Write is a helper method to define mock.On call

  • webSocketId string
  • data []byte

type MockWsServer_SetBasicAuthHandler_Call

type MockWsServer_SetBasicAuthHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetBasicAuthHandler_Call) Return

func (*MockWsServer_SetBasicAuthHandler_Call) Run

func (*MockWsServer_SetBasicAuthHandler_Call) RunAndReturn

type MockWsServer_SetCheckClientHandler_Call

type MockWsServer_SetCheckClientHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetCheckClientHandler_Call) Return

func (*MockWsServer_SetCheckClientHandler_Call) Run

func (*MockWsServer_SetCheckClientHandler_Call) RunAndReturn

type MockWsServer_SetCheckOriginHandler_Call

type MockWsServer_SetCheckOriginHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetCheckOriginHandler_Call) Return

func (*MockWsServer_SetCheckOriginHandler_Call) Run

func (*MockWsServer_SetCheckOriginHandler_Call) RunAndReturn

type MockWsServer_SetDisconnectedClientHandler_Call

type MockWsServer_SetDisconnectedClientHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetDisconnectedClientHandler_Call) Return

func (*MockWsServer_SetDisconnectedClientHandler_Call) Run

func (*MockWsServer_SetDisconnectedClientHandler_Call) RunAndReturn

type MockWsServer_SetMessageHandler_Call

type MockWsServer_SetMessageHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetMessageHandler_Call) Return

func (*MockWsServer_SetMessageHandler_Call) Run

func (*MockWsServer_SetMessageHandler_Call) RunAndReturn

type MockWsServer_SetNewClientHandler_Call

type MockWsServer_SetNewClientHandler_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetNewClientHandler_Call) Return

func (*MockWsServer_SetNewClientHandler_Call) Run

func (*MockWsServer_SetNewClientHandler_Call) RunAndReturn

type MockWsServer_SetTimeoutConfig_Call

type MockWsServer_SetTimeoutConfig_Call struct {
	*mock.Call
}

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

func (*MockWsServer_SetTimeoutConfig_Call) Return

func (*MockWsServer_SetTimeoutConfig_Call) Run

func (*MockWsServer_SetTimeoutConfig_Call) RunAndReturn

type MockWsServer_Start_Call

type MockWsServer_Start_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Start_Call) Return

func (*MockWsServer_Start_Call) Run

func (_c *MockWsServer_Start_Call) Run(run func(port int, listenPath string)) *MockWsServer_Start_Call

func (*MockWsServer_Start_Call) RunAndReturn

func (_c *MockWsServer_Start_Call) RunAndReturn(run func(int, string)) *MockWsServer_Start_Call

type MockWsServer_StopConnection_Call

type MockWsServer_StopConnection_Call struct {
	*mock.Call
}

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

func (*MockWsServer_StopConnection_Call) Return

func (*MockWsServer_StopConnection_Call) Run

func (*MockWsServer_StopConnection_Call) RunAndReturn

type MockWsServer_Stop_Call

type MockWsServer_Stop_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Stop_Call) Return

func (*MockWsServer_Stop_Call) Run

func (_c *MockWsServer_Stop_Call) Run(run func()) *MockWsServer_Stop_Call

func (*MockWsServer_Stop_Call) RunAndReturn

func (_c *MockWsServer_Stop_Call) RunAndReturn(run func()) *MockWsServer_Stop_Call

type MockWsServer_Write_Call

type MockWsServer_Write_Call struct {
	*mock.Call
}

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

func (*MockWsServer_Write_Call) Return

func (*MockWsServer_Write_Call) Run

func (_c *MockWsServer_Write_Call) Run(run func(webSocketId string, data []byte)) *MockWsServer_Write_Call

func (*MockWsServer_Write_Call) RunAndReturn

func (_c *MockWsServer_Write_Call) RunAndReturn(run func(string, []byte) error) *MockWsServer_Write_Call

Source Files

  • mock_Channel.go
  • mock_CheckClientHandler.go
  • mock_Client.go
  • mock_ClientOpt.go
  • mock_ConnectedHandler.go
  • mock_DisconnectedHandler.go
  • mock_ErrorHandler.go
  • mock_MessageHandler.go
  • mock_Server.go
  • mock_ServerOpt.go
  • mock_WsClient.go
  • mock_WsServer.go

Jump to

Keyboard shortcuts

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