use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DbConfig {
pub path: String,
pub tiered_mode: bool,
pub sync_mode: bool,
pub hot_threshold: usize,
pub rate_limit_requests: u32,
pub rate_limit_window: u64,
pub max_body_size: usize,
#[serde(skip)]
pub encryption_key: Option<[u8; 32]>,
pub post_backup_script: Option<String>,
}
impl Default for DbConfig {
fn default() -> Self {
Self {
path: "molten.db".to_string(),
tiered_mode: false,
sync_mode: false,
hot_threshold: 50000,
rate_limit_requests: 1000,
rate_limit_window: 60,
max_body_size: 10 * 1024 * 1024,
encryption_key: None,
post_backup_script: None,
}
}
}