Skip to content

Commit

Permalink
BREAKING: API updates.
Browse files Browse the repository at this point in the history
Signed-off-by: Volkan Özçelik <[email protected]>
  • Loading branch information
v0lkan committed Dec 3, 2024
1 parent d89682d commit b63a225
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
// \\ SPIKE: Secure your secrets with SPIFFE.
// \\\\\ Copyright 2024-present SPIKE contributors.
// \\\\\\\ SPDX-License-Identifier: Apache-2.0

package api

import (
"context"

"github.com/spiffe/go-spiffe/v2/workloadapi"

"github.com/spiffe/spike-sdk-go/api/entity/data"
"github.com/spiffe/spike-sdk-go/spiffe"
)
Expand Down Expand Up @@ -50,14 +56,22 @@ func (a *Api) ListPolicies() (*[]data.Policy, error) {
return ListPolicies(a.source)
}

func (a *Api) DeleteSecret(path string, versions []int) error {
func (a *Api) DeleteSecretVersions(path string, versions []int) error {
return DeleteSecret(a.source, path, versions)
}

func (a *Api) GetSecret(path string, version int) (*data.Secret, error) {
func (a *Api) DeleteSecret(path string) error {
return DeleteSecret(a.source, path, []int{})
}

func (a *Api) GetSecretVersioned(path string, version int) (*data.Secret, error) {
return GetSecret(a.source, path, version)
}

func (a *Api) GetSecret(path string) (*data.Secret, error) {
return GetSecret(a.source, path, 0)
}

func (a *Api) ListSecretKeys() (*[]string, error) {
return ListSecretKeys(a.source)
}
Expand Down

0 comments on commit b63a225

Please sign in to comment.