diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2022-01-04 22:12:26 +0100 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2022-01-04 22:12:26 +0100 |
commit | 2ea8d3a44d89934f7b22ddb932c76322601028a5 (patch) | |
tree | 84d210f850ea745f787cff403fcc553767b5c38c /src/db/index.py | |
parent | a3b5cde94981b9a98d367004b4c513c81e5870e4 (diff) |
Use FastAPI routers and split things to multiple files.
Diffstat (limited to 'src/db/index.py')
-rw-r--r-- | src/db/index.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/db/index.py b/src/db/index.py new file mode 100644 index 0000000..3541ec7 --- /dev/null +++ b/src/db/index.py @@ -0,0 +1,53 @@ +from pydantic import BaseSettings + + +class CouchIindex(BaseSettings): + domain: dict = { + "index": { + "fields": [ + "domain", + ] + }, + "name": "domain-json-index", + "type": "json" + } + ip: dict = { + "index": { + "fields": [ + "domain", + "ip" + ] + }, + "name": "ip-json-index", + "type": "json" + } + port: dict = { + "index": { + "fields": [ + "domain", + "port" + ] + }, + "name": "port-json-index", + "type": "json" + } + asn: dict = { + "index": { + "fields": [ + "domain", + "asn" + ] + }, + "name": "asn-json-index", + "type": "json" + } + asn_country_code: dict = { + "index": { + "fields": [ + "domain", + "asn_country_code" + ] + }, + "name": "asn-country-code-json-index", + "type": "json" + } |