storage

package
v0.0.0-...-9af805d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppStorageDriverContextVar = "app.storage"
)

Variables

View Source
var (
	// ErrBlobExists returned when blob already exists
	ErrBlobExists = errors.New("blob exists")

	// ErrBlobUnknown when blob is not found.
	ErrBlobUnknown = errors.New("unknown blob")
)

Functions

This section is empty.

Types

type Blob

type Blob []byte

type Descriptor

type Descriptor struct {
	// Digest uniquely identifies the content. A byte stream can be verified
	// against against this digest.
	Digest digest.Digest `json:"digest,omitempty"`

	// Size in bytes of content.
	Size int64 `json:"size,omitempty"`
}

type Key

type Key string

type StorageDriver

type StorageDriver interface {
	Name() string
	Has(digest.Digest) (bool, error)
	Stat(digest.Digest) (Descriptor, error)
	Read(digest.Digest) (Blob, error)
	Reader(digest.Digest) (io.ReadCloser, error)
	Write(Blob) (digest.Digest, error)
	Delete(digest.Digest) error
	Iterate(handler func(Key, Blob) (bool, error)) error
	Close() error
}

type StorageDriverParameters

type StorageDriverParameters map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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