repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/backoff_retry.rs
pingora-proxy/examples/backoff_retry.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/grpc_web_module.rs
pingora-proxy/examples/grpc_web_module.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/connection_filter.rs
pingora-proxy/examples/connection_filter.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/rate_limiter.rs
pingora-proxy/examples/rate_limiter.rs
use async_trait::async_trait; use once_cell::sync::Lazy; use pingora_core::prelude::*; use pingora_http::{RequestHeader, ResponseHeader}; use pingora_limits::rate::Rate; use pingora_load_balancing::prelude::{RoundRobin, TcpHealthCheck}; use pingora_load_balancing::LoadBalancer; use pingora_proxy::{http_proxy_service, P...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/virtual_l4.rs
pingora-proxy/examples/virtual_l4.rs
//! This example demonstrates to how to implement a custom L4 connector //! together with a virtual socket. use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::sync::Arc; use async_trait::async_trait; use pingora_core::connectors::L4Connect; use pingora_core::prelude::HttpPeer; use pingora_core::protocols::l4::soc...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/multi_lb.rs
pingora-proxy/examples/multi_lb.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/modify_response.rs
pingora-proxy/examples/modify_response.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/gateway.rs
pingora-proxy/examples/gateway.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/ctx.rs
pingora-proxy/examples/ctx.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/use_module.rs
pingora-proxy/examples/use_module.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-proxy/examples/load_balancer.rs
pingora-proxy/examples/load_balancer.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-openssl/src/lib.rs
pingora-openssl/src/lib.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-openssl/src/ext.rs
pingora-openssl/src/ext.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-lru/src/lib.rs
pingora-lru/src/lib.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-lru/src/linked_list.rs
pingora-lru/src/linked_list.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-lru/benches/bench_lru.rs
pingora-lru/benches/bench_lru.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
cloudflare/pingora
https://github.com/cloudflare/pingora/blob/5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094/pingora-lru/benches/bench_linked_list.rs
pingora-lru/benches/bench_linked_list.rs
// Copyright 2025 Cloudflare, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
rust
Apache-2.0
5c4bd0bc546b2d9caaff4a438a4cf3d69e5a5094
2026-01-04T15:36:50.761692Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/connector-template/test.rs
connector-template/test.rs
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData}; use masking::Secret; use router::{ types::{self, api, storage::enums, }}; use crate::utils::{self, ConnectorActions}; use test_utils::connector_auth; #[derive(Clone, Copy)] struct {{project-name | downcase | pascal_case}}Test; impl Con...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/connector-template/mod.rs
connector-template/mod.rs
pub mod transformers; use error_stack::{report, ResultExt}; use masking::{ExposeInterface, Mask}; use common_utils::{ errors::CustomResult, ext_traits::BytesExt, types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector}, request::{Method, Request, RequestBuilder, RequestContent}, }; use ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/connector-template/transformers.rs
connector-template/transformers.rs
use common_enums::enums; use serde::{Deserialize, Serialize}; use masking::Secret; use common_utils::types::{StringMinorUnit}; use hyperswitch_domain_models::{ payment_method_data::PaymentMethodData, router_data::{ConnectorAuthType, RouterData}, router_flow_types::refunds::{Execute, RSync}, router_reque...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/serde.rs
crates/masking/src/serde.rs
//! Serde-related. pub use erased_serde::Serialize as ErasedSerialize; pub use serde::{de, Deserialize, Serialize, Serializer}; use serde_json::{value::Serializer as JsonValueSerializer, Value}; use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret}; /// Marker trait for secret types which can be [`Serialize`...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/bytes.rs
crates/masking/src/bytes.rs
//! Optional `Secret` wrapper type for the `bytes::BytesMut` crate. use core::fmt; use bytes::BytesMut; #[cfg(all(feature = "bytes", feature = "serde"))] use serde::de::{self, Deserialize}; use super::{PeekInterface, ZeroizableSecret}; /// Instance of [`BytesMut`] protected by a type that impls the [`ExposeInterfac...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/vec.rs
crates/masking/src/vec.rs
//! Secret `Vec` types //! //! There is not alias type by design. #[cfg(feature = "serde")] use super::{SerializableSecret, Serialize}; #[cfg(feature = "serde")] impl<S: Serialize> SerializableSecret for Vec<S> {}
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/lib.rs
crates/masking/src/lib.rs
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))] #![cfg_attr(docsrs, doc(cfg_hide(doc)))] #![warn(missing_docs)] //! Personal Identifiable Information protection. Wrapper types and traits for secret management which help ensure they aren't accidentally copied, logged, or otherwise exposed (as much as possible...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/abs.rs
crates/masking/src/abs.rs
//! Abstract data types. use crate::Secret; /// Interface to expose a reference to an inner secret pub trait PeekInterface<S> { /// Only method providing access to the secret value. fn peek(&self) -> &S; /// Provide a mutable reference to the inner value. fn peek_mut(&mut self) -> &mut S; } /// Inte...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/string.rs
crates/masking/src/string.rs
//! Secret strings //! //! There is not alias type by design. use alloc::{ str::FromStr, string::{String, ToString}, }; #[cfg(feature = "serde")] use super::SerializableSecret; use super::{Secret, Strategy}; use crate::StrongSecret; #[cfg(feature = "serde")] impl SerializableSecret for String {} impl<I> Fro...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/cassandra.rs
crates/masking/src/cassandra.rs
use scylla::{ deserialize::DeserializeValue, frame::response::result::ColumnType, serialize::{ value::SerializeValue, writers::{CellWriter, WrittenCellProof}, SerializationError, }, }; use crate::{abs::PeekInterface, StrongSecret}; impl<T> SerializeValue for StrongSecret<T> whe...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/maskable.rs
crates/masking/src/maskable.rs
//! This module contains Masking objects and traits use crate::{ExposeInterface, Secret}; /// An Enum that allows us to optionally mask data, based on which enum variant that data is stored /// in. #[derive(Clone, Eq, PartialEq)] pub enum Maskable<T: Eq + PartialEq + Clone> { /// Variant which masks the data by w...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/secret.rs
crates/masking/src/secret.rs
//! Structure describing secret. use std::{fmt, marker::PhantomData}; use crate::{strategy::Strategy, PeekInterface, StrongSecret}; /// Secret thing. /// /// To get access to value use method `expose()` of trait [`crate::ExposeInterface`]. /// /// ## Masking /// Use the [`crate::strategy::Strategy`] trait to impleme...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/strategy.rs
crates/masking/src/strategy.rs
use core::fmt; /// Debugging trait which is specialized for handling secret values pub trait Strategy<T> { /// Format information about the secret's type. fn fmt(value: &T, fmt: &mut fmt::Formatter<'_>) -> fmt::Result; } /// Debug with type #[cfg_attr(feature = "serde", derive(serde::Deserialize))] #[derive(D...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/boxed.rs
crates/masking/src/boxed.rs
//! `Box` types containing secrets //! //! There is not alias type by design. #[cfg(feature = "serde")] use super::{SerializableSecret, Serialize}; #[cfg(feature = "serde")] impl<S: Serialize> SerializableSecret for Box<S> {}
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/diesel.rs
crates/masking/src/diesel.rs
//! Diesel-related. use diesel::{ backend::Backend, deserialize::{self, FromSql, Queryable}, expression::AsExpression, internal::derives::as_expression::Bound, serialize::{self, Output, ToSql}, sql_types, }; use crate::{Secret, Strategy, StrongSecret, ZeroizableSecret}; impl<S, I, T> AsExpres...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/src/strong_secret.rs
crates/masking/src/strong_secret.rs
//! Structure describing secret. use std::{fmt, marker::PhantomData}; use subtle::ConstantTimeEq; use zeroize::{self, Zeroize as ZeroizableSecret}; use crate::{strategy::Strategy, PeekInterface}; /// Secret thing. /// /// To get access to value use method `expose()` of trait [`crate::ExposeInterface`]. pub struct S...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/masking/tests/basic.rs
crates/masking/tests/basic.rs
#![allow(dead_code, clippy::panic_in_result_fn)] use masking::Secret; #[cfg(feature = "serde")] use masking::SerializableSecret; #[cfg(feature = "alloc")] use masking::ZeroizableSecret; #[cfg(feature = "serde")] use serde::Serialize; #[test] fn basic() { #[cfg_attr(feature = "serde", derive(Serialize))] #[der...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/connector_configs/src/lib.rs
crates/connector_configs/src/lib.rs
pub mod common_config; pub mod connector; pub mod response_modifier; pub mod transformer;
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/connector_configs/src/connector.rs
crates/connector_configs/src/connector.rs
use std::collections::HashMap; #[cfg(feature = "payouts")] use api_models::enums::PayoutConnectors; use api_models::{ enums::{ AuthenticationConnectors, BillingConnectors, Connector, PmAuthConnectors, TaxConnectors, }, payments, }; use serde::{Deserialize, Serialize}; use crate::common_config::{Ca...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/connector_configs/src/common_config.rs
crates/connector_configs/src/common_config.rs
use api_models::{payment_methods, payments}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; #[serde_with::skip_serializing_none] #[derive(Debug, Deserialize, serde::Serialize, Clone)] #[serde(rename_all = "snake_case")] pub struct ZenApplePay { pub terminal_uuid: Option<String>, pub pay_wall_secret...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/connector_configs/src/response_modifier.rs
crates/connector_configs/src/response_modifier.rs
use crate::common_config::{ CardProvider, ConnectorApiIntegrationPayload, DashboardPaymentMethodPayload, DashboardRequestPayload, Provider, }; impl ConnectorApiIntegrationPayload { pub fn get_transformed_response_payload(response: Self) -> DashboardRequestPayload { let mut wallet_details: Vec<Provi...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/connector_configs/src/transformer.rs
crates/connector_configs/src/transformer.rs
use std::str::FromStr; use api_models::{ enums::{ Connector, PaymentMethod, PaymentMethodType::{self, AliPay, ApplePay, GooglePay, Klarna, Paypal, WeChatPay}, }, payment_methods, refunds::MinorUnit, }; use crate::common_config::{ ConnectorApiIntegrationPayload, DashboardRequestPayl...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/lib.rs
crates/common_enums/src/lib.rs
pub mod connector_enums; pub mod enums; pub mod transformers; pub use enums::*; pub use transformers::*;
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/enums.rs
crates/common_enums/src/enums.rs
mod accounts; mod payments; mod ui; use std::{ collections::HashSet, fmt, num::{ParseFloatError, TryFromIntError}, str::FromStr, }; pub use accounts::{ MerchantAccountRequestType, MerchantAccountType, MerchantProductType, OrganizationType, }; use diesel::{ backend::Backend, deserialize::Fro...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
true
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/transformers.rs
crates/common_enums/src/transformers.rs
use std::fmt::{Display, Formatter}; use serde::{Deserialize, Serialize}; #[cfg(feature = "payouts")] use crate::enums::PayoutStatus; use crate::enums::{ AttemptStatus, Country, CountryAlpha2, CountryAlpha3, DisputeStatus, EventType, IntentStatus, MandateStatus, PaymentMethod, PaymentMethodType, RefundStatus, ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
true
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/connector_enums.rs
crates/common_enums/src/connector_enums.rs
use std::collections::HashSet; use smithy::SmithyModel; use utoipa::ToSchema; pub use super::enums::{PaymentMethod, PayoutType}; pub use crate::PaymentMethodType; // A connector is an integration to fulfill payments #[derive( Clone, Copy, Debug, Eq, PartialEq, ToSchema, serde::Deserialize...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/enums/ui.rs
crates/common_enums/src/enums/ui.rs
use std::fmt; use serde::{de::Visitor, Deserialize, Deserializer, Serialize}; use utoipa::ToSchema; #[derive( Clone, Copy, Debug, Default, Eq, Hash, PartialEq, Serialize, Deserialize, strum::Display, strum::EnumString, ToSchema, )] #[router_derive::diesel_enum(storage_t...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/enums/accounts.rs
crates/common_enums/src/enums/accounts.rs
use utoipa::ToSchema; #[derive( Copy, Default, Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, strum::Display, strum::EnumString, ToSchema, Hash, )] #[router_derive::diesel_enum(storage_type = "text")] #[serde(rename_all = "snake_case")] #[strum(seriali...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_enums/src/enums/payments.rs
crates/common_enums/src/enums/payments.rs
use utoipa::ToSchema; #[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)] #[serde(rename_all = "snake_case")] pub enum ProductType { #[default] Physical, Digital, Travel, Ride, Event, Accommodation, }
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/build.rs
crates/drainer/build.rs
fn main() { #[cfg(feature = "vergen")] router_env::vergen::generate_cargo_instructions(); }
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/errors.rs
crates/drainer/src/errors.rs
use redis_interface as redis; use thiserror::Error; #[derive(Debug, Error)] pub enum DrainerError { #[error("Error in parsing config : {0}")] ConfigParsingError(String), #[error("Error during redis operation : {0:?}")] RedisError(error_stack::Report<redis::errors::RedisError>), #[error("Application...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/stream.rs
crates/drainer/src/stream.rs
use std::collections::HashMap; use redis_interface as redis; use router_env::{logger, tracing}; use crate::{errors, metrics, Store}; pub type StreamEntries = Vec<(String, HashMap<String, String>)>; pub type StreamReadResult = HashMap<String, StreamEntries>; impl Store { #[inline(always)] pub fn drainer_stre...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/settings.rs
crates/drainer/src/settings.rs
use std::{collections::HashMap, path::PathBuf, sync::Arc}; use common_utils::{ext_traits::ConfigExt, id_type, DbConnectionParams}; use config::{Environment, File}; use external_services::managers::{ encryption_management::EncryptionManagementConfig, secrets_management::SecretsManagementConfig, }; use hyperswitch_i...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/services.rs
crates/drainer/src/services.rs
use std::sync::Arc; use actix_web::{body, HttpResponse, ResponseError}; use error_stack::Report; use redis_interface::RedisConnectionPool; use crate::{ connection::{diesel_make_pg_pool, PgPool}, logger, settings::Tenant, }; #[derive(Clone)] pub struct Store { pub master_pool: PgPool, pub redis_co...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/lib.rs
crates/drainer/src/lib.rs
mod connection; pub mod errors; mod handler; mod health_check; pub mod logger; pub(crate) mod metrics; mod query; pub mod services; pub mod settings; mod stream; mod types; mod utils; use std::{collections::HashMap, sync::Arc}; mod secrets_transformers; use actix_web::dev::Server; use common_utils::{id_type, signals::...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/logger.rs
crates/drainer/src/logger.rs
#[doc(inline)] pub use router_env::{debug, error, info, warn};
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/connection.rs
crates/drainer/src/connection.rs
use bb8::PooledConnection; use common_utils::DbConnectionParams; use diesel::PgConnection; use crate::{settings::Database, Settings}; pub type PgPool = bb8::Pool<async_bb8_diesel::ConnectionManager<PgConnection>>; #[allow(clippy::expect_used)] pub async fn redis_connection(conf: &Settings) -> redis_interface::RedisC...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/types.rs
crates/drainer/src/types.rs
use std::collections::HashMap; use common_utils::errors; use error_stack::ResultExt; use serde::{de::value::MapDeserializer, Deserialize, Serialize}; use crate::{ kv, utils::{deserialize_db_op, deserialize_i64}, }; #[derive(Deserialize, Serialize)] pub struct StreamData { pub request_id: String, pub ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/secrets_transformers.rs
crates/drainer/src/secrets_transformers.rs
use common_utils::errors::CustomResult; use hyperswitch_interfaces::secrets_interface::{ secret_handler::SecretsHandler, secret_state::{RawSecret, SecretStateContainer, SecuredSecret}, SecretManagementInterface, SecretsManagementError, }; use crate::settings::{Database, Settings}; #[async_trait::async_tra...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/health_check.rs
crates/drainer/src/health_check.rs
use std::{collections::HashMap, sync::Arc}; use actix_web::{web, Scope}; use async_bb8_diesel::{AsyncConnection, AsyncRunQueryDsl}; use common_utils::{errors::CustomResult, id_type}; use diesel_models::{Config, ConfigNew}; use error_stack::ResultExt; use router_env::{instrument, logger, tracing}; use crate::{ con...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/utils.rs
crates/drainer/src/utils.rs
use std::sync::{atomic, Arc}; use error_stack::report; use redis_interface as redis; use serde::de::Deserialize; use crate::{ errors, kv, metrics, stream::{StreamEntries, StreamReadResult}, }; pub fn parse_stream_entries<'a>( read_result: &'a StreamReadResult, stream_name: &str, ) -> errors::DrainerR...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/query.rs
crates/drainer/src/query.rs
use std::sync::Arc; use common_utils::errors::CustomResult; use diesel_models::errors::DatabaseError; use crate::{kv, logger, metrics, pg_connection, services::Store}; #[async_trait::async_trait] pub trait ExecuteQuery { async fn execute_query( self, store: &Arc<Store>, pushed_at: i64, ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/main.rs
crates/drainer/src/main.rs
use std::collections::HashMap; use drainer::{errors::DrainerResult, logger, services, settings, start_drainer, start_web_server}; use router_env::tracing::Instrument; #[tokio::main] async fn main() -> DrainerResult<()> { // Get configuration let cmd_line = <settings::CmdLineConf as clap::Parser>::parse(); ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/metrics.rs
crates/drainer/src/metrics.rs
use router_env::{counter_metric, global_meter, histogram_metric_f64, histogram_metric_u64}; global_meter!(DRAINER_METER, "DRAINER"); counter_metric!(JOBS_PICKED_PER_STREAM, DRAINER_METER); counter_metric!(CYCLES_COMPLETED_SUCCESSFULLY, DRAINER_METER); counter_metric!(CYCLES_COMPLETED_UNSUCCESSFULLY, DRAINER_METER); c...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/drainer/src/handler.rs
crates/drainer/src/handler.rs
use std::{ collections::HashMap, sync::{atomic, Arc}, }; use common_utils::id_type; use router_env::tracing::Instrument; use tokio::{ sync::{mpsc, oneshot}, time::{self, Duration}, }; use crate::{ errors, instrument, logger, metrics, query::ExecuteQuery, tracing, utils, DrainerSettings, Store,...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/api_keys.rs
crates/api_models/src/api_keys.rs
use common_utils::custom_serde; use masking::StrongSecret; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use utoipa::ToSchema; /// The request body for creating an API Key. #[derive(Debug, Deserialize, ToSchema, Serialize)] #[serde(deny_unknown_fields)] pub struct CreateApiKeyRequest { /// A un...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/errors.rs
crates/api_models/src/errors.rs
pub mod actix; pub mod types;
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/consts.rs
crates/api_models/src/consts.rs
/// Max payment intent fulfillment expiry pub const MAX_ORDER_FULFILLMENT_EXPIRY: i64 = 1800; /// Min payment intent fulfillment expiry pub const MIN_ORDER_FULFILLMENT_EXPIRY: i64 = 60;
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/mandates.rs
crates/api_models/src/mandates.rs
use common_types::payments as common_payments_types; use masking::Secret; use serde::{Deserialize, Serialize}; use smithy::SmithyModel; use time::PrimitiveDateTime; use utoipa::ToSchema; use crate::enums as api_enums; #[derive(Default, Debug, Deserialize, Serialize)] pub struct MandateId { pub mandate_id: String,...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/user.rs
crates/api_models/src/user.rs
use std::fmt::Debug; use common_enums::{EntityType, TokenPurpose}; use common_utils::{crypto::OptionalEncryptableName, id_type, pii}; use masking::Secret; use utoipa::ToSchema; use crate::user_role::UserStatus; pub mod dashboard_metadata; #[cfg(feature = "dummy_connector")] pub mod sample_data; #[cfg(feature = "contr...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/blocklist.rs
crates/api_models/src/blocklist.rs
use common_enums::enums; use common_utils::events::ApiEventMetric; use masking::StrongSecret; use utoipa::ToSchema; #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] #[serde(rename_all = "snake_case", tag = "type", content = "data")] pub enum BlocklistRequest { CardBin(String), Fingerprin...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/connector_onboarding.rs
crates/api_models/src/connector_onboarding.rs
use common_utils::id_type; use super::{admin, enums}; #[derive(serde::Deserialize, serde::Serialize, Debug, Clone)] pub struct ActionUrlRequest { pub connector: enums::Connector, pub connector_id: id_type::MerchantConnectorAccountId, pub return_url: String, } #[derive(serde::Serialize, Debug, Clone)] #[s...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/verifications.rs
crates/api_models/src/verifications.rs
use common_utils::id_type; /// The request body for verification of merchant (everything except domain_names are prefilled) #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] pub struct ApplepayMerchantVerificationConfigs { pub domain_names: Vec<String>, pub encryp...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/lib.rs
crates/api_models/src/lib.rs
pub mod admin; pub mod analytics; pub mod api_keys; pub mod apple_pay_certificates_migration; pub mod authentication; pub mod blocklist; pub mod cards_info; pub mod chat; pub mod conditional_configs; pub mod connector_enums; pub mod connector_onboarding; pub mod consts; pub mod currency; pub mod customers; pub mod disp...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/revenue_recovery_data_backfill.rs
crates/api_models/src/revenue_recovery_data_backfill.rs
use std::{collections::HashMap, fs::File, io::BufReader}; use actix_multipart::form::{tempfile::TempFile, MultipartForm}; use actix_web::{HttpResponse, ResponseError}; use common_enums::{CardNetwork, PaymentMethodType}; use common_utils::{events::ApiEventMetric, id_type, pii::PhoneNumberStrategy}; use csv::Reader; use...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/refunds.rs
crates/api_models/src/refunds.rs
use std::collections::HashMap; pub use common_utils::types::MinorUnit; use common_utils::{pii, types::TimeRange}; use serde::{Deserialize, Serialize}; use smithy::SmithyModel; use time::PrimitiveDateTime; use utoipa::ToSchema; use super::payments::AmountFilter; #[cfg(feature = "v1")] use crate::admin; use crate::{adm...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/routing.rs
crates/api_models/src/routing.rs
use std::{fmt::Debug, ops::Deref}; use common_types::three_ds_decision_rule_engine::{ThreeDSDecision, ThreeDSDecisionRule}; use common_utils::{ errors::{ParsingError, ValidationError}, ext_traits::ValueExt, fp_utils, pii, }; use euclid::frontend::ast::Program; pub use euclid::{ dssa::types::EuclidAnaly...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
true
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/webhook_events.rs
crates/api_models/src/webhook_events.rs
use std::collections::HashSet; use common_enums::{EventClass, EventType, WebhookDeliveryAttempt}; use masking::Secret; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use utoipa::ToSchema; /// The constraints to apply when filtering events. #[derive(Clone, Debug, Serialize, Deserialize, ToSchema)] p...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/customers.rs
crates/api_models/src/customers.rs
use common_types::primitive_wrappers::CustomerListLimit; use common_utils::{crypto, custom_serde, id_type, pii, types::Description}; use masking::Secret; use serde::{Deserialize, Serialize}; use smithy::SmithyModel; use utoipa::ToSchema; use crate::payments; /// The customer details #[cfg(feature = "v1")] #[derive(De...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/poll.rs
crates/api_models/src/poll.rs
use common_utils::events::{ApiEventMetric, ApiEventsType}; use serde::Serialize; use utoipa::ToSchema; #[derive(Debug, ToSchema, Clone, Serialize)] pub struct PollResponse { /// The poll id pub poll_id: String, /// Status of the poll pub status: PollStatus, } #[derive(Debug, strum::Display, strum::Enu...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/disputes.rs
crates/api_models/src/disputes.rs
use std::collections::HashMap; use common_utils::types::{StringMinorUnit, TimeRange}; use masking::{Deserialize, Serialize}; use serde::de::Error; use smithy::SmithyModel; use time::PrimitiveDateTime; use utoipa::ToSchema; use super::enums::{Currency, DisputeStage, DisputeStatus}; use crate::{admin::MerchantConnector...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/feature_matrix.rs
crates/api_models/src/feature_matrix.rs
use std::collections::HashSet; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; #[derive(Default, Debug, Deserialize, Serialize, Clone, ToSchema)] pub struct FeatureMatrixRequest { // List of connectors for which the feature matrix is requested #[schema(value_type = Option<Vec<Connector>>)] pub ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/profile_acquirer.rs
crates/api_models/src/profile_acquirer.rs
use serde::{Deserialize, Serialize}; use utoipa::ToSchema; #[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct ProfileAcquirerCreate { /// The merchant id assigned by the acquirer #[schema(value_type= String,example = "M123456789")] pub acquirer_assigned_merchant_id: String, /// merchant name...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/three_ds_decision_rule.rs
crates/api_models/src/three_ds_decision_rule.rs
use euclid::frontend::dir::enums::{ CustomerDeviceDisplaySize, CustomerDevicePlatform, CustomerDeviceType, }; use utoipa::ToSchema; /// Represents the payment data used in the 3DS decision rule. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct PaymentData { /// The amount of t...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/process_tracker.rs
crates/api_models/src/process_tracker.rs
#[cfg(feature = "v2")] pub mod revenue_recovery;
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/ephemeral_key.rs
crates/api_models/src/ephemeral_key.rs
use common_utils::id_type; #[cfg(feature = "v2")] use masking::Secret; use smithy::SmithyModel; use utoipa::ToSchema; #[cfg(feature = "v1")] /// Information required to create an ephemeral key. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct EphemeralKeyCreateRequest { /// Custom...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/pm_auth.rs
crates/api_models/src/pm_auth.rs
use common_enums::{PaymentMethod, PaymentMethodType}; use common_utils::{ events::{ApiEventMetric, ApiEventsType}, id_type, impl_api_event_type, }; #[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "snake_case")] pub struct LinkTokenCreateRequest { pub language: Option<Stri...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/organization.rs
crates/api_models/src/organization.rs
use common_enums::OrganizationType; use common_utils::{id_type, pii}; use utoipa::ToSchema; pub struct OrganizationNew { pub org_id: id_type::OrganizationId, pub org_type: OrganizationType, pub org_name: Option<String>, } impl OrganizationNew { pub fn new(org_type: OrganizationType, org_name: Option<St...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/open_router.rs
crates/api_models/src/open_router.rs
use std::{collections::HashMap, fmt::Debug}; use common_utils::{errors, id_type, types::MinorUnit}; pub use euclid::{ dssa::types::EuclidAnalysable, frontend::{ ast, dir::{DirKeyKind, EuclidDirFilter}, }, }; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::{ enums:...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/cards_info.rs
crates/api_models/src/cards_info.rs
use std::fmt::Debug; use common_utils::events::ApiEventMetric; use utoipa::ToSchema; use crate::enums; #[derive(serde::Deserialize, ToSchema)] pub struct CardsInfoRequestParams { #[schema(example = "pay_OSERgeV9qAy7tlK7aKpc_secret_TuDUoh11Msxh12sXn3Yp")] pub client_secret: Option<String>, } #[derive(serde::...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/enums.rs
crates/api_models/src/enums.rs
use std::str::FromStr; pub use common_enums::*; pub use euclid::enums::RoutableConnectors; use smithy::SmithyModel; use utoipa::ToSchema; pub use super::connector_enums::Connector; #[derive( Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, strum::Display, s...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/conditional_configs.rs
crates/api_models/src/conditional_configs.rs
use common_utils::events; use euclid::frontend::ast::Program; #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct DecisionManagerRecord { pub name: String, pub program: Program<common_types::payments::ConditionalConfigs>, pub created_at: i64, pub modified_at: i64, } impl events::Ap...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/apple_pay_certificates_migration.rs
crates/api_models/src/apple_pay_certificates_migration.rs
#[derive(Debug, Clone, serde::Serialize)] pub struct ApplePayCertificatesMigrationResponse { pub migration_successful: Vec<common_utils::id_type::MerchantId>, pub migration_failed: Vec<common_utils::id_type::MerchantId>, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)] pub struct ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/subscription.rs
crates/api_models/src/subscription.rs
use common_enums::{InvoiceStatus, SubscriptionStatus}; use common_types::payments::CustomerAcceptance; use common_utils::{ errors::ValidationError, events::ApiEventMetric, fp_utils, id_type::{ CustomerId, InvoiceId, MerchantConnectorAccountId, MerchantId, PaymentId, ProfileId, Subscripti...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/webhooks.rs
crates/api_models/src/webhooks.rs
use common_utils::custom_serde; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use utoipa::ToSchema; #[cfg(feature = "payouts")] use crate::payouts; use crate::{disputes, enums as api_enums, mandates, payments, refunds, subscription}; #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deseriali...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/user_role.rs
crates/api_models/src/user_role.rs
use common_enums::{ParentGroup, PermissionGroup}; use common_utils::pii; use masking::Secret; pub mod role; #[derive(Debug, serde::Serialize)] pub struct AuthorizationInfoResponse(pub Vec<AuthorizationInfo>); #[derive(Debug, serde::Serialize)] #[serde(untagged)] pub enum AuthorizationInfo { Group(GroupInfo), ...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/relay.rs
crates/api_models/src/relay.rs
use common_utils::types::MinorUnit; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::enums as api_enums; #[derive(Debug, ToSchema, Clone, Deserialize, Serialize)] pub struct RelayRequest { /// The identifier that is associated to a resource at the connector reference to which the relay reques...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/admin.rs
crates/api_models/src/admin.rs
use std::collections::{HashMap, HashSet}; use common_types::primitive_wrappers; use common_utils::{ consts, crypto::Encryptable, errors::{self, CustomResult}, ext_traits::Encode, id_type, link_utils, pii, }; #[cfg(feature = "v1")] use common_utils::{crypto::OptionalEncryptableName, ext_traits::Valu...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
true
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/health_check.rs
crates/api_models/src/health_check.rs
use std::collections::hash_map::HashMap; #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct RouterHealthCheckResponse { pub database: bool, pub redis: bool, #[serde(skip_serializing_if = "Option::is_none")] pub vault: Option<bool>, #[cfg(feature = "olap")] pub analytics: bo...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/payouts.rs
crates/api_models/src/payouts.rs
use std::collections::HashMap; use cards::CardNumber; use common_enums::CardNetwork; #[cfg(feature = "v2")] use common_utils::types::BrowserInformation; use common_utils::{ consts::default_payouts_list_limit, crypto, id_type, link_utils, payout_method_utils, pii::{self, Email}, transformers::ForeignFro...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
true
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/oidc.rs
crates/api_models/src/oidc.rs
use std::str::FromStr; use common_utils::events::ApiEventMetric; use masking::Secret; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; const RESPONSE_TYPES_SUPPORTED: &[ResponseType] = &[ResponseType::Code]; const RESPONSE_MODES_SUPPORTED: &[ResponseMode] = &[ResponseMode::Query]; const SUBJECT_TYPES_SUPPOR...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/verify_connector.rs
crates/api_models/src/verify_connector.rs
use common_utils::events::{ApiEventMetric, ApiEventsType}; use crate::{admin, enums}; #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] pub struct VerifyConnectorRequest { pub connector_name: enums::Connector, pub connector_account_details: admin::ConnectorAuthType, } common_utils::impl_api_event...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false
juspay/hyperswitch
https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/api_models/src/chat.rs
crates/api_models/src/chat.rs
use common_utils::id_type; use masking::Secret; use time::PrimitiveDateTime; #[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] pub struct ChatRequest { pub message: Secret<String>, } #[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] pub struct ChatResponse { pub response: Secret<serde_...
rust
Apache-2.0
4201e04a8f0f1d46b57f24868f4f943a9be50bda
2026-01-04T15:31:59.475325Z
false