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:
parent
5003d5eeff
commit
a3accf213a
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[workspace]
|
||||
members = [
|
||||
'cli',
|
||||
'parser',
|
||||
'model',
|
||||
]
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "zap-parser"
|
||||
name = "zap-model"
|
||||
version = "0.1.0"
|
||||
authors = ["R. Tyler Croy <rtyler@brokenco.de>"]
|
||||
edition = "2018"
|
Loading…
Reference in New Issue