Add component configs

This commit is contained in:
Andras Schmelczer 2024-12-08 10:58:54 +00:00
parent f4ece4e33d
commit c336f84af9
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,22 @@
use std::path::Path;
use anyhow::{Context, Result};
use log::debug;
use serde::{Deserialize, Serialize};
use tokio::fs;
use crate::{
consts::{DEFAULT_HOST, DEFAULT_MAX_CONNECTIONS, DEFAULT_PORT, DEFAULT_SQLITE_URL},
errors::SyncServerError,
};
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct UserConfig {
#[serde(default = "Vec::new")]
pub users: Vec<User>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct User {
pub name: String,
pub token: String,
}