mock

package
v0.1.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 5 Imported by: ? 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.

README

Storage Mocks

Generated mocks for all extension/storage interfaces using gomock.

Mocks are checked in and generated by the mockgen CLI tool. Run make mocks to regenerate all mocks after modifying an interface.

Adding a new store interface

When a new store interface file is added to extension/storage/:

  1. Add a //go:generate directive to the new file:

    //go:generate mockgen -source=new_store.go -destination=mock/new_store_mock.go -package=mock
    
  2. Run make mocks to generate the mock file.

  3. Run make gazelle to update BUILD.bazel files.

  4. Commit the generated mock file.

Documentation

Overview

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBatchDependentStore

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

MockBatchDependentStore is a mock of BatchDependentStore interface.

func NewMockBatchDependentStore

func NewMockBatchDependentStore(ctrl *gomock.Controller) *MockBatchDependentStore

NewMockBatchDependentStore creates a new mock instance.

func (*MockBatchDependentStore) Create

func (m *MockBatchDependentStore) Create(ctx context.Context, batchDependent entity.BatchDependent) error

Create mocks base method.

func (*MockBatchDependentStore) EXPECT

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

func (*MockBatchDependentStore) Get

Get mocks base method.

func (*MockBatchDependentStore) UpdateDependents

func (m *MockBatchDependentStore) UpdateDependents(ctx context.Context, batchID string, oldVersion, newVersion int32, dependents []string) error

UpdateDependents mocks base method.

type MockBatchDependentStoreMockRecorder

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

MockBatchDependentStoreMockRecorder is the mock recorder for MockBatchDependentStore.

func (*MockBatchDependentStoreMockRecorder) Create

func (mr *MockBatchDependentStoreMockRecorder) Create(ctx, batchDependent any) *gomock.Call

Create indicates an expected call of Create.

func (*MockBatchDependentStoreMockRecorder) Get

func (mr *MockBatchDependentStoreMockRecorder) Get(ctx, batchID any) *gomock.Call

Get indicates an expected call of Get.

func (*MockBatchDependentStoreMockRecorder) UpdateDependents

func (mr *MockBatchDependentStoreMockRecorder) UpdateDependents(ctx, batchID, oldVersion, newVersion, dependents any) *gomock.Call

UpdateDependents indicates an expected call of UpdateDependents.

type MockBatchStore

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

MockBatchStore is a mock of BatchStore interface.

func NewMockBatchStore

func NewMockBatchStore(ctrl *gomock.Controller) *MockBatchStore

NewMockBatchStore creates a new mock instance.

func (*MockBatchStore) Create

func (m *MockBatchStore) Create(ctx context.Context, batch entity.Batch) error

Create mocks base method.

func (*MockBatchStore) EXPECT

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

func (*MockBatchStore) Get

func (m *MockBatchStore) Get(ctx context.Context, id string) (entity.Batch, error)

Get mocks base method.

func (*MockBatchStore) GetByQueueAndStates

func (m *MockBatchStore) GetByQueueAndStates(ctx context.Context, queue string, states []entity.BatchState) ([]entity.Batch, error)

GetByQueueAndStates mocks base method.

func (*MockBatchStore) UpdateScoreAndState

func (m *MockBatchStore) UpdateScoreAndState(ctx context.Context, id string, oldVersion, newVersion int32, score float64, newState entity.BatchState) error

UpdateScoreAndState mocks base method.

func (*MockBatchStore) UpdateState

func (m *MockBatchStore) UpdateState(ctx context.Context, id string, oldVersion, newVersion int32, newState entity.BatchState) error

UpdateState mocks base method.

type MockBatchStoreMockRecorder

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

MockBatchStoreMockRecorder is the mock recorder for MockBatchStore.

func (*MockBatchStoreMockRecorder) Create

func (mr *MockBatchStoreMockRecorder) Create(ctx, batch any) *gomock.Call

Create indicates an expected call of Create.

func (*MockBatchStoreMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockBatchStoreMockRecorder) GetByQueueAndStates

func (mr *MockBatchStoreMockRecorder) GetByQueueAndStates(ctx, queue, states any) *gomock.Call

GetByQueueAndStates indicates an expected call of GetByQueueAndStates.

func (*MockBatchStoreMockRecorder) UpdateScoreAndState

func (mr *MockBatchStoreMockRecorder) UpdateScoreAndState(ctx, id, oldVersion, newVersion, score, newState any) *gomock.Call

UpdateScoreAndState indicates an expected call of UpdateScoreAndState.

func (*MockBatchStoreMockRecorder) UpdateState

func (mr *MockBatchStoreMockRecorder) UpdateState(ctx, id, oldVersion, newVersion, newState any) *gomock.Call

UpdateState indicates an expected call of UpdateState.

type MockBuildStore

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

MockBuildStore is a mock of BuildStore interface.

