pub mod web; pub mod ssh; pub mod webdav; pub mod iscsi; pub mod tree; use clap::Subcommand; #[derive(Subcommand)] pub enum InterfaceCommands { #[command(flatten)] Web(web::WebCommand), #[command(flatten)] Ssh(ssh::SshCommand), #[command(flatten)] Webdav(webdav::WebdavCommand), #[command(flatten)] Iscsi(iscsi::IscsiCommand), #[command(flatten)] Tree(tree::TreeCommand), } pub async fn handle_interface_command(cmd: InterfaceCommands) -> anyhow::Result<()> { match cmd { InterfaceCommands::Web(c) => web::handle_web_command(c).await?, InterfaceCommands::Ssh(c) => ssh::handle_ssh_command(c).await?, InterfaceCommands::Webdav(c) => webdav::handle_webdav_command(c).await?, InterfaceCommands::Iscsi(c) => iscsi::handle_iscsi_command(c).await?, InterfaceCommands::Tree(c) => tree::handle_tree_command(c).await?, } Ok(()) }