tachyon_types/
inventory.rs1use myko_macros::myko_item;
2use serde::{Deserialize, Serialize};
3use ts_rs::TS;
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
6#[serde(rename_all = "camelCase")]
7pub struct HostGroup {
8 pub name: String,
9 pub children: Vec<String>,
10 pub hosts: Vec<String>,
11}
12
13myko::register_ts_export!(HostGroup);
14
15#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
16#[serde(rename_all = "camelCase")]
17pub struct Host {
18 pub name: String,
19 pub ansible_host: Option<String>,
20}
21
22myko::register_ts_export!(Host);
23
24#[myko_item]
25pub struct Inventory {
26 pub groups: Vec<HostGroup>,
27 pub hosts: Vec<Host>,
28}