use clap::Parser;
use crate::cli::examples;
use examples::Action;
use examples::Actions;
use crate::cli::types::cert_designator;
use crate::cli::types::CertDesignators;
use super::CertificationNetworkArg;
use super::GossipArg;
use super::RequiredTrustAmountArg;
use super::ShowPathsArg;
use super::UnusableArg;
#[derive(Parser, Debug)]
#[clap(
name = "identify",
after_help = EXAMPLES,
)]
pub struct Command {
#[command(flatten)]
pub cert: CertDesignators<
cert_designator::CertArg,
cert_designator::CertPrefix,
cert_designator::OneValue>,
#[command(flatten)]
pub show_paths: ShowPathsArg,
#[command(flatten)]
pub gossip: GossipArg,
#[command(flatten)]
pub unusable: UnusableArg,
#[command(flatten)]
pub certification_network: CertificationNetworkArg,
#[command(flatten)]
pub trust_amount: RequiredTrustAmountArg,
}
const EXAMPLES: Actions = Actions {
actions: &[
Action::setup().command(&[
"sq", "pki", "link", "add",
"--cert", "EB28F26E2739A4870ECC47726F0073F60FD0CBF0",
"--all",
]).build(),
Action::example().comment(
"Identify the user IDs that can be authenticated for the certificate.",
).command(&[
"sq", "pki", "identify",
"--cert", "EB28F26E2739A4870ECC47726F0073F60FD0CBF0",
]).build(),
Action::example().comment(
"List all user IDs that have that have been certified by anyone.",
).command(&[
"sq", "pki", "identify", "--gossip",
"--cert", "511257EBBF077B7AEDAE5D093F68CB84CE537C9A",
]).build(),
],
};
test_examples!(sq_pki_identify, EXAMPLES);