define more api for alerter / tag

This commit is contained in:
mbecker20
2023-07-09 06:03:21 +00:00
parent 818210805f
commit 4e7311bdfe
7 changed files with 164 additions and 4 deletions
+44
View File
@@ -0,0 +1,44 @@
use resolver_api::derive::Request;
use serde::{Deserialize, Serialize};
use typeshare::typeshare;
use crate::entities::alerter::{Alerter, PartialAlerterConfig};
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Alerter)]
pub struct CreateAlerter {
pub name: String,
pub config: PartialAlerterConfig,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Alerter)]
pub struct CopyAlerter {
pub name: String,
pub id: String,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Alerter)]
pub struct DeleteAlerter {
pub id: String,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Alerter)]
pub struct UpdateAlerter {
pub id: String,
pub config: PartialAlerterConfig,
}
+2
View File
@@ -1,3 +1,4 @@
mod alerter;
mod build;
mod builder;
mod deployment;
@@ -8,6 +9,7 @@ mod server;
mod tags;
mod user;
pub use alerter::*;
pub use build::*;
pub use builder::*;
pub use deployment::*;