use std::path::PathBuf;
use clap::Parser;
use doku::Document;
use serde::{Deserialize, Serialize};
#[derive(Document, Deserialize)]
pub struct Settings {
pub application: Application,
pub telemetry: byre::telemetry::TelemetrySettings,
}
#[derive(Document, Deserialize)]
pub struct Application {
#[doku(example = "8080")]
pub listen_port: u16,
#[doku(example = "localhost")]
pub listen_host: String,
#[doku(example = "/var/db/my_databases")]
pub application_db_dir: PathBuf,
}
#[derive(Parser, Deserialize, Serialize)]
pub struct Arguments {
#[arg(short, long)]
pub enable_world_peace: bool,
#[arg(short, long)]
pub override_me: bool,
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let service_info = byre::service_info!();
let cli = byre::cli::Cli::<Settings, Arguments>::new(&service_info, "MYAPP_");
let _telemetry = byre::telemetry::init(&service_info, &cli.config.telemetry)?;
let _listen_port = cli.config.application.listen_port;
let _listen_hostname = cli.config.application.listen_host;
if cli.args.enable_world_peace {
}
Ok(())
}