timeprovider

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentTimeProvider

type CurrentTimeProvider struct{}

func (CurrentTimeProvider) Now

func (tp CurrentTimeProvider) Now() time.Time

type MockTimeProvider

type MockTimeProvider struct {
	mock.Mock
}

MockTimeProvider is an autogenerated mock type for the TimeProvider type

func NewMockTimeProvider

func NewMockTimeProvider(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockTimeProvider

NewMockTimeProvider creates a new instance of MockTimeProvider. 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 (*MockTimeProvider) Now

func (_m *MockTimeProvider) Now() time.Time

Now provides a mock function with no fields

type TimeProvider

type TimeProvider interface {
	Now() time.Time
}

Jump to

Keyboard shortcuts

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