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