tachyon-types 0.5.0

Shared myko entity and command types for the tachyon Ansible runner.
Documentation
use myko_macros::myko_item;
use serde::{Deserialize, Serialize};
use ts_rs::TS;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
#[serde(rename_all = "camelCase")]
pub struct HostGroup {
    pub name: String,
    pub children: Vec<String>,
    pub hosts: Vec<String>,
}

myko::register_ts_export!(HostGroup);

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
#[serde(rename_all = "camelCase")]
pub struct Host {
    pub name: String,
    pub ansible_host: Option<String>,
}

myko::register_ts_export!(Host);

#[myko_item]
pub struct Inventory {
    pub groups: Vec<HostGroup>,
    pub hosts: Vec<Host>,
}