diff options
author | Alex Auvolat <alex@adnab.me> | 2023-06-14 16:56:15 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-06-14 16:56:15 +0200 |
commit | 7895f99d3afc6e97f62f52abe06a6ee8d0f0617f (patch) | |
tree | 54918eaff3880d013d59b77db2091c56c5f45fb7 /src/garage/cli/structs.rs | |
parent | 4a82f6380e6a7d7c841477fc914fd96e6c09adad (diff) | |
download | garage-7895f99d3afc6e97f62f52abe06a6ee8d0f0617f.tar.gz garage-7895f99d3afc6e97f62f52abe06a6ee8d0f0617f.zip |
admin and cli: hide secret keys unless asked
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 2547fb8d..05d2ea31 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -328,7 +328,7 @@ pub enum KeyOperation { /// Get key info #[structopt(name = "info", version = garage_version())] - Info(KeyOpt), + Info(KeyInfoOpt), /// Create new key #[structopt(name = "create", version = garage_version())] @@ -356,9 +356,12 @@ pub enum KeyOperation { } #[derive(Serialize, Deserialize, StructOpt, Debug)] -pub struct KeyOpt { +pub struct KeyInfoOpt { /// ID or name of the key pub key_pattern: String, + /// Whether to display the secret key + #[structopt(long = "show-secret")] + pub show_secret: bool, } #[derive(Serialize, Deserialize, StructOpt, Debug)] |