refactor: added func to remove secrets from store

This commit is contained in:
David Allen 2025-03-19 11:10:26 -06:00 committed by David Allen
parent 9e831914df
commit 35cf2222a0
Signed by: towk
GPG key ID: 0430CDBE22619155
3 changed files with 24 additions and 0 deletions

View file

@ -101,6 +101,11 @@ func (l *LocalSecretStore) ListSecrets() (map[string]string, error) {
return secretsCopy, nil
}
// RemoveSecretByID removes the specified secretID stored locally
func (l *LocalSecretStore) RemoveSecretByID(secretID string) {
delete(l.Secrets, secretID)
}
// openStore tries to create or open the LocalSecretStore based on the environment
// variable MASTER_KEY. If not found, it prints an error.
func OpenStore(filename string) (SecretStore, error) {