summaryrefslogtreecommitdiff
path: root/server/src/config.rs
blob: 1351f30dbaf55625c78746159c5cd9923228df53 (plain)
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
/*
    This file is part of keks-meet (https://codeberg.org/metamuffin/keks-meet)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2023 metamuffin <metamuffin.org>
*/
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Config {
    pub features: FeaturesConfig,
    pub webrtc: WebrtcConfig,
    pub appearance: AppearanceConfig,
}

#[rustfmt::skip]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FeaturesConfig {
    #[serde(default)] pub room_watches: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WebrtcConfig {
    pub stun: String,
    pub turn: Option<String>,
    pub turn_user: Option<String>,
    pub turn_cred: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AppearanceConfig {
    pub accent: String,
    pub accent_light: String,
    pub accent_dark: String,
    pub background: String,
    pub background_dark: String,
    pub background_light: String,
}