chore(harmony): Use Cargo workspaces for core harmony and client specific implementation

This commit is contained in:
jeangab
2024-09-06 12:17:23 -04:00
parent aa28ab37b8
commit cc01ec5fe5
41 changed files with 783 additions and 142 deletions

View File

@@ -0,0 +1,6 @@
[package]
name = "fqm"
version = "0.1.0"
edition = "2021"
[dependencies]

View File

@@ -0,0 +1,21 @@
use crate::domain::{
hardware::{Location, Host, HostCategory},
inventory::Inventory,
};
pub fn get_fqm_inventory() -> Inventory {
Inventory {
location: Location::new(
"1134 Grande Allée Ouest 1er étage, Québec, Qc".into(),
"FQM 1134 1er étage".into(),
),
host: vec![Host {
category: HostCategory::Server,
network: vec![],
storage: vec![],
labels: vec![],
}],
switch: vec![],
firewall: vec![],
}
}

14
harmony-rs/fqm/src/lib.rs Normal file
View File

@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}