Documentation ¶
Index ¶
- Constants
- type Cachestore
- func (ds *Cachestore) Batch(ctx context.Context) (datastore.Batch, error)
- func (ds *Cachestore) Close() error
- func (ds *Cachestore) Delete(ctx context.Context, key datastore.Key) (err error)
- func (ds *Cachestore) Get(ctx context.Context, key datastore.Key) (value []byte, err error)
- func (ds *Cachestore) GetSize(ctx context.Context, key datastore.Key) (size int, err error)
- func (ds *Cachestore) Has(ctx context.Context, key datastore.Key) (exists bool, err error)
- func (ds *Cachestore) Put(ctx context.Context, key datastore.Key, value []byte) error
- func (ds *Cachestore) Query(ctx context.Context, q query.Query) (query.Results, error)
- func (ds *Cachestore) Sync(ctx context.Context, prefix datastore.Key) error
- type FileInfo
- type FileManager
- func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (fm *FileManager) Get(cid cid.Cid) *FileInfo
- func (f *FileManager) Has(ctx context.Context, ci cid.Cid) bool
- func (fm *FileManager) Put(ci cid.Cid, path string, offset, size int)
- func (fm *FileManager) PutNode(nd format.Node, path string, blockSize int)
- type FileStore
- func (f *FileStore) Delete(ctx context.Context, path string) error
- func (f *FileStore) Get(ctx context.Context, path string) (*Reader, error)
- func (f *FileStore) Iterate(path string, fn func(fpath string, reader *Reader) error) error
- func (f *FileStore) Overwrite(ctx context.Context, path string, writer *Writer) error
- func (f *FileStore) Put(ctx context.Context, path string, writer *Writer) error
- type Reader
- type Writer
Constants ¶
View Source
const (
DEF_PATH_CID_INFO = "/.info"
)
cids
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cachestore ¶
type Cachestore struct {
// contains filtered or unexported fields
}
func NewCacheStore ¶
func NewCacheStore(ttl time.Duration) *Cachestore
func (*Cachestore) Close ¶
func (ds *Cachestore) Close() error
type FileInfo ¶
func NewFileInfo ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
file manager by paths or cids
func NewFileManager ¶
func NewFileManager() *FileManager
func (*FileManager) AllKeysChan ¶
func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
func (*FileManager) Get ¶
func (fm *FileManager) Get(cid cid.Cid) *FileInfo
func (*FileManager) Put ¶
func (fm *FileManager) Put(ci cid.Cid, path string, offset, size int)
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func NewFileStore ¶
type Reader ¶
type Reader struct {
*files.ReaderFile
}
func NewReader ¶
func NewReader(reader *files.ReaderFile) *Reader
func NewReaderFromPath ¶
Click to show internal directories.
Click to hide internal directories.