storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Filesystem         config.StorageDriver = "fs"
	GoogleCloudStorage config.StorageDriver = "gcs"
	AmazonS3           config.StorageDriver = "s3"
)

Variables

View Source
var ErrNotExist = errors.New("file does not exist")

ErrNotExist is a sentinel error returned by the Open and the Stat methods.

Functions

This section is empty.

Types

type Stat

type Stat struct {
	ModifiedTime time.Time
	Size         int64
}

Stat contains metadata about content stored in storage.

type Storage

type Storage interface {
	Save(ctx context.Context, content io.Reader, path string) error
	Stat(ctx context.Context, path string) (*Stat, error)
	Open(ctx context.Context, path string) (io.ReadCloser, error)
	Delete(ctx context.Context, path string) error
}

Storage is the storage interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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