make structs public
This commit is contained in:
parent
39175412ba
commit
b6d0359f6c
1 changed files with 11 additions and 11 deletions
22
src/data.rs
22
src/data.rs
|
@ -3,32 +3,32 @@ use std::{collections::HashMap, path::PathBuf, str::FromStr};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||||
struct SiteInfo {
|
pub(crate) struct SiteInfo {
|
||||||
aliases: Vec<String>,
|
pub(crate) aliases: Vec<String>,
|
||||||
/// Aliases for this subdomain - will have the same exact settings
|
/// Aliases for this subdomain - will have the same exact settings
|
||||||
/// The socket address (e.g. `192.168.1.8:8080`) or port number (if on `localhost`) of the service to reverse proxy
|
/// The socket address (e.g. `192.168.1.8:8080`) or port number (if on `localhost`) of the service to reverse proxy
|
||||||
address: String,
|
pub(crate) address: String,
|
||||||
/// What auth file to use - 0 means none
|
/// What auth file to use - 0 means none
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
auth: Option<u8>,
|
pub(crate) auth: Option<u8>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
conf_file: Option<PathBuf>,
|
pub(crate) conf_file: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||||
struct Config {
|
pub(crate) struct Config {
|
||||||
/// What directory to output the conf files to
|
/// What directory to output the conf files to
|
||||||
#[serde(default = "default_output_dir")]
|
#[serde(default = "default_output_dir")]
|
||||||
output_dir: PathBuf,
|
pub(crate) output_dir: PathBuf,
|
||||||
domain: String,
|
pub(crate) domain: String,
|
||||||
/// Subdomains/services in the format `subdomain: SiteInfo`
|
/// Subdomains/services in the format `subdomain: SiteInfo`
|
||||||
subdomains: HashMap<String, SiteInfo>,
|
pub(crate) subdomains: HashMap<String, SiteInfo>,
|
||||||
/// Paths to the htpasswd file for each auth number - starts at 1, goes to 255; see [`SiteInfo`]
|
/// Paths to the htpasswd file for each auth number - starts at 1, goes to 255; see [`SiteInfo`]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
htpasswd_files: Option<Vec<PathBuf>>,
|
pub(crate) htpasswd_files: Option<Vec<PathBuf>>,
|
||||||
/// Default IP for if it's not specified in `socket_address_or_port` in [`SiteInfo`]. Defaults to localhost if not specified.
|
/// Default IP for if it's not specified in `socket_address_or_port` in [`SiteInfo`]. Defaults to localhost if not specified.
|
||||||
#[serde(default = "default_default_ip")]
|
#[serde(default = "default_default_ip")]
|
||||||
default_ip: String,
|
pub(crate) default_ip: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generates the default
|
/// Generates the default
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue