mocks

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	mock.Mock
}

Conn is an autogenerated mock type for the Conn type

func NewConn

func NewConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *Conn

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

func (_m *Conn) Close() error

Close provides a mock function with no fields

func (*Conn) CloseHandler

func (_m *Conn) CloseHandler() func(int, string) error

CloseHandler provides a mock function with no fields

func (*Conn) EnableWriteCompression

func (_m *Conn) EnableWriteCompression(enable bool)

EnableWriteCompression provides a mock function with given fields: enable

func (*Conn) LocalAddr

func (_m *Conn) LocalAddr() net.Addr

LocalAddr provides a mock function with no fields

func (*Conn) NextReader

func (_m *Conn) NextReader() (int, io.Reader, error)

NextReader provides a mock function with no fields

func (*Conn) NextWriter

func (_m *Conn) NextWriter(messageType int) (io.WriteCloser, error)

NextWriter provides a mock function with given fields: messageType

func (*Conn) PingHandler

func (_m *Conn) PingHandler() func(string) error

PingHandler provides a mock function with no fields

func (*Conn) PongHandler

func (_m *Conn) PongHandler() func(string) error

PongHandler provides a mock function with no fields

func (*Conn) ReadJSON

func (_m *Conn) ReadJSON(_a0 interface{}) error

ReadJSON provides a mock function with given fields: _a0

func (*Conn) ReadMessage

func (_m *Conn) ReadMessage() (int, []byte, error)

ReadMessage provides a mock function with no fields

func (*Conn) RemoteAddr

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

RemoteAddr provides a mock function with no fields

func (*Conn) SetCloseHandler

func (_m *Conn) SetCloseHandler(h func(int, string) error)

SetCloseHandler provides a mock function with given fields: h

func (*Conn) SetCompressionLevel

func (_m *Conn) SetCompressionLevel(level int) error

SetCompressionLevel provides a mock function with given fields: level

func (*Conn) SetPingHandler

func (_m *Conn) SetPingHandler(h func(string) error)

SetPingHandler provides a mock function with given fields: h

func (*Conn) SetPongHandler

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

SetPongHandler provides a mock function with given fields: h

func (*Conn) SetReadDeadline

func (_m *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline provides a mock function with given fields: t

func (*Conn) SetReadLimit

func (_m *Conn) SetReadLimit(limit int64)

SetReadLimit provides a mock function with given fields: limit

func (*Conn) SetWriteDeadline

func (_m *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline provides a mock function with given fields: t

func (*Conn) Subprotocol

func (_m *Conn) Subprotocol() string

Subprotocol provides a mock function with no fields

func (*Conn) UnderlyingConn

func (_m *Conn) UnderlyingConn() net.Conn

UnderlyingConn provides a mock function with no fields

func (*Conn) WriteControl

func (_m *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error

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

func (*Conn) WriteMessage

func (_m *Conn) WriteMessage(messageType int, data []byte) error

WriteMessage provides a mock function with given fields: messageType, data

func (*Conn) WritePreparedMessage

func (_m *Conn) WritePreparedMessage(pm *gorillawebsocket.PreparedMessage) error

WritePreparedMessage provides a mock function with given fields: pm

type Upgrader

type Upgrader struct {
	mock.Mock
}

Upgrader is an autogenerated mock type for the Upgrader type

func NewUpgrader

func NewUpgrader(t interface {
	mock.TestingT
	Cleanup(func())
}) *Upgrader

NewUpgrader creates a new instance of Upgrader. 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 (*Upgrader) Upgrade

func (_m *Upgrader) Upgrade(res http.ResponseWriter, req *http.Request) (websocket.Conn, error)

Upgrade provides a mock function with given fields: res, req

Jump to

Keyboard shortcuts

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