#![forbid(unsafe_code)]
#![deny(unused_must_use)]
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![warn(missing_debug_implementations)]
#![warn(rust_2018_idioms)]
#![warn(unreachable_pub)]
#![allow(clippy::missing_errors_doc)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::module_name_repetitions)] #![allow(clippy::doc_markdown)] #![allow(clippy::must_use_candidate)] #![allow(clippy::cast_possible_truncation)] #![allow(clippy::cast_sign_loss)]
pub mod auth;
pub mod builder;
pub mod error;
pub mod health;
#[cfg(feature = "storage")]
pub mod storage;
#[cfg(feature = "kv")]
pub mod kv;
#[cfg(feature = "sql")]
pub mod sql;
#[cfg(feature = "queue")]
pub mod queue;
#[cfg(feature = "secrets")]
pub mod secrets;
#[cfg(feature = "email-smtp")]
pub mod email;
#[cfg(feature = "otlp")]
pub mod otlp;
pub use auth::TokenAuth;
pub use builder::{CorsConfig, SidecarBuilder, TraceId};
pub use error::{Error, Result};
pub use health::{HealthCheck, HealthResult};
#[cfg(feature = "storage")]
pub use storage::StorageService;
#[cfg(feature = "kv")]
pub use kv::KvService;
#[cfg(feature = "sql")]
pub use sql::SqlService;
#[cfg(feature = "queue")]
pub use queue::QueueService;
#[cfg(feature = "secrets")]
pub use secrets::SecretsService;
#[cfg(feature = "email-smtp")]
pub use email::EmailService;
pub use axum;
pub use tower;
pub use tower_http;
pub trait Sidecar: Send + Sync + 'static {
fn name(&self) -> &'static str;
fn router(&self) -> axum::Router;
fn health_check(&self) -> bool {
true
}
}
impl Sidecar for Box<dyn Sidecar> {
fn name(&self) -> &'static str {
(**self).name()
}
fn router(&self) -> axum::Router {
(**self).router()
}
fn health_check(&self) -> bool {
(**self).health_check()
}
}