-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
31 lines (25 loc) · 1.04 KB
/
config.go
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
package main
type InfisicalConfig struct {
Url string `json:"url" env:"INFISICAL_URL"`
ProjectId string `json:"projectId" env:"INFISICAL_PROJECTID"`
ClientId string `json:"clientId" env:"INFISICAL_CLIENTID"`
ClientSecret string `json:"clientSecret" env:"INFISICAL_CLIENTSECRET"`
Environment string `json:"environment" env:"INFISICAL_ENVIRONMENT"`
}
type VaultAuthMethod string
const VaultAuthToken VaultAuthMethod = "token"
type VaultConfig struct {
Address string `json:"addr" env:"VAULT_ADDR"`
AuthMethod VaultAuthMethod `json:"authMethod" env:"VAULT_AUTHMETHOD"`
Token string `json:"token" env:"VAULT_TOKEN"`
StoreName string `json:"storeName" env:"VAULT_STORENAME"`
IgnoreTls bool `json:"ignoreTls" env:"VAULT_IGNORETLS"`
}
type TransferSettings struct {
Overwrite bool `json:"overwrite" env:"SETTINGS_OVERWRITE"`
}
type Config struct {
Infisical InfisicalConfig `json:"infisical"`
Vault VaultConfig `json:"vault"`
Settings TransferSettings `json:"settings"`
}