2021-02-02 00:53:33 +03:00
|
|
|
use std::path::PathBuf;
|
2021-01-31 02:54:23 +03:00
|
|
|
pub use structopt::StructOpt;
|
|
|
|
|
|
|
|
#[derive(Debug, StructOpt)]
|
2021-02-02 00:53:33 +03:00
|
|
|
#[structopt(bin_name = "migra", name = "Migra")]
|
|
|
|
pub(crate) struct AppOpt {
|
|
|
|
#[structopt(short, long)]
|
|
|
|
pub config: Option<PathBuf>,
|
|
|
|
|
|
|
|
#[structopt(subcommand)]
|
|
|
|
pub command: Command,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, StructOpt)]
|
|
|
|
pub(crate) enum Command {
|
2021-01-31 02:54:23 +03:00
|
|
|
Init,
|
2021-02-02 00:53:33 +03:00
|
|
|
|
|
|
|
Apply(ApplyCommandOpt),
|
|
|
|
|
|
|
|
#[structopt(name = "list", visible_alias = "ls")]
|
|
|
|
List,
|
2021-01-31 13:41:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, StructOpt)]
|
2021-02-02 00:53:33 +03:00
|
|
|
pub(crate) struct ApplyCommandOpt {
|
2021-01-31 13:41:12 +03:00
|
|
|
#[structopt(parse(from_str))]
|
2021-02-01 23:51:23 +03:00
|
|
|
pub file_name: String,
|
2021-01-31 02:54:23 +03:00
|
|
|
}
|