Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyDefaults(defaultCfg interface{}, overrideCfg interface{}, newCfg interface{}) error
- func ConfigureLogger(levelMaybe ...string)
- func GetSecret(uri string) (string, error)
- func HasTypePrefix(secretRef string) bool
- func IsAllowedOverrideType(existing interface{}, v interface{}) bool
- func IsMap(v interface{}) bool
- func RecusiveOverride(defaults map[string]interface{}, overrides map[string]interface{})
- func RequireConfig(section string, unmarshalDst interface{}, defaults interface{}) error
- func RequireConfigWithViper(v *viper.Viper, section string, unmarshalDst interface{}, defaults interface{}) error
- type DefaultVaultLoader
- type Secret
- type SecretType
- type VaultLoader
Constants ¶
View Source
const CordialLogFormat = "CORDIAL_LOG_FORMAT"
View Source
const CordialLogLevel = "CORDIAL_LOG_LEVEL"
Variables ¶
View Source
var NewVaultClient = newVaultClient
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(defaultCfg interface{}, overrideCfg interface{}, newCfg interface{}) error
func ConfigureLogger ¶
func ConfigureLogger(levelMaybe ...string)
func HasTypePrefix ¶
func IsAllowedOverrideType ¶
func IsAllowedOverrideType(existing interface{}, v interface{}) bool
func RecusiveOverride ¶
func RequireConfig ¶
Load configuration. 1. Read in a configuration file based on environment variables and current path. 2. If a section is provided, e.g. "crosschain", then only that section will be treated as root and deserialized. 3. You may optionally provide an existing configuration object with default values. 4. If defaults are provided, an error will _not_ be returned if no config is found.
Types ¶
type DefaultVaultLoader ¶
func (*DefaultVaultLoader) LoadSecretData ¶
func (v *DefaultVaultLoader) LoadSecretData(vaultPath string) (*vault.Secret, error)
type SecretType ¶
type SecretType string
var Env SecretType = "env"
var File SecretType = "file"
var GoogleSecretManager SecretType = "gsm"
var Raw SecretType = "raw"
var Vault SecretType = "vault"
Click to show internal directories.
Click to hide internal directories.