backend

package
v0.0.0-...-1d4c075 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("file not found")

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Name() string
	Open(tx *postgres.DBTx, info FileInfo, txControl bool) (FileStream, error)
	Put(tx *postgres.DBTx, info FileInfo, r io.Reader, append bool) error
	Copy(tx *postgres.DBTx, dst, src FileInfo) error
	Delete(tx *postgres.DBTx, info FileInfo) error
}
var Postgres Backend = pg{}

func NewS3

func NewS3(name string, info map[string]string) (Backend, error)

type File

type File struct {
	FileStream
	FileInfo
}

type FileInfo

type FileInfo struct {
	ID         string
	Name       string
	Size       int64
	ETag       string
	Type       string
	Oid        *pgx.Oid
	ExternalID string
	ModTime    time.Time
}

type FileStream

type FileStream interface {
	io.ReadSeeker
	io.Closer
}

type Redirector

type Redirector interface {
	RedirectURL() string
}

Jump to

Keyboard shortcuts

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