mocks

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuthenticator

type MockAuthenticator struct {
	mock.Mock
}

MockAuthenticator is an autogenerated mock type for the Authenticator type

func NewMockAuthenticator

func NewMockAuthenticator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthenticator

NewMockAuthenticator creates a new instance of MockAuthenticator. 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 (*MockAuthenticator) Authenticate

func (_m *MockAuthenticator) Authenticate(addr net.Addr, auth string, tx uint64) (bool, string)

Authenticate provides a mock function with given fields: addr, auth, tx

func (*MockAuthenticator) EXPECT

type MockAuthenticator_Authenticate_Call

type MockAuthenticator_Authenticate_Call struct {
	*mock.Call
}

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

func (*MockAuthenticator_Authenticate_Call) Return

func (*MockAuthenticator_Authenticate_Call) Run

func (*MockAuthenticator_Authenticate_Call) RunAndReturn

type MockAuthenticator_Expecter

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

func (*MockAuthenticator_Expecter) Authenticate

func (_e *MockAuthenticator_Expecter) Authenticate(addr interface{}, auth interface{}, tx interface{}) *MockAuthenticator_Authenticate_Call

Authenticate is a helper method to define mock.On call

  • addr net.Addr
  • auth string
  • tx uint64

type MockConn

type MockConn struct {
	mock.Mock
}

MockConn is an autogenerated mock type for the Conn type

func NewMockConn

func NewMockConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConn

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

func (_m *MockConn) Close() error

Close provides a mock function with given fields:

func (*MockConn) EXPECT

func (_m *MockConn) EXPECT() *MockConn_Expecter

func (*MockConn) LocalAddr

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

LocalAddr provides a mock function with given fields:

func (*MockConn) Read

func (_m *MockConn) Read(b []byte) (int, error)

Read provides a mock function with given fields: b

func (*MockConn) RemoteAddr

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

RemoteAddr provides a mock function with given fields:

func (*MockConn) SetDeadline

func (_m *MockConn) SetDeadline(t time.Time) error

SetDeadline provides a mock function with given fields: t

func (*MockConn) SetReadDeadline

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

SetReadDeadline provides a mock function with given fields: t

func (*MockConn) SetWriteDeadline

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

SetWriteDeadline provides a mock function with given fields: t

func (*MockConn) Write

func (_m *MockConn) Write(b []byte) (int, error)

Write provides a mock function with given fields: b

type MockConn_Close_Call

type MockConn_Close_Call struct {
	*mock.Call
}

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

func (*MockConn_Close_Call) Return

func (*MockConn_Close_Call) Run

func (_c *MockConn_Close_Call) Run(run func()) *MockConn_Close_Call

func (*MockConn_Close_Call) RunAndReturn

func (_c *MockConn_Close_Call) RunAndReturn(run func() error) *MockConn_Close_Call

type MockConn_Expecter

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

func (*MockConn_Expecter) Close

Close is a helper method to define mock.On call

func (*MockConn_Expecter) LocalAddr

func (_e *MockConn_Expecter) LocalAddr() *MockConn_LocalAddr_Call

LocalAddr is a helper method to define mock.On call

func (*MockConn_Expecter) Read

func (_e *MockConn_Expecter) Read(b interface{}) *MockConn_Read_Call

Read is a helper method to define mock.On call

  • b []byte

func (*MockConn_Expecter) RemoteAddr

func (_e *MockConn_Expecter) RemoteAddr() *MockConn_RemoteAddr_Call

RemoteAddr is a helper method to define mock.On call

func (*MockConn_Expecter) SetDeadline

func (_e *MockConn_Expecter) SetDeadline(t interface{}) *MockConn_SetDeadline_Call

SetDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) SetReadDeadline

func (_e *MockConn_Expecter) SetReadDeadline(t interface{}) *MockConn_SetReadDeadline_Call

SetReadDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) SetWriteDeadline

func (_e *MockConn_Expecter) SetWriteDeadline(t interface{}) *MockConn_SetWriteDeadline_Call

