From 620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 9 Jul 2026 22:00:59 +0200 Subject: chore: Add more things --- crates/server/src/settings.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/server/src/settings.rs') diff --git a/crates/server/src/settings.rs b/crates/server/src/settings.rs index 6a32fb9b..e6626b15 100644 --- a/crates/server/src/settings.rs +++ b/crates/server/src/settings.rs @@ -9,11 +9,11 @@ use tracing::info; use crate::database::DbSettings; #[derive(Clone, Debug, Deserialize, Serialize)] -pub(crate) struct Metrics { +pub struct Metrics { #[serde(alias = "enabled")] - pub(crate) enable: bool, - pub(crate) host: String, - pub(crate) port: u16, + pub enable: bool, + pub host: String, + pub port: u16, } impl Default for Metrics { @@ -27,29 +27,29 @@ impl Default for Metrics { } #[derive(Clone, Debug, Deserialize, Serialize)] -pub(crate) struct Settings { - pub(crate) host: String, - pub(crate) port: u16, - pub(crate) path: String, - pub(crate) max_history_length: usize, - pub(crate) max_record_size: usize, - pub(crate) page_size: i64, - pub(crate) metrics: Metrics, +pub struct Settings { + pub host: String, + pub port: u16, + pub path: String, + pub max_history_length: usize, + pub max_record_size: usize, + pub page_size: i64, + pub metrics: Metrics, /// Advertise a version that is not what we are _actually_ running /// Many clients compare their version with api.atuin.sh, and if they differ, notify the user /// that an update is available. /// Now that we take beta releases, we should be able to advertise a different version to avoid /// notifying users when the server runs something that is not a stable release. - pub(crate) fake_version: Option, + pub fake_version: Option, #[serde(flatten)] #[expect(clippy::struct_field_names)] - pub(crate) db_settings: DbSettings, + pub db_settings: DbSettings, } impl Settings { - pub(crate) fn new() -> Result { + pub fn new() -> Result { // create the config file if it does not exist let mut config_builder = Config::builder() .set_default("host", "127.0.0.1")? -- cgit v1.3.1