Skip to main content

Crate codetopo_server

Crate codetopo_server 

Source
Expand description

HTTP surface for codetopo (Phase 2 design §3, §4).

Re-exports§

pub use handlers::router;
pub use handlers::AppState;

Modules§

auth
Bearer-key authentication and per-request metering (Phase 2 design §4, §5).
config
Runtime configuration, all of it from the environment.
error
JSON error type shared by every handler and middleware.
handlers
The eight request handlers of the Phase 2 API (design §3).
keys
API keys loaded from a newline-delimited key_id:secret file.
metering
Append-only metering log (Phase 2 design §5).

Functions§

app
Builds the served application: routes, then auth + metering around them.