kms

package
v14.23.1-patch1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsKeyNotFound

func IsKeyNotFound(err error) bool

IsKeyNotFound asserts keyNotFoundError.

func IsKeyScheduledForDeletion

func IsKeyScheduledForDeletion(err error) bool

IsKeyScheduledForDeletion asserts keyScheduledForDeletionError.

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (r *Cache) Get(ctx context.Context, key string) (*kms.DescribeKeyOutput, bool)

func (*Cache) Key

func (r *Cache) Key(ctx context.Context, id string) string

func (*Cache) Set

func (r *Cache) Set(ctx context.Context, key string, val *kms.DescribeKeyOutput)

type Encrypter

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

func NewEncrypter

func NewEncrypter(c *EncrypterConfig) (*Encrypter, error)

func (*Encrypter) Encrypt

func (e *Encrypter) Encrypt(ctx context.Context, key, plaintext string) (string, error)

func (*Encrypter) EncryptionKey

func (e *Encrypter) EncryptionKey(ctx context.Context, id string) (string, error)

func (*Encrypter) EnsureCreatedEncryptionKey

func (e *Encrypter) EnsureCreatedEncryptionKey(ctx context.Context, cr infrastructurev1alpha3.AWSCluster) error

func (*Encrypter) EnsureDeletedEncryptionKey

func (e *Encrypter) EnsureDeletedEncryptionKey(ctx context.Context, cr infrastructurev1alpha3.AWSCluster) error

func (*Encrypter) IsKeyNotFound

func (e *Encrypter) IsKeyNotFound(err error) bool

type EncrypterConfig

type EncrypterConfig struct {
	Logger micrologger.Logger

	InstallationName string
}

type KMSClient

type KMSClient interface {
	Encrypt(*kms.EncryptInput) (*kms.EncryptOutput, error)
}

Jump to

Keyboard shortcuts

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