diff options
Diffstat (limited to '')
| -rw-r--r-- | crates/server/src/settings.rs | 30 |
1 files changed, 15 insertions, 15 deletions
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<String>, + pub fake_version: Option<String>, #[serde(flatten)] #[expect(clippy::struct_field_names)] - pub(crate) db_settings: DbSettings, + pub db_settings: DbSettings, } impl Settings { - pub(crate) fn new() -> Result<Self> { + pub fn new() -> Result<Self> { // create the config file if it does not exist let mut config_builder = Config::builder() .set_default("host", "127.0.0.1")? |
