#![warn(missing_docs)]
#![warn(rustdoc::missing_crate_level_docs)]
#[cfg(feature = "jwt")]
pub mod jwt;
#[cfg(feature = "cors")]
pub mod cors;
#[cfg(feature = "rate-limit")]
pub mod rate_limit;
#[cfg(feature = "config")]
pub mod config;
#[cfg(feature = "sqlx")]
pub mod sqlx;
#[cfg(feature = "diesel")]
pub mod diesel;
#[cfg(feature = "insight")]
pub mod insight;
#[cfg(feature = "timeout")]
pub mod timeout;
#[cfg(feature = "guard")]
pub mod guard;
#[cfg(feature = "logging")]
pub mod logging;
#[cfg(feature = "circuit-breaker")]
pub mod circuit_breaker;
#[cfg(feature = "retry")]
pub mod retry;
#[cfg(feature = "dedup")]
pub mod dedup;
#[cfg(feature = "sanitization")]
pub mod sanitization;
#[cfg(feature = "security-headers")]
pub mod security_headers;
#[cfg(feature = "api-key")]
pub mod api_key;
#[cfg(feature = "cache")]
pub mod cache;
#[cfg(feature = "otel")]
pub mod otel;
#[cfg(feature = "structured-logging")]
pub mod structured_logging;
#[cfg(feature = "jwt")]
pub use jwt::{create_token, AuthUser, JwtError, JwtLayer, JwtValidation, ValidatedClaims};
#[cfg(feature = "cors")]
pub use cors::{AllowedOrigins, CorsLayer};
#[cfg(feature = "rate-limit")]
pub use rate_limit::{RateLimitLayer, RateLimitStrategy};
#[cfg(feature = "config")]
pub use config::{
env_or, env_parse, load_dotenv, load_dotenv_from, require_env, try_require_env, Config,
ConfigError, Environment,
};
#[cfg(feature = "sqlx")]
pub use sqlx::{convert_sqlx_error, PoolError, SqlxErrorExt, SqlxPoolBuilder, SqlxPoolConfig};
#[cfg(feature = "diesel")]
pub use diesel::{DieselPoolBuilder, DieselPoolConfig, DieselPoolError};
#[cfg(feature = "insight")]
pub use insight::{
InMemoryInsightStore, InsightConfig, InsightData, InsightLayer, InsightStats, InsightStore,
};
#[cfg(feature = "timeout")]
pub use timeout::TimeoutLayer;
#[cfg(feature = "guard")]
pub use guard::{PermissionGuard, RoleGuard};
#[cfg(feature = "logging")]
pub use logging::{LogFormat, LoggingConfig, LoggingLayer};
#[cfg(feature = "circuit-breaker")]
pub use circuit_breaker::{CircuitBreakerLayer, CircuitBreakerStats, CircuitState};
#[cfg(feature = "retry")]
pub use retry::{RetryLayer, RetryStrategy};
#[cfg(feature = "security-headers")]
pub use security_headers::{HstsConfig, ReferrerPolicy, SecurityHeadersLayer, XFrameOptions};
#[cfg(feature = "api-key")]
pub use api_key::ApiKeyLayer;
#[cfg(feature = "cache")]
pub use cache::{CacheBuilder, CacheConfig, CacheHandle, CacheLayer};
#[cfg(feature = "dedup")]
pub use dedup::{DedupConfig, DedupLayer};
#[cfg(feature = "sanitization")]
pub use sanitization::{sanitize_html, sanitize_json, strip_tags};
#[cfg(feature = "otel")]
pub use otel::{
extract_trace_context, inject_trace_context, propagate_trace_context, OtelConfig,
OtelConfigBuilder, OtelExporter, OtelLayer, TraceContext, TraceSampler,
};
#[cfg(feature = "structured-logging")]
pub use structured_logging::{
DatadogFormatter, JsonFormatter, LogFormatter, LogOutputFormat, LogfmtFormatter,
SplunkFormatter, StructuredLoggingConfig, StructuredLoggingConfigBuilder,
StructuredLoggingLayer,
};
#[cfg(feature = "csrf")]
pub mod csrf;
#[cfg(feature = "csrf")]
pub use csrf::{CsrfConfig, CsrfLayer, CsrfToken};
#[cfg(feature = "oauth2-client")]
pub mod oauth2;
#[cfg(feature = "oauth2-client")]
pub use oauth2::{
AuthorizationRequest, CsrfState, OAuth2Client, OAuth2Config, PkceVerifier, Provider,
TokenError, TokenResponse,
};
#[cfg(feature = "session")]
pub mod session;
#[cfg(feature = "session")]
pub use session::{
MemorySessionStore, Session, SessionConfig, SessionError, SessionLayer, SessionRecord,
SessionStore,
};
#[cfg(feature = "session-redis")]
pub use session::RedisSessionStore;
#[cfg(feature = "audit")]
pub mod audit;
#[cfg(feature = "audit")]
pub use audit::{
AuditAction, AuditEvent, AuditQuery, AuditQueryBuilder, AuditSeverity, AuditStore,
ComplianceInfo, FileAuditStore, InMemoryAuditStore,
};
#[cfg(feature = "replay")]
pub mod replay;
#[cfg(feature = "replay")]
pub use replay::{
FsReplayStore, FsReplayStoreConfig, InMemoryReplayStore, ReplayAdminAuth, ReplayClient,
ReplayLayer, RetentionJob,
};