types

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockReplicator

type MockReplicator struct {
	mock.Mock
}

MockReplicator is an autogenerated mock type for the Replicator type

func NewMockReplicator

func NewMockReplicator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReplicator

NewMockReplicator creates a new instance of MockReplicator. 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 (*MockReplicator) AbortReplication

func (_m *MockReplicator) AbortReplication(ctx context.Context, className string, shardName string, requestID string) interface{}

AbortReplication provides a mock function with given fields: ctx, className, shardName, requestID

func (*MockReplicator) CommitReplication

func (_m *MockReplicator) CommitReplication(ctx context.Context, className string, shardName string, requestID string) interface{}

CommitReplication provides a mock function with given fields: ctx, className, shardName, requestID

func (*MockReplicator) DigestObjects

func (_m *MockReplicator) DigestObjects(ctx context.Context, className string, shardName string, ids []strfmt.UUID) ([]routertypes.RepairResponse, error)

DigestObjects provides a mock function with given fields: ctx, className, shardName, ids

func (*MockReplicator) DigestObjectsInRange

func (_m *MockReplicator) DigestObjectsInRange(ctx context.Context, className string, shardName string, initialUUID strfmt.UUID, finalUUID strfmt.UUID, limit int) ([]routertypes.RepairResponse, error)

DigestObjectsInRange provides a mock function with given fields: ctx, className, shardName, initialUUID, finalUUID, limit

func (*MockReplicator) EXPECT

func (*MockReplicator) FetchObject

func (_m *MockReplicator) FetchObject(ctx context.Context, className string, shardName string, id strfmt.UUID) (replica.Replica, error)

FetchObject provides a mock function with given fields: ctx, className, shardName, id

func (*MockReplicator) FetchObjects

func (_m *MockReplicator) FetchObjects(ctx context.Context, className string, shardName string, ids []strfmt.UUID) ([]replica.Replica, error)

FetchObjects provides a mock function with given fields: ctx, className, shardName, ids

func (*MockReplicator) HashTreeLevel

func (_m *MockReplicator) HashTreeLevel(ctx context.Context, className string, shardName string, level int, discriminant *hashtree.Bitset) ([]hashtree.Digest, error)

HashTreeLevel provides a mock function with given fields: ctx, className, shardName, level, discriminant

func (*MockReplicator) OverwriteObjects

func (_m *MockReplicator) OverwriteObjects(ctx context.Context, className string, shard string, vobjects []*objects.VObject) ([]routertypes.RepairResponse, error)

OverwriteObjects provides a mock function with given fields: ctx, className, shard, vobjects

func (*MockReplicator) ReplicateDeletion

func (_m *MockReplicator) ReplicateDeletion(ctx context.Context, className string, shardName string, requestID string, uuid strfmt.UUID, deletionTime time.Time, schemaVersion uint64) replica.SimpleResponse

ReplicateDeletion provides a mock function with given fields: ctx, className, shardName, requestID, uuid, deletionTime, schemaVersion

func (*MockReplicator) ReplicateDeletions

func (_m *MockReplicator) ReplicateDeletions(ctx context.Context, className string, shardName string, requestID string, uuids []strfmt.UUID, deletionTime time.Time, dryRun bool, schemaVersion uint64) replica.SimpleResponse

ReplicateDeletions provides a mock function with given fields: ctx, className, shardName, requestID, uuids, deletionTime, dryRun, schemaVersion

func (*MockReplicator) ReplicateObject

func (_m *MockReplicator) ReplicateObject(ctx context.Context, className string, shardName string, requestID string, object *storobj.Object, schemaVersion uint64) replica.SimpleResponse

ReplicateObject provides a mock function with given fields: ctx, className, shardName, requestID, object, schemaVersion

func (*MockReplicator) ReplicateObjects

func (_m *MockReplicator) ReplicateObjects(ctx context.Context, className string, shardName string, requestID string, _a4 []*storobj.Object, schemaVersion uint64) replica.SimpleResponse

ReplicateObjects provides a mock function with given fields: ctx, className, shardName, requestID, _a4, schemaVersion

func (*MockReplicator) ReplicateReferences

func (_m *MockReplicator) ReplicateReferences(ctx context.Context, className string, shardName string, requestID string, refs []objects.BatchReference, schemaVersion uint64) replica.SimpleResponse

ReplicateReferences provides a mock function with given fields: ctx, className, shardName, requestID, refs, schemaVersion

func (*MockReplicator) ReplicateUpdate

func (_m *MockReplicator) ReplicateUpdate(ctx context.Context, className string, shardName string, requestID string, mergeDoc *objects.MergeDocument, schemaVersion uint64) replica.SimpleResponse

