secretsmanager

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolledSecretMeta

type PolledSecretMeta struct {
	Tags             map[string]string
	CurrentVersionID string
	UpdatedAt        time.Time
}

SecretMeta meta information of a polled secret

type Poller

type Poller struct {
	PolledSecrets Secrets

	Log logr.Logger
	// contains filtered or unexported fields
}

func New

func New(interval time.Duration, errs chan error, getSMClient func(string) (secretsmanageriface.SecretsManagerAPI, error), defaultSearchRole string, logger logr.Logger) (*Poller, error)

New creates a new poller, will send polling or other non critical errors through the errs channel

func (*Poller) GetSecret

func (p *Poller) GetSecret(secretID *string, IAMRole string) (string, string, error)

GetCurrentSecret Returns the secret value for `secretId` with stage `AWSCURRENT` TODO add a test to ensure this is mocked well including the error

func (*Poller) Stop

func (p *Poller) Stop()

type SecretGetter

type SecretGetter interface {
	GetSecret(secretID *string) (string, string, error)
}

type Secrets

type Secrets map[string]PolledSecretMeta

func FilterByTagKey

func FilterByTagKey(secrets Secrets, tagKey string) Secrets

Jump to

Keyboard shortcuts

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