func NewMockBuildStore

func NewMockBuildStore(ctrl *gomock.Controller) *MockBuildStore

NewMockBuildStore creates a new mock instance.

func (*MockBuildStore) Create

func (m *MockBuildStore) Create(ctx context.Context, build entity.Build) error

Create mocks base method.

func (*MockBuildStore) EXPECT

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

func (*MockBuildStore) Get

func (m *MockBuildStore) Get(ctx context.Context, id string) (entity.Build, error)

Get mocks base method.

func (*MockBuildStore) UpdateStatus

func (m *MockBuildStore) UpdateStatus(ctx context.Context, id string, newStatus entity.BuildStatus) error

UpdateStatus mocks base method.

type MockBuildStoreMockRecorder

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

MockBuildStoreMockRecorder is the mock recorder for MockBuildStore.

func (*MockBuildStoreMockRecorder) Create

func (mr *MockBuildStoreMockRecorder) Create(ctx, build any) *gomock.Call

Create indicates an expected call of Create.

func (*MockBuildStoreMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockBuildStoreMockRecorder) UpdateStatus

func (mr *MockBuildStoreMockRecorder) UpdateStatus(ctx, id, newStatus any) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

type MockChangeStore

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

MockChangeStore is a mock of ChangeStore interface.

func NewMockChangeStore

func NewMockChangeStore(ctrl *gomock.Controller) *MockChangeStore

NewMockChangeStore creates a new mock instance.

func (*MockChangeStore) Create

func (m *MockChangeStore) Create(ctx context.Context, record entity.ChangeRecord) error

Create mocks base method.

func (*MockChangeStore) EXPECT

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

func (*MockChangeStore) GetByURI

func (m *MockChangeStore) GetByURI(ctx context.Context, queue, uri string) ([]entity.ChangeRecord, error)

GetByURI mocks base method.

type MockChangeStoreMockRecorder

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

MockChangeStoreMockRecorder is the mock recorder for MockChangeStore.

func (*MockChangeStoreMockRecorder) Create

func (mr *MockChangeStoreMockRecorder) Create(ctx, record any) *gomock.Call

Create indicates an expected call of Create.

func (*MockChangeStoreMockRecorder) GetByURI

func (mr *MockChangeStoreMockRecorder) GetByURI(ctx, queue, uri any) *gomock.Call

GetByURI indicates an expected call of GetByURI.

type MockRequestLogStore

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

MockRequestLogStore is a mock of RequestLogStore interface.

func NewMockRequestLogStore

func NewMockRequestLogStore(ctrl *gomock.Controller) *MockRequestLogStore

NewMockRequestLogStore creates a new mock instance.

func (*MockRequestLogStore) EXPECT

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

func (*MockRequestLogStore) Insert

Insert mocks base method.

func (*MockRequestLogStore) List

func (m *MockRequestLogStore) List(ctx context.Context, requestID string) ([]entity.RequestLog, error)

List mocks base method.

type MockRequestLogStoreMockRecorder

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

MockRequestLogStoreMockRecorder is the mock recorder for MockRequestLogStore.

func (*MockRequestLogStoreMockRecorder) Insert

func (mr *MockRequestLogStoreMockRecorder) Insert(ctx, log any) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockRequestLogStoreMockRecorder) List

func (mr *MockRequestLogStoreMockRecorder) List(ctx, requestID any) *gomock.Call

List indicates an expected call of List.

type MockRequestStore

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

MockRequestStore is a mock of RequestStore interface.

func NewMockRequestStore

func NewMockRequestStore(ctrl *gomock.Controller) *MockRequestStore

NewMockRequestStore creates a new mock instance.

func (*MockRequestStore) Create

func (m *MockRequestStore) Create(ctx context.Context, request entity.Request) error

Create mocks base method.

func (*MockRequestStore) EXPECT

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

func (*MockRequestStore) Get

Get mocks base method.

func (*MockRequestStore) UpdateState

func (m *MockRequestStore) UpdateState(ctx context.Context, id string, oldVersion, newVersion int32, newState entity.RequestState) error

UpdateState mocks base method.

type MockRequestStoreMockRecorder

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

MockRequestStoreMockRecorder is the mock recorder for MockRequestStore.

func (*MockRequestStoreMockRecorder) Create

func (mr *MockRequestStoreMockRecorder) Create(ctx, request any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRequestStoreMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockRequestStoreMockRecorder) UpdateState

func (mr *MockRequestStoreMockRecorder) UpdateState(ctx, id, oldVersion, newVersion, newState any) *gomock.Call

UpdateState indicates an expected call of UpdateState.

type MockSpeculationTreeStore

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

MockSpeculationTreeStore is a mock of SpeculationTreeStore interface.

func NewMockSpeculationTreeStore

func NewMockSpeculationTreeStore(ctrl *gomock.Controller) *MockSpeculationTreeStore

