encrypter

package
v14.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KMSBackend = "kms"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypter

type Encrypter interface {
	// EncryptionKey fetches the KMS encryption key for the Tenant Cluster
	// defined by id.
	EncryptionKey(ctx context.Context, id string) (string, error)
	Encrypt(ctx context.Context, key, plaintext string) (string, error)
	IsKeyNotFound(error) bool
}

type Interface

type Interface interface {
	Encrypter
	Resource
}

type Mock

type Mock struct {
	IsError bool
	KeyID   string
	KeyName string
}

func (*Mock) Encrypt

func (m *Mock) Encrypt(ctx context.Context, key, plaintext string) (string, error)

func (*Mock) EncryptionKey

func (m *Mock) EncryptionKey(ctx context.Context, id string) (string, error)

func (*Mock) EnsureCreatedEncryptionKey

func (m *Mock) EnsureCreatedEncryptionKey(context.Context, infrastructurev1alpha3.AWSCluster) error

func (*Mock) EnsureDeletedEncryptionKey

func (m *Mock) EnsureDeletedEncryptionKey(context.Context, infrastructurev1alpha3.AWSCluster) error

func (*Mock) IsKeyNotFound

func (m *Mock) IsKeyNotFound(err error) bool

type Resource

type Resource interface {
	EnsureCreatedEncryptionKey(context.Context, infrastructurev1alpha3.AWSCluster) error
	EnsureDeletedEncryptionKey(context.Context, infrastructurev1alpha3.AWSCluster) error
}

type RoleManager

type RoleManager interface {
	EnsureCreatedAuthorizedIAMRoles(context.Context, infrastructurev1alpha3.AWSCluster) error
	EnsureDeletedAuthorizedIAMRoles(context.Context, infrastructurev1alpha3.AWSCluster) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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