aboutsummaryrefslogtreecommitdiffstats
path: root/crates/client/src/sync.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-20 17:54:34 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-20 17:54:34 +0200
commit6bd2b80be51a8623640fbd77afa1da09289e40cc (patch)
tree8fa76fc78e27a4f3d6f57af07805a83e9877f0ad /crates/client/src/sync.rs
parentchore: Commit (diff)
downloadatuin-6bd2b80be51a8623640fbd77afa1da09289e40cc.zip
chore: All compiles
Diffstat (limited to '')
-rw-r--r--crates/client/src/sync.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/crates/client/src/sync.rs b/crates/client/src/sync.rs
deleted file mode 100644
index abe1a201..00000000
--- a/crates/client/src/sync.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use eyre::{Context, Result};
-
-use crate::atuin_client::database::ClientSqlite;
-use crate::atuin_client::{
- history::store::HistoryStore, record::sqlite_store::SqliteStore, settings::Settings,
-};
-use crate::atuin_common::record::RecordId;
-
-// This is the only crate that ties together all other crates.
-// Therefore, it's the only crate where functions tying together all stores can live
-
-/// Rebuild all stores after a sync
-/// Note: for history, this only does an _incremental_ sync. Hence the need to specify downloaded
-/// records.
-pub(crate) async fn build(
- settings: &Settings,
- store: &SqliteStore,
- db: &ClientSqlite,
- downloaded: Option<&[RecordId]>,
-) -> Result<()> {
- let encryption_key: [u8; 32] = crate::atuin_client::encryption::load_key(settings)
- .context("could not load encryption key")?
- .into();
-
- let host_id = Settings::host_id().await?;
-
- let downloaded = downloaded.unwrap_or(&[]);
-
- let history_store = HistoryStore::new(store.clone(), host_id, encryption_key);
-
- history_store.incremental_build(db, downloaded).await?;
-
- Ok(())
-}