diff --git a/Makefile b/Makefile index 72bb7fd4..a15b9fc0 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ ifndef HAS_SWAGGER go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5 endif ifndef HAS_GOLANGCI_LINT - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 + 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 diff --git a/api/alerting/alerting_controller.go b/api/alerting/alerting_controller.go index 098b87a4..e1753244 100644 --- a/api/alerting/alerting_controller.go +++ b/api/alerting/alerting_controller.go @@ -6,7 +6,6 @@ import ( alertingModels "github.com/equinor/radix-api/api/alerting/models" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" crdutils "github.com/equinor/radix-operator/pkg/apis/utils" "github.com/gorilla/mux" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -30,42 +29,42 @@ func (ec *alertingController) GetRoutes() models.Routes { models.Route{ Path: envPath + "/alerting", Method: "PUT", - HandlerFunc: EnvironmentRouteAccessCheck(UpdateEnvironmentAlertingConfig), + HandlerFunc: ec.EnvironmentRouteAccessCheck(ec.UpdateEnvironmentAlertingConfig), }, models.Route{ Path: envPath + "/alerting", Method: http.MethodGet, - HandlerFunc: EnvironmentRouteAccessCheck(GetEnvironmentAlertingConfig), + HandlerFunc: ec.EnvironmentRouteAccessCheck(ec.GetEnvironmentAlertingConfig), }, models.Route{ Path: envPath + "/alerting/enable", Method: http.MethodPost, - HandlerFunc: EnvironmentRouteAccessCheck(EnableEnvironmentAlerting), + HandlerFunc: ec.EnvironmentRouteAccessCheck(ec.EnableEnvironmentAlerting), }, models.Route{ Path: envPath + "/alerting/disable", Method: http.MethodPost, - HandlerFunc: EnvironmentRouteAccessCheck(DisableEnvironmentAlerting), + HandlerFunc: ec.EnvironmentRouteAccessCheck(ec.DisableEnvironmentAlerting), }, models.Route{ Path: appPath + "/alerting", Method: "PUT", - HandlerFunc: UpdateApplicationAlertingConfig, + HandlerFunc: ec.UpdateApplicationAlertingConfig, }, models.Route{ Path: appPath + "/alerting", Method: http.MethodGet, - HandlerFunc: GetApplicationAlertingConfig, + HandlerFunc: ec.GetApplicationAlertingConfig, }, models.Route{ Path: appPath + "/alerting/enable", Method: http.MethodPost, - HandlerFunc: EnableApplicationAlerting, + HandlerFunc: ec.EnableApplicationAlerting, }, models.Route{ Path: appPath + "/alerting/disable", Method: http.MethodPost, - HandlerFunc: DisableApplicationAlerting, + HandlerFunc: ec.DisableApplicationAlerting, }, } @@ -74,14 +73,14 @@ func (ec *alertingController) GetRoutes() models.Routes { // EnvironmentRouteAccessCheck gets appName and envName from route and verifies that environment exists // Returns 404 NotFound if environment is not defined, otherwise calls handler -func EnvironmentRouteAccessCheck(handler models.RadixHandlerFunc) models.RadixHandlerFunc { +func (ec *alertingController) EnvironmentRouteAccessCheck(handler models.RadixHandlerFunc) models.RadixHandlerFunc { return func(a models.Accounts, rw http.ResponseWriter, r *http.Request) { appName := mux.Vars(r)["appName"] envName := mux.Vars(r)["envName"] envNamespace := crdutils.GetEnvironmentNamespace(appName, envName) if _, err := a.ServiceAccount.RadixClient.RadixV1().RadixEnvironments().Get(r.Context(), envNamespace, v1.GetOptions{}); err != nil { - radixhttp.ErrorResponse(rw, r, err) + ec.ErrorResponse(rw, r, err) return } @@ -90,7 +89,7 @@ func EnvironmentRouteAccessCheck(handler models.RadixHandlerFunc) models.RadixHa } // UpdateEnvironmentAlertingConfig Configures alert settings -func UpdateEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *alertingController) UpdateEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation PUT /applications/{appName}/environments/{envName}/alerting environment updateEnvironmentAlertingConfig // --- // summary: Update alerts configuration for an environment @@ -142,7 +141,7 @@ func UpdateEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWr var updateAlertingConfig alertingModels.UpdateAlertingConfig if err := json.NewDecoder(r.Body).Decode(&updateAlertingConfig); err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } @@ -150,15 +149,15 @@ func UpdateEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWr alertsConfig, err := alertHandler.UpdateAlertingConfig(r.Context(), updateAlertingConfig) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // GetEnvironmentAlertingConfig returns alerts configuration -func GetEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *alertingController) GetEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/environments/{envName}/alerting environment getEnvironmentAlertingConfig // --- // summary: Get alerts configuration for an environment @@ -203,15 +202,15 @@ func GetEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWrite alertsConfig, err := alertHandler.GetAlertingConfig(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // EnableEnvironmentAlerting enables alerting for application environment -func EnableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *alertingController) EnableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/environments/{envName}/alerting/enable environment enableEnvironmentAlerting // --- // summary: Enable alerting for an environment @@ -258,15 +257,15 @@ func EnableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, alertsConfig, err := alertHandler.EnableAlerting(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // DisableEnvironmentAlerting disables alerting for application environment -func DisableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *alertingController) DisableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/environments/{envName}/alerting/disable environment disableEnvironmentAlerting // --- // summary: Disable alerting for an environment @@ -312,15 +311,15 @@ func DisableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter, alertHandler := NewEnvironmentHandler(accounts, appName, envName) alertsConfig, err := alertHandler.DisableAlerting(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // UpdateApplicationAlertingConfig Configures alert settings -func UpdateApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func(ec *alertingController) UpdateApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation PUT /applications/{appName}/alerting application updateApplicationAlertingConfig // --- // summary: Update alerts configuration for application namespace @@ -366,7 +365,7 @@ func UpdateApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWr var updateAlertingConfig alertingModels.UpdateAlertingConfig if err := json.NewDecoder(r.Body).Decode(&updateAlertingConfig); err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } @@ -374,15 +373,15 @@ func UpdateApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWr alertsConfig, err := alertHandler.UpdateAlertingConfig(r.Context(), updateAlertingConfig) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // GetApplicationAlertingConfig returns alerts configuration -func GetApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func(ec *alertingController) GetApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/alerting application getApplicationAlertingConfig // --- // summary: Get alerts configuration for application namespace @@ -421,15 +420,15 @@ func GetApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWrite alertsConfig, err := alertHandler.GetAlertingConfig(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // EnableApplicationAlerting enables alerting for application -func EnableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func(ec *alertingController) EnableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/alerting/enable application enableApplicationAlerting // --- // summary: Enable alerting for application namespace @@ -470,15 +469,15 @@ func EnableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, alertsConfig, err := alertHandler.EnableAlerting(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } // DisableApplicationAlerting disables alerting for application -func DisableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func(ec *alertingController) DisableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/alerting/disable application disableApplicationAlerting // --- // summary: Disable alerting for application namespace @@ -518,9 +517,9 @@ func DisableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter, alertHandler := NewApplicationHandler(accounts, appName) alertsConfig, err := alertHandler.DisableAlerting(r.Context()) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, alertsConfig) + ec.JSONResponse(w, r, alertsConfig) } diff --git a/api/applications/applications_controller.go b/api/applications/applications_controller.go index 1fefb2bd..329fac93 100644 --- a/api/applications/applications_controller.go +++ b/api/applications/applications_controller.go @@ -8,7 +8,6 @@ import ( applicationModels "github.com/equinor/radix-api/api/applications/models" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -183,12 +182,11 @@ func (ac *applicationController) ShowApplications(accounts models.Accounts, w ht appRegistrations, err := handler.GetApplications(r.Context(), matcher, ac.hasAccessToRR, GetApplicationsOptions{}) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appRegistrations) -} + ac.JSONResponse(w, r, appRegistrations)} // SearchApplications Gets applications by list of application names func (ac *applicationController) SearchApplications(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { @@ -292,7 +290,7 @@ func (ac *applicationController) SearchApplications(accounts models.Accounts, w } case http.MethodPost: if err := json.NewDecoder(r.Body).Decode(&appNamesRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } default: @@ -302,7 +300,7 @@ func (ac *applicationController) SearchApplications(accounts models.Accounts, w // No need to perform search if names in request is empty. Just return empty list if len(appNamesRequest.Names) == 0 { - radixhttp.JSONResponse(w, r, []interface{}{}) + ac.JSONResponse(w, r, []interface{}{}) return } @@ -319,11 +317,11 @@ func (ac *applicationController) SearchApplications(accounts models.Accounts, w }, ) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appRegistrations) + ac.JSONResponse(w, r, appRegistrations) } // GetApplication Gets application by application name @@ -370,11 +368,11 @@ func (ac *applicationController) GetApplication(accounts models.Accounts, w http application, err := handler.GetApplication(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &application) + ac.JSONResponse(w, r, &application) } // IsDeployKeyValidHandler validates deploy key for radix application found for application name @@ -416,11 +414,11 @@ func (ac *applicationController) IsDeployKeyValidHandler(accounts models.Account isDeployKeyValid, err := IsDeployKeyValid(r.Context(), accounts.UserAccount, appName) if isDeployKeyValid { - radixhttp.JSONResponse(w, r, &isDeployKeyValid) + ac.JSONResponse(w, r, &isDeployKeyValid) return } - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) } // RegenerateDeployKeyHandler Regenerates deploy key and secret and returns the new key @@ -463,13 +461,13 @@ func (ac *applicationController) RegenerateDeployKeyHandler(accounts models.Acco handler := ac.applicationHandlerFactory.Create(accounts) var sharedSecretAndPrivateKey applicationModels.RegenerateDeployKeyAndSecretData if err := json.NewDecoder(r.Body).Decode(&sharedSecretAndPrivateKey); err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } err := handler.RegenerateDeployKey(r.Context(), appName, sharedSecretAndPrivateKey) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } @@ -510,11 +508,11 @@ func (ac *applicationController) GetDeployKeyAndSecret(accounts models.Accounts, deployKeyAndSecret, err := handler.GetDeployKeyAndSecret(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &deployKeyAndSecret) + ac.JSONResponse(w, r, &deployKeyAndSecret) } @@ -553,7 +551,7 @@ func (ac *applicationController) RegisterApplication(accounts models.Accounts, w // description: "Conflict" var applicationRegistrationRequest applicationModels.ApplicationRegistrationRequest if err := json.NewDecoder(r.Body).Decode(&applicationRegistrationRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } @@ -561,11 +559,11 @@ func (ac *applicationController) RegisterApplication(accounts models.Accounts, w handler := ac.applicationHandlerFactory.Create(accounts) appRegistrationUpsertResponse, err := handler.RegisterApplication(r.Context(), applicationRegistrationRequest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &appRegistrationUpsertResponse) + ac.JSONResponse(w, r, &appRegistrationUpsertResponse) } // ChangeRegistrationDetails Updates application registration @@ -612,7 +610,7 @@ func (ac *applicationController) ChangeRegistrationDetails(accounts models.Accou var applicationRegistrationRequest applicationModels.ApplicationRegistrationRequest if err := json.NewDecoder(r.Body).Decode(&applicationRegistrationRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } @@ -620,11 +618,11 @@ func (ac *applicationController) ChangeRegistrationDetails(accounts models.Accou handler := ac.applicationHandlerFactory.Create(accounts) appRegistrationUpsertResponse, err := handler.ChangeRegistrationDetails(r.Context(), appName, applicationRegistrationRequest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &appRegistrationUpsertResponse) + ac.JSONResponse(w, r, &appRegistrationUpsertResponse) } // ModifyRegistrationDetails Updates specific field(s) of an application registration @@ -671,7 +669,7 @@ func (ac *applicationController) ModifyRegistrationDetails(accounts models.Accou var applicationRegistrationPatchRequest applicationModels.ApplicationRegistrationPatchRequest if err := json.NewDecoder(r.Body).Decode(&applicationRegistrationPatchRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } @@ -679,11 +677,11 @@ func (ac *applicationController) ModifyRegistrationDetails(accounts models.Accou handler := ac.applicationHandlerFactory.Create(accounts) appRegistrationUpsertResponse, err := handler.ModifyRegistrationDetails(r.Context(), appName, applicationRegistrationPatchRequest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &appRegistrationUpsertResponse) + ac.JSONResponse(w, r, &appRegistrationUpsertResponse) } // DeleteApplication Deletes application @@ -722,7 +720,7 @@ func (ac *applicationController) DeleteApplication(accounts models.Accounts, w h err := handler.DeleteApplication(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } @@ -751,7 +749,7 @@ func (ac *applicationController) ListPipelines(accounts models.Accounts, w http. // It was suggested to keep this under /applications/{appName} endpoint, but for now this will be the same for all applications handler := ac.applicationHandlerFactory.Create(accounts) supportedPipelines := handler.GetSupportedPipelines() - radixhttp.JSONResponse(w, r, supportedPipelines) + ac.JSONResponse(w, r, supportedPipelines) } // TriggerPipelineBuild creates a build pipeline job for the application @@ -795,11 +793,11 @@ func (ac *applicationController) TriggerPipelineBuild(accounts models.Accounts, jobSummary, err := handler.TriggerPipelineBuild(r.Context(), appName, r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &jobSummary) + ac.JSONResponse(w, r, &jobSummary) } // TriggerPipelineBuildDeploy creates a build-deploy pipeline job for the application @@ -844,11 +842,11 @@ func (ac *applicationController) TriggerPipelineBuildDeploy(accounts models.Acco jobSummary, err := handler.TriggerPipelineBuildDeploy(r.Context(), appName, r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &jobSummary) + ac.JSONResponse(w, r, &jobSummary) } // TriggerPipelineDeploy creates a deploy pipeline job for the application @@ -893,11 +891,11 @@ func (ac *applicationController) TriggerPipelineDeploy(accounts models.Accounts, jobSummary, err := handler.TriggerPipelineDeploy(r.Context(), appName, r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &jobSummary) + ac.JSONResponse(w, r, &jobSummary) } // TriggerPipelinePromote creates a promote pipeline job for the application @@ -940,9 +938,9 @@ func (ac *applicationController) TriggerPipelinePromote(accounts models.Accounts jobSummary, err := handler.TriggerPipelinePromote(r.Context(), appName, r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ac.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, &jobSummary) + ac.JSONResponse(w, r, &jobSummary) } diff --git a/api/buildsecrets/buildsecrets_controller.go b/api/buildsecrets/buildsecrets_controller.go index ab617811..6ff7c86c 100644 --- a/api/buildsecrets/buildsecrets_controller.go +++ b/api/buildsecrets/buildsecrets_controller.go @@ -5,9 +5,7 @@ import ( "net/http" environmentModels "github.com/equinor/radix-api/api/secrets/models" - "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -28,12 +26,12 @@ func (dc *buildSecretsController) GetRoutes() models.Routes { models.Route{ Path: rootPath + "/buildsecrets", Method: "GET", - HandlerFunc: GetBuildSecrets, + HandlerFunc: dc.GetBuildSecrets, }, models.Route{ Path: rootPath + "/buildsecrets/{secretName}", Method: "PUT", - HandlerFunc: ChangeBuildSecret, + HandlerFunc: dc.ChangeBuildSecret, }, } @@ -41,7 +39,7 @@ func (dc *buildSecretsController) GetRoutes() models.Routes { } // GetBuildSecrets Lists build secrets -func GetBuildSecrets(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *buildSecretsController) GetBuildSecrets(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/buildsecrets application getBuildSecrets // --- // summary: Lists the application build secrets @@ -78,15 +76,15 @@ func GetBuildSecrets(accounts models.Accounts, w http.ResponseWriter, r *http.Re buildSecrets, err := buildSecretsHandler.GetBuildSecrets(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, buildSecrets) + dc.JSONResponse(w, r, buildSecrets) } // ChangeBuildSecret Modifies an application build secret -func ChangeBuildSecret(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *buildSecretsController) ChangeBuildSecret(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation PUT /applications/{appName}/buildsecrets/{secretName} application updateBuildSecretsSecretValue // --- // summary: Update an application build secret @@ -135,7 +133,7 @@ func ChangeBuildSecret(accounts models.Accounts, w http.ResponseWriter, r *http. var secretParameters environmentModels.SecretParameters if err := json.NewDecoder(r.Body).Decode(&secretParameters); err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } @@ -143,9 +141,9 @@ func ChangeBuildSecret(accounts models.Accounts, w http.ResponseWriter, r *http. err := buildSecretsHandler.ChangeBuildSecret(r.Context(), appName, secretName, secretParameters.SecretValue) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + dc.JSONResponse(w, r, "Success") } diff --git a/api/buildstatus/buildstatus_controller.go b/api/buildstatus/buildstatus_controller.go index f4f31fbd..31136fc1 100644 --- a/api/buildstatus/buildstatus_controller.go +++ b/api/buildstatus/buildstatus_controller.go @@ -7,7 +7,6 @@ import ( buildmodels "github.com/equinor/radix-api/api/buildstatus/models" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" radixv1 "github.com/equinor/radix-operator/pkg/apis/radix/v1" "github.com/gorilla/mux" ) @@ -83,7 +82,7 @@ func (bsc *buildStatusController) GetBuildStatus(accounts models.Accounts, w htt } disableClientCaching(w) - radixhttp.ByteArrayResponse(w, r, "image/svg+xml; charset=utf-8", buildStatus) + bsc.ByteArrayResponse(w, r, "image/svg+xml; charset=utf-8", buildStatus) } func disableClientCaching(w http.ResponseWriter) { diff --git a/api/deployments/deployment_controller.go b/api/deployments/deployment_controller.go index b6fa0237..80196036 100644 --- a/api/deployments/deployment_controller.go +++ b/api/deployments/deployment_controller.go @@ -9,7 +9,6 @@ import ( "github.com/equinor/radix-api/api/utils/logs" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -30,22 +29,22 @@ func (dc *deploymentController) GetRoutes() models.Routes { models.Route{ Path: rootPath + "/deployments", Method: "GET", - HandlerFunc: GetDeployments, + HandlerFunc: dc.GetDeployments, }, models.Route{ Path: rootPath + "/deployments/{deploymentName}", Method: "GET", - HandlerFunc: GetDeployment, + HandlerFunc: dc.GetDeployment, }, models.Route{ Path: rootPath + "/deployments/{deploymentName}/components/{componentName}/replicas/{podName}/logs", Method: "GET", - HandlerFunc: GetPodLog, + HandlerFunc: dc.GetPodLog, }, models.Route{ Path: rootPath + "/deployments/{deploymentName}/components", Method: "GET", - HandlerFunc: GetComponents, + HandlerFunc: dc.GetComponents, }, } @@ -53,7 +52,7 @@ func (dc *deploymentController) GetRoutes() models.Routes { } // GetDeployments Lists deployments -func GetDeployments(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *deploymentController) GetDeployments(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/deployments application getDeployments // --- // summary: Lists the application deployments @@ -103,7 +102,7 @@ func GetDeployments(accounts models.Accounts, w http.ResponseWriter, r *http.Req if strings.TrimSpace(latest) != "" { useLatest, err = strconv.ParseBool(r.FormValue("latest")) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } } @@ -112,15 +111,15 @@ func GetDeployments(accounts models.Accounts, w http.ResponseWriter, r *http.Req appDeployments, err := deployHandler.GetDeploymentsForApplicationEnvironment(r.Context(), appName, environment, useLatest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appDeployments) + dc.JSONResponse(w, r, appDeployments) } // GetDeployment Get deployment details -func GetDeployment(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *deploymentController) GetDeployment(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/deployments/{deploymentName} deployment getDeployment // --- // summary: Get deployment details @@ -161,15 +160,15 @@ func GetDeployment(accounts models.Accounts, w http.ResponseWriter, r *http.Requ appDeployment, err := deployHandler.GetDeploymentWithName(r.Context(), appName, deploymentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appDeployment) + dc.JSONResponse(w, r, appDeployment) } // GetComponents for a deployment -func GetComponents(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *deploymentController) GetComponents(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/deployments/{deploymentName}/components component components // --- // summary: Get components for a deployment @@ -209,15 +208,15 @@ func GetComponents(accounts models.Accounts, w http.ResponseWriter, r *http.Requ deployHandler := Init(accounts) components, err := deployHandler.GetComponentsForDeploymentName(r.Context(), appName, deploymentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, components) + dc.JSONResponse(w, r, components) } // GetPodLog Get logs of a single pod -func GetPodLog(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (dc *deploymentController) GetPodLog(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/deployments/{deploymentName}/components/{componentName}/replicas/{podName}/logs component log // --- // summary: Get logs from a deployed pod @@ -288,22 +287,22 @@ func GetPodLog(accounts models.Accounts, w http.ResponseWriter, r *http.Request) since, asFile, logLines, err, previousLog := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } deployHandler := Init(accounts) - log, err := deployHandler.GetLogs(r.Context(), appName, podName, &since, logLines, previousLog) + logs, err := deployHandler.GetLogs(r.Context(), appName, podName, &since, logLines, previousLog) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() {_ = logs.Close()}() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + dc.ReaderFileResponse(w, r, logs, fileName, "text/plain; charset=utf-8") } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + dc.ReaderResponse(w, r, logs, "text/plain; charset=utf-8") } } diff --git a/api/environments/environment_controller.go b/api/environments/environment_controller.go index 4873ef2f..083b9f69 100644 --- a/api/environments/environment_controller.go +++ b/api/environments/environment_controller.go @@ -12,7 +12,6 @@ import ( environmentsModels "github.com/equinor/radix-api/api/environments/models" "github.com/equinor/radix-api/api/utils/logs" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/equinor/radix-operator/pkg/apis/defaults" "github.com/gorilla/mux" log "github.com/sirupsen/logrus" @@ -261,7 +260,7 @@ func (c *environmentController) GetApplicationEnvironmentDeployments(accounts mo if strings.TrimSpace(latest) != "" { useLatest, err = strconv.ParseBool(r.FormValue("latest")) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } } @@ -270,11 +269,10 @@ func (c *environmentController) GetApplicationEnvironmentDeployments(accounts mo appEnvironmentDeployments, err := deploymentHandler.GetDeploymentsForApplicationEnvironment(r.Context(), appName, envName, useLatest) if err != nil { - radixhttp.ErrorResponse(w, r, err) - return + c.ErrorResponse(w, r, err) } - radixhttp.JSONResponse(w, r, appEnvironmentDeployments) + c.JSONResponse(w,r, appEnvironmentDeployments) } // CreateEnvironment Creates a new environment @@ -317,7 +315,7 @@ func (c *environmentController) CreateEnvironment(accounts models.Accounts, w ht _, err := environmentHandler.CreateEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -367,11 +365,11 @@ func (c *environmentController) GetEnvironment(accounts models.Accounts, w http. appEnvironment, err := environmentHandler.GetEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appEnvironment) + c.JSONResponse(w, r, appEnvironment) } @@ -416,7 +414,7 @@ func (c *environmentController) DeleteEnvironment(accounts models.Accounts, w ht err := environmentHandler.DeleteEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -461,11 +459,11 @@ func (c *environmentController) GetEnvironmentSummary(accounts models.Accounts, appEnvironments, err := environmentHandler.GetEnvironmentSummary(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, appEnvironments) + c.JSONResponse(w, r, appEnvironments) } // GetEnvironmentEvents Get events for an application environment @@ -513,11 +511,11 @@ func (c *environmentController) GetEnvironmentEvents(accounts models.Accounts, w events, err := environmentHandler.GetEnvironmentEvents(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, events) + c.JSONResponse(w, r, events) } @@ -567,11 +565,11 @@ func (c *environmentController) StopComponent(accounts models.Accounts, w http.R err := environmentHandler.StopComponent(r.Context(), appName, envName, componentName, false) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // StartComponent Starts job @@ -620,11 +618,11 @@ func (c *environmentController) StartComponent(accounts models.Accounts, w http. err := environmentHandler.StartComponent(r.Context(), appName, envName, componentName, false) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // RestartComponent Restarts job @@ -677,11 +675,11 @@ func (c *environmentController) RestartComponent(accounts models.Accounts, w htt err := environmentHandler.RestartComponent(r.Context(), appName, envName, componentName, false) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // StopEnvironment all components in the environment @@ -724,11 +722,11 @@ func (c *environmentController) StopEnvironment(accounts models.Accounts, w http err := environmentHandler.StopEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // StartEnvironment Starts all components in the environment @@ -771,11 +769,11 @@ func (c *environmentController) StartEnvironment(accounts models.Accounts, w htt err := environmentHandler.StartEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // RestartEnvironment Restarts all components in the environment @@ -824,11 +822,11 @@ func (c *environmentController) RestartEnvironment(accounts models.Accounts, w h err := environmentHandler.RestartEnvironment(r.Context(), appName, envName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // StopApplication all components in all environments of the application @@ -865,11 +863,11 @@ func (c *environmentController) StopApplication(accounts models.Accounts, w http err := environmentHandler.StopApplication(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // StartApplication Starts all components in all environments of the application @@ -906,11 +904,11 @@ func (c *environmentController) StartApplication(accounts models.Accounts, w htt err := environmentHandler.StartApplication(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // RestartApplication Restarts all components in all environments of the application @@ -951,11 +949,11 @@ func (c *environmentController) RestartApplication(accounts models.Accounts, w h err := environmentHandler.RestartApplication(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // RestartOAuthAuxiliaryResource Restarts oauth auxiliary resource for a component @@ -1010,11 +1008,11 @@ func (c *environmentController) RestartOAuthAuxiliaryResource(accounts models.Ac err := environmentHandler.RestartComponentAuxiliaryResource(r.Context(), appName, envName, componentName, defaults.OAuthProxyAuxiliaryComponentType) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + c.JSONResponse(w, r, "Success") } // GetPodLog Get logs of a single pod @@ -1090,23 +1088,25 @@ func (c *environmentController) GetPodLog(accounts models.Accounts, w http.Respo since, asFile, logLines, err, previousLog := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } eh := c.environmentHandlerFactory(accounts) - log, err := eh.GetLogs(r.Context(), appName, envName, podName, &since, logLines, previousLog) + logs, err := eh.GetLogs(r.Context(), appName, envName, podName, &since, logLines, previousLog) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() { + _ = logs.Close() + }() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + c.ReaderFileResponse(w, r, logs, fileName, "text/plain; charset=utf-8") } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + c.ReaderResponse(w, r, logs, "text/plain; charset=utf-8") } } @@ -1177,23 +1177,24 @@ func (c *environmentController) GetScheduledJobLog(accounts models.Accounts, w h since, asFile, logLines, err, _ := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } eh := c.environmentHandlerFactory(accounts) - log, err := eh.GetScheduledJobLogs(r.Context(), appName, envName, scheduledJobName, &since, logLines) + logs, err := eh.GetScheduledJobLogs(r.Context(), appName, envName, scheduledJobName, &since, logLines) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() {_ = logs.Close()}() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + c.ReaderFileResponse(w, r, logs, fileName, "text/plain; charset=utf-8") + } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + c.ReaderResponse(w, r, logs, "text/plain; charset=utf-8") } } @@ -1245,11 +1246,11 @@ func (c *environmentController) GetJobComponentDeployments(accounts models.Accou jobComponentDeployments, err := eh.deployHandler.GetJobComponentDeployments(r.Context(), appName, envName, jobComponentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobComponentDeployments) + c.JSONResponse(w, r, jobComponentDeployments) } // GetJobs Get list of scheduled jobs @@ -1300,11 +1301,11 @@ func (c *environmentController) GetJobs(accounts models.Accounts, w http.Respons jobSummaries, err := eh.GetJobs(r.Context(), appName, envName, jobComponentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobSummaries) + c.JSONResponse(w, r, jobSummaries) } // GetJob Get a scheduled job @@ -1359,11 +1360,11 @@ func (c *environmentController) GetJob(accounts models.Accounts, w http.Response jobSummary, err := eh.GetJob(r.Context(), appName, envName, jobComponentName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobSummary) + c.JSONResponse(w, r, jobSummary) } // StopJob Stop a scheduled job @@ -1422,7 +1423,7 @@ func (c *environmentController) StopJob(accounts models.Accounts, w http.Respons eh := c.environmentHandlerFactory(accounts) err := eh.StopJob(r.Context(), appName, envName, jobComponentName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -1485,7 +1486,7 @@ func (c *environmentController) RestartJob(accounts models.Accounts, w http.Resp eh := c.environmentHandlerFactory(accounts) err := eh.RestartJob(r.Context(), appName, envName, jobComponentName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -1548,7 +1549,7 @@ func (c *environmentController) DeleteJob(accounts models.Accounts, w http.Respo eh := c.environmentHandlerFactory(accounts) err := eh.DeleteJob(r.Context(), appName, envName, jobComponentName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -1603,11 +1604,11 @@ func (c *environmentController) GetBatches(accounts models.Accounts, w http.Resp batchSummaries, err := eh.GetBatches(r.Context(), appName, envName, jobComponentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, batchSummaries) + c.JSONResponse(w, r, batchSummaries) } // GetBatch Get a scheduled batch @@ -1662,11 +1663,11 @@ func (c *environmentController) GetBatch(accounts models.Accounts, w http.Respon batchSummary, err := eh.GetBatch(r.Context(), appName, envName, jobComponentName, batchName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, batchSummary) + c.JSONResponse(w, r, batchSummary) } // StopBatch Stop a scheduled batch @@ -1725,7 +1726,7 @@ func (c *environmentController) StopBatch(accounts models.Accounts, w http.Respo eh := c.environmentHandlerFactory(accounts) err := eh.StopBatch(r.Context(), appName, envName, jobComponentName, batchName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -1788,7 +1789,7 @@ func (c *environmentController) RestartBatch(accounts models.Accounts, w http.Re eh := c.environmentHandlerFactory(accounts) err := eh.RestartBatch(r.Context(), appName, envName, jobComponentName, batchName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -1857,18 +1858,18 @@ func (c *environmentController) CopyBatch(accounts models.Accounts, w http.Respo batchName := mux.Vars(r)["batchName"] var scheduledBatchRequest environmentsModels.ScheduledBatchRequest if err := json.NewDecoder(r.Body).Decode(&scheduledBatchRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } eh := c.environmentHandlerFactory(accounts) batchSummary, err := eh.CopyBatch(r.Context(), appName, envName, jobComponentName, batchName, scheduledBatchRequest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, batchSummary) + c.JSONResponse(w, r, batchSummary) } // CopyJob Create a copy of existing scheduled job with optional changes @@ -1933,18 +1934,18 @@ func (c *environmentController) CopyJob(accounts models.Accounts, w http.Respons jobName := mux.Vars(r)["jobName"] var scheduledJobRequest environmentsModels.ScheduledJobRequest if err := json.NewDecoder(r.Body).Decode(&scheduledJobRequest); err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } eh := c.environmentHandlerFactory(accounts) jobSummary, err := eh.CopyJob(r.Context(), appName, envName, jobComponentName, jobName, scheduledJobRequest) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobSummary) + c.JSONResponse(w, r, jobSummary) } // DeleteBatch Delete a batch @@ -2003,7 +2004,7 @@ func (c *environmentController) DeleteBatch(accounts models.Accounts, w http.Res eh := c.environmentHandlerFactory(accounts) err := eh.DeleteBatch(r.Context(), appName, envName, jobComponentName, batchName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } @@ -2084,23 +2085,23 @@ func (c *environmentController) GetOAuthAuxiliaryResourcePodLog(accounts models. since, asFile, logLines, err, _ := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } eh := c.environmentHandlerFactory(accounts) - log, err := eh.GetAuxiliaryResourcePodLog(r.Context(), appName, envName, componentName, defaults.OAuthProxyAuxiliaryComponentType, podName, &since, logLines) + logs, err := eh.GetAuxiliaryResourcePodLog(r.Context(), appName, envName, componentName, defaults.OAuthProxyAuxiliaryComponentType, podName, &since, logLines) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() {_ = logs.Close()}() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + c.ReaderFileResponse(w, r, logs, fileName, "text/plain; charset=utf-8") } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + c.ReaderResponse(w, r, logs, "text/plain; charset=utf-8") } } @@ -2156,12 +2157,11 @@ func (c *environmentController) GetJobPayload(accounts models.Accounts, w http.R payload, err := eh.GetJobPayload(r.Context(), appName, envName, jobComponentName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } - radixhttp.ReaderResponse(w, payload, "text/plain; charset=utf-8") -} + c.ReaderResponse(w, r, payload, "text/plain; charset=utf-8")} // ScaleComponent Scale component replicas func (c *environmentController) ScaleComponent(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { @@ -2217,14 +2217,14 @@ func (c *environmentController) ScaleComponent(accounts models.Accounts, w http. replicas, err := strconv.Atoi(mux.Vars(r)["replicas"]) if err != nil { log.Error(err) - radixhttp.ErrorResponse(w, r, fmt.Errorf("invalid new desired number of replicas argument")) + c.ErrorResponse(w, r, fmt.Errorf("invalid new desired number of replicas argument")) return } eh := c.environmentHandlerFactory(accounts) err = eh.ScaleComponent(r.Context(), appName, envName, componentName, replicas) if err != nil { - radixhttp.ErrorResponse(w, r, err) + c.ErrorResponse(w, r, err) return } diff --git a/api/environmentvariables/env_vars_controller.go b/api/environmentvariables/env_vars_controller.go index 8d203895..26724564 100644 --- a/api/environmentvariables/env_vars_controller.go +++ b/api/environmentvariables/env_vars_controller.go @@ -6,7 +6,6 @@ import ( envvarsmodels "github.com/equinor/radix-api/api/environmentvariables/models" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" log "github.com/sirupsen/logrus" ) @@ -94,11 +93,11 @@ func (controller *envVarsController) GetComponentEnvVars(accounts models.Account envVars, err := eh.GetComponentEnvVars(appName, envName, componentName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + controller.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, envVars) + controller.JSONResponse(w, r, envVars) } // ChangeEnvVar Modifies an environment variable @@ -159,7 +158,7 @@ func (controller *envVarsController) ChangeEnvVar(accounts models.Accounts, w ht appName, envName, componentName := mux.Vars(r)["appName"], mux.Vars(r)["envName"], mux.Vars(r)["componentName"] var envVarParameters []envvarsmodels.EnvVarParameter if err := json.NewDecoder(r.Body).Decode(&envVarParameters); err != nil { - radixhttp.ErrorResponse(w, r, err) + controller.ErrorResponse(w, r, err) return } @@ -169,9 +168,9 @@ func (controller *envVarsController) ChangeEnvVar(accounts models.Accounts, w ht err := envVarsHandler.ChangeEnvVar(appName, envName, componentName, envVarParameters) if err != nil { - radixhttp.ErrorResponse(w, r, err) + controller.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + controller.JSONResponse(w, r, "Success") } diff --git a/api/jobs/job_controller.go b/api/jobs/job_controller.go index 93aa736c..48c1cabd 100644 --- a/api/jobs/job_controller.go +++ b/api/jobs/job_controller.go @@ -8,7 +8,6 @@ import ( "github.com/equinor/radix-api/api/deployments" "github.com/equinor/radix-api/api/utils/logs" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -29,57 +28,57 @@ func (jc *jobController) GetRoutes() models.Routes { models.Route{ Path: rootPath + "/jobs", Method: "GET", - HandlerFunc: GetApplicationJobs, + HandlerFunc: jc.GetApplicationJobs, }, models.Route{ Path: rootPath + "/jobs/{jobName}", Method: "GET", - HandlerFunc: GetApplicationJob, + HandlerFunc: jc.GetApplicationJob, }, models.Route{ Path: rootPath + "/jobs/{jobName}/stop", Method: "POST", - HandlerFunc: StopApplicationJob, + HandlerFunc: jc.StopApplicationJob, }, models.Route{ Path: rootPath + "/jobs/{jobName}/rerun", Method: "POST", - HandlerFunc: RerunApplicationJob, + HandlerFunc: jc.RerunApplicationJob, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns", Method: "GET", - HandlerFunc: GetTektonPipelineRuns, + HandlerFunc: jc.GetTektonPipelineRuns, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns/{pipelineRunName}", Method: "GET", - HandlerFunc: GetTektonPipelineRun, + HandlerFunc: jc.GetTektonPipelineRun, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks", Method: "GET", - HandlerFunc: GetTektonPipelineRunTasks, + HandlerFunc: jc.GetTektonPipelineRunTasks, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}", Method: "GET", - HandlerFunc: GetTektonPipelineRunTask, + HandlerFunc: jc.GetTektonPipelineRunTask, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/steps", Method: "GET", - HandlerFunc: GetTektonPipelineRunTaskSteps, + HandlerFunc: jc.GetTektonPipelineRunTaskSteps, }, models.Route{ Path: rootPath + "/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/logs/{stepName}", Method: "GET", - HandlerFunc: GetTektonPipelineRunTaskStepLogs, + HandlerFunc: jc.GetTektonPipelineRunTaskStepLogs, }, models.Route{ Path: rootPath + "/jobs/{jobName}/logs/{stepName}", Method: "GET", - HandlerFunc: GetPipelineJobStepLogs, + HandlerFunc: jc.GetPipelineJobStepLogs, }, } @@ -87,7 +86,7 @@ func (jc *jobController) GetRoutes() models.Routes { } // GetApplicationJobs gets pipeline-job summaries -func GetApplicationJobs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetApplicationJobs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs pipeline-job getApplicationJobs // --- // summary: Gets the summary of jobs for a given application @@ -124,15 +123,15 @@ func GetApplicationJobs(accounts models.Accounts, w http.ResponseWriter, r *http jobSummaries, err := handler.GetApplicationJobs(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobSummaries) + jc.JSONResponse(w, r, jobSummaries) } // GetApplicationJob gets specific pipeline-job details -func GetApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName} pipeline-job getApplicationJob // --- // summary: Gets the detail of a given pipeline-job for a given application @@ -173,15 +172,15 @@ func GetApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http. jobDetail, err := handler.GetApplicationJob(r.Context(), appName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, jobDetail) + jc.JSONResponse(w, r, jobDetail) } // StopApplicationJob Stops job -func StopApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) StopApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/jobs/{jobName}/stop pipeline-job stopApplicationJob // --- // summary: Stops job @@ -220,7 +219,7 @@ func StopApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http err := handler.StopJob(r.Context(), appName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } @@ -228,7 +227,7 @@ func StopApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http } // RerunApplicationJob Reruns the pipeline job -func RerunApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) RerunApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/jobs/{jobName}/rerun pipeline-job rerunApplicationJob // --- // summary: Reruns the pipeline job @@ -266,7 +265,7 @@ func RerunApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *htt err := handler.RerunJob(r.Context(), appName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } @@ -274,7 +273,7 @@ func RerunApplicationJob(accounts models.Accounts, w http.ResponseWriter, r *htt } // GetTektonPipelineRuns Get the Tekton pipeline runs overview -func GetTektonPipelineRuns(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRuns(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns pipeline-job getTektonPipelineRuns // --- // summary: Gets list of pipeline runs for a pipeline-job @@ -317,15 +316,15 @@ func GetTektonPipelineRuns(accounts models.Accounts, w http.ResponseWriter, r *h tektonPipelineRuns, err := handler.GetTektonPipelineRuns(r.Context(), appName, jobName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, tektonPipelineRuns) + jc.JSONResponse(w, r, tektonPipelineRuns) } // GetTektonPipelineRun Get the Tekton pipeline run overview -func GetTektonPipelineRun(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRun(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName} pipeline-job getTektonPipelineRun // --- // summary: Gets a pipeline run for a pipeline-job @@ -372,15 +371,15 @@ func GetTektonPipelineRun(accounts models.Accounts, w http.ResponseWriter, r *ht tektonPipelineRun, err := handler.GetTektonPipelineRun(r.Context(), appName, jobName, pipelineRunName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, tektonPipelineRun) + jc.JSONResponse(w, r, tektonPipelineRun) } // GetTektonPipelineRunTasks Get the Tekton task list of a pipeline run -func GetTektonPipelineRunTasks(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRunTasks(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks pipeline-job getTektonPipelineRunTasks // --- // summary: Gets list of pipeline run tasks of a pipeline-job @@ -429,15 +428,15 @@ func GetTektonPipelineRunTasks(accounts models.Accounts, w http.ResponseWriter, tektonTasks, err := handler.GetTektonPipelineRunTasks(r.Context(), appName, jobName, pipelineRunName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, tektonTasks) + jc.JSONResponse(w, r, tektonTasks) } // GetTektonPipelineRunTask Get the Tekton task of a pipeline run -func GetTektonPipelineRunTask(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRunTask(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName} pipeline-job getTektonPipelineRunTask // --- // summary: Gets list of pipeline run task of a pipeline-job @@ -490,15 +489,15 @@ func GetTektonPipelineRunTask(accounts models.Accounts, w http.ResponseWriter, r tektonTasks, err := handler.GetTektonPipelineRunTask(r.Context(), appName, jobName, pipelineRunName, taskName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, tektonTasks) + jc.JSONResponse(w, r, tektonTasks) } // GetTektonPipelineRunTaskSteps Get the Tekton task step list of a pipeline run -func GetTektonPipelineRunTaskSteps(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRunTaskSteps(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/steps pipeline-job getTektonPipelineRunTaskSteps // --- // summary: Gets list of steps for a pipeline run task of a pipeline-job @@ -553,15 +552,15 @@ func GetTektonPipelineRunTaskSteps(accounts models.Accounts, w http.ResponseWrit tektonTaskSteps, err := handler.GetTektonPipelineRunTaskSteps(r.Context(), appName, jobName, pipelineRunName, taskName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, tektonTaskSteps) + jc.JSONResponse(w, r, tektonTaskSteps) } // GetTektonPipelineRunTaskStepLogs Get step logs of a pipeline run task for a pipeline job -func GetTektonPipelineRunTaskStepLogs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetTektonPipelineRunTaskStepLogs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/logs/{stepName} pipeline-job getTektonPipelineRunTaskStepLogs // --- // summary: Gets logs of pipeline runs for a pipeline-job @@ -635,28 +634,28 @@ func GetTektonPipelineRunTaskStepLogs(accounts models.Accounts, w http.ResponseW stepName := mux.Vars(r)["stepName"] since, asFile, logLines, err, _ := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } handler := Init(accounts, deployments.Init(accounts)) log, err := handler.GetTektonPipelineRunTaskStepLogs(r.Context(), appName, jobName, pipelineRunName, taskName, stepName, &since, logLines) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() {_ = log.Close()}() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + jc.ReaderFileResponse(w, r, log, fileName, "text/plain; charset=utf-8") } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + jc.ReaderResponse(w, r, log, "text/plain; charset=utf-8") } } // GetPipelineJobStepLogs Get log of a pipeline job step -func GetPipelineJobStepLogs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (jc *jobController) GetPipelineJobStepLogs(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/jobs/{jobName}/logs/{stepName} pipeline-job getPipelineJobStepLogs // --- // summary: Gets logs of a pipeline job step @@ -718,22 +717,22 @@ func GetPipelineJobStepLogs(accounts models.Accounts, w http.ResponseWriter, r * stepName := mux.Vars(r)["stepName"] since, asFile, logLines, err, _ := logs.GetLogParams(r) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } handler := Init(accounts, deployments.Init(accounts)) log, err := handler.GetPipelineJobStepLogs(r.Context(), appName, jobName, stepName, &since, logLines) if err != nil { - radixhttp.ErrorResponse(w, r, err) + jc.ErrorResponse(w, r, err) return } - defer log.Close() + defer func() {_ = log.Close()}() if asFile { fileName := fmt.Sprintf("%s.log", time.Now().Format("20060102150405")) - radixhttp.ReaderFileResponse(w, log, fileName, "text/plain; charset=utf-8") + jc.ReaderFileResponse(w, r, log, fileName, "text/plain; charset=utf-8") } else { - radixhttp.ReaderResponse(w, log, "text/plain; charset=utf-8") + jc.ReaderResponse(w, r, log, "text/plain; charset=utf-8") } } diff --git a/api/privateimagehubs/privateimagehubs_controller.go b/api/privateimagehubs/privateimagehubs_controller.go index d3142356..61cb4d90 100644 --- a/api/privateimagehubs/privateimagehubs_controller.go +++ b/api/privateimagehubs/privateimagehubs_controller.go @@ -5,9 +5,7 @@ import ( "net/http" environmentModels "github.com/equinor/radix-api/api/secrets/models" - "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -78,11 +76,11 @@ func (dc *privateImageHubController) GetPrivateImageHubs(accounts models.Account imageHubSecrets, err := privateImageHubHandler.GetPrivateImageHubs(r.Context(), appName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, imageHubSecrets) + dc.JSONResponse(w, r, imageHubSecrets) } // ChangePrivateImageHubSecret Modifies an application private image hub secret @@ -135,7 +133,7 @@ func (dc *privateImageHubController) ChangePrivateImageHubSecret(accounts models var secretParameters environmentModels.SecretParameters if err := json.NewDecoder(r.Body).Decode(&secretParameters); err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } @@ -143,9 +141,9 @@ func (dc *privateImageHubController) ChangePrivateImageHubSecret(accounts models err := privateImageHubHandler.UpdatePrivateImageHubValue(appName, serverName, secretParameters.SecretValue) if err != nil { - radixhttp.ErrorResponse(w, r, err) + dc.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + dc.JSONResponse(w, r, "Success") } diff --git a/api/secrets/secret_controller.go b/api/secrets/secret_controller.go index ebd11b0f..d5f94c2c 100644 --- a/api/secrets/secret_controller.go +++ b/api/secrets/secret_controller.go @@ -6,7 +6,6 @@ import ( secretModels "github.com/equinor/radix-api/api/secrets/models" "github.com/equinor/radix-api/models" - radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" ) @@ -27,12 +26,12 @@ func (ec *secretController) GetRoutes() models.Routes { models.Route{ Path: rootPath + "/environments/{envName}/components/{componentName}/secrets/{secretName}", Method: "PUT", - HandlerFunc: ChangeComponentSecret, + HandlerFunc: ec.ChangeComponentSecret, }, models.Route{ Path: rootPath + "/environments/{envName}/components/{componentName}/secrets/azure/keyvault/{azureKeyVaultName}", Method: "GET", - HandlerFunc: GetAzureKeyVaultSecretVersions, + HandlerFunc: ec.GetAzureKeyVaultSecretVersions, }, // TODO reimplement change-secrets individually for each secret type // models.Route{ @@ -45,7 +44,7 @@ func (ec *secretController) GetRoutes() models.Routes { } // ChangeComponentSecret Modifies an application environment component secret -func ChangeComponentSecret(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *secretController) ChangeComponentSecret(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation PUT /applications/{appName}/environments/{envName}/components/{componentName}/secrets/{secretName} environment changeComponentSecret // --- // summary: Update an application environment component secret @@ -109,22 +108,22 @@ func ChangeComponentSecret(accounts models.Accounts, w http.ResponseWriter, r *h var secretParameters secretModels.SecretParameters if err := json.NewDecoder(r.Body).Decode(&secretParameters); err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } handler := Init(WithAccounts(accounts)) if err := handler.ChangeComponentSecret(r.Context(), appName, envName, componentName, secretName, secretParameters); err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, "Success") + ec.JSONResponse(w, r, "Success") } // GetAzureKeyVaultSecretVersions Get Azure Key vault secret versions for a component -func GetAzureKeyVaultSecretVersions(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { +func (ec *secretController) GetAzureKeyVaultSecretVersions(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation GET /applications/{appName}/environments/{envName}/components/{componentName}/secrets/azure/keyvault/{azureKeyVaultName} environment getAzureKeyVaultSecretVersions // --- // summary: Get Azure Key vault secret versions for a component @@ -194,9 +193,9 @@ func GetAzureKeyVaultSecretVersions(accounts models.Accounts, w http.ResponseWri secretStatuses, err := handler.GetAzureKeyVaultSecretVersions(appName, envName, componentName, azureKeyVaultName, secretName) if err != nil { - radixhttp.ErrorResponse(w, r, err) + ec.ErrorResponse(w, r, err) return } - radixhttp.JSONResponse(w, r, secretStatuses) + ec.JSONResponse(w, r, secretStatuses) } diff --git a/api/utils/radix_middleware.go b/api/utils/radix_middleware.go index 47dafbdb..180f729d 100644 --- a/api/utils/radix_middleware.go +++ b/api/utils/radix_middleware.go @@ -8,6 +8,7 @@ import ( "github.com/equinor/radix-api/models" radixhttp "github.com/equinor/radix-common/net/http" "github.com/gorilla/mux" + log "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -59,13 +60,17 @@ func (handler *RadixMiddleware) handleAuthorization(w http.ResponseWriter, r *ht token, err := getBearerTokenFromHeader(r, useOutClusterClient) if err != nil { - radixhttp.ErrorResponse(w, r, err) + if err = radixhttp.ErrorResponse(w, r, err); err != nil { + log.Errorf("handleAuthorization: failed to write error response: %v", err) + } return } impersonation, err := radixhttp.GetImpersonationFromHeader(r) if err != nil { - radixhttp.ErrorResponse(w, r, radixhttp.UnexpectedError("Problems impersonating", err)) + if err = radixhttp.ErrorResponse(w, r, radixhttp.UnexpectedError("Problems impersonating", err)); err != nil { + log.Errorf("handleAuthorization: failed to write error response: %v", err) + } return } @@ -88,7 +93,9 @@ func (handler *RadixMiddleware) handleAuthorization(w http.ResponseWriter, r *ht // Check if registration of application exists for application-specific requests if appName, exists := mux.Vars(r)["appName"]; exists { if _, err := accounts.UserAccount.RadixClient.RadixV1().RadixRegistrations().Get(r.Context(), appName, metav1.GetOptions{}); err != nil { - radixhttp.ErrorResponse(w, r, err) + if err = radixhttp.ErrorResponse(w, r, err); err != nil { + log.Errorf("handleAuthorization: failed to write error response: %v", err) + } return } } diff --git a/go.mod b/go.mod index 9e982c9a..90180e04 100644 --- a/go.mod +++ b/go.mod @@ -3,65 +3,64 @@ module github.com/equinor/radix-api go 1.21 require ( - github.com/equinor/radix-common v1.7.0 - github.com/equinor/radix-job-scheduler v1.8.4 - github.com/equinor/radix-operator v1.47.0 - github.com/evanphx/json-patch/v5 v5.6.0 + github.com/equinor/radix-common v1.7.1 + github.com/equinor/radix-job-scheduler v1.8.5 + github.com/equinor/radix-operator v1.47.2 + github.com/evanphx/json-patch/v5 v5.7.0 github.com/go-swagger/go-swagger v0.30.5 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/mock v1.6.0 - github.com/gorilla/handlers v1.5.1 - github.com/gorilla/mux v1.8.0 + github.com/gorilla/handlers v1.5.2 + github.com/gorilla/mux v1.8.1 github.com/marstr/guid v1.1.0 github.com/mitchellh/mapstructure v1.5.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 - github.com/prometheus/client_golang v1.16.0 - github.com/rakyll/statik v0.1.7 - github.com/rs/cors v1.8.3 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.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/spf13/viper v1.16.0 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.8.4 - github.com/tektoncd/pipeline v0.53.0 + github.com/tektoncd/pipeline v0.55.0 github.com/urfave/negroni/v3 v3.0.0 golang.org/x/sync v0.5.0 - k8s.io/api v0.27.6 - k8s.io/apimachinery v0.27.6 - k8s.io/client-go v0.27.6 - knative.dev/pkg v0.0.0-20231011193800-bd99f2f98be7 - sigs.k8s.io/secrets-store-csi-driver v1.3.3 + k8s.io/api v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 + knative.dev/pkg v0.0.0-20231219072704-d513e487961e + sigs.k8s.io/secrets-store-csi-driver v1.4.0 ) require ( contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect + contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect dario.cat/mergo v1.0.0 // indirect - github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-logr/logr v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/cel-go v0.12.7 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/cel-go v0.18.1 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.16.1 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -70,54 +69,54 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.21.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.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/prometheus/statsd_exporter v0.22.7 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect go.opencensus.io v0.24.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.147.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/api v0.154.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect + google.golang.org/grpc v1.60.1 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.6 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5 // indirect - k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect - sigs.k8s.io/controller-runtime v0.14.6 // indirect + k8s.io/apiextensions-apiserver v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a // indirect + k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect + sigs.k8s.io/controller-runtime v0.16.3 // 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/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index e4b49d78..e6a75551 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -14,9 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -34,37 +30,35 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= -contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -74,41 +68,33 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudevents/sdk-go/v2 v2.14.0 h1:Nrob4FwVgi5L4tV9lhjzZcjYqFVyJzsA56CwPaPfv6s= github.com/cloudevents/sdk-go/v2 v2.14.0/go.mod h1:xDmKfzNjM8gBvjaF8ijFjM1VYOVUEeUfapHMUX1T5To= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/equinor/radix-common v1.7.0 h1:DJHoBZTNzqEHw9faIWrSPGhPKEew/HBWc9MLCek6qgI= -github.com/equinor/radix-common v1.7.0/go.mod h1:9hHvudaiqmoIjCqKlsW14jMj8qU/b/wMXUwkffd9MUw= -github.com/equinor/radix-job-scheduler v1.8.4 h1:vqhP/xmOiU8UoaVhOoPjIQRSScmxSt9jMmYhEAzjIao= -github.com/equinor/radix-job-scheduler v1.8.4/go.mod h1:r71td0yDeDixdiMtq5TuCpCICD3lMHR8d1o5rSgTrTo= -github.com/equinor/radix-operator v1.47.0 h1:VjmHvp+4SPqKK/tJY0Hg4MV8nVI2IB5Jcbvg0Cbm5uQ= -github.com/equinor/radix-operator v1.47.0/go.mod h1:ygJYuO8paAlRPEvCqwAqXCRGe7WvRrzX1yAjULAH2DA= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +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/equinor/radix-job-scheduler v1.8.5 h1:ahw6FkFpPV167B1/w7/aQKpVMmU5Vc7UBO8411ZtYck= +github.com/equinor/radix-job-scheduler v1.8.5/go.mod h1:rNIQU1eCInLV8Yl+5SRITOUU52QwYioYrIGQcsDc3kg= +github.com/equinor/radix-operator v1.47.2 h1:QYOIDhx0zfjrHcipl/AuO+O8cMOqQ6ELESoIsj0BWZo= +github.com/equinor/radix-operator v1.47.2/go.mod h1:kwwnvyW1WKCKiXVSKNhkG7zAe1sFC2XW9IbNZsCCgRw= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -116,6 +102,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -123,11 +110,11 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +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-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= @@ -136,16 +123,16 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-swagger/go-swagger v0.30.5 h1:SQ2+xSonWjjoEMOV5tcOnZJVlfyUfCBhGQGArS1b9+U= github.com/go-swagger/go-swagger v0.30.5/go.mod h1:cWUhSyCNqV7J1wkkxfr5QmbcnCewetCdvEXqgPvbc/Q= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 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.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -180,10 +167,10 @@ 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/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.12.7 h1:jM6p55R0MKBg79hZjn1zs2OlrywZ1Vk00rxVvad1/O0= -github.com/google/cel-go v0.12.7/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/cel-go v0.18.1 h1:V/lAXKq4C3BYLDy/ARzMtpkEEYfHQpZzVyzy69nEUjs= +github.com/google/cel-go v0.18.1/go.mod h1:PVAybmSnWkNMUZR/tEWFUiJ1Np4Hz0MHsZJcgC4zln4= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -191,10 +178,11 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/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.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/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.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= @@ -204,7 +192,6 @@ 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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -212,26 +199,21 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -244,10 +226,8 @@ github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -266,10 +246,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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= @@ -284,8 +262,8 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -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/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/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= @@ -300,75 +278,83 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= -github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= -github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= 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/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 h1:bvntWler8vOjDJtxBwGDakGNC6srSZmgawGM9Jf7HC8= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 h1:osAjfXA8xRsHY6pp8Me9xcmoRPYT7RnJcAbUtfxVy9I= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1/go.mod h1:bpL5voXLr7djhPRHpY7k269A5HXlgLFNWEV1wB9/Zi0= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 h1:CFTvpkpVP4EXXZuaZuxpikAoma8xVha/IZKMDc9lw+Y= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0/go.mod h1:npfc20mPOAu7ViOVnATVMbI7PoXvW99EzgJVqkAomIQ= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0 h1:PpdpJDS1MyMSLILG+Y0hgzVQ3tu6qEkRD0gR/UuvSZk= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0/go.mod h1:4I5Rt6iIu95JBYYaDYA+Er+YBfUwIq9Pwh5TEoBmawg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -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_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +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.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +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.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +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.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -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/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= -github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -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.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -384,41 +370,35 @@ 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.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 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/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tektoncd/pipeline v0.53.0 h1:PRgIrOKelWKyj6JZ+/ftGKJZ9lyGeq5+y0UR7runCG0= -github.com/tektoncd/pipeline v0.53.0/go.mod h1:tO7iI+L4+kO+CrAYiM9FlXQYveyjyMDCYmy+7VLiwjk= +github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tektoncd/pipeline v0.55.0 h1:RUfqSC/J1dMrdfu1ThJreHojwGXcWc8P131el/c+c1c= +github.com/tektoncd/pipeline v0.55.0/go.mod h1:fFbFAhyNwsPQpitrwhi+Wp0Xse2EkIE1LtGKC08rVqo= 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/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/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.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= @@ -428,10 +408,9 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -442,8 +421,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -456,7 +435,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -465,11 +443,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -500,29 +477,24 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -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/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -534,6 +506,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/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-20220601150217-0de741cfad7f/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -567,43 +541,41 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/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.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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.4/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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -645,17 +617,11 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= @@ -679,19 +645,16 @@ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= -google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= +google.golang.org/api v0.154.0 h1:X7QkVKZBskztmpPKWQXgjJRPA2dJYrL6r+sYPRLj050= +google.golang.org/api v0.154.0/go.mod h1:qhSMkM85hgqiokIYsrRyKxrjfBeIhgl4Z2JmeRkYylc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -723,20 +686,12 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= -google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= -google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -749,15 +704,9 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -770,7 +719,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/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/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -794,7 +744,6 @@ gopkg.in/yaml.v2 v2.3.0/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-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/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= @@ -805,32 +754,32 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.6 h1:PBWu/lywJe2qQcshMjubzcBg7+XDZOo7O8JJAWuYtUo= -k8s.io/api v0.27.6/go.mod h1:AQYj0UsFCp3qJE7bOVnUuy4orCsXVkvHefnbYQiNWgk= -k8s.io/apiextensions-apiserver v0.27.6 h1:mOwSBJtThZhpJr+8gEkc3wFDIjq87E3JspR5mtZxIg8= -k8s.io/apiextensions-apiserver v0.27.6/go.mod h1:AVNlLYRrESG5Poo6ASRUhY2pvoKPcNt8y/IuZ4lx3o8= -k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= -k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.6 h1:vzI8804gpUtpMCNaFjIFyJrifH7u//LJCJPy8fQuYQg= -k8s.io/client-go v0.27.6/go.mod h1:PMsXcDKiJTW7PHJ64oEsIUJF319wm+EFlCj76oE5QXM= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5 h1:azYPdzztXxPSa8wb+hksEKayiz0o+PPisO/d+QhWnoo= -k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/pkg v0.0.0-20231011193800-bd99f2f98be7 h1:y3qbfYX1SuSr/1ysXvKfpV8q/kCwWLWieCUgAhBUHmQ= -knative.dev/pkg v0.0.0-20231011193800-bd99f2f98be7/go.mod h1:g+UCgSKQ2f15kHYu/V3CPtoKo5F1x/2Y1ot0NSK7gA0= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +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/kube-openapi v0.0.0-20231129212854-f0671cc7e66a h1:ZeIPbyHHqahGIbeyLJJjAUhnxCKqXaDY+n89Ms8szyA= +k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= +k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +knative.dev/pkg v0.0.0-20231219072704-d513e487961e h1:br9VUyN8M4ZUaWsmKifLg5lIAy6JmNw2MdeHd6wgp9g= +knative.dev/pkg v0.0.0-20231219072704-d513e487961e/go.mod h1:YWJGsIxySXQehfkslagVEpJJwHgSScUc21+KpEgBXcY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= 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/secrets-store-csi-driver v1.3.3 h1:8UXTMIO4kZqGLJ65UWRfJXbRnb6PU6olP+vSriGZRp0= -sigs.k8s.io/secrets-store-csi-driver v1.3.3/go.mod h1:jh6wML45aTbxT2YZtU4khzSm8JYxwVrQbhsum+WR6j8= -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/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/secrets-store-csi-driver v1.4.0 h1:R9JVcKOs11fEuiOLlH1BWMeyb6WYzvElRVkq1BWJkr4= +sigs.k8s.io/secrets-store-csi-driver v1.4.0/go.mod h1:RjFTqJzIV6/howouY0llU0iMbldSEt3nc2MGFOL6gko= +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.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/models/controller.go b/models/controller.go index 5ffbf460..1d061343 100644 --- a/models/controller.go +++ b/models/controller.go @@ -1,7 +1,11 @@ package models import ( + "io" "net/http" + + radixhttp "github.com/equinor/radix-common/net/http" + log "github.com/sirupsen/logrus" ) // RadixHandlerFunc Pattern for handler functions @@ -15,3 +19,45 @@ type Controller interface { // DefaultController Default implementation type DefaultController struct { } + +// ErrorResponse Marshals error for user requester +func (c *DefaultController) ErrorResponse(w http.ResponseWriter, r *http.Request, err error) { + err = radixhttp.ErrorResponse(w, r, err) + if err != nil { + log.Errorf("%s %s: failed to write response: %v", r.Method, r.URL.Path, err) + } +} + +// JSONResponse Marshals response with header +func (c *DefaultController) 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 (c *DefaultController) 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) + } +} +// ReaderResponse writes the content from the reader to the response, +func (c *DefaultController) ReaderResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, contentType string) { + err := radixhttp.ReaderResponse(w, reader, contentType) + if err != nil { + log.Errorf("%s %s: failed to write reader to response: %v", r.Method, r.URL.Path, err) + } + +} + +// ByteArrayResponse Used for response data. I.e. image +func (c *DefaultController) ByteArrayResponse(w http.ResponseWriter, r *http.Request, contentType string, result []byte) { + err := radixhttp.ByteArrayResponse(w, r, contentType, result) + if err != nil { + log.Errorf("%s %s: failed to write ByteArray response: %v", r.Method, r.URL.Path, err) + } +}