ReplicateUpdate provides a mock function with given fields: ctx, className, shardName, requestID, mergeDoc, schemaVersion

type MockReplicator_AbortReplication_Call

type MockReplicator_AbortReplication_Call struct {
	*mock.Call
}

MockReplicator_AbortReplication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortReplication'

func (*MockReplicator_AbortReplication_Call) Return

func (*MockReplicator_AbortReplication_Call) Run

func (_c *MockReplicator_AbortReplication_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string)) *MockReplicator_AbortReplication_Call

func (*MockReplicator_AbortReplication_Call) RunAndReturn

type MockReplicator_CommitReplication_Call

type MockReplicator_CommitReplication_Call struct {
	*mock.Call
}

MockReplicator_CommitReplication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitReplication'

func (*MockReplicator_CommitReplication_Call) Return

func (*MockReplicator_CommitReplication_Call) Run

func (_c *MockReplicator_CommitReplication_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string)) *MockReplicator_CommitReplication_Call

func (*MockReplicator_CommitReplication_Call) RunAndReturn

type MockReplicator_DigestObjectsInRange_Call

type MockReplicator_DigestObjectsInRange_Call struct {
	*mock.Call
}

MockReplicator_DigestObjectsInRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DigestObjectsInRange'

func (*MockReplicator_DigestObjectsInRange_Call) Return

func (*MockReplicator_DigestObjectsInRange_Call) Run

func (_c *MockReplicator_DigestObjectsInRange_Call) Run(run func(ctx context.Context, className string, shardName string, initialUUID strfmt.UUID, finalUUID strfmt.UUID, limit int)) *MockReplicator_DigestObjectsInRange_Call

type MockReplicator_DigestObjects_Call

type MockReplicator_DigestObjects_Call struct {
	*mock.Call
}

MockReplicator_DigestObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DigestObjects'

func (*MockReplicator_DigestObjects_Call) Return

func (*MockReplicator_DigestObjects_Call) Run

func (_c *MockReplicator_DigestObjects_Call) Run(run func(ctx context.Context, className string, shardName string, ids []strfmt.UUID)) *MockReplicator_DigestObjects_Call

func (*MockReplicator_DigestObjects_Call) RunAndReturn

type MockReplicator_Expecter

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

func (*MockReplicator_Expecter) AbortReplication

func (_e *MockReplicator_Expecter) AbortReplication(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}) *MockReplicator_AbortReplication_Call

AbortReplication is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string

func (*MockReplicator_Expecter) CommitReplication

func (_e *MockReplicator_Expecter) CommitReplication(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}) *MockReplicator_CommitReplication_Call

CommitReplication is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string

func (*MockReplicator_Expecter) DigestObjects

func (_e *MockReplicator_Expecter) DigestObjects(ctx interface{}, className interface{}, shardName interface{}, ids interface{}) *MockReplicator_DigestObjects_Call

DigestObjects is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • ids []strfmt.UUID

func (*MockReplicator_Expecter) DigestObjectsInRange

func (_e *MockReplicator_Expecter) DigestObjectsInRange(ctx interface{}, className interface{}, shardName interface{}, initialUUID interface{}, finalUUID interface{}, limit interface{}) *MockReplicator_DigestObjectsInRange_Call

DigestObjectsInRange is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • initialUUID strfmt.UUID
  • finalUUID strfmt.UUID
  • limit int

func (*MockReplicator_Expecter) FetchObject

func (_e *MockReplicator_Expecter) FetchObject(ctx interface{}, className interface{}, shardName interface{}, id interface{}) *MockReplicator_FetchObject_Call

FetchObject is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • id strfmt.UUID

func (*MockReplicator_Expecter) FetchObjects

func (_e *MockReplicator_Expecter) FetchObjects(ctx interface{}, className interface{}, shardName interface{}, ids interface{}) *MockReplicator_FetchObjects_Call

FetchObjects is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • ids []strfmt.UUID

func (*MockReplicator_Expecter) HashTreeLevel

func (_e *MockReplicator_Expecter) HashTreeLevel(ctx interface{}, className interface{}, shardName interface{}, level interface{}, discriminant interface{}) *MockReplicator_HashTreeLevel_Call

HashTreeLevel is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • level int
  • discriminant *hashtree.Bitset

func (*MockReplicator_Expecter) OverwriteObjects

func (_e *MockReplicator_Expecter) OverwriteObjects(ctx interface{}, className interface{}, shard interface{}, vobjects interface{}) *MockReplicator_OverwriteObjects_Call

OverwriteObjects is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shard string
  • vobjects []*objects.VObject

func (*MockReplicator_Expecter) ReplicateDeletion

