use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Repository {
pub id: String,
pub location: String,
pub last_modified: NaiveDateTime,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Encryption {
pub mode: EncryptionMode,
pub keyfile: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub enum EncryptionMode {
#[serde(rename = "none")]
None,
#[serde(rename = "authenticated")]
Authenticated,
#[serde(rename = "authenticated-blake2")]
AuthenticatedBlake2,
#[serde(rename = "repokey")]
Repokey,
#[serde(rename = "keyfile")]
Keyfile,
#[serde(rename = "repokey-blake2")]
RepokeyBlake2,
#[serde(rename = "keyfile-blake2")]
KeyfileBlake2,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Cache {
pub path: String,
pub stats: CacheStats,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct CacheStats {
pub total_chunks: u64,
pub total_csize: u64,
pub total_size: u64,
pub total_unique_chunks: u64,
pub unique_csize: u64,
pub unique_size: u64,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct Limits {
pub max_archive_size: f64,
}