Skip to content

Commit

Permalink
feat: initial cli structure for supported commansd
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavodiasag committed Apr 30, 2024
1 parent a2ada08 commit d840539
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cli/Cargo.toml
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
8 changes: 8 additions & 0 deletions cli/src/ctl/mod.rs
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,
}
28 changes: 28 additions & 0 deletions cli/src/main.rs
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() {}
6 changes: 6 additions & 0 deletions cli/src/worker/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use clap::Subcommand;

#[derive(Debug, Subcommand)]
pub enum Cmd {
Stop,
}

0 comments on commit d840539

Please sign in to comment.