mirror of
https://github.com/OMGeeky/backup_config.git
synced 2026-01-23 11:48:50 +01:00
add missed nested config & prelude
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -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)]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use backup_config::*;
|
||||
use confique::Config;
|
||||
use backup_config::prelude::*;
|
||||
|
||||
#[test]
|
||||
fn test_config() {
|
||||
|
||||
Reference in New Issue
Block a user