summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-24 18:02:11 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-24 18:02:11 -0700
commitac53f1b078559fe5ba806eae6f7a768ee009b4f7 (patch)
treec4c114c8b3c12a7f954d77c29f8299cda00632ef /src/lib.rs
parent5b50ad40c42202ccd992a6936cd57cf9eb400d0a (diff)
downloades-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.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index a4cdc3c..8ea77d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,