| 1 |
//! Command-line parser for `sq network`. |
| 2 |
|
| 3 |
use clap::{Parser, Subcommand}; |
| 4 |
|
| 5 |
pub mod dane; |
| 6 |
pub mod keyserver; |
| 7 |
pub mod search; |
| 8 |
pub mod wkd; |
| 9 |
|
| 10 |
#[derive(Parser, Debug)] |
| 11 |
#[clap( |
| 12 |
name = "network", |
| 13 |
about = "Retrieve and publish certificates over the network", |
| 14 |
long_about = |
| 15 |
"Retrieve and publish certificates over the network |
| 16 |
|
| 17 |
OpenPGP certificates can be discovered and updated from, and published \ |
| 18 |
on services accessible over the network. This is a collection of \ |
| 19 |
commands to interact with these services. |
| 20 |
", |
| 21 |
subcommand_required = true, |
| 22 |
arg_required_else_help = true, |
| 23 |
disable_help_subcommand = true, |
| 24 |
)] |
| 25 |
pub struct Command { |
| 26 |
#[clap(subcommand)] |
| 27 |
pub subcommand: Subcommands, |
| 28 |
} |
| 29 |
|
| 30 |
#[derive(Debug, Subcommand)] |
| 31 |
pub enum Subcommands { |
| 32 |
Search(search::Command), |
| 33 |
Keyserver(keyserver::Command), |
| 34 |
Wkd(wkd::Command), |
| 35 |
Dane(dane::Command), |
| 36 |
} |