Documentation ¶
Index ¶
- Variables
- func InitRepo(repoPath, configPath string) error
- func OptEnablePubSub(o *StoreCfg)
- type Adder
- type Filestore
- func (fs *Filestore) AddFile(file cafs.File, pin bool) (hash string, err error)
- func (fs *Filestore) Delete(key string) error
- func (fs *Filestore) Fetch(source cafs.Source, key string) (cafs.File, error)
- func (fs *Filestore) Get(key string) (cafs.File, error)
- func (fs *Filestore) GoOnline() error
- func (fs *Filestore) Has(key string) (exists bool, err error)
- func (fs *Filestore) NewAdder(pin, wrap bool) (cafs.Adder, error)
- func (fs *Filestore) Node() *core.IpfsNode
- func (fs *Filestore) Online() bool
- func (f Filestore) PathPrefix() string
- func (fs *Filestore) Pin(path string, recursive bool) error
- func (fs *Filestore) Put(file cafs.File, pin bool) (key string, err error)
- func (fs *Filestore) Unpin(path string, recursive bool) error
- type Option
- type StoreCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIPFSRepoNeedsMigration = fmt.Errorf(`Your IPFS repo needs an update!
Please make sure you have the latest version of IPFS (go-ipfs, at least v0.4.17)
from either https://dist.ipfs.io or your favourite package manager.
Then run 'ipfs daemon' from a terminal. It should ask if you'd like to perform
a migration, select yes.
Once you've migrated, run Qri connect again.`)
Functions ¶
func InitRepo ¶
InitRepo is a more specific version of the init command: github.com/ipfs/go-ipfs/cmd/ipfs/init.go it's adapted to let qri initialize a repo. This func should be maintained to reflect the ipfs master branch.
func OptEnablePubSub ¶
func OptEnablePubSub(o *StoreCfg)
OptEnablePubSub configures ipfs to use the experimental pubsub store
Types ¶
type Adder ¶
type Adder struct {
// contains filtered or unexported fields
}
Adder wraps a coreunix adder to conform to the cafs adder interface
type Filestore ¶
type Filestore struct {
// contains filtered or unexported fields
}
func NewFilestore ¶
func (Filestore) PathPrefix ¶
type Option ¶
type Option func(o *StoreCfg)
Option is a function that adjusts the store configuration
func OptsFromMap ¶
OptsFromMap detects options from a map based on special keywords
type StoreCfg ¶
type StoreCfg struct { // embed options for creating a node core.BuildCfg // optionally just supply a node. will override everything Node *core.IpfsNode // path to a local filesystem fs repo FsRepoPath string // operating context Ctx context.Context // EnableAPI EnableAPI bool }
StoreCfg configures the datastore
func DefaultConfig ¶
func DefaultConfig() *StoreCfg
DefaultConfig results in a local node that attempts to draw from the default ipfs filesotre location
Click to show internal directories.
Click to hide internal directories.