add missed nested config & prelude

This commit is contained in:
OMGeeky
2023-09-18 18:38:19 +02:00
parent a826e751bd
commit 947cc4a2fa
2 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
use confique::Config;
use prelude::*;
use serde::{Deserialize, Serialize};
pub mod prelude {
pub use super::Conf;
pub use confique::Config;
}
#[derive(Debug, Serialize, Deserialize, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Config)]
pub struct Conf {
@@ -52,6 +56,12 @@ pub struct Google {
/// The project ID for the Google Cloud project
#[config(default = "twitchbackup-1")]
pub project_id: String,
#[config(nested)]
pub youtube: Youtube,
#[config(nested)]
pub bigquery: BigQuery,
}
#[derive(Debug, Serialize, Deserialize, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Config)]

View File

@@ -1,7 +1,6 @@
#[cfg(test)]
mod test {
use backup_config::*;
use confique::Config;
use backup_config::prelude::*;
#[test]
fn test_config() {