Versions in this module Expand all Collapse all v3 v3.0.0 Jan 4, 2024 Changes in this version + const MPUThreshold + const MaxUploadParts + const MinPartSize + var ErrCopyToSamePrefix = errors.New("copying to the same prefix within a bucket is not supported") + var ErrMPUploaderAlreadyStopped = errors.New("upload has already been stopped") + var ErrMPUploaderExceededMaxPartCount = errors.New("exceeded maximum number of upload parts") + func CompressObjects(opts CompressObjectsOptions) error + func CopyObject(opts CopyObjectOptions) error + func CopyObjects(opts CopyObjectsOptions) error + func Download(opts DownloadOptions) error + func PrefixExists(opts PrefixExistsOptions) (bool, error) + func Sync(opts SyncOptions) error + func Upload(opts UploadOptions) error + type ChunkReader struct + func NewChunkReader(reader ioiface.ReadAtSeeker, size int64) ChunkReader + func (c ChunkReader) ForEach(fn func(chunk *io.SectionReader) error) error + type CloudOrFileURL struct + Bucket string + Path string + Provider objval.Provider + func ParseCloudOrFileURL(argument string) (*CloudOrFileURL, error) + func (u *CloudOrFileURL) Join(args ...string) *CloudOrFileURL + func (u *CloudOrFileURL) String() string + type CompressObjectsOptions struct + Client objcli.Client + Delimiter string + Destination string + DestinationBucket string + Exclude []*regexp.Regexp + Include []*regexp.Regexp + Logger *slog.Logger + PartCompleteCallback PartCompleteFunc + PartUploadWorkers int + Prefix string + ProgressReportCallback ProgressReportFunc + SourceBucket string + type CopyObjectOptions struct + Client objcli.Client + DestinationBucket string + DestinationKey string + SourceBucket string + SourceKey string + type CopyObjectsOptions struct + Client objcli.Client + DestinationBucket string + DestinationPrefix string + Logger *slog.Logger + SourceBucket string + SourceDelimiter string + SourceExclude []*regexp.Regexp + SourceInclude []*regexp.Regexp + SourcePrefix string + type DownloadOptions struct + Bucket string + ByteRange *objval.ByteRange + Client objcli.Client + Key string + Writer io.WriterAt + type ErrInvalidCloudPath struct + func (e *ErrInvalidCloudPath) Error() string + type MPDownloader struct + func NewMPDownloader(opts MPDownloaderOptions) *MPDownloader + func (m *MPDownloader) Download() error + type MPDownloaderOptions struct + Bucket string + ByteRange *objval.ByteRange + Client objcli.Client + Key string + Writer io.WriterAt + type MPUploader struct + func NewMPUploader(opts MPUploaderOptions) (*MPUploader, error) + func (m *MPUploader) Abort() error + func (m *MPUploader) Commit() error + func (m *MPUploader) Stop() error + func (m *MPUploader) Upload(body io.ReadSeeker) error + func (m *MPUploader) UploadID() string + func (m *MPUploader) UploadWithMeta(metadata any, body io.ReadSeeker) error + type MPUploaderOptions struct + Bucket string + Client objcli.Client + ID string + Key string + OnPartComplete OnPartCompleteFunc + Parts []objval.Part + type OnPartCompleteFunc func(metadata any, part objval.Part) error + type Options struct + Context context.Context + PartSize int64 + func (o Options) WithContext(ctx context.Context) Options + type PartCompleteFunc func(size int) + type PrefixExistsOptions struct + Bucket string + Client objcli.Client + Context context.Context + Prefix string + type ProgressReportFunc func(progress float64) + type SyncOptions struct + Client objcli.Client + Destination string + Limiter *rate.Limiter + Logger *slog.Logger + MPUThreshold int64 + Source string + type Syncer struct + func NewSyncer(opts SyncOptions) *Syncer + func (s *Syncer) Download(source, destination *CloudOrFileURL) error + func (s *Syncer) Upload(source, destination *CloudOrFileURL) error + type UploadOptions struct + Body ioiface.ReadAtSeeker + Bucket string + Client objcli.Client + Key string + MPUThreshold int64 Other modules containing this package github.com/couchbase/tools-common/cloud github.com/couchbase/tools-common/cloud/v2 github.com/couchbase/tools-common/cloud/v4 github.com/couchbase/tools-common/cloud/v5