refactor: added function to open secrets store by checking env var

This commit is contained in:
David Allen 2025-03-14 13:28:47 -06:00
parent 48a53f6d5d
commit a1276360fe
Signed by: towk
GPG key ID: 793B2924A49B3A3F
3 changed files with 229 additions and 0 deletions

View file

@ -18,9 +18,11 @@ func NewStaticStore(username, password string) *StaticStore {
func (s *StaticStore) GetSecretByID(secretID string) (string, error) {
return fmt.Sprintf(`{"username":"%s","password":"%s"}`, s.Username, s.Password), nil
}
func (s *StaticStore) StoreSecretByID(secretID, secret string) error {
return nil
}
func (s *StaticStore) ListSecrets() (map[string]string, error) {
return map[string]string{
"static_creds": fmt.Sprintf(`{"username":"%s","password":"%s"}`, s.Username, s.Password),