s3

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	AwsConfig *aws.Config `inject:""`
	Bucket    string      `inject:"AwsS3Bucket"`
	// contains filtered or unexported fields
}

Storage struct provides sss.Storage functionality on top of AWS S3

func (*Storage) Delete

func (st *Storage) Delete(ctx context.Context, key string) error

Delete allows to delete a value by key. Will return errors.ErrNotExist if the key is not found

func (*Storage) Get

func (st *Storage) Get(ctx context.Context, key string) (io.ReadCloser, error)

Get receives value by its key

func (*Storage) Init

func (st *Storage) Init(_ context.Context) error

Init creates new S3 session to connect to S3

func (*Storage) List

func (st *Storage) List(ctx context.Context, path string) ([]string, error)

List returns a list of keys and sub-paths (part of an existing path which is a path itself), which have the prefix of the path argument

func (*Storage) Put

func (st *Storage) Put(ctx context.Context, key string, r io.Reader) error

Put allows to store value represented by reader r by the key

Jump to

Keyboard shortcuts

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