mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
Add Clap and base config
This commit is contained in:
parent
6519b5c894
commit
845073c29d
20
Cargo.toml
20
Cargo.toml
@ -1,11 +1,29 @@
|
||||
[package]
|
||||
name = "lldap"
|
||||
edition = "2018"
|
||||
version = "0.1.0"
|
||||
authors = [
|
||||
"Valentin Tolmer <valentin@tolmer.fr>",
|
||||
"Steve Barrau <steve.barrau@gmail.com>",
|
||||
"Thomas Wickham <mackwic@gmail.com>"
|
||||
]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
clap = "3.0.0-beta.2"
|
||||
actix-web = "3"
|
||||
anyhow = "*"
|
||||
thiserror="*"
|
||||
http = "*"
|
||||
passablewords = "*"
|
||||
serde = "*"
|
||||
tracing = "*"
|
||||
tracing-actix-web = "*"
|
||||
tracing-log = "*"
|
||||
tracing-subscriber = "*"
|
||||
|
||||
[dependencies.figment]
|
||||
features = ["toml", "env"]
|
||||
version = "*"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "*"
|
||||
|
0
src/domain/.keep
Normal file
0
src/domain/.keep
Normal file
10
src/infra/cli.rs
Normal file
10
src/infra/cli.rs
Normal file
@ -0,0 +1,10 @@
|
||||
use clap::Clap;
|
||||
|
||||
/// lldap is a lightweight LDAP server
|
||||
#[derive(Debug, Clap)]
|
||||
#[clap(version = "0.1", author = "The LLDAP team")]
|
||||
pub struct CLIOpts;
|
||||
|
||||
pub fn init() -> CLIOpts {
|
||||
CLIOpts::parse()
|
||||
}
|
6
src/infra/configuration.rs
Normal file
6
src/infra/configuration.rs
Normal file
@ -0,0 +1,6 @@
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Configuration;
|
||||
|
||||
pub fn init() -> Configuration {
|
||||
Configuration::default()
|
||||
}
|
2
src/infra/mod.rs
Normal file
2
src/infra/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod cli;
|
||||
pub mod configuration;
|
@ -1,3 +1,7 @@
|
||||
mod infra;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let config = infra::configuration::init();
|
||||
let cli_opts = infra::cli::init();
|
||||
println!("Hello, world! Config: {:?}, CLI: {:?}", config, cli_opts);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user