6 #include <vocab/byte_view.h>
82 void List(std::function<
bool(std::string
const&, std::string)>)
const;
83 std::optional<std::uint64_t> Fanout()
const;
87 std::unique_ptr<Data> pimpl_;
89 bool fs_node_ =
false;
90 std::string mime_ = {};
91 std::optional<Cid> cid_ = std::nullopt;
92 std::string original_bytes_;
94 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:55
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