1use std::path::PathBuf;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Serialize, Deserialize)]
6pub enum Provider {
7 Google(GoogleConfig),
8 Aws(AwsConfig),
9 Azure(AzureConfig),
10 Hashicorp(HashicorpVaultConfig),
11}
12
13#[derive(Serialize, Deserialize)]
14pub struct Secret {
15 pub id: String,
16 pub name: String,
17 pub mount: String,
18}
19
20#[derive(Serialize, Deserialize, Default)]
21pub struct AwsConfig {
22 pub aws_access_key_id: Option<String>,
23 pub aws_secret_access_key: Option<String>,
24 pub aws_region: String,
25}
26
27#[derive(Debug, Default, Serialize, Deserialize)]
28pub struct AzureConfig {
29 pub credential: AzureCredential,
30 pub azure_keyvault_name: Option<String>,
31 pub azure_keyvault_url: Option<String>,
32}
33
34#[derive(Debug, Default, Serialize, Deserialize)]
35pub struct AzureCredential {
36 pub azure_tenant_id: Option<String>,
37 pub azure_client_id: Option<String>,
38 pub azure_client_secret: Option<String>,
39}
40
41#[derive(Debug, Default, Serialize, Deserialize)]
42pub struct GoogleConfig {
43 pub google_credentials_file: Option<PathBuf>,
44 pub google_credentials_json: Option<String>,
45 pub google_project: Option<String>,
46}
47
48#[derive(Serialize, Deserialize)]
49pub struct HashicorpVaultConfig {
50 pub vault_address: Option<String>,
51 pub vault_token: Option<String>,
52 pub vault_cacert: Option<PathBuf>,
53}