mirror of
https://github.com/NLnetLabs/dnst.git
synced 2026-09-28 20:54:57 +02:00
* implement ldns-update and dnst update * implement TSIG support for dnst update * update: imports compliant with domain's CONTRIBUTING.md * Use RequestMessage instead of RequestMessageMulti as we're expecting to receive multiple responses because we don't expect to send XFR requests. * Clippy. * update: fix parsing of optional IP addr * WIP * update: make it compile after rebase * start testing update * update: stelline test * update: fix some comments and strings * update: improve TSIG error message * update: use lookup_host instead of manual A query * notify & update: merge the separate TSigInfo instances * update: look in both answer and authority sections * fix duplicate clippy attribute --------- Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
26 lines
481 B
Rust
26 lines
481 B
Rust
use crate::env::Env;
|
|
|
|
use super::commands::Command;
|
|
use super::error::Error;
|
|
|
|
use clap::Parser;
|
|
|
|
#[derive(Clone, Debug, Parser)]
|
|
#[command(version, disable_help_subcommand = true)]
|
|
pub struct Args {
|
|
#[command(subcommand)]
|
|
pub command: Command,
|
|
}
|
|
|
|
impl Args {
|
|
pub fn execute(self, env: impl Env) -> Result<(), Error> {
|
|
self.command.execute(env)
|
|
}
|
|
}
|
|
|
|
impl From<Command> for Args {
|
|
fn from(value: Command) -> Self {
|
|
Args { command: value }
|
|
}
|
|
}
|