Refactor the parser package into a "model" package which is more accurate

Most of its job is to contain the models for different data structures
This commit is contained in:
R Tyler Croy 2021-01-01 10:10:01 -08:00
parent 5003d5eeff
commit a3accf213a
12 changed files with 9 additions and 9 deletions

4
Cargo.lock generated
View File

@ -619,11 +619,11 @@ dependencies = [
"serde_json",
"serde_yaml",
"ssh2",
"zap-parser",
"zap-model",
]
[[package]]
name = "zap-parser"
name = "zap-model"
version = "0.1.0"
dependencies = [
"handlebars",

View File

@ -1,5 +1,5 @@
[workspace]
members = [
'cli',
'parser',
'model',
]

View File

@ -16,4 +16,4 @@ serde_derive = "~1.0"
serde_json = "~1.0"
serde_yaml = "~0.8"
ssh2 = "~0.9.0"
zap-parser = { path = "../parser" }
zap-model = { path = "../model" }

View File

@ -10,8 +10,8 @@ mod transport;
use crate::inventory::*;
use crate::transport::ssh::Ssh;
use zap_parser::plan::{ExecutableTask, Plan};
use zap_parser::task::Task;
use zap_model::plan::{ExecutableTask, Plan};
use zap_model::task::Task;
fn main() {
pretty_env_logger::init();

View File

@ -1,6 +1,6 @@
use crate::inventory::{Group, Inventory, Target};
use std::path::Path;
use zap_parser::plan::ExecutableTask;
use zap_model::plan::ExecutableTask;
pub mod ssh;

View File

@ -10,7 +10,7 @@ use std::io::BufReader;
use std::net::TcpStream;
use std::path::Path;
use zap_parser::plan::ExecutableTask;
use zap_model::plan::ExecutableTask;
#[derive(Clone)]
pub struct Ssh {

View File

@ -1,5 +1,5 @@
[package]
name = "zap-parser"
name = "zap-model"
version = "0.1.0"
authors = ["R. Tyler Croy <rtyler@brokenco.de>"]
edition = "2018"