mocks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer struct {
	mock.Mock
}

Dialer is an autogenerated mock type for the Dialer type

func NewDialer

func NewDialer(t interface {
	mock.TestingT
	Cleanup(func())
}) *Dialer

NewDialer creates a new instance of Dialer. 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 (*Dialer) Dial

func (_m *Dialer) Dial(_a0 context.Context, _a1 *addr.Addr) (net.Conn, error)

Dial provides a mock function with given fields: _a0, _a1

func (*Dialer) EXPECT

func (_m *Dialer) EXPECT() *Dialer_Expecter

type Dialer_Dial_Call

type Dialer_Dial_Call struct {
	*mock.Call
}

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

func (*Dialer_Dial_Call) Return

func (_c *Dialer_Dial_Call) Return(_a0 net.Conn, _a1 error) *Dialer_Dial_Call

func (*Dialer_Dial_Call) Run

func (_c *Dialer_Dial_Call) Run(run func(_a0 context.Context, _a1 *addr.Addr)) *Dialer_Dial_Call

func (*Dialer_Dial_Call) RunAndReturn

func (_c *Dialer_Dial_Call) RunAndReturn(run func(context.Context, *addr.Addr) (net.Conn, error)) *Dialer_Dial_Call

type Dialer_Expecter

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

func (*Dialer_Expecter) Dial

func (_e *Dialer_Expecter) Dial(_a0 interface{}, _a1 interface{}) *Dialer_Dial_Call

Dial is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *addr.Addr

type Tunneler

type Tunneler struct {
	mock.Mock
}

Tunneler is an autogenerated mock type for the Tunneler type

func NewTunneler

func NewTunneler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Tunneler

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

func (_m *Tunneler) EXPECT() *Tunneler_Expecter

func (*Tunneler) Tunnel

func (_m *Tunneler) Tunnel(ctx context.Context, srcConn net.Conn, dstConn net.Conn) error

Tunnel provides a mock function with given fields: ctx, srcConn, dstConn

type Tunneler_Expecter

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

func (*Tunneler_Expecter) Tunnel

func (_e *Tunneler_Expecter) Tunnel(ctx interface{}, srcConn interface{}, dstConn interface{}) *Tunneler_Tunnel_Call

Tunnel is a helper method to define mock.On call

  • ctx context.Context
  • srcConn net.Conn
  • dstConn net.Conn

type Tunneler_Tunnel_Call

type Tunneler_Tunnel_Call struct {
	*mock.Call
}

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

func (*Tunneler_Tunnel_Call) Return

func (*Tunneler_Tunnel_Call) Run

func (_c *Tunneler_Tunnel_Call) Run(run func(ctx context.Context, srcConn net.Conn, dstConn net.Conn)) *Tunneler_Tunnel_Call

func (*Tunneler_Tunnel_Call) RunAndReturn

Jump to

Keyboard shortcuts

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