Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptionConfig ¶
type EncryptionConfig struct {
// ActiveKey is the key used for encrypting new data.
// Must be 32 bytes for AES-256.
ActiveKey []byte
// FallbackKeys is a list of old keys to try when decryption fails.
// This enables zero-downtime key rotation.
FallbackKeys [][]byte
}
EncryptionConfig holds the keys for encryption and decryption.
type Middleware ¶
type Middleware func(ports.StateStore) ports.StateStore
Middleware allows wrapping a StateStore to add behavior.
func NewEncryptionMiddleware ¶
func NewEncryptionMiddleware(config EncryptionConfig) Middleware
NewEncryptionMiddleware creates a middleware that encrypts state using AES-GCM (Envelope Encryption)
func NewPIIMiddleware ¶
func NewPIIMiddleware(patternStrings []string) Middleware
NewPIIMiddleware creates a middleware that masks values of keys matching the patterns.
Click to show internal directories.
Click to hide internal directories.