ipfs-chromium
|
Fast synchronous access to IPNS & DNSLink name resolution. More...
#include <include/ipfs_client/ipns_names.h>
Public Member Functions | |
std::string_view | NameResolvedTo (std::string_view name) const |
Get the already-known "value"/target of a given name. | |
void | AssignName (std::string const &name, ValidatedIpns rec) |
Store an IPNS record that already validated for this name. | |
void | AssignDnsLink (std::string const &host, std::string_view target) |
Assign a target path to a DNSLink host. | |
void | NoSuchName (std::string const &name) |
Store the definitive absence of a resolution. | |
ValidatedIpns const * | Entry (std::string const &name) |
Fetch the all the stored IPNS record data. | |
Static Public Attributes | |
static constexpr std::string_view | kNoSuchName {"NO_SUCH_NAME"} |
A special value constant. | |
Fast synchronous access to IPNS & DNSLink name resolution.
Assign a target path to a DNSLink host.
host | - The original host NOT including a "_dnslink." prefix |
target | - an IPFS path witout leading / |
void ipfs::IpnsNames::AssignName | ( | std::string const & | name, |
ValidatedIpns | rec | ||
) |
Store an IPNS record that already validated for this name.
name | - The name that resolves with this |
rec | - The record modulo validation bits |
ValidatedIpns const * ipfs::IpnsNames::Entry | ( | std::string const & | name | ) |
Fetch the all the stored IPNS record data.
name | - the IPNS name it was stored with |
std::string_view ipfs::IpnsNames::NameResolvedTo | ( | std::string_view | name | ) | const |
Get the already-known "value"/target of a given name.
name | - either a mb-mf IPNS (key) name, or a host with DNSLink |
Store the definitive absence of a resolution.
This is useful because code will check resolution here before trying to resolve it fresh again, and you can stop that if you know it will never work.