func (_e *MockReplicator_Expecter) ReplicateDeletion(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, uuid interface{}, deletionTime interface{}, schemaVersion interface{}) *MockReplicator_ReplicateDeletion_Call

ReplicateDeletion is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • uuid strfmt.UUID
  • deletionTime time.Time
  • schemaVersion uint64

func (*MockReplicator_Expecter) ReplicateDeletions

func (_e *MockReplicator_Expecter) ReplicateDeletions(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, uuids interface{}, deletionTime interface{}, dryRun interface{}, schemaVersion interface{}) *MockReplicator_ReplicateDeletions_Call

ReplicateDeletions is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • uuids []strfmt.UUID
  • deletionTime time.Time
  • dryRun bool
  • schemaVersion uint64

func (*MockReplicator_Expecter) ReplicateObject

func (_e *MockReplicator_Expecter) ReplicateObject(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, object interface{}, schemaVersion interface{}) *MockReplicator_ReplicateObject_Call

ReplicateObject is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • object *storobj.Object
  • schemaVersion uint64

func (*MockReplicator_Expecter) ReplicateObjects

func (_e *MockReplicator_Expecter) ReplicateObjects(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, _a4 interface{}, schemaVersion interface{}) *MockReplicator_ReplicateObjects_Call

ReplicateObjects is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • _a4 []*storobj.Object
  • schemaVersion uint64

func (*MockReplicator_Expecter) ReplicateReferences

func (_e *MockReplicator_Expecter) ReplicateReferences(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, refs interface{}, schemaVersion interface{}) *MockReplicator_ReplicateReferences_Call

ReplicateReferences is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • refs []objects.BatchReference
  • schemaVersion uint64

func (*MockReplicator_Expecter) ReplicateUpdate

func (_e *MockReplicator_Expecter) ReplicateUpdate(ctx interface{}, className interface{}, shardName interface{}, requestID interface{}, mergeDoc interface{}, schemaVersion interface{}) *MockReplicator_ReplicateUpdate_Call

ReplicateUpdate is a helper method to define mock.On call

  • ctx context.Context
  • className string
  • shardName string
  • requestID string
  • mergeDoc *objects.MergeDocument
  • schemaVersion uint64

type MockReplicator_FetchObject_Call

type MockReplicator_FetchObject_Call struct {
	*mock.Call
}

MockReplicator_FetchObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchObject'

func (*MockReplicator_FetchObject_Call) Return

func (*MockReplicator_FetchObject_Call) Run

func (_c *MockReplicator_FetchObject_Call) Run(run func(ctx context.Context, className string, shardName string, id strfmt.UUID)) *MockReplicator_FetchObject_Call

func (*MockReplicator_FetchObject_Call) RunAndReturn

type MockReplicator_FetchObjects_Call

type MockReplicator_FetchObjects_Call struct {
	*mock.Call
}

MockReplicator_FetchObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchObjects'

func (*MockReplicator_FetchObjects_Call) Return

func (*MockReplicator_FetchObjects_Call) Run

func (_c *MockReplicator_FetchObjects_Call) Run(run func(ctx context.Context, className string, shardName string, ids []strfmt.UUID)) *MockReplicator_FetchObjects_Call

func (*MockReplicator_FetchObjects_Call) RunAndReturn

type MockReplicator_HashTreeLevel_Call

type MockReplicator_HashTreeLevel_Call struct {
	*mock.Call
}

MockReplicator_HashTreeLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeLevel'

func (*MockReplicator_HashTreeLevel_Call) Return

func (*MockReplicator_HashTreeLevel_Call) Run

func (_c *MockReplicator_HashTreeLevel_Call) Run(run func(ctx context.Context, className string, shardName string, level int, discriminant *hashtree.Bitset)) *MockReplicator_HashTreeLevel_Call

func (*MockReplicator_HashTreeLevel_Call) RunAndReturn

type MockReplicator_OverwriteObjects_Call

type MockReplicator_OverwriteObjects_Call struct {
	*mock.Call
}

MockReplicator_OverwriteObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OverwriteObjects'

func (*MockReplicator_OverwriteObjects_Call) Return

func (*MockReplicator_OverwriteObjects_Call) Run

func (*MockReplicator_OverwriteObjects_Call) RunAndReturn

type MockReplicator_ReplicateDeletion_Call

type MockReplicator_ReplicateDeletion_Call struct {
	*mock.Call
}

MockReplicator_ReplicateDeletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateDeletion'

func (*MockReplicator_ReplicateDeletion_Call) Return

func (*MockReplicator_ReplicateDeletion_Call) Run

func (_c *MockReplicator_ReplicateDeletion_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, uuid strfmt.UUID, deletionTime time.Time, schemaVersion uint64)) *MockReplicator_ReplicateDeletion_Call

