From b49b1f761d01691ecbf57984624bce669379a0d8 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Wed, 19 Mar 2025 11:36:29 -0600 Subject: [PATCH] fix: added missing funcs for secret store implementations --- pkg/secrets/localstore.go | 2 ++ pkg/secrets/staticstore.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pkg/secrets/localstore.go b/pkg/secrets/localstore.go index e87a7cc..1ae9b91 100644 --- a/pkg/secrets/localstore.go +++ b/pkg/secrets/localstore.go @@ -103,7 +103,9 @@ func (l *LocalSecretStore) ListSecrets() (map[string]string, error) { // RemoveSecretByID removes the specified secretID stored locally func (l *LocalSecretStore) RemoveSecretByID(secretID string) { + l.mu.RLock() delete(l.Secrets, secretID) + l.mu.RUnlock() } // openStore tries to create or open the LocalSecretStore based on the environment diff --git a/pkg/secrets/staticstore.go b/pkg/secrets/staticstore.go index 85c2d68..405f58b 100644 --- a/pkg/secrets/staticstore.go +++ b/pkg/secrets/staticstore.go @@ -28,3 +28,7 @@ func (s *StaticStore) ListSecrets() (map[string]string, error) { "static_creds": fmt.Sprintf(`{"username":"%s","password":"%s"}`, s.Username, s.Password), }, nil } + +func (s *StaticStore) RemoveSecretByID(secretID string) { + // Nothing to do here, since nothing is being stored +}