1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
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"
}
def as_list():
index_list = list()
for item in CouchIindex().dict():
index_list.append(CouchIindex().dict()[item])
return index_list
|