6 #include <vocab/byte_view.h>
86 void List(std::function<
bool(std::string
const&, std::string)>)
const;
87 std::optional<std::uint64_t> Fanout()
const;
91 std::unique_ptr<Data> pimpl_;
93 bool fs_node_ =
false;
94 std::string mime_ = {};
95 std::optional<Cid> cid_ = std::nullopt;
96 std::string original_bytes_;
98 std::string LinkCid(ipfs::ByteView)
const;
Interface that provides functionality from whatever environment you're using this library in.
Definition: client.h:42
Something to which a CID may refer directly.
Definition: pb_dag.h:24
std::vector< Byte > binary_hash(Client &, HashType=HashType::INVALID) const
Pass INVALID to mean cid().hash_type()
Definition: pb_dag.cc:191
Cid const & cid() const
Getter for Content IDentifier.
Definition: pb_dag.cc:154
PbDag()
Construct an invalid block.
Type
The kinds of things a block may be representing.
Definition: pb_dag.h:59
std::string const & unparsed() const
Original bytes (with protobuf bits)
Definition: pb_dag.cc:150
bool valid() const
Check if the block appears valid.
Definition: pb_dag.cc:117
Type type() const
Accessor for this block's type.
Definition: pb_dag.cc:121
std::string const & chunk_data() const
data field from a UnixFS node
Definition: pb_dag.cc:146
bool is_file() const
type() == File || type() == FileChunk
Definition: pb_dag.cc:141
bool cid_matches_data(Client &) const
Basic validation.
Definition: pb_dag.cc:173