xbp 10.17.1

XBP is a zero-config build pack that can also interact with proxies, kafka, sockets, synthetic monitors.
Documentation
use crate::cli::commands::NginxSubCommand;
use crate::sdk::nginx;
use anyhow::Result;

pub async fn run_nginx(command: NginxSubCommand, debug: bool) -> Result<()> {
    match command {
        NginxSubCommand::Setup {
            domain,
            port,
            email,
            dns_mode,
            dns_plugin,
            dns_creds,
            include_base,
        } => {
            let options = nginx::NginxSetupOptions {
                domain,
                port,
                email,
                dns_mode: dns_mode.into(),
                dns_plugin,
                dns_creds,
                include_base,
            };
            nginx::setup_nginx(&options, debug).await
        }
        NginxSubCommand::List => nginx::list_nginx(debug).await,
        NginxSubCommand::Show { domain } => nginx::show_nginx(domain.as_deref(), debug).await,
        NginxSubCommand::Edit { domain } => nginx::edit_nginx(&domain, debug).await,
        NginxSubCommand::Update { domain, port } => nginx::update_nginx(&domain, port, debug).await,
    }
}