Documentation ¶
Overview ¶
Package gcpsecretfetch is a utility library for getting secrets from GCP Secret Manager.
Package gcpsecretfetch is a utility library for getting secrets from GCP Secret Manager.
Index ¶
- func InitializeConfig(cfg interface{}, project string, envFileAction EnvFileAction) error
- func InitializeConfigViper(cfg interface{}, project string, viperP *viper.Viper) (error, []error)
- func InitializeConfigYaml(cfg interface{}, project string, secret string) error
- func UpdateSecrets(project string, secrets map[string]string, disablePrior bool) error
- type EnvFileAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeConfig ¶
func InitializeConfig(cfg interface{}, project string, envFileAction EnvFileAction) error
func InitializeConfigViper ¶ added in v0.1.9
func InitializeConfigYaml ¶ added in v0.1.8
InitializeConfig initializes a config struct by getting the secrets from GCP Secret Manager
This function works by reflecting on the fields in the passed pointer struct, and then dispatching calls to get the secret payloads from GCP for the corresponding secrets. The function must be passed a pointer to an arbitrary config struct, and the config struct must only have string fields.
Types ¶
type EnvFileAction ¶ added in v0.1.6
type EnvFileAction string
const ( PRIORITIZE EnvFileAction = "prioritize" DISABLE EnvFileAction = "disable" FALLBACK EnvFileAction = "fallback" )
Click to show internal directories.
Click to hide internal directories.