Files
onx/src/commands/mod.rs
T

27 lines
888 B
Rust
Raw Normal View History

2026-09-04 18:58:22 -05:00
pub mod apps;
2026-09-11 22:13:22 -05:00
pub mod fields;
2026-10-01 09:53:20 -05:00
pub mod files;
pub mod lists;
2026-09-14 19:53:56 -05:00
pub mod ping;
pub mod records;
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-10-01 09:53:20 -05:00
Command::Lists { command } => lists::handle(command, client, writer, cli.pretty).await,
}
2026-09-04 18:58:22 -05:00
}