unitycatalog_common/lib.rs
1//! Shared types and utilities for the Unity Catalog server and client crates.
2//!
3//! Most of the crate is the generated Unity Catalog data model, produced from the
4//! protobuf definitions in `proto/` and re-exported from [`models`]. On top of that
5//! it collects the hand-written pieces both sides of the API depend on:
6//!
7//! - [`error`] — the crate-wide [`Error`] and [`Result`] types.
8//! - [`reference`](mod@reference) — the `uc://` URL scheme for addressing catalog
9//! securables ([`UCReference`]).
10//! - [`store`] — the storage-abstraction trait ([`ResourceStore`](store::ResourceStore))
11//! implemented by backends (feature `store`).
12//! - [`services`] — envelope encryption for sealing sensitive fields inline
13//! (feature `store`).
14//! - [`credentials_ext`] — conversions to the `olai-storage-credentials` /
15//! `olai-credential-vending` types (features `storage-credentials`, `credential-vending`).
16//! - [`metric_view`] — the single parser for Unity Catalog metric-view definitions
17//! (feature `metric-view`).
18//!
19//! # Feature flags
20//!
21//! The crate is feature-flag heavy so that downstream crates pull in only what they
22//! need. Each generated model package sits behind a resource feature named after
23//! its module (`catalogs`, `tables`, `credentials`, …); `all-resources` enables
24//! them all. `rest-client` and `all-resources` are on by default; `grpc`, `axum`,
25//! `sqlx`, `store`, `metric-view`, `python`, and `node` gate the corresponding
26//! integrations. `store` and `python` span every resource and imply
27//! `all-resources`. See the crate README for the full table.
28
29pub use error::{Error, Result};
30pub use models::*;
31pub use reference::UCReference;
32
33#[cfg(feature = "storage-credentials")]
34pub mod credentials_ext;
35pub mod error;
36#[cfg(feature = "metric-view")]
37pub mod metric_view;
38pub mod models;
39pub mod reference;
40#[cfg(feature = "store")]
41pub mod services;
42#[cfg(feature = "store")]
43pub mod store;