diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-08-24 18:02:11 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-08-24 18:02:11 -0700 |
commit | ac53f1b078559fe5ba806eae6f7a768ee009b4f7 (patch) | |
tree | c4c114c8b3c12a7f954d77c29f8299cda00632ef /src/lib.rs | |
parent | 5b50ad40c42202ccd992a6936cd57cf9eb400d0a (diff) | |
download | es-public-proxy-ac53f1b078559fe5ba806eae6f7a768ee009b4f7.tar.gz es-public-proxy-ac53f1b078559fe5ba806eae6f7a768ee009b4f7.zip |
config parsing; pass config object through to endpoint function
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2,6 +2,17 @@ use serde::{Serialize, Deserialize}; use std::collections::HashMap; +#[derive(Default, Deserialize, Debug, Clone)] +pub struct ProxyConfig { + pub bind_addr: Option<String>, + pub index: Vec<IndexConfig> +} + +#[derive(Deserialize, Debug, Clone)] +pub struct IndexConfig { + pub name: String, +} + #[derive(Serialize, Deserialize, Debug)] pub struct ApiRequest { pub method: String, |