s3

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransferClient

type TransferClient interface {
	DownloadObject(ctx context.Context, input *transfermanager.DownloadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.DownloadObjectOutput, error)
}

TransferClient abstracts S3 downloads. DownloadObject uses the transfer manager's io.WriterAt path for parallel byte-range downloads.

func DefaultTransferClientFactory

func DefaultTransferClientFactory(ctx context.Context, region string) (TransferClient, error)

DefaultTransferClientFactory creates a transfer manager backed by a real S3 service client.

type TransferClientFactory

type TransferClientFactory func(ctx context.Context, region string) (TransferClient, error)

TransferClientFactory builds a TransferClient for a given region.

type Uploader

type Uploader interface {
	UploadObject(ctx context.Context, input *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.UploadObjectOutput, error)
}

Uploader abstracts the transfermanager upload call for testing.

func DefaultUploaderFactory

func DefaultUploaderFactory(ctx context.Context, region string) (Uploader, error)

DefaultUploaderFactory creates a transfermanager.Client backed by a real S3 client.

type UploaderFactory

type UploaderFactory func(ctx context.Context, region string) (Uploader, error)

UploaderFactory builds an Uploader for a given region.

type WriteAtBuffer

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

WriteAtBuffer is a goroutine-safe in-memory io.WriterAt, used for downloading small S3 objects (e.g. latest.txt) via DownloadObject.

func (*WriteAtBuffer) Bytes

func (w *WriteAtBuffer) Bytes() []byte

func (*WriteAtBuffer) WriteAt

func (w *WriteAtBuffer) WriteAt(p []byte, off int64) (int, error)

Jump to

Keyboard shortcuts

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