mocks

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 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 is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClock

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

MockClock is a mock implementation of the TimeProvider interface. It allows setting and retrieving the current time manually.

func NewMockClock

func NewMockClock(initialTime time.Time) *MockClock

NewMockClock initializes a new MockClock with the specified initial time.

func (*MockClock) AdvanceTime

func (mc *MockClock) AdvanceTime(d time.Duration)

AdvanceTime advances the current mock time by the specified duration.

func (*MockClock) GetCurrentTime

func (mc *MockClock) GetCurrentTime() time.Time

GetCurrentTime returns the current mock time.

func (*MockClock) SetCurrentTime

func (mc *MockClock) SetCurrentTime(t time.Time)

SetCurrentTime sets the current mock time to the specified time.

type MockResourceStore

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

MockResourceStore is a mock of ResourceStore interface.

func NewMockResourceStore

func NewMockResourceStore(ctrl *gomock.Controller) *MockResourceStore

NewMockResourceStore creates a new mock instance.

func (*MockResourceStore) Count

func (m *MockResourceStore) Count(ctx context.Context) (int, error)

Count mocks base method.

func (*MockResourceStore) Create

Create mocks base method.

func (*MockResourceStore) Delete

func (m *MockResourceStore) Delete(ctx context.Context, id string) error

Delete mocks base method.

func (*MockResourceStore) DeleteAll

func (m *MockResourceStore) DeleteAll(ctx context.Context) error

DeleteAll mocks base method.

func (*MockResourceStore) EXPECT

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

func (*MockResourceStore) FindAllBy

func (m *MockResourceStore) FindAllBy(ctx context.Context, conds ...any) ([]*types.ResourceTags, error)

FindAllBy mocks base method.

func (*MockResourceStore) FindFirstBy

func (m *MockResourceStore) FindFirstBy(ctx context.Context, conds ...any) (*types.ResourceTags, error)

FindFirstBy mocks base method.

func (*MockResourceStore) Get

Get mocks base method.

func (*MockResourceStore) Tx

func (m *MockResourceStore) Tx(ctx context.Context, block func(context.Context) error) error

Tx mocks base method.

func (*MockResourceStore) Update

Update mocks base method.

type MockResourceStoreMockRecorder

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

MockResourceStoreMockRecorder is the mock recorder for MockResourceStore.

func (*MockResourceStoreMockRecorder) Count

func (mr *MockResourceStoreMockRecorder) Count(ctx any) *gomock.Call

Count indicates an expected call of Count.

func (*MockResourceStoreMockRecorder) Create

func (mr *MockResourceStoreMockRecorder) Create(ctx, it any) *gomock.Call

Create indicates an expected call of Create.

func (*MockResourceStoreMockRecorder) Delete

func (mr *MockResourceStoreMockRecorder) Delete(ctx, id any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockResourceStoreMockRecorder) DeleteAll

func (mr *MockResourceStoreMockRecorder) DeleteAll(ctx any) *gomock.Call

DeleteAll indicates an expected call of DeleteAll.

func (*MockResourceStoreMockRecorder) FindAllBy

func (mr *MockResourceStoreMockRecorder) FindAllBy(ctx any, conds ...any) *gomock.Call

FindAllBy indicates an expected call of FindAllBy.

func (*MockResourceStoreMockRecorder) FindFirstBy

func (mr *MockResourceStoreMockRecorder) FindFirstBy(ctx any, conds ...any) *gomock.Call

FindFirstBy indicates an expected call of FindFirstBy.

func (*MockResourceStoreMockRecorder) Get

func (mr *MockResourceStoreMockRecorder) Get(ctx, id any) *gomock.Call

Get indicates an expected call of Get.

func (*MockResourceStoreMockRecorder) Tx

func (mr *MockResourceStoreMockRecorder) Tx(ctx, block any) *gomock.Call

Tx indicates an expected call of Tx.

func (*MockResourceStoreMockRecorder) Update

func (mr *MockResourceStoreMockRecorder) Update(ctx, it any) *gomock.Call

Update indicates an expected call of Update.

type MockRunnable

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

MockRunnable is a mock of Runnable interface.

func NewMockRunnable

func NewMockRunnable(ctrl *gomock.Controller) *MockRunnable

NewMockRunnable creates a new mock instance.

func (*MockRunnable) EXPECT

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

func (*MockRunnable) IsRunning

func (m *MockRunnable) IsRunning() bool

IsRunning mocks base method.

func (*MockRunnable) Run

func (m *MockRunnable) Run() error

Run mocks base method.

func (*MockRunnable) Shutdown

func (m *MockRunnable) Shutdown() error

Shutdown mocks base method.

type MockRunnableMockRecorder

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

MockRunnableMockRecorder is the mock recorder for MockRunnable.

func (*MockRunnableMockRecorder) IsRunning

func (mr *MockRunnableMockRecorder) IsRunning() *gomock.Call

IsRunning indicates an expected call of IsRunning.

func (*MockRunnableMockRecorder) Run

Run indicates an expected call of Run.

func (*MockRunnableMockRecorder) Shutdown

func (mr *MockRunnableMockRecorder) Shutdown() *gomock.Call

