Skip to content

Commit

Permalink
fix: Implements ListRaw required for export from S3-KMS store (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxBozo authored and nickatsegment committed Oct 18, 2019
1 parent 934dd6a commit 72a39a7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions store/s3storeKMS.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,25 @@ func (s *S3KMSStore) List(service string, includeValues bool) ([]Secret, error)
return secrets, nil
}

func (s *S3KMSStore) ListRaw(service string) ([]RawSecret, error) {

secretList, err := s.List(service, true)
if err != nil {
return []RawSecret{}, err
}

secrets := []RawSecret{}
for _, secret := range secretList {
s := RawSecret{
Key: fmt.Sprintf("/%s/%s", service, secret.Meta.Key),
Value: *secret.Value,
}
secrets = append(secrets, s)
}

return secrets, nil
}

func (s *S3KMSStore) Delete(id SecretId) error {
index, err := s.readLatest(id.Service)
if err != nil {
Expand Down

0 comments on commit 72a39a7

Please sign in to comment.