summary refs log tree commit diff
path: root/synapse_topology/server/schemas.py
blob: 17f1dfb45a29f373847fc6b411505c818a5526f5 (plain) (blame)
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
BASE_CONFIG_SCHEMA = {
    "type": "object",
    "properties": {
        "server_name": {"type": "string", "minlength": 1},
        "report_stats": {"type": "boolean"},
        "log_config": {"type": "string", "minlength": 1},
        "media_store_path": {"type": "string", "minlength": 1},
        "uploads_path": {"type": "string", "minlength": 1},
        "pid_file": {"type": "string", "minlength": 1},
        "listeners": {"type": "array"},
        "acme": {"type": "object"},
        "database": {"type": "string", "minlength": 1},
        "tls_certificate_path": {"type": "string", "minlength": 1},
        "tls_private_key_path": {"type": "string", "minlength": 1},
        "server_config_in_use": {"type": "boolean"},
    },
    "required": ["server_name", "report_stats", "database"],
}

CERT_PATHS_SCHEMA = {
    "type": "object",
    "properties": {
        "cert_path": {"type": "string", "minlength": 1},
        "cert_key_path": {"type": "string", "minlength": 1},
    },
    "required": ["cert_path", "cert_key_path"],
}

CERTS_SCHEMA = {
    "type": "object",
    "properties": {
        "cert": {"type": "string", "minlength": 1},
        "cert_key": {"type": "string", "minlength": 1},
    },
    "required": ["cert", "cert_key"],
}

PORTS_SCHEMA = {
    "type": "object",
    "properties": {"ports": {"type": "array"}},
    "required": ["ports"],
}

SECRET_KEY_SCHEMA = {
    "type": "object",
    "properties": {"server_name": {"type": "string", "minlength": "1"}},
    "required": ["server_name"],
}