s3

package
v0.2.2-0...-86e9763 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-3.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 FileSystem

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

FileSystem is an abstraction over an s3 bucket which allows for the creation, opening and removal of objects.

func New

func New(bucket string, config *aws.Config) (*FileSystem, error)

New creates a new aws session and s3 client.

func (*FileSystem) Create

func (fs *FileSystem) Create(ctx context.Context, name string, r io.Reader) error

Create writes r to the named s3 bucket/object.

func (*FileSystem) Open

func (fs *FileSystem) Open(ctx context.Context, name string) (filesystem.Reader, error)

Open gets the object with the specified key, name.

func (*FileSystem) Remove

func (fs *FileSystem) Remove(ctx context.Context, name string) error

Remove removes the s3 object specified with key, name, from the bucket.

Jump to

Keyboard shortcuts

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