ipfs-chromium
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ipfs::ValidatedIpns Struct Reference

Data from IPNS record modulo the verification parts. More...

#include <library/include/ipfs_client/ipns_record.h>

Collaboration diagram for ipfs::ValidatedIpns:
Collaboration graph
[legend]

Public Member Functions

 ValidatedIpns ()
 Create an invalid default object.
 
 ValidatedIpns (IpnsCborEntry const &entry)
 
 ValidatedIpns (ValidatedIpns &&)
 
 ValidatedIpns (ValidatedIpns const &)
 
ValidatedIpnsoperator= (ValidatedIpns const &)
 
std::string Serialize () const
 Turn into a well-defined list of bytes.
 

Static Public Member Functions

static ValidatedIpns Deserialize (std::string bytes)
 Create a ValidatedIpns from untyped bytes. More...
 

Public Attributes

std::string value
 The path the record claims the IPNS name points to.
 
std::time_t use_until
 An expiration timestamp.
 
std::time_t cache_until
 Inspired by TTL.
 
std::uint64_t sequence
 The version of the record. More...
 
std::int64_t resolution_ms
 How long it took to fetch the record.
 
std::time_t fetch_time = std::time(nullptr)
 When the record was fetched.
 
std::string gateway_source
 Who gave us this record?
 

Detailed Description

Data from IPNS record modulo the verification parts.

Constructor & Destructor Documentation

◆ ValidatedIpns()

ipfs::ValidatedIpns::ValidatedIpns ( IpnsCborEntry const &  entry)
explicit
Parameters
entryIPNS entry known to be valid

Member Function Documentation

◆ Deserialize()

auto ipfs::ValidatedIpns::Deserialize ( std::string  bytes)
static

Create a ValidatedIpns from untyped bytes.

Parameters
bytes- Output from a former call to Serialize()
Note
Is used by disk cache
Returns
Recreation of the old object

Member Data Documentation

◆ sequence

std::uint64_t ipfs::ValidatedIpns::sequence

The version of the record.

Higher sequence numbers obsolete lower ones


The documentation for this struct was generated from the following files: