Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface {
Read(target interface{}) error
}
func NewEnvTuner ¶
func NewEnvTuner() Reader
func NewFileTuner ¶
func NewVaultTuner ¶
func NewVaultTuner(vaultCfg VaultConfig) (Reader, error)
type TLSConfig ¶
type TLSConfig struct { CACert string `json:"ca_cert" yaml:"ca_cert"` CAPath string `json:"ca_path" yaml:"ca_path"` ClientCert string `json:"client_cert" yaml:"client_cert"` ClientKey string `json:"client_key" yaml:"client_key" ` TLSServerName string `json:"tls_server_name" yaml:"tls_server_name"` Insecure bool `json:"insecure" yaml:"insecure"` }
type Tuner ¶
type Tuner interface { Reader FromVault(vaultCfg VaultConfig) error FromEnv() FromFile(path string) error }
type VaultConfig ¶
type VaultConfig struct { *TLSConfig Address *string `json:"address" yaml:"address"` Timeout *time.Duration `json:"timeout" yaml:"timeout"` Path string `json:"path" yaml:"path"` Token string `json:"token" yaml:"token"` }
VaultConfig is used to read secrets from Vault into given struct
Source Files ¶
Click to show internal directories.
Click to hide internal directories.