| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
pub mod auth; |
| 10 |
pub mod config; |
| 11 |
pub mod csrf; |
| 12 |
pub mod error_page; |
| 13 |
pub mod internal_auth; |
| 14 |
pub mod link_preview; |
| 15 |
pub mod maintenance; |
| 16 |
pub mod routes; |
| 17 |
pub mod seed; |
| 18 |
pub mod storage; |
| 19 |
pub mod templates; |
| 20 |
pub mod trusted_proxy; |
| 21 |
|
| 22 |
use config::Config; |
| 23 |
use sqlx::PgPool; |
| 24 |
use std::sync::Arc; |
| 25 |
|
| 26 |
|
| 27 |
#[derive(Clone)] |
| 28 |
pub struct AppState { |
| 29 |
pub db: PgPool, |
| 30 |
pub config: Config, |
| 31 |
pub http: reqwest::Client, |
| 32 |
|
| 33 |
|
| 34 |
pub link_preview: link_preview::LinkPreviewFetcher, |
| 35 |
pub s3: Option<Arc<storage::S3Storage>>, |
| 36 |
} |
| 37 |
|