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 custom_field_items;
12pub mod custom_fields;
13pub mod lists;
14pub mod profile;
15pub mod swimlanes;
16pub mod users;
17
18use clap::Subcommand;
19
20#[derive(Debug, Subcommand)]
21pub enum RootCommand {
22    /// Send a low-level request to the selected Wekan server.
23    Api(api::ApiArgs),
24
25    /// Authenticate with a Wekan server.
26    Auth(auth::AuthArgs),
27
28    /// Manage named local Wekan server profiles.
29    Profile(profile::ProfileArgs),
30
31    /// Inspect and administer Wekan users.
32    User(users::UserArgs),
33
34    /// Inspect and manage Wekan boards.
35    Board(boards::BoardArgs),
36
37    /// Inspect and manage lists on Wekan boards.
38    List(lists::ListArgs),
39
40    /// Inspect and manage cards in Wekan board lists.
41    Card(Box<cards::CardArgs>),
42
43    /// Inspect and manage checklists on Wekan cards.
44    Checklist(checklists::ChecklistArgs),
45
46    /// Inspect and manage checklist items.
47    ChecklistItem(checklist_items::ChecklistItemArgs),
48
49    /// Inspect and manage comments on Wekan cards.
50    Comment(comments::CommentArgs),
51
52    /// Inspect and manage custom-field definitions.
53    CustomField(custom_fields::CustomFieldArgs),
54
55    /// Manage custom-field dropdown items.
56    CustomFieldItem(custom_field_items::CustomFieldItemArgs),
57
58    /// Inspect and manage swimlanes on Wekan boards.
59    Swimlane(swimlanes::SwimlaneArgs),
60}
61
62impl RootCommand {
63    pub const fn supports_raw_output(&self) -> bool {
64        matches!(self, Self::Api(_))
65    }
66}