s3

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3Backend

func NewS3Backend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewS3Backend constructs a S3 backend using a pre-existing bucket. Credentials can be provided to the backend, sourced from the environment, AWS credential files or by IAM role.

Types

type S3Backend

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

S3Backend is a physical backend that stores data within an S3 bucket.

func (*S3Backend) Delete

func (s *S3Backend) Delete(ctx context.Context, key string) error

Delete is used to permanently delete an entry

func (*S3Backend) Get

func (s *S3Backend) Get(ctx context.Context, key string) (*physical.Entry, error)

Get is used to fetch an entry

func (*S3Backend) List

func (s *S3Backend) List(ctx context.Context, prefix string) ([]string, error)

List is used to list all the keys under a given prefix, up to the next prefix.

func (*S3Backend) Put

func (s *S3Backend) Put(ctx context.Context, entry *physical.Entry) error

Put is used to insert or update an entry

Jump to

Keyboard shortcuts

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