feat: add subcommands cli, serve
This commit is contained in:
18
src/cli.rs
Normal file
18
src/cli.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use rust_util::simple_error;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
impl Command for CommandImpl {
|
||||
fn name(&self) -> &str { "cli" }
|
||||
|
||||
fn subcommand<'a>(&self) -> App<'a, 'a> {
|
||||
SubCommand::with_name(self.name()).about("Local mini KMS cli")
|
||||
.arg(Arg::with_name("connect").long("connect").takes_value(true).default_value("127.0.0.1:6567").help("Connect server"))
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
simple_error!("Not implemented")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user