2022-07-15 10:58:45 -05:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct UberConfig {
|
|
|
|
pub irc: IrcConfig,
|
2022-07-16 17:05:21 -05:00
|
|
|
pub spotify: Option<SpotifyConfig>,
|
2022-07-17 13:54:32 -05:00
|
|
|
pub bot: BotConfig
|
2022-07-15 10:58:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct SpotifyConfig {
|
2022-07-16 17:05:21 -05:00
|
|
|
pub client_id: String,
|
|
|
|
pub client_secret: String,
|
2022-07-15 10:58:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct IrcConfig {
|
|
|
|
pub channels: Vec<String>,
|
|
|
|
pub host: String,
|
|
|
|
pub tls: bool,
|
|
|
|
pub mode: Option<String>,
|
|
|
|
pub nickname: Option<String>,
|
|
|
|
pub port: u16,
|
|
|
|
pub username: String,
|
|
|
|
pub prefix: String,
|
2022-07-16 11:33:43 -05:00
|
|
|
}
|
2022-07-17 13:54:32 -05:00
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct BotConfig {
|
|
|
|
pub db_path: Option<String>,
|
|
|
|
pub history_depth: usize,
|
|
|
|
pub search_limit: Option<usize>
|
|
|
|
}
|