33namespace fs = std::filesystem;
44[[nodiscard]]
inline Value<void> set(fs::path
const& path_file_binary, std::string
const& url)
50 logger(
"I::Set remote URL to '{}'", url);
71 return Error(
"E::No remote URL configured");
74 return Pop(db(
"url").value<std::string>(),
"E::Could not read URL");
89 logger(
"I::Cleared remote URL");
A type-safe wrapper around nlohmann::json for database operations.
bool contains(T &&t) const noexcept
Checks if the JSON contains a specific key.
Value< std::string > dump()
Serializes the current JSON data to a formatted string.
bool empty() const noexcept
Checks whether the JSON data is empty.
A database that interfaces with nlohmann json.
Enhanced error handling framework built on std::expected.
#define logger(fmt,...)
Compile-time log level dispatch macro with automatic location capture.
Remote recipe repository URL management.
Value< std::string > get(fs::path const &path_file_binary)
Gets the remote URL from the database.
Value< void > clear(fs::path const &path_file_binary)
Clears the remote URL from the database.
Value< void > set(fs::path const &path_file_binary, std::string const &url)
Sets a remote URL in the database.
Value< Db > from_string(S &&s)
Parses a JSON string and creates a Db object.
Value< std::string > read(fs::path const &path_file_binary)
Reads the remote URL string from the target binary.
Value< void > write(fs::path const &path_file_binary, std::string_view const &url)
Writes the remote URL string to the target binary.
Manages the remote URL reserved space.
Enhanced expected type with integrated logging capabilities.