-
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.
feat: initial cli structure for supported commansd
- Loading branch information
1 parent
a2ada08
commit d840539
Showing
4 changed files
with
54 additions
and
0 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,12 @@ | ||
[package] | ||
name = "cli" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
clap.workspace = true |
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,8 @@ | ||
use clap::Subcommand; | ||
|
||
#[derive(Debug, Subcommand)] | ||
pub enum Cmd { | ||
Node, | ||
Service, | ||
Deploy, | ||
} |
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,28 @@ | ||
use clap::{Args, Parser, Subcommand}; | ||
|
||
mod ctl; | ||
mod worker; | ||
|
||
#[derive(Debug, Parser)] | ||
struct Cli { | ||
#[command(subcommand)] | ||
cmd: Cmd, | ||
} | ||
|
||
#[derive(Debug, Subcommand)] | ||
enum Cmd { | ||
Ctl(Ctl), | ||
Worker(Worker), | ||
} | ||
|
||
#[derive(Args, Debug)] | ||
struct Ctl { | ||
cmd: ctl::Cmd, | ||
} | ||
|
||
#[derive(Args, Debug)] | ||
struct Worker { | ||
cmd: worker::Cmd, | ||
} | ||
|
||
fn main() {} |
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,6 @@ | ||
use clap::Subcommand; | ||
|
||
#[derive(Debug, Subcommand)] | ||
pub enum Cmd { | ||
Stop, | ||
} |