pub struct Cli {
pub debug: bool,
pub i_know_this_is_insecure: bool,
pub tls_cert: Option<String>,
pub tls_key: Option<String>,
pub tls_reload_interval: Option<u64>,
pub tls_client_ca: Option<String>,
pub command: Option<Commands>,
}Expand description
bindcar — HTTP REST API for managing BIND9 zones via RNDC
Fields§
§debug: boolEnable debug-level logging (overrides RUST_LOG)
i_know_this_is_insecure: boolAcknowledge and allow starting with weak/disabled authentication on a non-loopback interface. Without this (or a loopback bind / real auth), bindcar refuses to start to avoid silently exposing an unauthenticated API.
tls_cert: Option<String>PEM certificate chain (leaf first) for the HTTPS listener.
Must be given together with --tls-key. When neither is set bindcar
serves plaintext HTTP, preserving existing behaviour.
tls_key: Option<String>PEM private key for the HTTPS listener (PKCS#8, PKCS#1 or SEC1).
Must be given together with --tls-cert.
tls_reload_interval: Option<u64>How often to re-check the TLS certificate files for a renewal, in seconds.
Defaults to 60. Set to 0 to disable reloading entirely, restoring the
startup-only behaviour of earlier releases. A renewal that fails to load
never interrupts service: the previous certificate keeps serving and the
next poll retries.
tls_client_ca: Option<String>PEM CA bundle used to verify client certificates.
Setting this turns on mutual TLS: a client presenting no certificate, or one not chaining to this bundle, is rejected at the TLS handshake. In the bindy topology both ends have stable in-cluster identities, so mTLS is a better fit than server-only TLS and keeps the bearer token off the wire.
command: Option<Commands>Implementations§
Source§impl Cli
impl Cli
Sourcepub fn resolved_command(&self) -> &Commands
pub fn resolved_command(&self) -> &Commands
Return the resolved command, defaulting to Commands::Run when no subcommand
was given. This preserves backwards compatibility: bindcar with no args
behaves identically to bindcar run.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].