secret

package
v0.0.0-...-69a3ef4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package secret provides implementations of interfaces to interact with ancillary secrets management services that integrate with pods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportTags

func ExportTags(tags map[string]string) []types.Tag

ExportTags converts a mapping of tag names to values into Secrets Manager tags.

Types

type BasicSecretsManager

type BasicSecretsManager struct {
	// contains filtered or unexported fields
}

BasicSecretsManager provides a cocoa.Vault implementation backed by AWS Secrets Manager.

func NewBasicSecretsManager

func NewBasicSecretsManager(opts BasicSecretsManagerOptions) (*BasicSecretsManager, error)

NewBasicSecretsManager creates a Vault backed by AWS Secrets Manager.

func (*BasicSecretsManager) CreateSecret

func (m *BasicSecretsManager) CreateSecret(ctx context.Context, s cocoa.NamedSecret) (id string, err error)

CreateSecret creates a new secret and adds it to the cache if it is using one. If the secret already exists, it will return the secret ID without modifying the secret value. To update an existing secret, see UpdateValue.

func (*BasicSecretsManager) DeleteSecret

func (m *BasicSecretsManager) DeleteSecret(ctx context.Context, id string) error

DeleteSecret deletes an existing secret and deletes it from the cache if it is using one.

func (*BasicSecretsManager) GetValue

func (m *BasicSecretsManager) GetValue(ctx context.Context, id string) (val string, err error)

GetValue returns an existing secret's decrypted value.

func (*BasicSecretsManager) UpdateValue

func (m *BasicSecretsManager) UpdateValue(ctx context.Context, s cocoa.NamedSecret) error

UpdateValue updates an existing secret's value.

type BasicSecretsManagerClient

type BasicSecretsManagerClient struct {
	awsutil.BaseClient
	// contains filtered or unexported fields
}

BasicSecretsManagerClient provides a cocoa.SecretsManagerClient implementation that wraps the AWS Secrets Manager API. It supports retrying requests using exponential backoff and jitter.

func NewBasicSecretsManagerClient

func NewBasicSecretsManagerClient(ctx context.Context, opts awsutil.ClientOptions) (*BasicSecretsManagerClient, error)

NewBasicSecretsManagerClient creates a new AWS Secrets Manager client from the given options.

func (*BasicSecretsManagerClient) Close

Close cleans up all resources owned by the client.

func (*BasicSecretsManagerClient) CreateSecret

CreateSecret creates a new secret.

func (*BasicSecretsManagerClient) DeleteSecret

DeleteSecret deletes an existing secret.

func (*BasicSecretsManagerClient) DescribeSecret

DescribeSecret gets the metadata information about a secret.

func (*BasicSecretsManagerClient) GetSecretValue

GetSecretValue gets the decrypted value of an existing secret.

func (*BasicSecretsManagerClient) ListSecrets

ListSecrets lists the metadata information for secrets matching the filters.

func (*BasicSecretsManagerClient) TagResource

TagResource tags an existing secret.

func (*BasicSecretsManagerClient) UpdateSecretValue

UpdateSecretValue updates the value of an existing secret.

type BasicSecretsManagerOptions

type BasicSecretsManagerOptions struct {
	Client cocoa.SecretsManagerClient
	Cache  cocoa.SecretCache
}

BasicSecretsManagerOptions are options to create a basic Secrets Manager vault that's optionally backed by a cache.

func NewBasicSecretsManagerOptions

func NewBasicSecretsManagerOptions() *BasicSecretsManagerOptions

NewBasicSecretsManagerOptions returns new uninitialized options to create a basic Secrets Manager vault.

func (*BasicSecretsManagerOptions) SetCache

SetCache sets the cache used to track secrets externally.

func (*BasicSecretsManagerOptions) SetClient

SetClient sets the client that the vault uses to communicate with Secrets Manager.

func (*BasicSecretsManagerOptions) Validate

func (o *BasicSecretsManagerOptions) Validate() error

Validate checks that the required parameters to initialize a Secrets Manager vault are given.

Jump to

Keyboard shortcuts

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