From 2bfbe7568a8c6477de60a676d9027dcb9714af42 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Fri, 29 Oct 2021 09:29:16 +0200 Subject: Use FastAPI + JWT instead of Falcon. --- src/index.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/index.py') 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" } -] -- cgit v1.1