Add subcommand to list local certificates
- Add `husk locals list` to list all certificates which would be used by husk, but are not introduced by another certificate. These certificates are added 'locally'. - Refcator the code so that `local` -> `locals`.
This commit is contained in:
+10
-10
@@ -25,7 +25,7 @@ pub struct CliArgs {
|
||||
pub enum HuskSubcommands {
|
||||
Daemon(DaemonCommand),
|
||||
Introducer(IntroducerCommand),
|
||||
Local(LocalCommand),
|
||||
Locals(LocalsCommand),
|
||||
}
|
||||
|
||||
// Daemon subcommands
|
||||
@@ -134,23 +134,23 @@ pub struct IntroducerRemoveCommand {
|
||||
disable_colored_help = true,
|
||||
disable_version_flag = true,
|
||||
)]
|
||||
pub struct LocalCommand {
|
||||
pub struct LocalsCommand {
|
||||
#[clap(subcommand)]
|
||||
pub subcommand: LocalSubcommand,
|
||||
pub subcommand: LocalsSubcommand,
|
||||
}
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum LocalSubcommand {
|
||||
Add(LocalAddCommand),
|
||||
Remove(LocalRemoveCommand),
|
||||
pub enum LocalsSubcommand {
|
||||
Add(LocalsAddCommand),
|
||||
Remove(LocalsRemoveCommand),
|
||||
List
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(
|
||||
name = "local_add",
|
||||
name = "locals_add",
|
||||
about = "Add an authenticated certificate.",
|
||||
)]
|
||||
pub struct LocalAddCommand {
|
||||
pub struct LocalsAddCommand {
|
||||
#[clap(
|
||||
long = "cert",
|
||||
help = "Certificate to add."
|
||||
@@ -160,10 +160,10 @@ pub struct LocalAddCommand {
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(
|
||||
name = "local_remove",
|
||||
name = "locals_remove",
|
||||
about = "Certificate to remove.",
|
||||
)]
|
||||
pub struct LocalRemoveCommand {
|
||||
pub struct LocalsRemoveCommand {
|
||||
#[clap(
|
||||
long = "cert",
|
||||
help = "Certificate to removed."
|
||||
|
||||
Reference in New Issue
Block a user