libomni/lib.rs
1//! # LibOmni - Core OmniCloud Library
2//!
3//! LibOmni defines the core types, structures, and utilities used throughout the OmniCloud platform.
4//! This includes types for database models, API responses, volume management, and other shared structures.
5//! These types are used across the platform to ensure consistency and type safety.
6//!
7//! ## Main Modules
8//!
9//! - [`types`] - Core type definitions for the platform
10//! - [`db`] - Database-related types and models
11//! - [`volume`] - Volume management types and enums
12//! - [`auth`] - Authentication and authorization types
13
14pub mod types;
15
16// Re-export commonly used types for convenience
17pub use types::db;
18pub use types::volume;
19
20// Re-export authentication types at the top level for easier access
21pub use types::db::auth;
22
23// Re-export database v1 types for convenient access
24pub use types::db::v1;
25
26// Volume types that are commonly used
27pub use types::volume::{Volume, VolumeMetadata, VolumeStatus, AccessMode};
28
29// Platform types
30pub use types::db::v1::platform::Platform;
31pub use types::db::v1::user::{User, UserMeta, UserPii, UserSession};
32pub use types::db::v1::app::{App, AppWithInstanceCount, AppWithInstances};
33pub use types::db::v1::instance::Instance;
34pub use types::db::v1::region::Region;
35
36// Authentication and authorization
37pub use types::db::auth::{AuthConfig, Claims};
38
39// Logging - Re-export chrysalis for logging convenience
40pub use chrysalis_rs as omni_log;
41
42/// Prelude module containing the most commonly used types and traits.
43///
44/// This module is intended to be glob-imported to bring the most essential
45/// LibOmni types into scope quickly.
46pub mod prelude {
47 pub use crate::auth::{AuthConfig, Claims};
48 pub use crate::volume::{Volume, VolumeStatus, AccessMode};
49 pub use crate::{Platform, User, App, Instance, Region};
50 pub use crate::types::db::v1::app::{AppWithInstanceCount, AppWithInstances};
51 pub use crate::types::db::v1::user::{UserMeta, UserPii, UserSession};
52}