Add validation for service methods

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2025-08-22 14:08:41 +02:00
parent bc6cb16732
commit 7ce19f8b6d
9 changed files with 1089 additions and 154 deletions

View File

@@ -7,25 +7,26 @@ use crate::time::Timestamp;
#[derive(Serialize, Deserialize, Clone)]
pub struct Flow {
/// Job Id set tby the actor which created it
id: u32,
pub id: u32,
/// Actor Id who created this job
caller_id: u32,
pub caller_id: u32,
/// The context in which this job is executed
context_id: u32,
pub context_id: u32,
/// List of jobs which make up the flow
jobs: Vec<u32>,
pub jobs: Vec<u32>,
/// Environment variables, passed to every job when executed
env_vars: HashMap<String, String>,
pub env_vars: HashMap<String, String>,
/// The result of the flow
result: HashMap<String, String>,
created_at: Timestamp,
updated_at: Timestamp,
status: FlowStatus,
pub result: HashMap<String, String>,
pub created_at: Timestamp,
pub updated_at: Timestamp,
pub status: FlowStatus,
}
/// The status of a flow
#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
pub enum FlowStatus {
Created,
Dispatched,
Started,
Error,