2021-12-31 00:11:20 +01:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
2021-05-06 13:15:12 +02:00
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct DsConfig {
|
|
|
|
pub uri: String,
|
|
|
|
pub dm_pw: String,
|
2021-06-17 05:53:23 +02:00
|
|
|
pub base_dn: String,
|
2021-05-06 13:15:12 +02:00
|
|
|
}
|
|
|
|
|
2023-01-23 11:04:03 +01:00
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct IpaConfig {
|
|
|
|
pub uri: String,
|
|
|
|
pub realm: String,
|
|
|
|
pub admin_pw: String,
|
|
|
|
}
|
|
|
|
|
2021-05-06 13:15:12 +02:00
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct KaniHttpConfig {
|
|
|
|
pub uri: String,
|
|
|
|
pub admin_pw: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct KaniLdapConfig {
|
|
|
|
pub uri: String,
|
|
|
|
pub ldap_uri: String,
|
|
|
|
pub admin_pw: String,
|
|
|
|
pub base_dn: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct SearchBasicConfig {
|
|
|
|
// Could consider fn for this #[serde(default = "Priority::lowest")]
|
|
|
|
pub warmup_seconds: u32,
|
|
|
|
pub workers: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for SearchBasicConfig {
|
|
|
|
fn default() -> Self {
|
|
|
|
SearchBasicConfig {
|
|
|
|
warmup_seconds: 5,
|
|
|
|
workers: 16,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
pub struct Profile {
|
|
|
|
pub name: String,
|
|
|
|
pub data: String,
|
|
|
|
pub results: String,
|
|
|
|
pub ds_config: Option<DsConfig>,
|
2023-01-23 11:04:03 +01:00
|
|
|
pub ipa_config: Option<IpaConfig>,
|
2021-05-06 13:15:12 +02:00
|
|
|
pub kani_http_config: Option<KaniHttpConfig>,
|
|
|
|
pub kani_ldap_config: Option<KaniLdapConfig>,
|
|
|
|
#[serde(default)]
|
|
|
|
pub search_basic_config: SearchBasicConfig,
|
|
|
|
}
|