use serde::{Deserialize, Serialize};
use struct_input::StructInput;
#[derive(Serialize, Deserialize, Debug, Clone, StructInput)]
pub struct ServerConfig {
#[struct_input(format="Name")]
pub name: String,
#[struct_input(format="BaseUrl")]
pub base_url: Option<String>,
#[struct_input(format="NotAllowWhitespace")]
pub docker_container_name: Option<String>,
#[struct_input(format="NotAllowWhitespace")]
pub health_check_path: Option<String>,
#[struct_input(format="NotAllowWhitespace")]
pub kill_path: Option<String>,
#[struct_input]
pub log_command: Option<String>,
}
impl ServerConfig {
pub fn new(name: String, base_url: Option<String>, docker_container_name: Option<String>, health_check_path: Option<String>, kill_path: Option<String>, log_command: Option<String>,) -> Self {
Self {
name: String::from(name),
base_url,
docker_container_name,
health_check_path,
kill_path,
log_command
}
}
}