retrievesecrets

package module
v0.0.0-...-6124836 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretTypePlaintext = "plaintext"
	SecretTypeJSON      = "json"
)

SecretType enum-like constants:

Variables

This section is empty.

Functions

func RetrieveSecret

func RetrieveSecret(ctx context.Context, secretName, secretType, keyName string) (map[string]string, error)

RetrieveSecret fetches a secret from AWS Secrets Manager and returns a single key-value pair in a map[string]string.

secretName: the name or ARN of the secret you want to retrieve
secretType: either "plaintext" or "json"
keyName:    if secretType is "json", specify the JSON key to extract from the secret

Return:

map[string]string: a single key-value pair
error:             if something goes wrong

Types

This section is empty.

Jump to

Keyboard shortcuts

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