vaultrs/api/kv2/
responses.rsuse std::collections::HashMap;
use serde::{Deserialize, Serialize};
use serde_json::Value;
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadConfigurationResponse {
pub cas_required: bool,
pub delete_version_after: String,
pub max_versions: u64,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadSecretResponse {
pub data: Value,
pub metadata: SecretVersionMetadata,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct SecretVersionMetadata {
pub created_time: String,
pub deletion_time: String,
pub custom_metadata: Option<HashMap<String, String>>,
pub destroyed: bool,
pub version: u64,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct ListSecretsResponse {
pub keys: Vec<String>,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadSecretMetadataResponse {
pub cas_required: bool,
pub created_time: String,
pub current_version: u64,
pub delete_version_after: String,
pub max_versions: u64,
pub oldest_version: u64,
pub updated_time: String,
pub custom_metadata: Option<HashMap<String, String>>,
pub versions: HashMap<String, SecretMetadata>,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct SecretMetadata {
pub created_time: String,
pub deletion_time: String,
pub destroyed: bool,
}