mock

package
v0.1.0-dev7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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 MockChangeProviderStore

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

MockChangeProviderStore is a mock of ChangeProviderStore interface.

func NewMockChangeProviderStore

func NewMockChangeProviderStore(ctrl *gomock.Controller) *MockChangeProviderStore

NewMockChangeProviderStore creates a new mock instance.

func (*MockChangeProviderStore) Create

func (m *MockChangeProviderStore) Create(ctx context.Context, changeProvider entity.ChangeProvider) error

Create mocks base method.

func (*MockChangeProviderStore) EXPECT

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

func (*MockChangeProviderStore) Get

Get mocks base method.

type MockChangeProviderStoreMockRecorder

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

MockChangeProviderStoreMockRecorder is the mock recorder for MockChangeProviderStore.

func (*MockChangeProviderStoreMockRecorder) Create

func (mr *MockChangeProviderStoreMockRecorder) Create(ctx, changeProvider any) *gomock.Call

Create indicates an expected call of Create.

func (*MockChangeProviderStoreMockRecorder) Get

func (mr *MockChangeProviderStoreMockRecorder) Get(ctx, requestID any) *gomock.Call

Get indicates an expected call of Get.

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) GetChangeProviderStore

func (m *MockStorage) GetChangeProviderStore() storage.ChangeProviderStore

GetChangeProviderStore 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) GetChangeProviderStore

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

GetChangeProviderStore indicates an expected call of GetChangeProviderStore.

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