storage

package
v0.0.0-...-677f350 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirStorage

func NewDirStorage(dir string) (*dirStorage, error)

func NewS3Storage

func NewS3Storage(config *aws.Config, bucket string) (*s3Storage, error)

Types

type ErrObjectAlreadyExists

type ErrObjectAlreadyExists struct {
	Key string
}

func (*ErrObjectAlreadyExists) Error

func (e *ErrObjectAlreadyExists) Error() string

type Storage

type Storage interface {
	Upload(ctx context.Context, path string, reader io.ReadSeeker) error
	Download(ctx context.Context, path string) (io.ReadCloser, error)
	Delete(ctx context.Context, path string) error
	Close() error
}

Jump to

Keyboard shortcuts

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