Documentation ¶
Overview ¶
Package secret provides implementations of interfaces to interact with ancillary secrets management services that integrate with pods.
Index ¶
- func ExportTags(tags map[string]string) []types.Tag
- type BasicSecretsManager
- func (m *BasicSecretsManager) CreateSecret(ctx context.Context, s cocoa.NamedSecret) (id string, err error)
- func (m *BasicSecretsManager) DeleteSecret(ctx context.Context, id string) error
- func (m *BasicSecretsManager) GetValue(ctx context.Context, id string) (val string, err error)
- func (m *BasicSecretsManager) UpdateValue(ctx context.Context, s cocoa.NamedSecret) error
- type BasicSecretsManagerClient
- func (c *BasicSecretsManagerClient) CreateSecret(ctx context.Context, in *secretsmanager.CreateSecretInput) (*secretsmanager.CreateSecretOutput, error)
- func (c *BasicSecretsManagerClient) DeleteSecret(ctx context.Context, in *secretsmanager.DeleteSecretInput) (*secretsmanager.DeleteSecretOutput, error)
- func (c *BasicSecretsManagerClient) DescribeSecret(ctx context.Context, in *secretsmanager.DescribeSecretInput) (*secretsmanager.DescribeSecretOutput, error)
- func (c *BasicSecretsManagerClient) GetSecretValue(ctx context.Context, in *secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
- func (c *BasicSecretsManagerClient) ListSecrets(ctx context.Context, in *secretsmanager.ListSecretsInput) (*secretsmanager.ListSecretsOutput, error)
- func (c *BasicSecretsManagerClient) TagResource(ctx context.Context, in *secretsmanager.TagResourceInput) (*secretsmanager.TagResourceOutput, error)
- func (c *BasicSecretsManagerClient) UpdateSecretValue(ctx context.Context, in *secretsmanager.UpdateSecretInput) (*secretsmanager.UpdateSecretOutput, error)
- type BasicSecretsManagerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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) CreateSecret ¶
func (c *BasicSecretsManagerClient) CreateSecret(ctx context.Context, in *secretsmanager.CreateSecretInput) (*secretsmanager.CreateSecretOutput, error)
CreateSecret creates a new secret.
func (*BasicSecretsManagerClient) DeleteSecret ¶
func (c *BasicSecretsManagerClient) DeleteSecret(ctx context.Context, in *secretsmanager.DeleteSecretInput) (*secretsmanager.DeleteSecretOutput, error)
DeleteSecret deletes an existing secret.
func (*BasicSecretsManagerClient) DescribeSecret ¶
func (c *BasicSecretsManagerClient) DescribeSecret(ctx context.Context, in *secretsmanager.DescribeSecretInput) (*secretsmanager.DescribeSecretOutput, error)
DescribeSecret gets the metadata information about a secret.
func (*BasicSecretsManagerClient) GetSecretValue ¶
func (c *BasicSecretsManagerClient) GetSecretValue(ctx context.Context, in *secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
GetSecretValue gets the decrypted value of an existing secret.
func (*BasicSecretsManagerClient) ListSecrets ¶
func (c *BasicSecretsManagerClient) ListSecrets(ctx context.Context, in *secretsmanager.ListSecretsInput) (*secretsmanager.ListSecretsOutput, error)
ListSecrets lists the metadata information for secrets matching the filters.
func (*BasicSecretsManagerClient) TagResource ¶
func (c *BasicSecretsManagerClient) TagResource(ctx context.Context, in *secretsmanager.TagResourceInput) (*secretsmanager.TagResourceOutput, error)
TagResource tags an existing secret.
func (*BasicSecretsManagerClient) UpdateSecretValue ¶
func (c *BasicSecretsManagerClient) UpdateSecretValue(ctx context.Context, in *secretsmanager.UpdateSecretInput) (*secretsmanager.UpdateSecretOutput, error)
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 ¶
func (o *BasicSecretsManagerOptions) SetCache(sc cocoa.SecretCache) *BasicSecretsManagerOptions
SetCache sets the cache used to track secrets externally.
func (*BasicSecretsManagerOptions) SetClient ¶
func (o *BasicSecretsManagerOptions) SetClient(c cocoa.SecretsManagerClient) *BasicSecretsManagerOptions
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.