1pub use rust_webx_core::app::IHost;
6pub use rust_webx_core::auth::{
7 IAuthenticationHandler, IAuthorizationPolicy, IClaims, IDynamicAuthorizer,
8};
9pub use rust_webx_core::cache::{
10 cache_ext::DistributedCacheExtensions,
11 options::DistributedCacheEntryOptions,
12 trait_def::{CacheError, IDistributedCache},
13};
14pub use rust_webx_core::config::{
15 bind_config, bind_root, load_appsettings, AppOptions, AppSection, CorsSection, IAppOptions,
16 JwtSection, MetricsSection, RateLimitSection, TlsSection,
17};
18pub use rust_webx_core::error::{Error, Result};
19pub use rust_webx_core::handler::{IClaimsCarrier, IEventHandler, IHostedService, IRequestHandler};
20pub use rust_webx_core::http::{
21 read_json_body, write_json_response, FromHttpContext, HttpStatus, IClaimsExt, IHttpContext,
22 IHttpRequest, IHttpResponse, Json,
23};
24pub use rust_webx_core::mediator::{IEventRequest, IMediator, IRequest};
25pub use rust_webx_core::middleware::IMiddleware;
26pub use rust_webx_core::mode::AppMode;
27pub use rust_webx_core::pagination::{PagedRequest, PagedResponse};
28pub use rust_webx_core::paths::{app_base, looks_like_app_base};
29pub use rust_webx_core::mediator::build_pipeline_chain;
30pub use rust_webx_core::pipeline::{BoxedNextFn, BoxedPipelineFuture, IPipelineBehavior};
31pub use rust_webx_core::problem::{FieldError, ProblemDetails};
32pub use rust_webx_core::route::diagnostics::{
33 format_route_diagnostics, orphan_handlers, orphan_routes, route_snapshots,
34};
35pub use rust_webx_core::request_context::RequestContext;
36pub use rust_webx_core::routing::{HttpMethod, IEndpoint, IRouter, RouteMeta};
37
38pub use rust_webx_core::route::ext::{is_mediator_active, should_scan_endpoints, IServiceCollectionExt};
40pub use rust_webx_core::route::scan::{
41 global_provider, set_global_provider, HandlerCache, HandlerEntry, HandlerRegistration,
42 HandlerRegistry, ParamMeta, ResponseData, RouteDispatch, RouteEntry,
43};
44
45pub use rust_webx_host::auth_jwt::{init_jwt_secret, jwt_middleware, jwt_secret, JwtAuth, JwtClaims};
47pub use rust_webx_host::authz::{
48 collect_authorizers, resource_auth_middleware, AuthorizerSet, ResourceAuthorization,
49};
50pub use rust_webx_host::compression::{compress_gzip, CompressionConfig, CompressionMiddleware};
51pub use rust_webx_host::context::{HttpContext, HttpRequest, HttpResponse};
52pub use rust_webx_host::cors::{CorsConfig, CorsMiddleware};
53pub use rust_webx_host::endpoint::{
54 ControllerEndpoint, RequestEndpoint, StaticHtmlEndpoint, StaticJsonEndpoint,
55};
56pub use rust_webx_host::health::{HealthCheckEntry, HealthCheckFn, HealthCheckRegistry, HealthStatus};
57pub use rust_webx_host::memory_cache::MemoryCache;
58pub use rust_webx_host::pipeline::{HandlerFn, MiddlewarePipeline};
59pub use rust_webx_host::rate_limit::{RateLimitMiddleware, RateLimiter};
60pub use rust_webx_host::request_id::RequestIdMiddleware;
61pub use rust_webx_host::request_tracing::RequestTracing;
62pub use rust_webx_host::router::Router;
63pub use rust_webx_host::security_headers::SecurityHeadersMiddleware;
64pub use rust_webx_host::diagnostics::log_startup_diagnostics;
65pub use rust_webx_host::server::{Host, HostAppBuilder, HostBuilder, Server, ServerHandle};
66pub use rust_webx_host::timing::TimingMiddleware;
67#[cfg(feature = "testing")]
68pub use rust_webx_host::testing::{free_port, spawn, spawn_with_health, wait_until_ready, TestServer};
69
70pub use rust_webx_core::mediator::Mediator;
72
73pub use rust_webx_spa::SpaMiddleware;
75
76pub use rust_webx_openapi::{generate_openapi_spec, APIUI_HTML};
78
79pub use rust_webx_macros::{
81 authorize, claims, delete, endpoint, from_body, from_query, from_route,
82 get, handler, post, put,
83};
84
85pub use rust_dix;
87pub use rust_dix::inject;
88pub use rust_dix::ScopeFactory;
89pub use rust_dix_macros;
90pub use rust_dix_macros::{module, Inject};
91
92pub use async_trait::async_trait;
94pub use hyper;
95pub use serde;
96pub use serde_json;
97pub use tokio;
98
99#[macro_export]
118macro_rules! register_handlers {
119 ($svc:ident, $($req:ty => $rsp:ty => $handler:ty),+ $(,)?) => {
120 $svc
121 $(
122 .singleton::<dyn $crate::IRequestHandler<$req, $rsp>>(
123 |_| ::std::sync::Arc::new(<$handler>::default())
124 )
125 )+
126 };
127}