feat: prepare initial cli layout
Made initial command scopes d -> docker related commands dc -> docker compose related commands dj -> django related commands pg -> postgres related commands
This commit is contained in:
37
src/cli/ahab.rs
Normal file
37
src/cli/ahab.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use super::{Django, Docker, DockerCompose, Postgres};
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
/// A program for interacting with various dockerized applications.
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about=None)]
|
||||
pub struct Ahab {
|
||||
#[command(subcommand)]
|
||||
pub command: Commands,
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Docker related subcommands
|
||||
D {
|
||||
#[command(subcommand)]
|
||||
command: Docker,
|
||||
},
|
||||
|
||||
/// Docker compose related subcommands
|
||||
Dc {
|
||||
#[command(subcommand)]
|
||||
command: DockerCompose,
|
||||
},
|
||||
|
||||
/// Docker compose related subcommands
|
||||
Dj {
|
||||
#[command(subcommand)]
|
||||
command: Django,
|
||||
},
|
||||
|
||||
/// Postgres related subcommands
|
||||
Pg {
|
||||
#[command(subcommand)]
|
||||
command: Postgres,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user