Skip to content

Commit

Permalink
feat(secret_manager): add tags filter for browse secrets (scaleway#2028)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Mar 26, 2024
1 parent a49fad6 commit 26be941
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/secret/v1beta1/secret_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ type BrowseSecretsRequest struct {
Page *int32 `json:"-"`

PageSize *uint32 `json:"-"`

// Tags: filter secrets by tags.
Tags []string `json:"-"`
}

// BrowseSecretsResponse: browse secrets response.
Expand Down Expand Up @@ -1061,6 +1064,7 @@ func (s *API) BrowseSecrets(req *BrowseSecretsRequest, opts ...scw.RequestOption
parameter.AddToQuery(query, "prefix", req.Prefix)
parameter.AddToQuery(query, "page", req.Page)
parameter.AddToQuery(query, "page_size", req.PageSize)
parameter.AddToQuery(query, "tags", req.Tags)

if fmt.Sprint(req.Region) == "" {
return nil, errors.New("field Region cannot be empty in request")
Expand Down

0 comments on commit 26be941

Please sign in to comment.