diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 16:27:35 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 16:27:35 +0200 |
| commit | 5a4c4b9fa0df891fcdd9beee18be0db4a45da701 (patch) | |
| tree | b467a1bd5706643b77962e7a82d651a803bfc436 /crates/turtle/src/atuin_common | |
| parent | chore(server): Simplify the database support (diff) | |
| download | atuin-5a4c4b9fa0df891fcdd9beee18be0db4a45da701.zip | |
chore(server): Remove the last remnants of the "hub" sync-server thingy
Diffstat (limited to 'crates/turtle/src/atuin_common')
| -rw-r--r-- | crates/turtle/src/atuin_common/api.rs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/crates/turtle/src/atuin_common/api.rs b/crates/turtle/src/atuin_common/api.rs index 56adbcc5..4566c6e9 100644 --- a/crates/turtle/src/atuin_common/api.rs +++ b/crates/turtle/src/atuin_common/api.rs @@ -2,7 +2,6 @@ use semver::Version; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::sync::LazyLock; -use time::OffsetDateTime; // the usage of X- has been deprecated for quite along time, it turns out pub(crate) static ATUIN_HEADER_VERSION: &str = "Atuin-Version"; @@ -26,10 +25,6 @@ pub(crate) struct RegisterRequest { #[derive(Debug, Serialize, Deserialize)] pub(crate) struct RegisterResponse { pub(crate) session: String, - /// Auth type: "hub" for Hub API tokens, "cli" for legacy CLI session tokens. - /// Old servers that don't return this field will deserialize as None. - #[serde(default)] - pub(crate) auth: Option<String>, } #[derive(Debug, Serialize, Deserialize)] @@ -53,38 +48,6 @@ pub(crate) struct LoginRequest { #[derive(Debug, Serialize, Deserialize)] pub(crate) struct LoginResponse { pub(crate) session: String, - /// Auth type: "hub" for Hub API tokens, "cli" for legacy CLI session tokens. - /// Old servers that don't return this field will deserialize as None. - #[serde(default)] - pub(crate) auth: Option<String>, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct AddHistoryRequest { - pub(crate) id: String, - #[serde(with = "time::serde::rfc3339")] - pub(crate) timestamp: OffsetDateTime, - pub(crate) data: String, - pub(crate) hostname: String, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct CountResponse { - pub(crate) count: i64, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct SyncHistoryRequest { - #[serde(with = "time::serde::rfc3339")] - pub(crate) sync_ts: OffsetDateTime, - #[serde(with = "time::serde::rfc3339")] - pub(crate) history_ts: OffsetDateTime, - pub(crate) host: String, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct SyncHistoryResponse { - pub(crate) history: Vec<String>, } #[derive(Debug, Serialize, Deserialize)] @@ -99,29 +62,6 @@ pub(crate) struct IndexResponse { } #[derive(Debug, Serialize, Deserialize)] -pub(crate) struct StatusResponse { - pub(crate) count: i64, - pub(crate) username: String, - pub(crate) deleted: Vec<String>, - - // These could/should also go on the index of the server - // However, we do not request the server index as a part of normal sync - // I'd rather slightly increase the size of this response, than add an extra HTTP request - pub(crate) page_size: i64, // max page size supported by the server - pub(crate) version: String, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct DeleteHistoryRequest { - pub(crate) client_id: String, -} - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct MessageResponse { - pub(crate) message: String, -} - -#[derive(Debug, Serialize, Deserialize)] pub(crate) struct MeResponse { pub(crate) username: String, } |
