HomeDisk/types/src/config/types.rs

27 lines
553 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Config {
pub http: ConfigHTTP,
pub jwt: ConfigJWT,
pub storage: ConfigStorage,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConfigHTTP {
pub host: String,
pub port: u16,
pub cors: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConfigJWT {
pub secret: String,
pub expires: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConfigStorage {
pub path: String,
}