mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
refactor(conditional_configs): refactor conditional_configs to use Moka Cache instead of Static Cache (#4814)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,13 +1,15 @@
|
||||
//! Valued Intermediate Representation
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::{EuclidValue, Metadata};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum ValuedComparisonLogic {
|
||||
NegativeConjunction,
|
||||
PositiveDisjunction,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ValuedComparison {
|
||||
pub values: Vec<EuclidValue>,
|
||||
pub logic: ValuedComparisonLogic,
|
||||
@ -16,20 +18,20 @@ pub struct ValuedComparison {
|
||||
|
||||
pub type ValuedIfCondition = Vec<ValuedComparison>;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ValuedIfStatement {
|
||||
pub condition: ValuedIfCondition,
|
||||
pub nested: Option<Vec<ValuedIfStatement>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ValuedRule<O> {
|
||||
pub name: String,
|
||||
pub connector_selection: O,
|
||||
pub statements: Vec<ValuedIfStatement>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ValuedProgram<O> {
|
||||
pub default_selection: O,
|
||||
pub rules: Vec<ValuedRule<O>>,
|
||||
|
||||
Reference in New Issue
Block a user