eldiron_cli/commands/
server.rs1mod restart;
2mod setup;
3mod shutdown;
4mod start;
5
6use anyhow::Result;
7use clap::Subcommand;
8
9use self::{
10 restart::server_restart, setup::server_setup, shutdown::server_shutdown, start::server_start,
11};
12
13#[derive(Debug, Subcommand)]
14pub enum ServerCommand {
15 Restart,
17 Setup,
19 Shutdown,
21 Start,
23}
24
25pub fn handle_command_server(command: ServerCommand) -> Result<()> {
26 match command {
27 ServerCommand::Restart => server_restart(),
28 ServerCommand::Setup => server_setup(),
29 ServerCommand::Shutdown => server_shutdown(),
30 ServerCommand::Start => server_start(),
31 }
32}