pub struct RepositoryIndex {
pub version: u32,
pub generated_at: u64,
pub entries: Vec<RepositoryIndexEntry>,
pub signature: Vec<u8>,
}Expand description
Server-side repository metadata index.
Describes all packages available in a repository, signed for integrity. Serialized as a simple JSON-like format for transmission.
Fields§
§version: u32Index format version
generated_at: u64Timestamp when the index was generated (seconds since epoch)
entries: Vec<RepositoryIndexEntry>Package entries in the index
signature: Vec<u8>Ed25519 signature over the serialized entries
Implementations§
Source§impl RepositoryIndex
impl RepositoryIndex
Sourcepub fn generate(packages: &[PackageMetadata]) -> Self
pub fn generate(packages: &[PackageMetadata]) -> Self
Generate a repository index from a list of package metadata.
Sourcepub fn verify_signature(&self, public_key: &[u8]) -> bool
pub fn verify_signature(&self, public_key: &[u8]) -> bool
Verify the Ed25519 signature over the index data.
Uses crate::crypto::asymmetric::Ed25519 for real verification.