Expand description
REST and WebSocket API implementation.
Re-exports§
pub use audit::AuditConfig;pub use audit::AuditEvent;pub use audit::AuditLogger;pub use audit::AuditOutcome;pub use audit::JsonAuditLogger;pub use audit::NoopAuditLogger;pub use rbac::Permission;pub use rbac::RbacConfig;pub use rbac::Role;pub use rbac::RolePermissions;
Modules§
- audit
- Structured audit logging for the REST API.
- rbac
- Role-Based Access Control (RBAC) for the REST API.
- request_
id - Request ID middleware.
- request_
logging - Structured request logging middleware.
- request_
validation - Request validation middleware.
- security_
headers - Security headers middleware.
Structs§
- Auth
Config - Authentication configuration.
- Cors
Config - CORS configuration for the REST API.
- Metrics
Stream - Marker type for metrics stream.
- Rate
Limit Config - Rate limiting configuration.
- Rate
Limiter - Shared rate limiter state.
- Timeout
Config - Timeout configuration for the REST API.
Enums§
- Rate
Limit Backend - Unified rate limiting backend that supports both in-memory and Redis implementations.
Functions§
- auth_
middleware - Authentication middleware that checks for valid API key or JWT.
- backend_
rate_ limit_ middleware - Rate limiting middleware that works with any
RateLimitBackend. - create_
router - Create the REST API router with default CORS settings.
- create_
router_ full - Create the REST API router with full configuration (CORS, auth, rate limiting, and timeout).
- create_
router_ full_ with_ backend - Create the REST API router with full configuration and a specific rate limiting backend.
- create_
router_ with_ auth - Create the REST API router with custom CORS and authentication settings.
- create_
router_ with_ cors - Create the REST API router with custom CORS settings.
- rate_
limit_ middleware - Rate limiting middleware.