s3

package
v2.0.0-...-0bcb6b4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 15 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
}

func New

func New(log *log.Logger, bucket string, regionHint string) (*Client, error)

func (*Client) Bucket

func (c *Client) Bucket() string

func (*Client) BucketExists

func (c *Client) BucketExists() (bool, error)

BucketExists returns whether the bucket exists. 200 OK returns true without error. 404 Not Found and 403 Forbidden return false without error. Other errors result in false with an error.

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

Get downloads an object from S3. Intended for small files; object is fully read into memory. sentinel.ErrNotFound and sentinel.ErrForbidden are returned for those cases. Other errors are returned verbatim.

func (*Client) Region

func (c *Client) Region() string

Jump to

Keyboard shortcuts

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