1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Registry management for the soar package manager.
//!
//! This crate provides functionality for fetching, processing, and managing
//! package metadata from remote repositories and nests.
//!
//! # Overview
//!
//! The crate handles two main types of metadata sources:
//! - **Repositories**: Standard package repositories containing package metadata
//! - **Nests**: User-defined package collections (similar to PPAs or custom repos)
//!
//! Metadata can be provided in two formats:
//! - SQLite databases (`.sdb` files, optionally zstd-compressed)
//! - JSON files containing package arrays
//!
//! # Example
//!
//! ```no_run
//! use soar_registry::{fetch_metadata, MetadataContent};
//! use soar_config::repository::Repository;
//!
//! async fn sync_repo(repo: &Repository, existing_etag: Option<String>) -> soar_registry::Result<()> {
//! if let Some((etag, content)) = fetch_metadata(repo, false, existing_etag).await? {
//! match content {
//! MetadataContent::SqliteDb(bytes) => {
//! // Write SQLite database to disk
//! }
//! MetadataContent::Json(packages) => {
//! // Process JSON packages into a database
//! }
//! }
//! }
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use Nest;
pub use RemotePackage;