Skip to main content

wekan_cli/
commands.rs

1pub mod api;
2pub mod auth;
3pub(crate) mod authenticated;
4pub mod boards;
5pub mod cards;
6pub mod checklist_items;
7pub mod checklists;
8pub(crate) mod client_error;
9pub mod comments;
10pub(crate) mod credential_ops;
11pub mod lists;
12pub mod profile;
13pub mod swimlanes;
14pub mod users;
15
16use clap::Subcommand;
17
18#[derive(Debug, Subcommand)]
19pub enum RootCommand {
20    /// Send a low-level request to the selected Wekan server.
21    Api(api::ApiArgs),
22
23    /// Authenticate with a Wekan server.
24    Auth(auth::AuthArgs),
25
26    /// Manage named local Wekan server profiles.
27    Profile(profile::ProfileArgs),
28
29    /// Inspect and administer Wekan users.
30    User(users::UserArgs),
31
32    /// Inspect and manage Wekan boards.
33    Board(boards::BoardArgs),
34
35    /// Inspect and manage lists on Wekan boards.
36    List(lists::ListArgs),
37
38    /// Inspect and manage cards in Wekan board lists.
39    Card(Box<cards::CardArgs>),
40
41    /// Inspect and manage checklists on Wekan cards.
42    Checklist(checklists::ChecklistArgs),
43
44    /// Inspect and manage checklist items.
45    ChecklistItem(checklist_items::ChecklistItemArgs),
46
47    /// Inspect and manage comments on Wekan cards.
48    Comment(comments::CommentArgs),
49
50    /// Inspect and manage swimlanes on Wekan boards.
51    Swimlane(swimlanes::SwimlaneArgs),
52}
53
54impl RootCommand {
55    pub const fn supports_raw_output(&self) -> bool {
56        matches!(self, Self::Api(_))
57    }
58}