upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 11:40:41 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-07 11:40:41 +0000
commit5bd6b9b93cd52da2075bc00a08cf7feca4b85d5c (patch)
treebc36818ed88458f33f3f94c33685c9f02c0969f4 /Cargo.lock
parent09d9771acaffdc6e798cc32d2a68e6d46a323d3a (diff)
Add SyncContext trait and MockSyncContext for purgatory sync
Implement the abstraction layer for purgatory sync operations: - SyncContext trait: defines interface for repository data fetching, OID existence checks, git fetch operations, and event processing - ProcessResult: captures outcomes when releasing events from purgatory - MockSyncContext: test mock with builder pattern for configuring: - Clone URLs and which OIDs each URL provides - Needed OIDs (simulates purgatory state) - URL failure simulation - Fetch logging for assertions The trait uses async_trait for async method support and requires Send + Sync for use in concurrent sync operations. This abstraction enables unit testing of sync logic without I/O, while the real implementation (to be added later) will connect to actual database, git, and relay systems.
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock12
1 files changed, 12 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 03afcbb..35b96c0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -121,6 +121,17 @@ dependencies = [
121] 121]
122 122
123[[package]] 123[[package]]
124name = "async-trait"
125version = "0.1.89"
126source = "registry+https://github.com/rust-lang/crates.io-index"
127checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
128dependencies = [
129 "proc-macro2",
130 "quote",
131 "syn",
132]
133
134[[package]]
124name = "async-utility" 135name = "async-utility"
125version = "0.3.1" 136version = "0.3.1"
126source = "registry+https://github.com/rust-lang/crates.io-index" 137source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1425,6 +1436,7 @@ name = "ngit-grasp"
1425version = "0.1.0" 1436version = "0.1.0"
1426dependencies = [ 1437dependencies = [
1427 "anyhow", 1438 "anyhow",
1439 "async-trait",
1428 "base64 0.22.1", 1440 "base64 0.22.1",
1429 "clap", 1441 "clap",
1430 "dashmap", 1442 "dashmap",