Skip to main content

webdav_server/api/
mod.rs

1//! HTTP API layer: route handlers, authentication endpoints, and middleware.
2//!
3//! This module is the outermost layer of the server. Its sole responsibilities are:
4//!
5//! - Parsing and validating HTTP requests.
6//! - Delegating business logic to the [`model`] and [`storage`] layers.
7//! - Producing HTTP responses, including error sanitization via [`error::Error::into_response`].
8//!
9//! ## Sub-modules
10//!
11//! - [`assets`] — Upload, download, and delete handlers for encrypted blobs.
12//! - [`auth`] — Registration and login endpoints.
13//! - [`middleware`] — Request authentication and response telemetry.
14//! - [`route`] — The top-level Axum router that composes all of the above.
15//! - [`error`] — The `api::Error` type that covers all HTTP-layer failures.
16//!
17//! [`model`]: crate::model
18//! [`storage`]: crate::storage
19pub mod assets;
20pub mod auth;
21pub mod middleware;
22pub mod route;
23
24pub mod error;
25
26pub use error::{Error, Result};