pub mod command_dispatcher;
pub mod completions_command;
pub mod create_instance_command;
pub mod delete_instance_command;
pub mod image;
pub mod instance_clone_command;
pub mod instance_console_command;
pub mod instance_modify_command;
pub mod instance_rename_command;
pub mod instance_restart_command;
pub mod instance_run_command;
pub mod instance_scp_command;
pub mod instance_show_command;
pub mod instance_ssh_command;
pub mod instance_start_command;
pub mod instance_stop_command;
pub mod list_image_command;
pub mod list_instance_command;
pub mod list_port_command;
pub mod prune_command;
pub mod show_command;
pub mod show_image_command;
pub mod verbosity;

pub use command_dispatcher::*;
pub use completions_command::*;
pub use create_instance_command::*;
pub use delete_instance_command::*;
pub use image::*;
pub use instance_clone_command::*;
pub use instance_console_command::*;
pub use instance_modify_command::*;
pub use instance_rename_command::*;
pub use instance_restart_command::*;
pub use instance_run_command::*;
pub use instance_scp_command::*;
pub use instance_show_command::*;
pub use instance_ssh_command::*;
pub use instance_start_command::*;
pub use instance_stop_command::*;
pub use list_image_command::*;
pub use list_instance_command::*;
pub use list_port_command::*;
pub use prune_command::*;
pub use show_command::*;
pub use show_image_command::*;
pub use verbosity::*;

use crate::env::Environment;
use crate::error::Error;
use crate::image::ImageStore;
use crate::instance::InstanceStore;
use crate::view::Console;

trait Command {
    fn run(
        &self,
        console: &mut dyn Console,
        env: &Environment,
        image_store: &dyn ImageStore,
        instance_store: &dyn InstanceStore,
    ) -> Result<(), Error>;
}
