Documentation
¶
Overview ¶
Package ipns implements a FUSE filesystem that interfaces with IPNS, the naming system for IPFS. Only names for which the node holds private keys are writable; all other names resolve to read-only symlinks pointing at the /ipfs mount.
Index ¶
- func InitializeKeyspace(n *core.IpfsNode, key ci.PrivKey) error
- func Mount(ipfs *core.IpfsNode, ipnsmp, ipfsmp string) (fusemnt.Mount, error)
- type Link
- type Root
- func (r *Root) Close() error
- func (r *Root) Getattr(_ context.Context, _ fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (r *Root) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (r *Root) Readdir(_ context.Context) (fs.DirStream, syscall.Errno)
- func (r *Root) Statfs(_ context.Context, out *fuse.StatfsOut) syscall.Errno
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeKeyspace ¶
InitializeKeyspace sets the ipns record for the given key to point to an empty directory.
Types ¶
type Root ¶
type Root struct {
fs.Inode
Ipfs iface.CoreAPI
Keys map[string]iface.Key
// Used for symlinking into ipfs
IpfsRoot string
IpnsRoot string
LocalDirs map[string]*writable.Dir
Roots map[string]*mfs.Root
LocalLinks map[string]*Link
RepoPath string
}
Root is the root object of the /ipns filesystem tree.
func CreateRoot ¶
func CreateRoot(ctx context.Context, ipfs iface.CoreAPI, keys map[string]iface.Key, ipfspath, ipnspath, repoPath string, mountsCfg config.Mounts, imp config.Import, mfsOpts ...mfs.Option) (*Root, error)
CreateRoot creates the IPNS FUSE root with one writable directory per key.
Click to show internal directories.
Click to hide internal directories.