feat: ServiceClient trait, HttpTransport, and SunbeamClient factory

Foundation layer for unified service client wrappers:
- AuthMethod enum (None, Bearer, Header, Token)
- ServiceClient trait with service_name(), base_url(), from_parts()
- HttpTransport with json(), json_opt(), send(), bytes() helpers
- SunbeamClient lazy factory with OnceLock-cached per-service clients
- Feature flags for all service modules (identity, gitea, matrix, etc.)

Bump: sunbeam-sdk v0.2.0
This commit is contained in:
2026-03-21 20:11:22 +00:00
parent 31fde1a8c6
commit 6823772055
4 changed files with 613 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
#[macro_use]
pub mod error;
pub mod client;
pub mod auth;
pub mod checks;
pub mod cluster;
@@ -17,3 +19,21 @@ pub mod secrets;
pub mod services;
pub mod update;
pub mod users;
// Feature-gated service client modules
#[cfg(feature = "identity")]
pub mod identity;
#[cfg(feature = "matrix")]
pub mod matrix;
#[cfg(feature = "opensearch")]
pub mod search;
#[cfg(feature = "s3")]
pub mod storage;
#[cfg(feature = "livekit")]
pub mod media;
#[cfg(feature = "monitoring")]
pub mod monitoring;
#[cfg(feature = "lasuite")]
pub mod lasuite;
#[cfg(feature = "build")]
pub mod build;