Versions in this module Expand all Collapse all v8 v8.0.1 Nov 11, 2025 v8.0.0 Nov 6, 2025 Changes in this version + const NoPartNumber + const NoUploadID + var ErrExpectedNoUploadID = errors.New("received an unexpected upload id, cloud provider doesn't required upload ids") + var ErrIncludeAndExcludeAreMutuallyExclusive = errors.New("include/exclude are mutually exclusive") + func CopyReadSeeker(dst io.Writer, src io.ReadSeeker) (int64, error) + func SeekerLength(seeker io.Seeker) (int64, error) + func ShouldIgnore(query string, include, exclude []*regexp.Regexp) bool + func TestDownloadJSON(t *testing.T, client Client, key string, data any) + func TestDownloadRAW(t *testing.T, client Client, key string) []byte + func TestListObjects(t *testing.T, client Client, prefix string) []*objval.ObjectAttrs + func TestRequireKeyExists(t *testing.T, client Client, key string) + func TestRequireKeyNotFound(t *testing.T, client Client, key string) + func TestUploadJSON(t *testing.T, client Client, key string, body any) + func TestUploadRAW(t *testing.T, client Client, key string, body []byte) + type AbortMultipartUploadOptions struct + Bucket string + Key string + UploadID string + type AppendToObjectOptions struct + Body io.ReadSeeker + Bucket string + Key string + type Client interface + AbortMultipartUpload func(ctx context.Context, opts AbortMultipartUploadOptions) error + AppendToObject func(ctx context.Context, opts AppendToObjectOptions) (*objval.ObjectAttrs, error) + Close func() error + CompleteMultipartUpload func(ctx context.Context, opts CompleteMultipartUploadOptions) (*objval.ObjectAttrs, error) + CopyObject func(ctx context.Context, opts CopyObjectOptions) (*objval.ObjectAttrs, error) + CreateMultipartUpload func(ctx context.Context, opts CreateMultipartUploadOptions) (string, error) + DeleteDirectory func(ctx context.Context, opts DeleteDirectoryOptions) error + DeleteObjectVersions func(ctx context.Context, opts DeleteObjectVersionsOptions) error + DeleteObjects func(ctx context.Context, opts DeleteObjectsOptions) error + GetBucketLockingStatus func(ctx context.Context, opts GetBucketLockingStatusOptions) (*objval.BucketLockingStatus, error) + GetObject func(ctx context.Context, opts GetObjectOptions) (*objval.Object, error) + GetObjectAttrs func(ctx context.Context, opts GetObjectAttrsOptions) (*objval.ObjectAttrs, error) + IterateObjects func(ctx context.Context, opts IterateObjectsOptions) error + ListParts func(ctx context.Context, opts ListPartsOptions) ([]objval.Part, error) + Provider func() objval.Provider + PutObject func(ctx context.Context, opts PutObjectOptions) (*objval.ObjectAttrs, error) + SetObjectLock func(ctx context.Context, opts SetObjectLockOptions) error + UploadPart func(ctx context.Context, opts UploadPartOptions) (objval.Part, error) + UploadPartCopy func(ctx context.Context, opts UploadPartCopyOptions) (objval.Part, error) + type CompleteMultipartUploadOptions struct + Bucket string + Key string + Lock *ObjectLock + Parts []objval.Part + Precondition OperationPrecondition + UploadID string + type CopyObjectOptions struct + DestinationBucket string + DestinationKey string + SourceBucket string + SourceKey string + type CreateMultipartUploadOptions struct + Bucket string + Key string + Lock *ObjectLock + type DeleteDirectoryOptions struct + Bucket string + Prefix string + Versions bool + type DeleteObjectVersionsOptions struct + Bucket string + Versions []objval.ObjectVersion + type DeleteObjectsOptions struct + Bucket string + Keys []string + type GetBucketLockingStatusOptions struct + Bucket string + type GetObjectAttrsOptions struct + Bucket string + Key string + VersionID string + type GetObjectOptions struct + Bucket string + ByteRange *objval.ByteRange + Key string + VersionID string + type IterateFunc func(attrs *objval.ObjectAttrs) error + type IterateObjectsOptions struct + Bucket string + Delimiter string + Exclude []*regexp.Regexp + Func IterateFunc + Include []*regexp.Regexp + Prefix string + Versions bool + type ListPartsOptions struct + Bucket string + Key string + UploadID string + type MockClient struct + func NewMockClient(t interface{ ... }) *MockClient + func (_m *MockClient) AbortMultipartUpload(ctx context.Context, opts AbortMultipartUploadOptions) error + func (_m *MockClient) AppendToObject(ctx context.Context, opts AppendToObjectOptions) (*objval.ObjectAttrs, error) + func (_m *MockClient) Close() error + func (_m *MockClient) CompleteMultipartUpload(ctx context.Context, opts CompleteMultipartUploadOptions) (*objval.ObjectAttrs, error) + func (_m *MockClient) CopyObject(ctx context.Context, opts CopyObjectOptions) (*objval.ObjectAttrs, error) + func (_m *MockClient) CreateMultipartUpload(ctx context.Context, opts CreateMultipartUploadOptions) (string, error) + func (_m *MockClient) DeleteDirectory(ctx context.Context, opts DeleteDirectoryOptions) error + func (_m *MockClient) DeleteObjectVersions(ctx context.Context, opts DeleteObjectVersionsOptions) error + func (_m *MockClient) DeleteObjects(ctx context.Context, opts DeleteObjectsOptions) error + func (_m *MockClient) GetBucketLockingStatus(ctx context.Context, opts GetBucketLockingStatusOptions) (*objval.BucketLockingStatus, error) + func (_m *MockClient) GetObject(ctx context.Context, opts GetObjectOptions) (*objval.Object, error) + func (_m *MockClient) GetObjectAttrs(ctx context.Context, opts GetObjectAttrsOptions) (*objval.ObjectAttrs, error) + func (_m *MockClient) IterateObjects(ctx context.Context, opts IterateObjectsOptions) error + func (_m *MockClient) ListParts(ctx context.Context, opts ListPartsOptions) ([]objval.Part, error) + func (_m *MockClient) Provider() objval.Provider + func (_m *MockClient) PutObject(ctx context.Context, opts PutObjectOptions) (*objval.ObjectAttrs, error) + func (_m *MockClient) SetObjectLock(ctx context.Context, opts SetObjectLockOptions) error + func (_m *MockClient) UploadPart(ctx context.Context, opts UploadPartOptions) (objval.Part, error) + func (_m *MockClient) UploadPartCopy(ctx context.Context, opts UploadPartCopyOptions) (objval.Part, error) + type ObjectLock struct + Expiration time.Time + Type objval.LockType + func NewComplianceLock(expiration time.Time) *ObjectLock + type OperationPrecondition string + const OperationPreconditionIfMatch + const OperationPreconditionOnlyIfAbsent + type PutObjectOptions struct + Body io.ReadSeeker + Bucket string + Key string + Lock *ObjectLock + Precondition OperationPrecondition + PreconditionData string + type RateLimitedClient struct + func NewRateLimitedClient(c Client, rl *rate.Limiter) *RateLimitedClient + func (r *RateLimitedClient) AbortMultipartUpload(ctx context.Context, opts AbortMultipartUploadOptions) error + func (r *RateLimitedClient) AppendToObject(ctx context.Context, opts AppendToObjectOptions) (*objval.ObjectAttrs, error) + func (r *RateLimitedClient) CompleteMultipartUpload(ctx context.Context, opts CompleteMultipartUploadOptions) (*objval.ObjectAttrs, error) + func (r *RateLimitedClient) CreateMultipartUpload(ctx context.Context, opts CreateMultipartUploadOptions) (string, error) + func (r *RateLimitedClient) DeleteDirectory(ctx context.Context, opts DeleteDirectoryOptions) error + func (r *RateLimitedClient) DeleteObjects(ctx context.Context, opts DeleteObjectsOptions) error + func (r *RateLimitedClient) GetObject(ctx context.Context, opts GetObjectOptions) (*objval.Object, error) + func (r *RateLimitedClient) GetObjectAttrs(ctx context.Context, opts GetObjectAttrsOptions) (*objval.ObjectAttrs, error) + func (r *RateLimitedClient) IterateObjects(ctx context.Context, opts IterateObjectsOptions) error + func (r *RateLimitedClient) ListParts(ctx context.Context, opts ListPartsOptions) ([]objval.Part, error) + func (r *RateLimitedClient) Provider() objval.Provider + func (r *RateLimitedClient) PutObject(ctx context.Context, opts PutObjectOptions) (*objval.ObjectAttrs, error) + func (r *RateLimitedClient) UploadPart(ctx context.Context, opts UploadPartOptions) (objval.Part, error) + func (r *RateLimitedClient) UploadPartCopy(ctx context.Context, opts UploadPartCopyOptions) (objval.Part, error) + type SetObjectLockOptions struct + Bucket string + Key string + Lock *ObjectLock + VersionID string + type TestClient struct + Buckets objval.TestBuckets + TimeProvider timeprovider.TimeProvider + func NewTestClient(t *testing.T, provider objval.Provider) *TestClient + func (t *TestClient) AbortMultipartUpload(_ context.Context, opts AbortMultipartUploadOptions) error + func (t *TestClient) AppendToObject(_ context.Context, opts AppendToObjectOptions) (*objval.ObjectAttrs, error) + func (t *TestClient) Close() error + func (t *TestClient) CompleteMultipartUpload(_ context.Context, opts CompleteMultipartUploadOptions) (*objval.ObjectAttrs, error) + func (t *TestClient) CopyObject(_ context.Context, opts CopyObjectOptions) (*objval.ObjectAttrs, error) + func (t *TestClient) CreateMultipartUpload(_ context.Context, _ CreateMultipartUploadOptions) (string, error) + func (t *TestClient) DeleteDirectory(_ context.Context, opts DeleteDirectoryOptions) error + func (t *TestClient) DeleteObjectVersions(_ context.Context, opts DeleteObjectVersionsOptions) error + func (t *TestClient) DeleteObjects(_ context.Context, opts DeleteObjectsOptions) error + func (t *TestClient) GetBucketLockingStatus(_ context.Context, _ GetBucketLockingStatusOptions) (*objval.BucketLockingStatus, error) + func (t *TestClient) GetObject(_ context.Context, opts GetObjectOptions) (*objval.Object, error) + func (t *TestClient) GetObjectAttrs(_ context.Context, opts GetObjectAttrsOptions) (*objval.ObjectAttrs, error) + func (t *TestClient) IterateObjects(_ context.Context, opts IterateObjectsOptions) error + func (t *TestClient) ListParts(ctx context.Context, opts ListPartsOptions) ([]objval.Part, error) + func (t *TestClient) Provider() objval.Provider + func (t *TestClient) PutObject(_ context.Context, opts PutObjectOptions) (*objval.ObjectAttrs, error) + func (t *TestClient) SetObjectLock(_ context.Context, opts SetObjectLockOptions) error + func (t *TestClient) UploadPart(_ context.Context, opts UploadPartOptions) (objval.Part, error) + func (t *TestClient) UploadPartCopy(_ context.Context, opts UploadPartCopyOptions) (objval.Part, error) + type UploadPartCopyOptions struct + ByteRange *objval.ByteRange + DestinationBucket string + DestinationKey string + Number int + SourceBucket string + SourceKey string + UploadID string + type UploadPartOptions struct + Body io.ReadSeeker + Bucket string + Key string + Lock *ObjectLock + Number int + Precondition OperationPrecondition + UploadID string Other modules containing this package github.com/couchbase/tools-common/cloud github.com/couchbase/tools-common/cloud/v2 github.com/couchbase/tools-common/cloud/v3 github.com/couchbase/tools-common/cloud/v4 github.com/couchbase/tools-common/cloud/v5 github.com/couchbase/tools-common/cloud/v6 github.com/couchbase/tools-common/cloud/v7