data

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendFile

type BackendFile struct {
	backend.Backend
	backend.FileInfo
}

type FileRepo

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

func NewFileRepo

func NewFileRepo(db *postgres.DB, backends []backend.Backend, defaultBackend string) *FileRepo

func NewFileRepoFromEnv

func NewFileRepoFromEnv(db *postgres.DB) (*FileRepo, error)

func (*FileRepo) Copy

func (r *FileRepo) Copy(to, from string) error

func (*FileRepo) DefaultBackend

func (r *FileRepo) DefaultBackend() backend.Backend

func (*FileRepo) Delete

func (r *FileRepo) Delete(name string) error

func (*FileRepo) Get

func (r *FileRepo) Get(name string, body bool) (*backend.File, error)

Get is like Open, except the FileStream is not populated (useful for HEAD requests)

func (*FileRepo) List

func (r *FileRepo) List(dir string) ([]string, error)

func (*FileRepo) ListFilesExcludingDefaultBackend

func (r *FileRepo) ListFilesExcludingDefaultBackend(prefix string) ([]BackendFile, error)

func (*FileRepo) Put

func (r *FileRepo) Put(name string, data io.Reader, offset int64, typ string) error

func (*FileRepo) SetBackend

func (f *FileRepo) SetBackend(tx *postgres.DBTx, id, name string) error

Jump to

Keyboard shortcuts

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