SetWriteDeadline is a helper method to define mock.On call

  • t time.Time

func (*MockConn_Expecter) Write

func (_e *MockConn_Expecter) Write(b interface{}) *MockConn_Write_Call

Write is a helper method to define mock.On call

  • b []byte

type MockConn_LocalAddr_Call

type MockConn_LocalAddr_Call struct {
	*mock.Call
}

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

func (*MockConn_LocalAddr_Call) Return

func (*MockConn_LocalAddr_Call) Run

func (_c *MockConn_LocalAddr_Call) Run(run func()) *MockConn_LocalAddr_Call

func (*MockConn_LocalAddr_Call) RunAndReturn

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

type MockConn_Read_Call

type MockConn_Read_Call struct {
	*mock.Call
}

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

func (*MockConn_Read_Call) Return

func (_c *MockConn_Read_Call) Return(n int, err error) *MockConn_Read_Call

func (*MockConn_Read_Call) Run

func (_c *MockConn_Read_Call) Run(run func(b []byte)) *MockConn_Read_Call

func (*MockConn_Read_Call) RunAndReturn

func (_c *MockConn_Read_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Read_Call

type MockConn_RemoteAddr_Call

type MockConn_RemoteAddr_Call struct {
	*mock.Call
}

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

func (*MockConn_RemoteAddr_Call) Return

func (*MockConn_RemoteAddr_Call) Run

func (*MockConn_RemoteAddr_Call) RunAndReturn

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

type MockConn_SetDeadline_Call

type MockConn_SetDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetDeadline_Call) Return

func (*MockConn_SetDeadline_Call) Run

func (*MockConn_SetDeadline_Call) RunAndReturn

func (_c *MockConn_SetDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetDeadline_Call

type MockConn_SetReadDeadline_Call

type MockConn_SetReadDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetReadDeadline_Call) Return

func (*MockConn_SetReadDeadline_Call) Run

func (*MockConn_SetReadDeadline_Call) RunAndReturn

type MockConn_SetWriteDeadline_Call

type MockConn_SetWriteDeadline_Call struct {
	*mock.Call
}

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

func (*MockConn_SetWriteDeadline_Call) Return

func (*MockConn_SetWriteDeadline_Call) Run

func (*MockConn_SetWriteDeadline_Call) RunAndReturn

type MockConn_Write_Call

type MockConn_Write_Call struct {
	*mock.Call
}

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

func (*MockConn_Write_Call) Return

func (_c *MockConn_Write_Call) Return(n int, err error) *MockConn_Write_Call

func (*MockConn_Write_Call) Run

func (_c *MockConn_Write_Call) Run(run func(b []byte)) *MockConn_Write_Call

func (*MockConn_Write_Call) RunAndReturn

func (_c *MockConn_Write_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Write_Call

type MockEventLogger

type MockEventLogger struct {
	mock.Mock
}

MockEventLogger is an autogenerated mock type for the EventLogger type

func NewMockEventLogger

func NewMockEventLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEventLogger

NewMockEventLogger creates a new instance of MockEventLogger. 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 (*MockEventLogger) Connect

func (_m *MockEventLogger) Connect(addr net.Addr, id string, tx uint64)

Connect provides a mock function with given fields: addr, id, tx

func (*MockEventLogger) Disconnect

func (_m *MockEventLogger) Disconnect(addr net.Addr, id string, err error)

Disconnect provides a mock function with given fields: addr, id, err

func (*MockEventLogger) EXPECT

func (*MockEventLogger) TCPError

func (_m *MockEventLogger) TCPError(addr net.Addr, id string, reqAddr string, err error)

TCPError provides a mock function with given fields: addr, id, reqAddr, err

func (*MockEventLogger) TCPRequest

func (_m *MockEventLogger) TCPRequest(addr net.Addr, id string, reqAddr string)

TCPRequest provides a mock function with given fields: addr, id, reqAddr

func (*MockEventLogger) UDPError

func (_m *MockEventLogger) UDPError(addr net.Addr, id string, sessionID uint32, err error)

UDPError provides a mock function with given fields: addr, id, sessionID, err

func (*MockEventLogger) UDPRequest

func (_m *MockEventLogger) UDPRequest(addr net.Addr, id string, sessionID uint32, reqAddr string)

UDPRequest provides a mock function with given fields: addr, id, sessionID, reqAddr

type MockEventLogger_Connect_Call

type MockEventLogger_Connect_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_Connect_Call) Return

