backends

package
v2.1.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadMetadata = errors.New("Corrupted metadata.")
View Source
var FileEmptyError = errors.New("Empty file")
View Source
var NotFoundErr = errors.New("File not found.")

Functions

This section is empty.

Types

type MetaStorageBackend added in v1.2.8

type MetaStorageBackend interface {
	StorageBackend
	List() ([]string, error)
}

type Metadata added in v1.2.8

type Metadata struct {
	DeleteKey    string
	Sha256sum    string
	Mimetype     string
	Size         int64
	Expiry       time.Time
	ArchiveFiles []string
}

type StorageBackend

type StorageBackend interface {
	Delete(key string) error
	Exists(key string) (bool, error)
	Head(key string) (Metadata, error)
	Get(key string) (Metadata, io.ReadCloser, error)
	Put(key string, r io.Reader, expiry time.Time, deleteKey string) (Metadata, error)
	PutMetadata(key string, m Metadata) error
	Size(key string) (int64, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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