filesystem

package
v0.0.0-...-100be9c Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudStorage

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

func NewCloudStorage

func NewCloudStorage(bucket string, logger log.Logger, ctx context.Context) *CloudStorage

func (*CloudStorage) Delete

func (fs *CloudStorage) Delete(fileName string) error

func (*CloudStorage) Exists

func (fs *CloudStorage) Exists(filename string) bool

func (*CloudStorage) Get

func (fs *CloudStorage) Get(filename string) ([]byte, error)

func (*CloudStorage) Put

func (fs *CloudStorage) Put(filename, filetype string, content []byte) error

type File

type File interface {
	Size() int64
}

type Filesystem

type Filesystem interface {
	Delete(string) error
	//Get(string) (io.ReadCloser, error)
	//Put(filename, filetype string, content io.Reader) error
	Get(string) ([]byte, error)
	Put(filename, filetype string, content []byte) error
	Exists(string) bool
}

func NewS3FS

func NewS3FS(region, bucket string) Filesystem

type S3FS

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

func (*S3FS) Delete

func (fs *S3FS) Delete(filename string) error

func (*S3FS) Exists

func (fs *S3FS) Exists(filename string) bool

func (*S3FS) Get

func (fs *S3FS) Get(filename string) ([]byte, error)

func (*S3FS) Put

func (fs *S3FS) Put(filename, filetype string, content []byte) error

Jump to

Keyboard shortcuts

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