use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Maidfile { #[serde(skip_serializing_if = "Option::is_none")] pub import: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub env: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub project: Option, pub tasks: BTreeMap>, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct Project { #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub version: Option, #[serde(skip_serializing_if = "Option::is_none")] pub server: Option, // wip } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Server { pub address: Address, // wip pub token: String, // wip } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Address { pub host: String, pub port: i64, pub tls: bool, } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Tasks { pub script: T, #[serde(skip_serializing_if = "Option::is_none")] pub hide: Option, #[serde(skip_serializing_if = "Option::is_none")] pub path: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(skip_serializing_if = "Option::is_none")] pub cache: Option, #[serde(skip_serializing_if = "Option::is_none")] pub remote: Option, #[serde(skip_serializing_if = "Option::is_none")] pub depends: Option>, } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Cache { pub path: String, pub target: Vec, } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Remote { pub push: Vec, pub pull: String, pub image: String, pub shell: String, pub silent: bool, pub exclusive: bool, }