-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.rs
More file actions
58 lines (55 loc) · 1.35 KB
/
Copy pathlib.rs
File metadata and controls
58 lines (55 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
pub mod audit;
pub mod audit_middleware;
pub mod body_redact;
pub mod client_ip;
pub mod content_type;
pub mod csrf;
#[cfg(test)]
mod resolve_market_tests;
pub mod blockchain;
pub mod cache;
pub mod compression;
pub mod config;
pub mod correlation;
pub mod db;
pub mod email;
pub mod handlers;
pub mod idempotency;
pub mod metrics;
pub mod migrations;
pub mod newsletter;
pub mod pagination;
pub mod rate_limit;
pub mod security;
pub mod shutdown;
pub mod tracing_config;
pub mod validation;
pub mod versioning;
pub mod openapi_spec;
// Re-export AppState so integration tests can construct it.
pub use crate::app_state::AppState;
mod app_state {
use crate::{
audit::AuditLogger,
blockchain::BlockchainClient,
cache::RedisCache,
config::Config,
db::Database,
email::{queue::EmailQueue, service::EmailService, webhook::WebhookHandler},
metrics::Metrics,
newsletter::IpRateLimiter,
};
#[derive(Clone)]
pub struct AppState {
pub config: Config,
pub cache: RedisCache,
pub db: Database,
pub blockchain: BlockchainClient,
pub metrics: Metrics,
pub newsletter_rate_limiter: IpRateLimiter,
pub email_service: EmailService,
pub email_queue: EmailQueue,
pub webhook_handler: WebhookHandler,
pub audit_logger: AuditLogger,
}
}