2019-10-31 22:00:36 +08:00
|
|
|
use structopt::StructOpt;
|
|
|
|
|
2019-11-20 00:09:06 +08:00
|
|
|
#[derive(Debug, Clone, StructOpt)]
|
|
|
|
pub struct Opt {
|
2019-10-31 22:00:36 +08:00
|
|
|
/// The destination where the database must be created.
|
2019-11-20 00:09:06 +08:00
|
|
|
#[structopt(long, env = "MEILI_DB_PATH", default_value = "/tmp/meilidb")]
|
|
|
|
pub db_path: String,
|
2019-10-31 22:00:36 +08:00
|
|
|
|
2019-11-20 00:09:06 +08:00
|
|
|
/// The address on which the http server will listen.
|
|
|
|
#[structopt(long, env = "MEILI_HTTP_ADDR", default_value = "127.0.0.1:8080")]
|
2019-10-31 22:00:36 +08:00
|
|
|
pub http_addr: String,
|
|
|
|
|
2019-11-20 00:09:06 +08:00
|
|
|
/// The master key allowing you to do everything on the server.
|
|
|
|
#[structopt(long, env = "MEILI_API_KEY")]
|
|
|
|
pub api_key: Option<String>,
|
2019-11-22 02:15:33 +08:00
|
|
|
|
|
|
|
/// Do not send analytics to Meili.
|
|
|
|
#[structopt(long, env = "MEILI_NO_ANALYTICS")]
|
|
|
|
pub no_analytics: bool,
|
2019-10-31 22:00:36 +08:00
|
|
|
}
|