mirror of
https://github.com/MedzikUser/HomeDisk.git
synced 2024-08-14 21:46:53 +00:00
27 lines
553 B
Rust
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,
|
|
}
|