Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { VaultAddr string Debug bool SecretConfig string SecretConfigFile string // contains filtered or unexported fields }
Config contains the vault-to-env configuration
type Logger ¶
type Logger interface { Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Fatal(args ...interface{}) }
Logger is a log interface for passing custom loggers
type SecretItem ¶
type SecretItem struct { SecretPath string `json:"vault_path" yaml:"secretPath"` TTL int `json:"ttl" yaml:"ttl"` Version float64 `json:"version" yaml:"version"` SecretMaps map[string]string `json:"set" yaml:"set"` // contains filtered or unexported fields }
SecretItem holds data about a secret config
type VaultToEnvs ¶
type VaultToEnvs struct {
// contains filtered or unexported fields
}
VaultToEnvs is the main struct for this package
func NewVaultToEnvs ¶
func NewVaultToEnvs(config *Config) *VaultToEnvs
NewVaultToEnvs creates a new VaultToEnvs
func (*VaultToEnvs) DisplayEnvExports ¶
func (v *VaultToEnvs) DisplayEnvExports() error
DisplayEnvExports outputs the results to stdout
func (*VaultToEnvs) GetKV2Secret ¶
func (v *VaultToEnvs) GetKV2Secret(secretItem *SecretItem) error
GetKV2Secret gets a key-value (version 2) secret Uses the `version` option to select the desired version. This can be negative to go back x versions or positive to indicate the actual secret version
func (*VaultToEnvs) SetLogger ¶
func (v *VaultToEnvs) SetLogger(logger Logger)
SetLogger allows a custom logger to be used for messages
func (*VaultToEnvs) SetVaultToken ¶
func (v *VaultToEnvs) SetVaultToken(token string)
SetVaultToken sets the Vault token
Click to show internal directories.
Click to hide internal directories.