Plugins: Refactor kvstore usage in signing keys and angular patterns (#73154)
* Initial refactoring work for plugins kvstore * Replace implementations for keystore and angularstore * Cleanup * add interface check * lint * fix storeKeyGetter not being called in namespacedstore set * Fix tests * Comments * Add tests * Fix invalid cap in ListKeys when store is empty * Update docstrings * Add setLastUpdatedOnDelete * Renamed DefaultStoreKeyGetterFunc, add TestDefaultStoreKeyGetter * Sort imports * PR review: removed last_updated key * PR review: Removed setLastUpdatedOnDelete * Re-added relevant tests * PR review: Removed SingleKeyStore * PR review: Removed custom marshaling support * Renamed marshaler.go to marshal.go * PR review: removed unused interfaces * PR review: Moved marshal into namespacedstore.go * PR review: removed storekeygetter * Removed unused file cachekvstore.go * Renamed NamespacedStore to CacheKvStore * removed todo
This commit is contained in:
@@ -173,10 +173,10 @@ type SignatureCalculator interface {
|
||||
|
||||
type KeyStore interface {
|
||||
Get(ctx context.Context, key string) (string, bool, error)
|
||||
Set(ctx context.Context, key string, value string) error
|
||||
Del(ctx context.Context, key string) error
|
||||
Set(ctx context.Context, key string, value any) error
|
||||
Delete(ctx context.Context, key string) error
|
||||
ListKeys(ctx context.Context) ([]string, error)
|
||||
GetLastUpdated(ctx context.Context) (*time.Time, error)
|
||||
GetLastUpdated(ctx context.Context) (time.Time, error)
|
||||
SetLastUpdated(ctx context.Context) error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user