Versions in this module Expand all Collapse all v1 v1.7.1 Jan 29, 2021 v1.7.0 Dec 8, 2020 Changes in this version + var ErrFilestoreNotEnabled = errors.New("filestore is not enabled, see https://git.io/vNItf") + var ErrUrlstoreNotEnabled = errors.New("urlstore is not enabled") + var FilestorePrefix = ds.NewKey("filestore") + func IsURL(str string) bool + func ListAll(fs *Filestore, fileOrder bool) (func() *ListRes, error) + func VerifyAll(fs *Filestore, fileOrder bool) (func() *ListRes, error) + type CorruptReferenceError struct + Code Status + Err error + func (c CorruptReferenceError) Error() string + type FileManager struct + AllowFiles bool + AllowUrls bool + func NewFileManager(ds ds.Batching, root string) *FileManager + func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) + func (f *FileManager) DeleteBlock(c cid.Cid) error + func (f *FileManager) Get(c cid.Cid) (blocks.Block, error) + func (f *FileManager) GetSize(c cid.Cid) (int, error) + func (f *FileManager) Has(c cid.Cid) (bool, error) + func (f *FileManager) Put(b *posinfo.FilestoreNode) error + func (f *FileManager) PutMany(bs []*posinfo.FilestoreNode) error + type Filestore struct + func NewFilestore(bs blockstore.Blockstore, fm *FileManager) *Filestore + func (f *Filestore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) + func (f *Filestore) DeleteBlock(c cid.Cid) error + func (f *Filestore) FileManager() *FileManager + func (f *Filestore) Get(c cid.Cid) (blocks.Block, error) + func (f *Filestore) GetSize(c cid.Cid) (int, error) + func (f *Filestore) Has(c cid.Cid) (bool, error) + func (f *Filestore) HashOnRead(enabled bool) + func (f *Filestore) MainBlockstore() blockstore.Blockstore + func (f *Filestore) Put(b blocks.Block) error + func (f *Filestore) PutMany(bs []blocks.Block) error + type ListRes struct + ErrorMsg string + FilePath string + Key cid.Cid + Offset uint64 + Size uint64 + Status Status + func List(fs *Filestore, key cid.Cid) *ListRes + func Verify(fs *Filestore, key cid.Cid) *ListRes + func (r *ListRes) FormatLong(enc func(cid.Cid) string) string + type Status int32 + const StatusFileChanged + const StatusFileError + const StatusFileNotFound + const StatusKeyNotFound + const StatusOk + const StatusOtherError + func (s Status) Format() string + func (s Status) String() string