Documentation ¶
Index ¶
- Constants
- func NewFilesystem(cfgMap map[string]interface{}) (cafs.Filestore, error)
- type FSConfig
- type Filestore
- func (fst *Filestore) AddFile(ctx context.Context, file qfs.File, pin bool) (hash string, err error)
- func (fst *Filestore) Delete(ctx context.Context, key string) error
- func (fst *Filestore) Fetch(ctx context.Context, source cafs.Source, key string) (qfs.File, error)
- func (fst *Filestore) Get(ctx context.Context, key string) (qfs.File, error)
- func (fst *Filestore) Has(ctx context.Context, key string) (exists bool, err error)
- func (fst *Filestore) IPFSCoreAPI() coreiface.CoreAPI
- func (fst *Filestore) NewAdder(pin, wrap bool) (cafs.Adder, error)
- func (fst *Filestore) Online() bool
- func (fst *Filestore) Pin(ctx context.Context, cid string, recursive bool) error
- func (fst *Filestore) Put(ctx context.Context, file qfs.File) (string, error)
- func (fst Filestore) Type() string
- func (fst *Filestore) Unpin(ctx context.Context, cid string, recursive bool) error
Constants ¶
View Source
const FilestoreType = "ipfs"
FilestoreType uniquely identifies this filestore
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FSConfig ¶
type FSConfig struct {
URL string // url to the ipfs api
}
FSConfig adjusts the behaviour of an FS instance
type Filestore ¶
type Filestore struct {
// contains filtered or unexported fields
}
func (*Filestore) AddFile ¶
func (fst *Filestore) AddFile(ctx context.Context, file qfs.File, pin bool) (hash string, err error)
AddFile adds a file to the top level IPFS Node
func (*Filestore) IPFSCoreAPI ¶
func (*Filestore) Online ¶
Online always returns true TODO (b5): the answer to this is more nuanced. The IPFS api may be available but not connected to p2p
Click to show internal directories.
Click to hide internal directories.