use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FileStorageConfig {
pub storage_type: String,
pub local_path: Option<String>,
pub s3: Option<S3Config>,
}
impl Default for FileStorageConfig {
fn default() -> Self {
Self {
storage_type: "local".to_string(),
local_path: Some("./data".to_string()),
s3: None,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct S3Config {
pub bucket: String,
pub region: String,
pub access_key_id: String,
pub secret_access_key: String,
pub endpoint: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VectorDbConfig {
pub db_type: String,
pub url: String,
pub api_key: String,
pub index_name: String,
}
impl Default for VectorDbConfig {
fn default() -> Self {
Self {
db_type: "pinecone".to_string(),
url: String::new(),
api_key: String::new(),
index_name: "default".to_string(),
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct AlertingConfig {
#[serde(default)]
pub enabled: bool,
pub slack_webhook: Option<String>,
pub email: Option<EmailConfig>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EmailConfig {
pub smtp_server: String,
pub smtp_port: u16,
pub username: String,
pub password: String,
pub from_address: String,
pub to_addresses: Vec<String>,
}