Skip to main content

Crate syrup_rail_postgres

Crate syrup_rail_postgres 

Source
Expand description

PostgreSQL schema contract and transaction orchestration for Syrup Rail.

Production service construction must not expose or invoke a migrator; host applications materialize versioned install artifacts as immutable migrations.

Structs§

AdmittedHostCharge
AdmittedSubscriptionEnrollment
One committed final-admission result that authorizes exactly one immediate provider submission by consuming this value.
AdmittedSubscriptionPaymentMethodReplacement
One committed final-admission result authorizing exactly one immediate Customer Vault mutation.
AdmittedSubscriptionRecovery
One committed final-admission result authorizing exactly one immediate subscription-recovery submission.
AdmittedSubscriptionRenewal
One committed final-admission result authorizing exactly one immediate automatic recurring charge.
BillingEventWriteError
BillingTransactionError
ExternalReversalHostStoreError
GatewayLifecycleQuarantineAlert
GatewayLifecycleQuarantineResolutionRecord
GatewayLifecycleQuarantineReviewRecord
GatewayLifecycleReconciliationSummary
HostChargeLedgerAdmissionQuery
HostChargeSubmissionAdmission
HostChargeTargetError
HostChargeTargetReservation
ManualAttemptFailureHostStoreError
ProcessorChargeClassificationSummary
SubscriptionBillingService

Enums§

BillingTransactionSubjectState
CompensatingProcessorChargeOutcome
EntitlementGuardError
EntitlementQueryError
ExactQueryObservation
ExternalReversalAttestationOutcome
ExternalReversalHostTransitionOutcome
GatewayLifecycleApplyOutcome
GatewayLifecycleQuarantineResolutionOutcome
GatewayLifecycleReconciliationError
GatewayMutationCooldownScope
HostChargeAdmissionOutcome
HostChargeApplicationError
HostChargeLedgerAdmission
HostChargeLedgerAdmissionError
HostChargeLedgerAdmissionMode
HostChargePreflightOutcome
HostChargeProviderResult
HostChargeReservationDecision
HostChargeReservationOutcome
HostChargeStoreError
HostChargeSubmissionDecision
HostChargeSubmissionOutcome
ManualAttemptFailureHostTransitionOutcome
OperatorReviewError
PaymentAttemptStoreError
ProcessorChargeObservationOutcome
ProcessorChargeStoreError
RenewalStoreError
SubscriptionCancellationError
SubscriptionDiscountOperationError
SubscriptionEnrollmentAdmissionOutcome
SubscriptionEnrollmentApplicationError
SubscriptionEnrollmentProviderResult
SubscriptionEnrollmentServiceError
SubscriptionGrantMutationError
SubscriptionPaymentMethodReplacementAdmissionOutcome
SubscriptionPaymentMethodReplacementProviderResult
SubscriptionRecoveryAdmissionOutcome
SubscriptionRecoveryProviderResult
SubscriptionRenewalAdmissionOutcome
SubscriptionRenewalProviderResult

Traits§

BillingTransaction
One host-owned transaction and its typed event projection capability.
BillingTransactionCoordinator
Host-prepared transaction whose subject authorization lock is acquired before any shared billing lock.
ExternalReversalHostStore
HostChargeTargetStore
Host-owned target extension composed into shared ledger transactions.
ManualAttemptFailureHostStore
SubscriptionOfferStore

Functions§

