pub mod create; use serde::{Deserialize, Serialize}; use time::OffsetDateTime; use crate::ConfigurationError; /// Transaction to monitor #[derive(Deserialize, Serialize)] #[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] pub struct TransactionSchema { #[serde(rename = "type")] /// Transaction schema type pub kind: String, /// The schema's version pub version: String, /// JSON schema for transcation #[serde(rename = "json_schema")] pub schema: serde_json::Value, #[serde(with = "time::serde::rfc3339")] pub created_at: OffsetDateTime, #[serde(with = "time::serde::rfc3339")] pub updated_at: OffsetDateTime, } pub trait SchemaDriver { fn create( &self, name: impl AsRef, version: impl AsRef, schema: serde_json::Value, ) -> impl std::future::Future> + Send + Sync; }