func (*MockEventLogger_Connect_Call) Run

func (*MockEventLogger_Connect_Call) RunAndReturn

type MockEventLogger_Disconnect_Call

type MockEventLogger_Disconnect_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_Disconnect_Call) Return

func (*MockEventLogger_Disconnect_Call) Run

func (*MockEventLogger_Disconnect_Call) RunAndReturn

type MockEventLogger_Expecter

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

func (*MockEventLogger_Expecter) Connect

func (_e *MockEventLogger_Expecter) Connect(addr interface{}, id interface{}, tx interface{}) *MockEventLogger_Connect_Call

Connect is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • tx uint64

func (*MockEventLogger_Expecter) Disconnect

func (_e *MockEventLogger_Expecter) Disconnect(addr interface{}, id interface{}, err interface{}) *MockEventLogger_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • err error

func (*MockEventLogger_Expecter) TCPError

func (_e *MockEventLogger_Expecter) TCPError(addr interface{}, id interface{}, reqAddr interface{}, err interface{}) *MockEventLogger_TCPError_Call

TCPError is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • reqAddr string
  • err error

func (*MockEventLogger_Expecter) TCPRequest

func (_e *MockEventLogger_Expecter) TCPRequest(addr interface{}, id interface{}, reqAddr interface{}) *MockEventLogger_TCPRequest_Call

TCPRequest is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • reqAddr string

func (*MockEventLogger_Expecter) UDPError

func (_e *MockEventLogger_Expecter) UDPError(addr interface{}, id interface{}, sessionID interface{}, err interface{}) *MockEventLogger_UDPError_Call

UDPError is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • sessionID uint32
  • err error

func (*MockEventLogger_Expecter) UDPRequest

func (_e *MockEventLogger_Expecter) UDPRequest(addr interface{}, id interface{}, sessionID interface{}, reqAddr interface{}) *MockEventLogger_UDPRequest_Call

UDPRequest is a helper method to define mock.On call

  • addr net.Addr
  • id string
  • sessionID uint32
  • reqAddr string

type MockEventLogger_TCPError_Call

type MockEventLogger_TCPError_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_TCPError_Call) Return

func (*MockEventLogger_TCPError_Call) Run

func (_c *MockEventLogger_TCPError_Call) Run(run func(addr net.Addr, id string, reqAddr string, err error)) *MockEventLogger_TCPError_Call

func (*MockEventLogger_TCPError_Call) RunAndReturn

type MockEventLogger_TCPRequest_Call

type MockEventLogger_TCPRequest_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_TCPRequest_Call) Return

func (*MockEventLogger_TCPRequest_Call) Run

func (*MockEventLogger_TCPRequest_Call) RunAndReturn

type MockEventLogger_UDPError_Call

type MockEventLogger_UDPError_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_UDPError_Call) Return

func (*MockEventLogger_UDPError_Call) Run

func (_c *MockEventLogger_UDPError_Call) Run(run func(addr net.Addr, id string, sessionID uint32, err error)) *MockEventLogger_UDPError_Call

func (*MockEventLogger_UDPError_Call) RunAndReturn

type MockEventLogger_UDPRequest_Call

type MockEventLogger_UDPRequest_Call struct {
	*mock.Call
}

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

func (*MockEventLogger_UDPRequest_Call) Return

func (*MockEventLogger_UDPRequest_Call) Run

func (_c *MockEventLogger_UDPRequest_Call) Run(run func(addr net.Addr, id string, sessionID uint32, reqAddr string)) *MockEventLogger_UDPRequest_Call

