diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-09 22:00:59 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-09 22:00:59 +0200 |
| commit | 620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39 (patch) | |
| tree | e97e54ff112c8e3fa9f88335bfd1275420a4d69f /crates/server/src/settings.rs | |
| parent | chore: Separate daemon, client, server, and lib into crates (diff) | |
| download | atuin-620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39.zip | |
chore: Add more things
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")? |
