risingwave_pb/sim/
secret.rs

1// This file is @generated by prost-build.
2#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct SecretMetaBackend {
5    #[prost(bytes = "vec", tag = "1")]
6    pub value: ::prost::alloc::vec::Vec<u8>,
7}
8#[derive(prost_helpers::AnyPB)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct VaultTokenAuth {
11    #[prost(string, tag = "1")]
12    pub token: ::prost::alloc::string::String,
13}
14#[derive(prost_helpers::AnyPB)]
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct VaultAppRoleAuth {
17    #[prost(string, tag = "1")]
18    pub role_id: ::prost::alloc::string::String,
19    #[prost(string, tag = "2")]
20    pub secret_id: ::prost::alloc::string::String,
21}
22#[derive(prost_helpers::AnyPB)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct SecretHashicorpVaultBackend {
25    #[prost(string, tag = "1")]
26    pub addr: ::prost::alloc::string::String,
27    #[prost(string, tag = "2")]
28    pub path: ::prost::alloc::string::String,
29    /// default "value"
30    #[prost(string, tag = "3")]
31    pub field: ::prost::alloc::string::String,
32    /// default false
33    #[prost(bool, tag = "6")]
34    pub tls_skip_verify: bool,
35    #[prost(oneof = "secret_hashicorp_vault_backend::Auth", tags = "4, 5")]
36    pub auth: ::core::option::Option<secret_hashicorp_vault_backend::Auth>,
37}
38/// Nested message and enum types in `SecretHashicorpVaultBackend`.
39pub mod secret_hashicorp_vault_backend {
40    #[derive(prost_helpers::AnyPB)]
41    #[derive(Clone, PartialEq, ::prost::Oneof)]
42    pub enum Auth {
43        #[prost(message, tag = "4")]
44        TokenAuth(super::VaultTokenAuth),
45        #[prost(message, tag = "5")]
46        ApproleAuth(super::VaultAppRoleAuth),
47    }
48}
49#[derive(prost_helpers::AnyPB)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct Secret {
52    /// the message is stored in meta as encrypted bytes and is interpreted as bytes by catalog
53    #[prost(oneof = "secret::SecretBackend", tags = "1, 2")]
54    pub secret_backend: ::core::option::Option<secret::SecretBackend>,
55}
56/// Nested message and enum types in `Secret`.
57pub mod secret {
58    /// the message is stored in meta as encrypted bytes and is interpreted as bytes by catalog
59    #[derive(prost_helpers::AnyPB)]
60    #[derive(Clone, PartialEq, ::prost::Oneof)]
61    pub enum SecretBackend {
62        #[prost(message, tag = "1")]
63        Meta(super::SecretMetaBackend),
64        #[prost(message, tag = "2")]
65        HashicorpVault(super::SecretHashicorpVaultBackend),
66    }
67}
68#[derive(prost_helpers::AnyPB)]
69#[derive(Eq, Hash)]
70#[derive(Clone, Copy, PartialEq, ::prost::Message)]
71pub struct SecretRef {
72    #[prost(uint32, tag = "1")]
73    pub secret_id: u32,
74    #[prost(enumeration = "secret_ref::RefAsType", tag = "2")]
75    pub ref_as: i32,
76}
77/// Nested message and enum types in `SecretRef`.
78pub mod secret_ref {
79    #[derive(prost_helpers::AnyPB)]
80    #[derive(
81        Clone,
82        Copy,
83        Debug,
84        PartialEq,
85        Eq,
86        Hash,
87        PartialOrd,
88        Ord,
89        ::prost::Enumeration
90    )]
91    #[repr(i32)]
92    pub enum RefAsType {
93        Unspecified = 0,
94        Text = 1,
95        /// AS FILE
96        File = 2,
97    }
98    impl RefAsType {
99        /// String value of the enum field names used in the ProtoBuf definition.
100        ///
101        /// The values are not transformed in any way and thus are considered stable
102        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
103        pub fn as_str_name(&self) -> &'static str {
104            match self {
105                Self::Unspecified => "UNSPECIFIED",
106                Self::Text => "TEXT",
107                Self::File => "FILE",
108            }
109        }
110        /// Creates an enum from field names used in the ProtoBuf definition.
111        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
112            match value {
113                "UNSPECIFIED" => Some(Self::Unspecified),
114                "TEXT" => Some(Self::Text),
115                "FILE" => Some(Self::File),
116                _ => None,
117            }
118        }
119    }
120}