Versions in this module Expand all Collapse all v0 v0.0.0 Oct 28, 2024 Changes in this version + var ErrDataInconsistent = errors.New("data consistency check failed") + var ErrTooLarge = errors.New("payload too large") + var ErrTooSmall = errors.New("payload too small") + type Blobstore interface + Get func(ctx context.Context, digest multihash.Multihash, opts ...GetOption) (Object, error) + Put func(ctx context.Context, digest multihash.Multihash, size uint64, body io.Reader) error + type FileObject struct + func (o FileObject) Body() io.Reader + func (o FileObject) Size() int64 + type FileSystemer interface + FileSystem func() http.FileSystem + type FsBlobstore struct + func NewFsBlobstore(rootdir string, tmpdir string) (*FsBlobstore, error) + func (b *FsBlobstore) FileSystem() http.FileSystem + func (b *FsBlobstore) Get(ctx context.Context, digest multihash.Multihash, opts ...GetOption) (Object, error) + func (b *FsBlobstore) Put(ctx context.Context, digest multihash.Multihash, size uint64, body io.Reader) error + type GetOption func(cfg *options) error + func WithRange(byteRange Range) GetOption + type MapBlobstore struct + func NewMapBlobstore() *MapBlobstore + func (mb *MapBlobstore) FileSystem() http.FileSystem + func (mb *MapBlobstore) Get(ctx context.Context, digest multihash.Multihash, opts ...GetOption) (Object, error) + func (mb *MapBlobstore) Put(ctx context.Context, digest multihash.Multihash, size uint64, body io.Reader) error + type MapObject struct + func (o MapObject) Body() io.Reader + func (o MapObject) Size() int64 + type Object interface + Body func() io.Reader + Size func() int64 + type Range struct + Length *uint64 + Offset uint64