Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
Loading...
Searching...
No Matches
hardened_transport.cpp File Reference
#include "pheidippides/hardened_transport.hpp"
#include "arachne/contracts.hpp"
#include "arachne/crypto.hpp"
#include <curl/curl.h>
#include <nlohmann/json.hpp>
#include <algorithm>
#include <atomic>
#include <cerrno>
#include <chrono>
#include <condition_variable>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <limits>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <set>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <utility>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for hardened_transport.cpp:

Go to the source code of this file.

Classes

struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::timeout_settings
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::retry_settings
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::admission_settings
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::cache_settings
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::configured_redirect_policy
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::policy_settings
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::parsed_url
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::authentication_settings
class  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::admission_gate
class  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::admission_lease
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::endpoint_configuration
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::door_configuration
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::cached_artifact
struct  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::flight_state
struct  arachne::pheidippides::hardened_transport::implementation

Namespaces

namespace  arachne
namespace  arachne::pheidippides
namespace  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}

Typedefs

using arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::json = nlohmann::json

Enumerations

enum class  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::authentication_mode {
  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::none , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::bearer_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::header_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::none ,
  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::bearer_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::header_environment
}
enum class  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::authentication_mode {
  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::none , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::bearer_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::header_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::none ,
  arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::bearer_environment , arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::header_environment
}

Functions

std::string arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::ascii_lower (std::string value)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::safe_token (const std::string_view value)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::safe_environment_name (const std::string_view value)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::safe_http_header_name (const std::string_view value)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::safe_header_value (const std::string_view value, const std::size_t maximum_bytes)
void arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::reject_unknown_keys (const json &object, const std::span< const std::string_view > allowed, const std::string_view location)
const jsonarachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::required_object (const json &object, const std::string_view key, const std::string_view location)
std::string arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::required_string (const json &object, const std::string_view key, const std::string_view location)
std::uint64_t arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::bounded_unsigned (const json &object, const std::string_view key, const std::uint64_t fallback, const std::uint64_t minimum, const std::uint64_t maximum, const std::string_view location)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::optional_boolean (const json &object, const std::string_view key, const bool fallback, const std::string_view location)
void arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::apply_settings (policy_settings &policy, const json &object, const std::string_view location)
std::string arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::curl_url_part (CURLU *url, const CURLUPart part)
parsed_url arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::parse_absolute_url (const std::string &value, const std::string_view location)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::within_base_url (const parsed_url &request, const parsed_url &base)
std::string arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::configured_authority (const parsed_url &url)
authentication_settings arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::parse_authentication (const json &object, const std::string_view location)
acquired_artifact_v1 arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::policy_failure (const fetch_request_v1 &request, const transport_status status, std::string message)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::sensitive_header (const std::string_view name)
std::string arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::request_cache_key (const fetch_request_v1 &request)
bool arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::safe_cached_file (const fs::path &root, const std::string &storage_ref, const std::string &expected_sha256, const std::uint64_t expected_size)
std::optional< cached_artifactarachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::read_cache_entry (const fs::path &root, const fs::path &cache_root, const std::string &cache_key)
void arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::write_cache_entry (const fs::path &cache_root, const std::string &cache_key, const acquired_artifact_v1 &acquired)
acquired_artifact_v1 arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::cached_receipt (const fetch_request_v1 &request, const cached_artifact &cached, const delivery_mode mode)

Variables

constexpr std::uint64_t arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::maximum_policy_milliseconds = 86'400'000U
constexpr std::uint64_t arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::maximum_cache_seconds = 31'536'000U
constexpr std::uint64_t arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::maximum_cache_document_bytes = 64U * 1024U
std::atomic< std::uint64_t > arachne::pheidippides::anonymous_namespace{hardened_transport.cpp}::cache_stage_sequence { 0 }