diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2023-09-01 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2023-09-13 09:24:49 +0000 |
| commit | 6423baebd92e45c9be85157c443dff42e65d8d14 (patch) | |
| tree | 6548edfd80d0cd9d1267378ebe816ec95e394137 /src/sub_commands/login.rs | |
| parent | 5c5feaa732363e32e2a980a887fa42b4394b1a5e (diff) | |
refactor: rebuild app skeleton
Create skeleton for a complete rebuild of the prototype as a production
ready product.
Includes design patterns for:
- dependency injection
- unit testing with dependency mocking
- integration testing
- error handling
- config storage
BREAKING-CHANGE: ground-up redesign with incompatible protocol standards
Diffstat (limited to 'src/sub_commands/login.rs')
| -rw-r--r-- | src/sub_commands/login.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sub_commands/login.rs b/src/sub_commands/login.rs new file mode 100644 index 0000000..d61f578 --- /dev/null +++ b/src/sub_commands/login.rs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | use anyhow::Result; | ||
| 2 | use clap; | ||
| 3 | |||
| 4 | use crate::{login, Cli}; | ||
| 5 | |||
| 6 | #[derive(clap::Args)] | ||
| 7 | pub struct SubCommandArgs; | ||
| 8 | |||
| 9 | pub fn launch(args: &Cli, _command_args: &SubCommandArgs) -> Result<()> { | ||
| 10 | login::launch(&args.nsec) | ||
| 11 | } | ||