Skip to main content

cts_common/
lib.rs

1//! Defines common types and traits used across the CipherStash ecosystem, particularly for CipherStash Token Service (CTS) and the CTS Client
2//! used in `cipherstash-client`.
3//!
4//! # Features
5//!
6//! - `server` - Enables server-specific types and traits (e.g., Axum integration).
7//! - `test_utils` - Enables testing utilities for randomized test data generation.
8mod auth;
9mod crn;
10mod region;
11mod service;
12mod workspace;
13
14pub mod oidc;
15pub mod protocol;
16
17pub use auth::claims;
18pub use crn::{AsCrn, Crn, InvalidCrn};
19pub use region::{AwsRegion, Region, RegionError};
20pub use service::{
21    CtsServiceDiscovery, SecretsServiceDiscovery, ServiceDiscovery, ZeroKmsServiceDiscovery,
22};
23pub use workspace::{InvalidWorkspaceId, Workspace, WorkspaceId, WorkspaceIdGenerationError};
24
25// Re-export axum if the server feature is enabled so that the server uses the same version
26#[cfg(feature = "server")]
27pub use axum;
28
29#[cfg(feature = "server")]
30pub use axum_extra;