Skip to main content

mobius_gateway/
lib.rs

1//! Authenticated, frontend-neutral access to independent möbius chats.
2
3mod assembly;
4pub mod auth;
5pub mod client;
6mod cloudflare;
7pub mod command;
8pub mod config;
9pub mod cron;
10mod extensions;
11mod host;
12mod middleware_manifest;
13pub mod sandbox;
14pub mod server;
15pub mod wire;
16
17/// Errors returned by the gateway library.
18#[derive(Debug, thiserror::Error)]
19pub enum Error {
20    #[error("gateway configuration error: {0}")]
21    Config(String),
22    #[error("gateway protocol error: {0}")]
23    Protocol(String),
24    #[error("gateway authentication failed")]
25    Unauthorized,
26    #[error(transparent)]
27    Mobius(#[from] mobius::Error),
28    #[error(transparent)]
29    Io(#[from] std::io::Error),
30    #[error(transparent)]
31    Json(#[from] serde_json::Error),
32}
33
34/// Result type shared by gateway modules.
35pub type Result<T> = std::result::Result<T, Error>;