Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement list pack registries #144

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.62.2
hooks:
- id: golangci-lint
entry: golangci-lint run --new-from-rev HEAD --whole-files --fix
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ ERR = echo ${TIME} ${RED}[ ERR ]${CNone} "error:"
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[0m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

##@ Build Targets

generate: ## Generate models
(cd api && ./generate.sh ./)

##@ Static Analysis Targets

check-diff: reviewable ## Execute branch is clean
Expand Down Expand Up @@ -58,7 +63,7 @@ BIN_DIR ?= ./bin
bin-dir:
test -d $(BIN_DIR) || mkdir $(BIN_DIR)

GOLANGCI_VERSION ?= 1.59.1
GOLANGCI_VERSION ?= 1.62.2
.PHONY: golangci-lint
golangci-lint: bin-dir
if ! test -f $(BIN_DIR)/golangci-lint-linux-amd64; then \
Expand Down
3 changes: 0 additions & 3 deletions api/models/v1_iam_roles_anywhere.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions api/models/v1_subnet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions api/spec/palette-apis-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -42593,10 +42593,6 @@
"description": "IamRolesAnywhere specifies the IAM Roles Anywhere configuration for the AWS/EKS cluster",
"type": "object",
"properties": {
"assumeRoleArn": {
"description": "AssumeRoleARN specifies the IAM role ARN to assume",
"type": "string"
},
"profileArn": {
"description": "ProfileARN specifies the IAM profile ARN",
"type": "string"
Expand Down Expand Up @@ -53218,12 +53214,8 @@
"name": {
"type": "string"
},
"networkSecurityGroup": {
"description": "Network security group of the subnet",
"type": "string"
},
"resourceGroup": {
"description": "Resource group associated with a subnet",
"nsgResourceGroup": {
"description": "Resource group associated with a network security group",
"type": "string"
},
"securityGroupName": {
Expand Down
12 changes: 2 additions & 10 deletions api/spec/palette.json
Original file line number Diff line number Diff line change
Expand Up @@ -42610,10 +42610,6 @@
"description": "IamRolesAnywhere specifies the IAM Roles Anywhere configuration for the AWS/EKS cluster",
"type": "object",
"properties": {
"assumeRoleArn": {
"description": "AssumeRoleARN specifies the IAM role ARN to assume",
"type": "string"
},
"profileArn": {
"description": "ProfileARN specifies the IAM profile ARN",
"type": "string"
Expand Down Expand Up @@ -53235,12 +53231,8 @@
"name": {
"type": "string"
},
"networkSecurityGroup": {
"description": "Network security group of the subnet",
"type": "string"
},
"resourceGroup": {
"description": "Resource group associated with a subnet",
"nsgResourceGroup": {
"description": "Resource group associated with a network security group",
"type": "string"
},
"securityGroupName": {
Expand Down
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
Loading