SecretsManager: Add ability to list all encrypted values (#108512)

* list all encrypted values and count

* separate interfaces

* add time filter to global queries

* fix lint
This commit is contained in:
Dana Axinte
2025-07-28 10:50:24 +01:00
committed by GitHub
parent f969eb0277
commit 2ea77a7c05
26 changed files with 502 additions and 20 deletions
@@ -21,9 +21,20 @@ type EncryptedValue struct {
Updated int64
}
// ListOpts defines pagination options for listing encrypted values.
type ListOpts struct {
Limit int64
Offset int64
}
type EncryptedValueStorage interface {
Create(ctx context.Context, namespace, name string, version int64, encryptedData []byte) (*EncryptedValue, error)
Update(ctx context.Context, namespace, name string, version int64, encryptedData []byte) error
Get(ctx context.Context, namespace, name string, version int64) (*EncryptedValue, error)
Delete(ctx context.Context, namespace, name string, version int64) error
}
type GlobalEncryptedValueStorage interface {
ListAll(ctx context.Context, opts ListOpts, untilTime *int64) ([]*EncryptedValue, error)
CountAll(ctx context.Context, untilTime *int64) (int64, error)
}