1use std::fmt::Debug;
2use std::path::PathBuf;
3
4use clap::{Args, Subcommand};
5
6mod create;
9mod delete;
10mod kill;
11mod start;
12mod state;
13
14pub use create::Create;
15pub use delete::Delete;
16pub use kill::Kill;
17pub use start::Start;
18pub use state::State;
19
20mod checkpoint;
22mod events;
23mod exec;
24mod features;
25mod list;
26mod pause;
27mod ps;
28mod resume;
29mod run;
30mod spec;
31mod update;
32
33pub use checkpoint::Checkpoint;
34pub use events::Events;
35pub use exec::Exec;
36pub use features::Features;
37pub use list::List;
38pub use pause::Pause;
39pub use ps::Ps;
40pub use resume::Resume;
41pub use run::Run;
42pub use spec::Spec;
43pub use update::Update;
44
45#[derive(Subcommand, Debug)]
50pub enum StandardCmd {
51 Create(Create),
52 Start(Start),
53 State(State),
54 Kill(Kill),
55 Delete(Delete),
56}
57
58#[derive(Subcommand, Debug)]
63pub enum CommonCmd {
64 Checkpointt(Checkpoint),
65 Events(Events),
66 Exec(Exec),
67 Features(Features),
68 List(List),
69 Pause(Pause),
70 Ps(Ps),
71 Resume(Resume),
72 Run(Run),
73 Update(Update),
74 Spec(Spec),
75}
76
77#[derive(Args, Debug)]
80pub struct GlobalOpts {
81 #[arg(short, long, overrides_with("log"))]
83 pub log: Option<PathBuf>,
84 #[arg(long)]
86 pub debug: bool,
87 #[arg(long)]
89 pub log_format: Option<String>,
90 #[arg(short, long)]
92 pub root: Option<PathBuf>,
93 #[arg(short, long)]
95 pub systemd_cgroup: bool,
96}