Documentation ¶
Index ¶
- func AllKeys(ctx context.Context, bs blockstore.Blockstore) ([]cid.Cid, error)
- func CopyBlocks(ctx context.Context, id cid.Cid, src, dst Store) error
- func Merge(ctx context.Context, a, b base.Node) (result base.MergeResult, err error)
- func WrapFileMetadata(f fs.File, meta interface{}) (wrapped fs.File)
- type File
- func (f *File) AsHistoryEntry() base.HistoryEntry
- func (f *File) Cid() cid.Cid
- func (f *File) Close() error
- func (f *File) History(ctx context.Context, maxRevs int) ([]base.HistoryEntry, error)
- func (f *File) IsDir() bool
- func (f *File) Links() base.Links
- func (f *File) Metadata() (res base.LDFile, err error)
- func (f *File) ModTime() time.Time
- func (f *File) Mode() fs.FileMode
- func (f *File) Name() string
- func (f *File) Put() (base.PutResult, error)
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) SetFile(r io.ReadCloser)
- func (f *File) SetMetadata(v interface{}) error
- func (f *File) Size() int64
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Sys() interface{}
- func (f *File) Type() base.NodeType
- type FileGetter
- type Header
- type Info
- type LDFile
- func (df *LDFile) AsHistoryEntry() base.HistoryEntry
- func (df *LDFile) Cid() cid.Cid
- func (df *LDFile) Close() error
- func (df *LDFile) Data() (interface{}, error)
- func (df *LDFile) History(ctx context.Context, maxRevs int) ([]base.HistoryEntry, error)
- func (df *LDFile) IsBare() bool
- func (df *LDFile) IsDir() bool
- func (df *LDFile) Links() base.Links
- func (df *LDFile) Metadata() (base.LDFile, error)
- func (df *LDFile) ModTime() time.Time
- func (df *LDFile) Mode() fs.FileMode
- func (df *LDFile) Name() string
- func (df *LDFile) Put() (result base.PutResult, err error)
- func (df *LDFile) Read(p []byte) (n int, err error)
- func (df *LDFile) ReadDir(n int) ([]fs.DirEntry, error)
- func (df *LDFile) SetFile(data interface{})
- func (df *LDFile) SetMetadata(m interface{}) error
- func (df *LDFile) Size() int64
- func (df *LDFile) Stat() (fs.FileInfo, error)
- func (df *LDFile) Sys() interface{}
- func (df *LDFile) Type() base.NodeType
- type PutResult
- type Skeleton
- type SkeletonInfo
- type SkeletonSource
- type Store
- type Tree
- func (t *Tree) Add(path base.Path, f fs.File) (res base.PutResult, err error)
- func (t *Tree) AsHistoryEntry() base.HistoryEntry
- func (t *Tree) Cid() cid.Cid
- func (t *Tree) Close() error
- func (t *Tree) Copy(path base.Path, srcPathStr string, srcFS fs.FS) (res base.PutResult, err error)
- func (t *Tree) Get(path base.Path) (fs.File, error)
- func (t *Tree) History(ctx context.Context, max int) ([]base.HistoryEntry, error)
- func (t *Tree) IsDir() bool
- func (t *Tree) Links() base.Links
- func (t *Tree) Metadata() (f base.LDFile, err error)
- func (t *Tree) Mkdir(path base.Path) (res base.PutResult, err error)
- func (t *Tree) ModTime() time.Time
- func (t *Tree) Mode() fs.FileMode
- func (t *Tree) Name() string
- func (t *Tree) Put() (base.PutResult, error)
- func (t *Tree) Raw() []byte
- func (t *Tree) Read(p []byte) (n int, err error)
- func (t *Tree) ReadDir(n int) ([]fs.DirEntry, error)
- func (t *Tree) Rm(path base.Path) (base.PutResult, error)
- func (t *Tree) SetMetadata(md interface{}) error
- func (t *Tree) Size() int64
- func (t *Tree) Skeleton() (Skeleton, error)
- func (t *Tree) Stat() (fs.FileInfo, error)
- func (t *Tree) Sys() interface{}
- func (t *Tree) Type() base.NodeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllKeys ¶
func AllKeys(ctx context.Context, bs blockstore.Blockstore) ([]cid.Cid, error)
func CopyBlocks ¶
Copy blocks from src to dst
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func NewFileMetadata ¶
func (*File) AsHistoryEntry ¶
func (f *File) AsHistoryEntry() base.HistoryEntry
func (*File) SetFile ¶
func (f *File) SetFile(r io.ReadCloser)
func (*File) SetMetadata ¶
type FileGetter ¶
type Info ¶
type Info struct { WNFS base.SemVer `json:"wnfs"` Type base.NodeType `json:"type"` Mode uint32 `json:"mode"` Ctime int64 `json:"ctime"` Mtime int64 `json:"mtime"` Size int64 `json:"size"` }
func InfoFromMap ¶
type LDFile ¶
type LDFile struct {
// contains filtered or unexported fields
}
func LoadLDFile ¶
func NewBareLDFile ¶
func (*LDFile) AsHistoryEntry ¶
func (df *LDFile) AsHistoryEntry() base.HistoryEntry
func (*LDFile) SetMetadata ¶
type PutResult ¶
type PutResult struct { Cid cid.Cid Size int64 Type base.NodeType Userland cid.Cid Metadata cid.Cid Skeleton Skeleton }
func (PutResult) ToSkeletonInfo ¶
func (r PutResult) ToSkeletonInfo() SkeletonInfo
type SkeletonInfo ¶
type SkeletonSource ¶
type Store ¶
type Store interface { Context() context.Context Blockservice() blockservice.BlockService GetFile(ctx context.Context, root cid.Cid) (io.ReadCloser, error) PutFile(f fs.File) (PutResult, error) }
Store is a store of Content-Addressed block data indexed by merkle proofs. It's an abstraction over IPFS that defines the required feature set to run wnfs
func NewStore ¶
func NewStore(ctx context.Context, bserv blockservice.BlockService) Store
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewEmptyTree ¶
func (*Tree) AsHistoryEntry ¶
func (t *Tree) AsHistoryEntry() base.HistoryEntry
func (*Tree) SetMetadata ¶
Click to show internal directories.
Click to hide internal directories.