From 6eafafe5297c54aa5cb38790c45ba189b47d755e Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 1 Aug 2023 21:52:53 +0200 Subject: remote downloa --- common/src/config.rs | 24 ++++++++++++++++++++++++ common/src/impl.rs | 5 +++++ common/src/lib.rs | 1 + 3 files changed, 30 insertions(+) create mode 100644 common/src/config.rs (limited to 'common/src') diff --git a/common/src/config.rs b/common/src/config.rs new file mode 100644 index 0000000..b978a1e --- /dev/null +++ b/common/src/config.rs @@ -0,0 +1,24 @@ +/* + This file is part of jellything (https://codeberg.org/metamuffin/jellything) + which is licensed under the GNU Affero General Public License (version 3); see /COPYING. + Copyright (C) 2023 metamuffin +*/ + +use serde::{Deserialize, Serialize}; +use std::{collections::HashMap, path::PathBuf}; + +#[derive(Debug, Deserialize, Serialize, Default)] +pub struct GlobalConfig { + pub brand: String, + pub slogan: String, + + pub asset_path: PathBuf, + pub database_path: PathBuf, + pub library_path: PathBuf, + + pub admin_username: String, + pub admin_password: String, + pub cookie_key: String, + pub login_expire: i64, + pub remote_credentials: HashMap, +} diff --git a/common/src/impl.rs b/common/src/impl.rs index a7f8c6a..55364ab 100644 --- a/common/src/impl.rs +++ b/common/src/impl.rs @@ -1,3 +1,8 @@ +/* + This file is part of jellything (https://codeberg.org/metamuffin/jellything) + which is licensed under the GNU Affero General Public License (version 3); see /COPYING. + Copyright (C) 2023 metamuffin +*/ use crate::{SourceTrack, SourceTrackKind}; impl SourceTrackKind { diff --git a/common/src/lib.rs b/common/src/lib.rs index 323070b..3f91a6c 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -4,6 +4,7 @@ Copyright (C) 2023 metamuffin */ pub mod r#impl; +pub mod config; use bincode::{Decode, Encode}; use serde::{Deserialize, Serialize}; -- cgit v1.2.3-70-g09d2