secretsmanager

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateSecret

func CreateOrUpdateSecret(client *secretsmanager.SecretsManager, secretName string, secretDesc string, secretValue string) error

CreateOrUpdateSecret creates a new secret or updates an existing one.

func CreateSecret

func CreateSecret(client *secretsmanager.SecretsManager,
	secretName string, secretDesc string, secretValue string) error

CreateSecret creates an input `secretName` with the specified `secretValue`.

func DeleteSecret

func DeleteSecret(client *secretsmanager.SecretsManager, secretName string, forceDelete bool) error

DeleteSecret deletes an input `secretName`. It will attempt to do so forcefully if `forceDelete` is set to true.

func GetSecret

func GetSecret(client *secretsmanager.SecretsManager, secretName string) (string, error)

GetSecret returns the value of an input `secretName`.

func ReplicateSecret

func ReplicateSecret(connection Connection, secretName string, newSecretName string, targetRegions []string) error

ReplicateSecret replicates a secret with the specified `secretName` to multiple target regions.

func UpdateSecret

func UpdateSecret(client *secretsmanager.SecretsManager, secretName string, secretValue string) error

UpdateSecret updates an existing secret

Types

type Connection

type Connection struct {
	Client  *secretsmanager.SecretsManager
	Session *session.Session
	Params  Params
}

Connection contains all of the relevant information to maintain a Secrets Manager connection.

func CreateConnection

func CreateConnection() Connection

CreateConnection creates a connection with Secrets Manager and returns it.

type Params

type Params struct {
	Name        string
	Description string
	Value       string
	Created     time.Time
	Modified    time.Time
}

Params provides parameter options for Secrets Manager.

Jump to

Keyboard shortcuts

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