backbone-accounting 0.18.1

GL, journals, ledger, reconciliation (extracted from bersihir)
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 account_service;
pub mod accounting_post_service;
pub mod cost_center_service;
pub mod emv_qr_config_service;
pub mod bank_check_sequence_service;
pub mod printed_check_service;
pub mod tax_tag_repair_run_service;
pub mod financial_statement_service;
pub mod fiscal_period_service;
pub mod journal_service;
pub mod journal_line_service;
pub mod ledger_service;
pub mod reconciliation_service;
pub mod reconciliation_item_service;
pub mod full_reconcile_service;
pub mod partial_reconcile_service;


pub use account_service::AccountService;
pub use accounting_post_service::AccountingPostService;
pub use cost_center_service::CostCenterService;
pub use emv_qr_config_service::EmvQrConfigService;
pub use bank_check_sequence_service::BankCheckSequenceService;
pub use printed_check_service::PrintedCheckService;
pub use tax_tag_repair_run_service::TaxTagRepairRunService;
pub use financial_statement_service::FinancialStatementService;
pub use fiscal_period_service::FiscalPeriodService;
pub use journal_service::JournalService;
pub use journal_line_service::JournalLineService;
pub use ledger_service::LedgerService;
pub use reconciliation_service::ReconciliationService;
pub use reconciliation_item_service::ReconciliationItemService;
pub use full_reconcile_service::FullReconcileService;
pub use partial_reconcile_service::PartialReconcileService;
pub use account_service::AccountRowRules;
pub use accounting_post_service::AccountingPostRowRules;
pub use cost_center_service::CostCenterRowRules;
pub use emv_qr_config_service::EmvQrConfigRowRules;
pub use bank_check_sequence_service::BankCheckSequenceRowRules;
pub use printed_check_service::PrintedCheckRowRules;
pub use tax_tag_repair_run_service::TaxTagRepairRunRowRules;
pub use financial_statement_service::FinancialStatementRowRules;
pub use fiscal_period_service::FiscalPeriodRowRules;
pub use journal_service::JournalRowRules;
pub use journal_line_service::JournalLineRowRules;
pub use ledger_service::LedgerRowRules;
pub use reconciliation_service::ReconciliationRowRules;
pub use reconciliation_item_service::ReconciliationItemRowRules;
pub use partial_reconcile_service::PartialReconcileRowRules;

/// A `AccountService` 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_account_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::AccountRepository>,
) -> AccountService {
    AccountService::with_repository(repository).with_guard(std::sync::Arc::new(AccountRowRules))
}

/// A `AccountingPostService` 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_accounting_post_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::AccountingPostRepository>,
) -> AccountingPostService {
    AccountingPostService::with_repository(repository).with_guard(std::sync::Arc::new(AccountingPostRowRules))
}

/// A `CostCenterService` 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_cost_center_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::CostCenterRepository>,
) -> CostCenterService {
    CostCenterService::with_repository(repository).with_guard(std::sync::Arc::new(CostCenterRowRules))
}

/// A `EmvQrConfigService` 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_emv_qr_config_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::EmvQrConfigRepository>,
) -> EmvQrConfigService {
    EmvQrConfigService::with_repository(repository).with_guard(std::sync::Arc::new(EmvQrConfigRowRules))
}

/// A `BankCheckSequenceService` 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_bank_check_sequence_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::BankCheckSequenceRepository>,
) -> BankCheckSequenceService {
    BankCheckSequenceService::with_repository(repository).with_guard(std::sync::Arc::new(BankCheckSequenceRowRules))
}

/// A `PrintedCheckService` 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_printed_check_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::PrintedCheckRepository>,
) -> PrintedCheckService {
    PrintedCheckService::with_repository(repository).with_guard(std::sync::Arc::new(PrintedCheckRowRules))
}

/// A `TaxTagRepairRunService` 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_tax_tag_repair_run_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::TaxTagRepairRunRepository>,
) -> TaxTagRepairRunService {
    TaxTagRepairRunService::with_repository(repository).with_guard(std::sync::Arc::new(TaxTagRepairRunRowRules))
}

/// A `FinancialStatementService` 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_financial_statement_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::FinancialStatementRepository>,
) -> FinancialStatementService {
    FinancialStatementService::with_repository(repository).with_guard(std::sync::Arc::new(FinancialStatementRowRules))
}

/// A `FiscalPeriodService` 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_fiscal_period_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::FiscalPeriodRepository>,
) -> FiscalPeriodService {
    FiscalPeriodService::with_repository(repository).with_guard(std::sync::Arc::new(FiscalPeriodRowRules))
}

/// A `JournalService` 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_journal_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::JournalRepository>,
) -> JournalService {
    JournalService::with_repository(repository).with_guard(std::sync::Arc::new(JournalRowRules))
}

/// A `JournalLineService` 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_journal_line_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::JournalLineRepository>,
) -> JournalLineService {
    JournalLineService::with_repository(repository).with_guard(std::sync::Arc::new(JournalLineRowRules))
}

/// A `LedgerService` 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_ledger_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::LedgerRepository>,
) -> LedgerService {
    LedgerService::with_repository(repository).with_guard(std::sync::Arc::new(LedgerRowRules))
}

/// A `ReconciliationService` 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_reconciliation_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::ReconciliationRepository>,
) -> ReconciliationService {
    ReconciliationService::with_repository(repository).with_guard(std::sync::Arc::new(ReconciliationRowRules))
}

/// A `ReconciliationItemService` 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_reconciliation_item_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::ReconciliationItemRepository>,
) -> ReconciliationItemService {
    ReconciliationItemService::with_repository(repository).with_guard(std::sync::Arc::new(ReconciliationItemRowRules))
}

/// A `FullReconcileService` over `repository`: the way to build it, so its writes are
/// served only with the rules the schema declares.
pub fn build_full_reconcile_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::FullReconcileRepository>,
) -> FullReconcileService {
    FullReconcileService::with_repository(repository)
}

/// A `PartialReconcileService` 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_partial_reconcile_service(
    repository: std::sync::Arc<crate::infrastructure::persistence::PartialReconcileRepository>,
) -> PartialReconcileService {
    PartialReconcileService::with_repository(repository).with_guard(std::sync::Arc::new(PartialReconcileRowRules))
}

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