diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-10-29 09:29:16 +0200 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-10-29 09:29:16 +0200 |
commit | 2bfbe7568a8c6477de60a676d9027dcb9714af42 (patch) | |
tree | f4da7aee25d4728659182a2cc19197f341d165d3 /src/index.py | |
parent | 34a353a539f71b6a87413b58ea483b36f94e3516 (diff) |
Use FastAPI + JWT instead of Falcon.
Diffstat (limited to 'src/index.py')
-rw-r--r-- | src/index.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/index.py b/src/index.py index 837f47e..3541ec7 100644 --- a/src/index.py +++ b/src/index.py @@ -1,5 +1,8 @@ -indexes = [ - { +from pydantic import BaseSettings + + +class CouchIindex(BaseSettings): + domain: dict = { "index": { "fields": [ "domain", @@ -7,8 +10,8 @@ indexes = [ }, "name": "domain-json-index", "type": "json" - }, - { + } + ip: dict = { "index": { "fields": [ "domain", @@ -17,8 +20,8 @@ indexes = [ }, "name": "ip-json-index", "type": "json" - }, - { + } + port: dict = { "index": { "fields": [ "domain", @@ -27,8 +30,8 @@ indexes = [ }, "name": "port-json-index", "type": "json" - }, - { + } + asn: dict = { "index": { "fields": [ "domain", @@ -37,8 +40,8 @@ indexes = [ }, "name": "asn-json-index", "type": "json" - }, - { + } + asn_country_code: dict = { "index": { "fields": [ "domain", @@ -48,4 +51,3 @@ indexes = [ "name": "asn-country-code-json-index", "type": "json" } -] |