-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(crypto): Rename sign command to crypto
- Loading branch information
Showing
10 changed files
with
49 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"rust-analyzer.showUnlinkedFileNotification": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use clap::{Parser, Subcommand}; | ||
use miette::Result; | ||
|
||
use super::Context; | ||
|
||
pub mod check; | ||
pub mod sign; | ||
pub mod keygen; | ||
|
||
mod inout_args; | ||
mod key_args; | ||
|
||
/// Cryptographic operations. | ||
#[derive(Debug, Clone, Parser)] | ||
pub struct CryptoArgs { | ||
/// Crypto subcommand | ||
#[command(subcommand)] | ||
pub action: CryptoAction, | ||
} | ||
|
||
#[derive(Debug, Clone, Subcommand)] | ||
pub enum CryptoAction { | ||
Verify(check::CheckArgs), | ||
Sign(sign::SignArgs), | ||
Keygen(keygen::KeygenArgs), | ||
} | ||
|
||
pub async fn run(ctx: Context<SignArgs>) -> Result<()> { | ||
match ctx.args_top.action.clone() { | ||
CryptoAction::Check(subargs) => check::run(ctx.with_sub(subargs)).await, | ||
CryptoAction::Sign(subargs) => sign::run(ctx.with_sub(subargs)).await, | ||
CryptoAction::Keygen(subargs) => keygen::run(ctx.with_sub(subargs)).await, | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.