1use clap::Parser;
23#[derive(Parser, Debug)]
4#[command(author, version, about = "Deploy a Synchronic Web Journal Software Development Kit (SDK) as a local webserver")]
5pub struct Config {
6#[arg(short, long, default_value_t = String::from(""), help = "Path to the persistent database")]
7pub database: String,
89#[arg(short, long, default_value_t = 4096, help = "Port to access the webserver")]
10pub port: u16,
1112#[arg(short, long, default_value_t = String::from(""), help = "Initial script to pass into the Journal")]
13pub boot: String,
1415#[arg(short, long, default_value_t = String::from(""), help = "If set, then evaluate the provided query, print, and exit immediately")]
16pub evaluate: String,
1718#[arg(short, long, default_value_t = String::from(""), help = "Contents of the step query")]
19pub step: String,
2021#[arg(short = 'c', long, default_value_t = 0, help = "Power of two determining the period of the step query")]
22pub periodicity: i32,
23}
2425impl Config {
26pub fn new() -> Self {
27 Config::parse()
28 }
29}