|
@ -5,14 +5,12 @@ pub struct ServerConfig { |
|
|
pub workers: Option<usize>,
|
|
|
pub workers: Option<usize>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct CloudflareDomainConfig {
|
|
|
pub struct CloudflareDomainConfig {
|
|
|
pub domain: String,
|
|
|
pub domain: String,
|
|
|
pub zone_id: String,
|
|
|
pub zone_id: String,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct CloudflareConfig {
|
|
|
pub struct CloudflareConfig {
|
|
|
pub domains: Vec<CloudflareDomainConfig>,
|
|
|
pub domains: Vec<CloudflareDomainConfig>,
|
|
@ -20,42 +18,31 @@ pub struct CloudflareConfig { |
|
|
pub email: String,
|
|
|
pub email: String,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct DDNSDomain {
|
|
|
pub struct DDNSDomain {
|
|
|
pub domain: String,
|
|
|
pub domain: String,
|
|
|
pub subdomains: Vec<String>,
|
|
|
pub subdomains: Vec<String>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct DDNSConfig {
|
|
|
pub struct DDNSConfig {
|
|
|
pub domains: Vec<DDNSDomain>
|
|
|
pub domains: Vec<DDNSDomain>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct UserSubdomainConfig {
|
|
|
|
|
|
pub subdomain: String,
|
|
|
|
|
|
pub targets: Vec<String>,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
pub struct UserDomainConfig {
|
|
|
|
|
|
|
|
|
pub struct UserRootConfig {
|
|
|
pub domain: String,
|
|
|
pub domain: String,
|
|
|
pub subdomains: Vec<UserSubdomainConfig>,
|
|
|
|
|
|
|
|
|
pub root: String,
|
|
|
|
|
|
pub zones: Vec<String>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct UserConfig {
|
|
|
pub struct UserConfig {
|
|
|
pub username: String,
|
|
|
pub username: String,
|
|
|
pub token: String,
|
|
|
pub token: String,
|
|
|
pub domains: Vec<UserDomainConfig>,
|
|
|
|
|
|
|
|
|
pub roots: Vec<UserRootConfig>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
|
pub struct Config {
|
|
|
pub struct Config {
|
|
|
pub server: ServerConfig,
|
|
|
pub server: ServerConfig,
|
|
|