testlib

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureStderr

func CaptureStderr(callback func()) string

func CaptureStdout

func CaptureStdout(callback func()) string

Types

type EventsObserverMock

type EventsObserverMock struct {
	mock.Mock
}

type MtglibAntiReplayCacheMock

type MtglibAntiReplayCacheMock struct {
	mock.Mock
}

func (*MtglibAntiReplayCacheMock) SeenBefore

func (m *MtglibAntiReplayCacheMock) SeenBefore(data []byte) bool

type MtglibNetworkMock

type MtglibNetworkMock struct {
	mock.Mock
}

func (*MtglibNetworkMock) Dial

func (m *MtglibNetworkMock) Dial(network, address string) (net.Conn, error)

func (*MtglibNetworkMock) DialContext

func (m *MtglibNetworkMock) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*MtglibNetworkMock) MakeHTTPClient

func (m *MtglibNetworkMock) MakeHTTPClient(dialFunc func(ctx context.Context,
	network, address string) (net.Conn, error)) *http.Client

type NetConnMock

type NetConnMock struct {
	mock.Mock
}

func (*NetConnMock) Close

func (n *NetConnMock) Close() error

func (*NetConnMock) LocalAddr

func (n *NetConnMock) LocalAddr() net.Addr

func (*NetConnMock) Read

func (n *NetConnMock) Read(b []byte) (int, error)

func (*NetConnMock) RemoteAddr

func (n *NetConnMock) RemoteAddr() net.Addr

func (*NetConnMock) SetDeadline

func (n *NetConnMock) SetDeadline(t time.Time) error

func (*NetConnMock) SetReadDeadline

func (n *NetConnMock) SetReadDeadline(t time.Time) error

func (*NetConnMock) SetWriteDeadline

func (n *NetConnMock) SetWriteDeadline(t time.Time) error

func (*NetConnMock) Write

func (n *NetConnMock) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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