2026-09-04 18:58:22 -05:00
|
|
|
pub mod apps;
|
2026-09-11 22:13:22 -05:00
|
|
|
pub mod fields;
|
2026-09-14 19:53:56 -05:00
|
|
|
pub mod ping;
|
|
|
|
|
pub mod records;
|
2026-09-14 20:40:21 -05:00
|
|
|
pub mod files;
|
2026-09-04 18:58:22 -05:00
|
|
|
|
|
|
|
|
use std::io::Write;
|
|
|
|
|
|
|
|
|
|
use crate::cli::{Cli, Command};
|
|
|
|
|
use crate::client::OnspringRunner;
|
|
|
|
|
use crate::error::CliResult;
|
|
|
|
|
|
|
|
|
|
pub async fn handle<C: OnspringRunner, W: Write>(
|
|
|
|
|
cli: &Cli,
|
|
|
|
|
client: &C,
|
|
|
|
|
writer: &mut W,
|
|
|
|
|
) -> CliResult<()> {
|
|
|
|
|
match &cli.command {
|
|
|
|
|
Command::Ping => ping::handle(client, writer, cli.pretty).await,
|
|
|
|
|
Command::Apps { command } => apps::handle(command, client, writer, cli.pretty).await,
|
2026-09-11 22:13:22 -05:00
|
|
|
Command::Fields { command } => fields::handle(command, client, writer, cli.pretty).await,
|
2026-09-14 20:40:21 -05:00
|
|
|
Command::Records { command } => records::handle(command, client, writer, cli.pretty).await,
|
|
|
|
|
Command::Files { command } => files::handle(command, client, writer, cli.pretty).await,
|
|
|
|
|
}
|
2026-09-04 18:58:22 -05:00
|
|
|
}
|