use std::path::PathBuf;
use crate::{
cli_utils::CLAP_LONG_VERSION,
common::{
constants::{DEFAULT_PORT, LOCALHOST},
message::RoomId,
},
};
use clap::Parser;
#[derive(Parser, Clone)]
#[command(version, about, long_about = None)]
#[command(propagate_version = true)]
#[command(long_version = CLAP_LONG_VERSION)]
pub struct ServerOptions {
#[arg(short, long, default_value_t = DEFAULT_PORT)]
pub port: u16,
#[arg(long, default_value_t = false, requires("domain"))]
pub public: bool,
#[arg(long, default_value = LOCALHOST, requires("public_pem"), requires("private_pem"))]
pub domain: String,
#[arg(long, requires("private_pem"))]
pub public_pem: Option<PathBuf>,
#[arg(long, requires("public_pem"))]
pub private_pem: Option<PathBuf>,
#[arg(long)]
pub bots: Vec<RoomId>,
}