wekan_cli/commands/
skill.rs1mod list;
2mod show;
3mod topics;
4
5use clap::{Args, Subcommand};
6
7use crate::{command_result::CommandSuccess, error::AppError};
8
9pub use self::{list::ListArgs, show::ShowArgs};
10
11#[derive(Debug, Args)]
12pub struct SkillArgs {
13 #[command(subcommand)]
14 pub command: SkillCommand,
15}
16
17#[derive(Debug, Subcommand)]
18pub enum SkillCommand {
19 List(ListArgs),
21 Show(ShowArgs),
23}
24
25pub(crate) fn dispatch(command: SkillCommand) -> Result<CommandSuccess, AppError> {
26 match command {
27 SkillCommand::List(args) => Ok(list::execute(args)),
28 SkillCommand::Show(args) => show::execute(args),
29 }
30}