text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/generic_link.rs | crate: router
use error_stack::report;
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::storage,
};
async fn insert_generic_link(
&self,
generic_link: storage::G... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/generic_link.rs | crate: router
use error_stack::report;
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::storage,
};
async fn find_payout_link_by_link_id(
&self,
link_id: &str,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/generic_link.rs | crate: router
use error_stack::report;
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::storage,
};
async fn find_pm_collect_link_by_link_id(
&self,
link_id: &st... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use futures::future::try_join_all;
use hyperswitch_d... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use futures::future::try_join_all;
use hyperswitch_d... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use futures::future::try_join_all;
use hyperswitch_domain_models::c... | ast_fragments |
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::{
core::err... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::{
core::err... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
behaviour::{Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
... | ast_fragments |
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
behavio... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use hyperswitch_domain_models::customer;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
fn from(value: CustomerListConstraints) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/customers.rs | crate: router
use common_utils::{ext_traits::AsyncExt, id_type, types::keymanager::KeyManagerState};
use diesel_models::query::customers::CustomerListConstraints as DieselCustomerListConstraints;
use hyperswitch_domain_models::customer;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use error_stack::{report, ResultExt};
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::domain::{
self,
behaviour::{Conversion... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb... | ast_fragments |
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use error_stack::{report, ResultExt};
use masking::Secret;
use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE};
use crate::{
connection,
core::errors... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/merchant_key_store.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::domain::{
self,
behaviour::{Conversion... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
payment_id: &id_type::PaymentId,
storage_scheme: MerchantStorageScheme,
) -> CustomResult<Vec<storage::PaymentAttempt>, errors::StorageError> {
self.diesel_store
.find_attempts_by_merchant_id_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
payment_method,
payment_method_type,
authentication_type,
merchant_connector_id,
card_network,
card_discovery,
storage_s... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
merchant_id: &id_type::MerchantId,
storage_scheme: MerchantStorageScheme,
) -> CustomResult<
hyperswitch_domain_models::payments::payment_attempt::PaymentListFilters,
errors::StorageError,
> {... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
if let Err(er) = self
.kafka_producer
.log_payment_attempt(&attempt, Some(this), self.tenant_id.clone())
.await
{
logger::error!(message="Failed to log analytics event ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
if let Err(er) = self
.kafka_producer
.log_payment_attempt(&attempt, None, self.tenant_id.clone())
.await
{
logger::error!(message="Failed to log analytics event for pa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
async fn list_routing_algorithm_metadata_by_merchant_id(
&self,
merchant_id: &id_type::MerchantId,
limit: i64,
offset: i64,
) -> CustomResult<Vec<storage::RoutingProfileMetadata>, errors::Sto... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_routing_algorithm_metadata_by_algorithm_id_profile_id(
&self,
algorithm_id: &id_type::RoutingId,
profile_id: &id_type::ProfileId,
) -> CustomResult<storage::RoutingProfileMetadata... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
)
.await
}
}
#[async_trait::async_trait]
#[cfg(feature = "v1")]
impl db::payment_method_session::PaymentMethodsSessionInterface for KafkaStore {}
#[async_trait::async_trait]
impl CallbackMapperInterface... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
state: &KeyManagerState,
key_store: &hyperswitch_domain_models::merchant_key_store::MerchantKeyStore,
id: &id_type::GlobalPaymentMethodSessionId,
) -> CustomResult<
hyperswitch_domain_models::paym... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
async fn insert_payment_methods_session(
&self,
state: &KeyManagerState,
key_store: &hyperswitch_domain_models::merchant_key_store::MerchantKeyStore,
payment_methods_session: hyperswitch_domain_mo... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
theme_id: String,
lineage: ThemeLineage,
) -> CustomResult<storage::theme::Theme, errors::StorageError> {
self.diesel_store
.delete_theme_by_lineage_and_theme_id(theme_id, lineage)
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store
.find_most_specific_theme_in_lineage(lineage)
.await
}
async fn find_theme_by_lineage(
&self,
lineage: ThemeLineage,
) -> CustomResult<storage::theme::Th... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store.find_theme_by_theme_id(theme_id).await
}
async fn find_most_specific_theme_in_lineage(
&self,
lineage: ThemeLineage,
) -> CustomResult<diesel_models::user::theme::Theme, errors:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
theme: storage::theme::ThemeNew,
) -> CustomResult<storage::theme::Theme, errors::StorageError> {
self.diesel_store.insert_theme(theme).await
}
async fn find_theme_by_theme_id(
&self,
the... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
}
#[async_trait::async_trait]
impl ThemeInterface for KafkaStore {
async fn insert_theme(
&self,
theme: storage::theme::ThemeNew,
) -> CustomResult<storage::theme::Theme, errors::StorageError> {
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
) -> CustomResult<
Vec<diesel_models::user_authentication_method::UserAuthenticationMethod>,
errors::StorageError,
> {
self.diesel_store
.list_user_authentication_methods_for_email_domain(... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn update_user_authentication_method(
&self,
id: &str,
user_authentication_method_update: storage::UserAuthenticationMethodUpdate,
) -> CustomResult<storage::UserAuthenticationMethod, err... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await
}
async fn list_user_authentication_methods_for_owner_id(
&self,
owner_id: &str,
) -> CustomResult<Vec<storage::UserAuthenticationMethod>, errors::StorageError> {
self.diesel_s... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
key: &Secret<Vec<u8>>,
from: u32,
limit: u32,
) -> CustomResult<Vec<domain::UserKeyStore>, errors::StorageError> {
self.diesel_store
.get_all_user_key_store(state, key, from, limit)
.awai... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
&self,
payout_link: storage::PayoutLink,
payout_link_update: storage::PayoutLinkUpdate,
) -> CustomResult<storage::PayoutLink, errors::StorageError> {
self.diesel_store
.update_payout_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
link_id: &str,
) -> CustomResult<storage::PayoutLink, errors::StorageError> {
self.diesel_store.find_payout_link_by_link_id(link_id).await
}
async fn insert_generic_link(
&self,
generic_l... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
is_lineage_data_required: bool,
tenant_id: id_type::TenantId,
org_id: id_type::OrganizationId,
) -> CustomResult<Vec<storage::Role>, errors::StorageError> {
self.diesel_store
.generic_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
&self,
tenant_id: &id_type::TenantId,
org_id: &id_type::OrganizationId,
merchant_id: Option<&id_type::MerchantId>,
entity_type: Option<enums::EntityType>,
limit: Option<u32>,
) -> ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.update_role_by_role_id(role_id, role_update)
.await
}
async fn delete_role_by_role_id(
&self,
role_id: &str,
) -> CustomResult<storage::Role, errors::StorageError> {
self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
}
#[async_trait::async_trait]
impl RoleInterface for KafkaStore {
async fn insert_role(
&self,
role: storage::RoleNew,
) -> CustomResult<storage::Role, errors::StorageError> {
self.diesel_store... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_authentication_by_merchant_id_authentication_id(
&self,
merchant_id: &id_type::MerchantId,
authentication_id: String,
) -> CustomResult<storage::Authentication, errors::StorageErr... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
if let Err(er) = self
.kafka_producer
.log_authentication(&auth, None, self.tenant_id.clone())
.await
{
logger::error!(message="Failed to log analytics event for authe... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store
.update_authorization_by_merchant_id_authorization_id(
merchant_id,
authorization_id,
authorization,
)
.await
}
}
#[async_trait::asy... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_all_authorizations_by_merchant_id_payment_id(
&self,
merchant_id: &id_type::MerchantId,
payment_id: &id_type::PaymentId,
) -> CustomResult<Vec<storage::Authorization>, errors::Sto... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
}
#[async_trait::async_trait]
impl AuthorizationInterface for KafkaStore {
async fn insert_authorization(
&self,
authorization: storage::AuthorizationNew,
) -> CustomResult<storage::Authorization, erro... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
let _ = self
.kafka_producer
.log_dispute_delete(dispute, self.tenant_id.clone())
.await;
}
Ok(disputes_list)
}
}
#[async_trait::async_trait]
impl Aut... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
for refund in refunds_list.iter() {
let _ = self
.kafka_producer
.log_refund_delete(refund, self.tenant_id.clone())
.await;
}
Ok(refunds_list)
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
for payment_attempt in payment_attempts_list.iter() {
let _ = self
.kafka_producer
.log_payment_attempt_delete(payment_attempt, self.tenant_id.clone())
.await;
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await?;
for payment_intent in payment_intents_list.iter() {
let _ = self
.kafka_producer
.log_payment_intent_delete(payment_intent, self.tenant_id.clone())
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await?;
for dispute in disputes_list.iter() {
let _ = self
.kafka_producer
.log_dispute(dispute, None, self.tenant_id.clone())
.await;
}
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await?;
for refund in refunds_list.iter() {
let _ = self
.kafka_producer
.log_refund(refund, None, self.tenant_id.clone())
.await;
}
O... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await?;
for payment_attempt in payment_attempts_list.iter() {
let _ = self
.kafka_producer
.log_payment_attempt(payment_attempt, None, self.tenant_id.clone())
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.await?;
for payment_intent in payment_intents_list.iter() {
let _ = self
.kafka_producer
.log_payment_intent(payment_intent, None, self.tenant_id.clone())
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.delete_user_scoped_dashboard_metadata_by_merchant_id_data_key(
user_id,
merchant_id,
data_key,
)
.await
}
}
#[async_trait::async_trait]
impl B... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn list_user_roles_by_org_id<'a>(
&self,
payload: ListUserRolesByOrgIdPayload<'a>,
) -> CustomResult<Vec<user_storage::UserRole>, errors::StorageError> {
self.diesel_store.list_user_roles_by_org_id(payl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn list_user_roles_by_user_id_across_tenants(
&self,
user_id: &str,
limit: Option<u32>,
) -> CustomResult<Vec<storage::UserRole>, errors::StorageError> {
self.diesel_store
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store
.find_user_role_by_user_id_and_lineage(
user_id,
tenant_id,
org_id,
merchant_id,
profile_id,
versi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
}
#[async_trait::async_trait]
impl UserRoleInterface for KafkaStore {
async fn insert_user_role(
&self,
user_role: storage::UserRoleNew,
) -> CustomResult<user_storage::UserRole, errors::StorageError> ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store.find_users_by_user_ids(user_ids).await
}
}
impl RedisConnInterface for KafkaStore {
fn get_redis_conn(&self) -> CustomResult<Arc<RedisConnectionPool>, RedisError> {
self.diesel_store.get_re... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
self.diesel_store.delete_user_by_user_id(user_id).await
}
async fn find_users_by_user_ids(
&self,
user_ids: Vec<String>,
) -> CustomResult<Vec<storage::User>, errors::StorageError> {
self... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn update_user_by_user_id(
&self,
user_id: &str,
user: storage::UserUpdate,
) -> CustomResult<storage::User, errors::StorageError> {
self.diesel_store
.update_user_by_... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
use crate::{
core::errors::{self, ProcessTrackerError},
db::{
self,
address::AddressInterface,
api_keys::ApiKeyInterface,
authentication::AuthenticationInterface,
authorization::AuthorizationInterfac... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
use crate::{
core::errors::{self, ProcessTrackerError},
db::{
self,
address::AddressInterface,
api_keys::ApiKeyInterface,
authentication::AuthenticationInterface,
authorization::Author... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
use crate::{
core::errors::{self, ProcessTrackerError},
db::{
self,
address::AddressInterface,
api_keys::ApiKeyInterface,
authentication::AuthenticationInterface,
authorization::AuthorizationInterfac... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
unified_code: String,
unified_message: String,
locale: String,
) -> CustomResult<bool, errors::StorageError> {
self.diesel_store
.delete_translation(unified_code, unified_message, loca... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
&self,
connector: String,
flow: String,
sub_flow: String,
code: String,
message: String,
) -> CustomResult<String, errors::StorageError> {
self.diesel_store
.fi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
.list_routing_algorithm_metadata_by_merchant_id_transaction_type(
merchant_id,
transaction_type,
limit,
offset,
)
.await
}
}
#[... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
async fn list_routing_algorithm_metadata_by_merchant_id(
&self,
merchant_id: &id_type::MerchantId,
limit: i64,
offset: i64,
) -> CustomResult<Vec<storage::RoutingProfileMetadata>, errors::StorageError> {
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
async fn list_routing_algorithm_metadata_by_profile_id(
&self,
profile_id: &id_type::ProfileId,
limit: i64,
offset: i64,
) -> CustomResult<Vec<storage::RoutingProfileMetadata>, errors::Storag... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_routing_algorithm_metadata_by_algorithm_id_profile_id(
&self,
algorithm_id: &id_type::RoutingId,
profile_id: &id_type::ProfileId,
) -> CustomResult<storage::RoutingProfileMetadata, errors::Stora... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_routing_algorithm_by_algorithm_id_merchant_id(
&self,
algorithm_id: &id_type::RoutingId,
merchant_id: &id_type::MerchantId,
) -> CustomResult<storage::RoutingAlgorithm, errors::St... | ast_fragments |
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
}
async fn find_routing_algorithm_by_profile_id_algorithm_id(
&self,
profile_id: &id_type::ProfileId,
algorithm_id: &id_type::RoutingId,
) -> CustomResult<storage::RoutingAlgorithm, errors::StorageError> {
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/db/kafka_store.rs | crate: router
#[async_trait::async_trait]
impl RoutingAlgorithmInterface for KafkaStore {
async fn insert_routing_algorithm(
&self,
routing_algorithm: storage::RoutingAlgorithm,
) -> CustomResult<storage::RoutingAlgorithm... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.