Enum Subcommand

Source
pub enum Subcommand {
Show 16 variants Ping(Ping), ListProviders(ListProviders), ListAuthenticators(ListAuthenticators), ListOpcodes(ListOpcodes), ListKeys(ListKeys), GenerateRandom(GenerateRandom), ExportPublicKey(ExportPublicKey), CreateRsaKey(CreateRsaKey), CreateEccKey(CreateEccKey), Decrypt(Decrypt), Sign(Sign), DeleteKey(DeleteKey), ListClients(ListClients), DeleteClient(DeleteClient), CreateCsr(CreateCsr), Encrypt(Encrypt),
}
Expand description

Command-line interface to Parsec operations.

Variants§

§

Ping(Ping)

Ping the Parsec service and prints the wire protocol version.

§

ListProviders(ListProviders)

List the available providers supported by the Parsec service.

§

ListAuthenticators(ListAuthenticators)

List the available authenticators supported by the Parsec service.

§

ListOpcodes(ListOpcodes)

List the supported opcodes for a given provider.

§

ListKeys(ListKeys)

List all keys belonging to the application.

§

GenerateRandom(GenerateRandom)

Generate a sequence of random bytes.

§

ExportPublicKey(ExportPublicKey)

Export the public part of the key pair in PEM format

§

CreateRsaKey(CreateRsaKey)

Create a RSA key pair (2048 bits). Used by default for asymmetric encryption with RSA PKCS#1 v1.5.

§

CreateEccKey(CreateEccKey)

Create a ECC key pair (curve secp256r1). Used by default for asymmetric signing with ECDSA (SHA-256).

§

Decrypt(Decrypt)

Decrypt data using the algorithm of the key

§

Sign(Sign)

Sign data using the algorithm of the key (base64 signature)

§

DeleteKey(DeleteKey)

Delete a key.

§

ListClients(ListClients)

Lists all clients currently having data in the service (admin operation).

§

DeleteClient(DeleteClient)

Delete all data a client has in the service (admin operation).

§

CreateCsr(CreateCsr)

Create a Certificate Signing Request (CSR) from a keypair.

§

Encrypt(Encrypt)

Encrypt data using the algorithm of the key

Implementations§

Source§

impl Subcommand

Source

pub fn run(&self, client: BasicClient) -> Result<()>

Runs the subcommand.

Source

pub fn create_client(&self, app_name: Option<String>) -> Result<BasicClient>

Get BasicClient for operation

Trait Implementations§

Source§

impl Debug for Subcommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl StructOpt for Subcommand

Source§

fn clap<'a, 'b>() -> App<'a, 'b>

Returns clap::App corresponding to the struct.
Source§

fn from_clap(matches: &ArgMatches<'_>) -> Self

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by StructOpt::clap called on the same type, otherwise it must panic.
Source§

fn from_args() -> Self
where Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program.
Source§

fn from_args_safe() -> Result<Self, Error>
where Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program, so calling .exit is up to you.
Source§

fn from_iter<I>(iter: I) -> Self
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more
Source§

fn from_iter_safe<I>(iter: I) -> Result<Self, Error>
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,