type MockReplicator_ReplicateDeletions_Call

type MockReplicator_ReplicateDeletions_Call struct {
	*mock.Call
}

MockReplicator_ReplicateDeletions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateDeletions'

func (*MockReplicator_ReplicateDeletions_Call) Return

func (*MockReplicator_ReplicateDeletions_Call) Run

func (_c *MockReplicator_ReplicateDeletions_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, uuids []strfmt.UUID, deletionTime time.Time, dryRun bool, schemaVersion uint64)) *MockReplicator_ReplicateDeletions_Call

type MockReplicator_ReplicateObject_Call

type MockReplicator_ReplicateObject_Call struct {
	*mock.Call
}

MockReplicator_ReplicateObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateObject'

func (*MockReplicator_ReplicateObject_Call) Return

func (*MockReplicator_ReplicateObject_Call) Run

func (_c *MockReplicator_ReplicateObject_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, object *storobj.Object, schemaVersion uint64)) *MockReplicator_ReplicateObject_Call

type MockReplicator_ReplicateObjects_Call

type MockReplicator_ReplicateObjects_Call struct {
	*mock.Call
}

MockReplicator_ReplicateObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateObjects'

func (*MockReplicator_ReplicateObjects_Call) Return

func (*MockReplicator_ReplicateObjects_Call) Run

func (_c *MockReplicator_ReplicateObjects_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, _a4 []*storobj.Object, schemaVersion uint64)) *MockReplicator_ReplicateObjects_Call

type MockReplicator_ReplicateReferences_Call

type MockReplicator_ReplicateReferences_Call struct {
	*mock.Call
}

MockReplicator_ReplicateReferences_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateReferences'

func (*MockReplicator_ReplicateReferences_Call) Return

func (*MockReplicator_ReplicateReferences_Call) Run

func (_c *MockReplicator_ReplicateReferences_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, refs []objects.BatchReference, schemaVersion uint64)) *MockReplicator_ReplicateReferences_Call

type MockReplicator_ReplicateUpdate_Call

type MockReplicator_ReplicateUpdate_Call struct {
	*mock.Call
}

MockReplicator_ReplicateUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicateUpdate'

func (*MockReplicator_ReplicateUpdate_Call) Return

func (*MockReplicator_ReplicateUpdate_Call) Run

func (_c *MockReplicator_ReplicateUpdate_Call) Run(run func(ctx context.Context, className string, shardName string, requestID string, mergeDoc *objects.MergeDocument, schemaVersion uint64)) *MockReplicator_ReplicateUpdate_Call

type Replicator

type Replicator interface {
	// Write endpoints
	ReplicateObject(ctx context.Context, className, shardName, requestID string, object *storobj.Object, schemaVersion uint64) replica.SimpleResponse
	ReplicateObjects(ctx context.Context, className, shardName, requestID string, objects []*storobj.Object, schemaVersion uint64) replica.SimpleResponse
	ReplicateUpdate(ctx context.Context, className, shardName, requestID string, mergeDoc *objects.MergeDocument, schemaVersion uint64) replica.SimpleResponse
	ReplicateDeletion(ctx context.Context, className, shardName, requestID string, uuid strfmt.UUID, deletionTime time.Time, schemaVersion uint64) replica.SimpleResponse
	ReplicateDeletions(ctx context.Context, className, shardName, requestID string, uuids []strfmt.UUID, deletionTime time.Time, dryRun bool, schemaVersion uint64) replica.SimpleResponse
	ReplicateReferences(ctx context.Context, className, shardName, requestID string, refs []objects.BatchReference, schemaVersion uint64) replica.SimpleResponse
	CommitReplication(ctx context.Context, className, shardName, requestID string) any
	AbortReplication(ctx context.Context, className, shardName, requestID string) any
	OverwriteObjects(ctx context.Context, className, shard string, vobjects []*objects.VObject) ([]types.RepairResponse, error)
	// Read endpoints
	FetchObject(ctx context.Context, className, shardName string, id strfmt.UUID) (replica.Replica, error)
	FetchObjects(ctx context.Context, className, shardName string, ids []strfmt.UUID) ([]replica.Replica, error)
	DigestObjects(ctx context.Context, className, shardName string, ids []strfmt.UUID) (result []types.RepairResponse, err error)
	DigestObjectsInRange(ctx context.Context, className, shardName string,
		initialUUID, finalUUID strfmt.UUID, limit int) (result []types.RepairResponse, err error)
	HashTreeLevel(ctx context.Context, className, shardName string,
		level int, discriminant *hashtree.Bitset) (digests []hashtree.Digest, err error)
}

Jump to

Keyboard shortcuts

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