s3

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 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(o NewOptions) *Client

NewClient returns a new S3 client.

func (*Client) Download added in v0.12.0

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

Download downloads the data from a S3 object.

func (*Client) ListObjectsPages added in v0.12.0

func (c *Client) ListObjectsPages(
	prefix string,
	f func(page *s3.ListObjectsOutput, lastPage bool) bool,
) error

ListObjectsPages returns S3 objects with pagination.

func (*Client) Upload

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

Upload uploads the data that buf contains to a S3 object.

type NewOptions added in v0.12.0

type NewOptions struct {
	EndpointURL string
	Region      string
	Bucket      string

	UseAnonymousCredentials bool
}

NewOptions is the options for NewClient.

Jump to

Keyboard shortcuts

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