#![deny(unsafe_code)]
#![deny(missing_docs)]
#![cfg_attr(
not(test),
deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::indexing_slicing)
)]
pub mod error;
pub mod idempotency;
pub mod locks;
pub mod outbox;
pub mod rate_limit;
#[cfg(any(feature = "sql", feature = "mongodb"))]
pub mod db;
#[cfg(any(feature = "redis", feature = "cache-memory"))]
pub mod cache;
#[cfg(any(feature = "nats", feature = "rabbitmq", feature = "kafka"))]
pub mod messaging;
#[cfg(feature = "storage")]
pub mod storage;
#[cfg(feature = "sql")]
pub mod migrate;
#[cfg(feature = "sql")]
pub mod starter;
pub mod eventbus;
pub mod pagination;
pub mod saga;
pub mod transaction;
pub use error::DataError;
#[cfg(feature = "sql")]
pub use migrate::{Migration, Migrator};
#[cfg(feature = "sql")]
pub use sqlx::AnyPool;
#[cfg(feature = "sql")]
pub use starter::DataStarter;
pub use idempotency::{
IdempotencyRecord, IdempotencyStatus, IdempotencyStore, InMemoryIdempotencyStore, Outcome,
};
pub use locks::{InMemoryLockManager, LockGuard, LockManager, LockToken};
pub use outbox::{InMemoryOutbox, Outbox, OutboxEntry, OutboxId};
pub mod prelude {
#[cfg(feature = "sql")]
pub use crate::{AnyPool, DataStarter, Migration, Migrator};
pub use crate::{
DataError, IdempotencyStore, InMemoryIdempotencyStore, InMemoryLockManager, InMemoryOutbox,
LockGuard, LockManager, LockToken, Outbox, OutboxEntry, OutboxId,
};
}
#[cfg(feature = "sql")]
pub use outbox::SqlOutbox;
#[cfg(feature = "redis")]
pub use locks::redis::RedisLockManager;
#[cfg(feature = "redis")]
pub use idempotency::redis::RedisIdempotencyStore;
#[cfg(feature = "mongodb")]
pub use outbox::MongoOutbox;
#[cfg(feature = "mongodb")]
pub use locks::mongo::MongoLockManager;
#[cfg(feature = "mongodb")]
pub use idempotency::mongo::MongoIdempotencyStore;