Skip to content

Commit

Permalink
feat: implement list pack registries
Browse files Browse the repository at this point in the history
  • Loading branch information
MGamya committed Dec 17, 2024
1 parent 62d0673 commit 35decf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ func (h *V1Client) GetPackRegistryByName(registryName string) (*models.V1PackReg
return nil, fmt.Errorf("registry '%s' not found", registryName)
}

// ListPackRegistries retries a list of all Pack registries.
func (h *V1Client) ListPackRegistries() ([]*models.V1PackRegistrySummary, error) {
params := clientv1.NewV1RegistriesPackSummaryListParamsWithContext(h.ctx)
resp, err := h.Client.V1RegistriesPackSummaryList(params)
if err != nil {
return nil, err
}
return resp.Payload.Items, nil
}

// ListHelmRegistries retrieves a list of all Helm registries, filtered by scope.
func (h *V1Client) ListHelmRegistries(scope string) ([]*models.V1HelmRegistrySummary, error) {
params := clientv1.NewV1RegistriesHelmSummaryListParamsWithContext(h.ctx).
Expand Down

0 comments on commit 35decf2

Please sign in to comment.