windmill_api/models/
acl_grant_scope.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum AclGrantScope {
17 #[serde(rename = "target")]
18 Target,
19 #[serde(rename = "all_tables")]
20 AllTables,
21 #[serde(rename = "all_sequences")]
22 AllSequences,
23 #[serde(rename = "all_functions")]
24 AllFunctions,
25 #[serde(rename = "future_tables")]
26 FutureTables,
27 #[serde(rename = "future_sequences")]
28 FutureSequences,
29 #[serde(rename = "future_functions")]
30 FutureFunctions,
31
32}
33
34impl std::fmt::Display for AclGrantScope {
35 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
36 match self {
37 Self::Target => write!(f, "target"),
38 Self::AllTables => write!(f, "all_tables"),
39 Self::AllSequences => write!(f, "all_sequences"),
40 Self::AllFunctions => write!(f, "all_functions"),
41 Self::FutureTables => write!(f, "future_tables"),
42 Self::FutureSequences => write!(f, "future_sequences"),
43 Self::FutureFunctions => write!(f, "future_functions"),
44 }
45 }
46}
47
48impl Default for AclGrantScope {
49 fn default() -> AclGrantScope {
50 Self::Target
51 }
52}
53