s3

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s3c aws.S3ObjectClient, bucket string, opts ...Options) (store.Store, error)

Types

type Options added in v0.3.1

type Options func(*Store) error

func WithKeyPrefix added in v0.3.1

func WithKeyPrefix(prefix string) Options

WithKeyPrefix sets the key prefix for the store.

type Store added in v0.3.1

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

Store is a store that uses S3 as the underlying storage.

func (*Store) Copy added in v0.5.0

func (s *Store) Copy(ctx context.Context, srcKey, dstKey string) error

Copy copies an object from one key to another

func (*Store) Delete added in v0.5.0

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

func (*Store) Load added in v0.3.1

func (s *Store) Load(ctx context.Context, key string) (io.ReadCloser, *store.Headers, error)

Load loads the data from the S3 bucket It is the responsibility of the caller to close the returned reader

func (*Store) Store added in v0.3.1

func (s *Store) Store(ctx context.Context, key string, reader io.Reader, headers *store.Headers) error

Store stores the data in the S3 bucket

Jump to

Keyboard shortcuts

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