s3

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint string `yaml:"endpoint"`
	Bucket   string `yaml:"bucket"`
	Region   string `yaml:"region"`

	ID    string `yaml:"id"`
	Key   string `yaml:"key"`
	Token string `yaml:"token"`
}

Config is configuration related to storage in S3

type Store

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

Store allows you to access your files in an S3 bucket

func NewStore

func NewStore(config Config) (*Store, error)

NewStore creates a new Store for you

func (*Store) GetByKey

func (s *Store) GetByKey(key string) (io.Reader, error)

GetByKey retrieves the data at a certain location in your bucket

func (*Store) Save

func (s *Store) Save(key string, data io.Reader) error

Save puts the data at a location in your bucket

Jump to

Keyboard shortcuts

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