mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mocks provides mock implementations for testing.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCommonExpectations

func SetCommonExpectations(
	mock *MockPinger,
)

SetCommonExpectations sets the common expectations on the mock pinger.

Types

type MockPinger

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

MockPinger is a mock of Pinger interface.

func NewDefaultMockPinger

func NewDefaultMockPinger(
	ctrl *gomock.Controller,
) *MockPinger

NewDefaultMockPinger creates a pinger Mock with defaults.

func NewMockPinger

func NewMockPinger(ctrl *gomock.Controller) *MockPinger

NewMockPinger creates a new mock instance.

func NewPlainMockPinger

func NewPlainMockPinger(
	ctrl *gomock.Controller,
) *MockPinger

NewPlainMockPinger creates a pinger Mock without defaults.

func (*MockPinger) EXPECT

func (m *MockPinger) EXPECT() *MockPingerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPinger) Run

func (m *MockPinger) Run() error

Run mocks base method.

func (*MockPinger) SetCount

func (m *MockPinger) SetCount(count int)

SetCount mocks base method.

func (*MockPinger) SetPrivileged

func (m *MockPinger) SetPrivileged(privileged bool)

SetPrivileged mocks base method.

func (*MockPinger) Statistics

func (m *MockPinger) Statistics() *probing.Statistics

Statistics mocks base method.

type MockPingerMockRecorder

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

MockPingerMockRecorder is the mock recorder for MockPinger.

func (*MockPingerMockRecorder) Run

func (mr *MockPingerMockRecorder) Run() *gomock.Call

Run indicates an expected call of Run.

func (*MockPingerMockRecorder) SetCount

func (mr *MockPingerMockRecorder) SetCount(count any) *gomock.Call

SetCount indicates an expected call of SetCount.

func (*MockPingerMockRecorder) SetPrivileged

func (mr *MockPingerMockRecorder) SetPrivileged(privileged any) *gomock.Call

SetPrivileged indicates an expected call of SetPrivileged.

func (*MockPingerMockRecorder) Statistics

func (mr *MockPingerMockRecorder) Statistics() *gomock.Call

Statistics indicates an expected call of Statistics.

type MockProvider

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

MockProvider is a mock of Provider interface.

func NewDefaultMockProvider

func NewDefaultMockProvider(
	ctrl *gomock.Controller,
) *MockProvider

NewDefaultMockProvider creates a Mock with defaults.

func NewMockProvider

func NewMockProvider(ctrl *gomock.Controller) *MockProvider

NewMockProvider creates a new mock instance.

func NewPlainMockProvider

func NewPlainMockProvider(
	ctrl *gomock.Controller,
) *MockProvider

NewPlainMockProvider creates a Mock without defaults.

func (*MockProvider) Do

func (m *MockProvider) Do(address string) (*ping.Result, error)

Do mocks base method.

func (*MockProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockProviderMockRecorder

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

MockProviderMockRecorder is the mock recorder for MockProvider.

func (*MockProviderMockRecorder) Do

func (mr *MockProviderMockRecorder) Do(address any) *gomock.Call

Do indicates an expected call of Do.

Jump to

Keyboard shortcuts

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