text
stringlengths
70
351k
source
stringclasses
4 values
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/admin.rs | crate: router use actix_web::{web, HttpRequest, HttpResponse}; use router_env::{instrument, tracing, Flow}; use super::app::AppState; use crate::{ core::{admin::*, api_locking}, services::{api, authentication as auth, authorization::permiss...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/pm_auth.rs | crate: router use actix_web::{web, HttpRequest, Responder}; use api_models as api_types; use router_env::{instrument, tracing, types::Flow}; use crate::{ core::api_locking, routes::AppState, services::api, types::transformers::ForeignTryFrom,...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/pm_auth.rs | crate: router use actix_web::{web, HttpRequest, Responder}; use api_models as api_types; use router_env::{instrument, tracing, types::Flow}; use crate::{ core::api_locking, routes::AppState, services::api, types::transformers::ForeignTryFrom,...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/pm_auth.rs | crate: router use actix_web::{web, HttpRequest, Responder}; use api_models as api_types; use router_env::{instrument, tracing, types::Flow}; use crate::{ core::api_locking, routes::AppState, services::api, types::transformers::ForeignTryFrom,...
ast_fragments
// file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use common_utils::generate_id_with_default_len; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn refund_payment...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn payment_complete( state: SessionState, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn payment_authorize( state: SessionState, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn payment( state: SessionState, req: type...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use common_utils::generate_id_with_default_len; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn refund_data( state: SessionState, req: ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/core.rs | crate: router use app::SessionState; use super::{errors, types, utils}; use crate::{ routes::{app, dummy_connector::consts}, services::api, utils::OptionExt, }; pub async fn payment_data( state: SessionState, req:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_image_link(&self, base_url: &str) -> String { { Self::GooglePay => "GOOGLE_PAY.svg",<|fim_suffix|> <|fim_middle|> Self::AliPayHK => "ALIPAY.svg", } }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_name(&self) -> &'static str { { Self::GooglePay => "Google Pay",<|fim_suffix|> <|fim_middle|> Self::AliPayHK => "Alipay HK", } }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router use api_models::enums::Currency; use time::PrimitiveDateTime; pub type DummyConnectorResponse<T> = CustomResult<services::ApplicationResponse<T>, DummyConnectorErrors>; pub type DummyConnectorResult<T> = CustomResu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn from(value: DummyConnectorPaymentData) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router use error_stack::report; use super::{consts, errors::DummyConnectorErrors}; pub type DummyConnectorResponse<T> = CustomResult<services::ApplicationResponse<T>, DummyConnectorErrors>; pub type DummyConnectorResult<T...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_image_link(&self, base_url: &str) -> String { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_name(&self) -> &'static str { { Self::Klarna => "Klarna",<|fim_suffix|> <|fim_middle|> Self::AfterPayClearPay => "Afterpay Clearpay", } }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_name(&self) -> &'static str { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn get_name(&self) -> &'static str { { Self::Card => "3D Secure",<|fim_suffix|> <|fim_middle|> Self::PayLater(pay_later) => pay_later.get_name(), } }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router fn from(value: DummyConnectorPaymentMethodData) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router pub type DummyConnectorResponse<T> = CustomResult<services::ApplicationResponse<T>, DummyConnectorErrors>; pub type DummyConnectorResult<T> = CustomResult<T, DummyConnectorErrors>; pub fn build_payment_data( ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router use common_utils::{errors::CustomResult, generate_id_with_default_len}; use super::{consts, errors::DummyConnectorErrors}; fn from(payment_request: DummyConnectorPaymentRequest) -> Self { <|fim_suffix|> <|fim_middle|> ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/types.rs | crate: router pub type DummyConnectorResponse<T> = CustomResult<services::ApplicationResponse<T>, DummyConnectorErrors>; pub type DummyConnectorResult<T> = CustomResult<T, DummyConnectorErrors>; pub fn get_connector_image_link(s...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/dummy_connector/errors.rs | crate: router fn switch(&self) -> api_models::errors::types::ApiErrorResponse { { Self::InternalServerError => { AER::InternalServerError(ApiError::new("DC", 0, self.error_message(), None)) }<|fim_suffix...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/disputes/utils.rs | crate: router use actix_multipart::{Field, Multipart}; use actix_web::web::Bytes; use common_utils::{errors::CustomResult, ext_traits::StringExt, fp_utils}; use crate::{ core::{errors, files::helpers}, types::api::{disputes, files}...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/disputes/utils.rs | crate: router use actix_multipart::{Field, Multipart}; use actix_web::web::Bytes; use common_utils::{errors::CustomResult, ext_traits::StringExt, fp_utils}; use crate::{ core::{errors, files::helpers}, types::api::{disputes, files}...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/disputes/utils.rs | crate: router use actix_multipart::{Field, Multipart}; use common_utils::{errors::CustomResult, ext_traits::StringExt, fp_utils}; use crate::{ core::{errors, files::helpers}, types::api::{disputes, files}, utils::OptionExt, }; ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/files/transformers.rs | crate: router use actix_multipart::Multipart; use actix_web::web::Bytes; use common_utils::errors::CustomResult; use crate::{ core::{errors, files::helpers}, types::api::files::{self, CreateFileRequest}, utils::OptionExt, }...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/routes/files/transformers.rs | crate: router use actix_multipart::Multipart; use actix_web::web::Bytes; use common_utils::errors::CustomResult; use crate::{ core::{errors, files::helpers}, types::api::files::{self, CreateFileRequest}, utils::OptionExt, }...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/consts/opensearch.rs | crate: router use api_models::analytics::search::SearchIndex; pub const fn get_search_indexes() -> [SearchIndex; 8] { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
// file: hyperswitch/crates/router/src/consts/opensearch.rs | crate: router use api_models::analytics::search::SearchIndex; pub const fn get_search_indexes() -> [SearchIndex; 8] { [ SearchIndex::PaymentAttempts, SearchIndex::PaymentIntents, SearchIndex::Refunds, SearchIndex::Disputes...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use storage_impl::errors::ApiClientError; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, serv...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, servic...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, servic...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, servic...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use redis_interface::RedisConnectionPool; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, services::api::client, types::domain::user::UserEmail, }; fn get_redis_connecti...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, services::api::client, types::domain::user::UserEmail, }; fn get_oidc_redis_key(csrf: &str) -> String { <|fim_suffix|> <|...
ast_fragments
// file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, services::api::client...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, servic...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/openidconnect.rs | crate: router use masking::{ExposeInterface, Secret}; use oidc::TokenResponse; use openidconnect::{self as oidc, core as oidc_core}; use crate::{ consts, core::errors::{UserErrors, UserResult}, routes::SessionState, servic...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use std::str; use error_stack::{report, ResultExt}; use josekit::{jwe, jws}; use crate::{ core::errors::{self, CustomResult}, utils, }; pub async fn decrypt_jwe( jwt: &str, key_ids: KeyIdCheck<'_>, private_k...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use std::str; use josekit::{jwe, jws}; use crate::{ core::errors::{self, CustomResult}, utils, }; pub async fn encrypt_jwe( payload: &[u8], public_key: impl AsRef<[u8]>, algorithm: EncryptionAlgorithm, k...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use josekit::{jwe, jws}; async fn test_jws() { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use josekit::{jwe, jws}; async fn test_jwe() { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use josekit::{jwe, jws}; use crate::{ core::errors::{self, CustomResult}, utils, }; pub fn verify_sign( jws_body: String, key: impl AsRef<[u8]>, ) -> CustomResult<String, errors::EncryptionError> { {<|fim_suffix...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use std::str; use josekit::{jwe, jws}; use crate::{ core::errors::{self, CustomResult}, utils, }; pub async fn jws_sign_payload( payload: &[u8], kid: &str, private_key: impl AsRef<[u8]>, ) -> CustomResult<St...
ast_fragments
// file: hyperswitch/crates/router/src/services/encryption.rs | crate: router use std::str; use josekit::{jwe, jws}; use crate::{ core::errors::{self, CustomResult}, utils, }; pub async fn encrypt_jwe( payload: &[u8], public_key: impl AsRef<[u8]>, algorithm: EncryptionAlgorithm, key_id: Option<&...
ast_fragments
// file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use std::{collections::HashMap, sync::Arc}; use error_stack::{report, ResultExt}; use events::{EventsError, Message, MessagingInterface}; use rdkafka::{ config::FromClientConfig, message::{Header, OwnedHeaders}, producer::{BaseRecord, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt::KafkaPaymentAttempt, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::{authentication::Authentication, refund::Refund}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, disp...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use hyperswitch_domain_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::{authentication::Authentication, refund::Refund}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, disp...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use hyperswitch_domain_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::fraud_check::FraudCheck; use crate::{events::EventType, services::kafka::fraud_check_event::KafkaFraudCheckEvent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router match self.0.flush(rdkafka::util::Timeout::After( std::time::Duration::from_secs(5), )) { Ok(_) => router_env::logger::info!("Kafka events flush Successful"), Err(error) => router_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::fraud_check::FraudCheck; use crate::{events::EventType, services::kafka::fraud_check_event::KafkaFraudCheckEvent}; use diesel_models::{authentication::Authentication, refund::Refund}; use hyperswitch_domain_models...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::fraud_check::FraudCheck; use crate::{events::EventType, services::kafka::fraud_check_event::KafkaFraudCheckEvent}; use diesel_models::{authentication::Authentication, refund::Refund}; use hyperswitch_domain_models...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt::KafkaPaymentAttempt, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt::KafkaPaymentAttempt, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt::KafkaPaymentAttempt, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use diesel_models::{authentication::Authentication, refund::Refund}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, disp...
ast_fragments
// file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use hyperswitch_domain_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDisput...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use hyperswitch_domain_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use error_stack::{report, ResultExt}; use rdkafka::{ config::FromClientConfig, message::{Header, OwnedHeaders}, producer::{BaseRecord, DefaultProducerContext, Producer, ThreadedProducer}, }; use crate::{events::EventType...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use std::{collections::HashMap, sync::Arc}; use rdkafka::{ config::FromClientConfig, message::{Header, OwnedHeaders}, producer::{BaseRecord, DefaultProducerContext, Producer, ThreadedProducer}, }; pub type MQResult<T> = ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use storage_impl::config::TenantConfig; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent,...
ast_fragments
// file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use crate::{events::EventType, services::kafka::fraud_check_event::KafkaFraudCheckEvent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router pub type MQResult<T> = CustomResult<T, KafkaError>; use crate::db::kafka_store::TenantID; fn new(event: &'a T, tenant_id: TenantID) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt::KafkaPaymentAttempt, ...
ast_fragments
// file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use crate::{events::EventType, services::kafka::fraud_check_event::KafkaFraudCheckEvent}; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router pub type MQResult<T> = CustomResult<T, KafkaError>; use crate::db::kafka_store::TenantID; fn old(event: &'a T, tenant_id: TenantID, clickhouse_database: Option<String>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router pub type MQResult<T> = CustomResult<T, KafkaError>; use crate::db::kafka_store::TenantID; fn new(event: &'a T, tenant_id: TenantID, clickhouse_database: Option<String>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use serde_json::Value; use self::payout::KafkaPayout; use self::{ authentication::KafkaAuthentication, authentication_event::KafkaAuthenticationEvent, dispute::KafkaDispute, dispute_event::KafkaDisputeEvent, payment_attempt:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/kafka.rs | crate: router use std::{collections::HashMap, sync::Arc}; use common_utils::errors::CustomResult; use error_stack::{report, ResultExt}; use events::{EventsError, Message, MessagingInterface}; use num_traits::ToPrimitive; use rdkafka::{ config...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use common_utils::{date_time, fp_utils, id_type}; use router_env::logger; use super::authorization::{self, permissions::Permission}; use super::jwt; use crate::configs::Settings; use crate::consts; us...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::errors::UserResult;...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::Sess...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use router_env::logger; use serde::Serialize; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::errors::UserResult;...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{sel...
ast_fragments