activate_gateway_configuration
Activates an exact gateway configuration without touching cooldown state.
admit_host_charge_submission
admit_host_charge_submission_in_transaction
admit_subscription_enrollment_submission
Owns and commits final enrollment admission before exposing a one-shot submission capability. A rolled-back transaction can never yield the capability consumed by submit_admitted_subscription_enrollment.
admit_subscription_enrollment_submission_in_transaction
Revalidates a prepared initial attempt and durably admits its one provider mutation.
admit_subscription_payment_method_replacement
Commits final payment-method replacement admission before exposing its one-shot Customer Vault capability.
admit_subscription_payment_method_replacement_in_transaction
Revalidates the exact subscription baseline and commits one-shot Customer Vault admission. Semantic drift terminalizes the prepared attempt.
admit_subscription_recovery_submission
Commits final recovery admission before exposing its one-shot capability.
admit_subscription_recovery_submission_in_transaction
Revalidates the exact locked snapshot and commits one-shot provider admission. Every semantic rejection terminalizes the prepared attempt.
admit_subscription_renewal_submission
Commits final automatic-renewal admission and captures the exact stored credential.
admit_subscription_renewal_submission_in_transaction
Revalidates one exact renewal snapshot and commits one-shot submission admission.
apply_exact_query_observation
Applies one authoritative negative exact-query observation.
apply_gateway_lifecycle_evidence
apply_host_charge_gateway_outcome
apply_reconciled_host_charge_gateway_outcome
apply_reconciled_subscription_enrollment_gateway_outcome
Applies an already-observed provider outcome to an exact durable enrollment attempt.
apply_reconciled_subscription_payment_method_replacement_gateway_outcome
apply_reconciled_subscription_recovery_gateway_outcome
Re-enters the same recovery application authority from durable evidence and never resolves a live gateway or submits another mutation.
apply_reconciled_subscription_renewal_gateway_outcome
apply_staged_gateway_lifecycle_evidence
apply_subscription_enrollment_gateway_outcome
Applies one initial-enrollment gateway outcome to the durable billing ledger.
apply_subscription_payment_method_replacement_gateway_outcome
apply_subscription_recovery_gateway_outcome
Applies one recovery outcome through the canonical charge ledger and host billing transaction.
apply_subscription_renewal_gateway_outcome
attempt_review_page
attest_external_reversal
billing_deletion_blockers
Reports the canonical financial rows that prevent host account deletion.
cancel_subscription_in_transaction
Cancels one exact scope/subscriber/plan subscription inside the caller’s transaction.
claim_exact_reconciliation_attempts
Claims one bounded, account-scoped batch for authoritative exact queries.
claim_gateway_lifecycle_quarantine_alert
claim_subscription_discount
claim_subscription_discount_in_transaction
classify_pending_processor_charges
Classifies one bounded batch of durable pending processor charges.
clear_subscription_discount
clear_subscription_discount_in_transaction
create_subscription_discount_code
create_subscription_discount_code_in_transaction
create_subscription_grant
Creates a grant inside the caller’s transaction.
disable_subscription_discount_code
disable_subscription_discount_code_in_transaction
due_renewals
Returns the deterministic, provider-neutral renewal work due now.
entitlement
Loads one exact scope/subscriber/plan entitlement from a single database snapshot.
fail_review_required_attempt
fail_stale_unsubmitted_payment_method_replacements
Fails one bounded batch of stale payment-method replacements for an account.
fail_stale_unsubmitted_subscription_enrollments
Expires every stale prepared enrollment for one account.
find_payment_attempt_by_id_in_transaction
Loads an attempt by its exact scope and durable identity without locking it.
gateway_lifecycle_quarantine_review_page
gateway_lifecycle_reconciliation_start
host_charge_ledger_admission
list_subscription_discount_codes
list_subscription_discount_codes_in_transaction
lock_payment_attempt_by_idempotency_in_transaction
Locks the exact owner-scoped idempotency row for replay or mutation.
mark_subscription_discount_claim_applied_in_transaction
observe_processor_charge_in_transaction
preflight_host_charge_in_transaction
preflight_subscription_enrollment_in_transaction
Resolves subscriber-wide enrollment idempotency before host admission.
preflight_subscription_payment_method_replacement_in_transaction
Resolves payment-method replacement idempotency before host admission.
preflight_subscription_recovery_in_transaction
Resolves subscriber-wide recovery idempotency before host admission.
processor_charge_review_page
reconcile_gateway_transaction_reports
reconciliation_gateway_accounts
Returns every registered gateway account in deterministic locator order.
record_gateway_lifecycle_quarantines
register_gateway_account
Registers canonical gateway metadata on the caller’s connection.
renewal_attempt_state
Computes the one shared renewal/recovery period ledger state.
require_entitlement_for_update
Locks and revalidates one exact entitlement inside the caller’s transaction.
reserve_host_charge_in_transaction
reserve_subscription_enrollment_in_transaction
Reserves or resumes one exact-plan initial enrollment inside the caller’s transaction.
reserve_subscription_payment_method_replacement_in_transaction
Locks the exact subscription baseline and reserves a token-free replacement attempt before Customer Vault I/O.
reserve_subscription_recovery_in_transaction
Locks the canonical subscription, derives the exact due-period request, and inserts a token-free recovery attempt in one transaction.
reserve_subscription_renewal_in_transaction
Locks one exact due subscription and inserts its automatic-renewal attempt.
resolve_gateway_lifecycle_quarantine
revoke_subscription_grant
Revokes an exact grant inside the caller’s transaction.
save_gateway_lifecycle_reconciliation_cursor
saved_subscription_discount_claim
saved_subscription_discount_claim_in_transaction
scrub_subscriber_billing_data
Removes the canonical mutable billing PII for one subscriber.
stage_gateway_lifecycle_evidence
store_compensating_processor_charge
submit_admitted_host_charge
submit_admitted_subscription_enrollment
Performs the one provider sale authorized by a committed final admission, then applies or durably parks its result.
submit_admitted_subscription_payment_method_replacement
Performs the one Customer Vault mutation authorized by committed admission.
submit_admitted_subscription_recovery
Performs the one provider sale authorized by committed recovery admission, then applies or durably parks its result without holding a database lock across provider I/O.
submit_admitted_subscription_renewal
Performs the one recurring sale authorized by committed renewal admission.
transition_processor_charge_in_transaction
update_subscription_discount_code
update_subscription_discount_code_in_transaction
validate_subscription_discount_code
validate_subscription_discount_code_in_transaction