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.
Click to show internal directories.
Click to hide internal directories.