config: data structures; basic tests

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia7d6f19a46ec8a4987ea429ec6502f676a6a6964
This commit is contained in:
raf 2026-03-01 00:47:13 +03:00
commit 4c84393286
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 185 additions and 0 deletions

6
testdata/config.invalid.yaml vendored Normal file
View file

@ -0,0 +1,6 @@
site:
domain: ""
salt_rotation: daily
limits:
max_paths: 0

25
testdata/config.valid.yaml vendored Normal file
View file

@ -0,0 +1,25 @@
site:
domain: example.com
salt_rotation: daily
collect:
pageviews: true
country: true
device: true
referrer: classify
custom_events:
- signup
- purchase
path:
strip_query: true
strip_fragment: true
collapse_numeric_segments: true
max_segments: 5
limits:
max_paths: 1000
max_events_per_minute: 10000
server:
listen_addr: :8080
metrics_path: /metrics
ingestion_path: /api/event