Shutdown indicates an expected call of Shutdown.

type MockStorage

type MockStorage[Model any, ID comparable] struct {
	// contains filtered or unexported fields
}

MockStorage is a mock of Storage interface.

func NewMockStorage

func NewMockStorage[Model any, ID comparable](ctrl *gomock.Controller) *MockStorage[Model, ID]

NewMockStorage creates a new mock instance.

func (*MockStorage[Model, ID]) Create

func (m *MockStorage[Model, ID]) Create(ctx context.Context, it *Model) error

Create mocks base method.

func (*MockStorage[Model, ID]) Delete

func (m *MockStorage[Model, ID]) Delete(ctx context.Context, id ID) error

Delete mocks base method.

func (*MockStorage[Model, ID]) EXPECT

func (m *MockStorage[Model, ID]) EXPECT() *MockStorageMockRecorder[Model, ID]

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

func (*MockStorage[Model, ID]) Get

func (m *MockStorage[Model, ID]) Get(ctx context.Context, id ID) (*Model, error)

Get mocks base method.

func (*MockStorage[Model, ID]) Update

func (m *MockStorage[Model, ID]) Update(ctx context.Context, it *Model) error

Update mocks base method.

type MockStorageMockRecorder

type MockStorageMockRecorder[Model any, ID comparable] struct {
	// contains filtered or unexported fields
}

MockStorageMockRecorder is the mock recorder for MockStorage.

func (*MockStorageMockRecorder[Model, ID]) Create

func (mr *MockStorageMockRecorder[Model, ID]) Create(ctx, it any) *gomock.Call

Create indicates an expected call of Create.

func (*MockStorageMockRecorder[Model, ID]) Delete

func (mr *MockStorageMockRecorder[Model, ID]) Delete(ctx, id any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockStorageMockRecorder[Model, ID]) Get

func (mr *MockStorageMockRecorder[Model, ID]) Get(ctx, id any) *gomock.Call

Get indicates an expected call of Get.

func (*MockStorageMockRecorder[Model, ID]) Update

func (mr *MockStorageMockRecorder[Model, ID]) Update(ctx, it any) *gomock.Call

Update indicates an expected call of Update.

type MockStore

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

MockStore is a mock of Store interface.

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance.

func (*MockStore) All

func (m *MockStore) All(arg0 context.Context, arg1 string) (types.MetricRange, error)

All mocks base method.

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

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

func (*MockStore) Find added in v1.2.0

func (m *MockStore) Find(ctx context.Context, filterName, filterExtension string) ([]string, error)

Find mocks base method.

func (*MockStore) Flush

func (m *MockStore) Flush() error

Flush mocks base method.

func (*MockStore) GetFiles

func (m *MockStore) GetFiles(paths ...string) ([]string, error)

GetFiles mocks base method.

func (*MockStore) GetUsage

func (m *MockStore) GetUsage(limit uint64, paths ...string) (*types.StoreUsage, error)

GetUsage mocks base method.

func (*MockStore) ListFiles

func (m *MockStore) ListFiles(paths ...string) ([]os.DirEntry, error)

ListFiles mocks base method.

func (*MockStore) Pending

func (m *MockStore) Pending() int

Pending mocks base method.

func (*MockStore) Put

func (m *MockStore) Put(arg0 context.Context, arg1 ...types.Metric) error

Put mocks base method.

func (*MockStore) Walk

func (m *MockStore) Walk(loc string, process filepath.WalkFunc) error

Walk mocks base method.

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore.

func (*MockStoreMockRecorder) All

func (mr *MockStoreMockRecorder) All(arg0, arg1 any) *gomock.Call

All indicates an expected call of All.

func (*MockStoreMockRecorder) Find added in v1.2.0

func (mr *MockStoreMockRecorder) Find(ctx, filterName, filterExtension any) *gomock.Call

Find indicates an expected call of Find.

func (*MockStoreMockRecorder) Flush

func (mr *MockStoreMockRecorder) Flush() *gomock.Call

Flush indicates an expected call of Flush.

func (*MockStoreMockRecorder) GetFiles

func (mr *MockStoreMockRecorder) GetFiles(paths ...any) *gomock.Call

GetFiles indicates an expected call of GetFiles.

func (*MockStoreMockRecorder) GetUsage

func (mr *MockStoreMockRecorder) GetUsage(limit any, paths ...any) *gomock.Call

GetUsage indicates an expected call of GetUsage.

func (*MockStoreMockRecorder) ListFiles

func (mr *MockStoreMockRecorder) ListFiles(paths ...any) *gomock.Call

ListFiles indicates an expected call of ListFiles.

func (*MockStoreMockRecorder) Pending

func (mr *MockStoreMockRecorder) Pending() *gomock.Call

Pending indicates an expected call of Pending.

func (*MockStoreMockRecorder) Put

func (mr *MockStoreMockRecorder) Put(arg0 any, arg1 ...any) *gomock.Call

Put indicates an expected call of Put.

func (*MockStoreMockRecorder) Walk

func (mr *MockStoreMockRecorder) Walk(loc, process any) *gomock.Call

Walk indicates an expected call of Walk.

Jump to

Keyboard shortcuts

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