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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! # lmrc-http-common
//!
//! Common HTTP utilities and patterns for LMRC Stack applications.
//!
//! This library provides reusable components for building Axum-based HTTP services:
//! - Standard error types and response wrappers
//! - Reusable middleware (CORS, logging, tracing)
//! - Authentication utilities (JWT, session management, password hashing)
//! - Configuration management (server, database)
//! - Health check framework
//! - Validated request extractors
//! - Server bootstrap utilities
//!
//! ## Features
//!
//! - `auth` (default): Enable authentication utilities (JWT, bcrypt, sessions)
//! - `validation` (default): Enable request validation helpers
//! - `server`: Enable server bootstrap utilities (tracing-subscriber, dotenvy)
//!
//! ## Example
//!
//! ```rust
//! use lmrc_http_common::{
//! error::{HttpError, HttpResult},
//! response::SuccessResponse,
//! };
//! use axum::{Json, response::IntoResponse};
//!
//! async fn handler() -> HttpResult<impl IntoResponse> {
//! let data = vec!["item1", "item2"];
//! Ok(SuccessResponse::new(data))
//! }
//! ```
//!
//! ## Quick Start Server
//!
//! ```rust,no_run
//! # #[cfg(feature = "server")]
//! # {
//! use axum::{Router, routing::get};
//! use lmrc_http_common::server::quick_start;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let router = Router::new().route("/health", get(|| async { "OK" }));
//! quick_start("myapp", router, 8080).await?;
//! Ok(())
//! }
//! # }
//! ```
// Re-export commonly used types
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;