NewMockSpeculationTreeStore creates a new mock instance.

func (*MockSpeculationTreeStore) Create

func (m *MockSpeculationTreeStore) Create(ctx context.Context, speculationTree entity.SpeculationTree) error

Create mocks base method.

func (*MockSpeculationTreeStore) EXPECT

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

func (*MockSpeculationTreeStore) Get

Get mocks base method.

func (*MockSpeculationTreeStore) UpdateSpeculations

func (m *MockSpeculationTreeStore) UpdateSpeculations(ctx context.Context, batchID string, speculations []entity.SpeculationInfo) error

UpdateSpeculations mocks base method.

type MockSpeculationTreeStoreMockRecorder

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

MockSpeculationTreeStoreMockRecorder is the mock recorder for MockSpeculationTreeStore.

func (*MockSpeculationTreeStoreMockRecorder) Create

func (mr *MockSpeculationTreeStoreMockRecorder) Create(ctx, speculationTree any) *gomock.Call

Create indicates an expected call of Create.

func (*MockSpeculationTreeStoreMockRecorder) Get

func (mr *MockSpeculationTreeStoreMockRecorder) Get(ctx, batchID any) *gomock.Call

Get indicates an expected call of Get.

func (*MockSpeculationTreeStoreMockRecorder) UpdateSpeculations

func (mr *MockSpeculationTreeStoreMockRecorder) UpdateSpeculations(ctx, batchID, speculations any) *gomock.Call

UpdateSpeculations indicates an expected call of UpdateSpeculations.

type MockStorage

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

MockStorage is a mock of Storage interface.

func NewMockStorage

func NewMockStorage(ctrl *gomock.Controller) *MockStorage

NewMockStorage creates a new mock instance.

func (*MockStorage) Close

func (m *MockStorage) Close() error

Close mocks base method.

func (*MockStorage) EXPECT

func (m *MockStorage) EXPECT() *MockStorageMockRecorder

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

func (*MockStorage) GetBatchDependentStore

func (m *MockStorage) GetBatchDependentStore() storage.BatchDependentStore

GetBatchDependentStore mocks base method.

func (*MockStorage) GetBatchStore

func (m *MockStorage) GetBatchStore() storage.BatchStore

GetBatchStore mocks base method.

func (*MockStorage) GetBuildStore

func (m *MockStorage) GetBuildStore() storage.BuildStore

GetBuildStore mocks base method.

func (*MockStorage) GetChangeStore

func (m *MockStorage) GetChangeStore() storage.ChangeStore

GetChangeStore mocks base method.

func (*MockStorage) GetRequestLogStore

func (m *MockStorage) GetRequestLogStore() storage.RequestLogStore

GetRequestLogStore mocks base method.

func (*MockStorage) GetRequestStore

func (m *MockStorage) GetRequestStore() storage.RequestStore

GetRequestStore mocks base method.

func (*MockStorage) GetSpeculationTreeStore

func (m *MockStorage) GetSpeculationTreeStore() storage.SpeculationTreeStore

GetSpeculationTreeStore mocks base method.

type MockStorageMockRecorder

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

MockStorageMockRecorder is the mock recorder for MockStorage.

func (*MockStorageMockRecorder) Close

func (mr *MockStorageMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockStorageMockRecorder) GetBatchDependentStore

func (mr *MockStorageMockRecorder) GetBatchDependentStore() *gomock.Call

GetBatchDependentStore indicates an expected call of GetBatchDependentStore.

func (*MockStorageMockRecorder) GetBatchStore

func (mr *MockStorageMockRecorder) GetBatchStore() *gomock.Call

GetBatchStore indicates an expected call of GetBatchStore.

func (*MockStorageMockRecorder) GetBuildStore

func (mr *MockStorageMockRecorder) GetBuildStore() *gomock.Call

GetBuildStore indicates an expected call of GetBuildStore.

func (*MockStorageMockRecorder) GetChangeStore

func (mr *MockStorageMockRecorder) GetChangeStore() *gomock.Call

GetChangeStore indicates an expected call of GetChangeStore.

func (*MockStorageMockRecorder) GetRequestLogStore

func (mr *MockStorageMockRecorder) GetRequestLogStore() *gomock.Call

GetRequestLogStore indicates an expected call of GetRequestLogStore.

func (*MockStorageMockRecorder) GetRequestStore

func (mr *MockStorageMockRecorder) GetRequestStore() *gomock.Call

GetRequestStore indicates an expected call of GetRequestStore.

func (*MockStorageMockRecorder) GetSpeculationTreeStore

func (mr *MockStorageMockRecorder) GetSpeculationTreeStore() *gomock.Call

GetSpeculationTreeStore indicates an expected call of GetSpeculationTreeStore.

Jump to

Keyboard shortcuts

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