From 9009bf59c40e4f45db0c9ba59969f91a3562e099 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Thu, 4 Jan 2024 12:15:56 +0100 Subject: [PATCH 1/6] updated pr, dependencies, dockerfile and build (#105) * updated pr, dependencies, dockerfile and build * generated updated radix-api-client * fix linting errors --------- Co-authored-by: Richard Hagen --- .../radix-cost-allocation-api-pr.yml | 61 +++ Dockerfile | 6 - Makefile | 31 +- api/cost/cost_controller.go | 12 +- api/cost/cost_controller_test.go | 5 +- api/internal/utils/response.go | 34 ++ api/report/models/cost_report.go | 2 +- api/report/report_controller.go | 6 +- api/report/report_controller_test.go | 7 +- go.mod | 76 ++-- go.sum | 316 +++++--------- .../client/application/application_client.go | 41 -- .../change_registration_details_parameters.go | 37 +- .../delete_application_parameters.go | 37 +- ...disable_application_alerting_parameters.go | 37 +- .../enable_application_alerting_parameters.go | 37 +- ..._application_alerting_config_parameters.go | 37 +- .../application/get_application_parameters.go | 37 +- .../get_build_secrets_parameters.go | 37 +- .../get_deploy_key_and_secret_parameters.go | 37 +- .../application/get_deployments_parameters.go | 36 +- .../get_private_image_hubs_parameters.go | 37 +- .../is_deploy_key_valid_parameters.go | 37 +- .../modify_registration_details_parameters.go | 37 +- .../regenerate_deploy_key_parameters.go | 37 +- .../regenerate_deploy_key_responses.go | 62 +++ .../restart_application_parameters.go | 37 +- .../start_application_parameters.go | 37 +- .../stop_application_parameters.go | 37 +- ...rigger_pipeline_build_deploy_parameters.go | 37 +- .../trigger_pipeline_build_parameters.go | 37 +- .../trigger_pipeline_deploy_parameters.go | 37 +- .../trigger_pipeline_promote_parameters.go | 37 +- ..._application_alerting_config_parameters.go | 37 +- ...e_build_secrets_secret_value_parameters.go | 37 +- ...vate_image_hubs_secret_value_parameters.go | 37 +- .../component/change_env_var_parameters.go | 37 +- .../client/component/components_parameters.go | 37 +- .../client/component/env_vars_parameters.go | 37 +- .../get_o_auth_pod_log_parameters.go | 37 +- .../client/component/log_parameters.go | 37 +- .../component/replica_log_parameters.go | 37 +- .../component/restart_component_parameters.go | 37 +- ...rt_o_auth_auxiliary_resource_parameters.go | 37 +- .../component/scale_component_parameters.go | 37 +- .../component/start_component_parameters.go | 37 +- .../component/stop_component_parameters.go | 37 +- .../deployment/get_deployment_parameters.go | 37 +- .../change_component_secret_parameters.go | 37 +- .../create_environment_parameters.go | 37 +- .../delete_environment_parameters.go | 37 +- ...disable_environment_alerting_parameters.go | 37 +- .../enable_environment_alerting_parameters.go | 37 +- ...tion_environment_deployments_parameters.go | 36 +- ...re_key_vault_secret_versions_parameters.go | 37 +- ..._environment_alerting_config_parameters.go | 37 +- .../get_environment_events_parameters.go | 37 +- .../get_environment_events_responses.go | 8 +- .../environment/get_environment_parameters.go | 37 +- .../get_environment_summary_parameters.go | 37 +- .../restart_environment_parameters.go | 37 +- .../start_environment_parameters.go | 37 +- .../stop_environment_parameters.go | 37 +- ..._environment_alerting_config_parameters.go | 37 +- .../client/job/copy_batch_parameters.go | 37 +- .../client/job/copy_job_parameters.go | 37 +- .../client/job/delete_batch_parameters.go | 37 +- .../client/job/delete_job_parameters.go | 37 +- .../client/job/get_batch_parameters.go | 37 +- .../client/job/get_batches_parameters.go | 37 +- ...et_job_component_deployments_parameters.go | 37 +- .../client/job/get_job_parameters.go | 37 +- .../client/job/get_job_payload_parameters.go | 37 +- .../client/job/get_jobs_parameters.go | 37 +- .../client/job/job_log_parameters.go | 37 +- .../client/job/restart_batch_parameters.go | 37 +- .../client/job/restart_job_parameters.go | 37 +- .../client/job/stop_batch_parameters.go | 37 +- .../client/job/stop_job_parameters.go | 37 +- .../get_application_job_parameters.go | 37 +- .../get_application_jobs_parameters.go | 37 +- .../get_pipeline_job_step_logs_parameters.go | 37 +- .../get_tekton_pipeline_run_parameters.go | 37 +- ...get_tekton_pipeline_run_task_parameters.go | 37 +- ..._pipeline_run_task_step_logs_parameters.go | 37 +- ...kton_pipeline_run_task_steps_parameters.go | 37 +- ...et_tekton_pipeline_run_tasks_parameters.go | 37 +- .../get_tekton_pipeline_runs_parameters.go | 37 +- .../pipeline_job/pipeline_job_client.go | 41 ++ .../rerun_application_job_parameters.go | 223 ++++++++++ .../rerun_application_job_responses.go | 212 +++++++++ .../stop_application_job_parameters.go | 37 +- .../get_search_applications_parameters.go | 274 ++++++++++++ .../get_search_applications_responses.go | 411 ++++++++++++++++++ .../client/platform/platform_client.go | 41 ++ .../register_application_parameters.go | 37 +- .../search_applications_parameters.go | 37 +- .../platform/show_applications_parameters.go | 37 +- .../generated_client/models/application.go | 62 +++ .../models/application_registration.go | 3 - .../models/application_registration_patch.go | 5 +- .../models/auxiliary_resource_deployment.go | 39 ++ .../generated_client/models/build_secret.go | 48 ++ .../generated_client/models/component.go | 92 ++++ .../models/component_summary.go | 36 ++ .../models/deployment_summary.go | 54 +++ .../deployment_summary_pipeline_job_info.go | 61 +++ .../generated_client/models/dns_alias.go | 164 +++++++ .../models/dns_alias_status.go | 53 +++ .../generated_client/models/event.go | 21 +- .../models/image_hub_secret.go | 48 ++ .../radix_api/generated_client/models/job.go | 41 +- .../generated_client/models/job_summary.go | 44 +- .../models/pipeline_parameters_deploy.go | 5 + .../generated_client/models/pipeline_run.go | 56 +-- .../models/pipeline_run_task.go | 56 +-- .../models/pipeline_run_task_step.go | 56 +-- .../models/replica_summary.go | 4 + .../models/scheduled_job_summary.go | 16 +- .../generated_client/models/secret.go | 145 ++++-- .../models/secret_parameters.go | 89 ++-- .../radix_api/generated_client/models/step.go | 53 ++- .../models/tls_certificate.go | 24 +- radixconfig.yaml | 2 + 124 files changed, 3109 insertions(+), 2921 deletions(-) create mode 100644 api/internal/utils/response.go create mode 100644 models/radix_api/generated_client/client/pipeline_job/rerun_application_job_parameters.go create mode 100644 models/radix_api/generated_client/client/pipeline_job/rerun_application_job_responses.go create mode 100644 models/radix_api/generated_client/client/platform/get_search_applications_parameters.go create mode 100644 models/radix_api/generated_client/client/platform/get_search_applications_responses.go create mode 100644 models/radix_api/generated_client/models/dns_alias.go create mode 100644 models/radix_api/generated_client/models/dns_alias_status.go diff --git a/.github/workflows/radix-cost-allocation-api-pr.yml b/.github/workflows/radix-cost-allocation-api-pr.yml index edf60c4..399f13d 100644 --- a/.github/workflows/radix-cost-allocation-api-pr.yml +++ b/.github/workflows/radix-cost-allocation-api-pr.yml @@ -14,3 +14,64 @@ jobs: env: REF: ${{ github. sha }} run: docker build -t radix-cost-allocation-api:${REF##*/} . + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Install dependencies + run: go mod download + - name: Install GolangCI Lint + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 + + - name: golangci-lint + run: golangci-lint run --timeout=30m --max-same-issues=0 --out-format=github-actions + + test: + name: Unit Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Install dependencies + run: go mod download + - name: Run Tests + run: go test -cover `go list ./...` + + test-swagger: + name: Test Swagger + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: git fetch --no-tags --no-recurse-submodules --depth=1 origin master:master + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Install dependencies + run: go mod download + - name: Install Swagger + run: go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5 + - name: Generate Swagger + run: swagger generate spec -o ./swagger.json --scan-models --exclude-deps --exclude=github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models + - name: Validate no changes + run: diff ./swagger.json ./swaggerui/html/swagger.json + - name: Check breaking changes + if: always() + id: breaking + continue-on-error: true + run: swagger diff --break <(git show master:swaggerui/html/swagger.json) swagger.json > /tmp/swagger_breaking_changes.txt + - name: Add comment + if: failure() && steps.breaking.outcome == 'failure' + uses: mshick/add-pr-comment@v2 + with: + message-id: breaking-comment + preformatted: true + message-path: /tmp/swagger_breaking_changes.txt diff --git a/Dockerfile b/Dockerfile index 5b36da0..f6cfd5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ ENV GO111MODULE=on RUN apk update && \ apk add bash jq alpine-sdk sed gawk git ca-certificates curl mc && \ apk add --no-cache gcc musl-dev -RUN go install honnef.co/go/tools/cmd/staticcheck@2023.1.3 WORKDIR /go/src/github.com/equinor/radix-cost-allocation-api/ @@ -15,11 +14,6 @@ RUN go mod download # copy api code COPY . . -# lint and unit tests -RUN staticcheck ./... && \ - go vet ./... && \ - CGO_ENABLED=0 GOOS=linux go test ./... - # Build radix cost allocation API go project RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o /usr/local/bin/radix-cost-allocation-api diff --git a/Makefile b/Makefile index 9728efb..ca929fb 100644 --- a/Makefile +++ b/Makefile @@ -6,22 +6,39 @@ build: $(BINS) test: go test -cover ./... +.PHONY: lint +lint: bootstrap + golangci-lint run --max-same-issues 0 + .PHONY: generate-radix-api-client -generate-radix-api-client: +generate-radix-api-client: bootstrap swagger generate client -t ./models/radix_api/generated_client -f https://api.radix.equinor.com/swaggerui/swagger.json -A radixapi # This make command is only needed for local testing now # we also do make swagger inside Dockerfile .PHONY: swagger -swagger: - rm -f ./swaggerui/html/swagger.json - swagger generate spec -o ./swagger.json --scan-models --exclude-deps --exclude=github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models - swagger validate ./swagger.json && \ - mv swagger.json ./swaggerui/html/swagger.json +swagger: bootstrap + swagger generate spec -o ./swaggerui/html/swagger.json --scan-models --exclude-deps --exclude=github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models + swagger validate ./swaggerui/html/swagger.json .PHONY: mocks -mocks: +mocks: bootstrap mockgen -source ./repository/repository.go -destination ./repository/mock/repository_mock.go -package mock mockgen -source ./models/radix_api/client.go -destination ./api/test/mock/radix_api_client_mock.go -package mock mockgen -source ./api/utils/auth/auth_provider.go -destination ./api/test/mock/auth_provider_mock.go -package mock mockgen -source ./service/costservice.go -destination ./service/mock/costservice.go -package mock + +HAS_SWAGGER := $(shell command -v swagger;) +HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;) +HAS_MOCKGEN := $(shell command -v mockgen;) + +bootstrap: +ifndef HAS_SWAGGER + go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5 +endif +ifndef HAS_GOLANGCI_LINT + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 +endif +ifndef HAS_MOCKGEN + go install github.com/golang/mock/mockgen@v1.6.0 +endif diff --git a/api/cost/cost_controller.go b/api/cost/cost_controller.go index f79d2a2..20faa7e 100644 --- a/api/cost/cost_controller.go +++ b/api/cost/cost_controller.go @@ -7,8 +7,8 @@ import ( "time" "github.com/equinor/radix-common/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/equinor/radix-common/utils" + internalutils "github.com/equinor/radix-cost-allocation-api/api/internal/utils" "github.com/equinor/radix-cost-allocation-api/models/radix_api" "github.com/equinor/radix-cost-allocation-api/service" "github.com/gorilla/mux" @@ -176,18 +176,18 @@ func (costController *costController) getFutureCost(accounts models.Accounts, w if err != nil { log.Errorf("failed to get future cost. Error: %v", err) - radixhttp.ErrorResponseForServer(w, r, fmt.Errorf("failed to get future cost")) + internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get future cost")) return } - radixhttp.JSONResponse(w, r, &cost) + internalutils.JSONResponse(w, r, &cost) } func (costController *costController) getTotalCosts(accounts models.Accounts, w http.ResponseWriter, r *http.Request, appName *string) { fromTime, toTime, err := getCostPeriod(r) if err != nil { log.Errorf("failed to get total cost period. Error: %v", err) - radixhttp.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost period")) + internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost period")) return } @@ -195,11 +195,11 @@ func (costController *costController) getTotalCosts(accounts models.Accounts, w cost, err := handler.GetTotalCost(fromTime, toTime, appName) if err != nil { log.Errorf("failed to get total cost. Error: %v", err) - radixhttp.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost")) + internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost")) return } - radixhttp.JSONResponse(w, r, cost) + internalutils.JSONResponse(w, r, cost) } func getCostPeriod(r *http.Request) (*time.Time, *time.Time, error) { diff --git a/api/cost/cost_controller_test.go b/api/cost/cost_controller_test.go index 6b28fe4..37cee97 100644 --- a/api/cost/cost_controller_test.go +++ b/api/cost/cost_controller_test.go @@ -40,7 +40,7 @@ type controllerTestSuite struct { } func (s *controllerTestSuite) SetupTest() { - os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") + _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") s.env = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) @@ -107,7 +107,8 @@ func (s *controllerTestSuite) Test_TotalCost_ApplicationExist() { response := controllerTestUtils.ExecuteRequest("GET", url) applicationCostSet := models.ApplicationCostSet{} - controllertest.GetResponseBody(response, &applicationCostSet) + err := controllertest.GetResponseBody(response, &applicationCostSet) + s.Require().NoError(err) s.NotNil(applicationCostSet) s.Equal(expected.ApplicationCosts[0], applicationCostSet.ApplicationCosts[0]) } diff --git a/api/internal/utils/response.go b/api/internal/utils/response.go new file mode 100644 index 0000000..1c8e1c7 --- /dev/null +++ b/api/internal/utils/response.go @@ -0,0 +1,34 @@ +package utils + +import ( + "io" + "net/http" + + radixhttp "github.com/equinor/radix-common/net/http" + log "github.com/sirupsen/logrus" +) + +// ErrorResponseForServer Marshals error for server requester +func ErrorResponseForServer(w http.ResponseWriter, r *http.Request, apiError error) { + err := radixhttp.ErrorResponseForServer(w, r, apiError) + if err != nil { + log.Errorf("%s %s: failed to write server response: %v", r.Method, r.URL.Path, err) + } +} + +// JSONResponse Marshals response with header +func JSONResponse(w http.ResponseWriter, r *http.Request, result interface{}) { + err := radixhttp.JSONResponse(w, r, result) + if err != nil { + log.Errorf("%s %s: failed to write response: %v", r.Method, r.URL.Path, err) + } +} + +// ReaderFileResponse writes the content from the reader to the response, +// and sets Content-Disposition=attachment; filename= +func ReaderFileResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, fileName, contentType string) { + err := radixhttp.ReaderFileResponse(w, reader, fileName, contentType) + if err != nil { + log.Errorf("%s %s: failed to write response: %v", r.Method, r.URL.Path, err) + } +} diff --git a/api/report/models/cost_report.go b/api/report/models/cost_report.go index 90ecdfa..9cde0af 100644 --- a/api/report/models/cost_report.go +++ b/api/report/models/cost_report.go @@ -52,7 +52,7 @@ func (cr *CostReport) Create(out io.Writer) error { csvWriter := csv.NewWriter(writer) // Set field seperator to ; csvWriter.Comma = ';' - defer writer.Flush() + defer func() { _ = writer.Flush() }() err := csvWriter.Write(columns) diff --git a/api/report/report_controller.go b/api/report/report_controller.go index c22af68..47cdcc1 100644 --- a/api/report/report_controller.go +++ b/api/report/report_controller.go @@ -7,7 +7,7 @@ import ( "time" "github.com/equinor/radix-common/models" - radixhttp "github.com/equinor/radix-common/net/http" + "github.com/equinor/radix-cost-allocation-api/api/internal/utils" "github.com/equinor/radix-cost-allocation-api/service" log "github.com/sirupsen/logrus" ) @@ -58,10 +58,10 @@ func (rc *reportController) GetCostReport(_ models.Accounts, w http.ResponseWrit err := handler.GetCostReport(&b, fromDate, toDate) if err != nil { log.Errorf("Failed to get report. Error: %v", err) - radixhttp.ErrorResponseForServer(w, r, fmt.Errorf("failed to get report")) + utils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get report")) } - radixhttp.ReaderFileResponse(w, &b, fileName, "text/plain; charset=utf-8") + utils.ReaderFileResponse(w, r, &b, fileName, "text/plain; charset=utf-8") } // from is the first day of the previous month diff --git a/api/report/report_controller_test.go b/api/report/report_controller_test.go index 63a1fe3..f2b26f8 100644 --- a/api/report/report_controller_test.go +++ b/api/report/report_controller_test.go @@ -40,8 +40,8 @@ type controllerTestSuite struct { } func (s *controllerTestSuite) SetupTest() { - os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") - os.Setenv("AD_REPORT_READERS", fmt.Sprintf("{\"groups\": [\"%s\"]}", validADGroup)) + _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") + _ = os.Setenv("AD_REPORT_READERS", fmt.Sprintf("{\"groups\": [\"%s\"]}", validADGroup)) s.env = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) @@ -109,7 +109,8 @@ func (s *controllerTestSuite) TestReportController_AuthorizedUser_CanDownload() response := controllerTestUtils.ExecuteRequest("GET", "/api/v1/report") s.Equal(response.Code, http.StatusOK) returnedReport := bytes.Buffer{} - io.Copy(&returnedReport, response.Body) + _, err := io.Copy(&returnedReport, response.Body) + s.Require().NoError(err) reader := csv.NewReader(&returnedReport) reader.Comma = ';' allContent, err := reader.ReadAll() diff --git a/go.mod b/go.mod index b36bd4d..4e656f3 100644 --- a/go.mod +++ b/go.mod @@ -5,24 +5,24 @@ go 1.21 toolchain go1.21.0 require ( - github.com/coreos/go-oidc/v3 v3.6.0 - github.com/equinor/radix-common v1.5.0 - github.com/go-openapi/errors v0.20.3 - github.com/go-openapi/runtime v0.26.0 - github.com/go-openapi/strfmt v0.21.7 - github.com/go-openapi/swag v0.22.3 - github.com/go-openapi/validate v0.22.1 + github.com/coreos/go-oidc/v3 v3.9.0 + github.com/equinor/radix-common v1.7.1 + github.com/go-openapi/errors v0.21.0 + github.com/go-openapi/runtime v0.26.2 + github.com/go-openapi/strfmt v0.22.0 + github.com/go-openapi/swag v0.22.7 + github.com/go-openapi/validate v0.22.6 github.com/golang/mock v1.6.0 - github.com/gorilla/mux v1.8.0 - github.com/microsoft/go-mssqldb v1.4.0 - github.com/prometheus/client_golang v1.16.0 - github.com/rs/cors v1.9.0 + github.com/gorilla/mux v1.8.1 + github.com/microsoft/go-mssqldb v1.6.0 + github.com/prometheus/client_golang v1.18.0 + github.com/rs/cors v1.10.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 github.com/urfave/negroni/v3 v3.0.0 - gorm.io/driver/sqlserver v1.5.1 - gorm.io/gorm v1.25.2 + gorm.io/driver/sqlserver v1.5.2 + gorm.io/gorm v1.25.5 ) require ( @@ -30,26 +30,29 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/analysis v0.22.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/loads v0.21.5 // indirect + github.com/go-openapi/spec v0.20.13 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.5.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -57,26 +60,27 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - go.mongodb.org/mongo-driver v1.11.3 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/zerolog v1.31.0 // indirect + go.mongodb.org/mongo-driver v1.13.1 // indirect + go.opentelemetry.io/otel v1.17.0 // indirect + go.opentelemetry.io/otel/metric v1.17.0 // indirect + go.opentelemetry.io/otel/trace v1.17.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apimachinery v0.27.6 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + k8s.io/apimachinery v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 01a7bf5..df4aff9 100644 --- a/go.sum +++ b/go.sum @@ -1,133 +1,101 @@ +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0 h1:yfJe15aSwEQ6Oo6J+gdfdulPNoZ3TEhmbhLIoxZcA+U= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0/go.mod h1:Q28U+75mpCaSCDowNEmhIo/rmgdkqmkmzI7N6TGR4UY= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 h1:T028gtTPiYt/RMUfs8nVsAL7FDQrfLlrm/NnRG/zcC4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0/go.mod h1:cw4zVQgBby0Z5f2v0itn6se2dDP17nTjbZFXW5uPyHA= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 h1:HCc0+LpPfpCKs6LGGLAhwBARt9632unrVcI6i8s/8os= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/coreos/go-oidc/v3 v3.6.0 h1:AKVxfYw1Gmkn/w96z0DbT/B/xFnzTd3MkZvWLjF4n/o= -github.com/coreos/go-oidc/v3 v3.6.0/go.mod h1:ZpHUsHBucTUj6WOkrP4E20UPynbLZzhTQ1XKCXkxyPc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/coreos/go-oidc/v3 v3.9.0 h1:0J/ogVOd4y8P0f0xUh8l9t07xRP/d8tccvjHl2dcsSo= +github.com/coreos/go-oidc/v3 v3.9.0/go.mod h1:rTKz2PYwftcrtoCzV5g5kvfJoWcm0Mk8AF8y1iAQro4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/equinor/radix-common v1.5.0 h1:z5hQHlKG2x16/NnV4b9ynf9n5ZageYUewE4MANdA96Y= -github.com/equinor/radix-common v1.5.0/go.mod h1:UZ69U56VFtTxABi5JjGdaqn9Df5ilfTTqzUQ0riofVM= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/equinor/radix-common v1.7.1 h1:kl7Tuo2VEo2WHGm/vkvktrZ9t9S3Nht7Mob3CSIzcJI= +github.com/equinor/radix-common v1.7.1/go.mod h1:M6mhgHtFQ3rnjJnyOuECXiZOh7XQ5xVeHMyCAU+YPzQ= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= -github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= -github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= -github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/go-openapi/analysis v0.22.0 h1:wQ/d07nf78HNj4u+KiSY0sT234IAyePPbMgpUjUJQR0= +github.com/go-openapi/analysis v0.22.0/go.mod h1:acDnkkCI2QxIo8sSIPgmp1wUlRohV7vfGtAIVae73b0= +github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= +github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= +github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= +github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX0Zl0= +github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= +github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= +github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= +github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= +github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= +github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= +github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= @@ -138,41 +106,30 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/microsoft/go-mssqldb v1.1.0/go.mod h1:LzkFdl4z2Ck+Hi+ycGOTbL56VEfgoyA2DvYejrNGbRk= -github.com/microsoft/go-mssqldb v1.4.0 h1:fhRa6Ftf78dtv1Kj4i1YQoK3VUoce4phkBLoaE0NIaQ= -github.com/microsoft/go-mssqldb v1.4.0/go.mod h1:lmWsjHD8XX/Txr0f8ZqgbEZSC+BZjmEQy/Ms+rLrvho= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/microsoft/go-mssqldb v1.6.0 h1:mM3gYdVwEPFrlg/Dvr2DNVEgYFG7L42l+dGc67NNNpc= +github.com/microsoft/go-mssqldb v1.6.0/go.mod h1:00mDtPbeQCRGC1HwOOR5K/gr30P1NcEG0vx6Kbv2aJU= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -183,48 +140,38 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= -github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -232,45 +179,39 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/urfave/negroni/v3 v3.0.0 h1:Vo8CeZfu1lFR9gW8GnAb6dOGCJyijfil9j/jKKc/JhU= github.com/urfave/negroni/v3 v3.0.0/go.mod h1:jWvnX03kcSjDBl/ShB0iHvx5uOs7mAzZXW+JvJ5XYAs= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.3 h1:Ql6K6qYHEzB6xvu4+AU0BoRoqf9vFPcc4o7MUIdPW8Y= -go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= +go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= +go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= +go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= +go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= +go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= +go.opentelemetry.io/otel/sdk v1.17.0 h1:FLN2X66Ke/k5Sg3V623Q7h7nt3cHXaW1FOvKKrW0IpE= +go.opentelemetry.io/otel/sdk v1.17.0/go.mod h1:U87sE0f5vQB7hwUoW98pW5Rz4ZDuCFBZFNUBlSgmDFQ= +go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= +go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -278,46 +219,36 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -325,32 +256,32 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -361,46 +292,39 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/sqlserver v1.5.1 h1:wpyW/pR26U94uaujltiFGXY7fd2Jw5hC9PB1ZF/Y5s4= -gorm.io/driver/sqlserver v1.5.1/go.mod h1:AYHzzte2msKTmYBYsSIq8ZUsznLJwBdkB2wpI+kt0nM= -gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= -k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= -k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +gorm.io/driver/sqlserver v1.5.2 h1:+o4RQ8w1ohPbADhFqDxeeZnSWjwOcBnxBckjTbcP4wk= +gorm.io/driver/sqlserver v1.5.2/go.mod h1:gaKF0MO0cfTq9Q3/XhkowSw4g6nIwHPGAs4hzKCmvBo= +gorm.io/gorm v1.25.2-0.20230610234218-206613868439/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/models/radix_api/generated_client/client/application/application_client.go b/models/radix_api/generated_client/client/application/application_client.go index 886ad74..4474959 100644 --- a/models/radix_api/generated_client/client/application/application_client.go +++ b/models/radix_api/generated_client/client/application/application_client.go @@ -58,8 +58,6 @@ type ClientService interface { RegenerateDeployKey(params *RegenerateDeployKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateDeployKeyNoContent, error) - RegenerateMachineUserToken(params *RegenerateMachineUserTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateMachineUserTokenOK, error) - RestartApplication(params *RestartApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RestartApplicationOK, error) StartApplication(params *StartApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StartApplicationOK, error) @@ -629,45 +627,6 @@ func (a *Client) RegenerateDeployKey(params *RegenerateDeployKeyParams, authInfo panic(msg) } -/* -RegenerateMachineUserToken regenerates machine user token -*/ -func (a *Client) RegenerateMachineUserToken(params *RegenerateMachineUserTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateMachineUserTokenOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegenerateMachineUserTokenParams() - } - op := &runtime.ClientOperation{ - ID: "regenerateMachineUserToken", - Method: "POST", - PathPattern: "/applications/{appName}/regenerate-machine-user-token", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &RegenerateMachineUserTokenReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*RegenerateMachineUserTokenOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for regenerateMachineUserToken: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* RestartApplication restarts all components in all environments of the application stops all running components in all environments of the application pulls new images from image hub in radix configuration starts all components in all environments of the application again using up to date image */ diff --git a/models/radix_api/generated_client/client/application/change_registration_details_parameters.go b/models/radix_api/generated_client/client/application/change_registration_details_parameters.go index 0d7da64..886e926 100644 --- a/models/radix_api/generated_client/client/application/change_registration_details_parameters.go +++ b/models/radix_api/generated_client/client/application/change_registration_details_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type ChangeRegistrationDetailsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *ChangeRegistrationDetailsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the change registration details params -func (o *ChangeRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup []string) *ChangeRegistrationDetailsParams { +func (o *ChangeRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup *string) *ChangeRegistrationDetailsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change registration details params -func (o *ChangeRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *ChangeRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *ChangeRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamChangeRegistrationDetails binds the parameter Impersonate-Group -func (o *ChangeRegistrationDetailsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/delete_application_parameters.go b/models/radix_api/generated_client/client/application/delete_application_parameters.go index 5c68451..3cf19f5 100644 --- a/models/radix_api/generated_client/client/application/delete_application_parameters.go +++ b/models/radix_api/generated_client/client/application/delete_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteApplicationParams creates a new DeleteApplicationParams object, @@ -64,9 +63,9 @@ type DeleteApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *DeleteApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete application params -func (o *DeleteApplicationParams) WithImpersonateGroup(impersonateGroup []string) *DeleteApplicationParams { +func (o *DeleteApplicationParams) WithImpersonateGroup(impersonateGroup *string) *DeleteApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete application params -func (o *DeleteApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *DeleteApplicationParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *DeleteApplicationParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamDeleteApplication binds the parameter Impersonate-Group -func (o *DeleteApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/disable_application_alerting_parameters.go b/models/radix_api/generated_client/client/application/disable_application_alerting_parameters.go index b75b13b..540ec0a 100644 --- a/models/radix_api/generated_client/client/application/disable_application_alerting_parameters.go +++ b/models/radix_api/generated_client/client/application/disable_application_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDisableApplicationAlertingParams creates a new DisableApplicationAlertingParams object, @@ -64,9 +63,9 @@ type DisableApplicationAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *DisableApplicationAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the disable application alerting params -func (o *DisableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup []string) *DisableApplicationAlertingParams { +func (o *DisableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup *string) *DisableApplicationAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the disable application alerting params -func (o *DisableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DisableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *DisableApplicationAlertingParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *DisableApplicationAlertingParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamDisableApplicationAlerting binds the parameter Impersonate-Group -func (o *DisableApplicationAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/enable_application_alerting_parameters.go b/models/radix_api/generated_client/client/application/enable_application_alerting_parameters.go index c47b8d8..8a7fdb3 100644 --- a/models/radix_api/generated_client/client/application/enable_application_alerting_parameters.go +++ b/models/radix_api/generated_client/client/application/enable_application_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnableApplicationAlertingParams creates a new EnableApplicationAlertingParams object, @@ -64,9 +63,9 @@ type EnableApplicationAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *EnableApplicationAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the enable application alerting params -func (o *EnableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup []string) *EnableApplicationAlertingParams { +func (o *EnableApplicationAlertingParams) WithImpersonateGroup(impersonateGroup *string) *EnableApplicationAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the enable application alerting params -func (o *EnableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnableApplicationAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *EnableApplicationAlertingParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *EnableApplicationAlertingParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamEnableApplicationAlerting binds the parameter Impersonate-Group -func (o *EnableApplicationAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_application_alerting_config_parameters.go b/models/radix_api/generated_client/client/application/get_application_alerting_config_parameters.go index 918cc7d..744e03d 100644 --- a/models/radix_api/generated_client/client/application/get_application_alerting_config_parameters.go +++ b/models/radix_api/generated_client/client/application/get_application_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationAlertingConfigParams creates a new GetApplicationAlertingConfigParams object, @@ -64,9 +63,9 @@ type GetApplicationAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationAlertingConfigParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get application alerting config params -func (o *GetApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationAlertingConfigParams { +func (o *GetApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application alerting config params -func (o *GetApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientRequ if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientRequ } return nil } - -// bindParamGetApplicationAlertingConfig binds the parameter Impersonate-Group -func (o *GetApplicationAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_application_parameters.go b/models/radix_api/generated_client/client/application/get_application_parameters.go index 9f976b1..265ea80 100644 --- a/models/radix_api/generated_client/client/application/get_application_parameters.go +++ b/models/radix_api/generated_client/client/application/get_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationParams creates a new GetApplicationParams object, @@ -64,9 +63,9 @@ type GetApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application params -func (o *GetApplicationParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationParams { +func (o *GetApplicationParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application params -func (o *GetApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetApplication binds the parameter Impersonate-Group -func (o *GetApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_build_secrets_parameters.go b/models/radix_api/generated_client/client/application/get_build_secrets_parameters.go index 4a64753..8ead512 100644 --- a/models/radix_api/generated_client/client/application/get_build_secrets_parameters.go +++ b/models/radix_api/generated_client/client/application/get_build_secrets_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBuildSecretsParams creates a new GetBuildSecretsParams object, @@ -64,9 +63,9 @@ type GetBuildSecretsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetBuildSecretsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get build secrets params -func (o *GetBuildSecretsParams) WithImpersonateGroup(impersonateGroup []string) *GetBuildSecretsParams { +func (o *GetBuildSecretsParams) WithImpersonateGroup(impersonateGroup *string) *GetBuildSecretsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get build secrets params -func (o *GetBuildSecretsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBuildSecretsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetBuildSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetBuildSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamGetBuildSecrets binds the parameter Impersonate-Group -func (o *GetBuildSecretsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_deploy_key_and_secret_parameters.go b/models/radix_api/generated_client/client/application/get_deploy_key_and_secret_parameters.go index 6e14645..7069fdc 100644 --- a/models/radix_api/generated_client/client/application/get_deploy_key_and_secret_parameters.go +++ b/models/radix_api/generated_client/client/application/get_deploy_key_and_secret_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetDeployKeyAndSecretParams creates a new GetDeployKeyAndSecretParams object, @@ -64,9 +63,9 @@ type GetDeployKeyAndSecretParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetDeployKeyAndSecretParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deploy key and secret params -func (o *GetDeployKeyAndSecretParams) WithImpersonateGroup(impersonateGroup []string) *GetDeployKeyAndSecretParams { +func (o *GetDeployKeyAndSecretParams) WithImpersonateGroup(impersonateGroup *string) *GetDeployKeyAndSecretParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deploy key and secret params -func (o *GetDeployKeyAndSecretParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeployKeyAndSecretParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetDeployKeyAndSecretParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetDeployKeyAndSecretParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetDeployKeyAndSecret binds the parameter Impersonate-Group -func (o *GetDeployKeyAndSecretParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_deployments_parameters.go b/models/radix_api/generated_client/client/application/get_deployments_parameters.go index caefb61..a276d83 100644 --- a/models/radix_api/generated_client/client/application/get_deployments_parameters.go +++ b/models/radix_api/generated_client/client/application/get_deployments_parameters.go @@ -64,9 +64,9 @@ type GetDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +146,13 @@ func (o *GetDeploymentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deployments params -func (o *GetDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetDeploymentsParams { +func (o *GetDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deployments params -func (o *GetDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +210,9 @@ func (o *GetDeploymentsParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -273,20 +268,3 @@ func (o *GetDeploymentsParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetDeployments binds the parameter Impersonate-Group -func (o *GetDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/get_private_image_hubs_parameters.go b/models/radix_api/generated_client/client/application/get_private_image_hubs_parameters.go index f9f5517..45ef53b 100644 --- a/models/radix_api/generated_client/client/application/get_private_image_hubs_parameters.go +++ b/models/radix_api/generated_client/client/application/get_private_image_hubs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetPrivateImageHubsParams creates a new GetPrivateImageHubsParams object, @@ -64,9 +63,9 @@ type GetPrivateImageHubsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetPrivateImageHubsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get private image hubs params -func (o *GetPrivateImageHubsParams) WithImpersonateGroup(impersonateGroup []string) *GetPrivateImageHubsParams { +func (o *GetPrivateImageHubsParams) WithImpersonateGroup(impersonateGroup *string) *GetPrivateImageHubsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get private image hubs params -func (o *GetPrivateImageHubsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetPrivateImageHubsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetPrivateImageHubsParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetPrivateImageHubsParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetPrivateImageHubs binds the parameter Impersonate-Group -func (o *GetPrivateImageHubsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/is_deploy_key_valid_parameters.go b/models/radix_api/generated_client/client/application/is_deploy_key_valid_parameters.go index f6df347..3add5c2 100644 --- a/models/radix_api/generated_client/client/application/is_deploy_key_valid_parameters.go +++ b/models/radix_api/generated_client/client/application/is_deploy_key_valid_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewIsDeployKeyValidParams creates a new IsDeployKeyValidParams object, @@ -64,9 +63,9 @@ type IsDeployKeyValidParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *IsDeployKeyValidParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the is deploy key valid params -func (o *IsDeployKeyValidParams) WithImpersonateGroup(impersonateGroup []string) *IsDeployKeyValidParams { +func (o *IsDeployKeyValidParams) WithImpersonateGroup(impersonateGroup *string) *IsDeployKeyValidParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the is deploy key valid params -func (o *IsDeployKeyValidParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *IsDeployKeyValidParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *IsDeployKeyValidParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *IsDeployKeyValidParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamIsDeployKeyValid binds the parameter Impersonate-Group -func (o *IsDeployKeyValidParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/modify_registration_details_parameters.go b/models/radix_api/generated_client/client/application/modify_registration_details_parameters.go index d4a9c42..53ad45c 100644 --- a/models/radix_api/generated_client/client/application/modify_registration_details_parameters.go +++ b/models/radix_api/generated_client/client/application/modify_registration_details_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type ModifyRegistrationDetailsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *ModifyRegistrationDetailsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the modify registration details params -func (o *ModifyRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup []string) *ModifyRegistrationDetailsParams { +func (o *ModifyRegistrationDetailsParams) WithImpersonateGroup(impersonateGroup *string) *ModifyRegistrationDetailsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the modify registration details params -func (o *ModifyRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ModifyRegistrationDetailsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *ModifyRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *ModifyRegistrationDetailsParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamModifyRegistrationDetails binds the parameter Impersonate-Group -func (o *ModifyRegistrationDetailsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/regenerate_deploy_key_parameters.go b/models/radix_api/generated_client/client/application/regenerate_deploy_key_parameters.go index 78e9125..bce0a6c 100644 --- a/models/radix_api/generated_client/client/application/regenerate_deploy_key_parameters.go +++ b/models/radix_api/generated_client/client/application/regenerate_deploy_key_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type RegenerateDeployKeyParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *RegenerateDeployKeyParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the regenerate deploy key params -func (o *RegenerateDeployKeyParams) WithImpersonateGroup(impersonateGroup []string) *RegenerateDeployKeyParams { +func (o *RegenerateDeployKeyParams) WithImpersonateGroup(impersonateGroup *string) *RegenerateDeployKeyParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the regenerate deploy key params -func (o *RegenerateDeployKeyParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RegenerateDeployKeyParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *RegenerateDeployKeyParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *RegenerateDeployKeyParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamRegenerateDeployKey binds the parameter Impersonate-Group -func (o *RegenerateDeployKeyParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/regenerate_deploy_key_responses.go b/models/radix_api/generated_client/client/application/regenerate_deploy_key_responses.go index b18940b..64dbb88 100644 --- a/models/radix_api/generated_client/client/application/regenerate_deploy_key_responses.go +++ b/models/radix_api/generated_client/client/application/regenerate_deploy_key_responses.go @@ -38,6 +38,12 @@ func (o *RegenerateDeployKeyReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 409: + result := NewRegenerateDeployKeyConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[POST /applications/{appName}/regenerate-deploy-key] regenerateDeployKey", response, response.Code()) } @@ -210,3 +216,59 @@ func (o *RegenerateDeployKeyNotFound) readResponse(response runtime.ClientRespon return nil } + +// NewRegenerateDeployKeyConflict creates a RegenerateDeployKeyConflict with default headers values +func NewRegenerateDeployKeyConflict() *RegenerateDeployKeyConflict { + return &RegenerateDeployKeyConflict{} +} + +/* +RegenerateDeployKeyConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type RegenerateDeployKeyConflict struct { +} + +// IsSuccess returns true when this regenerate deploy key conflict response has a 2xx status code +func (o *RegenerateDeployKeyConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this regenerate deploy key conflict response has a 3xx status code +func (o *RegenerateDeployKeyConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this regenerate deploy key conflict response has a 4xx status code +func (o *RegenerateDeployKeyConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this regenerate deploy key conflict response has a 5xx status code +func (o *RegenerateDeployKeyConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this regenerate deploy key conflict response a status code equal to that given +func (o *RegenerateDeployKeyConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the regenerate deploy key conflict response +func (o *RegenerateDeployKeyConflict) Code() int { + return 409 +} + +func (o *RegenerateDeployKeyConflict) Error() string { + return fmt.Sprintf("[POST /applications/{appName}/regenerate-deploy-key][%d] regenerateDeployKeyConflict ", 409) +} + +func (o *RegenerateDeployKeyConflict) String() string { + return fmt.Sprintf("[POST /applications/{appName}/regenerate-deploy-key][%d] regenerateDeployKeyConflict ", 409) +} + +func (o *RegenerateDeployKeyConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/models/radix_api/generated_client/client/application/restart_application_parameters.go b/models/radix_api/generated_client/client/application/restart_application_parameters.go index cc2f34f..beec4f7 100644 --- a/models/radix_api/generated_client/client/application/restart_application_parameters.go +++ b/models/radix_api/generated_client/client/application/restart_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartApplicationParams creates a new RestartApplicationParams object, @@ -64,9 +63,9 @@ type RestartApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *RestartApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart application params -func (o *RestartApplicationParams) WithImpersonateGroup(impersonateGroup []string) *RestartApplicationParams { +func (o *RestartApplicationParams) WithImpersonateGroup(impersonateGroup *string) *RestartApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart application params -func (o *RestartApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *RestartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *RestartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamRestartApplication binds the parameter Impersonate-Group -func (o *RestartApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/start_application_parameters.go b/models/radix_api/generated_client/client/application/start_application_parameters.go index 4eabe6e..4ab00c6 100644 --- a/models/radix_api/generated_client/client/application/start_application_parameters.go +++ b/models/radix_api/generated_client/client/application/start_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartApplicationParams creates a new StartApplicationParams object, @@ -64,9 +63,9 @@ type StartApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *StartApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start application params -func (o *StartApplicationParams) WithImpersonateGroup(impersonateGroup []string) *StartApplicationParams { +func (o *StartApplicationParams) WithImpersonateGroup(impersonateGroup *string) *StartApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start application params -func (o *StartApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *StartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *StartApplicationParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamStartApplication binds the parameter Impersonate-Group -func (o *StartApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/stop_application_parameters.go b/models/radix_api/generated_client/client/application/stop_application_parameters.go index ef818fc..27311ad 100644 --- a/models/radix_api/generated_client/client/application/stop_application_parameters.go +++ b/models/radix_api/generated_client/client/application/stop_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopApplicationParams creates a new StopApplicationParams object, @@ -64,9 +63,9 @@ type StopApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *StopApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop application params -func (o *StopApplicationParams) WithImpersonateGroup(impersonateGroup []string) *StopApplicationParams { +func (o *StopApplicationParams) WithImpersonateGroup(impersonateGroup *string) *StopApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop application params -func (o *StopApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *StopApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *StopApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamStopApplication binds the parameter Impersonate-Group -func (o *StopApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/trigger_pipeline_build_deploy_parameters.go b/models/radix_api/generated_client/client/application/trigger_pipeline_build_deploy_parameters.go index 9294db6..26c5f73 100644 --- a/models/radix_api/generated_client/client/application/trigger_pipeline_build_deploy_parameters.go +++ b/models/radix_api/generated_client/client/application/trigger_pipeline_build_deploy_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineBuildDeployParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineBuildDeployParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline build deploy params -func (o *TriggerPipelineBuildDeployParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineBuildDeployParams { +func (o *TriggerPipelineBuildDeployParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineBuildDeployParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline build deploy params -func (o *TriggerPipelineBuildDeployParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineBuildDeployParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineBuildDeployParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineBuildDeployParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamTriggerPipelineBuildDeploy binds the parameter Impersonate-Group -func (o *TriggerPipelineBuildDeployParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/trigger_pipeline_build_parameters.go b/models/radix_api/generated_client/client/application/trigger_pipeline_build_parameters.go index aaee9c3..2529a1a 100644 --- a/models/radix_api/generated_client/client/application/trigger_pipeline_build_parameters.go +++ b/models/radix_api/generated_client/client/application/trigger_pipeline_build_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineBuildParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineBuildParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline build params -func (o *TriggerPipelineBuildParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineBuildParams { +func (o *TriggerPipelineBuildParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineBuildParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline build params -func (o *TriggerPipelineBuildParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineBuildParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineBuildParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineBuildParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamTriggerPipelineBuild binds the parameter Impersonate-Group -func (o *TriggerPipelineBuildParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/trigger_pipeline_deploy_parameters.go b/models/radix_api/generated_client/client/application/trigger_pipeline_deploy_parameters.go index 31b4dbf..87605fb 100644 --- a/models/radix_api/generated_client/client/application/trigger_pipeline_deploy_parameters.go +++ b/models/radix_api/generated_client/client/application/trigger_pipeline_deploy_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelineDeployParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelineDeployParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline deploy params -func (o *TriggerPipelineDeployParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelineDeployParams { +func (o *TriggerPipelineDeployParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelineDeployParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline deploy params -func (o *TriggerPipelineDeployParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelineDeployParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelineDeployParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelineDeployParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamTriggerPipelineDeploy binds the parameter Impersonate-Group -func (o *TriggerPipelineDeployParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/trigger_pipeline_promote_parameters.go b/models/radix_api/generated_client/client/application/trigger_pipeline_promote_parameters.go index e43a7e0..3c44db4 100644 --- a/models/radix_api/generated_client/client/application/trigger_pipeline_promote_parameters.go +++ b/models/radix_api/generated_client/client/application/trigger_pipeline_promote_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type TriggerPipelinePromoteParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *TriggerPipelinePromoteParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the trigger pipeline promote params -func (o *TriggerPipelinePromoteParams) WithImpersonateGroup(impersonateGroup []string) *TriggerPipelinePromoteParams { +func (o *TriggerPipelinePromoteParams) WithImpersonateGroup(impersonateGroup *string) *TriggerPipelinePromoteParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the trigger pipeline promote params -func (o *TriggerPipelinePromoteParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *TriggerPipelinePromoteParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *TriggerPipelinePromoteParams) WriteToRequest(r runtime.ClientRequest, r if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *TriggerPipelinePromoteParams) WriteToRequest(r runtime.ClientRequest, r } return nil } - -// bindParamTriggerPipelinePromote binds the parameter Impersonate-Group -func (o *TriggerPipelinePromoteParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/update_application_alerting_config_parameters.go b/models/radix_api/generated_client/client/application/update_application_alerting_config_parameters.go index 579e934..dbbd1ed 100644 --- a/models/radix_api/generated_client/client/application/update_application_alerting_config_parameters.go +++ b/models/radix_api/generated_client/client/application/update_application_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type UpdateApplicationAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -142,13 +141,13 @@ func (o *UpdateApplicationAlertingConfigParams) SetHTTPClient(client *http.Clien } // WithImpersonateGroup adds the impersonateGroup to the update application alerting config params -func (o *UpdateApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *UpdateApplicationAlertingConfigParams { +func (o *UpdateApplicationAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *UpdateApplicationAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update application alerting config params -func (o *UpdateApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateApplicationAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -195,14 +194,9 @@ func (o *UpdateApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientR if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -229,20 +223,3 @@ func (o *UpdateApplicationAlertingConfigParams) WriteToRequest(r runtime.ClientR } return nil } - -// bindParamUpdateApplicationAlertingConfig binds the parameter Impersonate-Group -func (o *UpdateApplicationAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/update_build_secrets_secret_value_parameters.go b/models/radix_api/generated_client/client/application/update_build_secrets_secret_value_parameters.go index 600978d..89d127e 100644 --- a/models/radix_api/generated_client/client/application/update_build_secrets_secret_value_parameters.go +++ b/models/radix_api/generated_client/client/application/update_build_secrets_secret_value_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type UpdateBuildSecretsSecretValueParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdateBuildSecretsSecretValueParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the update build secrets secret value params -func (o *UpdateBuildSecretsSecretValueParams) WithImpersonateGroup(impersonateGroup []string) *UpdateBuildSecretsSecretValueParams { +func (o *UpdateBuildSecretsSecretValueParams) WithImpersonateGroup(impersonateGroup *string) *UpdateBuildSecretsSecretValueParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update build secrets secret value params -func (o *UpdateBuildSecretsSecretValueParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateBuildSecretsSecretValueParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdateBuildSecretsSecretValueParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdateBuildSecretsSecretValueParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamUpdateBuildSecretsSecretValue binds the parameter Impersonate-Group -func (o *UpdateBuildSecretsSecretValueParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/application/update_private_image_hubs_secret_value_parameters.go b/models/radix_api/generated_client/client/application/update_private_image_hubs_secret_value_parameters.go index 0e3533a..9ad2d94 100644 --- a/models/radix_api/generated_client/client/application/update_private_image_hubs_secret_value_parameters.go +++ b/models/radix_api/generated_client/client/application/update_private_image_hubs_secret_value_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type UpdatePrivateImageHubsSecretValueParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdatePrivateImageHubsSecretValueParams) SetHTTPClient(client *http.Cli } // WithImpersonateGroup adds the impersonateGroup to the update private image hubs secret value params -func (o *UpdatePrivateImageHubsSecretValueParams) WithImpersonateGroup(impersonateGroup []string) *UpdatePrivateImageHubsSecretValueParams { +func (o *UpdatePrivateImageHubsSecretValueParams) WithImpersonateGroup(impersonateGroup *string) *UpdatePrivateImageHubsSecretValueParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update private image hubs secret value params -func (o *UpdatePrivateImageHubsSecretValueParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdatePrivateImageHubsSecretValueParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdatePrivateImageHubsSecretValueParams) WriteToRequest(r runtime.Clien if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdatePrivateImageHubsSecretValueParams) WriteToRequest(r runtime.Clien } return nil } - -// bindParamUpdatePrivateImageHubsSecretValue binds the parameter Impersonate-Group -func (o *UpdatePrivateImageHubsSecretValueParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/change_env_var_parameters.go b/models/radix_api/generated_client/client/component/change_env_var_parameters.go index 9025de1..3b5d625 100644 --- a/models/radix_api/generated_client/client/component/change_env_var_parameters.go +++ b/models/radix_api/generated_client/client/component/change_env_var_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -72,9 +71,9 @@ type ChangeEnvVarParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -165,13 +164,13 @@ func (o *ChangeEnvVarParams) SetEnvVarParameter(envVarParameter []*models.EnvVar } // WithImpersonateGroup adds the impersonateGroup to the change env var params -func (o *ChangeEnvVarParams) WithImpersonateGroup(impersonateGroup []string) *ChangeEnvVarParams { +func (o *ChangeEnvVarParams) WithImpersonateGroup(impersonateGroup *string) *ChangeEnvVarParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change env var params -func (o *ChangeEnvVarParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeEnvVarParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -234,14 +233,9 @@ func (o *ChangeEnvVarParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -273,20 +267,3 @@ func (o *ChangeEnvVarParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } return nil } - -// bindParamChangeEnvVar binds the parameter Impersonate-Group -func (o *ChangeEnvVarParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/components_parameters.go b/models/radix_api/generated_client/client/component/components_parameters.go index 28e8fa3..2cf8567 100644 --- a/models/radix_api/generated_client/client/component/components_parameters.go +++ b/models/radix_api/generated_client/client/component/components_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewComponentsParams creates a new ComponentsParams object, @@ -64,9 +63,9 @@ type ComponentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *ComponentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the components params -func (o *ComponentsParams) WithImpersonateGroup(impersonateGroup []string) *ComponentsParams { +func (o *ComponentsParams) WithImpersonateGroup(impersonateGroup *string) *ComponentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the components params -func (o *ComponentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ComponentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *ComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *ComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamComponents binds the parameter Impersonate-Group -func (o *ComponentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/env_vars_parameters.go b/models/radix_api/generated_client/client/component/env_vars_parameters.go index 1a3c90e..cee6738 100644 --- a/models/radix_api/generated_client/client/component/env_vars_parameters.go +++ b/models/radix_api/generated_client/client/component/env_vars_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnvVarsParams creates a new EnvVarsParams object, @@ -64,9 +63,9 @@ type EnvVarsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *EnvVarsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the env vars params -func (o *EnvVarsParams) WithImpersonateGroup(impersonateGroup []string) *EnvVarsParams { +func (o *EnvVarsParams) WithImpersonateGroup(impersonateGroup *string) *EnvVarsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the env vars params -func (o *EnvVarsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnvVarsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *EnvVarsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *EnvVarsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamEnvVars binds the parameter Impersonate-Group -func (o *EnvVarsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/get_o_auth_pod_log_parameters.go b/models/radix_api/generated_client/client/component/get_o_auth_pod_log_parameters.go index 13182ff..855db8c 100644 --- a/models/radix_api/generated_client/client/component/get_o_auth_pod_log_parameters.go +++ b/models/radix_api/generated_client/client/component/get_o_auth_pod_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetOAuthPodLogParams creates a new GetOAuthPodLogParams object, @@ -64,9 +63,9 @@ type GetOAuthPodLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -176,13 +175,13 @@ func (o *GetOAuthPodLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get o auth pod log params -func (o *GetOAuthPodLogParams) WithImpersonateGroup(impersonateGroup []string) *GetOAuthPodLogParams { +func (o *GetOAuthPodLogParams) WithImpersonateGroup(impersonateGroup *string) *GetOAuthPodLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get o auth pod log params -func (o *GetOAuthPodLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetOAuthPodLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -284,14 +283,9 @@ func (o *GetOAuthPodLogParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -379,20 +373,3 @@ func (o *GetOAuthPodLogParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetOAuthPodLog binds the parameter Impersonate-Group -func (o *GetOAuthPodLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/log_parameters.go b/models/radix_api/generated_client/client/component/log_parameters.go index 13038ff..3e3fd0c 100644 --- a/models/radix_api/generated_client/client/component/log_parameters.go +++ b/models/radix_api/generated_client/client/component/log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewLogParams creates a new LogParams object, @@ -64,9 +63,9 @@ type LogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -184,13 +183,13 @@ func (o *LogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the log params -func (o *LogParams) WithImpersonateGroup(impersonateGroup []string) *LogParams { +func (o *LogParams) WithImpersonateGroup(impersonateGroup *string) *LogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the log params -func (o *LogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *LogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -303,14 +302,9 @@ func (o *LogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -415,20 +409,3 @@ func (o *LogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) } return nil } - -// bindParamLog binds the parameter Impersonate-Group -func (o *LogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/replica_log_parameters.go b/models/radix_api/generated_client/client/component/replica_log_parameters.go index 2610431..7df0354 100644 --- a/models/radix_api/generated_client/client/component/replica_log_parameters.go +++ b/models/radix_api/generated_client/client/component/replica_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewReplicaLogParams creates a new ReplicaLogParams object, @@ -64,9 +63,9 @@ type ReplicaLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -184,13 +183,13 @@ func (o *ReplicaLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the replica log params -func (o *ReplicaLogParams) WithImpersonateGroup(impersonateGroup []string) *ReplicaLogParams { +func (o *ReplicaLogParams) WithImpersonateGroup(impersonateGroup *string) *ReplicaLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the replica log params -func (o *ReplicaLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ReplicaLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -303,14 +302,9 @@ func (o *ReplicaLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -415,20 +409,3 @@ func (o *ReplicaLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamReplicaLog binds the parameter Impersonate-Group -func (o *ReplicaLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/restart_component_parameters.go b/models/radix_api/generated_client/client/component/restart_component_parameters.go index 239125f..db236aa 100644 --- a/models/radix_api/generated_client/client/component/restart_component_parameters.go +++ b/models/radix_api/generated_client/client/component/restart_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartComponentParams creates a new RestartComponentParams object, @@ -64,9 +63,9 @@ type RestartComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *RestartComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart component params -func (o *RestartComponentParams) WithImpersonateGroup(impersonateGroup []string) *RestartComponentParams { +func (o *RestartComponentParams) WithImpersonateGroup(impersonateGroup *string) *RestartComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart component params -func (o *RestartComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *RestartComponentParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *RestartComponentParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamRestartComponent binds the parameter Impersonate-Group -func (o *RestartComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/restart_o_auth_auxiliary_resource_parameters.go b/models/radix_api/generated_client/client/component/restart_o_auth_auxiliary_resource_parameters.go index c99d5d0..2372841 100644 --- a/models/radix_api/generated_client/client/component/restart_o_auth_auxiliary_resource_parameters.go +++ b/models/radix_api/generated_client/client/component/restart_o_auth_auxiliary_resource_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartOAuthAuxiliaryResourceParams creates a new RestartOAuthAuxiliaryResourceParams object, @@ -64,9 +63,9 @@ type RestartOAuthAuxiliaryResourceParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *RestartOAuthAuxiliaryResourceParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the restart o auth auxiliary resource params -func (o *RestartOAuthAuxiliaryResourceParams) WithImpersonateGroup(impersonateGroup []string) *RestartOAuthAuxiliaryResourceParams { +func (o *RestartOAuthAuxiliaryResourceParams) WithImpersonateGroup(impersonateGroup *string) *RestartOAuthAuxiliaryResourceParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart o auth auxiliary resource params -func (o *RestartOAuthAuxiliaryResourceParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartOAuthAuxiliaryResourceParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *RestartOAuthAuxiliaryResourceParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *RestartOAuthAuxiliaryResourceParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamRestartOAuthAuxiliaryResource binds the parameter Impersonate-Group -func (o *RestartOAuthAuxiliaryResourceParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/scale_component_parameters.go b/models/radix_api/generated_client/client/component/scale_component_parameters.go index bdc42b5..1cfc18a 100644 --- a/models/radix_api/generated_client/client/component/scale_component_parameters.go +++ b/models/radix_api/generated_client/client/component/scale_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewScaleComponentParams creates a new ScaleComponentParams object, @@ -64,9 +63,9 @@ type ScaleComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *ScaleComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the scale component params -func (o *ScaleComponentParams) WithImpersonateGroup(impersonateGroup []string) *ScaleComponentParams { +func (o *ScaleComponentParams) WithImpersonateGroup(impersonateGroup *string) *ScaleComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the scale component params -func (o *ScaleComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ScaleComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *ScaleComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *ScaleComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamScaleComponent binds the parameter Impersonate-Group -func (o *ScaleComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/start_component_parameters.go b/models/radix_api/generated_client/client/component/start_component_parameters.go index 87388ba..7f16f69 100644 --- a/models/radix_api/generated_client/client/component/start_component_parameters.go +++ b/models/radix_api/generated_client/client/component/start_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartComponentParams creates a new StartComponentParams object, @@ -64,9 +63,9 @@ type StartComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *StartComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start component params -func (o *StartComponentParams) WithImpersonateGroup(impersonateGroup []string) *StartComponentParams { +func (o *StartComponentParams) WithImpersonateGroup(impersonateGroup *string) *StartComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start component params -func (o *StartComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *StartComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *StartComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamStartComponent binds the parameter Impersonate-Group -func (o *StartComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/component/stop_component_parameters.go b/models/radix_api/generated_client/client/component/stop_component_parameters.go index 8c19062..185c705 100644 --- a/models/radix_api/generated_client/client/component/stop_component_parameters.go +++ b/models/radix_api/generated_client/client/component/stop_component_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopComponentParams creates a new StopComponentParams object, @@ -64,9 +63,9 @@ type StopComponentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *StopComponentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop component params -func (o *StopComponentParams) WithImpersonateGroup(impersonateGroup []string) *StopComponentParams { +func (o *StopComponentParams) WithImpersonateGroup(impersonateGroup *string) *StopComponentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop component params -func (o *StopComponentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopComponentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *StopComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *StopComponentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamStopComponent binds the parameter Impersonate-Group -func (o *StopComponentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/deployment/get_deployment_parameters.go b/models/radix_api/generated_client/client/deployment/get_deployment_parameters.go index 0697525..29424b4 100644 --- a/models/radix_api/generated_client/client/deployment/get_deployment_parameters.go +++ b/models/radix_api/generated_client/client/deployment/get_deployment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetDeploymentParams creates a new GetDeploymentParams object, @@ -64,9 +63,9 @@ type GetDeploymentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetDeploymentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get deployment params -func (o *GetDeploymentParams) WithImpersonateGroup(impersonateGroup []string) *GetDeploymentParams { +func (o *GetDeploymentParams) WithImpersonateGroup(impersonateGroup *string) *GetDeploymentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get deployment params -func (o *GetDeploymentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetDeploymentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamGetDeployment binds the parameter Impersonate-Group -func (o *GetDeploymentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/change_component_secret_parameters.go b/models/radix_api/generated_client/client/environment/change_component_secret_parameters.go index 4ad4891..ef62f45 100644 --- a/models/radix_api/generated_client/client/environment/change_component_secret_parameters.go +++ b/models/radix_api/generated_client/client/environment/change_component_secret_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type ChangeComponentSecretParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *ChangeComponentSecretParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the change component secret params -func (o *ChangeComponentSecretParams) WithImpersonateGroup(impersonateGroup []string) *ChangeComponentSecretParams { +func (o *ChangeComponentSecretParams) WithImpersonateGroup(impersonateGroup *string) *ChangeComponentSecretParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the change component secret params -func (o *ChangeComponentSecretParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ChangeComponentSecretParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *ChangeComponentSecretParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *ChangeComponentSecretParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamChangeComponentSecret binds the parameter Impersonate-Group -func (o *ChangeComponentSecretParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/create_environment_parameters.go b/models/radix_api/generated_client/client/environment/create_environment_parameters.go index e9c6ca2..daecba2 100644 --- a/models/radix_api/generated_client/client/environment/create_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/create_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewCreateEnvironmentParams creates a new CreateEnvironmentParams object, @@ -64,9 +63,9 @@ type CreateEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *CreateEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the create environment params -func (o *CreateEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *CreateEnvironmentParams { +func (o *CreateEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *CreateEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the create environment params -func (o *CreateEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CreateEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *CreateEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *CreateEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamCreateEnvironment binds the parameter Impersonate-Group -func (o *CreateEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/delete_environment_parameters.go b/models/radix_api/generated_client/client/environment/delete_environment_parameters.go index 015e652..0b5822d 100644 --- a/models/radix_api/generated_client/client/environment/delete_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/delete_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteEnvironmentParams creates a new DeleteEnvironmentParams object, @@ -64,9 +63,9 @@ type DeleteEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *DeleteEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete environment params -func (o *DeleteEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *DeleteEnvironmentParams { +func (o *DeleteEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *DeleteEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete environment params -func (o *DeleteEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *DeleteEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *DeleteEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamDeleteEnvironment binds the parameter Impersonate-Group -func (o *DeleteEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/disable_environment_alerting_parameters.go b/models/radix_api/generated_client/client/environment/disable_environment_alerting_parameters.go index 3a75962..5c3225b 100644 --- a/models/radix_api/generated_client/client/environment/disable_environment_alerting_parameters.go +++ b/models/radix_api/generated_client/client/environment/disable_environment_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDisableEnvironmentAlertingParams creates a new DisableEnvironmentAlertingParams object, @@ -64,9 +63,9 @@ type DisableEnvironmentAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *DisableEnvironmentAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the disable environment alerting params -func (o *DisableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup []string) *DisableEnvironmentAlertingParams { +func (o *DisableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup *string) *DisableEnvironmentAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the disable environment alerting params -func (o *DisableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DisableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *DisableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *DisableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamDisableEnvironmentAlerting binds the parameter Impersonate-Group -func (o *DisableEnvironmentAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/enable_environment_alerting_parameters.go b/models/radix_api/generated_client/client/environment/enable_environment_alerting_parameters.go index 0ff9323..42e0664 100644 --- a/models/radix_api/generated_client/client/environment/enable_environment_alerting_parameters.go +++ b/models/radix_api/generated_client/client/environment/enable_environment_alerting_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewEnableEnvironmentAlertingParams creates a new EnableEnvironmentAlertingParams object, @@ -64,9 +63,9 @@ type EnableEnvironmentAlertingParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *EnableEnvironmentAlertingParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the enable environment alerting params -func (o *EnableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup []string) *EnableEnvironmentAlertingParams { +func (o *EnableEnvironmentAlertingParams) WithImpersonateGroup(impersonateGroup *string) *EnableEnvironmentAlertingParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the enable environment alerting params -func (o *EnableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *EnableEnvironmentAlertingParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *EnableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *EnableEnvironmentAlertingParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamEnableEnvironmentAlerting binds the parameter Impersonate-Group -func (o *EnableEnvironmentAlertingParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_application_environment_deployments_parameters.go b/models/radix_api/generated_client/client/environment/get_application_environment_deployments_parameters.go index 4585d6c..3764a0a 100644 --- a/models/radix_api/generated_client/client/environment/get_application_environment_deployments_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_application_environment_deployments_parameters.go @@ -64,9 +64,9 @@ type GetApplicationEnvironmentDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +146,13 @@ func (o *GetApplicationEnvironmentDeploymentsParams) SetHTTPClient(client *http. } // WithImpersonateGroup adds the impersonateGroup to the get application environment deployments params -func (o *GetApplicationEnvironmentDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationEnvironmentDeploymentsParams { +func (o *GetApplicationEnvironmentDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationEnvironmentDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application environment deployments params -func (o *GetApplicationEnvironmentDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationEnvironmentDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +210,9 @@ func (o *GetApplicationEnvironmentDeploymentsParams) WriteToRequest(r runtime.Cl if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -261,20 +256,3 @@ func (o *GetApplicationEnvironmentDeploymentsParams) WriteToRequest(r runtime.Cl } return nil } - -// bindParamGetApplicationEnvironmentDeployments binds the parameter Impersonate-Group -func (o *GetApplicationEnvironmentDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_azure_key_vault_secret_versions_parameters.go b/models/radix_api/generated_client/client/environment/get_azure_key_vault_secret_versions_parameters.go index 17107be..b1f77ee 100644 --- a/models/radix_api/generated_client/client/environment/get_azure_key_vault_secret_versions_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_azure_key_vault_secret_versions_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetAzureKeyVaultSecretVersionsParams creates a new GetAzureKeyVaultSecretVersionsParams object, @@ -64,9 +63,9 @@ type GetAzureKeyVaultSecretVersionsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -158,13 +157,13 @@ func (o *GetAzureKeyVaultSecretVersionsParams) SetHTTPClient(client *http.Client } // WithImpersonateGroup adds the impersonateGroup to the get azure key vault secret versions params -func (o *GetAzureKeyVaultSecretVersionsParams) WithImpersonateGroup(impersonateGroup []string) *GetAzureKeyVaultSecretVersionsParams { +func (o *GetAzureKeyVaultSecretVersionsParams) WithImpersonateGroup(impersonateGroup *string) *GetAzureKeyVaultSecretVersionsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get azure key vault secret versions params -func (o *GetAzureKeyVaultSecretVersionsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetAzureKeyVaultSecretVersionsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -244,14 +243,9 @@ func (o *GetAzureKeyVaultSecretVersionsParams) WriteToRequest(r runtime.ClientRe if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -305,20 +299,3 @@ func (o *GetAzureKeyVaultSecretVersionsParams) WriteToRequest(r runtime.ClientRe } return nil } - -// bindParamGetAzureKeyVaultSecretVersions binds the parameter Impersonate-Group -func (o *GetAzureKeyVaultSecretVersionsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_environment_alerting_config_parameters.go b/models/radix_api/generated_client/client/environment/get_environment_alerting_config_parameters.go index e36677a..62f399c 100644 --- a/models/radix_api/generated_client/client/environment/get_environment_alerting_config_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_environment_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentAlertingConfigParams creates a new GetEnvironmentAlertingConfigParams object, @@ -64,9 +63,9 @@ type GetEnvironmentAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentAlertingConfigParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get environment alerting config params -func (o *GetEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentAlertingConfigParams { +func (o *GetEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment alerting config params -func (o *GetEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientRequ if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientRequ } return nil } - -// bindParamGetEnvironmentAlertingConfig binds the parameter Impersonate-Group -func (o *GetEnvironmentAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_environment_events_parameters.go b/models/radix_api/generated_client/client/environment/get_environment_events_parameters.go index 50f6f18..3dc9e73 100644 --- a/models/radix_api/generated_client/client/environment/get_environment_events_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_environment_events_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentEventsParams creates a new GetEnvironmentEventsParams object, @@ -64,9 +63,9 @@ type GetEnvironmentEventsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentEventsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment events params -func (o *GetEnvironmentEventsParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentEventsParams { +func (o *GetEnvironmentEventsParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentEventsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment events params -func (o *GetEnvironmentEventsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentEventsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentEventsParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentEventsParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetEnvironmentEvents binds the parameter Impersonate-Group -func (o *GetEnvironmentEventsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_environment_events_responses.go b/models/radix_api/generated_client/client/environment/get_environment_events_responses.go index 1eb9ccb..1185841 100644 --- a/models/radix_api/generated_client/client/environment/get_environment_events_responses.go +++ b/models/radix_api/generated_client/client/environment/get_environment_events_responses.go @@ -57,7 +57,7 @@ GetEnvironmentEventsOK describes a response with status code 200, with default h Successful get environment events */ type GetEnvironmentEventsOK struct { - Payload *models.Event + Payload []*models.Event } // IsSuccess returns true when this get environment events o k response has a 2xx status code @@ -98,16 +98,14 @@ func (o *GetEnvironmentEventsOK) String() string { return fmt.Sprintf("[GET /applications/{appName}/environments/{envName}/events][%d] getEnvironmentEventsOK %+v", 200, o.Payload) } -func (o *GetEnvironmentEventsOK) GetPayload() *models.Event { +func (o *GetEnvironmentEventsOK) GetPayload() []*models.Event { return o.Payload } func (o *GetEnvironmentEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Event) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/models/radix_api/generated_client/client/environment/get_environment_parameters.go b/models/radix_api/generated_client/client/environment/get_environment_parameters.go index 54ccbc3..7869848 100644 --- a/models/radix_api/generated_client/client/environment/get_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentParams creates a new GetEnvironmentParams object, @@ -64,9 +63,9 @@ type GetEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment params -func (o *GetEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentParams { +func (o *GetEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment params -func (o *GetEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strfm if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strfm } return nil } - -// bindParamGetEnvironment binds the parameter Impersonate-Group -func (o *GetEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/get_environment_summary_parameters.go b/models/radix_api/generated_client/client/environment/get_environment_summary_parameters.go index 75c9caa..47a2b9a 100644 --- a/models/radix_api/generated_client/client/environment/get_environment_summary_parameters.go +++ b/models/radix_api/generated_client/client/environment/get_environment_summary_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetEnvironmentSummaryParams creates a new GetEnvironmentSummaryParams object, @@ -64,9 +63,9 @@ type GetEnvironmentSummaryParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetEnvironmentSummaryParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get environment summary params -func (o *GetEnvironmentSummaryParams) WithImpersonateGroup(impersonateGroup []string) *GetEnvironmentSummaryParams { +func (o *GetEnvironmentSummaryParams) WithImpersonateGroup(impersonateGroup *string) *GetEnvironmentSummaryParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get environment summary params -func (o *GetEnvironmentSummaryParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetEnvironmentSummaryParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetEnvironmentSummaryParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetEnvironmentSummaryParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetEnvironmentSummary binds the parameter Impersonate-Group -func (o *GetEnvironmentSummaryParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/restart_environment_parameters.go b/models/radix_api/generated_client/client/environment/restart_environment_parameters.go index bf77112..132bf94 100644 --- a/models/radix_api/generated_client/client/environment/restart_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/restart_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartEnvironmentParams creates a new RestartEnvironmentParams object, @@ -64,9 +63,9 @@ type RestartEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *RestartEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart environment params -func (o *RestartEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *RestartEnvironmentParams { +func (o *RestartEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *RestartEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart environment params -func (o *RestartEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *RestartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *RestartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamRestartEnvironment binds the parameter Impersonate-Group -func (o *RestartEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/start_environment_parameters.go b/models/radix_api/generated_client/client/environment/start_environment_parameters.go index 60f71eb..0e72a38 100644 --- a/models/radix_api/generated_client/client/environment/start_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/start_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStartEnvironmentParams creates a new StartEnvironmentParams object, @@ -64,9 +63,9 @@ type StartEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StartEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the start environment params -func (o *StartEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *StartEnvironmentParams { +func (o *StartEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *StartEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the start environment params -func (o *StartEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StartEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StartEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamStartEnvironment binds the parameter Impersonate-Group -func (o *StartEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/stop_environment_parameters.go b/models/radix_api/generated_client/client/environment/stop_environment_parameters.go index 3cd7561..171aa04 100644 --- a/models/radix_api/generated_client/client/environment/stop_environment_parameters.go +++ b/models/radix_api/generated_client/client/environment/stop_environment_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopEnvironmentParams creates a new StopEnvironmentParams object, @@ -64,9 +63,9 @@ type StopEnvironmentParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StopEnvironmentParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop environment params -func (o *StopEnvironmentParams) WithImpersonateGroup(impersonateGroup []string) *StopEnvironmentParams { +func (o *StopEnvironmentParams) WithImpersonateGroup(impersonateGroup *string) *StopEnvironmentParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop environment params -func (o *StopEnvironmentParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopEnvironmentParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StopEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StopEnvironmentParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } - -// bindParamStopEnvironment binds the parameter Impersonate-Group -func (o *StopEnvironmentParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/environment/update_environment_alerting_config_parameters.go b/models/radix_api/generated_client/client/environment/update_environment_alerting_config_parameters.go index cbcea69..0c6dd9c 100644 --- a/models/radix_api/generated_client/client/environment/update_environment_alerting_config_parameters.go +++ b/models/radix_api/generated_client/client/environment/update_environment_alerting_config_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type UpdateEnvironmentAlertingConfigParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -148,13 +147,13 @@ func (o *UpdateEnvironmentAlertingConfigParams) SetHTTPClient(client *http.Clien } // WithImpersonateGroup adds the impersonateGroup to the update environment alerting config params -func (o *UpdateEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup []string) *UpdateEnvironmentAlertingConfigParams { +func (o *UpdateEnvironmentAlertingConfigParams) WithImpersonateGroup(impersonateGroup *string) *UpdateEnvironmentAlertingConfigParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the update environment alerting config params -func (o *UpdateEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *UpdateEnvironmentAlertingConfigParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -212,14 +211,9 @@ func (o *UpdateEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientR if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -251,20 +245,3 @@ func (o *UpdateEnvironmentAlertingConfigParams) WriteToRequest(r runtime.ClientR } return nil } - -// bindParamUpdateEnvironmentAlertingConfig binds the parameter Impersonate-Group -func (o *UpdateEnvironmentAlertingConfigParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/copy_batch_parameters.go b/models/radix_api/generated_client/client/job/copy_batch_parameters.go index 98b5200..ef428ab 100644 --- a/models/radix_api/generated_client/client/job/copy_batch_parameters.go +++ b/models/radix_api/generated_client/client/job/copy_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type CopyBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *CopyBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the copy batch params -func (o *CopyBatchParams) WithImpersonateGroup(impersonateGroup []string) *CopyBatchParams { +func (o *CopyBatchParams) WithImpersonateGroup(impersonateGroup *string) *CopyBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the copy batch params -func (o *CopyBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CopyBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *CopyBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *CopyBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamCopyBatch binds the parameter Impersonate-Group -func (o *CopyBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/copy_job_parameters.go b/models/radix_api/generated_client/client/job/copy_job_parameters.go index 918016a..6789856 100644 --- a/models/radix_api/generated_client/client/job/copy_job_parameters.go +++ b/models/radix_api/generated_client/client/job/copy_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type CopyJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -160,13 +159,13 @@ func (o *CopyJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the copy job params -func (o *CopyJobParams) WithImpersonateGroup(impersonateGroup []string) *CopyJobParams { +func (o *CopyJobParams) WithImpersonateGroup(impersonateGroup *string) *CopyJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the copy job params -func (o *CopyJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *CopyJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -246,14 +245,9 @@ func (o *CopyJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -295,20 +289,3 @@ func (o *CopyJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamCopyJob binds the parameter Impersonate-Group -func (o *CopyJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/delete_batch_parameters.go b/models/radix_api/generated_client/client/job/delete_batch_parameters.go index b50acba..1207dc6 100644 --- a/models/radix_api/generated_client/client/job/delete_batch_parameters.go +++ b/models/radix_api/generated_client/client/job/delete_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteBatchParams creates a new DeleteBatchParams object, @@ -64,9 +63,9 @@ type DeleteBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *DeleteBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete batch params -func (o *DeleteBatchParams) WithImpersonateGroup(impersonateGroup []string) *DeleteBatchParams { +func (o *DeleteBatchParams) WithImpersonateGroup(impersonateGroup *string) *DeleteBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete batch params -func (o *DeleteBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *DeleteBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *DeleteBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } return nil } - -// bindParamDeleteBatch binds the parameter Impersonate-Group -func (o *DeleteBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/delete_job_parameters.go b/models/radix_api/generated_client/client/job/delete_job_parameters.go index 5ecc2f5..62eb069 100644 --- a/models/radix_api/generated_client/client/job/delete_job_parameters.go +++ b/models/radix_api/generated_client/client/job/delete_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewDeleteJobParams creates a new DeleteJobParams object, @@ -64,9 +63,9 @@ type DeleteJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *DeleteJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the delete job params -func (o *DeleteJobParams) WithImpersonateGroup(impersonateGroup []string) *DeleteJobParams { +func (o *DeleteJobParams) WithImpersonateGroup(impersonateGroup *string) *DeleteJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the delete job params -func (o *DeleteJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *DeleteJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *DeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *DeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamDeleteJob binds the parameter Impersonate-Group -func (o *DeleteJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_batch_parameters.go b/models/radix_api/generated_client/client/job/get_batch_parameters.go index b35cf1b..4f03ef3 100644 --- a/models/radix_api/generated_client/client/job/get_batch_parameters.go +++ b/models/radix_api/generated_client/client/job/get_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBatchParams creates a new GetBatchParams object, @@ -64,9 +63,9 @@ type GetBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get batch params -func (o *GetBatchParams) WithImpersonateGroup(impersonateGroup []string) *GetBatchParams { +func (o *GetBatchParams) WithImpersonateGroup(impersonateGroup *string) *GetBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get batch params -func (o *GetBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi } return nil } - -// bindParamGetBatch binds the parameter Impersonate-Group -func (o *GetBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_batches_parameters.go b/models/radix_api/generated_client/client/job/get_batches_parameters.go index 6c932fc..14e2f83 100644 --- a/models/radix_api/generated_client/client/job/get_batches_parameters.go +++ b/models/radix_api/generated_client/client/job/get_batches_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetBatchesParams creates a new GetBatchesParams object, @@ -64,9 +63,9 @@ type GetBatchesParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetBatchesParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get batches params -func (o *GetBatchesParams) WithImpersonateGroup(impersonateGroup []string) *GetBatchesParams { +func (o *GetBatchesParams) WithImpersonateGroup(impersonateGroup *string) *GetBatchesParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get batches params -func (o *GetBatchesParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetBatchesParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetBatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetBatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamGetBatches binds the parameter Impersonate-Group -func (o *GetBatchesParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_job_component_deployments_parameters.go b/models/radix_api/generated_client/client/job/get_job_component_deployments_parameters.go index 1f1e452..f333a0f 100644 --- a/models/radix_api/generated_client/client/job/get_job_component_deployments_parameters.go +++ b/models/radix_api/generated_client/client/job/get_job_component_deployments_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobComponentDeploymentsParams creates a new GetJobComponentDeploymentsParams object, @@ -64,9 +63,9 @@ type GetJobComponentDeploymentsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetJobComponentDeploymentsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job component deployments params -func (o *GetJobComponentDeploymentsParams) WithImpersonateGroup(impersonateGroup []string) *GetJobComponentDeploymentsParams { +func (o *GetJobComponentDeploymentsParams) WithImpersonateGroup(impersonateGroup *string) *GetJobComponentDeploymentsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job component deployments params -func (o *GetJobComponentDeploymentsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobComponentDeploymentsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetJobComponentDeploymentsParams) WriteToRequest(r runtime.ClientReques if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetJobComponentDeploymentsParams) WriteToRequest(r runtime.ClientReques } return nil } - -// bindParamGetJobComponentDeployments binds the parameter Impersonate-Group -func (o *GetJobComponentDeploymentsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_job_parameters.go b/models/radix_api/generated_client/client/job/get_job_parameters.go index aea0087..cf9bf6a 100644 --- a/models/radix_api/generated_client/client/job/get_job_parameters.go +++ b/models/radix_api/generated_client/client/job/get_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobParams creates a new GetJobParams object, @@ -64,9 +63,9 @@ type GetJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job params -func (o *GetJobParams) WithImpersonateGroup(impersonateGroup []string) *GetJobParams { +func (o *GetJobParams) WithImpersonateGroup(impersonateGroup *string) *GetJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job params -func (o *GetJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist } return nil } - -// bindParamGetJob binds the parameter Impersonate-Group -func (o *GetJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_job_payload_parameters.go b/models/radix_api/generated_client/client/job/get_job_payload_parameters.go index 39376dc..b9c1ef0 100644 --- a/models/radix_api/generated_client/client/job/get_job_payload_parameters.go +++ b/models/radix_api/generated_client/client/job/get_job_payload_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobPayloadParams creates a new GetJobPayloadParams object, @@ -64,9 +63,9 @@ type GetJobPayloadParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetJobPayloadParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get job payload params -func (o *GetJobPayloadParams) WithImpersonateGroup(impersonateGroup []string) *GetJobPayloadParams { +func (o *GetJobPayloadParams) WithImpersonateGroup(impersonateGroup *string) *GetJobPayloadParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get job payload params -func (o *GetJobPayloadParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobPayloadParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetJobPayloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetJobPayloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } return nil } - -// bindParamGetJobPayload binds the parameter Impersonate-Group -func (o *GetJobPayloadParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/get_jobs_parameters.go b/models/radix_api/generated_client/client/job/get_jobs_parameters.go index ae2c4c4..6cad24b 100644 --- a/models/radix_api/generated_client/client/job/get_jobs_parameters.go +++ b/models/radix_api/generated_client/client/job/get_jobs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetJobsParams creates a new GetJobsParams object, @@ -64,9 +63,9 @@ type GetJobsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetJobsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get jobs params -func (o *GetJobsParams) WithImpersonateGroup(impersonateGroup []string) *GetJobsParams { +func (o *GetJobsParams) WithImpersonateGroup(impersonateGroup *string) *GetJobsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get jobs params -func (o *GetJobsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetJobsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamGetJobs binds the parameter Impersonate-Group -func (o *GetJobsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/job_log_parameters.go b/models/radix_api/generated_client/client/job/job_log_parameters.go index 59f6fae..d7228db 100644 --- a/models/radix_api/generated_client/client/job/job_log_parameters.go +++ b/models/radix_api/generated_client/client/job/job_log_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewJobLogParams creates a new JobLogParams object, @@ -64,9 +63,9 @@ type JobLogParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -176,13 +175,13 @@ func (o *JobLogParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the job log params -func (o *JobLogParams) WithImpersonateGroup(impersonateGroup []string) *JobLogParams { +func (o *JobLogParams) WithImpersonateGroup(impersonateGroup *string) *JobLogParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the job log params -func (o *JobLogParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *JobLogParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -284,14 +283,9 @@ func (o *JobLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -379,20 +373,3 @@ func (o *JobLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist } return nil } - -// bindParamJobLog binds the parameter Impersonate-Group -func (o *JobLogParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/restart_batch_parameters.go b/models/radix_api/generated_client/client/job/restart_batch_parameters.go index 7444245..9706268 100644 --- a/models/radix_api/generated_client/client/job/restart_batch_parameters.go +++ b/models/radix_api/generated_client/client/job/restart_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartBatchParams creates a new RestartBatchParams object, @@ -64,9 +63,9 @@ type RestartBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *RestartBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart batch params -func (o *RestartBatchParams) WithImpersonateGroup(impersonateGroup []string) *RestartBatchParams { +func (o *RestartBatchParams) WithImpersonateGroup(impersonateGroup *string) *RestartBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart batch params -func (o *RestartBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *RestartBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *RestartBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } return nil } - -// bindParamRestartBatch binds the parameter Impersonate-Group -func (o *RestartBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/restart_job_parameters.go b/models/radix_api/generated_client/client/job/restart_job_parameters.go index f117a7b..ef4bb52 100644 --- a/models/radix_api/generated_client/client/job/restart_job_parameters.go +++ b/models/radix_api/generated_client/client/job/restart_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewRestartJobParams creates a new RestartJobParams object, @@ -64,9 +63,9 @@ type RestartJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *RestartJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the restart job params -func (o *RestartJobParams) WithImpersonateGroup(impersonateGroup []string) *RestartJobParams { +func (o *RestartJobParams) WithImpersonateGroup(impersonateGroup *string) *RestartJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the restart job params -func (o *RestartJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RestartJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *RestartJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *RestartJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } return nil } - -// bindParamRestartJob binds the parameter Impersonate-Group -func (o *RestartJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/stop_batch_parameters.go b/models/radix_api/generated_client/client/job/stop_batch_parameters.go index ece878b..f6a232a 100644 --- a/models/radix_api/generated_client/client/job/stop_batch_parameters.go +++ b/models/radix_api/generated_client/client/job/stop_batch_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopBatchParams creates a new StopBatchParams object, @@ -64,9 +63,9 @@ type StopBatchParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *StopBatchParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop batch params -func (o *StopBatchParams) WithImpersonateGroup(impersonateGroup []string) *StopBatchParams { +func (o *StopBatchParams) WithImpersonateGroup(impersonateGroup *string) *StopBatchParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop batch params -func (o *StopBatchParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopBatchParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *StopBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *StopBatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } return nil } - -// bindParamStopBatch binds the parameter Impersonate-Group -func (o *StopBatchParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/job/stop_job_parameters.go b/models/radix_api/generated_client/client/job/stop_job_parameters.go index 99557c7..ea4fd76 100644 --- a/models/radix_api/generated_client/client/job/stop_job_parameters.go +++ b/models/radix_api/generated_client/client/job/stop_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopJobParams creates a new StopJobParams object, @@ -64,9 +63,9 @@ type StopJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *StopJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop job params -func (o *StopJobParams) WithImpersonateGroup(impersonateGroup []string) *StopJobParams { +func (o *StopJobParams) WithImpersonateGroup(impersonateGroup *string) *StopJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop job params -func (o *StopJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *StopJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *StopJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } return nil } - -// bindParamStopJob binds the parameter Impersonate-Group -func (o *StopJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_application_job_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_application_job_parameters.go index 40f6d02..e525f87 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_application_job_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_application_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationJobParams creates a new GetApplicationJobParams object, @@ -64,9 +63,9 @@ type GetApplicationJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetApplicationJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application job params -func (o *GetApplicationJobParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationJobParams { +func (o *GetApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application job params -func (o *GetApplicationJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg st if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg st } return nil } - -// bindParamGetApplicationJob binds the parameter Impersonate-Group -func (o *GetApplicationJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_application_jobs_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_application_jobs_parameters.go index 0ce8127..4a88020 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_application_jobs_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_application_jobs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetApplicationJobsParams creates a new GetApplicationJobsParams object, @@ -64,9 +63,9 @@ type GetApplicationJobsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *GetApplicationJobsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get application jobs params -func (o *GetApplicationJobsParams) WithImpersonateGroup(impersonateGroup []string) *GetApplicationJobsParams { +func (o *GetApplicationJobsParams) WithImpersonateGroup(impersonateGroup *string) *GetApplicationJobsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get application jobs params -func (o *GetApplicationJobsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetApplicationJobsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *GetApplicationJobsParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -205,20 +199,3 @@ func (o *GetApplicationJobsParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamGetApplicationJobs binds the parameter Impersonate-Group -func (o *GetApplicationJobsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go index 1db5011..43e6e56 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_pipeline_job_step_logs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetPipelineJobStepLogsParams creates a new GetPipelineJobStepLogsParams object, @@ -64,9 +63,9 @@ type GetPipelineJobStepLogsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -170,13 +169,13 @@ func (o *GetPipelineJobStepLogsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get pipeline job step logs params -func (o *GetPipelineJobStepLogsParams) WithImpersonateGroup(impersonateGroup []string) *GetPipelineJobStepLogsParams { +func (o *GetPipelineJobStepLogsParams) WithImpersonateGroup(impersonateGroup *string) *GetPipelineJobStepLogsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get pipeline job step logs params -func (o *GetPipelineJobStepLogsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetPipelineJobStepLogsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -267,14 +266,9 @@ func (o *GetPipelineJobStepLogsParams) WriteToRequest(r runtime.ClientRequest, r if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -357,20 +351,3 @@ func (o *GetPipelineJobStepLogsParams) WriteToRequest(r runtime.ClientRequest, r } return nil } - -// bindParamGetPipelineJobStepLogs binds the parameter Impersonate-Group -func (o *GetPipelineJobStepLogsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_parameters.go index 15e674b..db10752 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunParams creates a new GetTektonPipelineRunParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetTektonPipelineRunParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run params -func (o *GetTektonPipelineRunParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunParams { +func (o *GetTektonPipelineRunParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run params -func (o *GetTektonPipelineRunParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetTektonPipelineRunParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetTektonPipelineRunParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamGetTektonPipelineRun binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go index 45d45dc..7870730 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskParams creates a new GetTektonPipelineRunTaskParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetTektonPipelineRunTaskParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task params -func (o *GetTektonPipelineRunTaskParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskParams { +func (o *GetTektonPipelineRunTaskParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task params -func (o *GetTektonPipelineRunTaskParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetTektonPipelineRunTaskParams) WriteToRequest(r runtime.ClientRequest, if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetTektonPipelineRunTaskParams) WriteToRequest(r runtime.ClientRequest, } return nil } - -// bindParamGetTektonPipelineRunTask binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go index 743e234..28e7feb 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_step_logs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskStepLogsParams creates a new GetTektonPipelineRunTaskStepLogsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskStepLogsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -182,13 +181,13 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) SetHTTPClient(client *http.Clie } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task step logs params -func (o *GetTektonPipelineRunTaskStepLogsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskStepLogsParams { +func (o *GetTektonPipelineRunTaskStepLogsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskStepLogsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task step logs params -func (o *GetTektonPipelineRunTaskStepLogsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskStepLogsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -301,14 +300,9 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) WriteToRequest(r runtime.Client if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -401,20 +395,3 @@ func (o *GetTektonPipelineRunTaskStepLogsParams) WriteToRequest(r runtime.Client } return nil } - -// bindParamGetTektonPipelineRunTaskStepLogs binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskStepLogsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go index 4cdc3c2..6bb6bd6 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_task_steps_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTaskStepsParams creates a new GetTektonPipelineRunTaskStepsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTaskStepsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -152,13 +151,13 @@ func (o *GetTektonPipelineRunTaskStepsParams) SetHTTPClient(client *http.Client) } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task steps params -func (o *GetTektonPipelineRunTaskStepsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTaskStepsParams { +func (o *GetTektonPipelineRunTaskStepsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTaskStepsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run task steps params -func (o *GetTektonPipelineRunTaskStepsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTaskStepsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -227,14 +226,9 @@ func (o *GetTektonPipelineRunTaskStepsParams) WriteToRequest(r runtime.ClientReq if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -271,20 +265,3 @@ func (o *GetTektonPipelineRunTaskStepsParams) WriteToRequest(r runtime.ClientReq } return nil } - -// bindParamGetTektonPipelineRunTaskSteps binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTaskStepsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go index 24e99d7..eaf17fe 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_run_tasks_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunTasksParams creates a new GetTektonPipelineRunTasksParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunTasksParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -146,13 +145,13 @@ func (o *GetTektonPipelineRunTasksParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline run tasks params -func (o *GetTektonPipelineRunTasksParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunTasksParams { +func (o *GetTektonPipelineRunTasksParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunTasksParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline run tasks params -func (o *GetTektonPipelineRunTasksParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunTasksParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -210,14 +209,9 @@ func (o *GetTektonPipelineRunTasksParams) WriteToRequest(r runtime.ClientRequest if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -249,20 +243,3 @@ func (o *GetTektonPipelineRunTasksParams) WriteToRequest(r runtime.ClientRequest } return nil } - -// bindParamGetTektonPipelineRunTasks binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunTasksParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go index 89b69ff..28f178d 100644 --- a/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/get_tekton_pipeline_runs_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetTektonPipelineRunsParams creates a new GetTektonPipelineRunsParams object, @@ -64,9 +63,9 @@ type GetTektonPipelineRunsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *GetTektonPipelineRunsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the get tekton pipeline runs params -func (o *GetTektonPipelineRunsParams) WithImpersonateGroup(impersonateGroup []string) *GetTektonPipelineRunsParams { +func (o *GetTektonPipelineRunsParams) WithImpersonateGroup(impersonateGroup *string) *GetTektonPipelineRunsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the get tekton pipeline runs params -func (o *GetTektonPipelineRunsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *GetTektonPipelineRunsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *GetTektonPipelineRunsParams) WriteToRequest(r runtime.ClientRequest, re if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *GetTektonPipelineRunsParams) WriteToRequest(r runtime.ClientRequest, re } return nil } - -// bindParamGetTektonPipelineRuns binds the parameter Impersonate-Group -func (o *GetTektonPipelineRunsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/pipeline_job/pipeline_job_client.go b/models/radix_api/generated_client/client/pipeline_job/pipeline_job_client.go index c62a8bd..eca722b 100644 --- a/models/radix_api/generated_client/client/pipeline_job/pipeline_job_client.go +++ b/models/radix_api/generated_client/client/pipeline_job/pipeline_job_client.go @@ -48,6 +48,8 @@ type ClientService interface { GetTektonPipelineRuns(params *GetTektonPipelineRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTektonPipelineRunsOK, error) + RerunApplicationJob(params *RerunApplicationJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RerunApplicationJobNoContent, error) + StopApplicationJob(params *StopApplicationJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StopApplicationJobNoContent, error) SetTransport(transport runtime.ClientTransport) @@ -404,6 +406,45 @@ func (a *Client) GetTektonPipelineRuns(params *GetTektonPipelineRunsParams, auth panic(msg) } +/* +RerunApplicationJob reruns the pipeline job +*/ +func (a *Client) RerunApplicationJob(params *RerunApplicationJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RerunApplicationJobNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewRerunApplicationJobParams() + } + op := &runtime.ClientOperation{ + ID: "rerunApplicationJob", + Method: "POST", + PathPattern: "/applications/{appName}/jobs/{jobName}/rerun", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &RerunApplicationJobReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*RerunApplicationJobNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for rerunApplicationJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* StopApplicationJob stops job */ diff --git a/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_parameters.go b/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_parameters.go new file mode 100644 index 0000000..14429c0 --- /dev/null +++ b/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_parameters.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRerunApplicationJobParams creates a new RerunApplicationJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRerunApplicationJobParams() *RerunApplicationJobParams { + return &RerunApplicationJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRerunApplicationJobParamsWithTimeout creates a new RerunApplicationJobParams object +// with the ability to set a timeout on a request. +func NewRerunApplicationJobParamsWithTimeout(timeout time.Duration) *RerunApplicationJobParams { + return &RerunApplicationJobParams{ + timeout: timeout, + } +} + +// NewRerunApplicationJobParamsWithContext creates a new RerunApplicationJobParams object +// with the ability to set a context for a request. +func NewRerunApplicationJobParamsWithContext(ctx context.Context) *RerunApplicationJobParams { + return &RerunApplicationJobParams{ + Context: ctx, + } +} + +// NewRerunApplicationJobParamsWithHTTPClient creates a new RerunApplicationJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewRerunApplicationJobParamsWithHTTPClient(client *http.Client) *RerunApplicationJobParams { + return &RerunApplicationJobParams{ + HTTPClient: client, + } +} + +/* +RerunApplicationJobParams contains all the parameters to send to the API endpoint + + for the rerun application job operation. + + Typically these are written to a http.Request. +*/ +type RerunApplicationJobParams struct { + + /* ImpersonateGroup. + + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) + */ + ImpersonateGroup *string + + /* ImpersonateUser. + + Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set) + */ + ImpersonateUser *string + + /* AppName. + + name of application + */ + AppName string + + /* JobName. + + name of job + */ + JobName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the rerun application job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RerunApplicationJobParams) WithDefaults() *RerunApplicationJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the rerun application job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RerunApplicationJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the rerun application job params +func (o *RerunApplicationJobParams) WithTimeout(timeout time.Duration) *RerunApplicationJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the rerun application job params +func (o *RerunApplicationJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the rerun application job params +func (o *RerunApplicationJobParams) WithContext(ctx context.Context) *RerunApplicationJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the rerun application job params +func (o *RerunApplicationJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the rerun application job params +func (o *RerunApplicationJobParams) WithHTTPClient(client *http.Client) *RerunApplicationJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the rerun application job params +func (o *RerunApplicationJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImpersonateGroup adds the impersonateGroup to the rerun application job params +func (o *RerunApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *RerunApplicationJobParams { + o.SetImpersonateGroup(impersonateGroup) + return o +} + +// SetImpersonateGroup adds the impersonateGroup to the rerun application job params +func (o *RerunApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { + o.ImpersonateGroup = impersonateGroup +} + +// WithImpersonateUser adds the impersonateUser to the rerun application job params +func (o *RerunApplicationJobParams) WithImpersonateUser(impersonateUser *string) *RerunApplicationJobParams { + o.SetImpersonateUser(impersonateUser) + return o +} + +// SetImpersonateUser adds the impersonateUser to the rerun application job params +func (o *RerunApplicationJobParams) SetImpersonateUser(impersonateUser *string) { + o.ImpersonateUser = impersonateUser +} + +// WithAppName adds the appName to the rerun application job params +func (o *RerunApplicationJobParams) WithAppName(appName string) *RerunApplicationJobParams { + o.SetAppName(appName) + return o +} + +// SetAppName adds the appName to the rerun application job params +func (o *RerunApplicationJobParams) SetAppName(appName string) { + o.AppName = appName +} + +// WithJobName adds the jobName to the rerun application job params +func (o *RerunApplicationJobParams) WithJobName(jobName string) *RerunApplicationJobParams { + o.SetJobName(jobName) + return o +} + +// SetJobName adds the jobName to the rerun application job params +func (o *RerunApplicationJobParams) SetJobName(jobName string) { + o.JobName = jobName +} + +// WriteToRequest writes these params to a swagger request +func (o *RerunApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ImpersonateGroup != nil { + + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err + } + } + + if o.ImpersonateUser != nil { + + // header param Impersonate-User + if err := r.SetHeaderParam("Impersonate-User", *o.ImpersonateUser); err != nil { + return err + } + } + + // path param appName + if err := r.SetPathParam("appName", o.AppName); err != nil { + return err + } + + // path param jobName + if err := r.SetPathParam("jobName", o.JobName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_responses.go b/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_responses.go new file mode 100644 index 0000000..cfbf564 --- /dev/null +++ b/models/radix_api/generated_client/client/pipeline_job/rerun_application_job_responses.go @@ -0,0 +1,212 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// RerunApplicationJobReader is a Reader for the RerunApplicationJob structure. +type RerunApplicationJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RerunApplicationJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewRerunApplicationJobNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewRerunApplicationJobUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewRerunApplicationJobNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /applications/{appName}/jobs/{jobName}/rerun] rerunApplicationJob", response, response.Code()) + } +} + +// NewRerunApplicationJobNoContent creates a RerunApplicationJobNoContent with default headers values +func NewRerunApplicationJobNoContent() *RerunApplicationJobNoContent { + return &RerunApplicationJobNoContent{} +} + +/* +RerunApplicationJobNoContent describes a response with status code 204, with default header values. + +Job rerun ok +*/ +type RerunApplicationJobNoContent struct { +} + +// IsSuccess returns true when this rerun application job no content response has a 2xx status code +func (o *RerunApplicationJobNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this rerun application job no content response has a 3xx status code +func (o *RerunApplicationJobNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this rerun application job no content response has a 4xx status code +func (o *RerunApplicationJobNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this rerun application job no content response has a 5xx status code +func (o *RerunApplicationJobNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this rerun application job no content response a status code equal to that given +func (o *RerunApplicationJobNoContent) IsCode(code int) bool { + return code == 204 +} + +// Code gets the status code for the rerun application job no content response +func (o *RerunApplicationJobNoContent) Code() int { + return 204 +} + +func (o *RerunApplicationJobNoContent) Error() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobNoContent ", 204) +} + +func (o *RerunApplicationJobNoContent) String() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobNoContent ", 204) +} + +func (o *RerunApplicationJobNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewRerunApplicationJobUnauthorized creates a RerunApplicationJobUnauthorized with default headers values +func NewRerunApplicationJobUnauthorized() *RerunApplicationJobUnauthorized { + return &RerunApplicationJobUnauthorized{} +} + +/* +RerunApplicationJobUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type RerunApplicationJobUnauthorized struct { +} + +// IsSuccess returns true when this rerun application job unauthorized response has a 2xx status code +func (o *RerunApplicationJobUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this rerun application job unauthorized response has a 3xx status code +func (o *RerunApplicationJobUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this rerun application job unauthorized response has a 4xx status code +func (o *RerunApplicationJobUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this rerun application job unauthorized response has a 5xx status code +func (o *RerunApplicationJobUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this rerun application job unauthorized response a status code equal to that given +func (o *RerunApplicationJobUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the rerun application job unauthorized response +func (o *RerunApplicationJobUnauthorized) Code() int { + return 401 +} + +func (o *RerunApplicationJobUnauthorized) Error() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobUnauthorized ", 401) +} + +func (o *RerunApplicationJobUnauthorized) String() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobUnauthorized ", 401) +} + +func (o *RerunApplicationJobUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewRerunApplicationJobNotFound creates a RerunApplicationJobNotFound with default headers values +func NewRerunApplicationJobNotFound() *RerunApplicationJobNotFound { + return &RerunApplicationJobNotFound{} +} + +/* +RerunApplicationJobNotFound describes a response with status code 404, with default header values. + +Not found +*/ +type RerunApplicationJobNotFound struct { +} + +// IsSuccess returns true when this rerun application job not found response has a 2xx status code +func (o *RerunApplicationJobNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this rerun application job not found response has a 3xx status code +func (o *RerunApplicationJobNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this rerun application job not found response has a 4xx status code +func (o *RerunApplicationJobNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this rerun application job not found response has a 5xx status code +func (o *RerunApplicationJobNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this rerun application job not found response a status code equal to that given +func (o *RerunApplicationJobNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the rerun application job not found response +func (o *RerunApplicationJobNotFound) Code() int { + return 404 +} + +func (o *RerunApplicationJobNotFound) Error() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobNotFound ", 404) +} + +func (o *RerunApplicationJobNotFound) String() string { + return fmt.Sprintf("[POST /applications/{appName}/jobs/{jobName}/rerun][%d] rerunApplicationJobNotFound ", 404) +} + +func (o *RerunApplicationJobNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/models/radix_api/generated_client/client/pipeline_job/stop_application_job_parameters.go b/models/radix_api/generated_client/client/pipeline_job/stop_application_job_parameters.go index 4c514a9..70fcb97 100644 --- a/models/radix_api/generated_client/client/pipeline_job/stop_application_job_parameters.go +++ b/models/radix_api/generated_client/client/pipeline_job/stop_application_job_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewStopApplicationJobParams creates a new StopApplicationJobParams object, @@ -64,9 +63,9 @@ type StopApplicationJobParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -140,13 +139,13 @@ func (o *StopApplicationJobParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the stop application job params -func (o *StopApplicationJobParams) WithImpersonateGroup(impersonateGroup []string) *StopApplicationJobParams { +func (o *StopApplicationJobParams) WithImpersonateGroup(impersonateGroup *string) *StopApplicationJobParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the stop application job params -func (o *StopApplicationJobParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *StopApplicationJobParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -193,14 +192,9 @@ func (o *StopApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -227,20 +221,3 @@ func (o *StopApplicationJobParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamStopApplicationJob binds the parameter Impersonate-Group -func (o *StopApplicationJobParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/platform/get_search_applications_parameters.go b/models/radix_api/generated_client/client/platform/get_search_applications_parameters.go new file mode 100644 index 0000000..7dbf429 --- /dev/null +++ b/models/radix_api/generated_client/client/platform/get_search_applications_parameters.go @@ -0,0 +1,274 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetSearchApplicationsParams creates a new GetSearchApplicationsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetSearchApplicationsParams() *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetSearchApplicationsParamsWithTimeout creates a new GetSearchApplicationsParams object +// with the ability to set a timeout on a request. +func NewGetSearchApplicationsParamsWithTimeout(timeout time.Duration) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + timeout: timeout, + } +} + +// NewGetSearchApplicationsParamsWithContext creates a new GetSearchApplicationsParams object +// with the ability to set a context for a request. +func NewGetSearchApplicationsParamsWithContext(ctx context.Context) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + Context: ctx, + } +} + +// NewGetSearchApplicationsParamsWithHTTPClient creates a new GetSearchApplicationsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetSearchApplicationsParamsWithHTTPClient(client *http.Client) *GetSearchApplicationsParams { + return &GetSearchApplicationsParams{ + HTTPClient: client, + } +} + +/* +GetSearchApplicationsParams contains all the parameters to send to the API endpoint + + for the get search applications operation. + + Typically these are written to a http.Request. +*/ +type GetSearchApplicationsParams struct { + + /* ImpersonateGroup. + + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) + */ + ImpersonateGroup *string + + /* ImpersonateUser. + + Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set) + */ + ImpersonateUser *string + + /* Apps. + + Comma separated list of application names to search for + */ + Apps string + + /* IncludeEnvironmentActiveComponents. + + true to include ActiveComponents in Environments + */ + IncludeEnvironmentActiveComponents *string + + /* IncludeLatestJobSummary. + + true to include LatestJobSummary + */ + IncludeLatestJobSummary *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get search applications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetSearchApplicationsParams) WithDefaults() *GetSearchApplicationsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get search applications params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetSearchApplicationsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get search applications params +func (o *GetSearchApplicationsParams) WithTimeout(timeout time.Duration) *GetSearchApplicationsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get search applications params +func (o *GetSearchApplicationsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get search applications params +func (o *GetSearchApplicationsParams) WithContext(ctx context.Context) *GetSearchApplicationsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get search applications params +func (o *GetSearchApplicationsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get search applications params +func (o *GetSearchApplicationsParams) WithHTTPClient(client *http.Client) *GetSearchApplicationsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get search applications params +func (o *GetSearchApplicationsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImpersonateGroup adds the impersonateGroup to the get search applications params +func (o *GetSearchApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *GetSearchApplicationsParams { + o.SetImpersonateGroup(impersonateGroup) + return o +} + +// SetImpersonateGroup adds the impersonateGroup to the get search applications params +func (o *GetSearchApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { + o.ImpersonateGroup = impersonateGroup +} + +// WithImpersonateUser adds the impersonateUser to the get search applications params +func (o *GetSearchApplicationsParams) WithImpersonateUser(impersonateUser *string) *GetSearchApplicationsParams { + o.SetImpersonateUser(impersonateUser) + return o +} + +// SetImpersonateUser adds the impersonateUser to the get search applications params +func (o *GetSearchApplicationsParams) SetImpersonateUser(impersonateUser *string) { + o.ImpersonateUser = impersonateUser +} + +// WithApps adds the apps to the get search applications params +func (o *GetSearchApplicationsParams) WithApps(apps string) *GetSearchApplicationsParams { + o.SetApps(apps) + return o +} + +// SetApps adds the apps to the get search applications params +func (o *GetSearchApplicationsParams) SetApps(apps string) { + o.Apps = apps +} + +// WithIncludeEnvironmentActiveComponents adds the includeEnvironmentActiveComponents to the get search applications params +func (o *GetSearchApplicationsParams) WithIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents *string) *GetSearchApplicationsParams { + o.SetIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents) + return o +} + +// SetIncludeEnvironmentActiveComponents adds the includeEnvironmentActiveComponents to the get search applications params +func (o *GetSearchApplicationsParams) SetIncludeEnvironmentActiveComponents(includeEnvironmentActiveComponents *string) { + o.IncludeEnvironmentActiveComponents = includeEnvironmentActiveComponents +} + +// WithIncludeLatestJobSummary adds the includeLatestJobSummary to the get search applications params +func (o *GetSearchApplicationsParams) WithIncludeLatestJobSummary(includeLatestJobSummary *string) *GetSearchApplicationsParams { + o.SetIncludeLatestJobSummary(includeLatestJobSummary) + return o +} + +// SetIncludeLatestJobSummary adds the includeLatestJobSummary to the get search applications params +func (o *GetSearchApplicationsParams) SetIncludeLatestJobSummary(includeLatestJobSummary *string) { + o.IncludeLatestJobSummary = includeLatestJobSummary +} + +// WriteToRequest writes these params to a swagger request +func (o *GetSearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ImpersonateGroup != nil { + + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err + } + } + + if o.ImpersonateUser != nil { + + // header param Impersonate-User + if err := r.SetHeaderParam("Impersonate-User", *o.ImpersonateUser); err != nil { + return err + } + } + + // query param apps + qrApps := o.Apps + qApps := qrApps + if qApps != "" { + + if err := r.SetQueryParam("apps", qApps); err != nil { + return err + } + } + + if o.IncludeEnvironmentActiveComponents != nil { + + // query param includeEnvironmentActiveComponents + var qrIncludeEnvironmentActiveComponents string + + if o.IncludeEnvironmentActiveComponents != nil { + qrIncludeEnvironmentActiveComponents = *o.IncludeEnvironmentActiveComponents + } + qIncludeEnvironmentActiveComponents := qrIncludeEnvironmentActiveComponents + if qIncludeEnvironmentActiveComponents != "" { + + if err := r.SetQueryParam("includeEnvironmentActiveComponents", qIncludeEnvironmentActiveComponents); err != nil { + return err + } + } + } + + if o.IncludeLatestJobSummary != nil { + + // query param includeLatestJobSummary + var qrIncludeLatestJobSummary string + + if o.IncludeLatestJobSummary != nil { + qrIncludeLatestJobSummary = *o.IncludeLatestJobSummary + } + qIncludeLatestJobSummary := qrIncludeLatestJobSummary + if qIncludeLatestJobSummary != "" { + + if err := r.SetQueryParam("includeLatestJobSummary", qIncludeLatestJobSummary); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/models/radix_api/generated_client/client/platform/get_search_applications_responses.go b/models/radix_api/generated_client/client/platform/get_search_applications_responses.go new file mode 100644 index 0000000..8234fdd --- /dev/null +++ b/models/radix_api/generated_client/client/platform/get_search_applications_responses.go @@ -0,0 +1,411 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" +) + +// GetSearchApplicationsReader is a Reader for the GetSearchApplications structure. +type GetSearchApplicationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetSearchApplicationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetSearchApplicationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetSearchApplicationsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetSearchApplicationsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetSearchApplicationsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewGetSearchApplicationsConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetSearchApplicationsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /applications/_search] getSearchApplications", response, response.Code()) + } +} + +// NewGetSearchApplicationsOK creates a GetSearchApplicationsOK with default headers values +func NewGetSearchApplicationsOK() *GetSearchApplicationsOK { + return &GetSearchApplicationsOK{} +} + +/* +GetSearchApplicationsOK describes a response with status code 200, with default header values. + +Successful operation +*/ +type GetSearchApplicationsOK struct { + Payload []*models.ApplicationSummary +} + +// IsSuccess returns true when this get search applications o k response has a 2xx status code +func (o *GetSearchApplicationsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get search applications o k response has a 3xx status code +func (o *GetSearchApplicationsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications o k response has a 4xx status code +func (o *GetSearchApplicationsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get search applications o k response has a 5xx status code +func (o *GetSearchApplicationsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications o k response a status code equal to that given +func (o *GetSearchApplicationsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get search applications o k response +func (o *GetSearchApplicationsOK) Code() int { + return 200 +} + +func (o *GetSearchApplicationsOK) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsOK %+v", 200, o.Payload) +} + +func (o *GetSearchApplicationsOK) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsOK %+v", 200, o.Payload) +} + +func (o *GetSearchApplicationsOK) GetPayload() []*models.ApplicationSummary { + return o.Payload +} + +func (o *GetSearchApplicationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSearchApplicationsUnauthorized creates a GetSearchApplicationsUnauthorized with default headers values +func NewGetSearchApplicationsUnauthorized() *GetSearchApplicationsUnauthorized { + return &GetSearchApplicationsUnauthorized{} +} + +/* +GetSearchApplicationsUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GetSearchApplicationsUnauthorized struct { +} + +// IsSuccess returns true when this get search applications unauthorized response has a 2xx status code +func (o *GetSearchApplicationsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications unauthorized response has a 3xx status code +func (o *GetSearchApplicationsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications unauthorized response has a 4xx status code +func (o *GetSearchApplicationsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications unauthorized response has a 5xx status code +func (o *GetSearchApplicationsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications unauthorized response a status code equal to that given +func (o *GetSearchApplicationsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get search applications unauthorized response +func (o *GetSearchApplicationsUnauthorized) Code() int { + return 401 +} + +func (o *GetSearchApplicationsUnauthorized) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsUnauthorized ", 401) +} + +func (o *GetSearchApplicationsUnauthorized) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsUnauthorized ", 401) +} + +func (o *GetSearchApplicationsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsForbidden creates a GetSearchApplicationsForbidden with default headers values +func NewGetSearchApplicationsForbidden() *GetSearchApplicationsForbidden { + return &GetSearchApplicationsForbidden{} +} + +/* +GetSearchApplicationsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetSearchApplicationsForbidden struct { +} + +// IsSuccess returns true when this get search applications forbidden response has a 2xx status code +func (o *GetSearchApplicationsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications forbidden response has a 3xx status code +func (o *GetSearchApplicationsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications forbidden response has a 4xx status code +func (o *GetSearchApplicationsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications forbidden response has a 5xx status code +func (o *GetSearchApplicationsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications forbidden response a status code equal to that given +func (o *GetSearchApplicationsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get search applications forbidden response +func (o *GetSearchApplicationsForbidden) Code() int { + return 403 +} + +func (o *GetSearchApplicationsForbidden) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsForbidden ", 403) +} + +func (o *GetSearchApplicationsForbidden) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsForbidden ", 403) +} + +func (o *GetSearchApplicationsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsNotFound creates a GetSearchApplicationsNotFound with default headers values +func NewGetSearchApplicationsNotFound() *GetSearchApplicationsNotFound { + return &GetSearchApplicationsNotFound{} +} + +/* +GetSearchApplicationsNotFound describes a response with status code 404, with default header values. + +Not found +*/ +type GetSearchApplicationsNotFound struct { +} + +// IsSuccess returns true when this get search applications not found response has a 2xx status code +func (o *GetSearchApplicationsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications not found response has a 3xx status code +func (o *GetSearchApplicationsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications not found response has a 4xx status code +func (o *GetSearchApplicationsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications not found response has a 5xx status code +func (o *GetSearchApplicationsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications not found response a status code equal to that given +func (o *GetSearchApplicationsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get search applications not found response +func (o *GetSearchApplicationsNotFound) Code() int { + return 404 +} + +func (o *GetSearchApplicationsNotFound) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsNotFound ", 404) +} + +func (o *GetSearchApplicationsNotFound) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsNotFound ", 404) +} + +func (o *GetSearchApplicationsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsConflict creates a GetSearchApplicationsConflict with default headers values +func NewGetSearchApplicationsConflict() *GetSearchApplicationsConflict { + return &GetSearchApplicationsConflict{} +} + +/* +GetSearchApplicationsConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type GetSearchApplicationsConflict struct { +} + +// IsSuccess returns true when this get search applications conflict response has a 2xx status code +func (o *GetSearchApplicationsConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications conflict response has a 3xx status code +func (o *GetSearchApplicationsConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications conflict response has a 4xx status code +func (o *GetSearchApplicationsConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this get search applications conflict response has a 5xx status code +func (o *GetSearchApplicationsConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this get search applications conflict response a status code equal to that given +func (o *GetSearchApplicationsConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the get search applications conflict response +func (o *GetSearchApplicationsConflict) Code() int { + return 409 +} + +func (o *GetSearchApplicationsConflict) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsConflict ", 409) +} + +func (o *GetSearchApplicationsConflict) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsConflict ", 409) +} + +func (o *GetSearchApplicationsConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGetSearchApplicationsInternalServerError creates a GetSearchApplicationsInternalServerError with default headers values +func NewGetSearchApplicationsInternalServerError() *GetSearchApplicationsInternalServerError { + return &GetSearchApplicationsInternalServerError{} +} + +/* +GetSearchApplicationsInternalServerError describes a response with status code 500, with default header values. + +Internal server error +*/ +type GetSearchApplicationsInternalServerError struct { +} + +// IsSuccess returns true when this get search applications internal server error response has a 2xx status code +func (o *GetSearchApplicationsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get search applications internal server error response has a 3xx status code +func (o *GetSearchApplicationsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get search applications internal server error response has a 4xx status code +func (o *GetSearchApplicationsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get search applications internal server error response has a 5xx status code +func (o *GetSearchApplicationsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get search applications internal server error response a status code equal to that given +func (o *GetSearchApplicationsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get search applications internal server error response +func (o *GetSearchApplicationsInternalServerError) Code() int { + return 500 +} + +func (o *GetSearchApplicationsInternalServerError) Error() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsInternalServerError ", 500) +} + +func (o *GetSearchApplicationsInternalServerError) String() string { + return fmt.Sprintf("[GET /applications/_search][%d] getSearchApplicationsInternalServerError ", 500) +} + +func (o *GetSearchApplicationsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/models/radix_api/generated_client/client/platform/platform_client.go b/models/radix_api/generated_client/client/platform/platform_client.go index ffd5735..455bdd5 100644 --- a/models/radix_api/generated_client/client/platform/platform_client.go +++ b/models/radix_api/generated_client/client/platform/platform_client.go @@ -30,6 +30,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + GetSearchApplications(params *GetSearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSearchApplicationsOK, error) + RegisterApplication(params *RegisterApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterApplicationOK, error) SearchApplications(params *SearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchApplicationsOK, error) @@ -39,6 +41,45 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +GetSearchApplications gets applications by name n o t e doesn t get application summary latest job environments +*/ +func (a *Client) GetSearchApplications(params *GetSearchApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSearchApplicationsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetSearchApplicationsParams() + } + op := &runtime.ClientOperation{ + ID: "getSearchApplications", + Method: "GET", + PathPattern: "/applications/_search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetSearchApplicationsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetSearchApplicationsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getSearchApplications: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* RegisterApplication creates an application registration */ diff --git a/models/radix_api/generated_client/client/platform/register_application_parameters.go b/models/radix_api/generated_client/client/platform/register_application_parameters.go index 14bfc0e..51cca2e 100644 --- a/models/radix_api/generated_client/client/platform/register_application_parameters.go +++ b/models/radix_api/generated_client/client/platform/register_application_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type RegisterApplicationParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -136,13 +135,13 @@ func (o *RegisterApplicationParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the register application params -func (o *RegisterApplicationParams) WithImpersonateGroup(impersonateGroup []string) *RegisterApplicationParams { +func (o *RegisterApplicationParams) WithImpersonateGroup(impersonateGroup *string) *RegisterApplicationParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the register application params -func (o *RegisterApplicationParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *RegisterApplicationParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -178,14 +177,9 @@ func (o *RegisterApplicationParams) WriteToRequest(r runtime.ClientRequest, reg if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -207,20 +201,3 @@ func (o *RegisterApplicationParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } - -// bindParamRegisterApplication binds the parameter Impersonate-Group -func (o *RegisterApplicationParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/platform/search_applications_parameters.go b/models/radix_api/generated_client/client/platform/search_applications_parameters.go index 869e759..f62244a 100644 --- a/models/radix_api/generated_client/client/platform/search_applications_parameters.go +++ b/models/radix_api/generated_client/client/platform/search_applications_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/models" ) @@ -66,9 +65,9 @@ type SearchApplicationsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -136,13 +135,13 @@ func (o *SearchApplicationsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the search applications params -func (o *SearchApplicationsParams) WithImpersonateGroup(impersonateGroup []string) *SearchApplicationsParams { +func (o *SearchApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *SearchApplicationsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the search applications params -func (o *SearchApplicationsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *SearchApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -178,14 +177,9 @@ func (o *SearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg s if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -207,20 +201,3 @@ func (o *SearchApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg s } return nil } - -// bindParamSearchApplications binds the parameter Impersonate-Group -func (o *SearchApplicationsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/client/platform/show_applications_parameters.go b/models/radix_api/generated_client/client/platform/show_applications_parameters.go index 02ad44f..036817e 100644 --- a/models/radix_api/generated_client/client/platform/show_applications_parameters.go +++ b/models/radix_api/generated_client/client/platform/show_applications_parameters.go @@ -14,7 +14,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewShowApplicationsParams creates a new ShowApplicationsParams object, @@ -64,9 +63,9 @@ type ShowApplicationsParams struct { /* ImpersonateGroup. - Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) + Works only with custom setup of cluster. Allow impersonation of a comma-seperated list of test groups (Required if Impersonate-User is set) */ - ImpersonateGroup []string + ImpersonateGroup *string /* ImpersonateUser. @@ -134,13 +133,13 @@ func (o *ShowApplicationsParams) SetHTTPClient(client *http.Client) { } // WithImpersonateGroup adds the impersonateGroup to the show applications params -func (o *ShowApplicationsParams) WithImpersonateGroup(impersonateGroup []string) *ShowApplicationsParams { +func (o *ShowApplicationsParams) WithImpersonateGroup(impersonateGroup *string) *ShowApplicationsParams { o.SetImpersonateGroup(impersonateGroup) return o } // SetImpersonateGroup adds the impersonateGroup to the show applications params -func (o *ShowApplicationsParams) SetImpersonateGroup(impersonateGroup []string) { +func (o *ShowApplicationsParams) SetImpersonateGroup(impersonateGroup *string) { o.ImpersonateGroup = impersonateGroup } @@ -176,14 +175,9 @@ func (o *ShowApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg str if o.ImpersonateGroup != nil { - // binding items for Impersonate-Group - joinedImpersonateGroup := o.bindParamImpersonateGroup(reg) - - // header array param Impersonate-Group - if len(joinedImpersonateGroup) > 0 { - if err := r.SetHeaderParam("Impersonate-Group", joinedImpersonateGroup[0]); err != nil { - return err - } + // header param Impersonate-Group + if err := r.SetHeaderParam("Impersonate-Group", *o.ImpersonateGroup); err != nil { + return err } } @@ -217,20 +211,3 @@ func (o *ShowApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } - -// bindParamShowApplications binds the parameter Impersonate-Group -func (o *ShowApplicationsParams) bindParamImpersonateGroup(formats strfmt.Registry) []string { - impersonateGroupIR := o.ImpersonateGroup - - var impersonateGroupIC []string - for _, impersonateGroupIIR := range impersonateGroupIR { // explode []string - - impersonateGroupIIV := impersonateGroupIIR // string as string - impersonateGroupIC = append(impersonateGroupIC, impersonateGroupIIV) - } - - // items.CollectionFormat: "" - impersonateGroupIS := swag.JoinByFormat(impersonateGroupIC, "") - - return impersonateGroupIS -} diff --git a/models/radix_api/generated_client/models/application.go b/models/radix_api/generated_client/models/application.go index 8af3f62..e9caeba 100644 --- a/models/radix_api/generated_client/models/application.go +++ b/models/radix_api/generated_client/models/application.go @@ -20,6 +20,9 @@ import ( // swagger:model Application type Application struct { + // DNS aliases showing nicer endpoint for application, without "app." subdomain domain + DNSAliases []*DNSAlias `json:"dnsAliases"` + // Environments List of environments for this application Environments []*EnvironmentSummary `json:"environments"` @@ -45,6 +48,10 @@ type Application struct { func (m *Application) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDNSAliases(formats); err != nil { + res = append(res, err) + } + if err := m.validateEnvironments(formats); err != nil { res = append(res, err) } @@ -71,6 +78,32 @@ func (m *Application) Validate(formats strfmt.Registry) error { return nil } +func (m *Application) validateDNSAliases(formats strfmt.Registry) error { + if swag.IsZero(m.DNSAliases) { // not required + return nil + } + + for i := 0; i < len(m.DNSAliases); i++ { + if swag.IsZero(m.DNSAliases[i]) { // not required + continue + } + + if m.DNSAliases[i] != nil { + if err := m.DNSAliases[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dnsAliases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dnsAliases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Application) validateEnvironments(formats strfmt.Registry) error { if swag.IsZero(m.Environments) { // not required return nil @@ -174,6 +207,10 @@ func (m *Application) validateRegistration(formats strfmt.Registry) error { func (m *Application) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDNSAliases(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateEnvironments(ctx, formats); err != nil { res = append(res, err) } @@ -196,6 +233,31 @@ func (m *Application) ContextValidate(ctx context.Context, formats strfmt.Regist return nil } +func (m *Application) contextValidateDNSAliases(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DNSAliases); i++ { + + if m.DNSAliases[i] != nil { + + if swag.IsZero(m.DNSAliases[i]) { // not required + return nil + } + + if err := m.DNSAliases[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dnsAliases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dnsAliases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Application) contextValidateEnvironments(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Environments); i++ { diff --git a/models/radix_api/generated_client/models/application_registration.go b/models/radix_api/generated_client/models/application_registration.go index 3dc9bdf..6f567e1 100644 --- a/models/radix_api/generated_client/models/application_registration.go +++ b/models/radix_api/generated_client/models/application_registration.go @@ -36,9 +36,6 @@ type ApplicationRegistration struct { // Required: true Creator *string `json:"creator"` - // MachineUser is on/off toggle of machine user for the application - MachineUser bool `json:"machineUser,omitempty"` - // Name the unique name of the Radix application // Example: radix-canary-golang // Required: true diff --git a/models/radix_api/generated_client/models/application_registration_patch.go b/models/radix_api/generated_client/models/application_registration_patch.go index 6e1192a..308bd98 100644 --- a/models/radix_api/generated_client/models/application_registration_patch.go +++ b/models/radix_api/generated_client/models/application_registration_patch.go @@ -28,9 +28,6 @@ type ApplicationRegistrationPatch struct { // Ref: https://en.wikipedia.org/wiki/Configuration_item ConfigurationItem string `json:"configurationItem,omitempty"` - // MachineUser is used for interacting directly with Radix API - MachineUser *bool `json:"machineUser,omitempty"` - // Owner of the application - should be an email Owner string `json:"owner,omitempty"` @@ -38,7 +35,7 @@ type ApplicationRegistrationPatch struct { RadixConfigFullName string `json:"radixConfigFullName,omitempty"` // ReaderAdGroups the groups that should be able to read the application - ReaderAdGroups []string `json:"ReaderAdGroups"` + ReaderAdGroups []string `json:"readerAdGroups"` // Repository the github repository Repository string `json:"repository,omitempty"` diff --git a/models/radix_api/generated_client/models/auxiliary_resource_deployment.go b/models/radix_api/generated_client/models/auxiliary_resource_deployment.go index 8103aea..1232480 100644 --- a/models/radix_api/generated_client/models/auxiliary_resource_deployment.go +++ b/models/radix_api/generated_client/models/auxiliary_resource_deployment.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -26,6 +27,7 @@ type AuxiliaryResourceDeployment struct { // Status of the auxiliary resource's deployment // Example: Consistent // Required: true + // Enum: [Stopped Consistent Reconciling] Status *string `json:"status"` } @@ -73,12 +75,49 @@ func (m *AuxiliaryResourceDeployment) validateReplicaList(formats strfmt.Registr return nil } +var auxiliaryResourceDeploymentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Stopped","Consistent","Reconciling"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + auxiliaryResourceDeploymentTypeStatusPropEnum = append(auxiliaryResourceDeploymentTypeStatusPropEnum, v) + } +} + +const ( + + // AuxiliaryResourceDeploymentStatusStopped captures enum value "Stopped" + AuxiliaryResourceDeploymentStatusStopped string = "Stopped" + + // AuxiliaryResourceDeploymentStatusConsistent captures enum value "Consistent" + AuxiliaryResourceDeploymentStatusConsistent string = "Consistent" + + // AuxiliaryResourceDeploymentStatusReconciling captures enum value "Reconciling" + AuxiliaryResourceDeploymentStatusReconciling string = "Reconciling" +) + +// prop value enum +func (m *AuxiliaryResourceDeployment) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, auxiliaryResourceDeploymentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + func (m *AuxiliaryResourceDeployment) validateStatus(formats strfmt.Registry) error { if err := validate.Required("status", "body", m.Status); err != nil { return err } + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + return nil } diff --git a/models/radix_api/generated_client/models/build_secret.go b/models/radix_api/generated_client/models/build_secret.go index 764b9a5..a24a8c5 100644 --- a/models/radix_api/generated_client/models/build_secret.go +++ b/models/radix_api/generated_client/models/build_secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -28,6 +29,7 @@ type BuildSecret struct { // Pending = Secret value is not set // Consistent = Secret value is set // Example: Consistent + // Enum: [Pending Consistent] Status string `json:"status,omitempty"` } @@ -39,6 +41,10 @@ func (m *BuildSecret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -54,6 +60,48 @@ func (m *BuildSecret) validateName(formats strfmt.Registry) error { return nil } +var buildSecretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + buildSecretTypeStatusPropEnum = append(buildSecretTypeStatusPropEnum, v) + } +} + +const ( + + // BuildSecretStatusPending captures enum value "Pending" + BuildSecretStatusPending string = "Pending" + + // BuildSecretStatusConsistent captures enum value "Consistent" + BuildSecretStatusConsistent string = "Consistent" +) + +// prop value enum +func (m *BuildSecret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, buildSecretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *BuildSecret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + // ContextValidate validates this build secret based on context it is used func (m *BuildSecret) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/models/radix_api/generated_client/models/component.go b/models/radix_api/generated_client/models/component.go index b20ea85..df70340 100644 --- a/models/radix_api/generated_client/models/component.go +++ b/models/radix_api/generated_client/models/component.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -54,11 +55,13 @@ type Component struct { // Status of the component // Example: Consistent + // Enum: [Stopped Consistent Reconciling Restarting Outdated] Status string `json:"status,omitempty"` // Type of component // Example: component // Required: true + // Enum: [component job] Type *string `json:"type"` // Variable names map to values. From radixconfig.yaml @@ -97,6 +100,10 @@ func (m *Component) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -193,12 +200,97 @@ func (m *Component) validateReplicaList(formats strfmt.Registry) error { return nil } +var componentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Stopped","Consistent","Reconciling","Restarting","Outdated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentTypeStatusPropEnum = append(componentTypeStatusPropEnum, v) + } +} + +const ( + + // ComponentStatusStopped captures enum value "Stopped" + ComponentStatusStopped string = "Stopped" + + // ComponentStatusConsistent captures enum value "Consistent" + ComponentStatusConsistent string = "Consistent" + + // ComponentStatusReconciling captures enum value "Reconciling" + ComponentStatusReconciling string = "Reconciling" + + // ComponentStatusRestarting captures enum value "Restarting" + ComponentStatusRestarting string = "Restarting" + + // ComponentStatusOutdated captures enum value "Outdated" + ComponentStatusOutdated string = "Outdated" +) + +// prop value enum +func (m *Component) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Component) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +var componentTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["component","job"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentTypeTypePropEnum = append(componentTypeTypePropEnum, v) + } +} + +const ( + + // ComponentTypeComponent captures enum value "component" + ComponentTypeComponent string = "component" + + // ComponentTypeJob captures enum value "job" + ComponentTypeJob string = "job" +) + +// prop value enum +func (m *Component) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *Component) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { return err } + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + return nil } diff --git a/models/radix_api/generated_client/models/component_summary.go b/models/radix_api/generated_client/models/component_summary.go index 0d1220d..7900a4c 100644 --- a/models/radix_api/generated_client/models/component_summary.go +++ b/models/radix_api/generated_client/models/component_summary.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -32,6 +33,7 @@ type ComponentSummary struct { // Type of component // Example: component // Required: true + // Enum: [component job] Type *string `json:"type"` } @@ -75,12 +77,46 @@ func (m *ComponentSummary) validateName(formats strfmt.Registry) error { return nil } +var componentSummaryTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["component","job"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + componentSummaryTypeTypePropEnum = append(componentSummaryTypeTypePropEnum, v) + } +} + +const ( + + // ComponentSummaryTypeComponent captures enum value "component" + ComponentSummaryTypeComponent string = "component" + + // ComponentSummaryTypeJob captures enum value "job" + ComponentSummaryTypeJob string = "job" +) + +// prop value enum +func (m *ComponentSummary) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, componentSummaryTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *ComponentSummary) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { return err } + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + return nil } diff --git a/models/radix_api/generated_client/models/deployment_summary.go b/models/radix_api/generated_client/models/deployment_summary.go index 32fe4f5..72610ab 100644 --- a/models/radix_api/generated_client/models/deployment_summary.go +++ b/models/radix_api/generated_client/models/deployment_summary.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -59,6 +60,7 @@ type DeploymentSummary struct { // Type of pipeline job // Example: build-deploy + // Enum: [build build-deploy promote deploy] PipelineJobType string `json:"pipelineJobType,omitempty"` // Name of the environment the deployment was promoted from @@ -87,6 +89,10 @@ func (m *DeploymentSummary) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePipelineJobType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -146,6 +152,54 @@ func (m *DeploymentSummary) validateName(formats strfmt.Registry) error { return nil } +var deploymentSummaryTypePipelineJobTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deploymentSummaryTypePipelineJobTypePropEnum = append(deploymentSummaryTypePipelineJobTypePropEnum, v) + } +} + +const ( + + // DeploymentSummaryPipelineJobTypeBuild captures enum value "build" + DeploymentSummaryPipelineJobTypeBuild string = "build" + + // DeploymentSummaryPipelineJobTypeBuildDashDeploy captures enum value "build-deploy" + DeploymentSummaryPipelineJobTypeBuildDashDeploy string = "build-deploy" + + // DeploymentSummaryPipelineJobTypePromote captures enum value "promote" + DeploymentSummaryPipelineJobTypePromote string = "promote" + + // DeploymentSummaryPipelineJobTypeDeploy captures enum value "deploy" + DeploymentSummaryPipelineJobTypeDeploy string = "deploy" +) + +// prop value enum +func (m *DeploymentSummary) validatePipelineJobTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deploymentSummaryTypePipelineJobTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeploymentSummary) validatePipelineJobType(formats strfmt.Registry) error { + if swag.IsZero(m.PipelineJobType) { // not required + return nil + } + + // value enum + if err := m.validatePipelineJobTypeEnum("pipelineJobType", "body", m.PipelineJobType); err != nil { + return err + } + + return nil +} + // ContextValidate validate this deployment summary based on the context it is used func (m *DeploymentSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/models/radix_api/generated_client/models/deployment_summary_pipeline_job_info.go b/models/radix_api/generated_client/models/deployment_summary_pipeline_job_info.go index 3d9258e..70a8085 100644 --- a/models/radix_api/generated_client/models/deployment_summary_pipeline_job_info.go +++ b/models/radix_api/generated_client/models/deployment_summary_pipeline_job_info.go @@ -7,9 +7,12 @@ package models import ( "context" + "encoding/json" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // DeploymentSummaryPipelineJobInfo deployment summary pipeline job info @@ -26,6 +29,7 @@ type DeploymentSummaryPipelineJobInfo struct { // Type of pipeline job // Example: build-deploy + // Enum: [build build-deploy promote deploy] PipelineJobType string `json:"pipelineJobType,omitempty"` // Name of the environment the deployment was promoted from @@ -36,6 +40,63 @@ type DeploymentSummaryPipelineJobInfo struct { // Validate validates this deployment summary pipeline job info func (m *DeploymentSummaryPipelineJobInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePipelineJobType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum = append(deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum, v) + } +} + +const ( + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeBuild captures enum value "build" + DeploymentSummaryPipelineJobInfoPipelineJobTypeBuild string = "build" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeBuildDashDeploy captures enum value "build-deploy" + DeploymentSummaryPipelineJobInfoPipelineJobTypeBuildDashDeploy string = "build-deploy" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypePromote captures enum value "promote" + DeploymentSummaryPipelineJobInfoPipelineJobTypePromote string = "promote" + + // DeploymentSummaryPipelineJobInfoPipelineJobTypeDeploy captures enum value "deploy" + DeploymentSummaryPipelineJobInfoPipelineJobTypeDeploy string = "deploy" +) + +// prop value enum +func (m *DeploymentSummaryPipelineJobInfo) validatePipelineJobTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deploymentSummaryPipelineJobInfoTypePipelineJobTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeploymentSummaryPipelineJobInfo) validatePipelineJobType(formats strfmt.Registry) error { + if swag.IsZero(m.PipelineJobType) { // not required + return nil + } + + // value enum + if err := m.validatePipelineJobTypeEnum("pipelineJobType", "body", m.PipelineJobType); err != nil { + return err + } + return nil } diff --git a/models/radix_api/generated_client/models/dns_alias.go b/models/radix_api/generated_client/models/dns_alias.go new file mode 100644 index 0000000..4633017 --- /dev/null +++ b/models/radix_api/generated_client/models/dns_alias.go @@ -0,0 +1,164 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DNSAlias DNSAlias holds public DNS alias information +// +// swagger:model DNSAlias +type DNSAlias struct { + + // ComponentName the component exposing the endpoint + // Example: frontend + // Required: true + ComponentName *string `json:"componentName"` + + // EnvironmentName the environment hosting the endpoint + // Example: prod + // Required: true + EnvironmentName *string `json:"environmentName"` + + // URL the public endpoint + // Example: https://my-app.radix.equinor.com + // Required: true + URL *string `json:"url"` + + // status + Status *DNSAliasStatus `json:"status,omitempty"` +} + +// Validate validates this DNS alias +func (m *DNSAlias) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComponentName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironmentName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DNSAlias) validateComponentName(formats strfmt.Registry) error { + + if err := validate.Required("componentName", "body", m.ComponentName); err != nil { + return err + } + + return nil +} + +func (m *DNSAlias) validateEnvironmentName(formats strfmt.Registry) error { + + if err := validate.Required("environmentName", "body", m.EnvironmentName); err != nil { + return err + } + + return nil +} + +func (m *DNSAlias) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +func (m *DNSAlias) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this DNS alias based on the context it is used +func (m *DNSAlias) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DNSAlias) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DNSAlias) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DNSAlias) UnmarshalBinary(b []byte) error { + var res DNSAlias + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/radix_api/generated_client/models/dns_alias_status.go b/models/radix_api/generated_client/models/dns_alias_status.go new file mode 100644 index 0000000..6687fbc --- /dev/null +++ b/models/radix_api/generated_client/models/dns_alias_status.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DNSAliasStatus DNSAliasStatus Status of the DNSAlias +// +// swagger:model DNSAliasStatus +type DNSAliasStatus struct { + + // condition + Condition string `json:"condition,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this DNS alias status +func (m *DNSAliasStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this DNS alias status based on context it is used +func (m *DNSAliasStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DNSAliasStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DNSAliasStatus) UnmarshalBinary(b []byte) error { + var res DNSAliasStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/radix_api/generated_client/models/event.go b/models/radix_api/generated_client/models/event.go index 0563060..bcc5a1e 100644 --- a/models/radix_api/generated_client/models/event.go +++ b/models/radix_api/generated_client/models/event.go @@ -11,6 +11,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // Event Event holds information about Kubernetes events @@ -31,8 +32,8 @@ type Event struct { InvolvedObjectNamespace string `json:"involvedObjectNamespace,omitempty"` // The time (ISO8601) at which the event was last recorded - // Example: 2020-11-05T13:25:07.000Z - LastTimestamp interface{} `json:"lastTimestamp,omitempty"` + // Format: date-time + LastTimestamp strfmt.DateTime `json:"lastTimestamp,omitempty"` // A human-readable description of the status of this event // Example: 'Readiness probe failed: dial tcp 10.40.1.5:3003: connect: connection refused' @@ -54,6 +55,10 @@ type Event struct { func (m *Event) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateLastTimestamp(formats); err != nil { + res = append(res, err) + } + if err := m.validateInvolvedObjectState(formats); err != nil { res = append(res, err) } @@ -64,6 +69,18 @@ func (m *Event) Validate(formats strfmt.Registry) error { return nil } +func (m *Event) validateLastTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.LastTimestamp) { // not required + return nil + } + + if err := validate.FormatOf("lastTimestamp", "body", "date-time", m.LastTimestamp.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Event) validateInvolvedObjectState(formats strfmt.Registry) error { if swag.IsZero(m.InvolvedObjectState) { // not required return nil diff --git a/models/radix_api/generated_client/models/image_hub_secret.go b/models/radix_api/generated_client/models/image_hub_secret.go index ea89581..43793ea 100644 --- a/models/radix_api/generated_client/models/image_hub_secret.go +++ b/models/radix_api/generated_client/models/image_hub_secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -32,6 +33,7 @@ type ImageHubSecret struct { // Pending = Secret value is not set // Consistent = Secret value is set // Example: Consistent + // Enum: [Pending Consistent] Status string `json:"status,omitempty"` // Username for connecting to private image hub @@ -48,6 +50,10 @@ func (m *ImageHubSecret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateUsername(formats); err != nil { res = append(res, err) } @@ -67,6 +73,48 @@ func (m *ImageHubSecret) validateServer(formats strfmt.Registry) error { return nil } +var imageHubSecretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + imageHubSecretTypeStatusPropEnum = append(imageHubSecretTypeStatusPropEnum, v) + } +} + +const ( + + // ImageHubSecretStatusPending captures enum value "Pending" + ImageHubSecretStatusPending string = "Pending" + + // ImageHubSecretStatusConsistent captures enum value "Consistent" + ImageHubSecretStatusConsistent string = "Consistent" +) + +// prop value enum +func (m *ImageHubSecret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, imageHubSecretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ImageHubSecret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *ImageHubSecret) validateUsername(formats strfmt.Registry) error { if err := validate.Required("username", "body", m.Username); err != nil { diff --git a/models/radix_api/generated_client/models/job.go b/models/radix_api/generated_client/models/job.go index 79ea4e3..37fa653 100644 --- a/models/radix_api/generated_client/models/job.go +++ b/models/radix_api/generated_client/models/job.go @@ -21,7 +21,7 @@ import ( // swagger:model Job type Job struct { - // Branch branch to build from + // Branch to build from // Example: master Branch string `json:"branch,omitempty"` @@ -45,19 +45,26 @@ type Job struct { // Example: 2006-01-02T15:04:05Z Ended string `json:"ended,omitempty"` + // Image tags names for components - if empty will use default logic + // Example: component1: tag1,component2: tag2 + ImageTagNames map[string]string `json:"imageTagNames,omitempty"` + // Name of the job // Example: radix-pipeline-20181029135644-algpv-6hznh Name string `json:"name,omitempty"` // Name of the pipeline // Example: build-deploy - // Enum: [build-deploy] + // Enum: [build build-deploy promote deploy] Pipeline string `json:"pipeline,omitempty"` // PromotedDeploymentName the name of the deployment that was promoted // Example: component-6hznh PromotedDeploymentName string `json:"promotedDeploymentName,omitempty"` + // RadixDeployment name, which is promoted + PromotedFromDeployment string `json:"promotedFromDeployment,omitempty"` + // PromotedFromEnvironment the name of the environment that was promoted from // Example: dev PromotedFromEnvironment string `json:"promotedFromEnvironment,omitempty"` @@ -66,13 +73,17 @@ type Job struct { // Example: qa PromotedToEnvironment string `json:"promotedToEnvironment,omitempty"` + // RerunFromJob The source name of the job if this job was restarted from it + // Example: radix-pipeline-20231011104617-urynf + RerunFromJob string `json:"rerunFromJob,omitempty"` + // Started timestamp // Example: 2006-01-02T15:04:05Z Started string `json:"started,omitempty"` // Status of the job // Example: Waiting - // Enum: [Waiting Running Succeeded Stopping Stopped Failed StoppedNoChanges] + // Enum: [Queued Waiting Running Succeeded Failed Stopped Stopping StoppedNoChanges] Status string `json:"status,omitempty"` // Array of steps @@ -169,7 +180,7 @@ var jobTypePipelinePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["build-deploy"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -179,8 +190,17 @@ func init() { const ( + // JobPipelineBuild captures enum value "build" + JobPipelineBuild string = "build" + // JobPipelineBuildDashDeploy captures enum value "build-deploy" JobPipelineBuildDashDeploy string = "build-deploy" + + // JobPipelinePromote captures enum value "promote" + JobPipelinePromote string = "promote" + + // JobPipelineDeploy captures enum value "deploy" + JobPipelineDeploy string = "deploy" ) // prop value enum @@ -208,7 +228,7 @@ var jobTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed","StoppedNoChanges"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","Stopping","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -218,6 +238,9 @@ func init() { const ( + // JobStatusQueued captures enum value "Queued" + JobStatusQueued string = "Queued" + // JobStatusWaiting captures enum value "Waiting" JobStatusWaiting string = "Waiting" @@ -227,14 +250,14 @@ const ( // JobStatusSucceeded captures enum value "Succeeded" JobStatusSucceeded string = "Succeeded" - // JobStatusStopping captures enum value "Stopping" - JobStatusStopping string = "Stopping" + // JobStatusFailed captures enum value "Failed" + JobStatusFailed string = "Failed" // JobStatusStopped captures enum value "Stopped" JobStatusStopped string = "Stopped" - // JobStatusFailed captures enum value "Failed" - JobStatusFailed string = "Failed" + // JobStatusStopping captures enum value "Stopping" + JobStatusStopping string = "Stopping" // JobStatusStoppedNoChanges captures enum value "StoppedNoChanges" JobStatusStoppedNoChanges string = "StoppedNoChanges" diff --git a/models/radix_api/generated_client/models/job_summary.go b/models/radix_api/generated_client/models/job_summary.go index 7643348..311626a 100644 --- a/models/radix_api/generated_client/models/job_summary.go +++ b/models/radix_api/generated_client/models/job_summary.go @@ -24,7 +24,7 @@ type JobSummary struct { // Example: radix-pipeline-20181029135644-algpv-6hznh AppName string `json:"appName,omitempty"` - // Branch branch to build from + // Branch to build from // Example: master Branch string `json:"branch,omitempty"` @@ -44,22 +44,35 @@ type JobSummary struct { // Example: ["dev","qa"] Environments []string `json:"environments"` + // Image tags names for components - if empty will use default logic + // Example: component1: tag1,component2: tag2 + ImageTagNames map[string]string `json:"imageTagNames,omitempty"` + // Name of the job // Example: radix-pipeline-20181029135644-algpv-6hznh Name string `json:"name,omitempty"` // Name of the pipeline // Example: build-deploy - // Enum: [build-deploy build] + // Enum: [build build-deploy promote deploy] Pipeline string `json:"pipeline,omitempty"` + // RadixDeployment name, which is promoted + PromotedFromDeployment string `json:"promotedFromDeployment,omitempty"` + + // Environment name, from which the Radix deployment is promoted + PromotedFromEnvironment string `json:"promotedFromEnvironment,omitempty"` + + // Environment name, to which the Radix deployment is promoted + PromotedToEnvironment string `json:"promotedToEnvironment,omitempty"` + // Started timestamp // Example: 2006-01-02T15:04:05Z Started string `json:"started,omitempty"` // Status of the job // Example: Waiting - // Enum: [Waiting Running Succeeded Stopping Stopped Failed StoppedNoChanges] + // Enum: [Queued Waiting Running Succeeded Failed Stopped Stopping StoppedNoChanges] Status string `json:"status,omitempty"` // TriggeredBy user that triggered the job. If through webhook = sender.login. If through api - usertoken.upn @@ -89,7 +102,7 @@ var jobSummaryTypePipelinePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["build-deploy"," build"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["build","build-deploy","promote","deploy"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -99,11 +112,17 @@ func init() { const ( + // JobSummaryPipelineBuild captures enum value "build" + JobSummaryPipelineBuild string = "build" + // JobSummaryPipelineBuildDashDeploy captures enum value "build-deploy" JobSummaryPipelineBuildDashDeploy string = "build-deploy" - // JobSummaryPipelineBuild captures enum value " build" - JobSummaryPipelineBuild string = " build" + // JobSummaryPipelinePromote captures enum value "promote" + JobSummaryPipelinePromote string = "promote" + + // JobSummaryPipelineDeploy captures enum value "deploy" + JobSummaryPipelineDeploy string = "deploy" ) // prop value enum @@ -131,7 +150,7 @@ var jobSummaryTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed","StoppedNoChanges"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","Stopping","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -141,6 +160,9 @@ func init() { const ( + // JobSummaryStatusQueued captures enum value "Queued" + JobSummaryStatusQueued string = "Queued" + // JobSummaryStatusWaiting captures enum value "Waiting" JobSummaryStatusWaiting string = "Waiting" @@ -150,14 +172,14 @@ const ( // JobSummaryStatusSucceeded captures enum value "Succeeded" JobSummaryStatusSucceeded string = "Succeeded" - // JobSummaryStatusStopping captures enum value "Stopping" - JobSummaryStatusStopping string = "Stopping" + // JobSummaryStatusFailed captures enum value "Failed" + JobSummaryStatusFailed string = "Failed" // JobSummaryStatusStopped captures enum value "Stopped" JobSummaryStatusStopped string = "Stopped" - // JobSummaryStatusFailed captures enum value "Failed" - JobSummaryStatusFailed string = "Failed" + // JobSummaryStatusStopping captures enum value "Stopping" + JobSummaryStatusStopping string = "Stopping" // JobSummaryStatusStoppedNoChanges captures enum value "StoppedNoChanges" JobSummaryStatusStoppedNoChanges string = "StoppedNoChanges" diff --git a/models/radix_api/generated_client/models/pipeline_parameters_deploy.go b/models/radix_api/generated_client/models/pipeline_parameters_deploy.go index 85cee15..35c43ca 100644 --- a/models/radix_api/generated_client/models/pipeline_parameters_deploy.go +++ b/models/radix_api/generated_client/models/pipeline_parameters_deploy.go @@ -17,6 +17,11 @@ import ( // swagger:model PipelineParametersDeploy type PipelineParametersDeploy struct { + // CommitID the commit ID of the branch + // OPTIONAL for information only + // Example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e + CommitID string `json:"commitID,omitempty"` + // Image tags names for components // Example: component1=tag1,component2=tag2 ImageTagNames map[string]string `json:"imageTagNames,omitempty"` diff --git a/models/radix_api/generated_client/models/pipeline_run.go b/models/radix_api/generated_client/models/pipeline_run.go index 632bc39..f564f22 100644 --- a/models/radix_api/generated_client/models/pipeline_run.go +++ b/models/radix_api/generated_client/models/pipeline_run.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -44,8 +43,7 @@ type PipelineRun struct { Started string `json:"started,omitempty"` // Status of the step - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Started Status string `json:"status,omitempty"` // StatusMessage of the task @@ -68,10 +66,6 @@ func (m *PipelineRun) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -105,54 +99,6 @@ func (m *PipelineRun) validateRealName(formats strfmt.Registry) error { return nil } -var pipelineRunTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTypeStatusPropEnum = append(pipelineRunTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunStatusWaiting captures enum value "Waiting" - PipelineRunStatusWaiting string = "Waiting" - - // PipelineRunStatusRunning captures enum value "Running" - PipelineRunStatusRunning string = "Running" - - // PipelineRunStatusSucceeded captures enum value "Succeeded" - PipelineRunStatusSucceeded string = "Succeeded" - - // PipelineRunStatusFailed captures enum value "Failed" - PipelineRunStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRun) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRun) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run based on context it is used func (m *PipelineRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/models/radix_api/generated_client/models/pipeline_run_task.go b/models/radix_api/generated_client/models/pipeline_run_task.go index 0ab5b94..6743667 100644 --- a/models/radix_api/generated_client/models/pipeline_run_task.go +++ b/models/radix_api/generated_client/models/pipeline_run_task.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -49,8 +48,7 @@ type PipelineRunTask struct { Started string `json:"started,omitempty"` // Status of the task - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Running Status string `json:"status,omitempty"` // StatusMessage of the task @@ -77,10 +75,6 @@ func (m *PipelineRunTask) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -123,54 +117,6 @@ func (m *PipelineRunTask) validateRealName(formats strfmt.Registry) error { return nil } -var pipelineRunTaskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTaskTypeStatusPropEnum = append(pipelineRunTaskTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunTaskStatusWaiting captures enum value "Waiting" - PipelineRunTaskStatusWaiting string = "Waiting" - - // PipelineRunTaskStatusRunning captures enum value "Running" - PipelineRunTaskStatusRunning string = "Running" - - // PipelineRunTaskStatusSucceeded captures enum value "Succeeded" - PipelineRunTaskStatusSucceeded string = "Succeeded" - - // PipelineRunTaskStatusFailed captures enum value "Failed" - PipelineRunTaskStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRunTask) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTaskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRunTask) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run task based on context it is used func (m *PipelineRunTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/models/radix_api/generated_client/models/pipeline_run_task_step.go b/models/radix_api/generated_client/models/pipeline_run_task_step.go index b4020d6..9815aaa 100644 --- a/models/radix_api/generated_client/models/pipeline_run_task_step.go +++ b/models/radix_api/generated_client/models/pipeline_run_task_step.go @@ -7,7 +7,6 @@ package models import ( "context" - "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -34,8 +33,7 @@ type PipelineRunTaskStep struct { Started string `json:"started,omitempty"` // Status of the task - // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Example: Completed Status string `json:"status,omitempty"` // StatusMessage of the task @@ -50,10 +48,6 @@ func (m *PipelineRunTaskStep) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -69,54 +63,6 @@ func (m *PipelineRunTaskStep) validateName(formats strfmt.Registry) error { return nil } -var pipelineRunTaskStepTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pipelineRunTaskStepTypeStatusPropEnum = append(pipelineRunTaskStepTypeStatusPropEnum, v) - } -} - -const ( - - // PipelineRunTaskStepStatusWaiting captures enum value "Waiting" - PipelineRunTaskStepStatusWaiting string = "Waiting" - - // PipelineRunTaskStepStatusRunning captures enum value "Running" - PipelineRunTaskStepStatusRunning string = "Running" - - // PipelineRunTaskStepStatusSucceeded captures enum value "Succeeded" - PipelineRunTaskStepStatusSucceeded string = "Succeeded" - - // PipelineRunTaskStepStatusFailed captures enum value "Failed" - PipelineRunTaskStepStatusFailed string = "Failed" -) - -// prop value enum -func (m *PipelineRunTaskStep) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pipelineRunTaskStepTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PipelineRunTaskStep) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - // ContextValidate validates this pipeline run task step based on context it is used func (m *PipelineRunTaskStep) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/models/radix_api/generated_client/models/replica_summary.go b/models/radix_api/generated_client/models/replica_summary.go index 50a1bc5..43eef4c 100644 --- a/models/radix_api/generated_client/models/replica_summary.go +++ b/models/radix_api/generated_client/models/replica_summary.go @@ -19,6 +19,10 @@ import ( // swagger:model ReplicaSummary type ReplicaSummary struct { + // Container started timestamp + // Example: 2006-01-02T15:04:05Z + ContainerStarted string `json:"containerStarted,omitempty"` + // Created timestamp // Example: 2006-01-02T15:04:05Z Created string `json:"created,omitempty"` diff --git a/models/radix_api/generated_client/models/scheduled_job_summary.go b/models/radix_api/generated_client/models/scheduled_job_summary.go index 7935adc..1210de5 100644 --- a/models/radix_api/generated_client/models/scheduled_job_summary.go +++ b/models/radix_api/generated_client/models/scheduled_job_summary.go @@ -72,7 +72,7 @@ type ScheduledJobSummary struct { // Status of the job // Example: Waiting // Required: true - // Enum: [Waiting Running Succeeded Stopping Stopped Failed] + // Enum: [Running Succeeded Failed Waiting Stopping Stopped] Status *string `json:"status"` // TimeLimitSeconds How long the job supposed to run at maximum @@ -168,7 +168,7 @@ var scheduledJobSummaryTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Stopping","Stopped","Failed"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Running","Succeeded","Failed","Waiting","Stopping","Stopped"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -178,23 +178,23 @@ func init() { const ( - // ScheduledJobSummaryStatusWaiting captures enum value "Waiting" - ScheduledJobSummaryStatusWaiting string = "Waiting" - // ScheduledJobSummaryStatusRunning captures enum value "Running" ScheduledJobSummaryStatusRunning string = "Running" // ScheduledJobSummaryStatusSucceeded captures enum value "Succeeded" ScheduledJobSummaryStatusSucceeded string = "Succeeded" + // ScheduledJobSummaryStatusFailed captures enum value "Failed" + ScheduledJobSummaryStatusFailed string = "Failed" + + // ScheduledJobSummaryStatusWaiting captures enum value "Waiting" + ScheduledJobSummaryStatusWaiting string = "Waiting" + // ScheduledJobSummaryStatusStopping captures enum value "Stopping" ScheduledJobSummaryStatusStopping string = "Stopping" // ScheduledJobSummaryStatusStopped captures enum value "Stopped" ScheduledJobSummaryStatusStopped string = "Stopped" - - // ScheduledJobSummaryStatusFailed captures enum value "Failed" - ScheduledJobSummaryStatusFailed string = "Failed" ) // prop value enum diff --git a/models/radix_api/generated_client/models/secret.go b/models/radix_api/generated_client/models/secret.go index 3c8ea3e..a6016e9 100644 --- a/models/radix_api/generated_client/models/secret.go +++ b/models/radix_api/generated_client/models/secret.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "strconv" "github.com/go-openapi/errors" @@ -46,6 +47,7 @@ type Secret struct { // Consistent = Secret exists in Radix config and in cluster // NotAvailable = Secret is available in external secret configuration but not in cluster // Example: Consistent + // Enum: [Pending Consistent NotAvailable Invalid] Status string `json:"status,omitempty"` // StatusMessages contains a list of messages related to the Status @@ -55,8 +57,18 @@ type Secret struct { // The first certificate in the list should be the TLS certificate and the rest should be CA certificates TLSCertificates []*TLSCertificate `json:"tlsCertificates"` - // type - Type SecretType `json:"type,omitempty"` + // Type of the secret + // generic SecretTypeGeneric + // client-cert SecretTypeClientCert + // azure-blob-fuse-volume SecretTypeAzureBlobFuseVolume + // csi-azure-blob-volume SecretTypeCsiAzureBlobVolume + // csi-azure-key-vault-creds SecretTypeCsiAzureKeyVaultCreds + // csi-azure-key-vault-item SecretTypeCsiAzureKeyVaultItem + // client-cert-auth SecretTypeClientCertificateAuth + // oauth2-proxy SecretTypeOAuth2Proxy + // Example: client-cert + // Enum: [generic client-cert azure-blob-fuse-volume csi-azure-blob-volume csi-azure-key-vault-creds csi-azure-key-vault-item client-cert-auth oauth2-proxy] + Type string `json:"type,omitempty"` } // Validate validates this secret @@ -67,6 +79,10 @@ func (m *Secret) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if err := m.validateTLSCertificates(formats); err != nil { res = append(res, err) } @@ -90,6 +106,54 @@ func (m *Secret) validateName(formats strfmt.Registry) error { return nil } +var secretTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Consistent","NotAvailable","Invalid"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretTypeStatusPropEnum = append(secretTypeStatusPropEnum, v) + } +} + +const ( + + // SecretStatusPending captures enum value "Pending" + SecretStatusPending string = "Pending" + + // SecretStatusConsistent captures enum value "Consistent" + SecretStatusConsistent string = "Consistent" + + // SecretStatusNotAvailable captures enum value "NotAvailable" + SecretStatusNotAvailable string = "NotAvailable" + + // SecretStatusInvalid captures enum value "Invalid" + SecretStatusInvalid string = "Invalid" +) + +// prop value enum +func (m *Secret) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Secret) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + func (m *Secret) validateTLSCertificates(formats strfmt.Registry) error { if swag.IsZero(m.TLSCertificates) { // not required return nil @@ -116,17 +180,60 @@ func (m *Secret) validateTLSCertificates(formats strfmt.Registry) error { return nil } +var secretTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["generic","client-cert","azure-blob-fuse-volume","csi-azure-blob-volume","csi-azure-key-vault-creds","csi-azure-key-vault-item","client-cert-auth","oauth2-proxy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretTypeTypePropEnum = append(secretTypeTypePropEnum, v) + } +} + +const ( + + // SecretTypeGeneric captures enum value "generic" + SecretTypeGeneric string = "generic" + + // SecretTypeClientDashCert captures enum value "client-cert" + SecretTypeClientDashCert string = "client-cert" + + // SecretTypeAzureDashBlobDashFuseDashVolume captures enum value "azure-blob-fuse-volume" + SecretTypeAzureDashBlobDashFuseDashVolume string = "azure-blob-fuse-volume" + + // SecretTypeCsiDashAzureDashBlobDashVolume captures enum value "csi-azure-blob-volume" + SecretTypeCsiDashAzureDashBlobDashVolume string = "csi-azure-blob-volume" + + // SecretTypeCsiDashAzureDashKeyDashVaultDashCreds captures enum value "csi-azure-key-vault-creds" + SecretTypeCsiDashAzureDashKeyDashVaultDashCreds string = "csi-azure-key-vault-creds" + + // SecretTypeCsiDashAzureDashKeyDashVaultDashItem captures enum value "csi-azure-key-vault-item" + SecretTypeCsiDashAzureDashKeyDashVaultDashItem string = "csi-azure-key-vault-item" + + // SecretTypeClientDashCertDashAuth captures enum value "client-cert-auth" + SecretTypeClientDashCertDashAuth string = "client-cert-auth" + + // SecretTypeOauth2DashProxy captures enum value "oauth2-proxy" + SecretTypeOauth2DashProxy string = "oauth2-proxy" +) + +// prop value enum +func (m *Secret) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *Secret) validateType(formats strfmt.Registry) error { if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } @@ -141,10 +248,6 @@ func (m *Secret) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -176,24 +279,6 @@ func (m *Secret) contextValidateTLSCertificates(ctx context.Context, formats str return nil } -func (m *Secret) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } - return err - } - - return nil -} - // MarshalBinary interface implementation func (m *Secret) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/models/radix_api/generated_client/models/secret_parameters.go b/models/radix_api/generated_client/models/secret_parameters.go index 5d4439d..b48776c 100644 --- a/models/radix_api/generated_client/models/secret_parameters.go +++ b/models/radix_api/generated_client/models/secret_parameters.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -24,8 +25,18 @@ type SecretParameters struct { // Required: true SecretValue *string `json:"secretValue"` - // type - Type SecretType `json:"type,omitempty"` + // Type of the secret + // generic SecretTypeGeneric + // client-cert SecretTypeClientCert + // azure-blob-fuse-volume SecretTypeAzureBlobFuseVolume + // csi-azure-blob-volume SecretTypeCsiAzureBlobVolume + // csi-azure-key-vault-creds SecretTypeCsiAzureKeyVaultCreds + // csi-azure-key-vault-item SecretTypeCsiAzureKeyVaultItem + // client-cert-auth SecretTypeClientCertificateAuth + // oauth2-proxy SecretTypeOAuth2Proxy + // Example: azure-blob-fuse-volume + // Enum: [generic client-cert azure-blob-fuse-volume csi-azure-blob-volume csi-azure-key-vault-creds csi-azure-key-vault-item client-cert-auth oauth2-proxy] + Type string `json:"type,omitempty"` } // Validate validates this secret parameters @@ -55,55 +66,71 @@ func (m *SecretParameters) validateSecretValue(formats strfmt.Registry) error { return nil } -func (m *SecretParameters) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } +var secretParametersTypeTypePropEnum []interface{} - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } - return err +func init() { + var res []string + if err := json.Unmarshal([]byte(`["generic","client-cert","azure-blob-fuse-volume","csi-azure-blob-volume","csi-azure-key-vault-creds","csi-azure-key-vault-item","client-cert-auth","oauth2-proxy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + secretParametersTypeTypePropEnum = append(secretParametersTypeTypePropEnum, v) } - - return nil } -// ContextValidate validate this secret parameters based on the context it is used -func (m *SecretParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error +const ( - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } + // SecretParametersTypeGeneric captures enum value "generic" + SecretParametersTypeGeneric string = "generic" - if len(res) > 0 { - return errors.CompositeValidationError(res...) + // SecretParametersTypeClientDashCert captures enum value "client-cert" + SecretParametersTypeClientDashCert string = "client-cert" + + // SecretParametersTypeAzureDashBlobDashFuseDashVolume captures enum value "azure-blob-fuse-volume" + SecretParametersTypeAzureDashBlobDashFuseDashVolume string = "azure-blob-fuse-volume" + + // SecretParametersTypeCsiDashAzureDashBlobDashVolume captures enum value "csi-azure-blob-volume" + SecretParametersTypeCsiDashAzureDashBlobDashVolume string = "csi-azure-blob-volume" + + // SecretParametersTypeCsiDashAzureDashKeyDashVaultDashCreds captures enum value "csi-azure-key-vault-creds" + SecretParametersTypeCsiDashAzureDashKeyDashVaultDashCreds string = "csi-azure-key-vault-creds" + + // SecretParametersTypeCsiDashAzureDashKeyDashVaultDashItem captures enum value "csi-azure-key-vault-item" + SecretParametersTypeCsiDashAzureDashKeyDashVaultDashItem string = "csi-azure-key-vault-item" + + // SecretParametersTypeClientDashCertDashAuth captures enum value "client-cert-auth" + SecretParametersTypeClientDashCertDashAuth string = "client-cert-auth" + + // SecretParametersTypeOauth2DashProxy captures enum value "oauth2-proxy" + SecretParametersTypeOauth2DashProxy string = "oauth2-proxy" +) + +// prop value enum +func (m *SecretParameters) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, secretParametersTypeTypePropEnum, true); err != nil { + return err } return nil } -func (m *SecretParameters) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - +func (m *SecretParameters) validateType(formats strfmt.Registry) error { if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } return nil } +// ContextValidate validates this secret parameters based on context it is used +func (m *SecretParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *SecretParameters) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/models/radix_api/generated_client/models/step.go b/models/radix_api/generated_client/models/step.go index c1b2254..b47e10f 100644 --- a/models/radix_api/generated_client/models/step.go +++ b/models/radix_api/generated_client/models/step.go @@ -24,20 +24,20 @@ type Step struct { Components []string `json:"components"` // Ended timestamp - // Example: 2006-01-02T15:04:05Z - Ended string `json:"ended,omitempty"` + // Format: date-time + Ended strfmt.DateTime `json:"ended,omitempty"` // Name of the step // Example: build Name string `json:"name,omitempty"` // Started timestamp - // Example: 2006-01-02T15:04:05Z - Started string `json:"started,omitempty"` + // Format: date-time + Started strfmt.DateTime `json:"started,omitempty"` // Status of the step // Example: Waiting - // Enum: [Waiting Running Succeeded Failed] + // Enum: [Queued Waiting Running Succeeded Failed Stopped StoppedNoChanges] Status string `json:"status,omitempty"` } @@ -45,6 +45,14 @@ type Step struct { func (m *Step) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateEnded(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStarted(formats); err != nil { + res = append(res, err) + } + if err := m.validateStatus(formats); err != nil { res = append(res, err) } @@ -55,11 +63,35 @@ func (m *Step) Validate(formats strfmt.Registry) error { return nil } +func (m *Step) validateEnded(formats strfmt.Registry) error { + if swag.IsZero(m.Ended) { // not required + return nil + } + + if err := validate.FormatOf("ended", "body", "date-time", m.Ended.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Step) validateStarted(formats strfmt.Registry) error { + if swag.IsZero(m.Started) { // not required + return nil + } + + if err := validate.FormatOf("started", "body", "date-time", m.Started.String(), formats); err != nil { + return err + } + + return nil +} + var stepTypeStatusPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Waiting","Running","Succeeded","Failed"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Queued","Waiting","Running","Succeeded","Failed","Stopped","StoppedNoChanges"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -69,6 +101,9 @@ func init() { const ( + // StepStatusQueued captures enum value "Queued" + StepStatusQueued string = "Queued" + // StepStatusWaiting captures enum value "Waiting" StepStatusWaiting string = "Waiting" @@ -80,6 +115,12 @@ const ( // StepStatusFailed captures enum value "Failed" StepStatusFailed string = "Failed" + + // StepStatusStopped captures enum value "Stopped" + StepStatusStopped string = "Stopped" + + // StepStatusStoppedNoChanges captures enum value "StoppedNoChanges" + StepStatusStoppedNoChanges string = "StoppedNoChanges" ) // prop value enum diff --git a/models/radix_api/generated_client/models/tls_certificate.go b/models/radix_api/generated_client/models/tls_certificate.go index 0bf2590..e821f66 100644 --- a/models/radix_api/generated_client/models/tls_certificate.go +++ b/models/radix_api/generated_client/models/tls_certificate.go @@ -28,14 +28,14 @@ type TLSCertificate struct { Issuer *string `json:"issuer"` // NotAfter defines the uppdater date/time validity boundary - // Example: 2023-08-25T23:59:59Z // Required: true - NotAfter interface{} `json:"notAfter"` + // Format: date-time + NotAfter *strfmt.DateTime `json:"notAfter"` // NotBefore defines the lower date/time validity boundary - // Example: 2022-08-09T00:00:00Z // Required: true - NotBefore interface{} `json:"notBefore"` + // Format: date-time + NotBefore *strfmt.DateTime `json:"notBefore"` // Subject contains the distinguished name for the certificate // Example: CN=mysite.example.com,O=MyOrg,L=MyLocation,C=NO @@ -80,8 +80,12 @@ func (m *TLSCertificate) validateIssuer(formats strfmt.Registry) error { func (m *TLSCertificate) validateNotAfter(formats strfmt.Registry) error { - if m.NotAfter == nil { - return errors.Required("notAfter", "body", nil) + if err := validate.Required("notAfter", "body", m.NotAfter); err != nil { + return err + } + + if err := validate.FormatOf("notAfter", "body", "date-time", m.NotAfter.String(), formats); err != nil { + return err } return nil @@ -89,8 +93,12 @@ func (m *TLSCertificate) validateNotAfter(formats strfmt.Registry) error { func (m *TLSCertificate) validateNotBefore(formats strfmt.Registry) error { - if m.NotBefore == nil { - return errors.Required("notBefore", "body", nil) + if err := validate.Required("notBefore", "body", m.NotBefore); err != nil { + return err + } + + if err := validate.FormatOf("notBefore", "body", "date-time", m.NotBefore.String(), formats); err != nil { + return err } return nil diff --git a/radixconfig.yaml b/radixconfig.yaml index cf95f44..d428c89 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -3,6 +3,8 @@ kind: RadixApplication metadata: name: radix-cost-allocation-api spec: + build: + useBuildKit: true environments: - name: prod build: From 89c60a2ab54d1bfe45f83259d80dd5a2bd1d776f Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Thu, 4 Jan 2024 14:09:27 +0100 Subject: [PATCH 2/6] include container registry in from (#106) Co-authored-by: Richard Hagen --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f6cfd5d..5c4cd57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine3.18 as builder +FROM docker.io/golang:1.21-alpine3.18 as builder ENV GO111MODULE=on RUN apk update && \ From ca9c0e6367839e8ea0985f9029766c0cd8d1ac7d Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 27 Feb 2024 12:30:01 +0100 Subject: [PATCH 3/6] Upgrade to Zerolog (#108) * Upgrade to Zerolog * simplify logging * Move env parsing to env model, check client id (audience) * User zerolog from context * Add zerolog middleware * add logging, add traceid to context * use elapsed-ms instead of duration * update radix-common * fix linting * Update models/env.go Co-authored-by: Sergey Smolnikov --------- Co-authored-by: Sergey Smolnikov --- Makefile | 2 +- api/cost/cost_controller.go | 12 ++-- api/cost/cost_controller_test.go | 2 +- api/cost/cost_handler.go | 13 ++-- api/internal/utils/response.go | 8 +-- api/report/report_controller.go | 4 +- api/report/report_controller_test.go | 3 +- api/test/utils.go | 12 +++- api/utils/auth/auth_provider.go | 11 ++- go.mod | 7 +- go.sum | 10 +-- main.go | 38 +++++----- models/env.go | 102 ++++++++++++++++++--------- repository/gorm_logger.go | 57 +++++++++++++++ repository/gorm_repository.go | 2 +- router/server.go | 38 ++++------ router/zerolog_middleware.go | 49 +++++++++++++ 17 files changed, 253 insertions(+), 117 deletions(-) create mode 100644 repository/gorm_logger.go create mode 100644 router/zerolog_middleware.go diff --git a/Makefile b/Makefile index ca929fb..e15e06a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build: $(BINS) .PHONY: test test: - go test -cover ./... + PRETTY_PRINT=yes go test -cover ./... .PHONY: lint lint: bootstrap diff --git a/api/cost/cost_controller.go b/api/cost/cost_controller.go index 20faa7e..b4c826b 100644 --- a/api/cost/cost_controller.go +++ b/api/cost/cost_controller.go @@ -12,7 +12,7 @@ import ( "github.com/equinor/radix-cost-allocation-api/models/radix_api" "github.com/equinor/radix-cost-allocation-api/service" "github.com/gorilla/mux" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" ) const rootPath = "" @@ -172,10 +172,10 @@ func (costController *costController) GetFutureCost(accounts models.Accounts, w func (costController *costController) getFutureCost(accounts models.Accounts, w http.ResponseWriter, r *http.Request, appName string) { handler := NewCostHandler(accounts, costController.radixapi, costController.costService) - cost, err := handler.GetFutureCost(appName) + cost, err := handler.GetFutureCost(r.Context(), appName) if err != nil { - log.Errorf("failed to get future cost. Error: %v", err) + zerolog.Ctx(r.Context()).Error().Err(err).Msg("failed to get future cost") internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get future cost")) return } @@ -186,15 +186,15 @@ func (costController *costController) getFutureCost(accounts models.Accounts, w func (costController *costController) getTotalCosts(accounts models.Accounts, w http.ResponseWriter, r *http.Request, appName *string) { fromTime, toTime, err := getCostPeriod(r) if err != nil { - log.Errorf("failed to get total cost period. Error: %v", err) + zerolog.Ctx(r.Context()).Error().Err(err).Msg("failed to get total cost period") internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost period")) return } handler := NewCostHandler(accounts, costController.radixapi, costController.costService) - cost, err := handler.GetTotalCost(fromTime, toTime, appName) + cost, err := handler.GetTotalCost(r.Context(), fromTime, toTime, appName) if err != nil { - log.Errorf("failed to get total cost. Error: %v", err) + zerolog.Ctx(r.Context()).Error().Err(err).Msg("failed to get total cost") internalutils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get total cost")) return } diff --git a/api/cost/cost_controller_test.go b/api/cost/cost_controller_test.go index 37cee97..1b6305a 100644 --- a/api/cost/cost_controller_test.go +++ b/api/cost/cost_controller_test.go @@ -41,7 +41,7 @@ type controllerTestSuite struct { func (s *controllerTestSuite) SetupTest() { _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") - s.env = models.NewEnv() + s.env, _ = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) s.idToken = mock.NewMockIDToken(ctrl) diff --git a/api/cost/cost_handler.go b/api/cost/cost_handler.go index ed38f3b..3114569 100644 --- a/api/cost/cost_handler.go +++ b/api/cost/cost_handler.go @@ -1,6 +1,7 @@ package cost import ( + "context" "fmt" "time" @@ -12,7 +13,7 @@ import ( "github.com/equinor/radix-cost-allocation-api/models/radix_api/generated_client/client/platform" "github.com/equinor/radix-cost-allocation-api/service" _ "github.com/microsoft/go-mssqldb" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" ) // CostHandler Instance variables @@ -36,7 +37,7 @@ func (costHandler *CostHandler) getToken() string { } // GetTotalCost handler for GetTotalCost -func (costHandler *CostHandler) GetTotalCost(fromTime, toTime *time.Time, appName *string) (*models.ApplicationCostSet, error) { +func (costHandler *CostHandler) GetTotalCost(ctx context.Context, fromTime, toTime *time.Time, appName *string) (*models.ApplicationCostSet, error) { applicationCostSet, err := costHandler.costService.GetCostForPeriod(*fromTime, *toTime) if err != nil { return nil, err @@ -49,7 +50,7 @@ func (costHandler *CostHandler) GetTotalCost(fromTime, toTime *time.Time, appNam rrMap, err := costHandler.getRadixRegistrationMap(appName) if err != nil { - log.Info("Could not get application details. ", err) + zerolog.Ctx(ctx).Info().Err(err).Msg("Could not get application details") return nil, err } @@ -60,7 +61,7 @@ func (costHandler *CostHandler) GetTotalCost(fromTime, toTime *time.Time, appNam } // GetFutureCost estimates cost for the next 30 days based on last run -func (costHandler *CostHandler) GetFutureCost(appName string) (*models.ApplicationCost, error) { +func (costHandler *CostHandler) GetFutureCost(ctx context.Context, appName string) (*models.ApplicationCost, error) { cost, err := costHandler.costService.GetFutureCost(appName) if err != nil { return nil, err @@ -69,7 +70,7 @@ func (costHandler *CostHandler) GetFutureCost(appName string) (*models.Applicati rrMap, err := costHandler.getRadixRegistrationMap(&appName) if err != nil { - log.Debugf("Unable to get application details. Error: %v", err) + zerolog.Ctx(ctx).Debug().Err(err).Msg("Unable to get application details") return nil, err } @@ -80,7 +81,7 @@ func (costHandler *CostHandler) GetFutureCost(appName string) (*models.Applicati } err = fmt.Errorf("user does not have access to application %s", appName) - log.Debugf("Error: %s", err.Error()) + zerolog.Ctx(ctx).Debug().Msgf(err.Error()) return nil, radixhttp.ApplicationNotFoundError("Application was not found.", err) } diff --git a/api/internal/utils/response.go b/api/internal/utils/response.go index 1c8e1c7..dcdadcd 100644 --- a/api/internal/utils/response.go +++ b/api/internal/utils/response.go @@ -5,14 +5,14 @@ import ( "net/http" radixhttp "github.com/equinor/radix-common/net/http" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" ) // ErrorResponseForServer Marshals error for server requester func ErrorResponseForServer(w http.ResponseWriter, r *http.Request, apiError error) { err := radixhttp.ErrorResponseForServer(w, r, apiError) if err != nil { - log.Errorf("%s %s: failed to write server response: %v", r.Method, r.URL.Path, err) + zerolog.Ctx(r.Context()).Error().Err(err).Msgf("%s %s: failed to write server response", r.Method, r.URL.Path) } } @@ -20,7 +20,7 @@ func ErrorResponseForServer(w http.ResponseWriter, r *http.Request, apiError err func JSONResponse(w http.ResponseWriter, r *http.Request, result interface{}) { err := radixhttp.JSONResponse(w, r, result) if err != nil { - log.Errorf("%s %s: failed to write response: %v", r.Method, r.URL.Path, err) + zerolog.Ctx(r.Context()).Error().Err(err).Msgf("%s %s: failed to write response", r.Method, r.URL.Path) } } @@ -29,6 +29,6 @@ func JSONResponse(w http.ResponseWriter, r *http.Request, result interface{}) { func ReaderFileResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, fileName, contentType string) { err := radixhttp.ReaderFileResponse(w, reader, fileName, contentType) if err != nil { - log.Errorf("%s %s: failed to write response: %v", r.Method, r.URL.Path, err) + zerolog.Ctx(r.Context()).Error().Err(err).Msgf("%s %s: failed to write response", r.Method, r.URL.Path) } } diff --git a/api/report/report_controller.go b/api/report/report_controller.go index 47cdcc1..098dfbe 100644 --- a/api/report/report_controller.go +++ b/api/report/report_controller.go @@ -9,7 +9,7 @@ import ( "github.com/equinor/radix-common/models" "github.com/equinor/radix-cost-allocation-api/api/internal/utils" "github.com/equinor/radix-cost-allocation-api/service" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" ) const rootPath = "" @@ -57,7 +57,7 @@ func (rc *reportController) GetCostReport(_ models.Accounts, w http.ResponseWrit err := handler.GetCostReport(&b, fromDate, toDate) if err != nil { - log.Errorf("Failed to get report. Error: %v", err) + zerolog.Ctx(r.Context()).Error().Err(err).Msg("Failed to get report") utils.ErrorResponseForServer(w, r, fmt.Errorf("failed to get report")) } diff --git a/api/report/report_controller_test.go b/api/report/report_controller_test.go index f2b26f8..afe231e 100644 --- a/api/report/report_controller_test.go +++ b/api/report/report_controller_test.go @@ -42,7 +42,7 @@ type controllerTestSuite struct { func (s *controllerTestSuite) SetupTest() { _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") _ = os.Setenv("AD_REPORT_READERS", fmt.Sprintf("{\"groups\": [\"%s\"]}", validADGroup)) - s.env = models.NewEnv() + s.env, _ = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) s.idToken = mock.NewMockIDToken(ctrl) @@ -105,6 +105,7 @@ func (s *controllerTestSuite) TestReportController_AuthorizedUser_CanDownload() controllerTestUtils := controllerTest.NewTestUtils(NewReportController(s.costService)) controllerTestUtils.SetAuthProvider(s.authProvider) + controllerTestUtils.SetAllowedADGroups([]string{validADGroup}) response := controllerTestUtils.ExecuteRequest("GET", "/api/v1/report") s.Equal(response.Code, http.StatusOK) diff --git a/api/test/utils.go b/api/test/utils.go index 092d98a..c46d4b2 100644 --- a/api/test/utils.go +++ b/api/test/utils.go @@ -14,8 +14,9 @@ import ( // Utils Instance variables type Utils struct { - controllers []models.Controller - authProvider auth.AuthProvider + controllers []models.Controller + authProvider auth.AuthProvider + allowedAdGroups []string } // NewTestUtils Constructor @@ -23,6 +24,7 @@ func NewTestUtils(controllers ...models.Controller) Utils { return Utils{ controllers, nil, + make([]string, 0), } } @@ -31,6 +33,10 @@ func (tu *Utils) SetAuthProvider(ap auth.AuthProvider) { tu.authProvider = ap } +func (tu *Utils) SetAllowedADGroups(adGroups []string) { + tu.allowedAdGroups = adGroups +} + // ExecuteRequest Helper method to issue a http request func (tu *Utils) ExecuteRequest(method, endpoint string) *httptest.ResponseRecorder { return tu.ExecuteRequestWithParameters(method, endpoint, nil) @@ -50,7 +56,7 @@ func (tu *Utils) ExecuteRequestWithParameters(method, endpoint string, parameter req.Header.Add("Accept", "application/json") rr := httptest.NewRecorder() - router.NewServer("anyClusterName", tu.authProvider, tu.controllers...).ServeHTTP(rr, req) + router.NewServer("anyClusterName", tu.allowedAdGroups, tu.authProvider, tu.controllers...).ServeHTTP(rr, req) return rr } diff --git a/api/utils/auth/auth_provider.go b/api/utils/auth/auth_provider.go index 2b1cf4e..c16dc7a 100644 --- a/api/utils/auth/auth_provider.go +++ b/api/utils/auth/auth_provider.go @@ -3,7 +3,6 @@ package auth import ( "context" "log" - "os" "github.com/coreos/go-oidc/v3/oidc" ) @@ -56,16 +55,14 @@ func (p *oidcProvider) VerifyToken(ctx context.Context, token string) (IDToken, } // NewAuthProvider creates a new auth provider -func NewAuthProvider(ctx context.Context) AuthProvider { - verifier := getTokenVerifier(ctx) +func NewAuthProvider(ctx context.Context, issuer, audience string) AuthProvider { + verifier := getTokenVerifier(ctx, issuer, audience) return &oidcProvider{ verifier: verifier, } } -func getTokenVerifier(ctx context.Context) *oidc.IDTokenVerifier { - - issuer := os.Getenv("TOKEN_ISSUER") +func getTokenVerifier(ctx context.Context, issuer, audience string) *oidc.IDTokenVerifier { provider, err := oidc.NewProvider(ctx, issuer) @@ -74,7 +71,7 @@ func getTokenVerifier(ctx context.Context) *oidc.IDTokenVerifier { } oidcConfig := &oidc.Config{ - SkipClientIDCheck: true, + ClientID: audience, } return provider.Verifier(oidcConfig) diff --git a/go.mod b/go.mod index 4e656f3..3403c5d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.21.0 require ( github.com/coreos/go-oidc/v3 v3.9.0 - github.com/equinor/radix-common v1.7.1 + github.com/equinor/radix-common v1.8.1 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.26.2 github.com/go-openapi/strfmt v0.22.0 @@ -17,7 +17,8 @@ require ( github.com/microsoft/go-mssqldb v1.6.0 github.com/prometheus/client_golang v1.18.0 github.com/rs/cors v1.10.1 - github.com/sirupsen/logrus v1.9.3 + github.com/rs/xid v1.5.0 + github.com/rs/zerolog v1.31.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 github.com/urfave/negroni/v3 v3.0.0 @@ -30,6 +31,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/elnormous/contenttype v1.0.4 // indirect github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -63,7 +65,6 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/rs/zerolog v1.31.0 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect go.opentelemetry.io/otel v1.17.0 // indirect go.opentelemetry.io/otel/metric v1.17.0 // indirect diff --git a/go.sum b/go.sum index df4aff9..c1b0abb 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/equinor/radix-common v1.7.1 h1:kl7Tuo2VEo2WHGm/vkvktrZ9t9S3Nht7Mob3CSIzcJI= -github.com/equinor/radix-common v1.7.1/go.mod h1:M6mhgHtFQ3rnjJnyOuECXiZOh7XQ5xVeHMyCAU+YPzQ= +github.com/elnormous/contenttype v1.0.4 h1:FjmVNkvQOGqSX70yvocph7keC8DtmJaLzTTq6ZOQCI8= +github.com/elnormous/contenttype v1.0.4/go.mod h1:5KTOW8m1kdX1dLMiUJeN9szzR2xkngiv2K+RVZwWBbI= +github.com/equinor/radix-common v1.8.1 h1:HEFWAKOB0/kDjaqEUiLsGOUX/FKTkZsCtjrLM2hhCVM= +github.com/equinor/radix-common v1.8.1/go.mod h1:kFCVR6PxbJGD11NHNiXq5PJNO+aUThQfTiJF10LCfrE= github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -162,11 +164,10 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -254,7 +255,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/main.go b/main.go index a55e473..b4b17c1 100644 --- a/main.go +++ b/main.go @@ -1,47 +1,45 @@ package main import ( - "context" + "errors" "fmt" "net/http" + _ "net/http/pprof" "os" "github.com/equinor/radix-cost-allocation-api/models/radix_api" "github.com/equinor/radix-cost-allocation-api/repository" "github.com/equinor/radix-cost-allocation-api/service" - _ "net/http/pprof" - "github.com/equinor/radix-cost-allocation-api/api/cost" "github.com/equinor/radix-cost-allocation-api/api/report" "github.com/equinor/radix-cost-allocation-api/api/utils/auth" models "github.com/equinor/radix-cost-allocation-api/models" "github.com/equinor/radix-cost-allocation-api/router" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog/log" "github.com/spf13/pflag" ) func main() { - env := models.NewEnv() + env, ctx := models.NewEnv() fs := initializeFlagSet() port := fs.StringP("port", "p", defaultPort(), "Port where API will be served") - log.Debugf("Port: %s\n", *port) - log.Debugf("Cluster: %s\n", env.ClusterName) + log.Debug().Msgf("Port: %s", *port) + log.Debug().Msgf("Cluster: %s", env.ClusterName) parseFlagsFromArgs(fs) errs := make(chan error) - ctx := context.Background() - authProvider := auth.NewAuthProvider(ctx) + authProvider := auth.NewAuthProvider(ctx, env.OidcIssuer, env.OidcAudience) radixAPIClient := radix_api.NewRadixAPIClient(env) costService := getCostService(env) go func() { - log.Infof("API is serving on port %s", *port) + log.Info().Msgf("API is serving on port %s", *port) addr := fmt.Sprintf(":%s", *port) - handler := router.NewServer(env.ClusterName, authProvider, + handler := router.NewServer(env.ClusterName, env.OidcAllowedAdGroups, authProvider, cost.NewCostController(radixAPIClient, costService), report.NewReportController(costService)) errs <- http.ListenAndServe(addr, handler) @@ -49,14 +47,14 @@ func main() { if env.UseProfiler { go func() { - log.Infof("Profiler endpoint is serving on port 7070") + log.Info().Msgf("Profiler endpoint is serving on port 7070") errs <- http.ListenAndServe("localhost:7070", nil) }() } err := <-errs if err != nil { - log.Fatalf("Radix cost allocation api server crashed: %v", err) + log.Fatal().Err(err).Msg("Radix cost allocation api server crashed") } } @@ -69,7 +67,7 @@ func createContainerCostService(env *models.Env) service.CostService { repository.GetSqlServerDsn(env.DbCredentials.Server, env.DbCredentials.Database, env.DbCredentials.UserID, env.DbCredentials.Password, env.DbCredentials.Port), ) if err != nil { - log.Fatal(err) + log.Fatal().Err(err).Msg("failed to open db repository") } repo := repository.NewGormRepository(gormdb) @@ -80,10 +78,10 @@ func initializeFlagSet() *pflag.FlagSet { // Flag domain. fs := pflag.NewFlagSet("default", pflag.ContinueOnError) fs.Usage = func() { - fmt.Fprintf(os.Stderr, "DESCRIPTION\n") - fmt.Fprintf(os.Stderr, "Radix cost allocation api server.\n") - fmt.Fprintf(os.Stderr, "\n") - fmt.Fprintf(os.Stderr, "FLAGS\n") + _, _ = fmt.Fprintf(os.Stderr, "DESCRIPTION\n") + _, _ = fmt.Fprintf(os.Stderr, "Radix cost allocation api server.\n") + _, _ = fmt.Fprintf(os.Stderr, "\n") + _, _ = fmt.Fprintf(os.Stderr, "FLAGS\n") fs.PrintDefaults() } return fs @@ -92,10 +90,10 @@ func initializeFlagSet() *pflag.FlagSet { func parseFlagsFromArgs(fs *pflag.FlagSet) { err := fs.Parse(os.Args[1:]) switch { - case err == pflag.ErrHelp: + case errors.Is(err, pflag.ErrHelp): os.Exit(0) case err != nil: - fmt.Fprintf(os.Stderr, "Error: %s\n\n", err.Error()) + _, _ = fmt.Fprintf(os.Stderr, "Error: %s\n\n", err.Error()) fs.Usage() os.Exit(2) } diff --git a/models/env.go b/models/env.go index 7004461..427c468 100644 --- a/models/env.go +++ b/models/env.go @@ -1,71 +1,105 @@ package models import ( + "context" "encoding/json" "fmt" "os" "strconv" "strings" + "time" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" ) // Env instance variables type Env struct { - APIEnvironment string - ClusterName string - DNSZone string - UseLocalRadixApi bool - UseProfiler bool - DbCredentials *DBCredentials - Whitelist *Whitelist - Cluster string + APIEnvironment string + ClusterName string + DNSZone string + UseLocalRadixApi bool + UseProfiler bool + DbCredentials *DBCredentials + Whitelist *Whitelist + Cluster string + OidcIssuer string + OidcAudience string + OidcAllowedAdGroups []string } // NewEnv Constructor -func NewEnv() *Env { +func NewEnv() (*Env, context.Context) { + ctx := context.Background() + zerolog.DurationFieldUnit = time.Millisecond switch os.Getenv("LOG_LEVEL") { case "DEBUG": - log.SetLevel(log.DebugLevel) + zerolog.SetGlobalLevel(zerolog.DebugLevel) default: - log.SetLevel(log.InfoLevel) + zerolog.SetGlobalLevel(zerolog.InfoLevel) } + if envVarIsTrueOrYes(os.Getenv("PRETTY_PRINT")) { + log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.TimeOnly}) + } + ctx = log.Logger.WithContext(ctx) + var ( - apiEnv = os.Getenv("RADIX_ENVIRONMENT") - clusterName = os.Getenv("RADIX_CLUSTERNAME") - dnsZone = os.Getenv("RADIX_DNS_ZONE") - whiteList = os.Getenv("WHITELIST") - cluster = os.Getenv("RADIX_CLUSTER_NAME") - useLocalRadixApi = envVarIsTrueOrYes(os.Getenv("USE_LOCAL_RADIX_API")) - useProfiler = envVarIsTrueOrYes(os.Getenv("USE_PROFILER")) + apiEnv = os.Getenv("RADIX_ENVIRONMENT") + clusterName = os.Getenv("RADIX_CLUSTERNAME") + dnsZone = os.Getenv("RADIX_DNS_ZONE") + whiteList = os.Getenv("WHITELIST") + cluster = os.Getenv("RADIX_CLUSTER_NAME") + useLocalRadixApi = envVarIsTrueOrYes(os.Getenv("USE_LOCAL_RADIX_API")) + useProfiler = envVarIsTrueOrYes(os.Getenv("USE_PROFILER")) + issuer = os.Getenv("TOKEN_ISSUER") + audience = os.Getenv("TOKEN_AUDIENCE") + allowedAdGroupsJson = os.Getenv("AD_REPORT_READERS") ) if apiEnv == "" { - log.Error("'API-Environment' environment variable is not set") + log.Error().Msg("'API-Environment' environment variable is not set") } if clusterName == "" { - log.Error("'Cluster' environment variables is not set") + log.Error().Msg("'Cluster' environment variables is not set") } if dnsZone == "" { - log.Error("'DNS Zone' environment variables is not set") + log.Error().Msg("'DNS Zone' environment variables is not set") + } + if issuer == "" { + log.Error().Msg("'TOKEN_ISSUER' environment variables is not set") + } + if audience == "" { + log.Error().Msg("'TOKEN_AUDIENCE' environment variables is not set") + } + if allowedAdGroupsJson == "" { + log.Error().Msg("'AD_REPORT_READERS' environment variables is not set") + } + var allowedGroups struct { + List []string `json:"groups"` + } + err := json.Unmarshal([]byte(allowedAdGroupsJson), &allowedGroups) + if err != nil { + log.Error().Err(err).Msg("could not parse json for allowedADGroups") } list := &Whitelist{} - err := json.Unmarshal([]byte(whiteList), list) - + err = json.Unmarshal([]byte(whiteList), list) if err != nil { - log.Info("Whitelist is not set. ", err) + log.Info().Err(err).Msg("could not parse json for WHITELIST") } return &Env{ - APIEnvironment: apiEnv, - ClusterName: clusterName, - DNSZone: dnsZone, - Whitelist: list, - Cluster: cluster, - UseLocalRadixApi: useLocalRadixApi, - UseProfiler: useProfiler, - DbCredentials: getDBCredentials(), - } + APIEnvironment: apiEnv, + ClusterName: clusterName, + DNSZone: dnsZone, + Whitelist: list, + Cluster: cluster, + UseLocalRadixApi: useLocalRadixApi, + UseProfiler: useProfiler, + DbCredentials: getDBCredentials(), + OidcAudience: audience, + OidcIssuer: issuer, + OidcAllowedAdGroups: allowedGroups.List, + }, ctx } func envVarIsTrueOrYes(envVar string) bool { diff --git a/repository/gorm_logger.go b/repository/gorm_logger.go new file mode 100644 index 0000000..6e2c55a --- /dev/null +++ b/repository/gorm_logger.go @@ -0,0 +1,57 @@ +package repository + +import ( + "context" + "time" + + "github.com/rs/zerolog" + "gorm.io/gorm/logger" +) + +// Copied from https://github.com/mpalmer/gorm-zerolog/blob/master/logger.go @ 27.02.2024 + +type Logger struct { +} + +func NewLogger() Logger { + return Logger{} +} + +func (l Logger) LogMode(logger.LogLevel) logger.Interface { + return l +} + +func (l Logger) Error(ctx context.Context, msg string, opts ...interface{}) { + zerolog.Ctx(ctx).Error().Msgf(msg, opts...) +} + +func (l Logger) Warn(ctx context.Context, msg string, opts ...interface{}) { + zerolog.Ctx(ctx).Warn().Msgf(msg, opts...) +} + +func (l Logger) Info(ctx context.Context, msg string, opts ...interface{}) { + zerolog.Ctx(ctx).Info().Msgf(msg, opts...) +} + +func (l Logger) Trace(ctx context.Context, begin time.Time, f func() (string, int64), err error) { + zl := zerolog.Ctx(ctx) + var event *zerolog.Event + + if err != nil { + event = zl.Debug() + } else { + event = zl.Trace() + } + + event.Dur("elapsed-ms", time.Since(begin)) + + sql, rows := f() + if sql != "" { + event.Str("sql", sql) + } + if rows > -1 { + event.Int64("rows", rows) + } + + event.Send() +} diff --git a/repository/gorm_repository.go b/repository/gorm_repository.go index 2bd511c..ddf9adf 100644 --- a/repository/gorm_repository.go +++ b/repository/gorm_repository.go @@ -26,7 +26,7 @@ func GetSqlServerDsn(server, database, userID, password string, port int) string } func OpenGormSqlServerDB(dsn string) (*gorm.DB, error) { - return gorm.Open(sqlserver.Open(dsn), &gorm.Config{DisableAutomaticPing: true}) + return gorm.Open(sqlserver.Open(dsn), &gorm.Config{DisableAutomaticPing: true, Logger: NewLogger()}) } func NewGormRepository(db *gorm.DB) Repository { diff --git a/router/server.go b/router/server.go index 5c10f69..01c5c1d 100644 --- a/router/server.go +++ b/router/server.go @@ -1,7 +1,6 @@ package router import ( - "encoding/json" "fmt" "net/http" "os" @@ -14,11 +13,11 @@ import ( "github.com/equinor/radix-cost-allocation-api/api/utils/auth" "github.com/equinor/radix-cost-allocation-api/metrics" "github.com/equinor/radix-cost-allocation-api/swaggerui" - "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/cors" - log "github.com/sirupsen/logrus" + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" "github.com/urfave/negroni/v3" ) @@ -37,7 +36,7 @@ type Server struct { } // NewServer Constructor function -func NewServer(clusterName string, authProvider auth.AuthProvider, controllers ...models.Controller) http.Handler { +func NewServer(clusterName string, allowedAdGroups []string, authProvider auth.AuthProvider, controllers ...models.Controller) http.Handler { router := mux.NewRouter().StrictSlash(true) initializeSwaggerUI(router) @@ -50,7 +49,7 @@ func NewServer(clusterName string, authProvider auth.AuthProvider, controllers . )) authenticationMiddleware := newAuthenticationMiddleware(authProvider) - authorizationMiddleware := newADGroupAuthorizationMiddleware(os.Getenv("AD_REPORT_READERS"), authProvider) + authorizationMiddleware := newADGroupAuthorizationMiddleware(allowedAdGroups, authProvider) serveMux.Handle("/api/", negroni.New( authenticationMiddleware, @@ -76,6 +75,7 @@ func NewServer(clusterName string, authProvider auth.AuthProvider, controllers . rec.PrintStack = false n := negroni.New( rec, + NewZerologHandler(log.Logger), ) n.UseHandler(serveMux) @@ -158,15 +158,15 @@ func newAuthenticationMiddleware(authProvider auth.AuthProvider) negroni.Handler token, err := radixhttp.GetBearerTokenFromHeader(r) if err != nil { - log.Info("Could not get token from header") + zerolog.Ctx(r.Context()).Info().Msg("Could not get token from header") w.WriteHeader(http.StatusUnauthorized) return } verified, err := authProvider.VerifyToken(r.Context(), token) - + // TODO: Validate token audience if err != nil || verified == nil { - log.Debugf("Could not verify token. Error: %v", err) + zerolog.Ctx(r.Context()).Debug().Err(err).Msg("Could not verify token") w.WriteHeader(http.StatusUnauthorized) return } @@ -175,21 +175,12 @@ func newAuthenticationMiddleware(authProvider auth.AuthProvider) negroni.Handler } } -func newADGroupAuthorizationMiddleware(allowedADGroups string, authProvider auth.AuthProvider) negroni.HandlerFunc { - var allowedGroups struct { - List []string `json:"groups"` - } - - err := json.Unmarshal([]byte(allowedADGroups), &allowedGroups) - if err != nil { - log.Errorf("could not parse json for allowedADGroups") - } - +func newADGroupAuthorizationMiddleware(allowedADGroups []string, authProvider auth.AuthProvider) negroni.HandlerFunc { return func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { token, err := radixhttp.GetBearerTokenFromHeader(r) if err != nil { - log.Info("Could not get token from header") + zerolog.Ctx(r.Context()).Info().Msg("Could not get token from header") w.WriteHeader(http.StatusUnauthorized) return } @@ -198,7 +189,7 @@ func newADGroupAuthorizationMiddleware(allowedADGroups string, authProvider auth verified, err = authProvider.VerifyToken(r.Context(), token) if err != nil || verified == nil { - log.Debugf("Unable to verify token. Error: %v", err) + zerolog.Ctx(r.Context()).Debug().Err(err).Msg("Unable to verify token") w.WriteHeader(http.StatusUnauthorized) return } @@ -208,18 +199,19 @@ func newADGroupAuthorizationMiddleware(allowedADGroups string, authProvider auth err = verified.GetClaims(claims) if err != nil { - log.Debugf("Could not get claims from token. Error: %v", err) + zerolog.Ctx(r.Context()).Debug().Err(err).Msg("Could not get claims from token") w.WriteHeader(http.StatusUnauthorized) return } for _, group := range claims.Groups { - if find(allowedGroups.List, group) { + if find(allowedADGroups, group) { next(w, r) + return } } - log.Debugf("User does not have correct AD group access. Logged AD groups for user: %v ", claims.Groups) + zerolog.Ctx(r.Context()).Debug().Strs("ad-groups", claims.Groups).Msgf("User does not have correct AD group access") w.WriteHeader(http.StatusForbidden) } } diff --git a/router/zerolog_middleware.go b/router/zerolog_middleware.go new file mode 100644 index 0000000..1e21534 --- /dev/null +++ b/router/zerolog_middleware.go @@ -0,0 +1,49 @@ +package router + +import ( + "net/http" + "time" + + "github.com/rs/xid" + "github.com/rs/zerolog" + "github.com/urfave/negroni/v3" +) + +// Inspired by https://stackoverflow.com/a/50567022/2103434 + +type loggingResponseWriter struct { + http.ResponseWriter + statusCode int +} + +func newLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter { + return &loggingResponseWriter{w, http.StatusOK} +} +func (lrw *loggingResponseWriter) WriteHeader(code int) { + lrw.statusCode = code + lrw.ResponseWriter.WriteHeader(code) +} + +// NewZerologHandler injects and logs requests. +func NewZerologHandler(log zerolog.Logger) negroni.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { + l := log.With().Logger() + l.UpdateContext(func(c zerolog.Context) zerolog.Context { + return c.Str("trace-id", xid.New().String()) + }) + start := time.Now() + r = r.WithContext(l.WithContext(r.Context())) + + statusCodeWriter := newLoggingResponseWriter(w) + next.ServeHTTP(statusCodeWriter, r) + + l.Info(). + Str("user-agent", r.Header.Get("User-Agent")). + Str("remote-addr", r.RemoteAddr). + Str("request", r.Method+" "+r.URL.Path). + Str("query", r.URL.RawQuery). + Dur("elapsed-ms", time.Since(start)). + Int("status", statusCodeWriter.statusCode). + Msg(http.StatusText(statusCodeWriter.statusCode)) + } +} From e88118071a50d6b4c7c6afbee0077196f1c49a48 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 27 Feb 2024 14:55:11 +0100 Subject: [PATCH 4/6] Add token Audience (#109) * Add token audience * exit if config fails * rename variables to variable --- api/cost/cost_controller_test.go | 2 +- api/report/report_controller_test.go | 2 +- main.go | 9 +++++++-- models/env.go | 22 ++++++++++++---------- radixconfig.yaml | 2 ++ 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/api/cost/cost_controller_test.go b/api/cost/cost_controller_test.go index 1b6305a..a5d1627 100644 --- a/api/cost/cost_controller_test.go +++ b/api/cost/cost_controller_test.go @@ -41,7 +41,7 @@ type controllerTestSuite struct { func (s *controllerTestSuite) SetupTest() { _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") - s.env, _ = models.NewEnv() + s.env, _, _ = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) s.idToken = mock.NewMockIDToken(ctrl) diff --git a/api/report/report_controller_test.go b/api/report/report_controller_test.go index afe231e..8506b8a 100644 --- a/api/report/report_controller_test.go +++ b/api/report/report_controller_test.go @@ -42,7 +42,7 @@ type controllerTestSuite struct { func (s *controllerTestSuite) SetupTest() { _ = os.Setenv("WHITELIST", "{\"whiteList\": [\"canarycicd-test\",\"canarycicd-test1\",\"canarycicd-test2\",\"canarycicd-test3\",\"canarycicd-test4\",\"radix-api\",\"radix-canary-golang\",\"radix-cost-allocation-api\",\"radix-github-webhook\",\"radix-platform\",\"radix-web-console\"]}") _ = os.Setenv("AD_REPORT_READERS", fmt.Sprintf("{\"groups\": [\"%s\"]}", validADGroup)) - s.env, _ = models.NewEnv() + s.env, _, _ = models.NewEnv() ctrl := gomock.NewController(s.T()) s.authProvider = mock.NewMockAuthProvider(ctrl) s.idToken = mock.NewMockIDToken(ctrl) diff --git a/main.go b/main.go index b4b17c1..53dee73 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,12 @@ import ( ) func main() { - env, ctx := models.NewEnv() + env, ctx, err := models.NewEnv() + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "Error:\n%s\n\n", err.Error()) + os.Exit(3) + } + fs := initializeFlagSet() port := fs.StringP("port", "p", defaultPort(), "Port where API will be served") @@ -52,7 +57,7 @@ func main() { }() } - err := <-errs + err = <-errs if err != nil { log.Fatal().Err(err).Msg("Radix cost allocation api server crashed") } diff --git a/models/env.go b/models/env.go index 427c468..3f0cf42 100644 --- a/models/env.go +++ b/models/env.go @@ -3,6 +3,7 @@ package models import ( "context" "encoding/json" + "errors" "fmt" "os" "strconv" @@ -29,7 +30,8 @@ type Env struct { } // NewEnv Constructor -func NewEnv() (*Env, context.Context) { +func NewEnv() (*Env, context.Context, error) { + var errs []error ctx := context.Background() zerolog.DurationFieldUnit = time.Millisecond switch os.Getenv("LOG_LEVEL") { @@ -56,35 +58,35 @@ func NewEnv() (*Env, context.Context) { allowedAdGroupsJson = os.Getenv("AD_REPORT_READERS") ) if apiEnv == "" { - log.Error().Msg("'API-Environment' environment variable is not set") + errs = append(errs, fmt.Errorf("environment variable RADIX_ENVIRONMENT is not set")) } if clusterName == "" { - log.Error().Msg("'Cluster' environment variables is not set") + errs = append(errs, fmt.Errorf("environment variable RADIX_CLUSTERNAME is not set")) } if dnsZone == "" { - log.Error().Msg("'DNS Zone' environment variables is not set") + errs = append(errs, fmt.Errorf("environment variable RADIX_DNS_ZONE is not set")) } if issuer == "" { - log.Error().Msg("'TOKEN_ISSUER' environment variables is not set") + errs = append(errs, fmt.Errorf("environment variable TOKEN_ISSUER is not set")) } if audience == "" { - log.Error().Msg("'TOKEN_AUDIENCE' environment variables is not set") + errs = append(errs, fmt.Errorf("environment variable TOKEN_AUDIENCE is not set")) } if allowedAdGroupsJson == "" { - log.Error().Msg("'AD_REPORT_READERS' environment variables is not set") + errs = append(errs, fmt.Errorf("environment variable AD_REPORT_READERS is not set")) } var allowedGroups struct { List []string `json:"groups"` } err := json.Unmarshal([]byte(allowedAdGroupsJson), &allowedGroups) if err != nil { - log.Error().Err(err).Msg("could not parse json for allowedADGroups") + errs = append(errs, fmt.Errorf("could not parse AD_REPORT_READERS json")) } list := &Whitelist{} err = json.Unmarshal([]byte(whiteList), list) if err != nil { - log.Info().Err(err).Msg("could not parse json for WHITELIST") + errs = append(errs, fmt.Errorf("could not parse WHITELIST json")) } return &Env{ @@ -99,7 +101,7 @@ func NewEnv() (*Env, context.Context) { OidcAudience: audience, OidcIssuer: issuer, OidcAllowedAdGroups: allowedGroups.List, - }, ctx + }, ctx, errors.Join(errs...) } func envVarIsTrueOrYes(envVar string) bool { diff --git a/radixconfig.yaml b/radixconfig.yaml index d428c89..5edbc46 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -35,6 +35,8 @@ spec: - WHITELIST - AD_REPORT_READERS - TOKEN_ISSUER + variables: + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" environmentConfig: - environment: qa runAsNonRoot: true From c3ee744d9d69190279d69ac4837e579ff26dcdf5 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 19 Mar 2024 12:29:24 +0100 Subject: [PATCH 5/6] Migrate to workloadidentity (#110) * Add env config * Use Workload Identity * Add platform validation and radix-public-site * Add platform validation and radix-public-site --- .../radix-cost-allocation-api-pr.yml | 33 ++++++++++++ Makefile | 10 ++++ go.mod | 13 +++-- go.sum | 12 +++-- main.go | 7 +-- models/dbcreds.go | 2 - models/env.go | 3 +- radixconfig.c2.yaml | 51 +++++++++++++++++++ radixconfig.dev.yaml | 51 +++++++++++++++++++ radixconfig.platform.yaml | 51 +++++++++++++++++++ radixconfig.playground.yaml | 51 +++++++++++++++++++ radixconfig.tpl.yaml | 51 +++++++++++++++++++ radixconfig.yaml | 28 ++++------ repository/gorm_repository.go | 23 +++++---- 14 files changed, 343 insertions(+), 43 deletions(-) create mode 100644 radixconfig.c2.yaml create mode 100644 radixconfig.dev.yaml create mode 100644 radixconfig.platform.yaml create mode 100644 radixconfig.playground.yaml create mode 100644 radixconfig.tpl.yaml diff --git a/.github/workflows/radix-cost-allocation-api-pr.yml b/.github/workflows/radix-cost-allocation-api-pr.yml index 399f13d..b5416dc 100644 --- a/.github/workflows/radix-cost-allocation-api-pr.yml +++ b/.github/workflows/radix-cost-allocation-api-pr.yml @@ -75,3 +75,36 @@ jobs: message-id: breaking-comment preformatted: true message-path: /tmp/swagger_breaking_changes.txt + + test-radixconfig: + name: Test RadixConfig + runs-on: ubuntu-latest + steps: + - name: 'Fake TOKEN FOR RADIX CLI' + run: echo "APP_SERVICE_ACCOUNT_TOKEN=hello-world" >> $GITHUB_ENV + - uses: actions/checkout@v4 + - run: git fetch --no-tags --no-recurse-submodules --depth=1 origin master:master + + - run: make generate-radixconfig-envs + - name: Test radixconfig template changes + run: git diff --exit-code + + - name: 'Validate C2' + uses: equinor/radix-github-actions@v1 + with: + args: validate radix-config --config-file radixconfig.c2.yaml + + - name: 'Validate DEV' + uses: equinor/radix-github-actions@v1 + with: + args: validate radix-config --config-file radixconfig.dev.yaml + + - name: 'Validate Playground' + uses: equinor/radix-github-actions@v1 + with: + args: validate radix-config --config-file radixconfig.playground.yaml + + - name: 'Validate Platform' + uses: equinor/radix-github-actions@v1 + with: + args: validate radix-config --config-file radixconfig.platform.yaml diff --git a/Makefile b/Makefile index e15e06a..636c198 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,16 @@ lint: bootstrap generate-radix-api-client: bootstrap swagger generate client -t ./models/radix_api/generated_client -f https://api.radix.equinor.com/swaggerui/swagger.json -A radixapi + +.PHONY: generate-radixconfig-envs +generate-radixconfig-envs: + # radix-id-vulnerability-scan-reader- + AZURE_CLIENT_ID=b8fd30d4-61d0-4842-b6c1-e91ceb58db8c SQL_SERVER=sql-radix-cost-allocation-dev.database.windows.net envsubst < radixconfig.tpl.yaml > radixconfig.dev.yaml + AZURE_CLIENT_ID=bb6d92a0-2f6d-421e-80e6-1b2174953d21 SQL_SERVER=sql-radix-cost-allocation-c2-prod.database.windows.net envsubst < radixconfig.tpl.yaml > radixconfig.c2.yaml + AZURE_CLIENT_ID=ed3ef8ee-c9b2-4a89-9b0d-47b40abb2bf1 SQL_SERVER=sql-radix-cost-allocation-prod.database.windows.net envsubst < radixconfig.tpl.yaml > radixconfig.platform.yaml + AZURE_CLIENT_ID=bc4b6c73-78c2-4b22-ab08-575706a338ec SQL_SERVER=sql-radix-cost-allocation-playground.database.windows.net envsubst < radixconfig.tpl.yaml > radixconfig.playground.yaml + + # This make command is only needed for local testing now # we also do make swagger inside Dockerfile .PHONY: swagger diff --git a/go.mod b/go.mod index 3403c5d..704ee4e 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.21.0 require ( github.com/coreos/go-oidc/v3 v3.9.0 - github.com/equinor/radix-common v1.8.1 + github.com/equinor/radix-common v1.9.2 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.26.2 github.com/go-openapi/strfmt v0.22.0 @@ -23,17 +23,21 @@ require ( github.com/stretchr/testify v1.8.4 github.com/urfave/negroni/v3 v3.0.0 gorm.io/driver/sqlserver v1.5.2 - gorm.io/gorm v1.25.5 + gorm.io/gorm v1.25.7 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/elnormous/contenttype v1.0.4 // indirect github.com/go-jose/go-jose/v3 v3.0.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.22.0 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect @@ -42,6 +46,7 @@ require ( github.com/go-openapi/spec v0.20.13 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -51,6 +56,7 @@ require ( github.com/jinzhu/now v1.1.5 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect @@ -60,6 +66,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect diff --git a/go.sum b/go.sum index c1b0abb..84ea49c 100644 --- a/go.sum +++ b/go.sum @@ -29,16 +29,18 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/elnormous/contenttype v1.0.4 h1:FjmVNkvQOGqSX70yvocph7keC8DtmJaLzTTq6ZOQCI8= github.com/elnormous/contenttype v1.0.4/go.mod h1:5KTOW8m1kdX1dLMiUJeN9szzR2xkngiv2K+RVZwWBbI= -github.com/equinor/radix-common v1.8.1 h1:HEFWAKOB0/kDjaqEUiLsGOUX/FKTkZsCtjrLM2hhCVM= -github.com/equinor/radix-common v1.8.1/go.mod h1:kFCVR6PxbJGD11NHNiXq5PJNO+aUThQfTiJF10LCfrE= +github.com/equinor/radix-common v1.9.2 h1:pOYN/mSAoPe6KO/Nvudfd5DUETbLv4nLTLzFPr62ADw= +github.com/equinor/radix-common v1.9.2/go.mod h1:ekn86U68NT4ccSdt3GT+ukpiclzfuhr96a7zBJKv/jw= github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/analysis v0.22.0 h1:wQ/d07nf78HNj4u+KiSY0sT234IAyePPbMgpUjUJQR0= @@ -314,8 +316,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/sqlserver v1.5.2 h1:+o4RQ8w1ohPbADhFqDxeeZnSWjwOcBnxBckjTbcP4wk= gorm.io/driver/sqlserver v1.5.2/go.mod h1:gaKF0MO0cfTq9Q3/XhkowSw4g6nIwHPGAs4hzKCmvBo= gorm.io/gorm v1.25.2-0.20230610234218-206613868439/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= -gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= diff --git a/main.go b/main.go index 53dee73..46fcc3b 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "net/http" _ "net/http/pprof" "os" + "runtime/debug" "github.com/equinor/radix-cost-allocation-api/models/radix_api" "github.com/equinor/radix-cost-allocation-api/repository" @@ -26,6 +27,8 @@ func main() { _, _ = fmt.Fprintf(os.Stderr, "Error:\n%s\n\n", err.Error()) os.Exit(3) } + info, _ := debug.ReadBuildInfo() + log.Info().Str("version", info.Main.Version).Msg("Running") fs := initializeFlagSet() port := fs.StringP("port", "p", defaultPort(), "Port where API will be served") @@ -68,9 +71,7 @@ func getCostService(env *models.Env) service.CostService { } func createContainerCostService(env *models.Env) service.CostService { - gormdb, err := repository.OpenGormSqlServerDB( - repository.GetSqlServerDsn(env.DbCredentials.Server, env.DbCredentials.Database, env.DbCredentials.UserID, env.DbCredentials.Password, env.DbCredentials.Port), - ) + gormdb, err := repository.OpenGormSqlServerDB(env.DbCredentials.Server, env.DbCredentials.Database, env.DbCredentials.Port) if err != nil { log.Fatal().Err(err).Msg("failed to open db repository") } diff --git a/models/dbcreds.go b/models/dbcreds.go index d385b78..2296316 100644 --- a/models/dbcreds.go +++ b/models/dbcreds.go @@ -5,6 +5,4 @@ type DBCredentials struct { Server string Port int Database string - UserID string - Password string } diff --git a/models/env.go b/models/env.go index 3f0cf42..d5c91f7 100644 --- a/models/env.go +++ b/models/env.go @@ -43,6 +43,7 @@ func NewEnv() (*Env, context.Context, error) { if envVarIsTrueOrYes(os.Getenv("PRETTY_PRINT")) { log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.TimeOnly}) } + zerolog.DefaultContextLogger = &log.Logger ctx = log.Logger.WithContext(ctx) var ( @@ -135,8 +136,6 @@ func getDBCredentials() *DBCredentials { return &DBCredentials{ Server: os.Getenv("SQL_SERVER"), Database: os.Getenv("SQL_DATABASE"), - UserID: os.Getenv("SQL_USER"), - Password: os.Getenv("SQL_PASSWORD"), Port: port, } } diff --git a/radixconfig.c2.yaml b/radixconfig.c2.yaml new file mode 100644 index 0000000..6291a33 --- /dev/null +++ b/radixconfig.c2.yaml @@ -0,0 +1,51 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: radix-cost-allocation-api +spec: + build: + useBuildKit: true + environments: + - name: prod + build: + from: release + - name: qa + build: + from: master + components: + - name: "server" + src: "." + dockerfileName: "Dockerfile" + ports: + - name: http + port: 3003 + resources: + requests: + memory: "1500Mi" + cpu: "20m" + limits: + memory: "2000Mi" + cpu: "1000m" + public: true + monitoring: true + runAsNonRoot: true + variables: + LOG_LEVEL: INFO + SQL_SERVER: "sql-radix-cost-allocation-c2-prod.database.windows.net" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "bb6d92a0-2f6d-421e-80e6-1b2174953d21" + environmentConfig: + - environment: qa + replicas: 1 + variables: + PIPELINE_IMG_TAG: "master-latest" + - environment: prod + replicas: 2 + variables: + PIPELINE_IMG_TAG: "release-latest" diff --git a/radixconfig.dev.yaml b/radixconfig.dev.yaml new file mode 100644 index 0000000..8566957 --- /dev/null +++ b/radixconfig.dev.yaml @@ -0,0 +1,51 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: radix-cost-allocation-api +spec: + build: + useBuildKit: true + environments: + - name: prod + build: + from: release + - name: qa + build: + from: master + components: + - name: "server" + src: "." + dockerfileName: "Dockerfile" + ports: + - name: http + port: 3003 + resources: + requests: + memory: "1500Mi" + cpu: "20m" + limits: + memory: "2000Mi" + cpu: "1000m" + public: true + monitoring: true + runAsNonRoot: true + variables: + LOG_LEVEL: INFO + SQL_SERVER: "sql-radix-cost-allocation-dev.database.windows.net" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "b8fd30d4-61d0-4842-b6c1-e91ceb58db8c" + environmentConfig: + - environment: qa + replicas: 1 + variables: + PIPELINE_IMG_TAG: "master-latest" + - environment: prod + replicas: 2 + variables: + PIPELINE_IMG_TAG: "release-latest" diff --git a/radixconfig.platform.yaml b/radixconfig.platform.yaml new file mode 100644 index 0000000..e52a97d --- /dev/null +++ b/radixconfig.platform.yaml @@ -0,0 +1,51 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: radix-cost-allocation-api +spec: + build: + useBuildKit: true + environments: + - name: prod + build: + from: release + - name: qa + build: + from: master + components: + - name: "server" + src: "." + dockerfileName: "Dockerfile" + ports: + - name: http + port: 3003 + resources: + requests: + memory: "1500Mi" + cpu: "20m" + limits: + memory: "2000Mi" + cpu: "1000m" + public: true + monitoring: true + runAsNonRoot: true + variables: + LOG_LEVEL: INFO + SQL_SERVER: "sql-radix-cost-allocation-prod.database.windows.net" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "ed3ef8ee-c9b2-4a89-9b0d-47b40abb2bf1" + environmentConfig: + - environment: qa + replicas: 1 + variables: + PIPELINE_IMG_TAG: "master-latest" + - environment: prod + replicas: 2 + variables: + PIPELINE_IMG_TAG: "release-latest" diff --git a/radixconfig.playground.yaml b/radixconfig.playground.yaml new file mode 100644 index 0000000..d1e62d1 --- /dev/null +++ b/radixconfig.playground.yaml @@ -0,0 +1,51 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: radix-cost-allocation-api +spec: + build: + useBuildKit: true + environments: + - name: prod + build: + from: release + - name: qa + build: + from: master + components: + - name: "server" + src: "." + dockerfileName: "Dockerfile" + ports: + - name: http + port: 3003 + resources: + requests: + memory: "1500Mi" + cpu: "20m" + limits: + memory: "2000Mi" + cpu: "1000m" + public: true + monitoring: true + runAsNonRoot: true + variables: + LOG_LEVEL: INFO + SQL_SERVER: "sql-radix-cost-allocation-playground.database.windows.net" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "bc4b6c73-78c2-4b22-ab08-575706a338ec" + environmentConfig: + - environment: qa + replicas: 1 + variables: + PIPELINE_IMG_TAG: "master-latest" + - environment: prod + replicas: 2 + variables: + PIPELINE_IMG_TAG: "release-latest" diff --git a/radixconfig.tpl.yaml b/radixconfig.tpl.yaml new file mode 100644 index 0000000..736b458 --- /dev/null +++ b/radixconfig.tpl.yaml @@ -0,0 +1,51 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: radix-cost-allocation-api +spec: + build: + useBuildKit: true + environments: + - name: prod + build: + from: release + - name: qa + build: + from: master + components: + - name: "server" + src: "." + dockerfileName: "Dockerfile" + ports: + - name: http + port: 3003 + resources: + requests: + memory: "1500Mi" + cpu: "20m" + limits: + memory: "2000Mi" + cpu: "1000m" + public: true + monitoring: true + runAsNonRoot: true + variables: + LOG_LEVEL: INFO + SQL_SERVER: "${SQL_SERVER}" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' + TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "${AZURE_CLIENT_ID}" + environmentConfig: + - environment: qa + replicas: 1 + variables: + PIPELINE_IMG_TAG: "master-latest" + - environment: prod + replicas: 2 + variables: + PIPELINE_IMG_TAG: "release-latest" diff --git a/radixconfig.yaml b/radixconfig.yaml index 5edbc46..4a35add 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -27,31 +27,25 @@ spec: memory: "2000Mi" cpu: "1000m" public: true - secrets: - - SQL_SERVER - - SQL_DATABASE - - SQL_USER - - SQL_PASSWORD - - WHITELIST - - AD_REPORT_READERS - - TOKEN_ISSUER + monitoring: true + runAsNonRoot: true variables: + LOG_LEVEL: INFO + SQL_SERVER: "${SQL_SERVER}" + SQL_DATABASE: "sqldb-radix-cost-allocation" + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" + TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" + identity: + azure: + clientId: "b8fd30d4-61d0-4842-b6c1-e91ceb58db8c" environmentConfig: - environment: qa - runAsNonRoot: true replicas: 1 - horizontalScaling: - minReplicas: 1 - maxReplicas: 1 - monitoring: true variables: PIPELINE_IMG_TAG: "master-latest" - LOG_LEVEL: INFO - environment: prod - runAsNonRoot: true replicas: 2 - monitoring: true variables: PIPELINE_IMG_TAG: "release-latest" - LOG_LEVEL: INFO diff --git a/repository/gorm_repository.go b/repository/gorm_repository.go index ddf9adf..184a6d8 100644 --- a/repository/gorm_repository.go +++ b/repository/gorm_repository.go @@ -4,7 +4,9 @@ import ( "fmt" "time" + commongorm "github.com/equinor/radix-common/pkg/gorm" "github.com/equinor/radix-cost-allocation-api/models" + "github.com/microsoft/go-mssqldb/azuread" "gorm.io/driver/sqlserver" "gorm.io/gorm" "gorm.io/gorm/clause" @@ -14,19 +16,18 @@ type gormRepository struct { db *gorm.DB } -func GetSqlServerDsn(server, database, userID, password string, port int) string { - dsn := fmt.Sprintf("server=%s;user id=%s;password=%s;database=%s", - server, userID, password, database) +func OpenGormSqlServerDB(server, database string, port int) (*gorm.DB, error) { + dsn := fmt.Sprintf("server=%s;database=%s;port=%d;fedauth=ActiveDirectoryDefault", server, database, port) - if port > 0 { - dsn = fmt.Sprintf("%s;port=%d", dsn, port) - } + dialector := sqlserver.New(sqlserver.Config{ + DriverName: azuread.DriverName, + DSN: dsn, + }) - return dsn -} - -func OpenGormSqlServerDB(dsn string) (*gorm.DB, error) { - return gorm.Open(sqlserver.Open(dsn), &gorm.Config{DisableAutomaticPing: true, Logger: NewLogger()}) + return gorm.Open(dialector, &gorm.Config{ + DisableAutomaticPing: false, + Logger: commongorm.NewLogger(), + }) } func NewGormRepository(db *gorm.DB) Repository { From ada0a004c6736b95a38724806fb25765ee67cd3a Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 19 Mar 2024 16:09:19 +0100 Subject: [PATCH 6/6] Add platform validation and radix-public-site (#111) --- radixconfig.c2.yaml | 2 +- radixconfig.dev.yaml | 2 +- radixconfig.platform.yaml | 2 +- radixconfig.playground.yaml | 2 +- radixconfig.tpl.yaml | 2 +- radixconfig.yaml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/radixconfig.c2.yaml b/radixconfig.c2.yaml index 6291a33..aa7ae6e 100644 --- a/radixconfig.c2.yaml +++ b/radixconfig.c2.yaml @@ -33,7 +33,7 @@ spec: LOG_LEVEL: INFO SQL_SERVER: "sql-radix-cost-allocation-c2-prod.database.windows.net" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" diff --git a/radixconfig.dev.yaml b/radixconfig.dev.yaml index 8566957..14d99d9 100644 --- a/radixconfig.dev.yaml +++ b/radixconfig.dev.yaml @@ -33,7 +33,7 @@ spec: LOG_LEVEL: INFO SQL_SERVER: "sql-radix-cost-allocation-dev.database.windows.net" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" diff --git a/radixconfig.platform.yaml b/radixconfig.platform.yaml index e52a97d..ea4f280 100644 --- a/radixconfig.platform.yaml +++ b/radixconfig.platform.yaml @@ -33,7 +33,7 @@ spec: LOG_LEVEL: INFO SQL_SERVER: "sql-radix-cost-allocation-prod.database.windows.net" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" diff --git a/radixconfig.playground.yaml b/radixconfig.playground.yaml index d1e62d1..f53d014 100644 --- a/radixconfig.playground.yaml +++ b/radixconfig.playground.yaml @@ -33,7 +33,7 @@ spec: LOG_LEVEL: INFO SQL_SERVER: "sql-radix-cost-allocation-playground.database.windows.net" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" diff --git a/radixconfig.tpl.yaml b/radixconfig.tpl.yaml index 736b458..3780de0 100644 --- a/radixconfig.tpl.yaml +++ b/radixconfig.tpl.yaml @@ -33,7 +33,7 @@ spec: LOG_LEVEL: INFO SQL_SERVER: "${SQL_SERVER}" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-public-site","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/" diff --git a/radixconfig.yaml b/radixconfig.yaml index 4a35add..f732b49 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -31,9 +31,9 @@ spec: runAsNonRoot: true variables: LOG_LEVEL: INFO - SQL_SERVER: "${SQL_SERVER}" + SQL_SERVER: "sql-radix-cost-allocation-dev.database.windows.net" SQL_DATABASE: "sqldb-radix-cost-allocation" - WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"[]}' + WHITELIST: '{"whiteList":["canarycicd-test","canarycicd-test1","canarycicd-test2","canarycicd-test3","canarycicd-test4","radix-api","radix-canary-golang","radix-cost-allocation-api","radix-github-webhook","radix-platform","radix-web-console","radix-vulnerability-scanner-api","radix-networkpolicy-canary","radix-servicenow-proxy"]}' AD_REPORT_READERS: '{"groups":["ad4f6a93-79fb-4a6e-9861-e280bf6cb4e6"]}' TOKEN_AUDIENCE: "6dae42f8-4368-4678-94ff-3960e28e3630" TOKEN_ISSUER: "https://sts.windows.net/3aa4a235-b6e2-48d5-9195-7fcf05b459b0/"