refactor(storage_impl): Integrate the composite store from external crate (#1921)

This commit is contained in:
Sampras Lopes
2023-08-14 18:46:31 +05:30
committed by GitHub
parent b1e4e3883d
commit 9f199d9ab8
44 changed files with 490 additions and 445 deletions

View File

@ -29,11 +29,10 @@ pub mod reverse_lookup;
use std::sync::Arc;
use futures::lock::Mutex;
use masking::PeekInterface;
use storage_impl::redis::kv_store::RedisConnInterface;
use crate::{
services::{self, Store},
types::storage,
};
use crate::{services::Store, types::storage};
#[derive(PartialEq, Eq)]
pub enum StorageImpl {
@ -75,7 +74,7 @@ pub trait StorageInterface:
+ cards_info::CardsInfoInterface
+ merchant_key_store::MerchantKeyStoreInterface
+ MasterKeyInterface
+ services::RedisConnInterface
+ RedisConnInterface
+ 'static
{
}
@ -86,7 +85,7 @@ pub trait MasterKeyInterface {
impl MasterKeyInterface for Store {
fn get_master_key(&self) -> &[u8] {
&self.master_key
self.master_key().peek()
}
}
@ -176,7 +175,7 @@ where
.change_context(redis_interface::errors::RedisError::JsonDeserializationFailed)
}
impl services::RedisConnInterface for MockDb {
impl RedisConnInterface for MockDb {
fn get_redis_conn(
&self,
) -> Result<