meta

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationCostService

type MigrationCostService interface {
	GetMigrationCosts(ctx context.Context, from, to string) (MigrationCosts, error)
	MigrationCostsDelete(ctx context.Context, from, to string) error
	MigrationCostsStart(ctx context.Context, from, to string) error
	MigrationCostsIncBucket(ctx context.Context, from, to string) error
	MigrationCostsIncObj(ctx context.Context, from, to string) error
	MigrationCostsIncSize(ctx context.Context, from, to string, size int64) error
	MigrationCostsLastObjSet(ctx context.Context, from, to, bucket, prefix, object string) error
	MigrationCostsLastObjGet(ctx context.Context, from, to, bucket, prefix string) (string, error)
	MigrationCostsIncJob(ctx context.Context, from, to string) error
	MigrationCostsIncJobDone(ctx context.Context, from, to string) error
}

func NewMigrationCostService

func NewMigrationCostService(client *redis.Client) MigrationCostService

type MigrationCosts

type MigrationCosts interface {
	Done() bool
	BucketsNum() int64
	ObjectsNum() int64
	ObjectsSize() int64
	StartedAt() *time.Time

	String() string
}

type VersionService

type VersionService interface {
	// GetObj returns object content versions in s3 storages
	GetObj(ctx context.Context, obj dom.Object) (map[string]int64, error)
	// IncrementObj increments object content version in given storage
	IncrementObj(ctx context.Context, obj dom.Object, storage string) (int64, error)
	// UpdateIfGreater updates object content version in given storage if it is greater than previous value
	UpdateIfGreater(ctx context.Context, obj dom.Object, storage string, version int64) error
	// DeleteObjAll deletes all obj meta for all storages
	DeleteObjAll(ctx context.Context, obj dom.Object) error
	// DeleteBucketMeta deletes meta of bucket objects for given storage.
	DeleteBucketMeta(ctx context.Context, storage, bucket string) error

	// GetACL returns object ACL versions in s3 storages
	GetACL(ctx context.Context, obj dom.Object) (map[string]int64, error)
	// IncrementACL increments object ACL version in given storage
	IncrementACL(ctx context.Context, obj dom.Object, storage string) (int64, error)
	// UpdateACLIfGreater updates object ACL version in given storage if it is greater than previous value
	UpdateACLIfGreater(ctx context.Context, obj dom.Object, storage string, version int64) error

	// GetTags returns object Tagging versions in s3 storages
	GetTags(ctx context.Context, obj dom.Object) (map[string]int64, error)
	// IncrementTags increments object Tagging version in given storage
	IncrementTags(ctx context.Context, obj dom.Object, storage string) (int64, error)
	// UpdateTagsIfGreater updates object Tagging version in given storage if it is greater than previous value
	UpdateTagsIfGreater(ctx context.Context, obj dom.Object, storage string, version int64) error

	// GetBucket returns bucket content versions in s3 storages
	GetBucket(ctx context.Context, bucket string) (map[string]int64, error)
	// IncrementBucket increments bucket content version in given storage
	IncrementBucket(ctx context.Context, bucket string, storage string) (int64, error)
	// UpdateBucketIfGreater updates bucket content version in given storage if it is greater than previous value
	UpdateBucketIfGreater(ctx context.Context, bucket string, storage string, version int64) error
	// DeleteBucketAll deletes all bucket meta for all storages
	DeleteBucketAll(ctx context.Context, bucket string) error

	// GetBucketACL returns bucket ACL versions in s3 storages
	GetBucketACL(ctx context.Context, bucket string) (map[string]int64, error)
	// IncrementBucketACL increments bucket ACL version in given storage
	IncrementBucketACL(ctx context.Context, bucket string, storage string) (int64, error)
	// UpdateBucketACLIfGreater updates bucket ACL version in given storage if it is greater than previous value
	UpdateBucketACLIfGreater(ctx context.Context, bucket string, storage string, version int64) error

	// GetBucketTags returns bucket Tagging versions in s3 storages
	GetBucketTags(ctx context.Context, bucket string) (map[string]int64, error)
	// IncrementBucketTags increments bucket Tagging version in given storage
	IncrementBucketTags(ctx context.Context, bucket string, storage string) (int64, error)
	// UpdateBucketTagsIfGreater updates bucket Tagging version in given storage if it is greater than previous value
	UpdateBucketTagsIfGreater(ctx context.Context, bucket string, storage string, version int64) error
}

func NewVersionService

func NewVersionService(client redis.UniversalClient) VersionService

Jump to

Keyboard shortcuts

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