Skip to main content

rkubectl_app/cli/command/
basic.rs

1use super::*;
2
3pub use create::Create;
4pub use create::CreateResource;
5
6mod create;
7
8#[expect(clippy::large_enum_variant)]
9/// Basic Commands (Beginner)
10#[derive(Clone, Debug, Subcommand)]
11#[command(subcommand_help_heading = "Basic Commands (Beginner)")]
12pub enum Basic {
13    /// Create a resource from a file or from stdin
14    Create(Create),
15
16    /// Take a replication controller, service, deployment or pod and expose it as a new Kubernetes service
17    Expose,
18
19    /// Run a particular image on the cluster
20    Run,
21
22    /// Set specific features on objects
23    Set,
24}
25
26impl Basic {
27    pub async fn exec(self, context: &Context) -> RkResult<()> {
28        match self {
29            Self::Create(create) => create.exec(context).await,
30            Self::Expose => Err(RkError::todo()),
31            Self::Run => Err(RkError::todo()),
32            Self::Set => Err(RkError::todo()),
33        }
34    }
35}