diff --git a/Cargo.lock b/Cargo.lock index 2c50c96..c8b34df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "docki" -version = "0.2.0" +version = "0.3.0" dependencies = [ "bytes", "colored", diff --git a/src/app/commands/mod.rs b/src/app/commands/mod.rs index fc7951d..602741a 100644 --- a/src/app/commands/mod.rs +++ b/src/app/commands/mod.rs @@ -2,13 +2,14 @@ use std::collections::HashMap; use traits::Command; -use self::{build::Build, health::Health, reveal::Reveal}; +use self::{build::Build, health::Health, reveal::Reveal, serve::Serve}; pub mod traits; pub mod executions; mod build; mod health; mod reveal; +mod serve; pub struct CommandRegistry { commands: HashMap> @@ -21,6 +22,7 @@ impl CommandRegistry { registry.register("/build".to_string(), Box::new(Build::new()), true); registry.register("/health".to_string(), Box::new(Health::new()), true); registry.register("/install-reveal".to_string(), Box::new(Reveal::new()), true); + registry.register("/serve".to_string(), Box::new(Serve::new()), true) } diff --git a/src/app/commands/serve.rs b/src/app/commands/serve.rs new file mode 100644 index 0000000..ca0fb3b --- /dev/null +++ b/src/app/commands/serve.rs @@ -0,0 +1,14 @@ +use super::traits::Command; + +pub struct Serve; + +impl Command for Serve { + fn execute(&self, _args: &std::collections::HashMap) -> Result<(), String> { + println!("serving the application"); + return Ok(()) + } + + fn new() -> Self where Self: Sized { + return Self {} + } +}