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