s3

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 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 Client

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

Client is a client for S3.

func NewClient

func NewClient(ctx context.Context, o laws.NewS3ClientOptions, bucket string) (*Client, error)

NewClient returns a new S3 client.

func (*Client) Download

func (c *Client) Download(ctx context.Context, w io.WriterAt, key string) error

Download uses a download manager to download an object from a bucket. The download manager gets the data in parts and writes them to a buffer until all of the data has been downloaded.

func (*Client) ListObjectsPages

func (c *Client) ListObjectsPages(
	ctx context.Context,
	prefix string,
	f func(page *s3.ListObjectsV2Output, lastPage bool) bool,
) error

ListObjectsPages returns S3 objects with pagination.

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, r io.Reader, key string) error

Upload uses an upload manager to upload a file to an object in a bucket. The upload manager breaks large file into parts and uploads the parts concurrently.

Jump to

Keyboard shortcuts

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