func (*MockEventLogger_UDPRequest_Call) RunAndReturn

type MockOutbound

type MockOutbound struct {
	mock.Mock
}

MockOutbound is an autogenerated mock type for the Outbound type

func NewMockOutbound

func NewMockOutbound(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOutbound

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

func (_m *MockOutbound) EXPECT() *MockOutbound_Expecter

func (*MockOutbound) TCP

func (_m *MockOutbound) TCP(reqAddr string) (net.Conn, error)

TCP provides a mock function with given fields: reqAddr

func (*MockOutbound) UDP

func (_m *MockOutbound) UDP(reqAddr string) (server.UDPConn, error)

UDP provides a mock function with given fields: reqAddr

type MockOutbound_Expecter

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

func (*MockOutbound_Expecter) TCP

func (_e *MockOutbound_Expecter) TCP(reqAddr interface{}) *MockOutbound_TCP_Call

TCP is a helper method to define mock.On call

  • reqAddr string

func (*MockOutbound_Expecter) UDP

func (_e *MockOutbound_Expecter) UDP(reqAddr interface{}) *MockOutbound_UDP_Call

UDP is a helper method to define mock.On call

  • reqAddr string

type MockOutbound_TCP_Call

type MockOutbound_TCP_Call struct {
	*mock.Call
}

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

func (*MockOutbound_TCP_Call) Return

func (*MockOutbound_TCP_Call) Run

func (_c *MockOutbound_TCP_Call) Run(run func(reqAddr string)) *MockOutbound_TCP_Call

func (*MockOutbound_TCP_Call) RunAndReturn

func (_c *MockOutbound_TCP_Call) RunAndReturn(run func(string) (net.Conn, error)) *MockOutbound_TCP_Call

type MockOutbound_UDP_Call

type MockOutbound_UDP_Call struct {
	*mock.Call
}

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

func (*MockOutbound_UDP_Call) Return

func (*MockOutbound_UDP_Call) Run

func (_c *MockOutbound_UDP_Call) Run(run func(reqAddr string)) *MockOutbound_UDP_Call

func (*MockOutbound_UDP_Call) RunAndReturn

func (_c *MockOutbound_UDP_Call) RunAndReturn(run func(string) (server.UDPConn, error)) *MockOutbound_UDP_Call

type MockRequestHook

type MockRequestHook struct {
	mock.Mock
}

MockRequestHook is an autogenerated mock type for the RequestHook type

func NewMockRequestHook

func NewMockRequestHook(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRequestHook

NewMockRequestHook creates a new instance of MockRequestHook. 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 (*MockRequestHook) Check

func (_m *MockRequestHook) Check(isUDP bool, reqAddr string) bool

Check provides a mock function with given fields: isUDP, reqAddr

func (*MockRequestHook) EXPECT

func (*MockRequestHook) TCP

func (_m *MockRequestHook) TCP(stream quic.Stream, reqAddr *string) ([]byte, error)

TCP provides a mock function with given fields: stream, reqAddr

func (*MockRequestHook) UDP

func (_m *MockRequestHook) UDP(data []byte, reqAddr *string) error

UDP provides a mock function with given fields: data, reqAddr

type MockRequestHook_Check_Call

type MockRequestHook_Check_Call struct {
	*mock.Call
}

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

func (*MockRequestHook_Check_Call) Return

func (*MockRequestHook_Check_Call) Run

func (_c *MockRequestHook_Check_Call) Run(run func(isUDP bool, reqAddr string)) *MockRequestHook_Check_Call

func (*MockRequestHook_Check_Call) RunAndReturn

type MockRequestHook_Expecter

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

func (*MockRequestHook_Expecter) Check

func (_e *MockRequestHook_Expecter) Check(isUDP interface{}, reqAddr interface{}) *MockRequestHook_Check_Call

Check is a helper method to define mock.On call

  • isUDP bool
  • reqAddr string

func (*MockRequestHook_Expecter) TCP

func (_e *MockRequestHook_Expecter) TCP(stream interface{}, reqAddr interface{}) *MockRequestHook_TCP_Call

TCP is a helper method to define mock.On call

  • stream quic.Stream
  • reqAddr *string

func (*MockRequestHook_Expecter) UDP

func (_e *MockRequestHook_Expecter) UDP(data interface{}, reqAddr interface{}) *MockRequestHook_UDP_Call

UDP is a helper method to define mock.On call

  • data []byte
  • reqAddr *string

type MockRequestHook_TCP_Call

type MockRequestHook_TCP_Call struct {
	*mock.Call
}

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

func (*MockRequestHook_TCP_Call) Return

func (*MockRequestHook_TCP_Call) Run

func (_c *MockRequestHook_TCP_Call) Run(run func(stream quic.Stream, reqAddr *string)) *MockRequestHook_TCP_Call

func (*MockRequestHook_TCP_Call) RunAndReturn

func (_c *MockRequestHook_TCP_Call) RunAndReturn(run func(quic.Stream, *string) ([]byte, error)) *MockRequestHook_TCP_Call

type MockRequestHook_UDP_Call

type MockRequestHook_UDP_Call struct {
	*mock.Call
}

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

func (*MockRequestHook_UDP_Call) Return

func (*MockRequestHook_UDP_Call) Run

func (_c *MockRequestHook_UDP_Call) Run(run func(data []byte, reqAddr *string)) *MockRequestHook_UDP_Call

func (*MockRequestHook_UDP_Call) RunAndReturn

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

type MockTrafficLogger

type MockTrafficLogger struct {
	mock.Mock
}

MockTrafficLogger is an autogenerated mock type for the TrafficLogger type

func NewMockTrafficLogger

func NewMockTrafficLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTrafficLogger

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

func (*MockTrafficLogger) LogOnlineState

func (_m *MockTrafficLogger) LogOnlineState(id string, online bool)

LogOnlineState provides a mock function with given fields: id, online

func (*MockTrafficLogger) LogTraffic

func (_m *MockTrafficLogger) LogTraffic(id string, tx uint64, rx uint64) bool

LogTraffic provides a mock function with given fields: id, tx, rx

func (*MockTrafficLogger) TraceStream

func (_m *MockTrafficLogger) TraceStream(stream quic.Stream, stats *server.StreamStats)

TraceStream provides a mock function with given fields: stream, stats

func (*MockTrafficLogger) UntraceStream

func (_m *MockTrafficLogger) UntraceStream(stream quic.Stream)

UntraceStream provides a mock function with given fields: stream

type MockTrafficLogger_Expecter

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

func (*MockTrafficLogger_Expecter) LogOnlineState

func (_e *MockTrafficLogger_Expecter) LogOnlineState(id interface{}, online interface{}) *MockTrafficLogger_LogOnlineState_Call

LogOnlineState is a helper method to define mock.On call

  • id string
  • online bool

func (*MockTrafficLogger_Expecter) LogTraffic

func (_e *MockTrafficLogger_Expecter) LogTraffic(id interface{}, tx interface{}, rx interface{}) *MockTrafficLogger_LogTraffic_Call

LogTraffic is a helper method to define mock.On call

  • id string
  • tx uint64
  • rx uint64

func (*MockTrafficLogger_Expecter) TraceStream

func (_e *MockTrafficLogger_Expecter) TraceStream(stream interface{}, stats interface{}) *MockTrafficLogger_TraceStream_Call

TraceStream is a helper method to define mock.On call

  • stream quic.Stream
  • stats *server.StreamStats

func (*MockTrafficLogger_Expecter) UntraceStream

func (_e *MockTrafficLogger_Expecter) UntraceStream(stream interface{}) *MockTrafficLogger_UntraceStream_Call

UntraceStream is a helper method to define mock.On call

  • stream quic.Stream

type MockTrafficLogger_LogOnlineState_Call

type MockTrafficLogger_LogOnlineState_Call struct {
	*mock.Call
}

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

func (*MockTrafficLogger_LogOnlineState_Call) Return

func (*MockTrafficLogger_LogOnlineState_Call) Run

func (*MockTrafficLogger_LogOnlineState_Call) RunAndReturn

type MockTrafficLogger_LogTraffic_Call

type MockTrafficLogger_LogTraffic_Call struct {
	*mock.Call
}

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

func (*MockTrafficLogger_LogTraffic_Call) Return

func (*MockTrafficLogger_LogTraffic_Call) Run

func (*MockTrafficLogger_LogTraffic_Call) RunAndReturn

type MockTrafficLogger_TraceStream_Call

type MockTrafficLogger_TraceStream_Call struct {
	*mock.Call
}

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

func (*MockTrafficLogger_TraceStream_Call) Return

func (*MockTrafficLogger_TraceStream_Call) Run

func (*MockTrafficLogger_TraceStream_Call) RunAndReturn

type MockTrafficLogger_UntraceStream_Call

type MockTrafficLogger_UntraceStream_Call struct {
	*mock.Call
}

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

func (*MockTrafficLogger_UntraceStream_Call) Return

func (*MockTrafficLogger_UntraceStream_Call) Run

func (*MockTrafficLogger_UntraceStream_Call) RunAndReturn

type MockUDPConn

type MockUDPConn struct {
	mock.Mock
}

MockUDPConn is an autogenerated mock type for the UDPConn type

func NewMockUDPConn

func NewMockUDPConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUDPConn

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

func (_m *MockUDPConn) Close() error

Close provides a mock function with given fields:

func (*MockUDPConn) EXPECT

func (_m *MockUDPConn) EXPECT() *MockUDPConn_Expecter

func (*MockUDPConn) ReadFrom

func (_m *MockUDPConn) ReadFrom(b []byte) (int, string, error)

ReadFrom provides a mock function with given fields: b

func (*MockUDPConn) WriteTo

func (_m *MockUDPConn) WriteTo(b []byte, addr string) (int, error)

WriteTo provides a mock function with given fields: b, addr

type MockUDPConn_Close_Call

type MockUDPConn_Close_Call struct {
	*mock.Call
}

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

func (*MockUDPConn_Close_Call) Return

func (*MockUDPConn_Close_Call) Run

func (_c *MockUDPConn_Close_Call) Run(run func()) *MockUDPConn_Close_Call

func (*MockUDPConn_Close_Call) RunAndReturn

func (_c *MockUDPConn_Close_Call) RunAndReturn(run func() error) *MockUDPConn_Close_Call

type MockUDPConn_Expecter

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

func (*MockUDPConn_Expecter) Close

Close is a helper method to define mock.On call

func (*MockUDPConn_Expecter) ReadFrom

func (_e *MockUDPConn_Expecter) ReadFrom(b interface{}) *MockUDPConn_ReadFrom_Call

ReadFrom is a helper method to define mock.On call

  • b []byte

func (*MockUDPConn_Expecter) WriteTo

func (_e *MockUDPConn_Expecter) WriteTo(b interface{}, addr interface{}) *MockUDPConn_WriteTo_Call

WriteTo is a helper method to define mock.On call

  • b []byte
  • addr string

type MockUDPConn_ReadFrom_Call

type MockUDPConn_ReadFrom_Call struct {
	*mock.Call
}

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

func (*MockUDPConn_ReadFrom_Call) Return

func (*MockUDPConn_ReadFrom_Call) Run

func (*MockUDPConn_ReadFrom_Call) RunAndReturn

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

type MockUDPConn_WriteTo_Call

type MockUDPConn_WriteTo_Call struct {
	*mock.Call
}

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

func (*MockUDPConn_WriteTo_Call) Return

func (*MockUDPConn_WriteTo_Call) Run

func (_c *MockUDPConn_WriteTo_Call) Run(run func(b []byte, addr string)) *MockUDPConn_WriteTo_Call

func (*MockUDPConn_WriteTo_Call) RunAndReturn

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

Jump to

Keyboard shortcuts

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