mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
feat(global-search): dashboard globalsearch apis (#3831)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -12,6 +12,7 @@ pub mod connector_events;
|
||||
pub mod health_check;
|
||||
pub mod outgoing_webhook_event;
|
||||
pub mod sdk_events;
|
||||
pub mod search;
|
||||
mod sqlx;
|
||||
mod types;
|
||||
use api_event::metrics::{ApiEventMetric, ApiEventMetricRow};
|
||||
@ -664,3 +665,42 @@ pub struct ReportConfig {
|
||||
pub dispute_function: String,
|
||||
pub region: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
#[serde(tag = "auth")]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum OpensearchAuth {
|
||||
Basic { username: String, password: String },
|
||||
Aws { region: String },
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
pub struct OpensearchIndexes {
|
||||
pub payment_attempts: String,
|
||||
pub payment_intents: String,
|
||||
pub refunds: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
pub struct OpensearchConfig {
|
||||
host: String,
|
||||
auth: OpensearchAuth,
|
||||
indexes: OpensearchIndexes,
|
||||
}
|
||||
|
||||
impl Default for OpensearchConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
host: "https://localhost:9200".to_string(),
|
||||
auth: OpensearchAuth::Basic {
|
||||
username: "admin".to_string(),
|
||||
password: "admin".to_string(),
|
||||
},
|
||||
indexes: OpensearchIndexes {
|
||||
payment_attempts: "hyperswitch-payment-attempt-events".to_string(),
|
||||
payment_intents: "hyperswitch-payment-intent-events".to_string(),
|
||||
refunds: "hyperswitch-refund-events".to_string(),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user