pub trait EncryptedCommitLogMarshaller<E>: CommitLogMarshaller<E>where
    for<'async_trait> E: DeserializeOwned + Serialize + Send + Sync + 'async_trait,{
    type SecretStore: SecretStore;

    // Required methods
    fn secret_store(&self) -> &Self::SecretStore;
    fn secret_path(&self, entity_id: &EntityId) -> Arc<str>;
    fn decrypted_envelope<'life0, 'async_trait>(
        &'life0 self,
        entity_id: EntityId,
        record: ConsumerRecord
    ) -> Pin<Box<dyn Future<Output = Option<EventEnvelope<E>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn encrypted_producer_record<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: Topic,
        entity_id: EntityId,
        seq_nr: u64,
        timestamp: DateTime<Utc>,
        event: &'life1 E
    ) -> Pin<Box<dyn Future<Output = Option<ProducerRecord>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Provides the ability to transform the the memory representation of Akka Persistence events from and to the records that a CommitLog expects. Given the “cbor” feature, we use CBOR for serialization. Encryption/decryption to commit log records is also applied. Therefore a secret store is expected.

Required Associated Types§

source

type SecretStore: SecretStore

Required Methods§

source

fn secret_store(&self) -> &Self::SecretStore

Return a reference to a secret store for encryption/decryption.

source

fn secret_path(&self, entity_id: &EntityId) -> Arc<str>

Return a path to use for looking up secrets with respect to an entity being encrypted/decrypted.

source

fn decrypted_envelope<'life0, 'async_trait>( &'life0 self, entity_id: EntityId, record: ConsumerRecord ) -> Pin<Box<dyn Future<Output = Option<EventEnvelope<E>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn encrypted_producer_record<'life0, 'life1, 'async_trait>( &'life0 self, topic: Topic, entity_id: EntityId, seq_nr: u64, timestamp: DateTime<Utc>, event: &'life1 E ) -> Pin<Box<dyn Future<Output = Option<ProducerRecord>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§