AirLibrary/CLI/
CommandTypes.rs1#[derive(Debug, Clone)]
10pub enum Command {
11 Status { service:Option<String>, verbose:bool, json:bool },
12
13 Restart { service:Option<String>, force:bool },
14
15 Config(ConfigCommand),
16
17 Metrics { json:bool, service:Option<String> },
18
19 Logs { service:Option<String>, tail:Option<usize>, filter:Option<String>, follow:bool },
20
21 Debug(DebugCommand),
22
23 Help { command:Option<String> },
24
25 Version,
26}
27
28#[derive(Debug, Clone)]
30pub enum ConfigCommand {
31 Get { key:String },
32
33 Set { key:String, value:String },
34
35 Reload { validate:bool },
36
37 Show { json:bool },
38
39 Validate { path:Option<String> },
40}
41
42#[derive(Debug, Clone)]
44pub enum DebugCommand {
45 DumpState { service:Option<String>, json:bool },
46
47 DumpConnections { format:Option<String> },
48
49 HealthCheck { verbose:bool, service:Option<String> },
50
51 Diagnostics { level:DiagnosticLevel },
52}
53
54#[derive(Debug, Clone, Copy, PartialEq, Eq)]
56pub enum DiagnosticLevel {
57 Basic,
58
59 Extended,
60
61 Full,
62}
63
64#[derive(Debug, Clone)]
66pub enum ValidationResult {
67 Valid,
68
69 Invalid(String),
70}
71
72#[derive(Debug, Clone, Copy, PartialEq, Eq)]
74pub enum PermissionLevel {
75 User,
76
77 Admin,
78}