|
OXY API 1.0
OXY API Library Documentation
|
This root namespace contains the common types and operations for the OXY-API library. More...
Namespaces | |
| namespace | api |
| This namespace contains the high-level definitions and operations for the OXY-API library. | |
| namespace | core |
| This namespace contains core types and operations for the OXY-API library. | |
| namespace | filter |
| This namespace contains function objects and operations related to filter management. | |
Classes | |
| struct | attach_fn |
| Function object to attach a SQLite database to an existing connection. More... | |
| struct | blob_t |
| In-memory representation of a blob object. More... | |
| struct | category_link_t |
| In-memory representation of a link betwin an oid and a category. More... | |
| struct | category_t |
| In-memory representation of a category. More... | |
| struct | commit_t |
| In-memory representation of a commit. More... | |
| struct | connect_fn |
| Function object to establish a connection to a SQLite database. More... | |
| struct | connection_t |
| Representation of a sqlite's connection. More... | |
| struct | contents_t |
| In-memory representation of a contents. More... | |
| struct | context_t |
| Representation of a context. More... | |
| struct | copy_fn |
| Function object to copy a table or filtered data from one SQLite database to another. More... | |
| struct | count_fn |
| Function object to count entries in a schema of a SQLite database. More... | |
| struct | create_filter_fn |
| Function object to create a filter in a SQLite database. More... | |
| struct | detach_fn |
| Function object to detach a SQLite database from an existing connection. More... | |
| struct | entry_t |
| Representation of an entry of an index. More... | |
| struct | enum_file_fn |
| Function object to enumerate files in a directory. More... | |
| struct | exec_fn |
| Function object to execute a SQL statement on a SQLite database connection. More... | |
| struct | expandEnvVar_fn |
| Function object to expand environment variables in strings and paths. More... | |
| Functor to format messages based on message IDs. More... | |
| struct | get_envvar_fn |
| Function object to get the value of an environment variable. More... | |
| struct | get_oid_fn |
| Get the identifier of an Oxy object. More... | |
| struct | get_timestamp_fn |
| Function object to retrieve the current timestamp as a string. More... | |
| struct | hash_fn |
| Functor to compute SHA-1 hashes for various input types. More... | |
| struct | index_t |
| In-memory representation of a index object. More... | |
| struct | make_balanced_filters_fn |
| Function object to create balanced word filters based on the maximum number of filters. More... | |
| struct | make_dynamic_filters_fn |
| Function object to dynamically create word filters based on the maximum number of inputs per filter. More... | |
| struct | make_object_fn |
| Function object to generate an object containing the given contents and type. More... | |
| struct | make_tmpfile_fn |
| Function object to create a unique temporary file path with a specified extension. More... | |
| struct | manifest_t |
| In-memory representation of a manifest. More... | |
| struct | metadata_t |
| In-memory representation of a metadata. More... | |
| struct | mime_t |
| Representation of a MIME code. More... | |
| struct | object_t |
| Representation of an OXY object. More... | |
| struct | oid_t |
| Unique identity of any object. More... | |
| struct | PathRemover |
| Custom deleter for std::filesystem::path that removes the file or directory when the unique_ptr goes out of scope. More... | |
| struct | push_fn |
| Function object to push items to a filter in a SQLite database. More... | |
| struct | push_optional_f |
| Functor to push an optional value into a JSON object. More... | |
| struct | record_t |
| In-memory representation of a record. More... | |
| struct | scope_exit |
| A utility for executing a function upon exiting a scope. More... | |
| struct | set_envVar_fn |
| Function object to set the value of an environment variable. More... | |
| struct | set_value_f |
| Functor to set a value in a JSON object. More... | |
| struct | sha1sum_fn |
| Function object to compute SHA-1 checksums of files and streams. More... | |
| struct | signature_t |
| In-memory representation of a signature. More... | |
| struct | stream_t |
| In-memory representation of a stream. More... | |
| struct | tag_link_t |
| In-memory representation of a link betwin an oid and a tag. More... | |
| struct | tag_t |
| In-memory representation of a tag. More... | |
| struct | tags_t |
| In-memory representation of a collection of tag. More... | |
| struct | timestamp_t |
| In-memory representation of the timestamp. More... | |
| struct | update_fn |
| Function object to update a table in a SQLite database. More... | |
| struct | win32_error_code |
| A wrapper for Win32 error codes to facilitate conversion to std::error_code. More... | |
Typedefs | |
| using | connection_ptr = std::shared_ptr<connection_t> |
| Shared pointer type for managing connection_t instances. | |
| using | database_t = SQLite::Database |
| using | hash_t = std::string |
| Type alias for the SHA-1 hash representation. | |
| using | local_time_point = std::chrono::local_time<std::chrono::duration<std::int64_t, std::micro>> |
| Type aliases for different time point representations. | |
| template<typename T> | |
| using | maybe = std::optional<T> |
| Type alias for representing optional values using std::optional. | |
| using | path_t = std::filesystem::path |
| Alias for the std::filesystem::path type used in the oxy library. | |
| using | paths_t = std::vector<path_t> |
| Alias for a vector of path_t used in the oxy library. | |
| using | reference_t = references::value_type |
| In-memory representation of a reference. | |
| using | references = std::map<std::string, std::string> |
| In-memory representation of a collection of references. | |
| using | remote_t = remotes_t::value_type |
| In-memory representation of a remote object. | |
| using | remotes_t = std::map<std::string, std::string> |
| In-memory representation of a collection of remote objects. | |
| template<class T> | |
| using | result = std::expected<T, std::error_code> |
| A template alias for a result type that can either hold a value of type T or an error code. | |
| using | result_type = std::map<std::string, std::vector<std::string>> |
| A type alias for a map that associates strings with vectors of strings. | |
| using | time_point = std::chrono::system_clock::time_point |
| using | unique_path = std::unique_ptr<std::filesystem::path, PathRemover> |
| Alias for unique_ptr with PathRemover. | |
| using | utc_time_point = std::chrono::utc_clock::time_point |
Enumerations | |
| enum class | eType { any = 0 , commit = 1 , index = 2 , blob = 3 } |
| Basic type of any object. More... | |
Functions | |
| template<typename T> | |
| auto | dumps (T const &item) -> std::string |
| Helper function to serialize an object of type T to a JSON string. | |
| constexpr auto | get_author (const commit_t &item) |
| Helper to get the author of an commit. | |
| auto & | get_db (connection_ptr const &conn) |
| auto | get_long_timestamp () -> std::string |
| Gets the current UTC timestamp as a string in ISO 8601 format with microseconds (YYYY-MM-DDTHH:MM:SS.ssssss). | |
| constexpr auto | get_name (const signature_t &item) |
| Helper to get the name of a signature. | |
| template<typename T> | |
| auto | get_object (json::value const &jv, json::string_view key) |
| Helper function to get a value of type T from a JSON object by key. | |
| constexpr auto | get_parents (const commit_t &item) |
| Helper to get the parents of an commit. | |
| auto | get_short_timestamp () -> std::string |
| Gets the current UTC timestamp as a string in ISO 8601 format (YYYY-MM-DDTHH:MM:SS). | |
| constexpr auto | get_tree (const commit_t &item) |
| Gets the index id of a commit. | |
| constexpr auto | get_type (object_t const &item) |
| Helper to get the type of an object. | |
| constexpr auto | get_url (const reference_t &item) |
| Gets the URL of an Oxy reference. | |
| constexpr auto | get_value (const blob_t &item) |
| Gets the value of a blob. | |
| constexpr auto | get_value (const oid_t &item) |
| Helper toget the id of a index an Oxy object. | |
| constexpr auto | get_value (const timestamp_t &item) |
| Helper to get the value of a timestamp. | |
| template<typename T> | |
| auto | get_value (json::value const &jv, json::string_view key) -> std::optional< T > |
| Helper function to get a value of type T from a JSON object by key. | |
| constexpr auto | get_when (const signature_t &item) |
| Helper to get the when of a signature. | |
| auto | is_uuid (std::string const &id) |
| Checks whether a string is a valid UUID. | |
| template<typename T> | |
| constexpr auto | just (T x) -> maybe< T > |
| Helper function to create a maybe instance containing a value. | |
| template<typename T> | |
| auto | loads (std::string const &stream) -> T |
| Helper function to deserialize a JSON string to an object of type T. | |
| std::error_code | make_error_code (win32_error_code const &we) |
| Creates a std::error_code from a win32_error_code object. | |
| std::string | make_nil_uuid () |
| Creates a nil (all-zeros) UUID and returns it as a string. | |
| unique_path | make_unique_path (const std::filesystem::path &path) |
| Helper function to make a unique_path. | |
| std::string | make_uuid () |
| Generates a random UUID and returns it as a string. | |
| std::error_code | make_win32_error_code () |
| Create an error_code from the last Windows error. | |
| std::error_code | make_win32_error_code (DWORD e) |
| Create an error_code from a Windows error code. | |
| std::error_code | make_winsock_error_code () |
| Create an error_code from the last Winsock error. | |
| void | merge_json (boost::json::value &dst, const boost::json::value &src, bool array_append=false) |
| Helper function to merge two JSON values recursively. | |
| std::string | normalize_iso8601 (const std::string &datetime) |
| Normalizes an ISO 8601 datetime string by replacing the 'T' separator with a space. | |
| constexpr auto | nothing () |
| Helper function to create an empty maybe instance. | |
| std::chrono::sys_time< std::chrono::milliseconds > | parse_iso8601 (const std::string &s) |
| Parses an ISO 8601 formatted date-time string into a system time point with millisecond precision. | |
| template<class Provider, class Hash, class Flavor> | |
| void | tag_invoke (boost::hash2::hash_append_tag const &, Provider const &, Hash &h, Flavor const &f, object_t const *v) |
| Customization point for hashing a object_t using Boost.Hash2. | |
| template<class Provider, class Hash, class Flavor> | |
| void | tag_invoke (boost::hash2::hash_append_tag const &, Provider const &, Hash &h, Flavor const &f, oid_t const *v) |
| Customization point for hashing a oid_t using Boost.Hash2. | |
| template<class Provider, class Hash, class Flavor> | |
| void | tag_invoke (boost::hash2::hash_append_tag const &, Provider const &, Hash &h, Flavor const &f, timestamp_t const *v) |
| Customization point for hashing a timestamp_t object using Boost.Hash2. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, category_t const &item) -> void |
| Converts a category_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, commit_t const &item) -> void |
| Converts a commit_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, contents_t const &item) -> void |
| Overload customization point for serializing a contents_t object into a JSON type. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, entry_t const &item) -> void |
| Converts a entry_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, eType const &item) -> void |
| Overload customization point for serializing an eType object into a JSON type. | |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, manifest_t const &item) |
| Converts a manifest object to a Boost.JSON value using tag_invoke customization point. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, metadata_t const &item) -> void |
| Converts a metadata_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, mime_t const &item) -> void |
| Converts a mime_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, object_t const &item) -> void |
| Overload customization point for serializing an object_t instance into a JSON type. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, oid_t const &item) -> void |
| Overload customization point for serializing a oid_t object into a JSON type. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, record_t const &item) -> void |
| Converts a record_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, signature_t const &item) -> void |
| Converts a contents_t object to its string representation. | |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, stream_t const &item) |
| Converts a stream object to a Boost.JSON value using tag_invoke customization point. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, tag_t const &item) -> void |
| Converts a tag_t object to its string representation. | |
| auto | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, timestamp_t const &item) -> void |
| Overload customization point for serializing a timestamp_t object into a JSON type. | |
| auto | tag_invoke (const boost::json::value_to_tag< category_t > &, boost::json::value const &jv) -> category_t |
| Converts a Boost.JSON value to a category_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< commit_t > &, boost::json::value const &jv) -> commit_t |
| Converts a Boost.JSON value to a commit_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< contents_t > &, boost::json::value const &jv) -> contents_t |
| Converts a Boost.JSON value to a contents_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< entry_t > &, boost::json::value const &jv) -> entry_t |
| Converts a Boost.JSON value to a entry_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< eType > &, boost::json::value const &jv) -> eType |
| Converts a JSON value to an eType object by extracting its string representation. | |
| manifest_t | tag_invoke (const boost::json::value_to_tag< manifest_t > &, boost::json::value const &jv) |
| Converts a Boost.JSON value to a manifest_t object using tag_invoke customization point. | |
| auto | tag_invoke (const boost::json::value_to_tag< metadata_t > &, boost::json::value const &jv) -> metadata_t |
| Converts a Boost.JSON value to a metadata_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< mime_t > &, boost::json::value const &jv) -> mime_t |
| Converts a Boost.JSON value to a mime_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< object_t > &, boost::json::value const &jv) -> object_t |
| Converts a JSON value to an object_t instance by extracting its id and type\ members. | |
| auto | tag_invoke (const boost::json::value_to_tag< record_t > &, boost::json::value const &jv) -> record_t |
| Converts a Boost.JSON value to a record_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< signature_t > &, boost::json::value const &jv) -> signature_t |
| Converts a Boost.JSON value to a signature_t object by extracting and parsing the JSON string value. | |
| stream_t | tag_invoke (const boost::json::value_to_tag< stream_t > &, boost::json::value const &jv) |
| Converts a Boost.JSON value to a stream_t object using tag_invoke customization point. | |
| auto | tag_invoke (const boost::json::value_to_tag< tag_t > &, boost::json::value const &jv) -> tag_t |
| Converts a Boost.JSON value to a tag_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const boost::json::value_to_tag< timestamp_t > &, boost::json::value const &jv) -> timestamp_t |
| Converts a Boost.JSON value to a timestamp_t object by extracting and parsing the JSON string value. | |
| auto | tag_invoke (const json::value_to_tag< oid_t > &, json::value const &jv) -> oid_t |
| Converts a JSON value to an oid_t object by extracting its string representation. | |
| auto | to_long_string (time_point const &aclock) -> std::string |
| Converts a system clock time point to a string representation in ISO 8601 format with microseconds. | |
| template<typename T> | |
| auto & | to_object (T &value, json::value const &jv, json::string_view key) |
| Helper function to set a value of type T in a JSON object by key. | |
| auto | to_string (commit_t const &v) |
| Converts a commit_t object to its string representation. | |
| auto | to_string (entry_t const &v) |
| Converts a entry_t object to its string representation. | |
| auto | to_string (eType const &v) |
| Converts an enumeration value to its string representation. | |
| auto | to_string (local_time_point const &aclock) -> std::string |
| Converts a local time point to a string representation in ISO 8601 format. | |
| auto | to_string (object_t const &v) |
| Converts an object_t to its string representation. | |
| auto | to_string (oid_t const &v) |
| Converts a oid_t object to its string representation. | |
| auto | to_string (record_t const &v) |
| Converts a record_t object to its string representation. | |
| auto | to_string (signature_t const &v) |
| Converts a signature_t object to its string representation. | |
| auto | to_string (time_point const &aclock) -> std::string |
| Converts a system clock time point to a string representation in ISO 8601 format. | |
| auto | to_string (timestamp_t const &v) |
| Converts a timestamp_t object to its string representation. | |
| auto | to_utc_long_string (utc_time_point const &aclock) -> std::string |
| Converts a UTC clock time point to a string representation in ISO 8601 format with microseconds. | |
| auto | to_utc_string (time_point const &aclock) -> std::string |
| Converts a UTC clock time point to a string representation in ISO 8601 format. | |
| auto | to_utc_string (utc_time_point const &aclock) -> std::string |
| Converts a UTC clock time point to a string representation in ISO 8601 format with microseconds. | |
Variables | |
| constexpr attach_fn | attach |
| A constexpr instance of the attach_fn function object for use in functional programming. | |
| constexpr const char | CONFIG [] = "CONFIG" |
| constexpr connect_fn | connect |
| A constexpr instance of the connect_fn function object for use in functional programming. | |
| constexpr const char | CONTAINERS [] = "containers" |
| constexpr copy_fn | copy |
| A constexpr instance of the copy_fn function object for use in functional programming. | |
| constexpr count_fn | count |
| A constexpr instance of the count_fn function object for use in functional programming. | |
| constexpr create_filter_fn | create_filter |
| A constexpr instance of the create_filter_fn function object for use in functional programming. | |
| constexpr detach_fn | detach |
| A constexpr instance of the detach_fn function object for use in functional programming. | |
| constexpr enum_file_fn | enum_file |
| A constexpr instance of the enum_file_fn function object for use in functional programming. | |
| constexpr exec_fn | exec |
| A constexpr instance of the exec_fn function object for use in functional programming. | |
| constexpr expandEnvVar_fn | expandEnvVar |
| A constexpr instance of the expandEnvVar_fn function object for use in functional programming. | |
| constexpr format_message_fn | format_message |
| A constexpr instance of the format_message_functor function object for use in functional programming. | |
| constexpr get_oid_fn | get_oid |
| Get the identifier of an Oxy object. | |
| constexpr get_timestamp_fn | get_timestamp |
| A constexpr instance of the get_timestamp_fn function object for use in functional programming. | |
| constexpr get_envvar_fn | getEnvVar |
| A constexpr instance of the get_envvar_fn function object for use in functional programming. | |
| constexpr hash_fn | hash |
| A constexpr instance of the hash_fn function object for use in functional programming. | |
| constexpr const char | HEADS [] = "heads" |
| constexpr const char | ICON [] = "ICON" |
| constexpr auto | is_blob = [](const object_t &obj) { return obj.type() == eType::blob; } |
| Helper to check if the object belongs to the blob type. | |
| constexpr auto | is_commit = [](const object_t &obj) { return obj.type() == eType::commit; } |
| Helper to check if the object belongs to the commit type. | |
| constexpr auto | is_tree = [](const object_t &obj) { return obj.type() == eType::index; } |
| Helper to check if the object belongs to the index type. | |
| constexpr const char | MAIN [] = "heads:main" |
| constexpr make_balanced_filters_fn | make_balanced_filters |
| A constexpr instance of the make_balanced_filters_fn function object for use in functional programming. | |
| constexpr make_dynamic_filters_fn | make_dynamic_filters |
| A constexpr instance of the make_dynamic_filters_fn function object for use in functional programming. | |
| constexpr make_object_fn | make_object |
| A constexpr instance of the make_object_fn function object for use in functional programming. | |
| constexpr make_tmpfile_fn | make_tmpfile |
| A constexpr instance of the make_tmpfile_fn function object for use in functional programming. | |
| constexpr const char | MANIFEST [] = "heads:manifest" |
| constexpr const char | METADATA [] = "metadata" |
| constexpr const char | PROPERTIES [] = "PROPERTIES" |
| constexpr push_fn | push |
| A constexpr instance of the push_fn function object for use in functional programming. | |
| template<typename T> | |
| constexpr auto | push_optional = hof::pipable(push_optional_f{}) |
| A pipable adaptor for the push_optional_f functor, allowing for functional programming style. | |
| constexpr const char | REMOTES [] = "remotes" |
| template<typename T> | |
| constexpr auto | set_value = hof::pipable(set_value_f{}) |
| A pipable adaptor for the set_value_f functor, allowing for functional programming style. | |
| constexpr set_envVar_fn | setEnvVar |
| A constexpr instance of the set_envVar_fn function object for use in functional programming. | |
| constexpr sha1sum_fn | sha1sum |
| A constexpr instance of the sha1sum_fn function object for use in functional programming. | |
| constexpr const char | STREAMS [] = "streams" |
| constexpr const char | TIMELINE [] = "timeline" |
| constexpr update_fn | update |
| A constexpr instance of the update_fn function object for use in functional programming. | |
| const detail::win32_error_category | win32_error_category {} |
| A global instance of the Win32 error category for use with the error handling system. | |
This root namespace contains the common types and operations for the OXY-API library.
The oxy namespace serves as the root namespace for the OXY-API library, encapsulating all fundamental types, structures, and operations related to the OXY system. It provides a cohesive and organized structure for the library's components.
| using oxy::reference_t = references::value_type |
In-memory representation of a reference.
A reference is a single mapping between a URL and an oid, which can be used to track the location of an object in a remote repository. It is represented as a pair of strings, where the first element is the URL and the second element is the oid.
| using oxy::references = std::map<std::string, std::string> |
In-memory representation of a collection of references.
A reference is a mapping between a URL and an oid, which can be used to track the location of an object in a remote repository. The references collection is a map of URL-oid pairs, which can be used to manage and organize the references in the OXY system.
|
strong |
Basic type of any object.
The type is an enumeration of the different types of objects in the OXY system, which can be commit, index, or blob. It is used to indicate the nature of the object and how it should be handled in the system.
| Enumerator | |
|---|---|
| any | Unknown type. |
| commit | Object of commit type. |
| index | Object of index type. |
| blob | Object of blob type. |
|
inline |
Helper function to serialize an object of type T to a JSON string.
| item | - The object to serialize. |
Referenced by oxy::core::make_stream_f::operator()(), oxy::core::make_stream_f::operator()(), to_string(), to_string(), to_string(), to_string(), and to_string().
|
constexpr |
Helper to get the author of an commit.
| item | - define the commit. |
|
inline |
Gets the current UTC timestamp as a string in ISO 8601 format with microseconds (YYYY-MM-DDTHH:MM:SS.ssssss).
References to_utc_long_string().
|
constexpr |
Helper to get the name of a signature.
| index | - define the target index. |
Referenced by tag_invoke().
|
inline |
Helper function to get a value of type T from a JSON object by key.
| jv | - The JSON value to search in. |
| key | - The key to look for in the JSON object. |
References get_value().
|
constexpr |
Helper to get the parents of an commit.
| item | - define the commit. |
|
inline |
Gets the current UTC timestamp as a string in ISO 8601 format (YYYY-MM-DDTHH:MM:SS).
References to_utc_string().
|
constexpr |
Gets the index id of a commit.
| item | - define the target commit. |
|
constexpr |
Helper to get the type of an object.
| object | - Define the target object. |
Referenced by tag_invoke().
|
constexpr |
Gets the URL of an Oxy reference.
| item | - define the reference. |
|
constexpr |
Gets the value of a blob.
| item | - define the target blob. |
|
constexpr |
Helper toget the id of a index an Oxy object.
| item | - define the target object. |
|
constexpr |
Helper to get the value of a timestamp.
| item | - define the timestamp. |
|
inline |
Helper function to get a value of type T from a JSON object by key.
| jv | - The JSON value to search in. |
| key | - The key to look for in the JSON object. |
Referenced by get_object(), oxy::core::blob::make_object_fn::operator()(), oxy::api::tag_invoke(), oxy::api::tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), tag_invoke(), and tag_invoke().
|
constexpr |
Helper to get the when of a signature.
| index | - define the target index. |
Referenced by tag_invoke().
|
inline |
Checks whether a string is a valid UUID.
| id | The string to validate as a UUID. |
|
constexpr |
|
inline |
Helper function to deserialize a JSON string to an object of type T.
| stream | - The JSON string to deserialize. |
|
inline |
Creates a std::error_code from a win32_error_code object.
This function overloads the global make_error_code() free function, and allows the conversion of a win32_error_code object into a std::error_code, associating it with the win32_error_category. It enables seamless integration of Win32 error codes with the standard C++ error handling system. It will be found via ADL by the compiler if needed.
| we | The win32_error_code object to convert into a std::error_code. |
References win32_error_category.
Referenced by make_win32_error_code().
|
inline |
Creates a nil (all-zeros) UUID and returns it as a string.
References to_string().
|
inline |
Helper function to merge two JSON values recursively.
This function merges the source JSON value into the destination JSON value recursively.
| dst | - The destination JSON value to merge into. |
| src | - The source JSON value to merge from. |
| array_append | - A boolean flag indicating whether to append arrays (true) or replace arrays (false) when merging. Default is false. |
References merge_json().
Referenced by merge_json().
|
inline |
Normalizes an ISO 8601 datetime string by replacing the 'T' separator with a space.
| datetime | The ISO 8601 datetime string to normalize. |
Referenced by parse_iso8601().
|
inline |
Parses an ISO 8601 formatted date-time string into a system time point with millisecond precision.
| s | The ISO 8601 formatted string to parse (e.g., "2023-12-25T10:30:45.123Z"). |
References normalize_iso8601().
| void oxy::tag_invoke | ( | boost::hash2::hash_append_tag const & | , |
| Provider const & | , | ||
| Hash & | h, | ||
| Flavor const & | f, | ||
| object_t const * | v ) |
Customization point for hashing a object_t using Boost.Hash2.
This function provides a specialization of the tag_invoke function for the boost::hash2::hash_append_tag tag, allowing the object_t type to be hashed using the Boost Hash2 library. It appends the values of the oid and type members of the object_t object to the provided hash object.
| Provider | The type of the provider (not used in this implementation). |
| Hash | The type of the hash object to which the object_t values will be appended. |
| Flavor | The type of the flavor (not used in this implementation). |
| void oxy::tag_invoke | ( | boost::hash2::hash_append_tag const & | , |
| Provider const & | , | ||
| Hash & | h, | ||
| Flavor const & | f, | ||
| oid_t const * | v ) |
Customization point for hashing a oid_t using Boost.Hash2.
This function provides a specialization of the tag_invoke function for the boost::hash2::hash_append_tag tag, allowing the oid_t type to be hashed using the Boost Hash2 library. It appends the value of the oid_t object to the provided hash object.
| Provider | The type of the provider (not used in this implementation). |
| Hash | The type of the hash object to which the oid_t value will be appended. |
| Flavor | The type of the flavor (not used in this implementation). |
| void oxy::tag_invoke | ( | boost::hash2::hash_append_tag const & | , |
| Provider const & | , | ||
| Hash & | h, | ||
| Flavor const & | f, | ||
| timestamp_t const * | v ) |
Customization point for hashing a timestamp_t object using Boost.Hash2.
This function provides a specialization of the tag_invoke function for the boost::hash2::hash_append_tag tag, allowing the timestamp_t type to be hashed using the Boost Hash2 library. It appends the value of the timestamp_t object to the provided hash object.
| Provider | The hash provider type. |
| Hash | The hash algorithm type. |
| Flavor | The hash flavor type that controls hashing behavior. |
| Provider | object for the hash algorithm (unused). |
| Provider | object for the hash algorithm (unused). |
| h | The hash object to append data to. |
| f | The flavor parameter controlling hash behavior. |
| v | Pointer to the timestamp_t object to be hashed. |
|
inline |
Converts a category_t object to its string representation.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to serialize into |
| item | The category_t item to serialize |
|
inline |
|
inline |
Overload customization point for serializing a contents_t object into a JSON type.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to serialize into |
| item | The contents_t item to serialize |
|
inline |
|
inline |
Overload customization point for serializing an eType object into a JSON type.
This function is called by Boost.JSON when serializing an eType object. It converts the eType value into a JSON string using magic_enum::enum_name and assigns it to the provided JSON value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to serialize into |
| item | The eType item to serialize |
|
inline |
Converts a manifest object to a Boost.JSON value using tag_invoke customization point.
| Tag | type used for tag_invoke dispatch (unnamed parameter). |
| jv | The JSON value object to populate with the manifest data. |
| item | The manifest object to convert to JSON. |
References set_value.
|
inline |
Converts a metadata_t object to its string representation.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to serialize into |
| item | The metadata_t item to serialize |
|
inline |
|
inline |
Overload customization point for serializing an object_t instance into a JSON type.
This function is called by Boost.JSON when serializing an object_t instance. It converts the object_t's oid and type members into JSON key-value pairs and assigns them to the provided JSON value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to serialize into |
| item | The object_t item to serialize |
References get_oid, get_type(), and set_value.
|
inline |
Overload customization point for serializing a oid_t object into a JSON type.
This function is called by Boost.JSON when serializing a oid_t object. It converts the oid_t value into a JSON string and assigns it to the provided JSON value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to serialize into |
| item | The oid_t item to serialize |
References get_value().
|
inline |
|
inline |
Converts a contents_t object to its string representation.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to serialize into |
| item | The signature_t item to serialize |
References get_name(), get_when(), and set_value.
|
inline |
Converts a stream object to a Boost.JSON value using tag_invoke customization point.
| Tag | type used for tag_invoke dispatch (unnamed parameter). |
| jv | The JSON value object to populate with the stream data. |
| item | The stream object to convert to JSON. |
References set_value.
|
inline |
|
inline |
Overload customization point for serializing a timestamp_t object into a JSON type.
This function is called by Boost.JSON when serializing a timestamp_t object. It converts the timestamp_t value into a JSON string and assigns it to the provided JSON value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to serialize into |
| item | The timestamp_t item to serialize |
References get_value().
|
inline |
Converts a Boost.JSON value to a category_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of category. |
|
inline |
Converts a Boost.JSON value to a commit_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of commit. |
References get_value().
|
inline |
Converts a Boost.JSON value to a contents_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of contents. |
|
inline |
Converts a Boost.JSON value to a entry_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of entry. |
References get_value().
|
inline |
Converts a JSON value to an eType object by extracting its string representation.
This function is called by Boost.JSON when deserializing a JSON value into an eType object. It expects the JSON value to contain a string representation of an eType and constructs an eType object from that string using magic_enum::enum_cast. If the string does not correspond to a valid eType, it defaults to eType::any.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to convert, expected to contain a string representation of an eType. |
References any.
|
inline |
Converts a Boost.JSON value to a manifest_t object using tag_invoke customization point.
| Tag | type used for tag_invoke dispatch to specify conversion to manifest_t. |
| jv | The JSON value to convert from. |
References get_value().
|
inline |
Converts a Boost.JSON value to a metadata_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of metadata. |
|
inline |
Converts a Boost.JSON value to a mime_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of mime. |
|
inline |
Converts a JSON value to an object_t instance by extracting its id and type\ members.
This function is called by Boost.JSON when deserializing a JSON value into an object_t instance. It expects the JSON value to contain id and type keys, and constructs an object_t instance from those values. If the type key is missing, it defaults to eType::any.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to convert, expected to contain id and type keys. |
References any, and get_value().
|
inline |
Converts a Boost.JSON value to a record_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of record. |
References get_value().
|
inline |
Converts a Boost.JSON value to a signature_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of signature. |
References get_value().
|
inline |
Converts a Boost.JSON value to a stream_t object using tag_invoke customization point.
| Tag | type used for tag_invoke dispatch to specify conversion to stream_t. |
| jv | The JSON value to convert from. |
References get_value().
|
inline |
Converts a Boost.JSON value to a tag_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of tag. |
|
inline |
Converts a Boost.JSON value to a timestamp_t object by extracting and parsing the JSON string value.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The Boost.JSON value to convert, expected to contain a string representation of a timestamp. |
|
inline |
Converts a JSON value to an oid_t object by extracting its string representation.
This function is called by Boost.JSON when deserializing a JSON value into an oid_t object. It expects the JSON value to contain a string representation of an OID and constructs an oid_t object from that string.
| Tag | type used for tag_invoke ADL (Argument-Dependent Lookup) customization point. |
| jv | The JSON value to convert, expected to contain a string representation of an OID. |
|
inline |
Converts a system clock time point to a string representation in ISO 8601 format with microseconds.
| aclock | The system clock time point to convert. |
References to_utc_long_string().
|
inline |
Helper function to set a value of type T in a JSON object by key.
| value | - The value to set in the JSON object. |
| jv | - The JSON value to modify. |
| key | - The key to set in the JSON object. |
|
inline |
|
inline |
|
inline |
Converts an enumeration value to its string representation.
| v | The enumeration value to convert. |
|
inline |
Converts a local time point to a string representation in ISO 8601 format.
| aclock | The local time point to convert. |
Referenced by make_nil_uuid(), make_uuid(), oxy::hash_fn::operator()(), oxy::make_tmpfile_fn::operator()(), and oxy::sha1sum_fn::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
Converts a signature_t object to its string representation.
| v | The signature_t object to convert. |
References dumps().
|
inline |
Converts a system clock time point to a string representation in ISO 8601 format.
| aclock | The system clock time point to convert. |
|
inline |
Converts a timestamp_t object to its string representation.
| v | The timestamp_t object to convert. |
|
inline |
Converts a UTC clock time point to a string representation in ISO 8601 format with microseconds.
| aclock | The UTC clock time point to convert. |
Referenced by get_long_timestamp(), and to_long_string().
|
inline |
Converts a UTC clock time point to a string representation in ISO 8601 format.
| aclock | The UTC clock time point to convert. |
Referenced by get_short_timestamp().
|
inline |
Converts a UTC clock time point to a string representation in ISO 8601 format with microseconds.
| aclock | The UTC clock time point to convert. |
|
constexpr |
Helper to check if the object belongs to the blob type.
| object | - Define the target object. |
|
constexpr |
Helper to check if the object belongs to the commit type.
| object | - Define the target object. |
|
constexpr |
Helper to check if the object belongs to the index type.
| object | - Define the target object. |