refactor(router): add parent caller function for DB (#3838)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2024-02-29 13:25:49 +05:30
committed by GitHub
parent 6b078fa339
commit 0936b02ade
71 changed files with 266 additions and 174 deletions

View File

@ -1,4 +1,5 @@
use error_stack::IntoReport;
use router_env::{instrument, tracing};
#[cfg(feature = "accounts_cache")]
use storage_impl::redis::cache::CacheKind;
#[cfg(feature = "accounts_cache")]
@ -52,6 +53,7 @@ pub trait ApiKeyInterface {
#[async_trait::async_trait]
impl ApiKeyInterface for Store {
#[instrument(skip_all)]
async fn insert_api_key(
&self,
api_key: storage::ApiKeyNew,
@ -64,6 +66,7 @@ impl ApiKeyInterface for Store {
.into_report()
}
#[instrument(skip_all)]
async fn update_api_key(
&self,
merchant_id: String,
@ -113,6 +116,7 @@ impl ApiKeyInterface for Store {
}
}
#[instrument(skip_all)]
async fn revoke_api_key(
&self,
merchant_id: &str,
@ -156,6 +160,7 @@ impl ApiKeyInterface for Store {
}
}
#[instrument(skip_all)]
async fn find_api_key_by_merchant_id_key_id_optional(
&self,
merchant_id: &str,
@ -168,6 +173,7 @@ impl ApiKeyInterface for Store {
.into_report()
}
#[instrument(skip_all)]
async fn find_api_key_by_hash_optional(
&self,
hashed_api_key: storage::HashedApiKey,
@ -198,6 +204,7 @@ impl ApiKeyInterface for Store {
}
}
#[instrument(skip_all)]
async fn list_api_keys_by_merchant_id(
&self,
merchant_id: &str,