39 lines
896 B
Rust
39 lines
896 B
Rust
|
use serde::{Serialize, Deserialize};
|
||
|
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct Config {
|
||
|
pub pk_key: String,
|
||
|
pub sp_key: String,
|
||
|
#[cfg(feature = "avatar")]
|
||
|
pub avatar_module: AvatarModule,
|
||
|
#[cfg(feature = "discord")]
|
||
|
pub disc_module: DiscModule,
|
||
|
#[cfg(feature = "fedi")]
|
||
|
pub fedi_module: FediModule,
|
||
|
}
|
||
|
|
||
|
#[cfg(feature = "avatar")]
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct AvatarModule {
|
||
|
pub enabled: bool,
|
||
|
pub avatar_folder: String,
|
||
|
pub avatar_output_path: String,
|
||
|
}
|
||
|
|
||
|
#[cfg(feature = "discord")]
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct DiscModule {
|
||
|
pub enabled: bool,
|
||
|
pub token: String,
|
||
|
pub python_path: String,
|
||
|
pub script_path: String,
|
||
|
}
|
||
|
|
||
|
#[cfg(feature = "fedi")]
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct FediModule {
|
||
|
pub enabled: bool,
|
||
|
pub instance: String,
|
||
|
pub token: String,
|
||
|
}
|