mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-12 08:01:04 +00:00
define more api for alerter / tag
This commit is contained in:
@@ -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,
|
||||
}
|
||||
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user