copy

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CChorusSourceVersionIDMetaHeader = "x-amz-meta-chorus-source-version-id"

	CRGWVersionMigrationQueryParam = "rgwx-version-id"
)

TODO: swift client metrics

Variables

This section is empty.

Functions

func MapOwnersACL

func MapOwnersACL(srcOwner *awss3.Owner, srcGrants []*awss3.Grant, dstOwner *string, preserveACLGrants bool) *awss3.AccessControlPolicy

Types

type Bucket

type Bucket struct {
	Storage string
	Bucket  string
}

func NewBucket

func NewBucket(storage string, bucket string) Bucket

type CopySvc

type CopySvc interface {
	GetVersionInfo(ctx context.Context, user string, to File) ([]entity.ObjectVersionInfo, error)
	DeleteDestinationObject(ctx context.Context, user string, to File) error
	GetLastMigratedVersionInfo(ctx context.Context, user string, to File) (entity.ObjectVersionInfo, error)
	CopyObject(ctx context.Context, user string, from File, to File) error
	CopyACLs(ctx context.Context, user string, from File, to File) error
}

type File

type File struct {
	Storage string
	Bucket  string
	Name    string
	Version string
}

func NewFile

func NewFile(storage string, bucket string, name string) File

func NewVersionedFile

func NewVersionedFile(storage string, bucket string, name string, version string) File

type ObjectInfo

type ObjectInfo struct {
	LastModified time.Time
	Key          string
	VersionID    string
	Etag         string
	StorageClass string
	Size         uint64
}

type S3CopySvc

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

func NewS3CopySvc

func NewS3CopySvc(credsSvc objstore.CredsService, clientRegistry objstore.Clients, metricsSvc metrics.WorkerService) *S3CopySvc

func (*S3CopySvc) CopyACLs

func (r *S3CopySvc) CopyACLs(ctx context.Context, user string, from File, to File) error

func (*S3CopySvc) CopyObject

func (r *S3CopySvc) CopyObject(ctx context.Context, user string, from File, to File) error

func (*S3CopySvc) DeleteDestinationObject

func (r *S3CopySvc) DeleteDestinationObject(ctx context.Context, user string, to File) error

func (*S3CopySvc) GetLastMigratedVersionInfo

func (r *S3CopySvc) GetLastMigratedVersionInfo(ctx context.Context, user string, to File) (entity.ObjectVersionInfo, error)

func (*S3CopySvc) GetVersionInfo

func (r *S3CopySvc) GetVersionInfo(ctx context.Context, user string, to File) ([]entity.ObjectVersionInfo, error)

Jump to

Keyboard shortcuts

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