summaryrefslogtreecommitdiffstats
path: root/src/parse.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 12:22:17 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 12:22:17 -0700
commitb92c7b38013a94f8310900e8e04b8b201d69de43 (patch)
tree5428b38e807df2626887390b230a8bfcdf664fdd /src/parse.rs
parent01e5348c1c0ca9fbf2826e4e35d71a743ba28741 (diff)
downloades-public-proxy-b92c7b38013a94f8310900e8e04b8b201d69de43.tar.gz
es-public-proxy-b92c7b38013a94f8310900e8e04b8b201d69de43.zip
progress: query param parsing, small renamings
Diffstat (limited to 'src/parse.rs')
-rw-r--r--src/parse.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse.rs b/src/parse.rs
index a4cdc3c..0bd1eeb 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -9,6 +9,8 @@ pub struct ApiRequest {
pub body: Option<SearchBody>,
}
+#[derive(Serialize, Deserialize, Debug, Default)]
+#[serde(deny_unknown_fields)]
pub struct UrlQueryParams {
pub allow_no_indices: Option<bool>,
pub allow_partial_search_results: Option<bool>,
@@ -45,6 +47,12 @@ pub struct UrlQueryParams {
pub track_total_hits: Option<bool>, // XXX: bool or integer
pub typed_keys: Option<bool>,
pub version: Option<bool>,
+
+ // additional generic params
+ pub human: Option<bool>,
+ pub pretty: Option<bool>,
+ pub filter_path: Option<String>,
+ pub error_trace: Option<bool>,
}
// https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html