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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
use serde::Deserialize;
/// Revolt instance configuration
#[derive(Deserialize, Debug, Clone)]
pub struct InstanceConfiguration {
/// Revolt API version
pub revolt: String,
/// Features enabled on this Revolt node
pub features: InstanceFeatures,
/// WebSocket URL
pub ws: String,
/// URL pointing to the client serving this node
pub app: String,
/// Web Push VAPID public key
pub vapid: String,
/// Build information
pub build: BuildInformation,
}
/// Features enabled on this Revolt node
#[derive(Deserialize, Debug, Clone)]
pub struct InstanceFeatures {
/// hCaptcha configuration
pub captcha: CaptchaConfiguration,
/// Whether email verification is enabled
pub email: bool,
/// Whether this instance is invite only
pub invite_only: bool,
/// File server service configuration
pub autumn: AutumnConfiguration,
/// Proxy server configuration
pub january: JanuaryConfiguration,
/// Voice server configuration
pub voso: VosoConfiguration,
}
/// hCaptcha configuration
#[derive(Deserialize, Debug, Clone)]
pub struct CaptchaConfiguration {
/// Whether captcha is enabled
pub enabled: bool,
/// Client key used for solving captcha
pub key: String,
}
/// File server service configuration
#[derive(Deserialize, Debug, Clone)]
pub struct AutumnConfiguration {
/// Whether the service is enabled
pub enabled: bool,
/// URL pointing to this service
pub url: String,
}
/// Proxy server configuration
#[derive(Deserialize, Debug, Clone)]
pub struct JanuaryConfiguration {
/// Whether the service is enabled
pub enabled: bool,
/// URL pointing to this service
pub url: String,
}
/// Voice server configuration
#[derive(Deserialize, Debug, Clone)]
pub struct VosoConfiguration {
/// Whether the service is enabled
pub enabled: bool,
/// URL pointing to the voice API
pub url: String,
/// URL pointing to the voice WebSocket server
pub ws: String,
}
/// Build information
#[derive(Deserialize, Debug, Clone)]
pub struct BuildInformation {
/// Commit hash
pub commit_sha: String,
/// Commit timestamp
pub commit_timestamp: String,
/// Git semver
pub semver: String,
/// Git origin URL
pub origin_url: String,
/// Build timestamp
pub timestamp: String,
}