cadrumo.application.ledger.rule_repository module¶
Application-owned persistence contract for ledger classification rules.
Rule creation, priority ordering, and first-match policy belong to the ledger application surface. Encrypting those rules and selecting a concrete profile store belong to the persistence adapter. This module therefore owns only the repository operations the policy needs, their explicit bucket-scoped lifetime, and the rule’s natural object key.
- ledger_classification_rule_object_key(rule)[source]¶
Return the canonical natural key for one classification rule.
- Return type:
- Parameters:
rule (LedgerClassificationRule)
- class LedgerClassificationRuleRepositoryProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolPersistence operations required by classification-rule policy.
- save(payload)[source]¶
Persist one rule under its content-addressed identity.
- Return type:
- Parameters:
payload (LedgerClassificationRule)
- class LedgerClassificationRuleRepositoryFactory(*args, **kwargs)[source]¶
Bases:
ProtocolConstruct a classification-rule repository for one profile bucket.
- bind_ledger_classification_rule_repository_factory(factory)[source]¶
Bind one outward-composed classification-rule repository factory.
- Return type:
- Parameters: