diff --git a/src/config/mod.rs b/src/config/mod.rs index 446e43b..14af0cc 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1,12 +1,13 @@ use std::{error::Error}; use serde_derive::{Deserialize, Serialize}; +use crate::config::PostBody::Description; #[derive(Serialize, Deserialize, Clone)] pub(crate) struct Config { - instance: String, - status_post_url: Option, - config_reload_seconds: u32, - series: Vec, + pub(crate) instance: String, + pub(crate) status_post_url: Option, + pub(crate) config_reload_seconds: u32, + pub(crate) series: Vec, } impl Config { @@ -40,26 +41,26 @@ impl Default for Config { #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct SeriesConfig { - slug: String, - parted: bool, - prepub_community: PostConfig, - volume_community: PostConfig, + pub(crate) slug: String, + pub(crate) parted: bool, + pub(crate) prepub_community: PostConfig, + pub(crate) volume_community: PostConfig, } #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct PostConfig { - community_name: String, - pin_settings: PinConfig, - post_body: PostBody, + pub(crate) community_name: String, + pub(crate) pin_settings: PinConfig, + pub(crate) post_body: PostBody, } #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct PinConfig { - pin_new_post_local: bool, - pin_new_post_community: bool, + pub(crate) pin_new_post_local: bool, + pub(crate) pin_new_post_community: bool, } -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(tag = "body_type", content = "body_content")] pub(crate) enum PostBody { None,