s3

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 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(c config.S3Config) *Client

NewClient returns a new S3 client.

func (*Client) GeneratePresignedURL added in v0.3.0

func (c *Client) GeneratePresignedURL(key string, expire time.Duration, requestType RequestType) (string, error)

GeneratePresignedURL generates a pre-signed URL.

func (*Client) ListObjectsPages added in v0.22.0

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

ListObjectsPages returns S3 objects with pagination.

type RequestType added in v0.32.0

type RequestType string

RequestType is the type of the request.

const (
	// RequestTypeGetObject is the type for getting an object.
	RequestTypeGetObject RequestType = "GetObject"
	// RequestTypePutObject is the type for putting an object.
	RequestTypePutObject RequestType = "PutObject"
)

Jump to

Keyboard shortcuts

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