mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 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 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.Host

type Proxy

type Proxy struct {
	mock.Mock
}

Proxy is an autogenerated mock type for the Proxy type

func NewProxy

func NewProxy(t interface {
	mock.TestingT
	Cleanup(func())
}) *Proxy

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

func (_m *Proxy) EXPECT() *Proxy_Expecter

func (*Proxy) ForwardHTTP

func (_m *Proxy) ForwardHTTP(ctx context.Context, r *http.Request, dstHost *addr.Addr) (*http.Response, error)

ForwardHTTP provides a mock function with given fields: ctx, r, dstHost

func (*Proxy) OpenTunnel

func (_m *Proxy) OpenTunnel(ctx context.Context, srcConn net.Conn, dstHost *addr.Addr) (<-chan error, error)

OpenTunnel provides a mock function with given fields: ctx, srcConn, dstHost

type Proxy_Expecter

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

func (*Proxy_Expecter) ForwardHTTP

func (_e *Proxy_Expecter) ForwardHTTP(ctx interface{}, r interface{}, dstHost interface{}) *Proxy_ForwardHTTP_Call

ForwardHTTP is a helper method to define mock.On call

  • ctx context.Context
  • r *http.Request
  • dstHost *addr.Host

func (*Proxy_Expecter) OpenTunnel

func (_e *Proxy_Expecter) OpenTunnel(ctx interface{}, srcConn interface{}, dstHost interface{}) *Proxy_OpenTunnel_Call

OpenTunnel is a helper method to define mock.On call

  • ctx context.Context
  • srcConn net.Conn
  • dstHost *addr.Host

type Proxy_ForwardHTTP_Call

type Proxy_ForwardHTTP_Call struct {
	*mock.Call
}

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

func (*Proxy_ForwardHTTP_Call) Return

func (*Proxy_ForwardHTTP_Call) Run

func (_c *Proxy_ForwardHTTP_Call) Run(run func(ctx context.Context, r *http.Request, dstHost *addr.Addr)) *Proxy_ForwardHTTP_Call

func (*Proxy_ForwardHTTP_Call) RunAndReturn

type Proxy_OpenTunnel_Call

type Proxy_OpenTunnel_Call struct {
	*mock.Call
}

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

func (*Proxy_OpenTunnel_Call) Return

func (_c *Proxy_OpenTunnel_Call) Return(done <-chan error, err error) *Proxy_OpenTunnel_Call

func (*Proxy_OpenTunnel_Call) Run

func (_c *Proxy_OpenTunnel_Call) Run(run func(ctx context.Context, srcConn net.Conn, dstHost *addr.Addr)) *Proxy_OpenTunnel_Call

func (*Proxy_OpenTunnel_Call) RunAndReturn

func (_c *Proxy_OpenTunnel_Call) RunAndReturn(run func(context.Context, net.Conn, *addr.Addr) (<-chan error, error)) *Proxy_OpenTunnel_Call

Jump to

Keyboard shortcuts

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