Documentation ¶
Index ¶
- type Config
- type Conn
- func (c *Conn) Create(ctx context.Context, name string, value []byte) error
- func (c *Conn) Delete(ctx context.Context, name string) error
- func (c *Conn) Get(ctx context.Context, name string) ([]byte, error)
- func (c *Conn) List(ctx context.Context) (kms.Iter, error)
- func (c *Conn) Status(ctx context.Context) (kms.State, error)
- type Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.22.0
type Config struct { // Addr is the HTTP address of the AWS Secret // Manager. In general, the address has the // following form: // secretsmanager.<region>.amazonaws.com Addr string // Region is the AWS region. Even though the Addr // endpoint contains that information already, this // field is mandatory. Region string // The KMSKeyID is the AWS-KMS key ID specifying the // AWS-KMS key that is used to encrypt (and decrypt) the // values stored at AWS Secrets Manager. KMSKeyID string // Login contains the AWS credentials (access/secret key). Login Credentials }
Config is a structure containing configuration options for connecting to the AWS SecretsManager.
type Conn ¶ added in v0.22.0
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to an AWS SecretsManager.
func Connect ¶ added in v0.22.0
Connect establishes and returns a Conn to a AWS SecretManager using the given config.
func (*Conn) Create ¶ added in v0.22.0
Create stores the given key-value pair at the AWS SecretsManager if and only if it doesn't exists. If such an entry already exists it returns kes.ErrKeyExists.
If the SecretsManager.KMSKeyID is set AWS will use this key ID to encrypt the values. Otherwise, AWS will use the default key ID for encrypting secrets at the AWS SecretsManager.
func (*Conn) Delete ¶ added in v0.22.0
Delete removes the key-value pair from the AWS SecretsManager, if it exists.
func (*Conn) Get ¶ added in v0.22.0
Get returns the value associated with the given key. If no entry for key exists, it returns kes.ErrKeyNotFound.
type Credentials ¶
type Credentials struct { AccessKey string // The AWS access key SecretKey string // The AWS secret key SessionToken string // The AWS session token }
Credentials represents static AWS credentials: access key, secret key and a session token