1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Portable Unity Catalog **Delta v1** REST API.
//!
//! This crate owns the Delta API *semantics* — the hand-written wire models, the
//! catalog-managed table contract, the commit coordinator, and the `updateTable`
//! action dispatcher — behind a narrow backend [port](DeltaBackend). Any
//! server can serve the identical `/delta/v1` surface by implementing
//! [`DeltaBackend`] over its own storage, credential vending, and authorization;
//! all the Delta business logic is shared here, so the behavior is identical by
//! construction.
//!
//! It depends only on `axum`, `async-trait`, `serde`, `uuid`, and `thiserror` — it
//! does **not** depend on any server crate, so a downstream server (mangrove,
//! lakekeeper, …) takes this single dependency and nothing else.
//!
//! # Examples
//!
//! Implement [`DeltaBackend`] over your own storage, then hand it to
//! [`get_router`] to serve the entire `/delta/v1` surface. Here the in-memory
//! backend from the `testing` feature stands in for a real one:
//!
//! ```
//! # #[cfg(feature = "testing")] {
//! use unitycatalog_delta_api::get_router;
//! use unitycatalog_delta_api::testing::InMemoryDeltaBackend;
//!
//! // `InMemoryDeltaBackend` implements `DeltaBackend<()>`, so the context type
//! // is `()`. A real server uses its own request-context type here.
//! let router: axum::Router = get_router::<InMemoryDeltaBackend, ()>(InMemoryDeltaBackend::new());
//! # let _ = router;
//! # }
//! ```
//!
//! # Layout
//! - [`models`] — hand-written serde wire DTOs (kebab-case JSON).
//! - [`error`] — the decoupled error contract ([`DeltaApiError`] +
//! [`DeltaBackendError`]).
//! - [`mod@column`] — the portable UC column model used by the contract.
//! - [`config`] — `getConfig` support: capability-driven endpoint list + protocol
//! version negotiation.
//! - [`contract`] — the managed-table contract + Delta↔UC column mapping.
//! - [`coordinator`] — the commit coordinator (arbitration + backfill).
//! - [`authz`] — the [`DeltaAction`] vocabulary the handler authorizes with.
//! - [`backend`] — the `DeltaBackend` port trait + its coordinate/request types.
//! - [`handler`] — the `DeltaApiHandler` trait + the generic blanket impl.
//! - [`router`] — the axum router mounting all 12 operations.
pub use DeltaAction;
pub use ;
pub use ;
pub use DeltaApiHandler;
pub use get_router;