backbone-integrations 0.12.0

Integration registry: connectors, integration accounts and an idempotent inbound event lane, with one OAuth flow (HMAC-bound state, PKCE)
Documentation
//! Application services
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Each entity service is a type alias over `GenericCrudService`.

pub mod error;
pub use error::{ServiceError, ServiceResult};

pub mod integration_connector_service;
pub mod integration_account_service;
pub mod integration_event_service;


pub use integration_connector_service::IntegrationConnectorService;
pub use integration_account_service::IntegrationAccountService;
pub use integration_event_service::IntegrationEventService;
pub use integration_connector_service::IntegrationConnectorRowRules;
pub use integration_account_service::IntegrationAccountRowRules;
pub use integration_event_service::IntegrationEventRowRules;

/// A `IntegrationConnectorService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_integration_connector_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::IntegrationConnectorRepository>,
) -> IntegrationConnectorService {
    IntegrationConnectorService::with_repository(repository).with_guard(std::sync::Arc::new(IntegrationConnectorRowRules))
}

/// A `IntegrationAccountService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_integration_account_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::IntegrationAccountRepository>,
) -> IntegrationAccountService {
    IntegrationAccountService::with_repository(repository).with_guard(std::sync::Arc::new(IntegrationAccountRowRules))
}

/// A `IntegrationEventService` over `repository` with its write guard attached: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_integration_event_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::IntegrationEventRepository>,
) -> IntegrationEventService {
    IntegrationEventService::with_repository(repository).with_guard(std::sync::Arc::new(IntegrationEventRowRules))
}

// This directory's extension (hand-written; ADR-0031).
include!("mod.ext.rs");