Skip to content

Commit 39b1470

Browse files
committed
Update readme
1 parent f96630e commit 39b1470

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

conf/conf.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
---
22
port: 17777 # port to listen at
3+
default_cache_lifetime: 5m # e.g.: 180s, 3m... 0 for no caching
4+
35
api: # list of api endpoints
46
# url where to endpoint is reachable
57
all.json:
68

7-
# folder to be scanned for files
8-
folder: ../testdata
9+
# data source, can be folder, file or url
10+
source: ../testdata
11+
12+
# method to read the data, to specify http request method
13+
# not necessary for file reading
14+
# method: get
915

1016
# only detect files which fit the regex filter
1117
regex_filter: ".+"
@@ -25,7 +31,7 @@ api: # list of api endpoints
2531

2632
# set of return values to add to the final json
2733
# bool values are by default false and have to be enabled explicitely
28-
return_values:
34+
return:
2935
# an array of the file path split at the path separator
3036
split_path: false
3137

readme.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Tyson Tap ![build](https://github.com/triole/tap-waiter/actions/workflows/build.yaml/badge.svg) ![test](https://github.com/triole/tap-waiter/actions/workflows/test.yaml/badge.svg)
1+
# Tap Waiter ![build](https://github.com/triole/tap-waiter/actions/workflows/build.yaml/badge.svg) ![test](https://github.com/triole/tap-waiter/actions/workflows/test.yaml/badge.svg)
22

33
<!-- toc -->
44

@@ -12,20 +12,26 @@
1212

1313
## Synopsis
1414

15-
Tyson Tap offers an http api that serves json objects containing information about toml, yaml, json or markdown files that were indexed from specific folders.
15+
Tap Waiter offers an http api that serves json objects containing information about toml, yaml, json or markdown files that were indexed from specific folders.
1616

1717
## Configuration
1818

1919
A configuration file is required and defines the listening port and the api endpoint definitions. A simple example can be found below and another in the `testdata` folder.
2020

2121
```go mdox-exec="tail -n +2 conf/conf.yaml"
2222
port: 17777 # port to listen at
23+
default_cache_lifetime: 5m # e.g.: 180s, 3m... 0 for no caching
24+
2325
api: # list of api endpoints
2426
# url where to endpoint is reachable
2527
all.json:
2628

27-
# folder to be scanned for files
28-
folder: ../testdata
29+
# data source, can be folder, file or url
30+
source: ../testdata
31+
32+
# method to read the data, to specify http request method
33+
# not necessary for file reading
34+
# method: get
2935

3036
# only detect files which fit the regex filter
3137
regex_filter: ".+"
@@ -45,7 +51,7 @@ api: # list of api endpoints
4551

4652
# set of return values to add to the final json
4753
# bool values are by default false and have to be enabled explicitely
48-
return_values:
54+
return:
4955
# an array of the file path split at the path separator
5056
split_path: false
5157

@@ -84,7 +90,25 @@ order:
8490
Here are a few URL parameter examples which are hopefully self explanatory. Please keep in mind that special characters have to be url encoded.
8591

8692
```go mdox-exec="sh/display_test_urls.sh"
87-
93+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
94+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
95+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
96+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
97+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
98+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
99+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
100+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
101+
/home/ole/rolling/golang/projects/tap-waiter/testdata/dump rxfilter=.+ url=/all.json
102+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/mapval/spec.yaml specs=[map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/markdown/1.md exp:[title1] key:front_matter.title] map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/markdown/1.md exp:[tag1 tag2] key:front_matter.tags] map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/yaml/cpx/data_aip.yaml exp:[Data Services @ AIP] key:title] map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/yaml/cpx/data_aip.yaml exp:[open] key:metadata.access] map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/yaml/cpx/data_aip.yaml exp:[vo IVOA Daiquiri] key:metadata.tags] map[content_file:/home/ole/rolling/golang/projects/tap-waiter/testdata/dump/yaml/cpx/data_aip.yaml exp:[https://data.aip.de] key:metadata.url]]
103+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_co_tag1.yaml specs=[map[exp:[markdown/1.md markdown/subfolder1/1.md markdown/subfolder1/2.md markdown/subfolder1/3.md markdown/subfolder1/4.md] urls:[/all.json?filter=front_matter.tags==tag1]]]
104+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_eq_ivoa.yaml specs=[map[exp:[yaml/cpx/data_aip.yaml] urls:[/all.json?filter=metadata.tags==ivoa]]]
105+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_eq_tag1.yaml specs=[map[exp:[markdown/subfolder1/1.md] urls:[/all.json?filter=front_matter.tags===tag1]]]
106+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_nco_tag1.yaml specs=[map[exp:[markdown/subfolder2/1.md markdown/subfolder2/2.md markdown/subfolder2/3.md] urls:[/all.json?filter=front_matter.tags!=tag1]]]
107+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_neq_ivoa.yaml specs=[map[exp:[markdown/subfolder2/3.md markdown/subfolder2/2.md markdown/subfolder2/1.md markdown/subfolder1/4.md markdown/subfolder1/3.md markdown/subfolder1/2.md markdown/subfolder1/1.md yaml/4.yaml markdown/no_front_matter.md markdown/1.md json/list.json html/3.html html/2.html html/1.html] urls:[/all.json?filter=tags!==ivoa&order=desc]]]
108+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_filter_front_matter_tags_neq_tag1.yaml specs=[map[exp:[markdown/subfolder2/3.md markdown/subfolder2/2.md markdown/subfolder2/1.md markdown/subfolder1/4.md markdown/subfolder1/3.md markdown/subfolder1/2.md markdown/1.md] urls:[/all.json?filter=front_matter.tags!==tag1&order=desc]]]
109+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_sortby_front_matter_title.yaml specs=[map[exp:[markdown/subfolder2/1.md markdown/subfolder1/1.md markdown/subfolder1/3.md markdown/subfolder1/4.md markdown/subfolder1/2.md markdown/1.md markdown/subfolder2/2.md markdown/subfolder2/3.md sort.yaml binary/binary_1k.file binary/binary_5k.file html/1.html html/2.html html/3.html html/more_than_10k.html html/sort.yaml json/list.json markdown/no_front_matter.md markdown/sort.yaml yaml/1.yaml yaml/2.yaml yaml/3.yaml yaml/4.yaml yaml/more_than_10k.yaml yaml/cpx/data_aip.yaml] urls:[/all.json?sortby=front_matter.title]]]
110+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all_sortby_size.yaml specs=[map[exp:[yaml/more_than_10k.yaml html/more_than_10k.html binary/binary_5k.file binary/binary_1k.file yaml/1.yaml yaml/4.yaml yaml/2.yaml yaml/3.yaml yaml/cpx/data_aip.yaml html/3.html html/2.html html/1.html markdown/sort.yaml markdown/subfolder1/3.md markdown/subfolder2/1.md markdown/subfolder1/2.md markdown/subfolder2/2.md markdown/subfolder1/4.md markdown/1.md markdown/subfolder2/3.md markdown/subfolder1/1.md markdown/no_front_matter.md json/list.json sort.yaml html/sort.yaml] urls:[/all.json?sortby=size&order=desc]]]
111+
/home/ole/rolling/golang/projects/tap-waiter/testdata/specs/server/all.yaml specs=[map[exp:[sort.yaml binary/binary_1k.file binary/binary_5k.file html/1.html html/2.html html/3.html html/more_than_10k.html html/sort.yaml json/list.json markdown/1.md markdown/no_front_matter.md markdown/sort.yaml yaml/1.yaml yaml/2.yaml yaml/3.yaml yaml/4.yaml yaml/more_than_10k.yaml markdown/subfolder1/1.md markdown/subfolder1/2.md markdown/subfolder1/3.md markdown/subfolder1/4.md markdown/subfolder2/1.md markdown/subfolder2/2.md markdown/subfolder2/3.md yaml/cpx/data_aip.yaml] urls:[/all.json]]]
88112
```
89113

90114
# Filters

testdata/conf.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
port: 17777
3-
# use like: 180s, 3m... 0 for no caching
43
default_cache_lifetime: 5m
54

65
api:

0 commit comments

Comments
 (0)