Debian Codegraph @

src/cli/cert.rs

raw
1 //! Command-line parser for `sq cert`.
2
3 use clap::{Parser, Subcommand};
4
5 pub mod export;
6 pub mod import;
7 pub mod lint;
8 pub mod list;
9
10 #[derive(Parser, Debug)]
11 #[clap(
12 name = "cert",
13 about = "Manage certificates",
14 long_about =
15 "Manage certificates
16
17 We use the term \"certificate\", or \"cert\" for short, to refer to \
18 OpenPGP keys that do not contain secrets. This subcommand provides \
19 primitives to generate and otherwise manipulate certs.
20
21 Conversely, we use the term \"key\" to refer to OpenPGP keys that do \
22 contain secrets. See `sq key` for operations on keys.
23 ",
24 subcommand_required = true,
25 arg_required_else_help = true,
26 disable_help_subcommand = true,
27 )]
28 pub struct Command {
29 #[clap(subcommand)]
30 pub subcommand: Subcommands,
31 }
32
33 #[derive(Debug, Subcommand)]
34 pub enum Subcommands {
35 Import(import::Command),
36 Export(export::Command),
37 List(list::Command),
38 Lint(lint::Command),
39 }