use clap::Subcommand;
mod build;
mod common;
mod push;
mod run;
#[derive(Debug, clap::Args)]
#[clap(verbatim_doc_comment)]
pub struct Oci {
#[clap(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
enum Commands {
Build(build::Build),
Push(push::Push),
Run(run::Run),
}
impl Commands {
pub async fn run(self) -> eyre::Result<()> {
match self {
Self::Build(cmd) => cmd.run().await,
Self::Push(cmd) => cmd.run().await,
Self::Run(cmd) => cmd.run().await,
}
}
}
impl Oci {
pub async fn run(self) -> eyre::Result<()> {
self.command.run().await
}
}