wasmer_cli/commands/domain/
mod.rs

1pub mod get;
2pub mod list;
3pub mod register;
4pub mod zonefile;
5use crate::commands::AsyncCliCommand;
6
7/// Manage DNS records
8#[derive(clap::Subcommand, Debug)]
9pub enum CmdDomain {
10    /// List domains
11    List(self::list::CmdDomainList),
12
13    /// Get a domain
14    Get(self::get::CmdDomainGet),
15
16    /// Get zone file for a domain
17    GetZoneFile(self::zonefile::CmdZoneFileGet),
18
19    /// Sync local zone file with remotex
20    SyncZoneFile(self::zonefile::CmdZoneFileSync),
21
22    /// Register new domain
23    Register(self::register::CmdDomainRegister),
24}
25
26#[async_trait::async_trait]
27impl AsyncCliCommand for CmdDomain {
28    type Output = ();
29
30    async fn run_async(self) -> Result<(), anyhow::Error> {
31        match self {
32            CmdDomain::List(cmd) => cmd.run_async().await,
33            CmdDomain::Get(cmd) => cmd.run_async().await,
34            CmdDomain::GetZoneFile(cmd) => cmd.run_async().await,
35            CmdDomain::SyncZoneFile(cmd) => cmd.run_async().await,
36            CmdDomain::Register(cmd) => cmd.run_async().await,
37        }
38    }
39}