s3

package
v0.0.0-...-4f898de Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

A Store that can write and read documents from S3.

func New

func New(bucket, root string) (Store, error)

New returns a new S3 Store and checks that the given bucket exists. It will use the root as a prefix for all objects created.

func (Store) ListDir

func (s Store) ListDir(path string) ([]string, error)

ListDir returns a listing of all objects that exist with a given prefix.

func (Store) ReadFile

func (s Store) ReadFile(path string) ([]byte, error)

ReadFile reads the content from an existing s3 object.

func (Store) RemoveFile

func (s Store) RemoveFile(path string) error

RemoveFile removes an existing object from s3.

func (Store) WriteFile

func (s Store) WriteFile(path string, content []byte) error

WriteFile creates or overwrites an object in s3 at the given path with the given content.

Jump to

Keyboard shortcuts

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