|
ipfs-chromium
|
A block, an IPNS record, etc. More...
#include <include/ipfs_client/ipld/dag_node.h>


Public Member Functions | |
| ResolveResult | Resolve (ResolutionState ¶ms) |
| virtual NodePtr | rooted () |
| virtual NodePtr | deroot () |
| virtual DnsLinkName const * | as_dnslink () const |
| virtual DirShard * | as_hamt () |
| virtual IpnsName const * | as_ipns () const |
| virtual bool | expired () const |
| virtual bool | PreferOver (DagNode const &another) const |
| void | set_api (std::shared_ptr< Client > api) |
| void | source (BlockSource src) |
Static Public Member Functions | |
| static NodePtr | fromBytes (std::shared_ptr< Client > const &api, Cid const &, ByteView bytes) |
| static NodePtr | fromBytes (std::shared_ptr< Client > const &api, Cid const &, std::string_view bytes) |
| static NodePtr | fromBlock (PbDag const &) |
Protected Member Functions | |
| ResolveResult | CallChild (ResolutionState &) |
| As before, but it might be possible to create on the fly if not known. | |
| ResolveResult | CallChild (ResolutionState &, std::function< NodePtr(std::string_view)> gen_child) |
| ResolveResult | CallChild (ResolutionState &, std::string_view link_key) |
| Add the link if not present, then CallChild(ResolutionState) | |
| ResolveResult | CallChild (ResolutionState &, std::string_view link_key, std::string_view block_key) |
Protected Attributes | |
| std::vector< std::pair< std::string, Link > > | links_ |
| std::shared_ptr< Client > | api_ |
A block, an IPNS record, etc.
|
protected |
When the child's name is not the next element in the path, but it must be known about. e.g. index.html for a path ending in a directory
|
virtual |
Reimplemented in ipfs::ipld::DnsLinkName, and ipfs::ipld::IpnsName.
| another | The node to compare to. |
| auto Node::Resolve | ( | ResolutionState & | params | ) |
Query the DAG
| params | Information about what you're looking for |
|
virtual |
Get a root node that is logically this node
Provide the Client API to be used in DAG operations
| api | Shared pointer to API for the context being run in |
|
protected |
When the next path element is what's needed, and it should already be a link known about...
|
protected |
The child nodes of this node, possibly not yet fetched.