rustack_apigatewayv2_http/lib.rs
1//! API Gateway v2 HTTP service layer for Rustack.
2//!
3//! This crate implements the `restJson1` protocol for API Gateway v2, providing:
4//!
5//! - **Router**: Dispatches by HTTP method + URL path
6//! - **Handler trait**: Defines the boundary between HTTP and business logic
7//! - **Service**: Hyper `Service` implementation for the API Gateway v2 protocol
8//! - **Response helpers**: JSON success/error response formatting
9//!
10//! API Gateway v2 uses REST-style routing where each operation has a unique
11//! method + path combination. Path parameters (e.g., `{apiId}`) are extracted
12//! and passed to the handler.
13//!
14//! # Error format
15//!
16//! API Gateway v2 errors use a JSON body with a lowercase `message` field:
17//! `{"message": "..."}`
18
19pub mod body;
20pub mod dispatch;
21pub mod response;
22pub mod router;
23pub mod service;
24
25pub use body::ApiGatewayV2ResponseBody;
26pub use dispatch::{ApiGatewayV2Handler, NotImplementedHandler};
27pub use router::PathParams;
28pub use service::{ApiGatewayV2HttpConfig, ApiGatewayV2HttpService};