types

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionBuilder

type EncryptionBuilder interface {
	WithClient(client EncryptionClient) EncryptionBuilder
	Build() error
}

EncryptionBuilder is user API to obtain correctly configured encryption

type EncryptionClient

type EncryptionClient interface {
	// SetEncryptionService should be used only by EncryptionServiceBuilder
	SetEncryptionService(encryption EncryptionService) error
	// EnableEncryption should encrypt all service data
	EnableEncryption() error
	// MigrateEncryption should decrypt all existing data and encrypt it with new encryption service
	MigrateEncryption(newEncryption EncryptionService) error
}

type EncryptionService

type EncryptionService interface {
	Encrypt(plaintext, associatedData string) (string, error)
	Decrypt(ciphertext, associatedData string) (string, error)
	Disable() error
}

type EncryptionServiceBuilder

type EncryptionServiceBuilder interface {
	WithClients(clients []EncryptionClient) EncryptionServiceBuilder
	Build() (EncryptionService, error)
}

Jump to

Keyboard shortcuts

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