mock

package
v0.3.0-20260730171007-... Latest Latest
Warning

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

Go to latest
Published: Jul 30, 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.

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

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

MockRequestQueueSummaryStore is a mock of RequestQueueSummaryStore interface.

func NewMockRequestQueueSummaryStore

func NewMockRequestQueueSummaryStore(ctrl *gomock.Controller) *MockRequestQueueSummaryStore

NewMockRequestQueueSummaryStore creates a new mock instance.

func (*MockRequestQueueSummaryStore) Create

Create mocks base method.

func (*MockRequestQueueSummaryStore) EXPECT

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

func (*MockRequestQueueSummaryStore) Get

func (m *MockRequestQueueSummaryStore) Get(ctx context.Context, queue string, receivedAtMs int64, requestID string) (entity.RequestQueueSummary, error)

Get mocks base method.

func (*MockRequestQueueSummaryStore) List

List mocks base method.

func (*MockRequestQueueSummaryStore) Update

func (m *MockRequestQueueSummaryStore) Update(ctx context.Context, summary entity.RequestQueueSummary, oldVersion, newVersion int32) error

Update mocks base method.

type MockRequestQueueSummaryStoreMockRecorder

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

MockRequestQueueSummaryStoreMockRecorder is the mock recorder for MockRequestQueueSummaryStore.

func (*MockRequestQueueSummaryStoreMockRecorder) Create

func (mr *MockRequestQueueSummaryStoreMockRecorder) Create(ctx, summary any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRequestQueueSummaryStoreMockRecorder) Get

func (mr *MockRequestQueueSummaryStoreMockRecorder) Get(ctx, queue, receivedAtMs, requestID any) *gomock.Call

Get indicates an expected call of Get.

func (*MockRequestQueueSummaryStoreMockRecorder) List

List indicates an expected call of List.

func (*MockRequestQueueSummaryStoreMockRecorder) Update

func (mr *MockRequestQueueSummaryStoreMockRecorder) Update(ctx, summary, oldVersion, newVersion any) *gomock.Call

Update indicates an expected call of Update.

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 MockRequestSummaryStore

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

MockRequestSummaryStore is a mock of RequestSummaryStore interface.

func NewMockRequestSummaryStore

func NewMockRequestSummaryStore(ctrl *gomock.Controller) *MockRequestSummaryStore

NewMockRequestSummaryStore creates a new mock instance.

func (*MockRequestSummaryStore) Create

Create mocks base method.

func (*MockRequestSummaryStore) EXPECT

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

func (*MockRequestSummaryStore) Get

Get mocks base method.

func (*MockRequestSummaryStore) Update

func (m *MockRequestSummaryStore) Update(ctx context.Context, summary entity.RequestSummary, oldVersion, newVersion int32) error

Update mocks base method.

type MockRequestSummaryStoreMockRecorder

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

MockRequestSummaryStoreMockRecorder is the mock recorder for MockRequestSummaryStore.

func (*MockRequestSummaryStoreMockRecorder) Create

func (mr *MockRequestSummaryStoreMockRecorder) Create(ctx, summary any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRequestSummaryStoreMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockRequestSummaryStoreMockRecorder) Update

func (mr *MockRequestSummaryStoreMockRecorder) Update(ctx, summary, oldVersion, newVersion any) *gomock.Call

Update indicates an expected call of Update.

type MockRequestURIStore

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

MockRequestURIStore is a mock of RequestURIStore interface.

func NewMockRequestURIStore

func NewMockRequestURIStore(ctrl *gomock.Controller) *MockRequestURIStore

NewMockRequestURIStore creates a new mock instance.

func (*MockRequestURIStore) Create

func (m *MockRequestURIStore) Create(ctx context.Context, mapping entity.RequestURI) error

Create mocks base method.

func (*MockRequestURIStore) EXPECT

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

func (*MockRequestURIStore) ListByURI

func (m *MockRequestURIStore) ListByURI(ctx context.Context, changeURI string, limit int) ([]entity.RequestURI, error)

ListByURI mocks base method.

type MockRequestURIStoreMockRecorder

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

MockRequestURIStoreMockRecorder is the mock recorder for MockRequestURIStore.

func (*MockRequestURIStoreMockRecorder) Create

func (mr *MockRequestURIStoreMockRecorder) Create(ctx, mapping any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRequestURIStoreMockRecorder) ListByURI

func (mr *MockRequestURIStoreMockRecorder) ListByURI(ctx, changeURI, limit any) *gomock.Call

ListByURI indicates an expected call of ListByURI.

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

func (m *MockStorage) GetRequestQueueSummaryStore() storage.RequestQueueSummaryStore

GetRequestQueueSummaryStore mocks base method.

func (*MockStorage) GetRequestStore

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

GetRequestStore mocks base method.

func (*MockStorage) GetRequestSummaryStore

func (m *MockStorage) GetRequestSummaryStore() storage.RequestSummaryStore

GetRequestSummaryStore mocks base method.

func (*MockStorage) GetRequestURIStore

func (m *MockStorage) GetRequestURIStore() storage.RequestURIStore

GetRequestURIStore 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) GetRequestQueueSummaryStore

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

GetRequestQueueSummaryStore indicates an expected call of GetRequestQueueSummaryStore.

func (*MockStorageMockRecorder) GetRequestStore

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

GetRequestStore indicates an expected call of GetRequestStore.

func (*MockStorageMockRecorder) GetRequestSummaryStore

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

GetRequestSummaryStore indicates an expected call of GetRequestSummaryStore.

func (*MockStorageMockRecorder) GetRequestURIStore

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

GetRequestURIStore indicates an expected call of GetRequestURIStore.

Jump to

Keyboard shortcuts

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