aboutsummaryrefslogtreecommitdiffstats
path: root/plan.txt
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 18:09:18 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 18:15:53 -0700
commit55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f (patch)
tree68d31143996afce99dfa346042c1123dd944f766 /plan.txt
parenta66caf9b7ae476f526a706d31ed5ef4f8d361b00 (diff)
downloades-public-proxy-55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f.tar.gz
es-public-proxy-55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f.zip
significant increase in parse and test coverage
Diffstat (limited to 'plan.txt')
-rw-r--r--plan.txt73
1 files changed, 47 insertions, 26 deletions
diff --git a/plan.txt b/plan.txt
index 9ab837a..a88eb2f 100644
--- a/plan.txt
+++ b/plan.txt
@@ -1,18 +1,31 @@
-TODO: see what other requests the default python and javascript client libraries use
-
-## basics
-
-- config: TOML, env, args
-- filter requests by method and endpoint
-- filter query parameters
-- parse request bodies (queries)
-- method/body for denied requests
-- async streaming responses
+x filter requests by method and endpoint
+x parse query parameters (typed)
+x re-serialize query parameters into upstream request URL
+x method/body for denied requests
+- create full request objects in tests
+- bad request tests (parse error, disabled query types, etc)
+- "completeness" over all the below query types and parameters
+- real fatcat+scholar request tests
- minimize tokio feature flags
+- see what other requests the default python and javascript client libraries use
+- put ProxyConfig in Box? less cloning?
+- config: TOML, env, args
+ => separate parse schema from options schema
+ => example file
+- refactor unwrap() into error handling
+- package/release
+ => generate .deb file
+ => Makefile
+ => manpage
+ => example config?
+ => README
+ => push git repo
+- test in with https://search.qa.fatcat.wiki and observable (javascript)
+
+parse method+path (index) -> which validation method
+method+path+params+body -> status, upstream request
-factoring:
-- validate query method (method, path, query, body)
## general endpoints
@@ -29,7 +42,7 @@ factoring:
## per-index endpoints
- basic info; mapping
- (?)
+ GET /<index>/_mapping
- count
GET /<index>/_count
- get document
@@ -40,6 +53,7 @@ factoring:
- search
GET /<index>/_search
POST /<index>/_search
+- mapping
later:
@@ -65,31 +79,34 @@ fulltext:
(bare str allowed)
value (str)
- multi_match
-- query_string
+x query_string
- simple_query_string
term-level:
-- range
+x exists
+ field (str)
+x ids
+ values (array of str)
+x prefix
+x range
<field>
gt, gte, lt, lte: str or number
-- term
+- NOT regex (?)
+x term
<field>
value: str or number
-- terms
+x terms
+ does not support "lookup" from other indices
<field>
(array of str or number)
-- wildcard
+x wildcard
<field>
value (str)
boost (float, optional)
rewrite (str, optional)
-- exists
- field (str)
-- ids
- values (array of str)
-- match_all
+x match_all
boost (float, optional)
-- match_none
+x match_none
boost (float, optional)
@@ -100,6 +117,10 @@ TODO:
## additional stuff
-- HTTP content-encoding: gzip
-- content-type header; always JSON?
+- headers
+ - HTTP content-encoding: gzip
+ - content-type header; always JSON?
+ - set "Via" header in responses (indicating proxy version/context)
- https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html
+- logging
+- switch from 'url' to 'percent-encoding' (?)