2022-04-19 19:10:36 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
|
|
pub struct Config {
|
|
|
|
pub http: ConfigHTTP,
|
|
|
|
pub jwt: ConfigJWT,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[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,
|
2022-04-23 10:52:56 +00:00
|
|
|
pub expires: i64,
|
2022-04-19 19:10:36 +00:00
|
|
|
}
|