153 lines
6.4 KiB
Rust
153 lines
6.4 KiB
Rust
// file: kb-store/src/contracts.rs
|
|
// version: 2
|
|
|
|
//! Backend-neutral storage contracts used by pipeline crates.
|
|
|
|
mod dto;
|
|
mod entity;
|
|
mod error;
|
|
mod health;
|
|
mod pagination;
|
|
mod repository;
|
|
|
|
/// Core account key insert contract.
|
|
pub use self::dto::CoreAccountKeyInsert;
|
|
/// Core account key source category.
|
|
pub use self::dto::CoreAccountKeySource;
|
|
/// Core balance change insert contract.
|
|
pub use self::dto::CoreBalanceChangeInsert;
|
|
/// Core balance change kind.
|
|
pub use self::dto::CoreBalanceChangeKind;
|
|
/// Complete normalized core extraction write bundle.
|
|
pub use self::dto::CoreExtractionBundle;
|
|
/// Failure details persisted for one canonical to core extraction attempt.
|
|
pub use self::dto::CoreExtractionFailure;
|
|
/// Bounded canonical transaction selection filter for core extraction.
|
|
pub use self::dto::CoreExtractionSelectionFilter;
|
|
/// Core inner instruction insert contract.
|
|
pub use self::dto::CoreInnerInstructionInsert;
|
|
/// Core instruction insert contract.
|
|
pub use self::dto::CoreInstructionInsert;
|
|
/// Core instruction lifecycle mark request.
|
|
pub use self::dto::CoreInstructionLifecycleMark;
|
|
/// Core instruction processing state.
|
|
pub use self::dto::CoreInstructionProcessingState;
|
|
/// Core instruction replay filter contract.
|
|
pub use self::dto::CoreInstructionReplayFilter;
|
|
/// Core log insert contract.
|
|
pub use self::dto::CoreLogInsert;
|
|
/// Core transaction insert contract.
|
|
pub use self::dto::CoreTransactionInsert;
|
|
/// One machine-readable decoder coverage declaration row.
|
|
pub use self::dto::DecodeCoverageDeclarationInsert;
|
|
/// One observed coverage classification row owned by one decode attempt.
|
|
pub use self::dto::DecodeCoverageObservationInsert;
|
|
/// One row of aggregated decoder coverage diagnostics.
|
|
pub use self::dto::DecodeCoverageSummaryRow;
|
|
/// Failed decode attempt persisted in the common ledger.
|
|
pub use self::dto::DecodeFailure;
|
|
/// One processor-owned decoded observation row.
|
|
pub use self::dto::DecodeObservationInsert;
|
|
/// Atomic persistence bundle for one decoder and one contextual input.
|
|
pub use self::dto::DecodePersistenceBundle;
|
|
/// Bounded contextual instruction selection filter for decode campaigns.
|
|
pub use self::dto::DecodeSelectionFilter;
|
|
/// Decoded event insert contract.
|
|
pub use self::dto::DecodedEventInsert;
|
|
/// Insert or upsert result contract returned by repositories.
|
|
pub use self::dto::InsertOutcome;
|
|
/// Maximum number of materialized rows returned by one bounded query.
|
|
pub use self::dto::MAX_MATERIALIZED_EVENT_QUERY_ROWS;
|
|
/// Atomic persistence bundle for one materializer and one decoded observation.
|
|
pub use self::dto::MaterializationPersistenceBundle;
|
|
/// Bounded read-only materialized event selection.
|
|
pub use self::dto::MaterializedEventFilter;
|
|
/// Materialized event insert contract.
|
|
pub use self::dto::MaterializedEventInsert;
|
|
/// One materialized output returned by a bounded query.
|
|
pub use self::dto::MaterializedEventQueryRow;
|
|
/// One processor-owned materialized output row.
|
|
pub use self::dto::MaterializedOutputInsert;
|
|
/// Stable processing ledger identity.
|
|
pub use self::dto::ProcessingLedgerIdentity;
|
|
/// Processing ledger mark request contract.
|
|
pub use self::dto::ProcessingLedgerMark;
|
|
/// Stable processing ledger status.
|
|
pub use self::dto::ProcessingLedgerStatus;
|
|
/// Raw payload lifecycle mark request.
|
|
pub use self::dto::RawPayloadLifecycleMark;
|
|
/// Raw payload processing state.
|
|
pub use self::dto::RawPayloadProcessingState;
|
|
/// Raw payload retention state.
|
|
pub use self::dto::RawPayloadRetentionState;
|
|
/// Canonical raw Solana transaction insert contract.
|
|
pub use self::dto::RawTransactionInsert;
|
|
/// Store backend diagnostic contract.
|
|
pub use self::dto::StoreBackendDescriptor;
|
|
/// Store backend kind contract.
|
|
pub use self::dto::StoreBackendKind;
|
|
/// Store migration diagnostic snapshot contract.
|
|
pub use self::dto::StoreMigrationSnapshot;
|
|
/// Store migration status contract.
|
|
pub use self::dto::StoreMigrationStatus;
|
|
/// Transaction acquisition observation insert contract.
|
|
pub use self::dto::TransactionObservationInsert;
|
|
/// Transaction acquisition observation origin.
|
|
pub use self::dto::TransactionObservationOrigin;
|
|
/// Transaction acquisition observation status.
|
|
pub use self::dto::TransactionObservationStatus;
|
|
/// Core account key SQL-like row contract.
|
|
pub use self::entity::CoreAccountKeyRow;
|
|
/// Core balance change SQL-like row contract.
|
|
pub use self::entity::CoreBalanceChangeRow;
|
|
/// Core inner instruction SQL-like row contract.
|
|
pub use self::entity::CoreInnerInstructionRow;
|
|
/// Core instruction SQL-like row contract.
|
|
pub use self::entity::CoreInstructionRow;
|
|
/// Core log SQL-like row contract.
|
|
pub use self::entity::CoreLogRow;
|
|
/// Core transaction SQL-like row contract.
|
|
pub use self::entity::CoreTransactionRow;
|
|
/// Decoded event SQL-like row contract.
|
|
pub use self::entity::DecodedEventRow;
|
|
/// Materialized event SQL-like row contract.
|
|
pub use self::entity::MaterializedEventRow;
|
|
/// Processing ledger SQL-like row contract.
|
|
pub use self::entity::ProcessingLedgerRow;
|
|
/// Canonical raw Solana transaction SQL-like row contract.
|
|
pub use self::entity::RawTransactionRow;
|
|
/// Transaction acquisition observation SQL-like row contract.
|
|
pub use self::entity::TransactionObservationRow;
|
|
/// Storage error helper functions.
|
|
pub use self::error::storage_contract_error;
|
|
/// Store backend health snapshot.
|
|
pub use self::health::StoreHealthSnapshot;
|
|
/// Store backend health status.
|
|
pub use self::health::StoreHealthStatus;
|
|
/// Default repository page size.
|
|
pub use self::pagination::DEFAULT_PAGE_SIZE;
|
|
/// Maximum repository page size.
|
|
pub use self::pagination::MAX_PAGE_SIZE;
|
|
/// Page request contract for repository list operations.
|
|
pub use self::pagination::PageRequest;
|
|
/// Sort direction for repository list operations.
|
|
pub use self::pagination::SortDirection;
|
|
/// Canonical transaction to core extraction storage behavior.
|
|
pub use self::repository::CoreExtractionStore;
|
|
/// Core Solana storage behavior.
|
|
pub use self::repository::CoreTransactionStore;
|
|
/// Contextual instruction decode and materialization storage behavior.
|
|
pub use self::repository::DecodePipelineStore;
|
|
/// Decoded event storage behavior.
|
|
pub use self::repository::DecodedEventStore;
|
|
/// Materialized event storage behavior.
|
|
pub use self::repository::MaterializedEventStore;
|
|
/// Processing ledger storage behavior.
|
|
pub use self::repository::ProcessingLedgerStore;
|
|
/// Program observation storage behavior.
|
|
pub use self::repository::ProgramObservationStore;
|
|
/// Raw transaction storage behavior.
|
|
pub use self::repository::RawTransactionStore;
|
|
/// Store health storage behavior.
|
|
pub use self::repository::StoreHealthStore;
|