feat(package): add registry binary-variant client API and vbs publish-binary
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 27s

This commit is contained in:
faumaray committed 2026-12-03 21:04:48 +03:00
1 parent 663215f7f3
commit 8245a209a5
10 files changed
+290 -2

No files matched your search

@@ -47,6 +47,34 @@ download_release_archive(std::string_view registry_url, std::string_view package
std::string_view version, std::string_view expected_sha256,
const std::filesystem::path &dest_file, const RegistryAuth &auth = {});
struct BinaryPublishOptions {
std::string registry_url;
std::string package_name;
std::string version;
std::string variant_id;
std::filesystem::path artifact_path;
std::optional<std::filesystem::path> signing_seed_path;
RegistryAuth auth;
};
struct BinaryReleaseInfo {
std::string variant_id;
std::string sha256;
std::uint64_t size_bytes{0};
std::optional<std::string> signature;
std::optional<std::string> public_key;
};
// Publishes a prebuilt binary variant for an existing release (optionally Ed25519-signed over
// the canonical binary message) and returns the artifact SHA-256.
[[nodiscard]] Void::Result::Result<std::string, Void::Result::Error>
publish_binary_variant(const BinaryPublishOptions &options);
// Lists the binary variants stored for one release.
[[nodiscard]] Void::Result::Result<std::vector<BinaryReleaseInfo>, Void::Result::Error>
fetch_binary_variants(std::string_view registry_url, std::string_view package_name,
std::string_view version, const RegistryAuth &auth = {});
// Downloads a prebuilt binary artifact from an absolute http(s) URL into `dest_file`,
// rejecting any content whose SHA-256 differs from `expected_sha256` (verified before writing).
[[nodiscard]] Void::Result::Result<std::filesystem::path, Void::Result::Error>