Help us shape the future of Go! Take the 2026 Go Developer Survey

mock

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebsocketConnection

type WebsocketConnection struct {
	mock.Mock
}

WebsocketConnection is an autogenerated mock type for the WebsocketConnection type

func NewWebsocketConnection

func NewWebsocketConnection(t interface {
	mock.TestingT
	Cleanup(func())
}) *WebsocketConnection

NewWebsocketConnection creates a new instance of WebsocketConnection. 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 (*WebsocketConnection) Close

func (_m *WebsocketConnection) Close() error

Close provides a mock function with given fields:

func (*WebsocketConnection) ReadJSON

func (_m *WebsocketConnection) ReadJSON(v interface{}) error

ReadJSON provides a mock function with given fields: v

func (*WebsocketConnection) SetPongHandler

func (_m *WebsocketConnection) SetPongHandler(h func(string) error)

SetPongHandler provides a mock function with given fields: h

func (*WebsocketConnection) SetReadDeadline

func (_m *WebsocketConnection) SetReadDeadline(deadline time.Time) error

SetReadDeadline provides a mock function with given fields: deadline

func (*WebsocketConnection) SetWriteDeadline

func (_m *WebsocketConnection) SetWriteDeadline(deadline time.Time) error

SetWriteDeadline provides a mock function with given fields: deadline

func (*WebsocketConnection) WriteControl

func (_m *WebsocketConnection) WriteControl(messageType int, deadline time.Time) error

WriteControl provides a mock function with given fields: messageType, deadline

func (*WebsocketConnection) WriteJSON

func (_m *WebsocketConnection) WriteJSON(v interface{}) error

WriteJSON provides a mock function with given fields: v

Jump to

Keyboard shortcuts

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