gcpsecretfetch

package module
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 13 Imported by: 0

README

gcp-secret-fetch

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

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 InitializeConfigViper(cfg interface{}, project string, viperP *viper.Viper) (error, []error)

func InitializeConfigYaml added in v0.1.8

func InitializeConfigYaml(cfg interface{}, project string, secret string) error

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.

func UpdateSecrets added in v0.1.5

func UpdateSecrets(project string, secrets map[string]string, disablePrior bool) error

Types

type EnvFileAction added in v0.1.6

type EnvFileAction string
const (
	PRIORITIZE EnvFileAction = "prioritize"
	DISABLE    EnvFileAction = "disable"
	FALLBACK   EnvFileAction = "fallback"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL