use crate::config::builder::ServiceConfig;
use crate::config::iconoclast;
use serde::Deserialize;
use serde_with::{NoneAsEmptyString, serde_as};
#[serde_as]
#[derive(Debug, Deserialize)]
pub struct DefaultServiceConfig {
pub iconoclast: iconoclast::Config,
#[serde_as(as = "NoneAsEmptyString")]
pub database_url: Option<String>,
#[cfg(feature = "kafka")]
pub kafka: crate::kafka::Config,
}
impl ServiceConfig<'_> for DefaultServiceConfig {
#[cfg(feature = "kafka")]
fn with_kafka_properties(mut self, properties: Vec<(String, String)>) -> Self {
self.kafka.env_properties = properties;
self
}
}