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