// StarKingdoms.IO, a browser game about drifting through space // Copyright (C) 2023 ghostly_zsh, TerraMaster85, core // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . use serde::Deserialize; use std::net::IpAddr; #[derive(Deserialize, Clone)] pub struct Config { pub server: ConfigServer, pub database: ConfigDatabase, } #[derive(Deserialize, Clone)] pub struct ConfigServer { pub bind: ConfigServerBind, pub workers: Option, pub machine_id: i32, pub node_id: i32, pub application_key: String, } #[derive(Deserialize, Clone)] pub struct ConfigServerBind { pub ip: IpAddr, pub port: u16, } #[derive(Deserialize, Clone)] pub struct ConfigDatabase { pub url: String, }