Loading crates/arti/src/subcommands/keys.rs +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ pub(crate) struct ListArgs { struct OutputFormat { /// Compact format. /// /// Displays every valid entry on a single line when enabled. /// Displays every entry on a single line when enabled. #[arg(long, default_value_t = false)] compact: bool, } Loading crates/arti/tests/cli_tests/keys/util.rs +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ const CFG_PATH: &str = "./tests/testcases/keys/keys.in/keys.toml"; const CFG_PATH_WITH_CTOR: &str = "./tests/testcases/keys/conf/keys.toml"; /// A client of an `ArtiNativeKeystore`. // IDEA: Consider using the // TODO: Consider using the // [const_format](https://docs.rs/const_format/latest/const_format/index.html) crate to reduce duplication. const CLIENT_KEY: &str = "Keystore ID: arti Role: ks_hsc_desc_enc Loading crates/arti/tests/testcases/keys/help-list.stdout +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ Options: --compact Compact format. Displays every valid entry on a single line when enabled. Displays every entry on a single line when enabled. -o <KEY=VALUE> Override config file parameters, using TOML-like syntax. Loading crates/tor-keymgr/src/keystore/arti/err.rs +2 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ pub(crate) enum ArtiNativeKeystoreError { Filesystem(#[from] FilesystemError), /// Found a key with an invalid path. // IDEA: Should we expose the underlying MalformedPathError? The current // // TODO: Should we expose the underlying MalformedPathError? The current // message "Key has invalid path" is too vague. #[error("Key has invalid path: {path}")] MalformedPath { Loading doc/keys.md +7 −2 Original line number Diff line number Diff line Loading @@ -34,14 +34,19 @@ By default the command displays the content of all the keystores. If the flag `--keystore-id` is provided, only the content of the specified keystore will be displayed. This command provides a way of listing both valid and broken entries. This command provides a way of listing both valid and broken (i.e. unrecognized by Arti, or otherwise corrupt) entries. Some of the information displayed by `keys list` can be used as input for other commands. For instance: "Location", is the raw identifier of the entry; and "Keystore ID", the identifier, of the keystore. These can be used together with `arti keys-raw remove-by-id`. `keys list` will supports alternative output formats. Currently, only `compact` is available, with more formats coming soon. By default, `keys list` pretty-prints human-readable output. You can use the `--compact` option to get it to display a more compact representation. > NOTE: in the future, we plan to support machine-readable output too Example usage: Loading Loading
crates/arti/src/subcommands/keys.rs +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ pub(crate) struct ListArgs { struct OutputFormat { /// Compact format. /// /// Displays every valid entry on a single line when enabled. /// Displays every entry on a single line when enabled. #[arg(long, default_value_t = false)] compact: bool, } Loading
crates/arti/tests/cli_tests/keys/util.rs +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ const CFG_PATH: &str = "./tests/testcases/keys/keys.in/keys.toml"; const CFG_PATH_WITH_CTOR: &str = "./tests/testcases/keys/conf/keys.toml"; /// A client of an `ArtiNativeKeystore`. // IDEA: Consider using the // TODO: Consider using the // [const_format](https://docs.rs/const_format/latest/const_format/index.html) crate to reduce duplication. const CLIENT_KEY: &str = "Keystore ID: arti Role: ks_hsc_desc_enc Loading
crates/arti/tests/testcases/keys/help-list.stdout +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ Options: --compact Compact format. Displays every valid entry on a single line when enabled. Displays every entry on a single line when enabled. -o <KEY=VALUE> Override config file parameters, using TOML-like syntax. Loading
crates/tor-keymgr/src/keystore/arti/err.rs +2 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ pub(crate) enum ArtiNativeKeystoreError { Filesystem(#[from] FilesystemError), /// Found a key with an invalid path. // IDEA: Should we expose the underlying MalformedPathError? The current // // TODO: Should we expose the underlying MalformedPathError? The current // message "Key has invalid path" is too vague. #[error("Key has invalid path: {path}")] MalformedPath { Loading
doc/keys.md +7 −2 Original line number Diff line number Diff line Loading @@ -34,14 +34,19 @@ By default the command displays the content of all the keystores. If the flag `--keystore-id` is provided, only the content of the specified keystore will be displayed. This command provides a way of listing both valid and broken entries. This command provides a way of listing both valid and broken (i.e. unrecognized by Arti, or otherwise corrupt) entries. Some of the information displayed by `keys list` can be used as input for other commands. For instance: "Location", is the raw identifier of the entry; and "Keystore ID", the identifier, of the keystore. These can be used together with `arti keys-raw remove-by-id`. `keys list` will supports alternative output formats. Currently, only `compact` is available, with more formats coming soon. By default, `keys list` pretty-prints human-readable output. You can use the `--compact` option to get it to display a more compact representation. > NOTE: in the future, we plan to support machine-readable output too Example usage: Loading