Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2015 Changes in this version + const Config + const Data + const IDSize + const Index + const Key + const Lock + const MinPrefixLength + const Snapshot + var ErrMultipleIDMatches = errors.New("multiple IDs with prefix found") + var ErrNoIDPrefixFound = errors.New("no ID found") + var Modes = struct{ ... } + var Paths = struct{ ... } + func Find(be Lister, t Type, prefix string) (string, error) + func LimitReadCloser(r io.ReadCloser, n int64) *blobReader + func PrefixLength(be Lister, t Type) (int, error) + type Backend interface + Close func() error + Create func() (Blob, error) + Get func(t Type, name string) (io.ReadCloser, error) + GetReader func(t Type, name string, offset, length uint) (io.ReadCloser, error) + Location func() string + Remove func(t Type, name string) error + Test func(t Type, name string) (bool, error) + type Blob interface + Finalize func(t Type, name string) error + Size func() uint + type Deleter interface + Delete func() error + type HashAppendReader struct + func NewHashAppendReader(r io.Reader, h hash.Hash) *HashAppendReader + func (h *HashAppendReader) Read(p []byte) (n int, err error) + type HashAppendWriter struct + func NewHashAppendWriter(w io.Writer, h hash.Hash) *HashAppendWriter + func (h *HashAppendWriter) Close() error + func (h *HashAppendWriter) Write(p []byte) (n int, err error) + type HashingReader struct + func NewHashingReader(r io.Reader, h hash.Hash) *HashingReader + func (h *HashingReader) Read(p []byte) (int, error) + func (h *HashingReader) Sum(d []byte) []byte + type HashingWriter struct + func NewHashingWriter(w io.Writer, h hash.Hash) *HashingWriter + func (h *HashingWriter) Size() int + func (h *HashingWriter) Sum(d []byte) []byte + func (h *HashingWriter) Write(p []byte) (int, error) + type ID [IDSize]byte + func Hash(data []byte) ID + func IDFromData(d []byte) ID + func ParseID(s string) (ID, error) + func (id *ID) Str() string + func (id *ID) UnmarshalJSON(b []byte) error + func (id ID) Compare(other ID) int + func (id ID) Equal(other ID) bool + func (id ID) EqualString(other string) (bool, error) + func (id ID) IsNull() bool + func (id ID) MarshalJSON() ([]byte, error) + func (id ID) String() string + type IDs []ID + func (ids IDs) Len() int + func (ids IDs) Less(i, j int) bool + func (ids IDs) Swap(i, j int) + type Lister interface + List func(t Type, done <-chan struct{}) <-chan string + type Type string