windmill_api/models/
vault_settings.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.612.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct VaultSettings {
16    /// HashiCorp Vault server address (e.g., https://vault.company.com:8200)
17    #[serde(rename = "address")]
18    pub address: String,
19    /// KV v2 secrets engine mount path (e.g., windmill)
20    #[serde(rename = "mount_path")]
21    pub mount_path: String,
22    /// Vault JWT auth role name for Windmill (optional, if not provided token auth is used)
23    #[serde(rename = "jwt_role", skip_serializing_if = "Option::is_none")]
24    pub jwt_role: Option<String>,
25    /// Vault Enterprise namespace (optional)
26    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
27    pub namespace: Option<String>,
28    /// Static Vault token for testing/development (optional, if provided this is used instead of JWT authentication)
29    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
30    pub token: Option<String>,
31}
32
33impl VaultSettings {
34    pub fn new(address: String, mount_path: String) -> VaultSettings {
35        VaultSettings {
36            address,
37            mount_path,
38            jwt_role: None,
39            namespace: None,
40            token: None,
41        }
42    }
43}
44