|
Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
|
Namespaces | |
| namespace | anonymous_namespace{contracts.cpp} |
Classes | |
| struct | diagnostic |
| struct | validation_result |
Enumerations | |
| enum class | contract_name { arachne_batch , batch_envelope , fetch_plan , fetch_request , acquired_artifact , research_candidate_graph_plan , product_graph_snapshot , research_candidate_graph_snapshot , viewer_projection , site_bundle } |
Functions | |
| std::string_view | to_string (contract_name name) noexcept |
| std::optional< contract_name > | parse_contract_name (std::string_view name) noexcept |
| bool | is_artifact_bearing (contract_name name) noexcept |
| validation_result | validate (const nlohmann::json &document) |
| validation_result | validate (contract_name expected, const nlohmann::json &document) |
| std::string | canonical_json (const nlohmann::json &document) |
| validation_result | validate (const json &document) |
| validation_result | validate (const contract_name expected, const json &document) |
| std::string | canonical_json (const json &document) |
|
strong |
Supported active actor-boundary and product-inbox contracts.
| Enumerator | |
|---|---|
| arachne_batch | |
| batch_envelope | |
| fetch_plan | |
| fetch_request | |
| acquired_artifact | |
| research_candidate_graph_plan | |
| product_graph_snapshot | |
| research_candidate_graph_snapshot | |
| viewer_projection | |
| site_bundle | |
Definition at line 14 of file contracts.hpp.
| std::string arachnespace::contracts::canonical_json | ( | const json & | document | ) |
Definition at line 2547 of file contracts.cpp.
|
nodiscard |
Serialize JSON deterministically: object keys are lexicographically ordered, arrays retain their declared order, UTF-8 is retained, and no insignificant whitespace is emitted.
| std::invalid_argument | for discarded or non-finite JSON values. |
|
nodiscardnoexcept |
Whether the contract necessarily carries or references artifact bytes.
Definition at line 2507 of file contracts.cpp.
References acquired_artifact, arachne_batch, batch_envelope, fetch_plan, fetch_request, product_graph_snapshot, research_candidate_graph_plan, research_candidate_graph_snapshot, site_bundle, and viewer_projection.
|
nodiscardnoexcept |
Parse an exact, currently supported wire name.
Definition at line 2496 of file contracts.cpp.
|
nodiscardnoexcept |
Return the canonical wire name, including its major-version suffix.
Definition at line 2487 of file contracts.cpp.
| validation_result arachnespace::contracts::validate | ( | const contract_name | expected, |
| const json & | document ) |
Definition at line 2536 of file contracts.cpp.
| validation_result arachnespace::contracts::validate | ( | const json & | document | ) |
Definition at line 2525 of file contracts.cpp.
|
nodiscard |
Validate a document after discovering its type from contract, or from format for an Arachne product-inbox batch.
|
nodiscard |
Validate a document and require the supplied contract type.