Documentation ¶
Index ¶
- func DiscoverRoots(ctx context.Context, incoming <-chan cid.Cid, ls *linking.LinkSystem) ([]cid.Cid, error)
- func IterateDirLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, ...) error
- func IterateFileLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, ...) error
- func IterateHAMTDirLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, ...) error
- func IterateUnixFSNode(ctx context.Context, root cid.Cid, lsys *ipld.LinkSystem, ...) error
- type UnixFSVisitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverRoots ¶
func DiscoverRoots(ctx context.Context, incoming <-chan cid.Cid, ls *linking.LinkSystem) ([]cid.Cid, error)
DiscoverRoots scans all keys in a store and finds UnixFS roots among them
func IterateDirLinks ¶
func IterateDirLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, data data.UnixFSData, lsys *ipld.LinkSystem, visitor UnixFSVisitor) error
func IterateFileLinks ¶
func IterateFileLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, data data.UnixFSData, lsys *ipld.LinkSystem, visitor UnixFSVisitor) error
func IterateHAMTDirLinks ¶
func IterateHAMTDirLinks(ctx context.Context, root cid.Cid, substrate dagpb.PBNode, data data.UnixFSData, lsys *ipld.LinkSystem, visitor UnixFSVisitor) error
NewUnixFSHAMTShard attempts to construct a UnixFSHAMTShard node from the base protobuf node plus a decoded UnixFSData structure
func IterateUnixFSNode ¶
func IterateUnixFSNode(ctx context.Context, root cid.Cid, lsys *ipld.LinkSystem, visitor UnixFSVisitor) error
Types ¶
type UnixFSVisitor ¶
type UnixFSVisitor interface { OnPath(ctx context.Context, root cid.Cid, path string, cids []cid.Cid) error OnFileRange(ctx context.Context, root cid.Cid, cid cid.Cid, depth int, byteMin uint64, byteMax uint64, leaf bool) error OnRoot(ctx context.Context, root cid.Cid, kind int64) error }
func RecursiveVisitor ¶
func RecursiveVisitor(visitor UnixFSVisitor, lsys *ipld.LinkSystem) UnixFSVisitor
Click to show internal directories.
Click to hide internal directories.