storage

package
v0.0.0-...-07dc153 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystemStorage

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

func NewFileSystemStorage

func NewFileSystemStorage(root string, perm os.FileMode) *FileSystemStorage

func (*FileSystemStorage) Download

func (s *FileSystemStorage) Download(w io.Writer, path string) (err error)

func (*FileSystemStorage) Upload

func (s *FileSystemStorage) Upload(path string, body io.ReadSeeker) (err error)

type S3Storage

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

func NewS3Storage

func NewS3Storage(client *s3.S3, bucket, root string) *S3Storage

func (*S3Storage) Download

func (s *S3Storage) Download(w io.Writer, path string) (err error)

func (*S3Storage) Upload

func (s *S3Storage) Upload(path string, body io.ReadSeeker) error

type Storage

type Storage interface {
	Upload(path string, body io.ReadSeeker) error
	Download(w io.Writer, path string) error
}

Jump to

Keyboard shortcuts

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