Skip to content

Commit

Permalink
removed unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
havardelnan committed Feb 29, 2024
1 parent 65ef10e commit f06e8c7
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pkg/clients/vaultclient/vaultsecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,6 @@ func GetSecretValue(secretPath string, key string) (string, error) {
return "", nil
}

// Deprecated: Use the VaultClient method instead
func SetSecret(secretPath string, value []byte) (bool, error) {
if len(secretPath) < 1 {
return false, fmt.Errorf("could not set secret, secret path is empty")
}

secret, err := vaultClient.Client.WriteFromBytes(vaultClient.Context, secretPath, value)
if err != nil {
msg := fmt.Sprintf("could not set secret on path: %s", secretPath)
rlog.Error(msg, err)
return false, errors.New(msg)
}

if secret.Data != nil {
return true, nil
}

return false, errors.New("could not set secret")
}

func (vc VaultClient) GetSecret(secretPath string) (map[string]interface{}, error) {
if secretPath == "" {
return nil, errors.New("secret path is nil or empty")
Expand Down

0 comments on commit f06e8c7

Please sign in to comment.