fix: removed unnecessary DiscordWebhookRecevierInerpret and its impl
All checks were successful
Run Check Script / check (push) Successful in 1m47s
Run Check Script / check (pull_request) Successful in 1m47s

This commit is contained in:
Willem 2025-06-04 16:14:00 -04:00
parent b33650e9d5
commit dda8e29843

View File

@ -130,50 +130,15 @@ struct DiscordWebhookReceiverScore {
impl<T: Topology + HelmCommand> Score<T> for DiscordWebhookReceiverScore { impl<T: Topology + HelmCommand> Score<T> for DiscordWebhookReceiverScore {
fn create_interpret(&self) -> Box<dyn Interpret<T>> { fn create_interpret(&self) -> Box<dyn Interpret<T>> {
Box::new(DiscordWebhookReceiverScoreInterpret {
config: self.config.clone(),
})
}
fn name(&self) -> String {
"DiscordWebhookReceiverScore".to_string()
}
}
#[derive(Debug)]
struct DiscordWebhookReceiverScoreInterpret {
config: DiscordWebhookConfig,
}
#[async_trait]
impl<T: Topology + HelmCommand> Interpret<T> for DiscordWebhookReceiverScoreInterpret {
async fn execute(
&self,
inventory: &Inventory,
topology: &T,
) -> Result<Outcome, InterpretError> {
discord_alert_manager_score( discord_alert_manager_score(
self.config.webhook_url.clone(), self.config.webhook_url.clone(),
self.config.name.clone(), self.config.name.clone(),
self.config.name.clone(), self.config.name.clone(),
) )
.create_interpret() .create_interpret()
.execute(inventory, topology)
.await
} }
fn get_name(&self) -> InterpretName { fn name(&self) -> String {
todo!() "DiscordWebhookReceiverScore".to_string()
}
fn get_version(&self) -> Version {
todo!()
}
fn get_status(&self) -> InterpretStatus {
todo!()
}
fn get_children(&self) -> Vec<Id> {
todo!()
} }
} }