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 bots;
6pub mod client;
7mod cloudflare;
8pub mod command;
9pub mod config;
10mod extensions;
11mod host;
12mod middleware_manifest;
13mod provider_catalog;
14pub mod sandbox;
15pub mod server;
16pub mod wire;
17
18/// Errors returned by the gateway library.
19#[derive(Debug, thiserror::Error)]
20pub enum Error {
21    #[error("gateway configuration error: {0}")]
22    Config(String),
23    #[error("gateway protocol error: {0}")]
24    Protocol(String),
25    #[error("gateway authentication failed")]
26    Unauthorized,
27    #[error(transparent)]
28    Mobius(#[from] mobius::Error),
29    #[error(transparent)]
30    Io(#[from] std::io::Error),
31    #[error(transparent)]
32    Json(#[from] serde_json::Error),
33}
34
35/// Result type shared by gateway modules.
36pub type Result<T> = std::result::Result<T, Error>;