secrets

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAll

func GetAll() (map[string]string, error)

GetAll returns a map of all secrets in the secrets manager. Example: secrets, err := GetAll()

if err != nil {
	log.Fatalf("Error getting secrets: %v", err)
}

for name, value := range secrets {
	fmt.Printf("Secret name: %s, value: %s\n", name, value)
}

func GetSecret

func GetSecret(secretName string) (string, error)

Get returns the value of the secret with the given name. Example: secretName := "dev/secrets/SOME_SECRET_KEY"

secretValue, err := getSecret(secretName)
if err != nil {
	log.Fatalf("Error getting secret: %v", err)
}
fmt.Printf("Secret value: %s\n", secretValue)

func SetEnvironment

func SetEnvironment(functionName, region string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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