Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndSplitMetadata ¶ added in v0.4.9
func CheckAndSplitMetadata(ctx context.Context, nd ipld.Node, ds ipld.DAGService, meta bool) (ipld.Node, ipld.Node, error)
checkAndSplitMetadata returns both data root node and metadata root node if exists from the DAG topped by the given 'nd'. Case #1: if 'nd' is dummy root with metadata root node and user data root node being children,
return [the second data root child node, the first metadata root child node, nil].
Case #2: if 'nd' is metadata and the given `meta` is true, return [nil, nd, nil]. Otherwise return error. Case #3: if 'nd' is user data, return ['nd', nil, nil].
func NewUnixfsFile ¶
func NewUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node, meta bool) (files.Node, error)
NewUnixFsFile returns a DagReader for the 'nd' root node. If meta = true, only return a valid metadata node if it exists. If not, return error. If meta = false, return only the data contents.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.