urci/src/config.rs

46 lines
882 B
Rust

/**
* This module contains all the defined structures which will process the UrCI
* configuration file
*/
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Config {
pub projects: Vec<Project>,
pub agents: Vec<Agent>,
pub handlers: Vec<Handler>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Project {
name: String,
trigger: Trigger,
handler: String,
scm: Scm,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Trigger {
cron: Option<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Scm {
git: Option<String>,
r#ref: Option<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Agent {
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Handler {
}