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