mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 3 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClock

type MockClock struct {
	mock.Mock
}

MockClock is an autogenerated mock type for the Clock type

func NewMockClock

func NewMockClock(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClock

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

func (_m *MockClock) EXPECT() *MockClock_Expecter

func (*MockClock) NewTicker

func (_mock *MockClock) NewTicker(d time.Duration) util.Ticker

NewTicker provides a mock function for the type MockClock

func (*MockClock) NewTimer

func (_mock *MockClock) NewTimer(d time.Duration) util.Timer

NewTimer provides a mock function for the type MockClock

func (*MockClock) Now

func (_mock *MockClock) Now() time.Time

Now provides a mock function for the type MockClock

type MockClock_Expecter

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

func (*MockClock_Expecter) NewTicker

NewTicker is a helper method to define mock.On call

  • d time.Duration

func (*MockClock_Expecter) NewTimer

NewTimer is a helper method to define mock.On call

  • d time.Duration

func (*MockClock_Expecter) Now

Now is a helper method to define mock.On call

type MockClock_NewTicker_Call

type MockClock_NewTicker_Call struct {
	*mock.Call
}

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

func (*MockClock_NewTicker_Call) Return

func (*MockClock_NewTicker_Call) Run

func (*MockClock_NewTicker_Call) RunAndReturn

type MockClock_NewTimer_Call

type MockClock_NewTimer_Call struct {
	*mock.Call
}

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

func (*MockClock_NewTimer_Call) Return

func (*MockClock_NewTimer_Call) Run

func (*MockClock_NewTimer_Call) RunAndReturn

func (_c *MockClock_NewTimer_Call) RunAndReturn(run func(d time.Duration) util.Timer) *MockClock_NewTimer_Call

type MockClock_Now_Call

type MockClock_Now_Call struct {
	*mock.Call
}

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

func (*MockClock_Now_Call) Return

func (_c *MockClock_Now_Call) Return(time1 time.Time) *MockClock_Now_Call

func (*MockClock_Now_Call) Run

func (_c *MockClock_Now_Call) Run(run func()) *MockClock_Now_Call

func (*MockClock_Now_Call) RunAndReturn

func (_c *MockClock_Now_Call) RunAndReturn(run func() time.Time) *MockClock_Now_Call

type MockTicker

type MockTicker struct {
	mock.Mock
}

MockTicker is an autogenerated mock type for the Ticker type

func NewMockTicker

func NewMockTicker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTicker

NewMockTicker creates a new instance of MockTicker. 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 (*MockTicker) C

func (_mock *MockTicker) C() <-chan time.Time

C provides a mock function for the type MockTicker

func (*MockTicker) EXPECT

func (_m *MockTicker) EXPECT() *MockTicker_Expecter

func (*MockTicker) Reset

func (_mock *MockTicker) Reset(d time.Duration)

Reset provides a mock function for the type MockTicker

func (*MockTicker) Stop

func (_mock *MockTicker) Stop()

Stop provides a mock function for the type MockTicker

type MockTicker_C_Call

type MockTicker_C_Call struct {
	*mock.Call
}

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

func (*MockTicker_C_Call) Return

func (_c *MockTicker_C_Call) Return(timeCh <-chan time.Time) *MockTicker_C_Call

func (*MockTicker_C_Call) Run

func (_c *MockTicker_C_Call) Run(run func()) *MockTicker_C_Call

func (*MockTicker_C_Call) RunAndReturn

func (_c *MockTicker_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTicker_C_Call

type MockTicker_Expecter

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

func (*MockTicker_Expecter) C

C is a helper method to define mock.On call

func (*MockTicker_Expecter) Reset

Reset is a helper method to define mock.On call

  • d time.Duration

func (*MockTicker_Expecter) Stop

Stop is a helper method to define mock.On call

type MockTicker_Reset_Call

type MockTicker_Reset_Call struct {
	*mock.Call
}

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

func (*MockTicker_Reset_Call) Return

func (*MockTicker_Reset_Call) Run

func (*MockTicker_Reset_Call) RunAndReturn

func (_c *MockTicker_Reset_Call) RunAndReturn(run func(d time.Duration)) *MockTicker_Reset_Call

type MockTicker_Stop_Call

type MockTicker_Stop_Call struct {
	*mock.Call
}

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

func (*MockTicker_Stop_Call) Return

func (*MockTicker_Stop_Call) Run

func (_c *MockTicker_Stop_Call) Run(run func()) *MockTicker_Stop_Call

func (*MockTicker_Stop_Call) RunAndReturn

func (_c *MockTicker_Stop_Call) RunAndReturn(run func()) *MockTicker_Stop_Call

type MockTimer

type MockTimer struct {
	mock.Mock
}

MockTimer is an autogenerated mock type for the Timer type

func NewMockTimer

func NewMockTimer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTimer

NewMockTimer creates a new instance of MockTimer. 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 (*MockTimer) C

func (_mock *MockTimer) C() <-chan time.Time

C provides a mock function for the type MockTimer

func (*MockTimer) EXPECT

func (_m *MockTimer) EXPECT() *MockTimer_Expecter

func (*MockTimer) Reset

func (_mock *MockTimer) Reset(d time.Duration) bool

Reset provides a mock function for the type MockTimer

func (*MockTimer) Stop

func (_mock *MockTimer) Stop() bool

Stop provides a mock function for the type MockTimer

type MockTimer_C_Call

type MockTimer_C_Call struct {
	*mock.Call
}

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

func (*MockTimer_C_Call) Return

func (_c *MockTimer_C_Call) Return(timeCh <-chan time.Time) *MockTimer_C_Call

func (*MockTimer_C_Call) Run

func (_c *MockTimer_C_Call) Run(run func()) *MockTimer_C_Call

func (*MockTimer_C_Call) RunAndReturn

func (_c *MockTimer_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTimer_C_Call

type MockTimer_Expecter

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

func (*MockTimer_Expecter) C

C is a helper method to define mock.On call

func (*MockTimer_Expecter) Reset

Reset is a helper method to define mock.On call

  • d time.Duration

func (*MockTimer_Expecter) Stop

Stop is a helper method to define mock.On call

type MockTimer_Reset_Call

type MockTimer_Reset_Call struct {
	*mock.Call
}

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

func (*MockTimer_Reset_Call) Return

func (*MockTimer_Reset_Call) Run

func (*MockTimer_Reset_Call) RunAndReturn

func (_c *MockTimer_Reset_Call) RunAndReturn(run func(d time.Duration) bool) *MockTimer_Reset_Call

type MockTimer_Stop_Call

type MockTimer_Stop_Call struct {
	*mock.Call
}

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

func (*MockTimer_Stop_Call) Return

func (*MockTimer_Stop_Call) Run

func (_c *MockTimer_Stop_Call) Run(run func()) *MockTimer_Stop_Call

func (*MockTimer_Stop_Call) RunAndReturn

func (_c *MockTimer_Stop_Call) RunAndReturn(run func() bool) *MockTimer_Stop_Call

Jump to

Keyboard shortcuts

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