1#ifndef _DITTO_ATTACHMENT_TOKEN_
2#define _DITTO_ATTACHMENT_TOKEN_
17class AttachmentToken {
18 friend class AttachmentFetcher;
19 friend struct AttachmentFetcherCtx;
20 friend class AbstractDocumentPath;
21 friend class DocumentPath;
22 friend class MutableDocumentPath;
31 std::string
get_id()
const;
45 std::map<std::string, std::string>
get_metadata()
const {
return metadata; }
48 nlohmann::json::binary_t id;
50 std::map<std::string, std::string> metadata;
54 std::unordered_map<std::string, any>
const &map_representation);
Serves as a token for a specific attachment that you can pass to a call to Store::fetch_attachment.
Definition AttachmentToken.hpp:17
std::string get_id() const
Gets the attachment's ID.
Definition AttachmentToken.cpp:80
uint64_t get_len() const
Gets the attachment's size in bytes.
Definition AttachmentToken.cpp:85
std::map< std::string, std::string > get_metadata() const
Gets the attachment's metadata.
Definition AttachmentToken.hpp:45