1#ifndef ARIADNE_VIEWER_HPP
2#define ARIADNE_VIEWER_HPP
4#include <nlohmann/json.hpp>
14 const nlohmann::json& product_export,
15 const nlohmann::json& candidate_export,
16 std::string product_snapshot_id,
17 std::string candidate_snapshot_id =
"none"
21 const nlohmann::json& product_export,
22 std::string product_snapshot_id
26 const nlohmann::json& projection_data,
27 const std::filesystem::path& destination,
28 std::string storage_ref, std::string settings_sha256,
29 std::string generated_at
33 const nlohmann::json& projection,
34 const nlohmann::json& catalog_data,
35 const std::filesystem::path& template_root,
36 const std::filesystem::path& site_root, std::string generated_at
static nlohmann::ordered_json build_site(const nlohmann::json &projection, const nlohmann::json &catalog_data, const std::filesystem::path &template_root, const std::filesystem::path &site_root, std::string generated_at)
static nlohmann::ordered_json catalog(const nlohmann::json &product_export, std::string product_snapshot_id)
static nlohmann::ordered_json project(const nlohmann::json &product_export, const nlohmann::json &candidate_export, std::string product_snapshot_id, std::string candidate_snapshot_id="none")
static nlohmann::ordered_json write_projection(const nlohmann::json &projection_data, const std::filesystem::path &destination, std::string storage_ref, std::string settings_sha256, std::string generated_at)
std::string read_file(const std::filesystem::path &path)
void write_file(const std::filesystem::path &path, std::string_view content)
void write_immutable_file(const std::filesystem::path &path, std::string_view content)
std::optional< std::string > projection_identifier(const nlohmann::json &value, std::string_view field, std::string_view integer_namespace)
std::string edge_id(std::string_view from, std::string_view to, std::string_view type, std::string_view source_id)
std::string identifier(const nlohmann::json &value, std::string_view integer_namespace={})
void upsert_node(std::map< std::string, nlohmann::ordered_json, std::less<> > &nodes, nlohmann::ordered_json node)
void append_human_edge(nlohmann::ordered_json &edges, std::string from, std::string to, std::string type, std::string assertion_id, std::string snapshot_id, const nlohmann::json &evidence=nlohmann::json::array())
std::string entity_label(const nlohmann::json &value, const std::string &fallback)
void validate_site_root(const std::filesystem::path &root)
const nlohmann::json & array_or_empty(const nlohmann::json &document, std::string_view field)
std::optional< std::string > projection_identifier(const nlohmann::json &value, std::string_view integer_namespace)
std::string sha256(std::span< const std::byte > bytes)
std::string sha256_file(const std::filesystem::path &path)