vaultrs/api/sys/
responses.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
use std::collections::HashMap;

use serde::{Deserialize, Serialize};

/// Response from executing
/// [ListMountsRequest][crate::api::sys::requests::ListMountsRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct MountResponse {
    pub accessor: String,
    pub config: MountConfigResponse,
    pub description: String,
    pub external_entropy_access: bool,
    pub local: bool,
    pub options: Option<HashMap<String, String>>,
    pub seal_wrap: bool,
    #[serde(rename = "type")]
    pub mount_type: String,
    pub uuid: String,
}

/// Response from executing
/// [ListMountsRequest][crate::api::sys::requests::ListMountsRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct MountConfigResponse {
    pub default_lease_ttl: u64,
    pub force_no_cache: bool,
    pub max_lease_ttl: u64,
}

/// Response from executing
/// [GetConfigurationOfTheSecretEngineRequest][crate::api::sys::requests::GetConfigurationOfTheSecretEngineRequest ]
#[derive(Deserialize, Debug, Serialize)]
pub struct GetConfigurationOfTheSecretEngineResponse {
    pub accessor: String,
    pub config: MountConfigResponse,
    pub description: String,
    pub external_entropy_access: bool,
    pub local: bool,
    pub options: Option<HashMap<String, String>>,
    pub plugin_version: Option<String>,
    pub running_plugin_version: Option<String>,
    pub running_sha256: Option<String>,
    pub seal_wrap: bool,
    #[serde(rename = "type")]
    pub mount_type: String,
    pub uuid: String,
}

/// Response from executing
/// [ListAuthsRequest][crate::api::sys::requests::ListAuthsRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct AuthResponse {
    pub accessor: String,
    pub config: AuthConfigResponse,
    pub description: String,
    pub external_entropy_access: bool,
    pub local: bool,
    pub options: Option<HashMap<String, String>>,
    pub seal_wrap: bool,
    #[serde(rename = "type")]
    pub mount_type: String,
    pub uuid: String,
}

/// Response from executing
/// [ListAuthsRequest][crate::api::sys::requests::ListAuthsRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct AuthConfigResponse {
    pub default_lease_ttl: u64,
    pub force_no_cache: bool,
    pub max_lease_ttl: u64,
    pub token_type: String,
}

/// Response from executing
/// [WrappingLookupRequest][crate::api::sys::requests::WrappingLookupRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct WrappingLookupResponse {
    pub creation_path: String,
    pub creation_time: String,
    pub creation_ttl: u64,
}

/// Response from executing
/// [ReadHealthRequest][crate::api::sys::requests::ReadHealthRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadHealthResponse {
    pub cluster_id: String,
    pub cluster_name: String,
    pub initialized: bool,
    pub performance_standby: bool,
    pub replication_dr_mode: Option<String>,
    pub replication_perf_mode: Option<String>,
    pub sealed: bool,
    pub server_time_utc: u64,
    pub standby: bool,
    pub version: String,
}

/// Response from executing
/// [StartInitializationRequest][crate::api::sys::requests::StartInitializationRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct StartInitializationResponse {
    pub keys: Vec<String>,
    pub keys_base64: Vec<String>,
    pub root_token: String,
}

/// Response from executing
/// [UnsealRequest][crate::api::sys::requests::UnsealRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct UnsealResponse {
    pub sealed: bool,
    #[serde(rename = "t")]
    pub threshold: u64,
    #[serde(rename = "n")]
    pub n_shares: u64,
    pub progress: u64,
    pub version: String,
    pub cluster_name: Option<String>,
    pub cluster_id: Option<String>,
}

/// Response from executing
/// [ListPoliciesRequest][crate::api::sys::requests::ListPoliciesRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct ListPoliciesResponse {
    pub policies: Vec<String>,
}

/// Response from executing
/// [ReadPolicyRequest][crate::api::sys::requests::ReadPolicyRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadPolicyResponse {
    pub name: String,
    pub rules: String,
}

/// Response from executing
/// [RandomRequest][crate::api::sys::requests::RandomRequest]
#[derive(Deserialize, Debug, Serialize)]
pub struct RandomResponse {
    pub random_bytes: String,
}