extern crate self as skyzen;
#[macro_use]
mod macros;
pub mod handler;
pub mod routing;
pub mod durable;
pub mod openapi;
pub mod events;
pub mod utils;
pub mod runtime;
pub use skyzen_macros::{
durable_object, error, import_config, main, openapi, queue, scheduled, test, HttpError,
};
#[cfg(feature = "static-files")]
pub mod static_files;
#[cfg(feature = "static-files")]
pub use static_files::EmbeddedStaticDir;
#[cfg(all(feature = "static-files", not(target_arch = "wasm32")))]
pub use static_files::StaticDir;
#[doc(hidden)]
#[cfg(feature = "static-files")]
pub use include_dir;
#[doc(hidden)]
pub use http_kit;
#[doc(inline)]
pub use http_kit::{
header, Body, BodyError, Endpoint, HttpError, Method, Middleware, Request, Response,
StatusCode, Uri,
};
#[cfg(target_arch = "wasm32")]
#[doc(hidden)]
pub use js_sys;
#[doc(inline)]
pub use routing::{CreateRouteNode, Route};
pub use skyzen_core::error::*;
pub use skyzen_core::Server;
#[cfg(target_arch = "wasm32")]
#[doc(hidden)]
pub use wasm_bindgen;
#[cfg(target_arch = "wasm32")]
#[doc(hidden)]
pub use wasm_bindgen_futures;
#[cfg(all(feature = "hyper", not(target_arch = "wasm32")))]
pub use skyzen_hyper as hyper;
#[doc(inline)]
pub use openapi::{IgnoreOpenApi, OpenApi, OpenApiOperation};
pub use utoipa::{PartialSchema, ToSchema};
pub mod extract;
#[cfg(feature = "auth")]
pub mod auth;
pub mod responder;
pub use responder::Responder;
pub mod middleware;
#[doc(hidden)]
pub mod __private {
use crate::{Endpoint, Middleware};
pub fn with_middleware<E, M>(
endpoint: E,
middleware: M,
) -> http_kit::endpoint::WithMiddleware<E, M>
where
E: Endpoint,
M: Middleware,
{
http_kit::endpoint::WithMiddleware::new(endpoint, middleware)
}
}
#[cfg(feature = "ws")]
pub mod websocket;
#[cfg(feature = "ws")]
pub use websocket::{
WebSocket, WebSocketMessage, WebSocketReceiver, WebSocketSender, WebSocketUpgrade,
};