From 1491b08a565a42343107da0672ff63bdaadfc6ae Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 23 Aug 2024 17:19:23 +0200 Subject: [PATCH 01/65] BUILD/MINOR: cn: update client-native and generate spec Updating client-native for global stats-file keyword and removing unused track-sc actions from tcp request connection, and from enums in http-request/response --- embedded_spec.go | 42 ++++++------------------------------------ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 9 insertions(+), 39 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 56ca03b2..5ded4620 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -26330,6 +26330,9 @@ func init() { "ssl_options": { "$ref": "#/definitions/ssl_options" }, + "stats_file": { + "type": "string" + }, "stats_maxconn": { "type": "integer", "x-display-name": "Stats maxconn", @@ -28291,9 +28294,6 @@ func init() { "silent-drop", "strict-mode", "tarpit", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "use-service", @@ -29054,9 +29054,6 @@ func init() { "set-var-fmt", "silent-drop", "strict-mode", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "wait-for-body", @@ -34365,9 +34362,6 @@ func init() { "set-var-fmt", "silent-drop", "switch-mode", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "use-service" @@ -34847,9 +34841,6 @@ func init() { "action": { "required": true, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, @@ -34869,9 +34860,6 @@ func init() { "action": { "required": false, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, @@ -34892,9 +34880,6 @@ func init() { "action": { "required": false, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, @@ -76271,6 +76256,9 @@ func init() { "ssl_options": { "$ref": "#/definitions/ssl_options" }, + "stats_file": { + "type": "string" + }, "stats_maxconn": { "type": "integer", "x-display-name": "Stats maxconn", @@ -78219,9 +78207,6 @@ func init() { "silent-drop", "strict-mode", "tarpit", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "use-service", @@ -78983,9 +78968,6 @@ func init() { "set-var-fmt", "silent-drop", "strict-mode", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "wait-for-body", @@ -84176,9 +84158,6 @@ func init() { "set-var-fmt", "silent-drop", "switch-mode", - "track-sc0", - "track-sc1", - "track-sc2", "track-sc", "unset-var", "use-service" @@ -84658,9 +84637,6 @@ func init() { "action": { "required": true, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, @@ -84680,9 +84656,6 @@ func init() { "action": { "required": false, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, @@ -84703,9 +84676,6 @@ func init() { "action": { "required": false, "value": [ - "track-sc0", - "track-sc1", - "track-sc2", "track-sc" ] }, diff --git a/go.mod b/go.mod index da284b7b..c2a14fcb 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.0 + github.com/haproxytech/client-native/v6 v6.0.1 github.com/jessevdk/go-flags v1.5.0 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index df2bebb5..376bfbc8 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,8 @@ github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/haproxytech/client-native/v6 v6.0.0 h1:hLU9UNGoPOmBFsXk9+5qKG3L3tUoQtKl9w5YhOehuow= -github.com/haproxytech/client-native/v6 v6.0.0/go.mod h1:RG/erRZ36Z5YT5li461ZiQgfxRgg4ohhqCQWt6QUjrU= +github.com/haproxytech/client-native/v6 v6.0.1 h1:lVeg4CySqpFlRa4CER/+S4LbhKNBLHV1AK8vvzk1zrA= +github.com/haproxytech/client-native/v6 v6.0.1/go.mod h1:XDu46mnUw7/5Xs8RRgaM0anryVg9t/kMqe/MoEc8JjI= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= From 0d5180cfd764b2f4ed7e72c51e9b84eda7c78eac Mon Sep 17 00:00:00 2001 From: Helene Durand Date: Fri, 6 Sep 2024 11:44:50 +0200 Subject: [PATCH 02/65] DOC/MINOR: fix inversion between cluster and single mode --- configuration/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/README.md b/configuration/README.md index 57eca85f..7f81724c 100644 --- a/configuration/README.md +++ b/configuration/README.md @@ -70,5 +70,5 @@ The way `cluster` vs `single` is now handled is as following: | Mode | /cluster.json content | |-----------|-------------------| -| Single| `cluster` attribute is not empty| -| Cluster| `cluster` attribute is empty | +| Single| `cluster` attribute is empty| +| Cluster| `cluster` attribute is not empty | From e7f56c077677b57f718e4edc8229756b35dace6a Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 20 Sep 2024 09:10:33 +0200 Subject: [PATCH 03/65] BUILD/MAJOR: go: upgrade go to 1.23 and client-native Includes changes to mimetypes in handlers for general storage and raw. Alse removal of unused enum on tcp-request and tcp-response. --- .gitlab-ci.yml | 2 +- .golangci.yml | 17 ++-- Makefile | 2 +- configuration/dataplane_storage.go | 2 +- configuration/map_sync.go | 12 +-- configuration/user.go | 6 +- configure_data_plane.go | 18 ++--- .../consul_service_discovery_instance.go | 6 +- doc.go | 1 + embedded_spec.go | 80 ++++++++++--------- generate/swagger/script.sh | 2 + go.mod | 6 +- go.sum | 8 +- handlers/general_storage.go | 12 ++- handlers/raw.go | 2 +- .../get_h_a_proxy_configuration.go | 61 -------------- .../get_h_a_proxy_configuration_responses.go | 14 ++-- operations/data_plane_api.go | 27 ++++--- .../stick_table/set_stick_table_entries.go | 1 + ...replace_storage_general_file_parameters.go | 50 ++++++++---- .../get_openapiv3_specification.go | 2 +- .../get_openapiv3_specification_parameters.go | 2 +- .../get_openapiv3_specification_responses.go | 2 +- .../get_openapiv3_specification_urlbuilder.go | 2 +- server.go | 2 +- 25 files changed, 156 insertions(+), 183 deletions(-) rename operations/{specification_openapiv3 => version3}/get_openapiv3_specification.go (98%) rename operations/{specification_openapiv3 => version3}/get_openapiv3_specification_parameters.go (98%) rename operations/{specification_openapiv3 => version3}/get_openapiv3_specification_responses.go (99%) rename operations/{specification_openapiv3 => version3}/get_openapiv3_specification_urlbuilder.go (98%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb69fcb0..382bc286 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian BATS_VERSION: v1.4.1 - GO_VERSION: "1.22" + GO_VERSION: "1.23" DOCKER_VERSION: "26.0" diff: diff --git a/.golangci.yml b/.golangci.yml index cbcf2149..1bf737f3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,7 +22,6 @@ linters: disable: - dupl - exhaustive - - exhaustivestruct - funlen - gci - gochecknoglobals @@ -30,8 +29,6 @@ linters: - goconst - gocyclo - godot - - goerr113 - - gomnd - lll - nestif - nlreturn @@ -41,18 +38,9 @@ linters: - paralleltest - testpackage - varnamelen - - nosnakecase - exhaustruct - nonamedreturns - forcetypeassert - - golint #deprecated - - varcheck #deprecated - - ifshort #deprecated - - structcheck #deprecated - - maligned #deprecated - - scopelint #deprecated - - interfacer #deprecated - - deadcode #deprecated - rowserrcheck #rowserrcheck is disabled because of generics - sqlclosecheck #rowserrcheck is disabled because of generics - wastedassign #rowserrcheck is disabled because of generics @@ -71,6 +59,11 @@ linters: - gocritic - tagalign - depguard + - mnd + - gomnd + - err113 + - execinquery + - exportloopref issues: exclude: diff --git a/Makefile b/Makefile index 7083aa79..a6ab96ee 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2} SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/client-native/master/Makefile | grep SWAGGER_VERSION -m 1 | awk -F"=" '{print $$2}'} BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 -GOLANGCI_LINT_VERSION=1.57.1 +GOLANGCI_LINT_VERSION=1.61.0 all: update clean build diff --git a/configuration/dataplane_storage.go b/configuration/dataplane_storage.go index 756725ab..c9db3cd3 100644 --- a/configuration/dataplane_storage.go +++ b/configuration/dataplane_storage.go @@ -130,7 +130,7 @@ func (c *Configuration) copyClusterToConfiguration(dapiStorageCluster *storagety if dapiStorageCluster.ClusterID != nil && !misc.HasOSArg("", "", "") { c.Cluster.ClusterID.Store(*dapiStorageCluster.ClusterID) } - if dapiStorageCluster.ClusterLogTargets != nil && len(dapiStorageCluster.ClusterLogTargets) > 0 { + if len(dapiStorageCluster.ClusterLogTargets) > 0 { c.Cluster.ClusterLogTargets = dapiStorageCluster.ClusterLogTargets } } diff --git a/configuration/map_sync.go b/configuration/map_sync.go index edc9a9f1..10534678 100644 --- a/configuration/map_sync.go +++ b/configuration/map_sync.go @@ -124,7 +124,7 @@ func equalSomeEntries(fEntries, rEntries models.MapEntries, index ...int) bool { return false } - max := 0 + var maximum int switch l := len(rEntries); { case l > 19: for i := l - 20; i < l; i++ { @@ -132,21 +132,21 @@ func equalSomeEntries(fEntries, rEntries models.MapEntries, index ...int) bool { return false } } - max = l - 19 + maximum = l - 19 case l == 0: return true default: - max = l + maximum = l } maxRandom := 10 - if max < 10 { - maxRandom = max + if maximum < 10 { + maxRandom = maximum } for range maxRandom { // There's no need for strong number generation, here, just need for performance - r := rand.Intn(max) + r := rand.Intn(maximum) if len(index) > 0 { r = index[0] } diff --git a/configuration/user.go b/configuration/user.go index d7c9423e..05bff1c8 100644 --- a/configuration/user.go +++ b/configuration/user.go @@ -176,7 +176,7 @@ func AuthenticateUser(user string, pass string) (interface{}, error) { if strings.HasPrefix(u.Password, "\"${") && strings.HasSuffix(u.Password, "}\"") { userPass = os.Getenv(misc.ExtractEnvVar(userPass)) if userPass == "" { - return nil, api_errors.New(401, fmt.Sprintf("%s %s", "can not read password from env variable:", u.Password)) + return nil, api_errors.New(401, "%s %s", "can not read password from env variable:", u.Password) } } @@ -184,12 +184,12 @@ func AuthenticateUser(user string, pass string) (interface{}, error) { if pass == userPass { return user, nil } - return nil, api_errors.New(401, fmt.Sprintf("%s %s", "invalid password:", pass)) + return nil, api_errors.New(401, "%s %s", "invalid password:", pass) } if checkPassword(pass, userPass) { return user, nil } - return nil, api_errors.New(401, fmt.Sprintf("%s %s", "invalid password:", pass)) + return nil, api_errors.New(401, "%s %s", "invalid password:", pass) } func checkPassword(pass, storedPass string) bool { diff --git a/configure_data_plane.go b/configure_data_plane.go index 9c2c1ec3..8699c4b8 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -56,7 +56,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations" "github.com/haproxytech/dataplaneapi/operations/discovery" "github.com/haproxytech/dataplaneapi/operations/specification" - "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3" + "github.com/haproxytech/dataplaneapi/operations/version3" "github.com/haproxytech/dataplaneapi/rate" "github.com/haproxytech/dataplaneapi/resilient" socket_runtime "github.com/haproxytech/dataplaneapi/runtime" @@ -868,7 +868,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m data.ID = service_discovery.NewServiceDiscoveryUUID() } if errSD = service_discovery.ValidateConsulData(data, true); errSD != nil { - log.Fatalf("Error validating Consul instance: " + errSD.Error()) + log.Fatal("Error validating Consul instance: " + errSD.Error()) } if errSD = discovery.AddNode("consul", *data.ID, data); errSD != nil { log.Warning("Error creating consul instance: " + errSD.Error()) @@ -884,7 +884,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m data.ID = service_discovery.NewServiceDiscoveryUUID() } if errSD = service_discovery.ValidateAWSData(data, true); errSD != nil { - log.Fatalf("Error validating AWS instance: " + errSD.Error()) + log.Fatal("Error validating AWS instance: " + errSD.Error()) } if errSD = discovery.AddNode("aws", *data.ID, data); errSD != nil { log.Warning("Error creating AWS instance: " + errSD.Error()) @@ -917,12 +917,12 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.StorageReplaceStorageGeneralFileHandler = &handlers.StorageReplaceStorageGeneralFileHandlerImpl{Client: client, ReloadAgent: ra} // setup OpenAPI v3 specification handler - api.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + api.Version3GetOpenapiv3SpecificationHandler = version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { v2 := openapi2.T{} err = v2.UnmarshalJSON(SwaggerJSON) if err != nil { e := misc.HandleError(err) - return specification_openapiv3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) + return version3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) } // if host is empty(dynamic hosts), server prop is empty, @@ -936,9 +936,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m v3, err = openapi2conv.ToV3(&v2) if err != nil { e := misc.HandleError(err) - return specification_openapiv3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) + return version3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) } - return specification_openapiv3.NewGetOpenapiv3SpecificationOK().WithPayload(v3) + return version3.NewGetOpenapiv3SpecificationOK().WithPayload(v3) }) // TODO: do we need a ReloadAgent for SPOE @@ -1217,10 +1217,10 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. func reloadConfigurationFile(client client_native.HAProxyClient, haproxyOptions dataplaneapi_config.HAProxyConfiguration, users *dataplaneapi_config.Users) { confClient, err := cn.ConfigureConfigurationClient(haproxyOptions, mWorker) if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } if err := users.Init(); err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } log.Info("Rereading Configuration Files") clientMutex.Lock() diff --git a/discovery/consul_service_discovery_instance.go b/discovery/consul_service_discovery_instance.go index d28a5ccf..d2066104 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -211,7 +211,7 @@ func (c *consulInstance) validateHealthChecks(node *serviceEntry) bool { } func (c *consulInstance) validateHealthChecksAny(node *serviceEntry) bool { - if node.Checks == nil || len(node.Checks) == 0 { + if len(node.Checks) == 0 { return false } @@ -224,7 +224,7 @@ func (c *consulInstance) validateHealthChecksAny(node *serviceEntry) bool { } func (c *consulInstance) validateHealthChecksAll(node *serviceEntry) bool { - if node.Checks == nil || len(node.Checks) == 0 { + if len(node.Checks) == 0 { return false } @@ -237,7 +237,7 @@ func (c *consulInstance) validateHealthChecksAll(node *serviceEntry) bool { } func (c *consulInstance) validateHealthChecksMin(node *serviceEntry) bool { - if node.Checks == nil || len(node.Checks) == 0 { + if len(node.Checks) == 0 { return false } diff --git a/doc.go b/doc.go index fb34ce22..93389a7b 100644 --- a/doc.go +++ b/doc.go @@ -35,6 +35,7 @@ // Produces: // - application/octet-stream // - application/json +// - text/plain // // swagger:meta package dataplaneapi diff --git a/embedded_spec.go b/embedded_spec.go index 5ded4620..de8f2fd0 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -16655,7 +16655,7 @@ func init() { "get": { "description": "Returns HAProxy configuration file in plain text", "produces": [ - "application/json" + "text/plain" ], "tags": [ "Configuration" @@ -16674,15 +16674,7 @@ func init() { "200": { "description": "Operation successful", "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "string" - } - } + "type": "string" }, "headers": { "Cluster-Version": { @@ -16710,7 +16702,7 @@ func init() { "text/plain" ], "produces": [ - "application/json" + "text/plain" ], "tags": [ "Configuration" @@ -20774,7 +20766,7 @@ func init() { "parameters": [ { "type": "file", - "x-mimetype": "text/plain", + "x-mimetype": "application/octet-stream", "description": "General use file content", "name": "file_upload", "in": "formData" @@ -20837,7 +20829,7 @@ func init() { "put": { "description": "Replaces the contents of a managed general use file on disk", "consumes": [ - "text/plain" + "multipart/form-data" ], "produces": [ "application/json" @@ -20856,12 +20848,11 @@ func init() { "required": true }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + "type": "file", + "x-mimetype": "application/octet-stream", + "description": "General use file content", + "name": "file_upload", + "in": "formData" }, { "$ref": "#/parameters/skip_reload" @@ -26083,6 +26074,9 @@ func init() { "pattern": "^[^\\s]+$", "x-display-name": "Group" }, + "h1_accept_payload_with_any_method": { + "type": "boolean" + }, "h1_case_adjust": { "type": "array", "items": { @@ -26107,6 +26101,9 @@ func init() { "h1_case_adjust_file": { "type": "string" }, + "h1_do_not_close_on_insecure_transfer_encoding": { + "type": "boolean" + }, "h2_workaround_bogus_websocket_clients": { "type": "boolean" }, @@ -31984,6 +31981,11 @@ func init() { "type": "integer", "x-nullable": true }, + "metadata": { + "additionalProperties": { + "type": "object" + } + }, "name": { "type": "string", "pattern": "^[^\\s]+$", @@ -63081,7 +63083,7 @@ func init() { "get": { "description": "Returns HAProxy configuration file in plain text", "produces": [ - "application/json" + "text/plain" ], "tags": [ "Configuration" @@ -63108,15 +63110,7 @@ func init() { "200": { "description": "Operation successful", "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "string" - } - } + "type": "string" }, "headers": { "Cluster-Version": { @@ -63153,7 +63147,7 @@ func init() { "text/plain" ], "produces": [ - "application/json" + "text/plain" ], "tags": [ "Configuration" @@ -69587,7 +69581,7 @@ func init() { "parameters": [ { "type": "file", - "x-mimetype": "text/plain", + "x-mimetype": "application/octet-stream", "description": "General use file content", "name": "file_upload", "in": "formData" @@ -69695,7 +69689,7 @@ func init() { "put": { "description": "Replaces the contents of a managed general use file on disk", "consumes": [ - "text/plain" + "multipart/form-data" ], "produces": [ "application/json" @@ -69714,12 +69708,11 @@ func init() { "required": true }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + "type": "file", + "x-mimetype": "application/octet-stream", + "description": "General use file content", + "name": "file_upload", + "in": "formData" }, { "type": "boolean", @@ -76067,6 +76060,9 @@ func init() { "pattern": "^[^\\s]+$", "x-display-name": "Group" }, + "h1_accept_payload_with_any_method": { + "type": "boolean" + }, "h1_case_adjust": { "type": "array", "items": { @@ -76078,6 +76074,9 @@ func init() { "h1_case_adjust_file": { "type": "string" }, + "h1_do_not_close_on_insecure_transfer_encoding": { + "type": "boolean" + }, "h2_workaround_bogus_websocket_clients": { "type": "boolean" }, @@ -81892,6 +81891,11 @@ func init() { "type": "integer", "x-nullable": true }, + "metadata": { + "additionalProperties": { + "type": "object" + } + }, "name": { "type": "string", "pattern": "^[^\\s]+$", diff --git a/generate/swagger/script.sh b/generate/swagger/script.sh index 815120d3..4e16948a 100755 --- a/generate/swagger/script.sh +++ b/generate/swagger/script.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +GO_VERSION=$(go version) +echo " ---> go version: $GO_VERSION" SPEC_DIR=$(mktemp -d) echo " ---> source folder: $SPEC_DIR" DST_DIR=$(mktemp -d) diff --git a/go.mod b/go.mod index c2a14fcb..d775dddd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.22 +go 1.23 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.1 + github.com/haproxytech/client-native/v6 v6.0.3 github.com/jessevdk/go-flags v1.5.0 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -39,7 +39,7 @@ require ( github.com/stretchr/testify v1.9.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.27.0 - golang.org/x/sys v0.24.0 + golang.org/x/sys v0.25.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 376bfbc8..27c24044 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,8 @@ github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/haproxytech/client-native/v6 v6.0.1 h1:lVeg4CySqpFlRa4CER/+S4LbhKNBLHV1AK8vvzk1zrA= -github.com/haproxytech/client-native/v6 v6.0.1/go.mod h1:XDu46mnUw7/5Xs8RRgaM0anryVg9t/kMqe/MoEc8JjI= +github.com/haproxytech/client-native/v6 v6.0.3 h1:AFd021MvqABlE/UhHiqFC/eYH9Wx7Tn5WPfVszZlero= +github.com/haproxytech/client-native/v6 v6.0.3/go.mod h1:chE1dxclu+2DCtmc969mDsLXehijaEVXYWoftu+X2nk= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= @@ -208,8 +208,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/handlers/general_storage.go b/handlers/general_storage.go index e7dfece3..61047e9f 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -188,7 +188,17 @@ func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.Repl return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) } - _, err = gs.Replace(params.Name, params.Data) + file, ok := params.FileUpload.(*runtime.File) + if !ok { + return storage.NewReplaceStorageGeneralFileBadRequest() + } + data := []byte{} + if _, err := file.Read(data); err != nil { + e := misc.HandleError(err) + return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) + } + + _, err = gs.Replace(params.Name, string(data)) if err != nil { e := misc.HandleError(err) return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/raw.go b/handlers/raw.go index d2b0b370..a47cfb37 100644 --- a/handlers/raw.go +++ b/handlers/raw.go @@ -67,7 +67,7 @@ func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyC if clusterVersion != 0 { cVersion = strconv.FormatInt(clusterVersion, 10) } - return configuration.NewGetHAProxyConfigurationOK().WithPayload(&configuration.GetHAProxyConfigurationOKBody{Data: &data}).WithClusterVersion(cVersion).WithConfigurationChecksum(md5Hash) + return configuration.NewGetHAProxyConfigurationOK().WithPayload(data).WithClusterVersion(cVersion).WithConfigurationChecksum(md5Hash) } // Handle executing the request and returning a response diff --git a/operations/configuration/get_h_a_proxy_configuration.go b/operations/configuration/get_h_a_proxy_configuration.go index 13e4369f..725e5fa1 100644 --- a/operations/configuration/get_h_a_proxy_configuration.go +++ b/operations/configuration/get_h_a_proxy_configuration.go @@ -21,14 +21,9 @@ package configuration // Editing this file might prove futile when you re-run the generate command import ( - "context" "net/http" - "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // GetHAProxyConfigurationHandlerFunc turns a function with the right signature into a get h a proxy configuration handler @@ -89,59 +84,3 @@ func (o *GetHAProxyConfiguration) ServeHTTP(rw http.ResponseWriter, r *http.Requ o.Context.Respond(rw, r, route.Produces, route, res) } - -// GetHAProxyConfigurationOKBody get h a proxy configuration o k body -// -// swagger:model GetHAProxyConfigurationOKBody -type GetHAProxyConfigurationOKBody struct { - - // data - // Required: true - Data *string `json:"data"` -} - -// Validate validates this get h a proxy configuration o k body -func (o *GetHAProxyConfigurationOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetHAProxyConfigurationOKBody) validateData(formats strfmt.Registry) error { - - if err := validate.Required("getHAProxyConfigurationOK"+"."+"data", "body", o.Data); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this get h a proxy configuration o k body based on context it is used -func (o *GetHAProxyConfigurationOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetHAProxyConfigurationOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetHAProxyConfigurationOKBody) UnmarshalBinary(b []byte) error { - var res GetHAProxyConfigurationOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/operations/configuration/get_h_a_proxy_configuration_responses.go b/operations/configuration/get_h_a_proxy_configuration_responses.go index 0c115884..1c5d0e54 100644 --- a/operations/configuration/get_h_a_proxy_configuration_responses.go +++ b/operations/configuration/get_h_a_proxy_configuration_responses.go @@ -53,7 +53,7 @@ type GetHAProxyConfigurationOK struct { /* In: Body */ - Payload *GetHAProxyConfigurationOKBody `json:"body,omitempty"` + Payload string `json:"body,omitempty"` } // NewGetHAProxyConfigurationOK creates GetHAProxyConfigurationOK with default headers values @@ -96,13 +96,13 @@ func (o *GetHAProxyConfigurationOK) SetConfigurationVersion(configurationVersion } // WithPayload adds the payload to the get h a proxy configuration o k response -func (o *GetHAProxyConfigurationOK) WithPayload(payload *GetHAProxyConfigurationOKBody) *GetHAProxyConfigurationOK { +func (o *GetHAProxyConfigurationOK) WithPayload(payload string) *GetHAProxyConfigurationOK { o.Payload = payload return o } // SetPayload sets the payload to the get h a proxy configuration o k response -func (o *GetHAProxyConfigurationOK) SetPayload(payload *GetHAProxyConfigurationOKBody) { +func (o *GetHAProxyConfigurationOK) SetPayload(payload string) { o.Payload = payload } @@ -131,11 +131,9 @@ func (o *GetHAProxyConfigurationOK) WriteResponse(rw http.ResponseWriter, produc } rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this } } diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index d734ec73..2fd27ccc 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -79,7 +79,6 @@ import ( "github.com/haproxytech/dataplaneapi/operations/service_discovery" "github.com/haproxytech/dataplaneapi/operations/sites" "github.com/haproxytech/dataplaneapi/operations/specification" - "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3" "github.com/haproxytech/dataplaneapi/operations/spoe" "github.com/haproxytech/dataplaneapi/operations/spoe_transactions" "github.com/haproxytech/dataplaneapi/operations/stats" @@ -93,6 +92,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations/transactions" "github.com/haproxytech/dataplaneapi/operations/user" "github.com/haproxytech/dataplaneapi/operations/userlist" + "github.com/haproxytech/dataplaneapi/operations/version3" ) // NewDataPlaneAPI creates a new DataPlane instance @@ -119,6 +119,7 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { BinProducer: runtime.ByteStreamProducer(), JSONProducer: runtime.JSONProducer(), + TxtProducer: runtime.TextProducer(), ACLRuntimeDeleteServicesHaproxyRuntimeAclsParentNameEntriesIDHandler: acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDHandlerFunc(func(params acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesID has not yet been implemented") @@ -969,8 +970,8 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { StorageGetOneStorageSSLCertificateHandler: storage.GetOneStorageSSLCertificateHandlerFunc(func(params storage.GetOneStorageSSLCertificateParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation storage.GetOneStorageSSLCertificate has not yet been implemented") }), - SpecificationOpenapiv3GetOpenapiv3SpecificationHandler: specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation specification_openapiv3.GetOpenapiv3Specification has not yet been implemented") + Version3GetOpenapiv3SpecificationHandler: version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation version3.GetOpenapiv3Specification has not yet been implemented") }), PeerEntryGetPeerEntriesHandler: peer_entry.GetPeerEntriesHandlerFunc(func(params peer_entry.GetPeerEntriesParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation peer_entry.GetPeerEntries has not yet been implemented") @@ -1506,6 +1507,9 @@ type DataPlaneAPI struct { // JSONProducer registers a producer for the following mime types: // - application/json JSONProducer runtime.Producer + // TxtProducer registers a producer for the following mime types: + // - text/plain + TxtProducer runtime.Producer // BasicAuthAuth registers a function that takes username and password and returns a principal // it performs authentication with basic auth @@ -2080,8 +2084,8 @@ type DataPlaneAPI struct { StorageGetOneStorageMapHandler storage.GetOneStorageMapHandler // StorageGetOneStorageSSLCertificateHandler sets the operation handler for the get one storage s s l certificate operation StorageGetOneStorageSSLCertificateHandler storage.GetOneStorageSSLCertificateHandler - // SpecificationOpenapiv3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation - SpecificationOpenapiv3GetOpenapiv3SpecificationHandler specification_openapiv3.GetOpenapiv3SpecificationHandler + // Version3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation + Version3GetOpenapiv3SpecificationHandler version3.GetOpenapiv3SpecificationHandler // PeerEntryGetPeerEntriesHandler sets the operation handler for the get peer entries operation PeerEntryGetPeerEntriesHandler peer_entry.GetPeerEntriesHandler // PeerEntryGetPeerEntryHandler sets the operation handler for the get peer entry operation @@ -2487,6 +2491,9 @@ func (o *DataPlaneAPI) Validate() error { if o.JSONProducer == nil { unregistered = append(unregistered, "JSONProducer") } + if o.TxtProducer == nil { + unregistered = append(unregistered, "TxtProducer") + } if o.BasicAuthAuth == nil { unregistered = append(unregistered, "BasicAuthAuth") @@ -3341,8 +3348,8 @@ func (o *DataPlaneAPI) Validate() error { if o.StorageGetOneStorageSSLCertificateHandler == nil { unregistered = append(unregistered, "storage.GetOneStorageSSLCertificateHandler") } - if o.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler == nil { - unregistered = append(unregistered, "specification_openapiv3.GetOpenapiv3SpecificationHandler") + if o.Version3GetOpenapiv3SpecificationHandler == nil { + unregistered = append(unregistered, "version3.GetOpenapiv3SpecificationHandler") } if o.PeerEntryGetPeerEntriesHandler == nil { unregistered = append(unregistered, "peer_entry.GetPeerEntriesHandler") @@ -3886,6 +3893,8 @@ func (o *DataPlaneAPI) ProducersFor(mediaTypes []string) map[string]runtime.Prod result["application/octet-stream"] = o.BinProducer case "application/json": result["application/json"] = o.JSONProducer + case "text/plain": + result["text/plain"] = o.TxtProducer } if p, ok := o.customProducers[mt]; ok { @@ -5061,7 +5070,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/specification_openapiv3"] = specification_openapiv3.NewGetOpenapiv3Specification(o.context, o.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler) + o.handlers["GET"]["/specification_openapiv3"] = version3.NewGetOpenapiv3Specification(o.context, o.Version3GetOpenapiv3SpecificationHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } @@ -5743,6 +5752,6 @@ func (o *DataPlaneAPI) AddMiddlewareFor(method, path string, builder middleware. } o.Init() if h, ok := o.handlers[um][path]; ok { - o.handlers[method][path] = builder(h) + o.handlers[um][path] = builder(h) } } diff --git a/operations/stick_table/set_stick_table_entries.go b/operations/stick_table/set_stick_table_entries.go index 4520a2f2..71d0a195 100644 --- a/operations/stick_table/set_stick_table_entries.go +++ b/operations/stick_table/set_stick_table_entries.go @@ -170,6 +170,7 @@ func (o *SetStickTableEntriesBody) ContextValidate(ctx context.Context, formats func (o *SetStickTableEntriesBody) contextValidateDataType(ctx context.Context, formats strfmt.Registry) error { if o.DataType != nil { + if err := o.DataType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("stick_table_entry" + "." + "data_type") diff --git a/operations/storage/replace_storage_general_file_parameters.go b/operations/storage/replace_storage_general_file_parameters.go index 5235a34f..7d0db4c7 100644 --- a/operations/storage/replace_storage_general_file_parameters.go +++ b/operations/storage/replace_storage_general_file_parameters.go @@ -22,6 +22,7 @@ package storage import ( "io" + "mime/multipart" "net/http" "github.com/go-openapi/errors" @@ -31,6 +32,13 @@ import ( "github.com/go-openapi/swag" ) +// ReplaceStorageGeneralFileMaxParseMemory sets the maximum size in bytes for +// the multipart form parser for this operation. +// +// The default value is 32 MB. +// The multipart parser stores up to this + 10MB. +var ReplaceStorageGeneralFileMaxParseMemory int64 = 32 << 20 + // NewReplaceStorageGeneralFileParams creates a new ReplaceStorageGeneralFileParams object // with the default values initialized. func NewReplaceStorageGeneralFileParams() ReplaceStorageGeneralFileParams { @@ -59,11 +67,10 @@ type ReplaceStorageGeneralFileParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` - /* - Required: true - In: body + /*General use file content + In: formData */ - Data string + FileUpload io.ReadCloser /*If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. In: query Default: false @@ -92,21 +99,23 @@ func (o *ReplaceStorageGeneralFileParams) BindRequest(r *http.Request, route *mi qs := runtime.Values(r.URL.Query()) - if runtime.HasBody(r) { - defer r.Body.Close() - var body string - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("data", "body", "")) - } else { - res = append(res, errors.NewParseError("data", "body", "", err)) - } - } else { - // no validation required on inline body - o.Data = body + if err := r.ParseMultipartForm(ReplaceStorageGeneralFileMaxParseMemory); err != nil { + if err != http.ErrNotMultipart { + return errors.New(400, "%v", err) + } else if err := r.ParseForm(); err != nil { + return errors.New(400, "%v", err) } + } + + fileUpload, fileUploadHeader, err := r.FormFile("file_upload") + if err != nil && err != http.ErrMissingFile { + res = append(res, errors.New(400, "reading file %q failed: %v", "fileUpload", err)) + } else if err == http.ErrMissingFile { + // no-op for missing but optional file parameter + } else if err := o.bindFileUpload(fileUpload, fileUploadHeader); err != nil { + res = append(res, err) } else { - res = append(res, errors.Required("data", "body", "")) + o.FileUpload = &runtime.File{Data: fileUpload, Header: fileUploadHeader} } qForceReload, qhkForceReload, _ := qs.GetOK("force_reload") @@ -129,6 +138,13 @@ func (o *ReplaceStorageGeneralFileParams) BindRequest(r *http.Request, route *mi return nil } +// bindFileUpload binds file parameter FileUpload. +// +// The only supported validations on files are MinLength and MaxLength +func (o *ReplaceStorageGeneralFileParams) bindFileUpload(file multipart.File, header *multipart.FileHeader) error { + return nil +} + // bindForceReload binds and validates parameter ForceReload from query. func (o *ReplaceStorageGeneralFileParams) bindForceReload(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/specification_openapiv3/get_openapiv3_specification.go b/operations/version3/get_openapiv3_specification.go similarity index 98% rename from operations/specification_openapiv3/get_openapiv3_specification.go rename to operations/version3/get_openapiv3_specification.go index a230b44c..59793459 100644 --- a/operations/specification_openapiv3/get_openapiv3_specification.go +++ b/operations/version3/get_openapiv3_specification.go @@ -15,7 +15,7 @@ // limitations under the License. // -package specification_openapiv3 +package version3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command diff --git a/operations/specification_openapiv3/get_openapiv3_specification_parameters.go b/operations/version3/get_openapiv3_specification_parameters.go similarity index 98% rename from operations/specification_openapiv3/get_openapiv3_specification_parameters.go rename to operations/version3/get_openapiv3_specification_parameters.go index 233ae5a3..8910da91 100644 --- a/operations/specification_openapiv3/get_openapiv3_specification_parameters.go +++ b/operations/version3/get_openapiv3_specification_parameters.go @@ -15,7 +15,7 @@ // limitations under the License. // -package specification_openapiv3 +package version3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/operations/specification_openapiv3/get_openapiv3_specification_responses.go b/operations/version3/get_openapiv3_specification_responses.go similarity index 99% rename from operations/specification_openapiv3/get_openapiv3_specification_responses.go rename to operations/version3/get_openapiv3_specification_responses.go index 5dd2ac48..012e597c 100644 --- a/operations/specification_openapiv3/get_openapiv3_specification_responses.go +++ b/operations/version3/get_openapiv3_specification_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package specification_openapiv3 +package version3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go b/operations/version3/get_openapiv3_specification_urlbuilder.go similarity index 98% rename from operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go rename to operations/version3/get_openapiv3_specification_urlbuilder.go index b5ae907f..7cb790f7 100644 --- a/operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go +++ b/operations/version3/get_openapiv3_specification_urlbuilder.go @@ -15,7 +15,7 @@ // limitations under the License. // -package specification_openapiv3 +package version3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command diff --git a/server.go b/server.go index 21d19c3b..011b035c 100644 --- a/server.go +++ b/server.go @@ -96,7 +96,7 @@ type Server struct { ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"` KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"` ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"` - WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"60s"` + WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"30s"` httpServerL net.Listener TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"` From 8335a87e14502dc304d8893037d466c9203e73c1 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 20 Sep 2024 09:20:50 +0200 Subject: [PATCH 04/65] TEST/MINOR: bats: remove tests for removed track-scx actions and raw --- e2e/tests/raw/get.bats | 2 +- e2e/tests/tcp_request_rules/add_2.8.bats | 20 ------------------- .../data/post-track-sc-x.json | 8 -------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 e2e/tests/tcp_request_rules/data/post-track-sc-x.json diff --git a/e2e/tests/raw/get.bats b/e2e/tests/raw/get.bats index 4f8410ce..3483f792 100644 --- a/e2e/tests/raw/get.bats +++ b/e2e/tests/raw/get.bats @@ -25,6 +25,6 @@ load 'utils/_helpers' @test "raw: Download configuration" { resource_get "$_RAW_BASE_PATH" assert_equal "$SC" 200 - test -n "$(get_json_path "$BODY" .)" || + test -n "$BODY" || fail "failed to download raw config. BODY: '$BODY'" } diff --git a/e2e/tests/tcp_request_rules/add_2.8.bats b/e2e/tests/tcp_request_rules/add_2.8.bats index ce0d89e0..655ef6ef 100644 --- a/e2e/tests/tcp_request_rules/add_2.8.bats +++ b/e2e/tests/tcp_request_rules/add_2.8.bats @@ -46,26 +46,6 @@ load 'utils/_helpers' fi } -@test "tcp_request_rules: Add a new TCP Request Rule track-sc-x to backend" { - if haproxy_version_ge "2.8" - then - # Using old track-sc(0|1|2) - PARENT_NAME="test_sticksc" - resource_post "$_BACKEND_BASE_PATH/$PARENT_NAME/tcp_request_rules/0" "data/post-track-sc-x.json" "force_reload=true" - assert_equal "$SC" 201 - - resource_get "$_BACKEND_BASE_PATH/$PARENT_NAME/tcp_request_rules/0" - assert_equal "$SC" 200 - assert_equal "$(get_json_path "$BODY" ".action")" "track-sc" - assert_equal "$(get_json_path "$BODY" ".type")" "content" - assert_equal "$(get_json_path "$BODY" ".cond")" "if" - assert_equal "$(get_json_path "$BODY" ".cond_test")" "TRUE" - assert_equal "$(get_json_path "$BODY" ".track_key")" "src" - assert_equal "$(get_json_path "$BODY" ".track_table")" "test_sticksc" - assert_equal "$(get_json_path "$BODY" ".track_stick_counter")" 0 - fi -} - @test "tcp_request_rules: Fail - Add a new TCP Request Rule track-sc to backend - when track_sc_stick_counter is missing" { if haproxy_version_ge "2.8" then diff --git a/e2e/tests/tcp_request_rules/data/post-track-sc-x.json b/e2e/tests/tcp_request_rules/data/post-track-sc-x.json deleted file mode 100644 index 4702acbc..00000000 --- a/e2e/tests/tcp_request_rules/data/post-track-sc-x.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "type": "content", - "action": "track-sc0", - "cond": "if", - "cond_test": "TRUE", - "track_table": "test_sticksc", - "track_key": "src" -} From 3b0d3deae4cd2f70499dd554a81983f9bdb948d6 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 20 Sep 2024 13:45:13 +0200 Subject: [PATCH 05/65] BUG/MAJOR: configuration: add nil checks when deprecating users --- configuration/configuration_deprecated.go | 64 ++++++++++++----------- configuration/configuration_storage.go | 14 ++--- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/configuration/configuration_deprecated.go b/configuration/configuration_deprecated.go index 88d80634..c0120245 100644 --- a/configuration/configuration_deprecated.go +++ b/configuration/configuration_deprecated.go @@ -73,40 +73,42 @@ func (c *Configuration) migrateUsers() ([]string, error) { clusterModeStoragePath := path.Join(c.HAProxy.DataplaneStorageDir, storage.ClusterModeDataFileName) usersToMigrate := make([]storagetype.User, 0) - for _, singleModeUser := range dapiCfgStorage.Dataplaneapi.Users { - found := false - // Only migrate cluster users - if !singleModeUser.IsClusterUser() { - continue - } + if dapiCfgStorage.Dataplaneapi != nil { + for _, singleModeUser := range dapiCfgStorage.Dataplaneapi.Users { + found := false + // Only migrate cluster users + if !singleModeUser.IsClusterUser() { + continue + } - var muser storagetype.User - for _, muser = range dapiStorageUsers { - if muser.Name == singleModeUser.Name { - found = true - break + var muser storagetype.User + for _, muser = range dapiStorageUsers { + if muser.Name == singleModeUser.Name { + found = true + break + } } - } - // Already migrated - if found { - msg := fmt.Sprintf("[CFG DEPRECATED] [SKIP] [User] [%s]: already migrated. Old location [%s] New location [%s]. Use only new location", - singleModeUser.Name, - c.HAProxy.DataplaneConfig, - clusterModeStoragePath) - // Logging is not done here as at startup, the logger is not yet initialized - // so it's done later on - deprecationInfoMsg = append(deprecationInfoMsg, msg) - } else { - // If not already migrated, then migrate it - msg := fmt.Sprintf("[CFG DEPRECATED] [MIGRATE] [User] [%s]: migrating. Old location [%s] New location [%s]. Use only new location", - singleModeUser.Name, - c.HAProxy.DataplaneConfig, - clusterModeStoragePath) - // Logging is not done here as at startup, the logger is not yet initialized - // so it's done later on - deprecationInfoMsg = append(deprecationInfoMsg, msg) - usersToMigrate = append(usersToMigrate, singleModeUser) + // Already migrated + if found { + msg := fmt.Sprintf("[CFG DEPRECATED] [SKIP] [User] [%s]: already migrated. Old location [%s] New location [%s]. Use only new location", + singleModeUser.Name, + c.HAProxy.DataplaneConfig, + clusterModeStoragePath) + // Logging is not done here as at startup, the logger is not yet initialized + // so it's done later on + deprecationInfoMsg = append(deprecationInfoMsg, msg) + } else { + // If not already migrated, then migrate it + msg := fmt.Sprintf("[CFG DEPRECATED] [MIGRATE] [User] [%s]: migrating. Old location [%s] New location [%s]. Use only new location", + singleModeUser.Name, + c.HAProxy.DataplaneConfig, + clusterModeStoragePath) + // Logging is not done here as at startup, the logger is not yet initialized + // so it's done later on + deprecationInfoMsg = append(deprecationInfoMsg, msg) + usersToMigrate = append(usersToMigrate, singleModeUser) + } } } if err := c.clusterModeStorage.AddUsersAndStore(usersToMigrate); err != nil { diff --git a/configuration/configuration_storage.go b/configuration/configuration_storage.go index b7437a46..4c97ea3b 100644 --- a/configuration/configuration_storage.go +++ b/configuration/configuration_storage.go @@ -382,14 +382,16 @@ func copyConfigurationToStorage(cfg *Configuration) { func (cfgStorage *StorageDataplaneAPIConfiguration) emptyDeprecatedSections() { cfgStorage.DeprecatedBootstrapKey = nil // Remove Cluster Users from dapi configuration file - for i := 0; i < len(cfgStorage.Dataplaneapi.Users); { - if cfgStorage.Dataplaneapi.Users[i].IsClusterUser() { - if len(cfgStorage.Dataplaneapi.Users) > i { - cfgStorage.Dataplaneapi.Users = append(cfgStorage.Dataplaneapi.Users[:i], cfgStorage.Dataplaneapi.Users[i+1:]...) - continue + if cfgStorage.Dataplaneapi != nil { + for i := 0; i < len(cfgStorage.Dataplaneapi.Users); { + if cfgStorage.Dataplaneapi.Users[i].IsClusterUser() { + if len(cfgStorage.Dataplaneapi.Users) > i { + cfgStorage.Dataplaneapi.Users = append(cfgStorage.Dataplaneapi.Users[:i], cfgStorage.Dataplaneapi.Users[i+1:]...) + continue + } } + i++ } - i++ } // Remove Cluster cfgStorage.DeprecatedCluster = nil From 18643e9c5d9e6300e3e12d299c042d4ac31873d0 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 26 Sep 2024 15:56:24 +0200 Subject: [PATCH 06/65] BUILD/MINOR: cn: upgrade client-native Include changes for rst-ttl for http/tcp request and responses and change how the _version is read from config-parser. Now we stop at first _version we found in the config. --- embedded_spec.go | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- 3 files changed, 99 insertions(+), 3 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index de8f2fd0..55682b31 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -28067,6 +28067,18 @@ func init() { "x-display-name": "Return Error Code", "x-nullable": true }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { @@ -28839,6 +28851,18 @@ func init() { "x-display-name": "Return Error Code", "x-nullable": true }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { @@ -34678,6 +34702,18 @@ func init() { }, "x-display-name": "Variable name" }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_idx": { "type": "string", "x-dependency": { @@ -35188,6 +35224,18 @@ func init() { "x-display-name": "Nice Value", "x-nullable": false }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { @@ -77982,6 +78030,18 @@ func init() { "x-display-name": "Return Error Code", "x-nullable": true }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { @@ -78755,6 +78815,18 @@ func init() { "x-display-name": "Return Error Code", "x-nullable": true }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { @@ -84476,6 +84548,18 @@ func init() { }, "x-display-name": "Variable name" }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_idx": { "type": "string", "x-dependency": { @@ -84986,6 +85070,18 @@ func init() { "x-display-name": "Nice Value", "x-nullable": false }, + "rst_ttl": { + "type": "integer", + "x-dependency": { + "type": { + "required": true, + "value": [ + "silent-drop" + ] + } + }, + "x-display-name": "RST TTL" + }, "sc_expr": { "type": "string", "x-dependency": { diff --git a/go.mod b/go.mod index d775dddd..c257694c 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.3 + github.com/haproxytech/client-native/v6 v6.0.5 github.com/jessevdk/go-flags v1.5.0 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index 27c24044..92384f49 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,8 @@ github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/haproxytech/client-native/v6 v6.0.3 h1:AFd021MvqABlE/UhHiqFC/eYH9Wx7Tn5WPfVszZlero= -github.com/haproxytech/client-native/v6 v6.0.3/go.mod h1:chE1dxclu+2DCtmc969mDsLXehijaEVXYWoftu+X2nk= +github.com/haproxytech/client-native/v6 v6.0.5 h1:UYNnmAf8xDtCxBzbT3mAksJilW67ypFIGUoHSAg8DY8= +github.com/haproxytech/client-native/v6 v6.0.5/go.mod h1:chE1dxclu+2DCtmc969mDsLXehijaEVXYWoftu+X2nk= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= From 7de3929ed2cbfd26e5d913f375e13d5f41aa500c Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 10 Oct 2024 11:38:19 +0200 Subject: [PATCH 07/65] BUILD/MEDIUM: go.mod: upgrade client-native Includes fix for runtime socket race when reloading dataplaneapi. --- embedded_spec.go | 12 ++--- go.mod | 56 ++++++++++----------- go.sum | 125 +++++++++++++++++++++++++---------------------- 3 files changed, 100 insertions(+), 93 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 55682b31..8d98df19 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -26534,7 +26534,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "type": { "value": "capture" @@ -27574,7 +27574,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "type": { "value": "capture" @@ -34459,7 +34459,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "action": { "required": true, @@ -76496,7 +76496,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "type": { "value": "capture" @@ -77537,7 +77537,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "type": { "value": "capture" @@ -84305,7 +84305,7 @@ func init() { }, "capture_sample": { "type": "string", - "pattern": "^[^\\s]+$", + "pattern": "^(?:[A-Za-z]+\\(\"([A-Za-z\\s]+)\"\\)|[A-Za-z]+)", "x-dependency": { "action": { "required": true, diff --git a/go.mod b/go.mod index c257694c..cbf6eb3f 100644 --- a/go.mod +++ b/go.mod @@ -5,15 +5,15 @@ go 1.23 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 github.com/KimMachineGun/automemlimit v0.6.1 - github.com/aws/aws-sdk-go-v2 v1.30.1 - github.com/aws/aws-sdk-go-v2/config v1.27.24 - github.com/aws/aws-sdk-go-v2/credentials v1.17.24 + github.com/aws/aws-sdk-go-v2 v1.32.2 + github.com/aws/aws-sdk-go-v2/config v1.27.43 + github.com/aws/aws-sdk-go-v2/credentials v1.17.41 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.168.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.7.0 - github.com/getkin/kin-openapi v0.124.0 + github.com/getkin/kin-openapi v0.127.0 github.com/go-openapi/errors v0.22.0 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/runtime v0.28.0 @@ -24,39 +24,39 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.5 - github.com/jessevdk/go-flags v1.5.0 + github.com/haproxytech/client-native/v6 v6.0.6 + github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 github.com/kr/pretty v0.3.1 github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8 github.com/maruel/panicparse/v2 v2.3.1 github.com/nathanaelle/syslog5424/v2 v2.0.5 - github.com/rs/cors v1.11.0 + github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 - go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.27.0 - golang.org/x/sys v0.25.0 + go.uber.org/automaxprocs v1.6.0 + golang.org/x/net v0.30.0 + golang.org/x/sys v0.26.0 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 // indirect - github.com/aws/smithy-go v1.20.3 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect + github.com/aws/smithy-go v1.22.0 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect - github.com/cilium/ebpf v0.15.0 // indirect + github.com/cilium/ebpf v0.16.0 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -73,7 +73,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lestrrat-go/strftime v1.0.6 // indirect + github.com/lestrrat-go/strftime v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -86,13 +86,13 @@ require ( github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.8.0 // indirect + github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.16.1 // indirect - golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect + go.mongodb.org/mongo-driver v1.17.1 // indirect + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect golang.org/x/sync v0.8.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 92384f49..892ec0af 100644 --- a/go.sum +++ b/go.sum @@ -4,40 +4,40 @@ github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26 github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= -github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.24 h1:NM9XicZ5o1CBU/MZaHwFtimRpWx9ohAUAqkG6AqSqPo= -github.com/aws/aws-sdk-go-v2/config v1.27.24/go.mod h1:aXzi6QJTuQRVVusAO8/NxpdTeTyr/wRcybdDtfUwJSs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.24 h1:YclAsrnb1/GTQNt2nzv+756Iw4mF8AOzcDfweWwwm/M= -github.com/aws/aws-sdk-go-v2/credentials v1.17.24/go.mod h1:Hld7tmnAkoBQdTMNYZGzztzKRdA4fCdn9L83LOoigac= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= +github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2/config v1.27.43 h1:p33fDDihFC390dhhuv8nOmX419wjOSDQRb+USt20RrU= +github.com/aws/aws-sdk-go-v2/config v1.27.43/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 h1:nV3iVzSwz69etCRlmifzbxueN9KnnCq0hQow9ezJSzU= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1/go.mod h1:SR3acVqfWMo5J4hI3WHHP0+cgC5yvEVjG9PJXtbOqQg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.168.0 h1:xOPq0agGC1WMZvFpSZCKEjDVAQnLPZJZGvjuPVF2t9M= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.168.0/go.mod h1:CtLD6CPq9z9dyMxV+H6/M5d9+/ea3dO80um029GXqV0= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 h1:ORnrOK0C4WmYV/uYt3koHEWBLYsRDwk2Np+eEoyV4Z0= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= -github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= -github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2 h1:mVCxNVdov/5Vzki4ccFPgii6EnwPKzLB9f86dyi1qVY= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2/go.mod h1:kYXaB4FzyhEJjvrJ84oPnMElLiEAjGxxUunVW2tBSng= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= -github.com/cilium/ebpf v0.15.0 h1:7NxJhNiBT3NG8pZJ3c+yfrVdHY8ScgKD27sScgjLMMk= -github.com/cilium/ebpf v0.15.0/go.mod h1:DHp1WyrLeiBh19Cf/tfiSMhqheEiK8fXFZ4No0P1Hso= +github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok= +github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -54,8 +54,8 @@ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yi github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= 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/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M= -github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= +github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY= +github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= github.com/go-faker/faker/v4 v4.4.2 h1:96WeU9QKEqRUVYdjHquY2/5bAqmVM0IfGKHV5mbfqmQ= github.com/go-faker/faker/v4 v4.4.2/go.mod h1:4K3v4AbKXYNHMQNaREMc9/kRB9j5JJzpFo6KHRvrcIw= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -98,14 +98,14 @@ github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/haproxytech/client-native/v6 v6.0.5 h1:UYNnmAf8xDtCxBzbT3mAksJilW67ypFIGUoHSAg8DY8= -github.com/haproxytech/client-native/v6 v6.0.5/go.mod h1:chE1dxclu+2DCtmc969mDsLXehijaEVXYWoftu+X2nk= +github.com/haproxytech/client-native/v6 v6.0.6 h1:RlhF3sMe0FmZZzuAENLjR0uOjn2EG7ogsKVJhhe9+lM= +github.com/haproxytech/client-native/v6 v6.0.6/go.mod h1:bc/E5mExkeoGTh1jXuMWO4q8cxZKD9LEyoGtQtJh2fY= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= -github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= +github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -114,6 +114,10 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= 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/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= +github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= +github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM= +github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -127,14 +131,18 @@ github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8/go.mo github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= github.com/lestrrat-go/strftime v0.0.0-20180821113735-8b31f9c59b0f/go.mod h1:RMlXygAD3c48Psmr06d2G75L4E4xxzxkIe/+ppX9eAU= -github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= -github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= +github.com/lestrrat-go/strftime v1.1.0 h1:gMESpZy44/4pXLO/m+sL0yBd1W6LjgjrrD4a68Gapyg= +github.com/lestrrat-go/strftime v1.1.0/go.mod h1:uzeIB52CeUJenCo1syghlugshMysrqUT51HlxphXVeI= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maruel/panicparse/v2 v2.3.1 h1:NtJavmbMn0DyzmmSStE8yUsmPZrZmudPH7kplxBinOA= github.com/maruel/panicparse/v2 v2.3.1/go.mod h1:s3UmQB9Fm/n7n/prcD2xBGDkwXD6y2LeZnhbEXvs9Dg= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= +github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= +github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= +github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -166,10 +174,10 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= -github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= @@ -183,38 +191,37 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= -github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= -github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= +github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= +github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.16.1 h1:rIVLL3q0IHM39dvE+z2ulZLp9ENZKThVfuvN/IiN4l8= -go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= -go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM= +go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= -golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 03cecfdfffc87d293c159416aa57d014751af57b Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 10 Oct 2024 10:55:15 +0200 Subject: [PATCH 08/65] DOC/MEDIUM: ci: add aspell to commit check job --- .aspell.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/check.yml | 6 +++--- .gitignore | 1 + .gitlab-ci.yml | 4 ++-- Makefile | 6 ++++++ bin/check-commit.sh | 9 +++++++++ 6 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 .aspell.yml create mode 100644 bin/check-commit.sh diff --git a/.aspell.yml b/.aspell.yml new file mode 100644 index 00000000..f91fd095 --- /dev/null +++ b/.aspell.yml @@ -0,0 +1,28 @@ +mode: commit +min_length: 3 +allowed: + - aspell + - repo + - yaml + - config + - Github + - Gitlab + - env + - failsafe + - golang + - mkdir + - WORKDIR + - apk + - ENTRYPOINT + - ubuntu + - golangci + - sudo + - releaser + - backend + - backends + - frontend + - frontends + - tcp + - crd + - linter + - linters diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2c164208..7068f888 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Commit subject +name: HAProxy check commit message on: pull_request: branches: @@ -7,7 +7,7 @@ jobs: check: runs-on: ubuntu-latest steps: - - name: check-commit - uses: docker://haproxytech/check-commit:v2.1.0 + - name: commit-policy + uses: docker://ghcr.io/haproxytech/commit-check:5.0.4 env: API_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index ddef4a60..cf3c6795 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ cmd/dataplaneapi/* .vscode/ .test/ bin/golangci-lint +bin/check-commit # ignore Goland ide config .idea diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 382bc286..6b841a89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,10 +72,10 @@ gofumpt: script: - make gofumpt - test -z "$(git diff 2> /dev/null)" || exit 'Go code not formatted, issue \`make gofumpt\` and commit the result' -lint-commit-msg: +commit-policy: stage: lint image: - name: $CI_REGISTRY_GO/check-commit:v2.1.0 + name: $CI_REGISTRY_GO/commit-check:5.0.4 entrypoint: [""] tags: - go diff --git a/Makefile b/Makefile index a6ab96ee..a7159978 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/cl BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 GOLANGCI_LINT_VERSION=1.61.0 +CHECK_COMMIT=5.0.4 all: update clean build @@ -65,3 +66,8 @@ generate-native: .PHONY: test test: go test ./... + +.PHONY: check-commit +check-commit: + cd bin;CHECK_COMMIT=${CHECK_COMMIT} sh check-commit.sh + bin/check-commit diff --git a/bin/check-commit.sh b/bin/check-commit.sh new file mode 100644 index 00000000..b7390b51 --- /dev/null +++ b/bin/check-commit.sh @@ -0,0 +1,9 @@ +#!/bin/sh +V=$(./check-commit tag) + +if echo "$V" | grep -q "v$CHECK_COMMIT"; then + echo "$V" +else + echo "go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT" + GOBIN=$(pwd) go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT +fi From b755ac1c0429ed77c8054b0ed410485573d8a786 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 10 Oct 2024 13:03:09 +0200 Subject: [PATCH 09/65] BUILD/MINOR: ci: add govulncheck to the ci --- .aspell.yml | 1 + .gitlab-ci.yml | 23 +++ cmd/govulncheck-report/main.go | 362 +++++++++++++++++++++++++++++++++ 3 files changed, 386 insertions(+) create mode 100644 cmd/govulncheck-report/main.go diff --git a/.aspell.yml b/.aspell.yml index f91fd095..4abf4504 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -26,3 +26,4 @@ allowed: - crd - linter - linters + - govulncheck diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b841a89..7cb83cbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - lint + - checks - build - test - e2e @@ -144,6 +145,28 @@ test: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'push' +govulncheck: + stage: checks + needs: [] + image: + name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-go$GO_VERSION + entrypoint: [ "" ] + rules: + - if: $CI_PIPELINE_SOURCE == 'schedule' && $SCHEDULE_TYPE == 'daily' + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + changes: + - go.mod + - if: "$CI_PROJECT_NAMESPACE == 'haproxy-controller' && $CI_PIPELINE_SOURCE == 'push'" + changes: + - go.mod + tags: + - go + script: + - go install golang.org/x/vuln/cmd/govulncheck@latest + - govulncheck -version + - go mod tidy + - go run cmd/govulncheck-report/main.go + HAProxy_2_2: extends: .e2e parallel: diff --git a/cmd/govulncheck-report/main.go b/cmd/govulncheck-report/main.go new file mode 100644 index 00000000..39a46b09 --- /dev/null +++ b/cmd/govulncheck-report/main.go @@ -0,0 +1,362 @@ +package main + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "log/slog" + "net/http" + "net/url" + "os" + "os/exec" + "strconv" + "strings" +) + +type Note struct { + Body string `json:"body"` + ID int `json:"id"` +} + +type Issue struct { + Title string `json:"title"` + State string `json:"state"` + ID int `json:"id"` + IID int `json:"iid"` +} + +type Thread struct { + Body string `json:"body"` + ID int `json:"id"` + IID int `json:"iid"` +} + +const baseURL = "https://gitlab.int.haproxy.com/api/v4" + +func main() { + fmt.Print(hello) + logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ + AddSource: true, + ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + if a.Key == "source" { + x := a.Value + src := x.Any().(*slog.Source) + path := strings.Split(src.File, "/") + src.File = path[len(path)-1] + return slog.Attr{ + Key: "source", + Value: slog.AnyValue(src), + } + } + return a + }, + })) + slog.SetDefault(logger) + + slog.Info("Starting GoVulnCheck") + mergeRequestMode := false + currentBranch := os.Getenv("CI_COMMIT_BRANCH") + if currentBranch == "" { + currentBranch = os.Getenv("CI_MERGE_REQUEST_SOURCE_BRANCH_NAME") + mergeRequestMode = true + } + if currentBranch == "" { + cmd := exec.Command("git", "branch", "--show-current") + out, err := cmd.Output() + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + currentBranch = string(out) + } + slog.Info("Current branch: " + currentBranch) + + cmd := exec.Command("govulncheck", "./...") + out, _ := cmd.Output() + + vulnMessage := string(out) + fmt.Println(vulnMessage) + noVuln := false + if !strings.Contains(vulnMessage, "Vulnerability #") { + noVuln = true + } + + if currentBranch == "" { + if strings.Contains(vulnMessage, "Vulnerability #") { + slog.Error(vulnMessage) + os.Exit(1) + } + slog.Info("Current branch is empty, exiting...") + os.Exit(0) + } + + if mergeRequestMode { + if strings.Contains(vulnMessage, "Vulnerability #") { + os.Exit(1) + } + slog.Info("no vulnerabilities found") + os.Exit(0) + } + + token := os.Getenv("GITLAB_GOPHERS_TOKEN") + projectID := "534" + title := "Data Plane API: GoVulnCheck: Branch: " + strings.Trim(currentBranch, "\n") + + userID, err := fetchUserID(token) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + issues, err := fetchOpenIssues(projectID, userID, token) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + found := false + var issueFound Issue + for _, issue := range issues { + if issue.Title == title && issue.State == "opened" { + found = true + issueFound = issue + break + } + } + vulnMessage = "```\n" + vulnMessage + "\n```" + if found { + if noVuln { + closeTheIssue(baseURL, token, projectID, issueFound.IID, "No vulnerability found.") + } else { + addCommentToIssue(baseURL, token, projectID, issueFound.IID, vulnMessage) + } + } else if !noVuln { + createIssue(baseURL, token, projectID, title, vulnMessage) + } + slog.Info("GoVulnCheck done.") +} + +func createIssue(baseURL, token, projectID string, title, commentBody string) { + slog.Info("Active issue with title '" + title + "' not found in project " + projectID) + // Create the issue here + issueData := map[string]interface{}{ + "title": title, + "description": commentBody, + "labels": "bot,critical", + // Add other fields as needed + } + issueDataBytes, err := json.Marshal(issueData) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/projects/%s/issues", baseURL, url.PathEscape(projectID)), bytes.NewBuffer(issueDataBytes)) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + req.Header.Add("Private-Token", token) + req.Header.Add("Content-Type", "application/json") + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + var issue Issue + err = json.Unmarshal(body, &issue) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + slog.Info("Issue created with ID " + strconv.Itoa(issue.ID)) +} + +func closeTheIssue(baseURL, token, projectID string, issueIID int, commentBody string) { + addCommentToIssue(baseURL, token, projectID, issueIID, commentBody) + + client := &http.Client{} + issueData := map[string]interface{}{ + "state_event": "close", + } + issueDataBytes, err := json.Marshal(issueData) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + req, err := http.NewRequest(http.MethodPut, fmt.Sprintf("%s/projects/%s/issues/%d", baseURL, url.PathEscape(projectID), issueIID), bytes.NewBuffer(issueDataBytes)) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + req.Header.Add("Private-Token", token) + req.Header.Add("Content-Type", "application/json") + + resp, err := client.Do(req) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + var issue Issue + err = json.Unmarshal(body, &issue) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + slog.Info("Issue " + strconv.Itoa(issue.IID) + " closed") +} + +func addCommentToIssue(baseURL, token, projectID string, issueIID int, commentBody string) { + client := &http.Client{} + noteData := map[string]interface{}{ + "body": commentBody, + } + noteDataBytes, err := json.Marshal(noteData) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/projects/%s/issues/%d/notes", baseURL, url.PathEscape(projectID), issueIID), bytes.NewBuffer(noteDataBytes)) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + req.Header.Add("Private-Token", token) + req.Header.Add("Content-Type", "application/json") + + resp, err := client.Do(req) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + var note Note + err = json.Unmarshal(body, ¬e) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + slog.Info("Comment added with ID " + strconv.Itoa(note.ID)) +} + +func fetchOpenIssues(projectID string, userID int, accessToken string) ([]Issue, error) { + perPage := 20 // Number of issues to fetch per page + + var allIssues []Issue + page := 1 + + for { + url := fmt.Sprintf("%s/projects/%s/issues?state=opened&author_id=%s&page=%d&per_page=%d", baseURL, projectID, strconv.Itoa(userID), page, perPage) + + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return nil, err + } + + req.Header.Set("Authorization", "Bearer "+accessToken) + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + var issues []Issue + err = json.Unmarshal(body, &issues) + if err != nil { + return nil, err + } + + allIssues = append(allIssues, issues...) + + // Check if there are more pages + linkHeader := resp.Header.Get("Link") + if !strings.Contains(linkHeader, `rel="next"`) { + break + } + + page++ + } + + return allIssues, nil +} + +func fetchUserID(accessToken string) (int, error) { + url := baseURL + "/user" + + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return 0, err + } + + req.Header.Set("Authorization", "Bearer "+accessToken) + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return 0, err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return 0, err + } + + var user struct { + ID int `json:"id"` + } + + err = json.Unmarshal(body, &user) + if err != nil { + return 0, err + } + + return user.ID, nil +} + +const hello = ` + _ _ _ + __ _ _____ ___ _| |_ __ ___| |__ ___ ___| | __ + / _` + "`" + ` |/ _ \ \ / / | | | | '_ \ / __| '_ \ / _ \/ __| |/ / +| (_| | (_) \ V /| |_| | | | | | (__| | | | __/ (__| < + \__, |\___/ \_/ \__,_|_|_| |_|\___|_| |_|\___|\___|_|\_\ + |___/ +` From f1d4189a38b08d7db93c3f111c0c4ac9ecf3984f Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 10 Oct 2024 14:01:38 +0200 Subject: [PATCH 10/65] BUILD/MINOR: aspell: add dataplaneapi to ignore list --- .aspell.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.aspell.yml b/.aspell.yml index 4abf4504..568e78be 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -27,3 +27,4 @@ allowed: - linter - linters - govulncheck + - dataplaneapi From fecffd4b562ad2817269f1d717f8aea4009c17f8 Mon Sep 17 00:00:00 2001 From: Robert Maticevic Date: Mon, 2 Dec 2024 15:10:15 +0100 Subject: [PATCH 11/65] BUG/MINOR: consul: fix health_check_policy validation on update --- handlers/consul.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/consul.go b/handlers/consul.go index 69bf15f9..57710c91 100644 --- a/handlers/consul.go +++ b/handlers/consul.go @@ -139,7 +139,7 @@ func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsul e := misc.HandleError(err) return service_discovery.NewReplaceConsulDefault(int(*e.Code)).WithPayload(e) } - if *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { + if params.Data.HealthCheckPolicy != nil && *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { e := &models.Error{ Message: misc.StringP("health_check_policy_min is required for 'min' health_check_policy"), Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), From bdac97952c886b1399c74efa364156a1b3123dd7 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 13 Dec 2024 11:52:39 +0100 Subject: [PATCH 12/65] BUG/MAJOR: storage: don't clear the file on general file PUT --- handlers/general_storage.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/handlers/general_storage.go b/handlers/general_storage.go index 61047e9f..16f956b6 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -18,6 +18,7 @@ package handlers import ( "bufio" "fmt" + "io" "os" "path/filepath" "strings" @@ -188,16 +189,10 @@ func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.Repl return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) } - file, ok := params.FileUpload.(*runtime.File) - if !ok { + data, err := io.ReadAll(params.FileUpload) + if err != nil { return storage.NewReplaceStorageGeneralFileBadRequest() } - data := []byte{} - if _, err := file.Read(data); err != nil { - e := misc.HandleError(err) - return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) - } - _, err = gs.Replace(params.Name, string(data)) if err != nil { e := misc.HandleError(err) From 46d4634f35ab72156f760053f62fede8917eb300 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 19 Dec 2024 15:14:18 +0100 Subject: [PATCH 13/65] BUILD/MINOR: go.mod: update Go packages --- go.mod | 49 ++++++++++++------------- go.sum | 110 +++++++++++++++++++++++++++------------------------------ 2 files changed, 77 insertions(+), 82 deletions(-) diff --git a/go.mod b/go.mod index cbf6eb3f..e7dab43f 100644 --- a/go.mod +++ b/go.mod @@ -5,15 +5,15 @@ go 1.23 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 github.com/KimMachineGun/automemlimit v0.6.1 - github.com/aws/aws-sdk-go-v2 v1.32.2 - github.com/aws/aws-sdk-go-v2/config v1.27.43 - github.com/aws/aws-sdk-go-v2/credentials v1.17.41 + github.com/aws/aws-sdk-go-v2 v1.32.6 + github.com/aws/aws-sdk-go-v2/config v1.28.6 + github.com/aws/aws-sdk-go-v2/credentials v1.17.47 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 - github.com/fsnotify/fsnotify v1.7.0 - github.com/getkin/kin-openapi v0.127.0 + github.com/fsnotify/fsnotify v1.8.0 + github.com/getkin/kin-openapi v0.128.0 github.com/go-openapi/errors v0.22.0 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/runtime v0.28.0 @@ -30,7 +30,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/kr/pretty v0.3.1 github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8 - github.com/maruel/panicparse/v2 v2.3.1 + github.com/maruel/panicparse/v2 v2.4.0 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible @@ -38,26 +38,27 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.30.0 - golang.org/x/sys v0.26.0 + golang.org/x/net v0.33.0 + golang.org/x/sys v0.28.0 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect - github.com/aws/smithy-go v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect + github.com/aws/smithy-go v1.22.1 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect - github.com/cilium/ebpf v0.16.0 // indirect - github.com/containerd/cgroups/v3 v3.0.3 // indirect + github.com/cilium/ebpf v0.17.0 // indirect + github.com/containerd/cgroups/v3 v3.0.4 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect @@ -74,8 +75,9 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kr/text v0.2.0 // indirect github.com/lestrrat-go/strftime v1.1.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect @@ -91,8 +93,7 @@ require ( github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.1 // indirect - golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect - golang.org/x/sync v0.8.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect + golang.org/x/sync v0.10.0 // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 892ec0af..516d28e5 100644 --- a/go.sum +++ b/go.sum @@ -4,42 +4,44 @@ github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26 github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcTduI= -github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.27.43 h1:p33fDDihFC390dhhuv8nOmX419wjOSDQRb+USt20RrU= -github.com/aws/aws-sdk-go-v2/config v1.27.43/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 h1:UAsR3xA31QGf79WzpG/ixT9FZvQlh5HY1NRqSHBNOCk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21/go.mod h1:JNr43NFf5L9YaG3eKTm7HQzls9J+A9YYcGI5Quh1r2Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 h1:6jZVETqmYCadGFvrYEQfC5fAQmlo80CeL5psbno6r0s= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21/go.mod h1:1SR0GbLlnN3QUmYaflZNiH1ql+1qrSiB2vwcJ+4UM60= +github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= +github.com/aws/aws-sdk-go-v2 v1.32.6/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= +github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= +github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 h1:nV3iVzSwz69etCRlmifzbxueN9KnnCq0hQow9ezJSzU= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1/go.mod h1:SR3acVqfWMo5J4hI3WHHP0+cgC5yvEVjG9PJXtbOqQg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2 h1:mVCxNVdov/5Vzki4ccFPgii6EnwPKzLB9f86dyi1qVY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.2/go.mod h1:kYXaB4FzyhEJjvrJ84oPnMElLiEAjGxxUunVW2tBSng= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0 h1:ivPJXmGlzAjgy0jLO9naExUWE8IM8lLRcRKLPBEx6Q0= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0/go.mod h1:00zqVNJFK6UASrTnuvjJHJuaqUdkVz5tW8Ip+VhzuNg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 h1:50+XsN70RS7dwJ2CkVNXzj7U2L1HKP8nqTd3XWEXBN4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6/go.mod h1:WqgLmwY7so32kG01zD8CPTJWVWM+TzJoOVHwTg4aPug= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6/go.mod h1:URronUEGfXZN1VpdktPSD1EkAL9mfrV+2F4sjH38qOY= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 h1:s4074ZO1Hk8qv65GqNXqDjmkf4HSQqJukaLuuW0TpDA= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2/go.mod h1:mVggCnIWoM09jP71Wh+ea7+5gAp53q+49wDFs1SW5z8= +github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= +github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= -github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok= -github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE= -github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= -github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= +github.com/cilium/ebpf v0.17.0 h1:wAgiAWE86w8DxbR/UJ9KsaaoUfjrO0yhg5yE7f898As= +github.com/cilium/ebpf v0.17.0/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8= +github.com/containerd/cgroups/v3 v3.0.4 h1:2fs7l3P0Qxb1nKWuJNFiwhp2CqiKzho71DQkDrHJIo4= +github.com/containerd/cgroups/v3 v3.0.4/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -52,10 +54,10 @@ github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 h1:a github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0/go.mod h1:8AuBTZBRSFqEYBPYULd+NN474/zZBLP+6WeT5S9xlAc= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -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/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY= -github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/getkin/kin-openapi v0.128.0 h1:jqq3D9vC9pPq1dGcOCv7yOp1DaEe7c/T1vzcLbITSp4= +github.com/getkin/kin-openapi v0.128.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= github.com/go-faker/faker/v4 v4.4.2 h1:96WeU9QKEqRUVYdjHquY2/5bAqmVM0IfGKHV5mbfqmQ= github.com/go-faker/faker/v4 v4.4.2/go.mod h1:4K3v4AbKXYNHMQNaREMc9/kRB9j5JJzpFo6KHRvrcIw= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -90,7 +92,6 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -133,19 +134,18 @@ github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopu github.com/lestrrat-go/strftime v0.0.0-20180821113735-8b31f9c59b0f/go.mod h1:RMlXygAD3c48Psmr06d2G75L4E4xxzxkIe/+ppX9eAU= github.com/lestrrat-go/strftime v1.1.0 h1:gMESpZy44/4pXLO/m+sL0yBd1W6LjgjrrD4a68Gapyg= github.com/lestrrat-go/strftime v1.1.0/go.mod h1:uzeIB52CeUJenCo1syghlugshMysrqUT51HlxphXVeI= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/maruel/panicparse/v2 v2.3.1 h1:NtJavmbMn0DyzmmSStE8yUsmPZrZmudPH7kplxBinOA= -github.com/maruel/panicparse/v2 v2.3.1/go.mod h1:s3UmQB9Fm/n7n/prcD2xBGDkwXD6y2LeZnhbEXvs9Dg= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/maruel/panicparse/v2 v2.4.0 h1:yQKMIbQ0DKfinzVkTkcUzQyQ60UCiNnYfR7PWwTs2VI= +github.com/maruel/panicparse/v2 v2.4.0/go.mod h1:nOY2OKe8csO3F3SA5+hsxot05JLgukrF54B9x88fVp4= github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= -github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= 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/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -203,25 +203,19 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 1f6c37699869a859e2cbf12718c88764a3f8311c Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 13 Dec 2024 15:31:34 +0100 Subject: [PATCH 14/65] BUG/MINOR: specification: fix open api v3 specification generation --- configure_data_plane.go | 7 ++++++- configure_data_plane_test.go | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/configure_data_plane.go b/configure_data_plane.go index 8699c4b8..981be57b 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -20,6 +20,7 @@ package dataplaneapi import ( "context" "crypto/tls" + "encoding/json" "io" "net/http" "os" @@ -919,7 +920,11 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m // setup OpenAPI v3 specification handler api.Version3GetOpenapiv3SpecificationHandler = version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { v2 := openapi2.T{} - err = v2.UnmarshalJSON(SwaggerJSON) + v2JSONString := string(SwaggerJSON) + v2JSONString = strings.ReplaceAll(v2JSONString, "#/definitions", "#/components/schemas") + curatedV2 := json.RawMessage([]byte(v2JSONString)) + + err = v2.UnmarshalJSON(curatedV2) if err != nil { e := misc.HandleError(err) return version3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) diff --git a/configure_data_plane_test.go b/configure_data_plane_test.go index eb99d7db..862f7e6a 100644 --- a/configure_data_plane_test.go +++ b/configure_data_plane_test.go @@ -18,6 +18,8 @@ package dataplaneapi import ( + "encoding/json" + "strings" "testing" "github.com/getkin/kin-openapi/openapi2" @@ -25,12 +27,17 @@ import ( ) func TestConvOpenAPIV2ToV3(t *testing.T) { + v2JSONString := string(SwaggerJSON) + v2JSONString = strings.ReplaceAll(v2JSONString, "#/definitions", "#/components/schemas") + curatedV2 := json.RawMessage([]byte(v2JSONString)) + var v2 openapi2.T - err := v2.UnmarshalJSON(SwaggerJSON) + err := v2.UnmarshalJSON(curatedV2) if err != nil { t.Error(err) return } + _, err = openapi2conv.ToV3(&v2) if err != nil { t.Error(err) From 82b8bb9c1486bc40c33cb491ffa2beb53332af55 Mon Sep 17 00:00:00 2001 From: Gopher Bot Date: Sat, 4 Jan 2025 08:21:13 +0000 Subject: [PATCH 15/65] BUILD/MINOR: go.mod: update github.com/aws/aws-sdk-go-v2 github.com/aws/aws-sdk-go-v2 v1.32.7 github.com/aws/aws-sdk-go-v2/config v1.28.7 github.com/aws/aws-sdk-go-v2/credentials v1.17.48 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 --- go.mod | 24 ++++++++++++------------ go.sum | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/go.mod b/go.mod index e7dab43f..6afdcd8d 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.23 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 github.com/KimMachineGun/automemlimit v0.6.1 - github.com/aws/aws-sdk-go-v2 v1.32.6 - github.com/aws/aws-sdk-go-v2/config v1.28.6 - github.com/aws/aws-sdk-go-v2/credentials v1.17.47 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0 + github.com/aws/aws-sdk-go-v2 v1.32.7 + github.com/aws/aws-sdk-go-v2/config v1.28.7 + github.com/aws/aws-sdk-go-v2/credentials v1.17.48 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.8.0 @@ -45,15 +45,15 @@ require ( require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect github.com/aws/smithy-go v1.22.1 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/cilium/ebpf v0.17.0 // indirect diff --git a/go.sum b/go.sum index 516d28e5..8d674720 100644 --- a/go.sum +++ b/go.sum @@ -4,34 +4,34 @@ github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26 github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= -github.com/aws/aws-sdk-go-v2 v1.32.6/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= -github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= -github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= +github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw= +github.com/aws/aws-sdk-go-v2 v1.32.7/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= +github.com/aws/aws-sdk-go-v2/config v1.28.7 h1:GduUnoTXlhkgnxTD93g1nv4tVPILbdNQOzav+Wpg7AE= +github.com/aws/aws-sdk-go-v2/config v1.28.7/go.mod h1:vZGX6GVkIE8uECSUHB6MWAUsd4ZcG2Yq/dMa4refR3M= +github.com/aws/aws-sdk-go-v2/credentials v1.17.48 h1:IYdLD1qTJ0zanRavulofmqut4afs45mOWEI+MzZtTfQ= +github.com/aws/aws-sdk-go-v2/credentials v1.17.48/go.mod h1:tOscxHN3CGmuX9idQ3+qbkzrjVIx32lqDSU1/0d/qXs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 h1:kqOrpojG71DxJm/KDPO+Z/y1phm1JlC8/iT+5XRmAn8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22/go.mod h1:NtSFajXVVL8TA2QNngagVZmUtXciyrHOt7xgz4faS/M= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 h1:I/5wmGMffY4happ8NOCuIUEWGUvvFp5NSeQcXl9RHcI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26/go.mod h1:FR8f4turZtNy6baO0KJ5FJUmXH/cSkI9fOngs0yl6mA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 h1:zXFLuEuMMUOvEARXFUVJdfqZ4bvvSgdGRq/ATcrQxzM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26/go.mod h1:3o2Wpy0bogG1kyOPrgkXA8pgIfEEv0+m19O9D5+W8y8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1 h1:nV3iVzSwz69etCRlmifzbxueN9KnnCq0hQow9ezJSzU= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.1/go.mod h1:SR3acVqfWMo5J4hI3WHHP0+cgC5yvEVjG9PJXtbOqQg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0 h1:ivPJXmGlzAjgy0jLO9naExUWE8IM8lLRcRKLPBEx6Q0= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.0/go.mod h1:00zqVNJFK6UASrTnuvjJHJuaqUdkVz5tW8Ip+VhzuNg= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 h1:MSSstL6YXAw2K68L1kph02WTQHKeb/lwmbsMhswpjuY= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2/go.mod h1:t5bdAowh8MWq51TuDmltU+wtxMl/VaegNwSBaznkUYc= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 h1:YbNopxjd9baM83YEEmkaYHi+NuJt0AszeaSLqo0CVr0= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1/go.mod h1:mwr3iRm8u1+kkEx4ftDM2Q6Yr0XQFBKrP036ng+k5Lk= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 h1:50+XsN70RS7dwJ2CkVNXzj7U2L1HKP8nqTd3XWEXBN4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6/go.mod h1:WqgLmwY7so32kG01zD8CPTJWVWM+TzJoOVHwTg4aPug= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6/go.mod h1:URronUEGfXZN1VpdktPSD1EkAL9mfrV+2F4sjH38qOY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 h1:s4074ZO1Hk8qv65GqNXqDjmkf4HSQqJukaLuuW0TpDA= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.2/go.mod h1:mVggCnIWoM09jP71Wh+ea7+5gAp53q+49wDFs1SW5z8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 h1:8eUsivBQzZHqe/3FE+cqwfH+0p5Jo8PFM/QYQSmeZ+M= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7/go.mod h1:kLPQvGUmxn/fqiCrDeohwG33bq2pQpGeY62yRO6Nrh0= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 h1:CvuUmnXI7ebaUAhbJcDy9YQx8wHR69eZ9I7q5hszt/g= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.8/go.mod h1:XDeGv1opzwm8ubxddF0cgqkZWsyOtw4lr6dxwmb6YQg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 h1:F2rBfNAL5UyswqoeWv9zs74N/NanhK16ydHW1pahX6E= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7/go.mod h1:JfyQ0g2JG8+Krq0EuZNnRwX0mU0HrwY/tG6JNfcqh4k= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 h1:Xgv/hyNgvLda/M9l9qxXc4UFSgppnRczLxlMs5Ae/QY= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.3/go.mod h1:5Gn+d+VaaRgsjewpMvGazt0WfcFO+Md4wLOuBfGR9Bc= github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= From 160779830b380401779f76cc61d2b2c4ae766847 Mon Sep 17 00:00:00 2001 From: Gopher Bot Date: Sat, 4 Jan 2025 08:24:36 +0000 Subject: [PATCH 16/65] BUILD/MINOR: go.mod: update Go packages github.com/stretchr/testify v1.10.0 github.com/cilium/ebpf v0.17.1 github.com/containerd/cgroups/v3 v3.0.5 google.golang.org/protobuf v1.36.1 --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 6afdcd8d..9ec00df3 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/rubyist/circuitbreaker v2.2.1+incompatible github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 golang.org/x/net v0.33.0 golang.org/x/sys v0.28.0 @@ -56,8 +56,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect github.com/aws/smithy-go v1.22.1 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect - github.com/cilium/ebpf v0.17.0 // indirect - github.com/containerd/cgroups/v3 v3.0.4 // indirect + github.com/cilium/ebpf v0.17.1 // indirect + github.com/containerd/cgroups/v3 v3.0.5 // indirect github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -94,6 +94,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.1 // indirect golang.org/x/sync v0.10.0 // indirect - google.golang.org/protobuf v1.36.0 // indirect + google.golang.org/protobuf v1.36.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8d674720..63fd8def 100644 --- a/go.sum +++ b/go.sum @@ -36,10 +36,10 @@ github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= -github.com/cilium/ebpf v0.17.0 h1:wAgiAWE86w8DxbR/UJ9KsaaoUfjrO0yhg5yE7f898As= -github.com/cilium/ebpf v0.17.0/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8= -github.com/containerd/cgroups/v3 v3.0.4 h1:2fs7l3P0Qxb1nKWuJNFiwhp2CqiKzho71DQkDrHJIo4= -github.com/containerd/cgroups/v3 v3.0.4/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= +github.com/cilium/ebpf v0.17.1 h1:G8mzU81R2JA1nE5/8SRubzqvBMmAmri2VL8BIZPWvV0= +github.com/cilium/ebpf v0.17.1/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8= +github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo= +github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -187,8 +187,8 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= @@ -214,8 +214,8 @@ golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= -google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From cb7d9777837ff4eeb4a75c3da40560a3e80e1216 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 31 Jan 2025 13:47:05 +0100 Subject: [PATCH 17/65] BUG/MEDIUM: raw: return errors as text not objects --- embedded_spec.go | 57 +++++++++++++++---- go.mod | 6 +- go.sum | 18 +++--- handlers/raw.go | 56 +++++++++++++++--- .../get_h_a_proxy_configuration_responses.go | 16 ++---- .../post_h_a_proxy_configuration_responses.go | 30 ++++------ 6 files changed, 123 insertions(+), 60 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 8d98df19..c4f2dba6 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -16692,7 +16692,16 @@ func init() { } }, "default": { - "$ref": "#/responses/DefaultError" + "description": "General Error", + "schema": { + "type": "string" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } } } }, @@ -16798,10 +16807,28 @@ func init() { } }, "400": { - "$ref": "#/responses/BadRequest" + "description": "Bad request", + "schema": { + "type": "string" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } }, "default": { - "$ref": "#/responses/DefaultError" + "description": "General Error", + "schema": { + "type": "string" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } } } } @@ -21970,9 +21997,7 @@ func init() { "pattern": "^[^\\s]+$", "x-dependency": { "cookie": { - "dynamic": { - "value": true - } + "dynamic.value": true } } }, @@ -30658,6 +30683,11 @@ func init() { "additionalProperties": { "$ref": "#/definitions/server" } + }, + "tables": { + "additionalProperties": { + "$ref": "#/definitions/table" + } } } } @@ -63178,7 +63208,7 @@ func init() { "default": { "description": "General Error", "schema": { - "$ref": "#/definitions/error" + "type": "string" }, "headers": { "Configuration-Version": { @@ -63301,7 +63331,7 @@ func init() { "400": { "description": "Bad request", "schema": { - "$ref": "#/definitions/error" + "type": "string" }, "headers": { "Configuration-Version": { @@ -63313,7 +63343,7 @@ func init() { "default": { "description": "General Error", "schema": { - "$ref": "#/definitions/error" + "type": "string" }, "headers": { "Configuration-Version": { @@ -72110,9 +72140,7 @@ func init() { "pattern": "^[^\\s]+$", "x-dependency": { "cookie": { - "dynamic": { - "value": true - } + "dynamic.value": true } } }, @@ -80598,6 +80626,11 @@ func init() { "additionalProperties": { "$ref": "#/definitions/server" } + }, + "tables": { + "additionalProperties": { + "$ref": "#/definitions/table" + } } } } diff --git a/go.mod b/go.mod index 9ec00df3..02392562 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.6 + github.com/haproxytech/client-native/v6 v6.0.8 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -39,7 +39,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 golang.org/x/net v0.33.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -92,7 +92,7 @@ require ( github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.1 // indirect + go.mongodb.org/mongo-driver v1.17.2 // indirect golang.org/x/sync v0.10.0 // indirect google.golang.org/protobuf v1.36.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 63fd8def..cb208b57 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,8 @@ github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/ github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/getkin/kin-openapi v0.128.0 h1:jqq3D9vC9pPq1dGcOCv7yOp1DaEe7c/T1vzcLbITSp4= github.com/getkin/kin-openapi v0.128.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= -github.com/go-faker/faker/v4 v4.4.2 h1:96WeU9QKEqRUVYdjHquY2/5bAqmVM0IfGKHV5mbfqmQ= -github.com/go-faker/faker/v4 v4.4.2/go.mod h1:4K3v4AbKXYNHMQNaREMc9/kRB9j5JJzpFo6KHRvrcIw= +github.com/go-faker/faker/v4 v4.5.0 h1:ARzAY2XoOL9tOUK+KSecUQzyXQsUaZHefjyF8x6YFHc= +github.com/go-faker/faker/v4 v4.5.0/go.mod h1:p3oq1GRjG2PZ7yqeFFfQI20Xm61DoBDlCA8RiSyZ48M= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -99,8 +99,10 @@ github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/haproxytech/client-native/v6 v6.0.6 h1:RlhF3sMe0FmZZzuAENLjR0uOjn2EG7ogsKVJhhe9+lM= -github.com/haproxytech/client-native/v6 v6.0.6/go.mod h1:bc/E5mExkeoGTh1jXuMWO4q8cxZKD9LEyoGtQtJh2fY= +github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= +github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= +github.com/haproxytech/client-native/v6 v6.0.8 h1:SsfdHAI6BqSHAKedyaNoSc3UayttZ/7pYMbp2oN0deo= +github.com/haproxytech/client-native/v6 v6.0.8/go.mod h1:v1Gc4Lh3KGGjN3KnuiRFmm4D6eUXhbRvcjT6oEDUpI8= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= @@ -197,8 +199,8 @@ github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0 github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM= -go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= +go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM= +go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= @@ -210,8 +212,8 @@ golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= diff --git a/handlers/raw.go b/handlers/raw.go index a47cfb37..90bf2cf0 100644 --- a/handlers/raw.go +++ b/handlers/raw.go @@ -16,7 +16,9 @@ package handlers import ( + "encoding/json" "fmt" + "net/http" "strconv" "strings" @@ -61,7 +63,11 @@ func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyC _, clusterVersion, md5Hash, data, err := cfg.GetRawConfigurationWithClusterData(t, v) if err != nil { e := misc.HandleError(err) - return configuration.NewGetHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewGetHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } cVersion := "" if clusterVersion != 0 { @@ -99,25 +105,41 @@ func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProx code := misc.ErrHTTPBadRequest msg := "invalid configuration: no newline character found" e := &models.Error{Code: &code, Message: &msg} - return configuration.NewPostHAProxyConfigurationBadRequest().WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationBadRequest().WithPayload(string(errorStr)) } cfg, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } err = cfg.PostRawConfiguration(¶ms.Data, v, skipVersion, onlyValidate) if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } _, clusterVersion, md5Hash, data, err := cfg.GetRawConfigurationWithClusterData("", 0) if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } cVersion := "" @@ -132,7 +154,11 @@ func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProx if params.XRuntimeActions != nil { if err = executeRuntimeActions(*params.XRuntimeActions, h.Client); err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } } return configuration.NewPostHAProxyConfigurationCreated().WithPayload(data).WithClusterVersion(cVersion).WithConfigurationChecksum(md5Hash) @@ -143,7 +169,11 @@ func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProx callbackNeeded, reconfigureFunc, err = cn.ReconfigureRuntime(h.Client) if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } if callbackNeeded { err = h.ReloadAgent.ForceReloadWithCallback(reconfigureFunc) @@ -152,14 +182,22 @@ func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProx } if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } return configuration.NewPostHAProxyConfigurationCreated().WithPayload(data).WithClusterVersion(cVersion).WithConfigurationChecksum(md5Hash) } callbackNeeded, reconfigureFunc, err := cn.ReconfigureRuntime(h.Client) if err != nil { e := misc.HandleError(err) - return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(e) + errorStr, marshallError := json.Marshal(e) + if marshallError != nil { + configuration.NewPostHAProxyConfigurationDefault(http.StatusInternalServerError).WithPayload(marshallError.Error()) + } + return configuration.NewPostHAProxyConfigurationDefault(int(*e.Code)).WithPayload(string(errorStr)) } var rID string diff --git a/operations/configuration/get_h_a_proxy_configuration_responses.go b/operations/configuration/get_h_a_proxy_configuration_responses.go index 1c5d0e54..afc4fad5 100644 --- a/operations/configuration/get_h_a_proxy_configuration_responses.go +++ b/operations/configuration/get_h_a_proxy_configuration_responses.go @@ -24,8 +24,6 @@ import ( "net/http" "github.com/go-openapi/runtime" - - "github.com/haproxytech/client-native/v6/models" ) // GetHAProxyConfigurationOKCode is the HTTP code returned for type GetHAProxyConfigurationOK @@ -152,7 +150,7 @@ type GetHAProxyConfigurationDefault struct { /* In: Body */ - Payload *models.Error `json:"body,omitempty"` + Payload string `json:"body,omitempty"` } // NewGetHAProxyConfigurationDefault creates GetHAProxyConfigurationDefault with default headers values @@ -189,13 +187,13 @@ func (o *GetHAProxyConfigurationDefault) SetConfigurationVersion(configurationVe } // WithPayload adds the payload to the get h a proxy configuration default response -func (o *GetHAProxyConfigurationDefault) WithPayload(payload *models.Error) *GetHAProxyConfigurationDefault { +func (o *GetHAProxyConfigurationDefault) WithPayload(payload string) *GetHAProxyConfigurationDefault { o.Payload = payload return o } // SetPayload sets the payload to the get h a proxy configuration default response -func (o *GetHAProxyConfigurationDefault) SetPayload(payload *models.Error) { +func (o *GetHAProxyConfigurationDefault) SetPayload(payload string) { o.Payload = payload } @@ -210,10 +208,8 @@ func (o *GetHAProxyConfigurationDefault) WriteResponse(rw http.ResponseWriter, p } rw.WriteHeader(o._statusCode) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this } } diff --git a/operations/configuration/post_h_a_proxy_configuration_responses.go b/operations/configuration/post_h_a_proxy_configuration_responses.go index a2593d06..8396d193 100644 --- a/operations/configuration/post_h_a_proxy_configuration_responses.go +++ b/operations/configuration/post_h_a_proxy_configuration_responses.go @@ -24,8 +24,6 @@ import ( "net/http" "github.com/go-openapi/runtime" - - "github.com/haproxytech/client-native/v6/models" ) // PostHAProxyConfigurationCreatedCode is the HTTP code returned for type PostHAProxyConfigurationCreated @@ -285,7 +283,7 @@ type PostHAProxyConfigurationBadRequest struct { /* In: Body */ - Payload *models.Error `json:"body,omitempty"` + Payload string `json:"body,omitempty"` } // NewPostHAProxyConfigurationBadRequest creates PostHAProxyConfigurationBadRequest with default headers values @@ -306,13 +304,13 @@ func (o *PostHAProxyConfigurationBadRequest) SetConfigurationVersion(configurati } // WithPayload adds the payload to the post h a proxy configuration bad request response -func (o *PostHAProxyConfigurationBadRequest) WithPayload(payload *models.Error) *PostHAProxyConfigurationBadRequest { +func (o *PostHAProxyConfigurationBadRequest) WithPayload(payload string) *PostHAProxyConfigurationBadRequest { o.Payload = payload return o } // SetPayload sets the payload to the post h a proxy configuration bad request response -func (o *PostHAProxyConfigurationBadRequest) SetPayload(payload *models.Error) { +func (o *PostHAProxyConfigurationBadRequest) SetPayload(payload string) { o.Payload = payload } @@ -327,11 +325,9 @@ func (o *PostHAProxyConfigurationBadRequest) WriteResponse(rw http.ResponseWrite } rw.WriteHeader(400) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this } } @@ -350,7 +346,7 @@ type PostHAProxyConfigurationDefault struct { /* In: Body */ - Payload *models.Error `json:"body,omitempty"` + Payload string `json:"body,omitempty"` } // NewPostHAProxyConfigurationDefault creates PostHAProxyConfigurationDefault with default headers values @@ -387,13 +383,13 @@ func (o *PostHAProxyConfigurationDefault) SetConfigurationVersion(configurationV } // WithPayload adds the payload to the post h a proxy configuration default response -func (o *PostHAProxyConfigurationDefault) WithPayload(payload *models.Error) *PostHAProxyConfigurationDefault { +func (o *PostHAProxyConfigurationDefault) WithPayload(payload string) *PostHAProxyConfigurationDefault { o.Payload = payload return o } // SetPayload sets the payload to the post h a proxy configuration default response -func (o *PostHAProxyConfigurationDefault) SetPayload(payload *models.Error) { +func (o *PostHAProxyConfigurationDefault) SetPayload(payload string) { o.Payload = payload } @@ -408,10 +404,8 @@ func (o *PostHAProxyConfigurationDefault) WriteResponse(rw http.ResponseWriter, } rw.WriteHeader(o._statusCode) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this } } From de3547dc41a7904c64ba637f202c8e46246daee6 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 31 Jan 2025 14:21:46 +0100 Subject: [PATCH 18/65] TEST/MINOR: bind: add proper config for binds ca-verify-file --- e2e/tests/binds/data/haproxy.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/binds/data/haproxy.cfg b/e2e/tests/binds/data/haproxy.cfg index 9e602e11..39ecdecd 100644 --- a/e2e/tests/binds/data/haproxy.cfg +++ b/e2e/tests/binds/data/haproxy.cfg @@ -27,6 +27,6 @@ defaults mydefaults mode http frontend test_frontend mode tcp maxconn 1000 - bind localhost:9000 name fixture ca-verify-file + bind localhost:9000 name fixture ca-verify-file /certs/ca-verify.pem bind localhost:9090 name loopback option httpclose From d2905d943f88e4db1eb6e30d71702faeb117f108 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 19 Feb 2025 11:48:09 +0100 Subject: [PATCH 19/65] BUILD/MINOR: go.mod: upgrade client-native library --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 02392562..a0859e9c 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.8 + github.com/haproxytech/client-native/v6 v6.0.9 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index cb208b57..0fdbfe34 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.8 h1:SsfdHAI6BqSHAKedyaNoSc3UayttZ/7pYMbp2oN0deo= -github.com/haproxytech/client-native/v6 v6.0.8/go.mod h1:v1Gc4Lh3KGGjN3KnuiRFmm4D6eUXhbRvcjT6oEDUpI8= +github.com/haproxytech/client-native/v6 v6.0.9 h1:0iwogogcwOEcoOvzpnvyXpI6NahOj2lciJM6OXdqV8A= +github.com/haproxytech/client-native/v6 v6.0.9/go.mod h1:v1Gc4Lh3KGGjN3KnuiRFmm4D6eUXhbRvcjT6oEDUpI8= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= From 50c8d4c75bbd134505abdccf99e93871b6371d4e Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 19 Feb 2025 11:42:30 +0100 Subject: [PATCH 20/65] BUG/MINOR: authentication: respect userlist settings when configured --- .aspell.yml | 2 ++ configuration/configuration_storage.go | 13 +++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index 568e78be..26e22e04 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -28,3 +28,5 @@ allowed: - linters - govulncheck - dataplaneapi + - quic + - userlist diff --git a/configuration/configuration_storage.go b/configuration/configuration_storage.go index 4c97ea3b..a29ec412 100644 --- a/configuration/configuration_storage.go +++ b/configuration/configuration_storage.go @@ -355,22 +355,19 @@ func copyConfigurationToStorage(cfg *Configuration) { cfgStorage.Dataplaneapi.Advertised = &configTypeAdvertised{} } cfgStorage.Dataplaneapi.Advertised.APIAddress = &cfg.APIOptions.APIAddress + cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort - if cfgStorage.Dataplaneapi == nil { - cfgStorage.Dataplaneapi = &configTypeDataplaneapi{} + if cfgStorage.Dataplaneapi.Userlist == nil { + cfgStorage.Dataplaneapi.Userlist = &configTypeUserlist{} } - if cfgStorage.Dataplaneapi.Advertised == nil { - cfgStorage.Dataplaneapi.Advertised = &configTypeAdvertised{} - } - cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort - cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort + cfgStorage.Dataplaneapi.Userlist.Userlist = &cfg.HAProxy.Userlist + cfgStorage.Dataplaneapi.Userlist.UserListFile = &cfg.HAProxy.UserListFile if cfgStorage.Haproxy == nil { cfgStorage.Haproxy = &configTypeHaproxy{ Reload: &configTypeReload{}, } } - cfgStorage.Haproxy.Reload.ReloadStrategy = &cfg.HAProxy.ReloadStrategy if cfgStorage.LogTargets == nil { From 33606b4e298e36f8eb56f333366a623c4a28f418 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 21 Feb 2025 14:22:27 +0100 Subject: [PATCH 21/65] BUG/MINOR: reload: fix service name for s6 reload strategy --- configuration/reload-strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/reload-strategy.go b/configuration/reload-strategy.go index 6e1d3377..aee52635 100644 --- a/configuration/reload-strategy.go +++ b/configuration/reload-strategy.go @@ -35,7 +35,7 @@ const ( s6ReloadCmd = "s6-svc -2" s6RestartCmd = "s6-svc -r" s6StatusCmd = "s6-svstat -u" - s6DefaultService = "/etc/service.d/haproxy" + s6DefaultService = "/var/run/service/haproxy" ) // Set a default value to a string. From de5ad46541a2d0c4627b2efae70fa0075debea31 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 25 Feb 2025 15:43:39 +0100 Subject: [PATCH 22/65] BUILD/MEDIUM: go: upgrade go to 1.24.0 --- .gitlab-ci.yml | 2 +- Makefile | 2 +- go.mod | 4 ++-- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7cb83cbb..3293124d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian BATS_VERSION: v1.4.1 - GO_VERSION: "1.23" + GO_VERSION: "1.24" DOCKER_VERSION: "26.0" diff: diff --git a/Makefile b/Makefile index a7159978..ca7e2c5f 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2} SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/client-native/master/Makefile | grep SWAGGER_VERSION -m 1 | awk -F"=" '{print $$2}'} BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 -GOLANGCI_LINT_VERSION=1.61.0 +GOLANGCI_LINT_VERSION=1.64.5 CHECK_COMMIT=5.0.4 all: update clean build diff --git a/go.mod b/go.mod index a0859e9c..c5986290 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.23 +go 1.24.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 @@ -93,7 +93,7 @@ require ( github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.2 // indirect - golang.org/x/sync v0.10.0 // indirect + golang.org/x/sync v0.11.0 // indirect google.golang.org/protobuf v1.36.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 0fdbfe34..21eb5812 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 7e688d859c4a3858209b25bbba94be8ff4cd3352 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 25 Feb 2025 15:45:41 +0100 Subject: [PATCH 23/65] BUILD/MINOR: golangci-lint: upgrade linter and fix lint issues --- .golangci.yml | 5 ++--- haproxy/reload_agent_test.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1bf737f3..567bec3b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -60,10 +60,9 @@ linters: - tagalign - depguard - mnd - - gomnd - err113 - - execinquery - - exportloopref + - tenv # deprecated + - recvcheck issues: exclude: diff --git a/haproxy/reload_agent_test.go b/haproxy/reload_agent_test.go index 9dfd6c42..d3ac7658 100644 --- a/haproxy/reload_agent_test.go +++ b/haproxy/reload_agent_test.go @@ -26,8 +26,8 @@ import ( ) func TestReloadAgentDoesntMissReloads(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - f, err := os.CreateTemp("", "config.cfg") + ctx, cancel := context.WithCancel(t.Context()) + f, err := os.CreateTemp(t.TempDir(), "config.cfg") require.NoError(t, err) assert.NotNil(t, f) t.Cleanup(func() { From 525f9eedd006ee873c22a5d515c6dee7ec0489b4 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 25 Feb 2025 15:46:05 +0100 Subject: [PATCH 24/65] BUILD/MINOR: aspell: add cve to ignore list --- .aspell.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.aspell.yml b/.aspell.yml index 26e22e04..afcc5295 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -30,3 +30,4 @@ allowed: - dataplaneapi - quic - userlist + - cve From 8c6a9fb763e22f4931c69d176744e7d31eed1bfd Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 25 Feb 2025 16:30:17 +0100 Subject: [PATCH 25/65] BUILD/MAJOR: go.mod: upgrade go libraries --- go.mod | 51 +++++++++++-------------- go.sum | 119 ++++++++++++++++++++++----------------------------------- 2 files changed, 68 insertions(+), 102 deletions(-) diff --git a/go.mod b/go.mod index c5986290..0baa15a7 100644 --- a/go.mod +++ b/go.mod @@ -4,16 +4,16 @@ go 1.24.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 - github.com/KimMachineGun/automemlimit v0.6.1 - github.com/aws/aws-sdk-go-v2 v1.32.7 - github.com/aws/aws-sdk-go-v2/config v1.28.7 - github.com/aws/aws-sdk-go-v2/credentials v1.17.48 + github.com/KimMachineGun/automemlimit v0.7.1 + github.com/aws/aws-sdk-go-v2 v1.36.2 + github.com/aws/aws-sdk-go-v2/config v1.29.7 + github.com/aws/aws-sdk-go-v2/credentials v1.17.60 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.8.0 - github.com/getkin/kin-openapi v0.128.0 + github.com/getkin/kin-openapi v0.129.0 github.com/go-openapi/errors v0.22.0 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/runtime v0.28.0 @@ -38,38 +38,32 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.33.0 - golang.org/x/sys v0.29.0 + golang.org/x/net v0.35.0 + golang.org/x/sys v0.30.0 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect - github.com/aws/smithy-go v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.16 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.15 // indirect + github.com/aws/smithy-go v1.22.3 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect - github.com/cilium/ebpf v0.17.1 // indirect - github.com/containerd/cgroups/v3 v3.0.5 // indirect - github.com/containerd/log v0.1.0 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/analysis v0.23.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect - github.com/invopop/yaml v0.3.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect @@ -77,23 +71,22 @@ require ( github.com/lestrrat-go/strftime v1.1.0 // indirect github.com/mailru/easyjson v0.9.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/sys/userns v0.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 // indirect + github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 // indirect github.com/oklog/ulid v1.3.1 // indirect - github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.2 // indirect + go.mongodb.org/mongo-driver v1.17.3 // indirect golang.org/x/sync v0.11.0 // indirect - google.golang.org/protobuf v1.36.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 21eb5812..802ea5aa 100644 --- a/go.sum +++ b/go.sum @@ -1,49 +1,41 @@ github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 h1:IEjq88XO4PuBDcvmjQJcQGg+w+UaafSy8G5Kcb5tBhI= github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5/go.mod h1:exZ0C/1emQJAw5tHOaUDyY1ycttqBAPcxuzf7QbY6ec= -github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26yLj/V+ulKp8= -github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= +github.com/KimMachineGun/automemlimit v0.7.1 h1:QcG/0iCOLChjfUweIMC3YL5Xy9C3VBeNmCZHrZfJMBw= +github.com/KimMachineGun/automemlimit v0.7.1/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw= -github.com/aws/aws-sdk-go-v2 v1.32.7/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.28.7 h1:GduUnoTXlhkgnxTD93g1nv4tVPILbdNQOzav+Wpg7AE= -github.com/aws/aws-sdk-go-v2/config v1.28.7/go.mod h1:vZGX6GVkIE8uECSUHB6MWAUsd4ZcG2Yq/dMa4refR3M= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48 h1:IYdLD1qTJ0zanRavulofmqut4afs45mOWEI+MzZtTfQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48/go.mod h1:tOscxHN3CGmuX9idQ3+qbkzrjVIx32lqDSU1/0d/qXs= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 h1:kqOrpojG71DxJm/KDPO+Z/y1phm1JlC8/iT+5XRmAn8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22/go.mod h1:NtSFajXVVL8TA2QNngagVZmUtXciyrHOt7xgz4faS/M= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 h1:I/5wmGMffY4happ8NOCuIUEWGUvvFp5NSeQcXl9RHcI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26/go.mod h1:FR8f4turZtNy6baO0KJ5FJUmXH/cSkI9fOngs0yl6mA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 h1:zXFLuEuMMUOvEARXFUVJdfqZ4bvvSgdGRq/ATcrQxzM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26/go.mod h1:3o2Wpy0bogG1kyOPrgkXA8pgIfEEv0+m19O9D5+W8y8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2 v1.36.2 h1:Ub6I4lq/71+tPb/atswvToaLGVMxKZvjYDVOWEExOcU= +github.com/aws/aws-sdk-go-v2 v1.36.2/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= +github.com/aws/aws-sdk-go-v2/config v1.29.7 h1:71nqi6gUbAUiEQkypHQcNVSFJVUFANpSeUNShiwWX2M= +github.com/aws/aws-sdk-go-v2/config v1.29.7/go.mod h1:yqJQ3nh2HWw/uxd56bicyvmDW4KSc+4wN6lL8pYjynU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.60 h1:1dq+ELaT5ogfmqtV1eocq8SpOK1NRsuUfmhQtD/XAh4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.60/go.mod h1:HDes+fn/xo9VeszXqjBVkxOo/aUy8Mc6QqKvZk32GlE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29 h1:JO8pydejFKmGcUNiiwt75dzLHRWthkwApIvPoyUtXEg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29/go.mod h1:adxZ9i9DRmB8zAT0pO0yGnsmu0geomp5a3uq5XpgOJ8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33 h1:knLyPMw3r3JsU8MFHWctE4/e2qWbPaxDYLlohPvnY8c= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33/go.mod h1:EBp2HQ3f+XCB+5J+IoEbGhoV7CpJbnrsd4asNXmTL0A= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33 h1:K0+Ne08zqti8J9jwENxZ5NoUyBnaFDTu3apwQJWrwwA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33/go.mod h1:K97stwwzaWzmqxO8yLGHhClbVW1tC6VT1pDLk1pGrq4= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 h1:MSSstL6YXAw2K68L1kph02WTQHKeb/lwmbsMhswpjuY= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2/go.mod h1:t5bdAowh8MWq51TuDmltU+wtxMl/VaegNwSBaznkUYc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 h1:YbNopxjd9baM83YEEmkaYHi+NuJt0AszeaSLqo0CVr0= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1/go.mod h1:mwr3iRm8u1+kkEx4ftDM2Q6Yr0XQFBKrP036ng+k5Lk= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 h1:8eUsivBQzZHqe/3FE+cqwfH+0p5Jo8PFM/QYQSmeZ+M= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7/go.mod h1:kLPQvGUmxn/fqiCrDeohwG33bq2pQpGeY62yRO6Nrh0= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 h1:CvuUmnXI7ebaUAhbJcDy9YQx8wHR69eZ9I7q5hszt/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8/go.mod h1:XDeGv1opzwm8ubxddF0cgqkZWsyOtw4lr6dxwmb6YQg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 h1:F2rBfNAL5UyswqoeWv9zs74N/NanhK16ydHW1pahX6E= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7/go.mod h1:JfyQ0g2JG8+Krq0EuZNnRwX0mU0HrwY/tG6JNfcqh4k= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 h1:Xgv/hyNgvLda/M9l9qxXc4UFSgppnRczLxlMs5Ae/QY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3/go.mod h1:5Gn+d+VaaRgsjewpMvGazt0WfcFO+Md4wLOuBfGR9Bc= -github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= -github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1 h1:ZgY9zeVAe+54Qa7o1GXKRNTez79lffCeJSSinhl+qec= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1/go.mod h1:0naMk66LtdeTmE+1CWQTKwtzOQ2t8mavOhMhR0Pv1m0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14 h1:2scbY6//jy/s8+5vGrk7l1+UtHl0h9A4MjOO2k/TM2E= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14/go.mod h1:bRpZPHZpSe5YRHmPfK3h1M7UBFCn2szHzyx0rw04zro= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.16 h1:YV6xIKDJp6U7YB2bxfud9IENO1LRpGhe2Tv/OKtPrOQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.16/go.mod h1:DvbmMKgtpA6OihFJK13gHMZOZrCHttz8wPHGKXqU+3o= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15 h1:kMyK3aKotq1aTBsj1eS8ERJLjqYRRRcsmP33ozlCvlk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15/go.mod h1:5uPZU7vSNzb8Y0dm75xTikinegPYK3uJmIHQZFq5Aqo= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.15 h1:ht1jVmeeo2anR7zDiYJLSnRYnO/9NILXXu42FP3rJg0= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.15/go.mod h1:xWZ5cOiFe3czngChE4LhCBqUxNwgfwndEF7XlYP/yD8= +github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= +github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= -github.com/cilium/ebpf v0.17.1 h1:G8mzU81R2JA1nE5/8SRubzqvBMmAmri2VL8BIZPWvV0= -github.com/cilium/ebpf v0.17.1/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8= -github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo= -github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 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= @@ -56,8 +48,8 @@ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yi github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/getkin/kin-openapi v0.128.0 h1:jqq3D9vC9pPq1dGcOCv7yOp1DaEe7c/T1vzcLbITSp4= -github.com/getkin/kin-openapi v0.128.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= +github.com/getkin/kin-openapi v0.129.0 h1:QGYTNcmyP5X0AtFQ2Dkou9DGBJsUETeLH9rFrJXZh30= +github.com/getkin/kin-openapi v0.129.0/go.mod h1:gmWI+b/J45xqpyK5wJmRRZse5wefA5H0RDMK46kLUtI= github.com/go-faker/faker/v4 v4.5.0 h1:ARzAY2XoOL9tOUK+KSecUQzyXQsUaZHefjyF8x6YFHc= github.com/go-faker/faker/v4 v4.5.0/go.mod h1:p3oq1GRjG2PZ7yqeFFfQI20Xm61DoBDlCA8RiSyZ48M= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -83,13 +75,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= -github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -105,8 +92,6 @@ github.com/haproxytech/client-native/v6 v6.0.9 h1:0iwogogcwOEcoOvzpnvyXpI6NahOj2 github.com/haproxytech/client-native/v6 v6.0.9/go.mod h1:v1Gc4Lh3KGGjN3KnuiRFmm4D6eUXhbRvcjT6oEDUpI8= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= -github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= -github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -117,10 +102,6 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= 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/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= -github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= -github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM= -github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -140,14 +121,8 @@ github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4 github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maruel/panicparse/v2 v2.4.0 h1:yQKMIbQ0DKfinzVkTkcUzQyQ60UCiNnYfR7PWwTs2VI= github.com/maruel/panicparse/v2 v2.4.0/go.mod h1:nOY2OKe8csO3F3SA5+hsxot05JLgukrF54B9x88fVp4= -github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= -github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= -github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= -github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= 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/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= -github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -157,10 +132,12 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/nathanaelle/syslog5424/v2 v2.0.5 h1:oLVYQmKnv3nlnmvlbBWM+iWl9AONcU+tuxIL0fjko5A= github.com/nathanaelle/syslog5424/v2 v2.0.5/go.mod h1:f9MvsGkLOtYh2VzLT4Pjuwx3+Xv2EogxJNda+HLPDus= +github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 h1:9djga8U4+/TQzv5iMlZHZ/qbGQB9V2nlnk2bmiG+uBs= +github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8/go.mod h1:7tFDb+Y51LcDpn26GccuUgQXUk6t0CXZsivKjyimYX8= +github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 h1:+273wgr7to5QhwOOBE5LwjdNDFAI+8cbJVfB0Zj75aI= +github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= -github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= @@ -176,8 +153,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= @@ -199,25 +176,21 @@ github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0 github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM= -go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= +go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From b35523f159a52dc7b42c93063b40081a1999c7a5 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 27 Feb 2025 15:04:36 +0100 Subject: [PATCH 26/65] BUG/MINOR: general_storage: fix error message when no FileUpload specified --- handlers/general_storage.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/handlers/general_storage.go b/handlers/general_storage.go index 16f956b6..406f7c5e 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -39,6 +39,14 @@ type StorageCreateStorageGeneralFileHandlerImpl struct { } func (h *StorageCreateStorageGeneralFileHandlerImpl) Handle(params storage.CreateStorageGeneralFileParams, principal interface{}) middleware.Responder { + if params.FileUpload == nil { + e := &models.Error{ + Code: misc.Int64P(400), + Message: misc.StringP("No file_upload form param specified"), + } + return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) + } + file, ok := params.FileUpload.(*runtime.File) if !ok { return storage.NewCreateStorageGeneralFileBadRequest() @@ -189,6 +197,14 @@ func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.Repl return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) } + if params.FileUpload == nil { + e := &models.Error{ + Code: misc.Int64P(400), + Message: misc.StringP("No file_upload form param specified"), + } + return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) + } + data, err := io.ReadAll(params.FileUpload) if err != nil { return storage.NewReplaceStorageGeneralFileBadRequest() From 9081588aae9fda02d9254a5c2be46e62ccc34695 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 27 Feb 2025 15:32:13 +0100 Subject: [PATCH 27/65] BUILD/MINOR: go.mod: upgrade client-native --- go.mod | 4 ++-- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 0baa15a7..e639bc01 100644 --- a/go.mod +++ b/go.mod @@ -21,10 +21,10 @@ require ( github.com/go-openapi/strfmt v0.23.0 github.com/go-openapi/swag v0.23.0 github.com/go-openapi/validate v0.24.0 - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.9 + github.com/haproxytech/client-native/v6 v6.0.10 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index 802ea5aa..44084842 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/ github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/getkin/kin-openapi v0.129.0 h1:QGYTNcmyP5X0AtFQ2Dkou9DGBJsUETeLH9rFrJXZh30= github.com/getkin/kin-openapi v0.129.0/go.mod h1:gmWI+b/J45xqpyK5wJmRRZse5wefA5H0RDMK46kLUtI= -github.com/go-faker/faker/v4 v4.5.0 h1:ARzAY2XoOL9tOUK+KSecUQzyXQsUaZHefjyF8x6YFHc= -github.com/go-faker/faker/v4 v4.5.0/go.mod h1:p3oq1GRjG2PZ7yqeFFfQI20Xm61DoBDlCA8RiSyZ48M= +github.com/go-faker/faker/v4 v4.6.0 h1:6aOPzNptRiDwD14HuAnEtlTa+D1IfFuEHO8+vEFwjTs= +github.com/go-faker/faker/v4 v4.6.0/go.mod h1:ZmrHuVtTTm2Em9e0Du6CJ9CADaLEzGXW62z1YqFH0m0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -79,8 +79,8 @@ github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= -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-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU= github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= @@ -88,8 +88,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.9 h1:0iwogogcwOEcoOvzpnvyXpI6NahOj2lciJM6OXdqV8A= -github.com/haproxytech/client-native/v6 v6.0.9/go.mod h1:v1Gc4Lh3KGGjN3KnuiRFmm4D6eUXhbRvcjT6oEDUpI8= +github.com/haproxytech/client-native/v6 v6.0.10 h1:a3NtN15WAKhWCg5GX+QbnAVhL8pcotstoLoGkhAfuks= +github.com/haproxytech/client-native/v6 v6.0.10/go.mod h1:mlzak96U80axvXzPgsY+I8lPZ5wAfBx1k7pfs0QsA64= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= From 74cfa489ba93fa80adf3ff92093ebcf49d90dfcd Mon Sep 17 00:00:00 2001 From: Gopher Bot Date: Wed, 5 Mar 2025 10:58:55 +0000 Subject: [PATCH 28/65] BUILD/MINOR: go.mod: update golang.org/x packages golang.org/x/net v0.36.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e639bc01..5f69cf5d 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.35.0 + golang.org/x/net v0.36.0 golang.org/x/sys v0.30.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 44084842..f6cee5fa 100644 --- a/go.sum +++ b/go.sum @@ -180,8 +180,8 @@ go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeH go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 9f1f5ab416e1be3d00e53a53e73bd0b9b662dd32 Mon Sep 17 00:00:00 2001 From: Gopher Bot Date: Wed, 5 Mar 2025 11:05:20 +0000 Subject: [PATCH 29/65] BUILD/MINOR: go.mod: update github.com/aws/aws-sdk-go-v2 github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.9 github.com/aws/aws-sdk-go-v2/credentials v1.17.62 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 --- go.mod | 25 ++++++++++++------------- go.sum | 53 ++++++++++++++++++++++++----------------------------- 2 files changed, 36 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 5f69cf5d..60f94ce5 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.24.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 github.com/KimMachineGun/automemlimit v0.7.1 - github.com/aws/aws-sdk-go-v2 v1.36.2 - github.com/aws/aws-sdk-go-v2/config v1.29.7 - github.com/aws/aws-sdk-go-v2/credentials v1.17.60 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1 + github.com/aws/aws-sdk-go-v2 v1.36.3 + github.com/aws/aws-sdk-go-v2/config v1.29.9 + github.com/aws/aws-sdk-go-v2/credentials v1.17.62 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.8.0 @@ -45,15 +45,15 @@ require ( require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.16 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect github.com/aws/smithy-go v1.22.3 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -64,7 +64,6 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index f6cee5fa..7f9871ed 100644 --- a/go.sum +++ b/go.sum @@ -4,34 +4,34 @@ github.com/KimMachineGun/automemlimit v0.7.1 h1:QcG/0iCOLChjfUweIMC3YL5Xy9C3VBeN github.com/KimMachineGun/automemlimit v0.7.1/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.36.2 h1:Ub6I4lq/71+tPb/atswvToaLGVMxKZvjYDVOWEExOcU= -github.com/aws/aws-sdk-go-v2 v1.36.2/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/config v1.29.7 h1:71nqi6gUbAUiEQkypHQcNVSFJVUFANpSeUNShiwWX2M= -github.com/aws/aws-sdk-go-v2/config v1.29.7/go.mod h1:yqJQ3nh2HWw/uxd56bicyvmDW4KSc+4wN6lL8pYjynU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.60 h1:1dq+ELaT5ogfmqtV1eocq8SpOK1NRsuUfmhQtD/XAh4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.60/go.mod h1:HDes+fn/xo9VeszXqjBVkxOo/aUy8Mc6QqKvZk32GlE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29 h1:JO8pydejFKmGcUNiiwt75dzLHRWthkwApIvPoyUtXEg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29/go.mod h1:adxZ9i9DRmB8zAT0pO0yGnsmu0geomp5a3uq5XpgOJ8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33 h1:knLyPMw3r3JsU8MFHWctE4/e2qWbPaxDYLlohPvnY8c= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33/go.mod h1:EBp2HQ3f+XCB+5J+IoEbGhoV7CpJbnrsd4asNXmTL0A= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33 h1:K0+Ne08zqti8J9jwENxZ5NoUyBnaFDTu3apwQJWrwwA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33/go.mod h1:K97stwwzaWzmqxO8yLGHhClbVW1tC6VT1pDLk1pGrq4= +github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= +github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= +github.com/aws/aws-sdk-go-v2/config v1.29.9 h1:Kg+fAYNaJeGXp1vmjtidss8O2uXIsXwaRqsQJKXVr+0= +github.com/aws/aws-sdk-go-v2/config v1.29.9/go.mod h1:oU3jj2O53kgOU4TXq/yipt6ryiooYjlkqqVaZk7gY/U= +github.com/aws/aws-sdk-go-v2/credentials v1.17.62 h1:fvtQY3zFzYJ9CfixuAQ96IxDrBajbBWGqjNTCa79ocU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.62/go.mod h1:ElETBxIQqcxej++Cs8GyPBbgMys5DgQPTwo7cUPDKt8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 h1:MSSstL6YXAw2K68L1kph02WTQHKeb/lwmbsMhswpjuY= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2/go.mod h1:t5bdAowh8MWq51TuDmltU+wtxMl/VaegNwSBaznkUYc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1 h1:ZgY9zeVAe+54Qa7o1GXKRNTez79lffCeJSSinhl+qec= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.1/go.mod h1:0naMk66LtdeTmE+1CWQTKwtzOQ2t8mavOhMhR0Pv1m0= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 h1:wj4AION3NjQvjOiI8wm+TVU8y+8EsTl7fSgJAzk9cgc= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1/go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1 h1:yIbrcRq0nKF75IlSiUlo4g/Qe3RzGBdDCR+WRZLf5IE= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1/go.mod h1:ouvGEfHbLaIlWwpDpOVWPWR+YwO0HDv3vm5tYLq8ImY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14 h1:2scbY6//jy/s8+5vGrk7l1+UtHl0h9A4MjOO2k/TM2E= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14/go.mod h1:bRpZPHZpSe5YRHmPfK3h1M7UBFCn2szHzyx0rw04zro= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.16 h1:YV6xIKDJp6U7YB2bxfud9IENO1LRpGhe2Tv/OKtPrOQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.16/go.mod h1:DvbmMKgtpA6OihFJK13gHMZOZrCHttz8wPHGKXqU+3o= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15 h1:kMyK3aKotq1aTBsj1eS8ERJLjqYRRRcsmP33ozlCvlk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15/go.mod h1:5uPZU7vSNzb8Y0dm75xTikinegPYK3uJmIHQZFq5Aqo= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.15 h1:ht1jVmeeo2anR7zDiYJLSnRYnO/9NILXXu42FP3rJg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.15/go.mod h1:xWZ5cOiFe3czngChE4LhCBqUxNwgfwndEF7XlYP/yD8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 h1:8JdC7Gr9NROg1Rusk25IcZeTO59zLxsKgE0gkh5O6h0= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.1/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 h1:KwuLovgQPcdjNMfFt9OhUd9a2OwcOKhxfvF4glTzLuA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= @@ -94,10 +94,6 @@ github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTf github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -194,7 +190,6 @@ golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 0499c43ff2293c419054f85ea0db081b1a0e1411 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 5 Mar 2025 13:31:42 +0100 Subject: [PATCH 30/65] BUILD/MINOR: go.mod: change format of go version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 60f94ce5..6afee400 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.24.0 +go 1.24 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 From 22560407d283151a6f1f944841335a44d87d4d57 Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Thu, 13 Mar 2025 11:25:26 +0000 Subject: [PATCH 31/65] MINOR: Add Subject and Serial to certificate response `models.CertificateInfo` is already used in the response, but the `Subject` and `Serial` fields are not included in the response. This change adds them to the response. --- handlers/ssl_cert_storage.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index 03801a73..e257dc5e 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -97,6 +97,8 @@ func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.Ge Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, } return storage.NewGetOneStorageSSLCertificateOK().WithPayload(retf) } @@ -208,6 +210,8 @@ func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.R Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, } skipReload := false @@ -273,6 +277,8 @@ func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.Cr Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, } forceReload := false From 1030acda285ba8d1cd8aafa88a303741e9dad7e7 Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Mon, 17 Mar 2025 15:01:12 +0100 Subject: [PATCH 32/65] BUG/MINOR: ssl: Add support for skip_reload parameter This parameter is used to skip the reload after the certificate is created. We also update client-native/v6 to the latest ref. Relates to https://github.com/haproxytech/dataplaneapi/issues/365 and https://github.com/haproxytech/client-native/pull/116 --- embedded_spec.go | 12 ++++++ go.mod | 6 +-- go.sum | 16 ++++---- handlers/ssl_cert_storage.go | 9 +++++ ...te_storage_s_s_l_certificate_parameters.go | 37 +++++++++++++++++++ ...te_storage_s_s_l_certificate_urlbuilder.go | 9 +++++ 6 files changed, 78 insertions(+), 11 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index c4f2dba6..67a00265 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -21167,6 +21167,9 @@ func init() { "name": "file_upload", "in": "formData" }, + { + "$ref": "#/parameters/skip_reload" + }, { "$ref": "#/parameters/force_reload" } @@ -28325,6 +28328,7 @@ func init() { "set-tos", "set-uri", "set-var", + "set-var-fmt", "silent-drop", "strict-mode", "tarpit", @@ -70265,6 +70269,13 @@ func init() { "name": "file_upload", "in": "formData" }, + { + "type": "boolean", + "default": false, + "description": "If set, no reload will be initiated after update", + "name": "skip_reload", + "in": "query" + }, { "type": "boolean", "default": false, @@ -78291,6 +78302,7 @@ func init() { "set-tos", "set-uri", "set-var", + "set-var-fmt", "silent-drop", "strict-mode", "tarpit", diff --git a/go.mod b/go.mod index 6afee400..358dc0e9 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.10 + github.com/haproxytech/client-native/v6 v6.0.13 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -39,7 +39,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 golang.org/x/net v0.36.0 - golang.org/x/sys v0.30.0 + golang.org/x/sys v0.31.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -86,6 +86,6 @@ require ( github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.3 // indirect - golang.org/x/sync v0.11.0 // indirect + golang.org/x/sync v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7f9871ed..15636a3f 100644 --- a/go.sum +++ b/go.sum @@ -88,8 +88,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.10 h1:a3NtN15WAKhWCg5GX+QbnAVhL8pcotstoLoGkhAfuks= -github.com/haproxytech/client-native/v6 v6.0.10/go.mod h1:mlzak96U80axvXzPgsY+I8lPZ5wAfBx1k7pfs0QsA64= +github.com/haproxytech/client-native/v6 v6.0.13 h1:4rgiIwvbsCgsSv6fe949kbS0ctEh6Pj4UVOyfsM9p0g= +github.com/haproxytech/client-native/v6 v6.0.13/go.mod h1:MjijWYQ7iw0KggDTTGFkek5P8w428wUnFrhobvoFbE4= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -178,15 +178,15 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index e257dc5e..b8fb7184 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -281,11 +281,20 @@ func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.Cr Serial: info.Serial, } + skipReload := false + if params.SkipReload != nil { + skipReload = *params.SkipReload + } + forceReload := false if params.ForceReload != nil { forceReload = *params.ForceReload } + if skipReload { + return storage.NewCreateStorageSSLCertificateCreated().WithPayload(retf) + } + if forceReload { err := h.ReloadAgent.ForceReload() if err != nil { diff --git a/operations/storage/create_storage_s_s_l_certificate_parameters.go b/operations/storage/create_storage_s_s_l_certificate_parameters.go index edb4b7f2..b552602d 100644 --- a/operations/storage/create_storage_s_s_l_certificate_parameters.go +++ b/operations/storage/create_storage_s_s_l_certificate_parameters.go @@ -47,10 +47,13 @@ func NewCreateStorageSSLCertificateParams() CreateStorageSSLCertificateParams { // initialize parameters with default values forceReloadDefault = bool(false) + skipReloadDefault = bool(false) ) return CreateStorageSSLCertificateParams{ ForceReload: &forceReloadDefault, + + SkipReload: &skipReloadDefault, } } @@ -72,6 +75,11 @@ type CreateStorageSSLCertificateParams struct { Default: false */ ForceReload *bool + /*If set, no reload will be initiated after update + In: query + Default: false + */ + SkipReload *bool } // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface @@ -108,6 +116,11 @@ func (o *CreateStorageSSLCertificateParams) BindRequest(r *http.Request, route * if err := o.bindForceReload(qForceReload, qhkForceReload, route.Formats); err != nil { res = append(res, err) } + + qSkipReload, qhkSkipReload, _ := qs.GetOK("skip_reload") + if err := o.bindSkipReload(qSkipReload, qhkSkipReload, route.Formats); err != nil { + res = append(res, err) + } if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -144,3 +157,27 @@ func (o *CreateStorageSSLCertificateParams) bindForceReload(rawData []string, ha return nil } + +// bindSkipReload binds and validates parameter SkipReload from query. +func (o *CreateStorageSSLCertificateParams) bindSkipReload(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewCreateStorageSSLCertificateParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("skip_reload", "query", "bool", raw) + } + o.SkipReload = &value + + return nil +} diff --git a/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go b/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go index 88d3a121..63a14ad2 100644 --- a/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go +++ b/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go @@ -31,6 +31,7 @@ import ( // CreateStorageSSLCertificateURL generates an URL for the create storage s s l certificate operation type CreateStorageSSLCertificateURL struct { ForceReload *bool + SkipReload *bool _basePath string // avoid unkeyed usage @@ -74,6 +75,14 @@ func (o *CreateStorageSSLCertificateURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var skipReloadQ string + if o.SkipReload != nil { + skipReloadQ = swag.FormatBool(*o.SkipReload) + } + if skipReloadQ != "" { + qs.Set("skip_reload", skipReloadQ) + } + _result.RawQuery = qs.Encode() return &_result, nil From d7a7146807dbe063394f9104df7f0a6945876ad5 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 18 Mar 2025 16:40:58 +0100 Subject: [PATCH 33/65] BUILD/MINOR: client-native: upgrade client-native in go.mod From 312e516f75c8bc447fe4f2acb854926bb2da6583 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 18 Mar 2025 17:38:38 +0100 Subject: [PATCH 34/65] BUILD/MINOR: aspell: add a proper list --- .aspell.yml | 171 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 141 insertions(+), 30 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index afcc5295..076e2e8e 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -1,33 +1,144 @@ mode: commit min_length: 3 allowed: - - aspell - - repo - - yaml - - config - - Github - - Gitlab - - env - - failsafe - - golang - - mkdir - - WORKDIR - - apk - - ENTRYPOINT - - ubuntu - - golangci - - sudo - - releaser - - backend - - backends - - frontend - - frontends - - tcp - - crd - - linter - - linters - - govulncheck - - dataplaneapi - - quic - - userlist - - cve +- acls +- apk +- aspell +- auth +- autofill +- aws +- axios +- backend +- backends +- backport +- bmarkovic +- browserslist +- caniuse +- cli +- clickhouse +- composable +- conf +- config +- const +- crd +- cronjob +- cve +- cwe +- dapi +- dataplane +- dataplaneapi +- dataplanes +- datepicker +- discoverability +- dns +- dom +- dpapi +- dpapis +- dropdowns +- dsn +- e2e +- entrypoint +- enum +- env +- eol +- escaper +- eslint +- failsafe +- fbt +- formatter +- formatters +- frontend +- frontends +- github +- gitlab +- golang +- golangci +- gorm +- goroutines +- govulncheck +- hapee +- haproxy +- healthz +- hostname +- html +- http +- httpCLF +- infos +- ipam +- jose +- json +- jsonpath +- kasbin +- kpi +- kubebuilder +- kubernetes +- lifecycle +- linter +- linters +- lookups +- lts +- makefile +- maxconn +- mexchanger +- minimalistic +- mixin +- mkdir +- multipartsearch +- multiselect +- mutex +- mutexes +- namespace +- namespaces +- openapi +- optim +- param +- params +- parallelize +- passthrough +- podman +- pre +- quic +- rbac +- reimplement +- releaser +- repo +- req +- rsync +- ruleset +- rulesets +- saml +- schemas +- scrollbar +- scss +- searchselect +- spammy +- ssl +- sso +- struct +- subnet +- subresource +- subresources +- sudo +- syslog +- tcp +- timeseries +- tls +- tooltip +- tsconfig +- ubuntu +- uniq +- unix +- unsub +- uri +- url +- userlist +- userlists +- utils +- vfg +- vite +- vrrp +- vue +- waf +- wafadvanced +- workdir +- yaml From c46f910440c7e3b87db68253697d2a736c6ff637 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 28 Mar 2025 10:07:06 +0100 Subject: [PATCH 35/65] BUILD/MAJOR: go.mod: fix golang CVE-2025-22872 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 358dc0e9..5105d482 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.36.0 + golang.org/x/net v0.38.0 golang.org/x/sys v0.31.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 15636a3f..4d3dc63e 100644 --- a/go.sum +++ b/go.sum @@ -176,8 +176,8 @@ go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeH go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 9750d0143f0087f3643ea904cb36cd5bbbd1c63b Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 5 May 2025 11:06:16 +0200 Subject: [PATCH 36/65] BUG/MAJOR: users: fix panic when insecure isn't set --- configuration/user.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configuration/user.go b/configuration/user.go index 05bff1c8..1762d1e6 100644 --- a/configuration/user.go +++ b/configuration/user.go @@ -80,13 +80,18 @@ func (u *Users) Init() error { mode := configuration.Mode.Load() allUsers := configuration.GetUsers() // single + cluster mode if len(allUsers) > 0 { - for _, user := range allUsers { - if mode != ModeCluster || strings.HasPrefix(user.Name, storagetype.DapiClusterUserPrefix) { - u.users = append(u.users, types.User{ - Name: user.Name, - IsInsecure: *user.Insecure, - Password: *user.Password, - }) + for _, storageUser := range allUsers { + if mode != ModeCluster || strings.HasPrefix(storageUser.Name, storagetype.DapiClusterUserPrefix) { + user := types.User{ + Name: storageUser.Name, + } + if storageUser.Password != nil { + user.Password = *storageUser.Password + } + if storageUser.Insecure != nil { + user.IsInsecure = *storageUser.Insecure + } + u.users = append(u.users, user) } } return nil From 5fa6e5e10bcd0c3c477628e8d7d591f555d71e25 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 16 Jun 2025 13:12:35 +0200 Subject: [PATCH 37/65] BUILD/MINOR: go.mod: update Go packages --- go.mod | 52 +++++++++++++-------------- go.sum | 108 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/go.mod b/go.mod index 5105d482..9374268e 100644 --- a/go.mod +++ b/go.mod @@ -4,22 +4,22 @@ go 1.24 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 - github.com/KimMachineGun/automemlimit v0.7.1 - github.com/aws/aws-sdk-go-v2 v1.36.3 - github.com/aws/aws-sdk-go-v2/config v1.29.9 - github.com/aws/aws-sdk-go-v2/credentials v1.17.62 + github.com/KimMachineGun/automemlimit v0.7.3 + github.com/aws/aws-sdk-go-v2 v1.36.4 + github.com/aws/aws-sdk-go-v2/config v1.29.16 + github.com/aws/aws-sdk-go-v2/credentials v1.17.69 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 - github.com/fsnotify/fsnotify v1.8.0 - github.com/getkin/kin-openapi v0.129.0 - github.com/go-openapi/errors v0.22.0 + github.com/fsnotify/fsnotify v1.9.0 + github.com/getkin/kin-openapi v0.132.0 + github.com/go-openapi/errors v0.22.1 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/runtime v0.28.0 github.com/go-openapi/spec v0.21.0 github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.23.0 + github.com/go-openapi/swag v0.23.1 github.com/go-openapi/validate v0.24.0 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 @@ -30,7 +30,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/kr/pretty v0.3.1 github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8 - github.com/maruel/panicparse/v2 v2.4.0 + github.com/maruel/panicparse/v2 v2.5.0 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible @@ -38,29 +38,29 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.38.0 - golang.org/x/sys v0.31.0 + golang.org/x/net v0.41.0 + golang.org/x/sys v0.33.0 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 // indirect github.com/aws/smithy-go v1.22.3 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonpointer v0.21.1 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect @@ -73,8 +73,8 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 // indirect - github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect @@ -82,10 +82,10 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect - github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.9.0 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.3 // indirect - golang.org/x/sync v0.12.0 // indirect + go.mongodb.org/mongo-driver v1.17.4 // indirect + golang.org/x/sync v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4d3dc63e..850bc78f 100644 --- a/go.sum +++ b/go.sum @@ -1,37 +1,37 @@ github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 h1:IEjq88XO4PuBDcvmjQJcQGg+w+UaafSy8G5Kcb5tBhI= github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5/go.mod h1:exZ0C/1emQJAw5tHOaUDyY1ycttqBAPcxuzf7QbY6ec= -github.com/KimMachineGun/automemlimit v0.7.1 h1:QcG/0iCOLChjfUweIMC3YL5Xy9C3VBeNmCZHrZfJMBw= -github.com/KimMachineGun/automemlimit v0.7.1/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= +github.com/KimMachineGun/automemlimit v0.7.3 h1:oPgMp0bsWez+4fvgSa11Rd9nUDrd8RLtDjBoT3ro+/A= +github.com/KimMachineGun/automemlimit v0.7.3/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= -github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/config v1.29.9 h1:Kg+fAYNaJeGXp1vmjtidss8O2uXIsXwaRqsQJKXVr+0= -github.com/aws/aws-sdk-go-v2/config v1.29.9/go.mod h1:oU3jj2O53kgOU4TXq/yipt6ryiooYjlkqqVaZk7gY/U= -github.com/aws/aws-sdk-go-v2/credentials v1.17.62 h1:fvtQY3zFzYJ9CfixuAQ96IxDrBajbBWGqjNTCa79ocU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.62/go.mod h1:ElETBxIQqcxej++Cs8GyPBbgMys5DgQPTwo7cUPDKt8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= +github.com/aws/aws-sdk-go-v2 v1.36.4 h1:GySzjhVvx0ERP6eyfAbAuAXLtAda5TEy19E5q5W8I9E= +github.com/aws/aws-sdk-go-v2 v1.36.4/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= +github.com/aws/aws-sdk-go-v2/config v1.29.16 h1:XkruGnXX1nEZ+Nyo9v84TzsX+nj86icbFAeust6uo8A= +github.com/aws/aws-sdk-go-v2/config v1.29.16/go.mod h1:uCW7PNjGwZ5cOGZ5jr8vCWrYkGIhPoTNV23Q/tpHKzg= +github.com/aws/aws-sdk-go-v2/credentials v1.17.69 h1:8B8ZQboRc3uaIKjshve/XlvJ570R7BKNy3gftSbS178= +github.com/aws/aws-sdk-go-v2/credentials v1.17.69/go.mod h1:gPME6I8grR1jCqBFEGthULiolzf/Sexq/Wy42ibKK9c= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 h1:oQWSGexYasNpYp4epLGZxxjsDo8BMBh6iNWkTXQvkwk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31/go.mod h1:nc332eGUU+djP3vrMI6blS0woaCfHTe3KiSQUVTMRq0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 h1:o1v1VFfPcDVlK3ll1L5xHsaQAFdNtZ5GXnNR7SwueC4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35/go.mod h1:rZUQNYMNG+8uZxz9FOerQJ+FceCiodXvixpeRtdESrU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 h1:R5b82ubO2NntENm3SAm0ADME+H630HomNJdgv+yZ3xw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35/go.mod h1:FuA+nmgMRfkzVKYDNEqQadvEMxtxl9+RLT9ribCwEMs= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 h1:wj4AION3NjQvjOiI8wm+TVU8y+8EsTl7fSgJAzk9cgc= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1/go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1 h1:yIbrcRq0nKF75IlSiUlo4g/Qe3RzGBdDCR+WRZLf5IE= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1/go.mod h1:ouvGEfHbLaIlWwpDpOVWPWR+YwO0HDv3vm5tYLq8ImY= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1 h1:J76cGc7WVOYvl2MMFtOdijDZKfyOGyd+qIsROFZAPhg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1/go.mod h1:x6tX41NB2h3WJfIXlBftg9JhawCddw/kcWVBYe7uNaw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 h1:8JdC7Gr9NROg1Rusk25IcZeTO59zLxsKgE0gkh5O6h0= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.1/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 h1:KwuLovgQPcdjNMfFt9OhUd9a2OwcOKhxfvF4glTzLuA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 h1:/ldKrPPXTC421bTNWrUIpq3CxwHwRI/kpc+jPUTJocM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16/go.mod h1:5vkf/Ws0/wgIMJDQbjI4p2op86hNW6Hie5QtebrDgT8= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 h1:EU58LP8ozQDVroOEyAfcq0cGc5R/FTZjVoYJ6tvby3w= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.4/go.mod h1:CrtOgCcysxMvrCoHnvNAD7PHWclmoFG78Q2xLK0KKcs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 h1:XB4z0hbQtpmBnb1FQYvKaCM7UsS6Y/u8jVBwIUGeCTk= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2/go.mod h1:hwRpqkRxnQ58J9blRDrB4IanlXCpcKmsC83EhG77upg= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 h1:nyLjs8sYJShFYj6aiyjCBI3EcLn1udWrQTjEF+SOXB0= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.21/go.mod h1:EhdxtZ+g84MSGrSrHzZiUm9PYiZkrADNja15wtRJSJo= github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= @@ -46,10 +46,10 @@ github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 h1:a github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0/go.mod h1:8AuBTZBRSFqEYBPYULd+NN474/zZBLP+6WeT5S9xlAc= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/getkin/kin-openapi v0.129.0 h1:QGYTNcmyP5X0AtFQ2Dkou9DGBJsUETeLH9rFrJXZh30= -github.com/getkin/kin-openapi v0.129.0/go.mod h1:gmWI+b/J45xqpyK5wJmRRZse5wefA5H0RDMK46kLUtI= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= +github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= github.com/go-faker/faker/v4 v4.6.0 h1:6aOPzNptRiDwD14HuAnEtlTa+D1IfFuEHO8+vEFwjTs= github.com/go-faker/faker/v4 v4.6.0/go.mod h1:ZmrHuVtTTm2Em9e0Du6CJ9CADaLEzGXW62z1YqFH0m0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -57,10 +57,10 @@ github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= -github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/errors v0.22.1 h1:kslMRRnK7NCb/CvR1q1VWuEQCEIsBGn5GgKD9e+HYhU= +github.com/go-openapi/errors v0.22.1/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= +github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= +github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= @@ -71,8 +71,8 @@ github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9Z github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= +github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= @@ -115,8 +115,8 @@ github.com/lestrrat-go/strftime v1.1.0 h1:gMESpZy44/4pXLO/m+sL0yBd1W6LjgjrrD4a68 github.com/lestrrat-go/strftime v1.1.0/go.mod h1:uzeIB52CeUJenCo1syghlugshMysrqUT51HlxphXVeI= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= -github.com/maruel/panicparse/v2 v2.4.0 h1:yQKMIbQ0DKfinzVkTkcUzQyQ60UCiNnYfR7PWwTs2VI= -github.com/maruel/panicparse/v2 v2.4.0/go.mod h1:nOY2OKe8csO3F3SA5+hsxot05JLgukrF54B9x88fVp4= +github.com/maruel/panicparse/v2 v2.5.0 h1:yCtuS0FWjfd0RTYMXGpDvWcb0kINm8xJGu18/xMUh00= +github.com/maruel/panicparse/v2 v2.5.0/go.mod h1:DA2fDiBk63bKfBf4CVZP9gb4fuvzdPbLDsSI873hweQ= 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= @@ -128,10 +128,10 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/nathanaelle/syslog5424/v2 v2.0.5 h1:oLVYQmKnv3nlnmvlbBWM+iWl9AONcU+tuxIL0fjko5A= github.com/nathanaelle/syslog5424/v2 v2.0.5/go.mod h1:f9MvsGkLOtYh2VzLT4Pjuwx3+Xv2EogxJNda+HLPDus= -github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 h1:9djga8U4+/TQzv5iMlZHZ/qbGQB9V2nlnk2bmiG+uBs= -github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8/go.mod h1:7tFDb+Y51LcDpn26GccuUgQXUk6t0CXZsivKjyimYX8= -github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 h1:+273wgr7to5QhwOOBE5LwjdNDFAI+8cbJVfB0Zj75aI= -github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= @@ -164,29 +164,29 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= -github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= -github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= -github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= -go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= +go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 0c40165447609cba2e67d1df55acbabe4e345c5e Mon Sep 17 00:00:00 2001 From: Gopher Bot Date: Wed, 9 Jul 2025 08:34:11 +0000 Subject: [PATCH 38/65] BUILD/MINOR: go.mod: update github.com/aws/aws-sdk-go-v2 github.com/aws/aws-sdk-go-v2 v1.36.5 github.com/aws/aws-sdk-go-v2/config v1.29.17 github.com/aws/aws-sdk-go-v2/credentials v1.17.70 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0 github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 github.com/aws/smithy-go v1.22.4 --- go.mod | 28 ++++++++++++++-------------- go.sum | 56 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index 9374268e..6177c5e7 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.24 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 github.com/KimMachineGun/automemlimit v0.7.3 - github.com/aws/aws-sdk-go-v2 v1.36.4 - github.com/aws/aws-sdk-go-v2/config v1.29.16 - github.com/aws/aws-sdk-go-v2/credentials v1.17.69 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1 + github.com/aws/aws-sdk-go-v2 v1.36.5 + github.com/aws/aws-sdk-go-v2/config v1.29.17 + github.com/aws/aws-sdk-go-v2/credentials v1.17.70 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 @@ -45,16 +45,16 @@ require ( require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 // indirect - github.com/aws/smithy-go v1.22.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect + github.com/aws/smithy-go v1.22.4 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect diff --git a/go.sum b/go.sum index 850bc78f..1b17992b 100644 --- a/go.sum +++ b/go.sum @@ -4,36 +4,36 @@ github.com/KimMachineGun/automemlimit v0.7.3 h1:oPgMp0bsWez+4fvgSa11Rd9nUDrd8RLt github.com/KimMachineGun/automemlimit v0.7.3/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.36.4 h1:GySzjhVvx0ERP6eyfAbAuAXLtAda5TEy19E5q5W8I9E= -github.com/aws/aws-sdk-go-v2 v1.36.4/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/config v1.29.16 h1:XkruGnXX1nEZ+Nyo9v84TzsX+nj86icbFAeust6uo8A= -github.com/aws/aws-sdk-go-v2/config v1.29.16/go.mod h1:uCW7PNjGwZ5cOGZ5jr8vCWrYkGIhPoTNV23Q/tpHKzg= -github.com/aws/aws-sdk-go-v2/credentials v1.17.69 h1:8B8ZQboRc3uaIKjshve/XlvJ570R7BKNy3gftSbS178= -github.com/aws/aws-sdk-go-v2/credentials v1.17.69/go.mod h1:gPME6I8grR1jCqBFEGthULiolzf/Sexq/Wy42ibKK9c= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 h1:oQWSGexYasNpYp4epLGZxxjsDo8BMBh6iNWkTXQvkwk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31/go.mod h1:nc332eGUU+djP3vrMI6blS0woaCfHTe3KiSQUVTMRq0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 h1:o1v1VFfPcDVlK3ll1L5xHsaQAFdNtZ5GXnNR7SwueC4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35/go.mod h1:rZUQNYMNG+8uZxz9FOerQJ+FceCiodXvixpeRtdESrU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 h1:R5b82ubO2NntENm3SAm0ADME+H630HomNJdgv+yZ3xw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35/go.mod h1:FuA+nmgMRfkzVKYDNEqQadvEMxtxl9+RLT9ribCwEMs= +github.com/aws/aws-sdk-go-v2 v1.36.5 h1:0OF9RiEMEdDdZEMqF9MRjevyxAQcf6gY+E7vwBILFj0= +github.com/aws/aws-sdk-go-v2 v1.36.5/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= +github.com/aws/aws-sdk-go-v2/config v1.29.17 h1:jSuiQ5jEe4SAMH6lLRMY9OVC+TqJLP5655pBGjmnjr0= +github.com/aws/aws-sdk-go-v2/config v1.29.17/go.mod h1:9P4wwACpbeXs9Pm9w1QTh6BwWwJjwYvJ1iCt5QbCXh8= +github.com/aws/aws-sdk-go-v2/credentials v1.17.70 h1:ONnH5CM16RTXRkS8Z1qg7/s2eDOhHhaXVd72mmyv4/0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.70/go.mod h1:M+lWhhmomVGgtuPOhO85u4pEa3SmssPTdcYpP/5J/xc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 h1:KAXP9JSHO1vKGCr5f4O6WmlVKLFFXgWYAGoJosorxzU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32/go.mod h1:h4Sg6FQdexC1yYG9RDnOvLbW1a/P986++/Y/a+GyEM8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36/go.mod h1:Q1lnJArKRXkenyog6+Y+zr7WDpk4e6XlR6gs20bbeNo= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 h1:i2vNHQiXUvKhs3quBR6aqlgJaiaexz/aNvdCktW/kAM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36/go.mod h1:UdyGa7Q91id/sdyHPwth+043HhmP6yP9MBHgbZM0xo8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1 h1:wj4AION3NjQvjOiI8wm+TVU8y+8EsTl7fSgJAzk9cgc= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1/go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1 h1:J76cGc7WVOYvl2MMFtOdijDZKfyOGyd+qIsROFZAPhg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1/go.mod h1:x6tX41NB2h3WJfIXlBftg9JhawCddw/kcWVBYe7uNaw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 h1:/ldKrPPXTC421bTNWrUIpq3CxwHwRI/kpc+jPUTJocM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16/go.mod h1:5vkf/Ws0/wgIMJDQbjI4p2op86hNW6Hie5QtebrDgT8= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 h1:EU58LP8ozQDVroOEyAfcq0cGc5R/FTZjVoYJ6tvby3w= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.4/go.mod h1:CrtOgCcysxMvrCoHnvNAD7PHWclmoFG78Q2xLK0KKcs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 h1:XB4z0hbQtpmBnb1FQYvKaCM7UsS6Y/u8jVBwIUGeCTk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2/go.mod h1:hwRpqkRxnQ58J9blRDrB4IanlXCpcKmsC83EhG77upg= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 h1:nyLjs8sYJShFYj6aiyjCBI3EcLn1udWrQTjEF+SOXB0= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.21/go.mod h1:EhdxtZ+g84MSGrSrHzZiUm9PYiZkrADNja15wtRJSJo= -github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= -github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0 h1:0BmpSm5x2rpB9D2K2OAoOc1cZTUJpw1OiQj86ZT8RTg= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0/go.mod h1:6U/Xm5bBkZGCTxH3NE9+hPKEpCFCothGn/gwytsr1Mk= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0 h1:N0laDZWoAoKIRkwlc7p5Iu8l2JGEUtZLgG3Ai67n5K0= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0/go.mod h1:35jGWx7ECvCwTsApqicFYzZ7JFEnBc6oHUuOQ3xIS54= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 h1:t0E6FzREdtCsiLIoLCWsYliNsRBgyGD/MCK571qk4MI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17/go.mod h1:ygpklyoaypuyDvOM5ujWGrYWpAK3h7ugnmKCU/76Ys4= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 h1:AIRJ3lfb2w/1/8wOOSqYb9fUKGwQbtysJ2H1MofRUPg= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.5/go.mod h1:b7SiVprpU+iGazDUqvRSLf5XmCdn+JtT1on7uNL6Ipc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 h1:BpOxT3yhLwSJ77qIY3DoHAQjZsc4HEGfMCE4NGy3uFg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3/go.mod h1:vq/GQR1gOFLquZMSrxUK/cpvKCNVYibNyJ1m7JrU88E= +github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 h1:NFOJ/NXEGV4Rq//71Hs1jC/NvPs1ezajK+yQmkwnPV0= +github.com/aws/aws-sdk-go-v2/service/sts v1.34.0/go.mod h1:7ph2tGpfQvwzgistp2+zga9f+bCjlQJPkPUmMgDSD7w= +github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw= +github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= From 9e744b93c370a9e972eb5291cbfcfddbc1a582ca Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Fri, 11 Jul 2025 13:56:34 +0200 Subject: [PATCH 39/65] BUILD/MINOR: ci: cancel duplicate pipelines on forked project gitlab is not good in detecting duplicate pipelines, so this is ensuring that we do not run duplicate jobs for same merge request, but still allows running if you do not open merge request --- .gitlab-ci.yml | 13 +++ cmd/gitlab-mr-pipelines/ascii.txt | 11 +++ cmd/gitlab-mr-pipelines/main.go | 159 ++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 cmd/gitlab-mr-pipelines/ascii.txt create mode 100644 cmd/gitlab-mr-pipelines/main.go diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3293124d..298d98b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - bots - lint - checks - build @@ -11,6 +12,18 @@ variables: GO_VERSION: "1.24" DOCKER_VERSION: "26.0" +pipelines-check: + stage: bots + needs: [] + image: + name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-go$GO_VERSION + entrypoint: [""] + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + tags: + - go + script: + - go run cmd/gitlab-mr-pipelines/main.go diff: stage: lint image: diff --git a/cmd/gitlab-mr-pipelines/ascii.txt b/cmd/gitlab-mr-pipelines/ascii.txt new file mode 100644 index 00000000..d3b21f22 --- /dev/null +++ b/cmd/gitlab-mr-pipelines/ascii.txt @@ -0,0 +1,11 @@ + ____ _ _ _ _ + / ___(_) |_| | __ _| |__ + | | _| | __| |/ _` | '_ \ + | |_| | | |_| | (_| | |_) | + \____|_|\__|_|\__,_|_.__/ + ____ _ _ _ _ _ + | _ \(_)_ __ ___| (_)_ __ ___ ___| |__ ___ ___| | __ + | |_) | | '_ \ / _ \ | | '_ \ / _ \ / __| '_ \ / _ \/ __| |/ / + | __/| | |_) | __/ | | | | | __/ | (__| | | | __/ (__| < + |_| |_| .__/ \___|_|_|_| |_|\___| \___|_| |_|\___|\___|_|\_\ + |_| diff --git a/cmd/gitlab-mr-pipelines/main.go b/cmd/gitlab-mr-pipelines/main.go new file mode 100644 index 00000000..9eca2569 --- /dev/null +++ b/cmd/gitlab-mr-pipelines/main.go @@ -0,0 +1,159 @@ +// Copyright 2019 HAProxy Technologies LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package main + +import ( + _ "embed" + "encoding/json" + "fmt" + "io" + "net/http" + "os" + "strconv" + "strings" +) + +//go:embed ascii.txt +var hello string + +//nolint:forbidigo +func main() { + fmt.Println(hello) + // Check if we are in a merge request context + mrIID := os.Getenv("CI_MERGE_REQUEST_IID") + if mrIID == "" { + fmt.Println("Not a merge request. Exiting.") + os.Exit(0) + } + + // Get necessary environment variables + gitlabAPIURL := os.Getenv("CI_API_V4_URL") + projectID := os.Getenv("CI_PROJECT_ID") + sourceProjectID := os.Getenv("CI_MERGE_REQUEST_SOURCE_PROJECT_ID") + gitlabToken := os.Getenv("GITLAB_TOKEN") + + if gitlabAPIURL == "" || projectID == "" || sourceProjectID == "" { + fmt.Println("Missing required GitLab CI/CD environment variables.") + os.Exit(1) + } + + if gitlabToken == "" { + fmt.Print("GitLab token not found in environment variable.\n") + os.Exit(1) + } + + // 1. Get all old pipelines for this Merge Request + pipelinesToCancel, err := getOldMergeRequestPipelines(gitlabAPIURL, projectID, mrIID, gitlabToken) + if err != nil { + fmt.Printf("Error getting merge request pipelines: %v\n", err) + os.Exit(1) + } + + if len(pipelinesToCancel) == 0 { + fmt.Println("No old, running pipelines found for this merge request.") + os.Exit(0) + } + + fmt.Printf("Found %d old pipelines to cancel.\n", len(pipelinesToCancel)) + + // 2. Cancel all found pipelines + for _, p := range pipelinesToCancel { + fmt.Printf("Canceling pipeline ID %d on project ID %d\n", p.ID, p.ProjectID) + err = cancelPipeline(gitlabAPIURL, strconv.Itoa(p.ProjectID), p.ID, gitlabToken) + if err != nil { + // Log error but continue trying to cancel others + fmt.Printf("Failed to cancel pipeline %d: %v\n", p.ID, err) + } else { + fmt.Printf("Successfully requested cancellation for pipeline %d\n", p.ID) + } + } +} + +type pipelineInfo struct { + ID int `json:"id"` + ProjectID int `json:"project_id"` + Status string `json:"status"` +} + +func getOldMergeRequestPipelines(apiURL, projectID, mrIID, token string) ([]pipelineInfo, error) { + // Get the current pipeline ID to avoid canceling ourselves + currentPipelineIDStr := os.Getenv("CI_PIPELINE_ID") + var currentPipelineID int + if currentPipelineIDStr != "" { + // a non-integer value will result in 0, which is fine since pipeline IDs are positive + currentPipelineID, _ = strconv.Atoi(currentPipelineIDStr) + } + + url := fmt.Sprintf("%s/projects/%s/merge_requests/%s/pipelines", apiURL, projectID, mrIID) + req, err := http.NewRequest("GET", url, nil) //nolint:noctx,usestdlibvars + if err != nil { + return nil, err + } + req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + return nil, fmt.Errorf("failed to list merge request pipelines: status %d, body: %s", resp.StatusCode, string(body)) + } + + var pipelines []pipelineInfo + if err := json.NewDecoder(resp.Body).Decode(&pipelines); err != nil { + return nil, err + } + + var pipelinesToCancel []pipelineInfo + for _, p := range pipelines { + // Cancel pipelines that are running or pending, and are not the current pipeline + if (p.Status == "running" || p.Status == "pending") && p.ID != currentPipelineID { + pipelinesToCancel = append(pipelinesToCancel, p) + } + } + + return pipelinesToCancel, nil +} + +func cancelPipeline(apiURL, projectID string, pipelineID int, token string) error { + url := fmt.Sprintf("%s/projects/%s/pipelines/%d/cancel", apiURL, projectID, pipelineID) + req, err := http.NewRequest("POST", url, nil) //nolint:noctx,usestdlibvars + if err != nil { + return err + } + req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + // It's possible the pipeline is already finished. + if strings.Contains(string(body), "Cannot cancel a pipeline that is not pending or running") { + fmt.Println("Pipeline already finished, nothing to do.") //nolint:forbidigo + return nil + } + return fmt.Errorf("failed to cancel pipeline: status %d, body: %s", resp.StatusCode, string(body)) + } + + return nil +} From 9530605e1833d2e6e44841bc59283d0fb16937aa Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 4 Aug 2025 09:19:47 +0200 Subject: [PATCH 40/65] BUILD/MINOR: go.mod: upgrade client-native --- embedded_spec.go | 6 ++++-- go.mod | 6 +++--- go.sum | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 67a00265..a78cfc40 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -31210,7 +31210,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -36012,6 +36012,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", @@ -81162,7 +81163,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -85877,6 +85878,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", diff --git a/go.mod b/go.mod index 6177c5e7..7b42576c 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.13 + github.com/haproxytech/client-native/v6 v6.0.15 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -39,7 +39,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/automaxprocs v1.6.0 golang.org/x/net v0.41.0 - golang.org/x/sys v0.33.0 + golang.org/x/sys v0.34.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -86,6 +86,6 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.4 // indirect - golang.org/x/sync v0.15.0 // indirect + golang.org/x/sync v0.16.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1b17992b..37189ab8 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= -github.com/go-faker/faker/v4 v4.6.0 h1:6aOPzNptRiDwD14HuAnEtlTa+D1IfFuEHO8+vEFwjTs= -github.com/go-faker/faker/v4 v4.6.0/go.mod h1:ZmrHuVtTTm2Em9e0Du6CJ9CADaLEzGXW62z1YqFH0m0= +github.com/go-faker/faker/v4 v4.6.1 h1:xUyVpAjEtB04l6XFY0V/29oR332rOSPWV4lU8RwDt4k= +github.com/go-faker/faker/v4 v4.6.1/go.mod h1:arSdxNCSt7mOhdk8tEolvHeIJ7eX4OX80wXjKKvkKBY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -88,8 +88,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.13 h1:4rgiIwvbsCgsSv6fe949kbS0ctEh6Pj4UVOyfsM9p0g= -github.com/haproxytech/client-native/v6 v6.0.13/go.mod h1:MjijWYQ7iw0KggDTTGFkek5P8w428wUnFrhobvoFbE4= +github.com/haproxytech/client-native/v6 v6.0.15 h1:F0xWsIFLpEwK/iRf/wvnqS0BRbO+MTJjoCmiJRkR6+g= +github.com/haproxytech/client-native/v6 v6.0.15/go.mod h1:LXmdjV3aAkeHS9RX7YKoj/ryqoIco383kgNAjc3wHYw= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -178,15 +178,15 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 49d74ca736edda05a86a88c011b933dad6a6e2ec Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 7 Aug 2025 14:18:01 +0200 Subject: [PATCH 41/65] BUILD/MINOR: ci: update github tooling --- .github/workflows/.goreleaser.yml | 4 ++-- .github/workflows/build.yml | 30 +++++++++++-------------- .github/workflows/e2e.yml | 22 +++++++++--------- .github/workflows/lint.yml | 12 +++++----- .github/workflows/manual_goreleaser.yml | 4 ++-- 5 files changed, 34 insertions(+), 38 deletions(-) diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index 013845cb..bdf4482f 100644 --- a/.github/workflows/.goreleaser.yml +++ b/.github/workflows/.goreleaser.yml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/. fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' check-latest: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3ba59d6..a91ef46b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,24 +4,20 @@ on: branches: - master jobs: - build: name: Build runs-on: ubuntu-latest steps: - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Get dependencies - run: | - go get -v -t -d ./... - - name: Build - run: | - go build -v . + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + id: go + - name: Get dependencies + run: | + go get -v -t -d ./... + - name: Build + run: | + go build -v . diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8f7131a1..2231e561 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,14 +11,14 @@ jobs: haproxy_version: ["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9"] runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - name: Downloading required packages - run: sudo apt-get install bats - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' - - run: make e2e - env: - HAPROXY_VERSION: ${{ matrix.haproxy_version }} + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Downloading required packages + run: sudo apt-get install bats + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + - run: make e2e + env: + HAPROXY_VERSION: ${{ matrix.haproxy_version }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b0c36627..73a19e3f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -31,12 +31,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cache/go-build diff --git a/.github/workflows/manual_goreleaser.yml b/.github/workflows/manual_goreleaser.yml index 10fd578a..f1cb4b94 100644 --- a/.github/workflows/manual_goreleaser.yml +++ b/.github/workflows/manual_goreleaser.yml @@ -6,12 +6,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/. fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' check-latest: true From dbfe0206d26e69dbfa27954ccf1e6490b6c708ad Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 7 Aug 2025 14:19:11 +0200 Subject: [PATCH 42/65] BUILD/MINOR: ci: update HAProxy e2e version --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2231e561..646926fc 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -8,7 +8,7 @@ jobs: name: HAProxy strategy: matrix: - haproxy_version: ["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9"] + haproxy_version: ["3.0"] runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory From 9cdc8c46939462becde1bbaab1d5a6b59c836028 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 22 Sep 2025 16:20:27 +0200 Subject: [PATCH 43/65] BUILD/MEDIUM: specification: upgrade specification and client-native Upgrade go-swagger to v0.32.3, and upgrade client-native --- cmd/dataplaneapi/main.go | 2 +- configure_data_plane.go | 20 +- discovery/aws_service_discovery.go | 10 +- discovery/aws_service_discovery_instance.go | 10 +- discovery/consul_service_discovery.go | 6 +- discovery/service_discovery_instance_test.go | 8 +- discovery/store.go | 8 +- embedded_spec.go | 178 ++++++++++++++++++ generate/parents/main.go | 6 +- generate/swagger/Dockerfile | 8 +- go.mod | 35 ++-- go.sum | 74 +++++--- log/rfc5424.go | 2 +- operations/data_plane_api.go | 16 +- .../get_openapiv3_specification.go | 2 +- .../get_openapiv3_specification_parameters.go | 2 +- .../get_openapiv3_specification_responses.go | 2 +- .../get_openapiv3_specification_urlbuilder.go | 2 +- rate/threshold_limit.go | 2 +- 19 files changed, 305 insertions(+), 88 deletions(-) rename operations/{version3 => specification_openapiv3}/get_openapiv3_specification.go (98%) rename operations/{version3 => specification_openapiv3}/get_openapiv3_specification_parameters.go (98%) rename operations/{version3 => specification_openapiv3}/get_openapiv3_specification_responses.go (99%) rename operations/{version3 => specification_openapiv3}/get_openapiv3_specification_urlbuilder.go (98%) diff --git a/cmd/dataplaneapi/main.go b/cmd/dataplaneapi/main.go index c808512a..a68e48c1 100644 --- a/cmd/dataplaneapi/main.go +++ b/cmd/dataplaneapi/main.go @@ -127,7 +127,7 @@ func startServer(cfg *configuration.Configuration, cancelDebugServer context.Can fmt.Printf("HAProxy Data Plane API %s %s%s\n\n", GitTag, GitCommit, GitDirty) fmt.Printf("Build from: %s\n", GitRepo) fmt.Printf("Build date: %s\n\n", BuildTime) - return + return reload } var loadMsg []string diff --git a/configure_data_plane.go b/configure_data_plane.go index 981be57b..a740b358 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -36,7 +36,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/swag" + "github.com/go-openapi/swag/cmdutils" client_native "github.com/haproxytech/client-native/v6" "github.com/haproxytech/client-native/v6/models" "github.com/haproxytech/client-native/v6/options" @@ -57,7 +57,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations" "github.com/haproxytech/dataplaneapi/operations/discovery" "github.com/haproxytech/dataplaneapi/operations/specification" - "github.com/haproxytech/dataplaneapi/operations/version3" + "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3" "github.com/haproxytech/dataplaneapi/rate" "github.com/haproxytech/dataplaneapi/resilient" socket_runtime "github.com/haproxytech/dataplaneapi/runtime" @@ -88,25 +88,25 @@ func SetServerStartedCallback(callFunc func()) { func configureFlags(api *operations.DataPlaneAPI) { cfg := dataplaneapi_config.Get() - haproxyOptionsGroup := swag.CommandLineOptionsGroup{ + haproxyOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "HAProxy options", LongDescription: "Options for configuring haproxy locations.", Options: &cfg.HAProxy, } - loggingOptionsGroup := swag.CommandLineOptionsGroup{ + loggingOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "Logging options", LongDescription: "Options for configuring logging.", Options: &cfg.Logging, } - syslogOptionsGroup := swag.CommandLineOptionsGroup{ + syslogOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "Syslog options", LongDescription: "Options for configuring syslog logging.", Options: &cfg.Syslog, } - api.CommandLineOptionsGroups = make([]swag.CommandLineOptionsGroup, 0, 1) + api.CommandLineOptionsGroups = make([]cmdutils.CommandLineOptionsGroup, 0, 1) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, haproxyOptionsGroup) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, loggingOptionsGroup) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, syslogOptionsGroup) @@ -918,7 +918,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.StorageReplaceStorageGeneralFileHandler = &handlers.StorageReplaceStorageGeneralFileHandlerImpl{Client: client, ReloadAgent: ra} // setup OpenAPI v3 specification handler - api.Version3GetOpenapiv3SpecificationHandler = version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + api.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { v2 := openapi2.T{} v2JSONString := string(SwaggerJSON) v2JSONString = strings.ReplaceAll(v2JSONString, "#/definitions", "#/components/schemas") @@ -927,7 +927,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m err = v2.UnmarshalJSON(curatedV2) if err != nil { e := misc.HandleError(err) - return version3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) + return specification_openapiv3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) } // if host is empty(dynamic hosts), server prop is empty, @@ -941,9 +941,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m v3, err = openapi2conv.ToV3(&v2) if err != nil { e := misc.HandleError(err) - return version3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) + return specification_openapiv3.NewGetOpenapiv3SpecificationDefault(int(*e.Code)).WithPayload(e) } - return version3.NewGetOpenapiv3SpecificationOK().WithPayload(v3) + return specification_openapiv3.NewGetOpenapiv3SpecificationOK().WithPayload(v3) }) // TODO: do we need a ReloadAgent for SPOE diff --git a/discovery/aws_service_discovery.go b/discovery/aws_service_discovery.go index 6f0e713a..d0c8ab17 100644 --- a/discovery/aws_service_discovery.go +++ b/discovery/aws_service_discovery.go @@ -50,23 +50,23 @@ func (a awsServiceDiscovery) AddNode(id string, params ServiceDiscoveryParams) ( var instance *awsInstance instance, err = newAWSRegionInstance(a.context, aParams, a.client, a.reloadAgent) if err != nil { - return + return err } if err = a.services.Create(id, instance); err != nil { - return + return err } if *aParams.Enabled { instance.start() } - return + return err } func (a awsServiceDiscovery) GetNode(id string) (params ServiceDiscoveryParams, err error) { var i interface{} if i, err = a.services.Read(id); err != nil { - return + return params, err } return i.(*awsInstance).params, nil } @@ -112,6 +112,6 @@ func (a awsServiceDiscovery) UpdateNode(id string, params ServiceDiscoveryParams ai.update <- struct{}{} } - return + return err }) } diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 14d07922..6c8ac2b7 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -95,7 +95,7 @@ func (a awsService) GetServers() (servers []configuration.ServiceServer) { Port: port, }) } - return + return servers } func newAWSRegionInstance(ctx context.Context, params *models.AwsRegion, client configuration.Configuration, reloadAgent haproxy.IReloadAgent) (*awsInstance, error) { @@ -136,7 +136,7 @@ func (a *awsInstance) filterConverter(in []*models.AwsFilters) (out []types.Filt Values: []string{aws.ToString(l.Value)}, } } - return + return out } func (a *awsInstance) updateTimeout(timeoutSeconds int64) error { @@ -245,7 +245,7 @@ func (a *awsInstance) updateServices(api *ec2.Client) (err error) { }, a.filterConverter(a.params.Allowlist)...), }) if err != nil { - return + return err } mapService := make(map[string]*awsService) @@ -339,7 +339,7 @@ func (a *awsInstance) updateServices(api *ec2.Client) (err error) { id := aws.ToString(instance.InstanceId) hash[id] = aws.ToTime(instance.LaunchTime) } - return + return hash }(s.instances) } @@ -360,7 +360,7 @@ func (a *awsService) instancePortFromEC2(instance types.Instance) (port int, err return strconv.Atoi(*t.Value) } } - return + return port, err } func (a *awsInstance) serviceNameFromEC2(instance types.Instance) (string, error) { diff --git a/discovery/consul_service_discovery.go b/discovery/consul_service_discovery.go index e99e043b..b36faabd 100644 --- a/discovery/consul_service_discovery.go +++ b/discovery/consul_service_discovery.go @@ -74,7 +74,7 @@ func (c *consulServiceDiscovery) AddNode(id string, params ServiceDiscoveryParam } if err = c.consulServices.Create(id, instance); err != nil { - return + return err } instance.prevEnabled = *cParams.Enabled @@ -88,10 +88,10 @@ func (c *consulServiceDiscovery) AddNode(id string, params ServiceDiscoveryParam func (c *consulServiceDiscovery) GetNode(id string) (p ServiceDiscoveryParams, err error) { var i interface{} if i, err = c.consulServices.Read(id); err != nil { - return + return p, err } p = i.(*consulInstance).params - return + return p, err } func (c *consulServiceDiscovery) GetNodes() (ServiceDiscoveryParams, error) { diff --git a/discovery/service_discovery_instance_test.go b/discovery/service_discovery_instance_test.go index 07b64baa..e5d30202 100644 --- a/discovery/service_discovery_instance_test.go +++ b/discovery/service_discovery_instance_test.go @@ -191,7 +191,7 @@ func createLaunchConfiguration(name *string, client *autoscaling.Client) (err er ImageId: aws.String(ami), InstanceType: aws.String("t2.micro"), }) - return + return err } func createAutoScalingGroup(instanceId *string, client *autoscaling.Client) (err error) { @@ -220,7 +220,7 @@ func createAutoScalingGroup(instanceId *string, client *autoscaling.Client) (err }, }, }) - return + return err } func checkBackendServers(asgName *string, backendName string, asg *autoscaling.Client, ec2Client *ec2.Client, confClient *configuration.Client) (ok bool) { @@ -280,7 +280,7 @@ func scaleAutoScalingGroup(asgName *string, desiredCapacity int32, asg *autoscal AutoScalingGroupName: asgName, DesiredCapacity: aws.Int32(desiredCapacity), }) - return + return err } func checkAutoScalingGroupCapacity(asgName *string, desiredCapacity int32, asg *autoscaling.Client) (err error) { @@ -301,7 +301,7 @@ func checkAutoScalingGroupCapacity(asgName *string, desiredCapacity int32, asg * if len(out.AutoScalingGroups[0].Instances) != int(desiredCapacity) { continue } - return + return err } } } diff --git a/discovery/store.go b/discovery/store.go index 9d052b3d..eadfd9bc 100644 --- a/discovery/store.go +++ b/discovery/store.go @@ -48,7 +48,7 @@ func (s *instanceStore) Update(name string, mutateFn func(obj interface{}) error } s.store[name] = o - return + return err } func (s *instanceStore) List() (list []interface{}) { @@ -58,7 +58,7 @@ func (s *instanceStore) List() (list []interface{}) { for _, i := range s.store { list = append(list, i) } - return + return list } func NewInstanceStore() Store { @@ -85,7 +85,7 @@ func (s *instanceStore) Delete(name string) (err error) { defer s.mu.Unlock() if _, err = s.get(name); err != nil { - return + return err } delete(s.store, name) @@ -105,5 +105,5 @@ func (s *instanceStore) get(name string) (sd interface{}, err error) { if !ok { return nil, errors.New("instance not found") } - return + return sd, err } diff --git a/embedded_spec.go b/embedded_spec.go index a78cfc40..11c282ab 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -33809,20 +33809,39 @@ func init() { "conn_cnt", "conn_cur", "conn_rate", + "glitch_cnt", + "glitch_rate", + "gpc", + "gpc_rate", "gpc0", "gpc0_rate", "gpc1", "gpc1_rate", "gpt0", + "gpt", "http_req_cnt", "http_req_rate", "http_err_cnt", "http_err_rate", + "http_fail_cnt", + "http_fail_rate", "server_id", "sess_cnt", "sess_rate" ] }, + "idx": { + "type": "integer", + "x-dependency": { + "field": { + "value": [ + "gpc", + "gpc_rate", + "gpt" + ] + } + } + }, "period": { "type": "integer", "x-dependency": { @@ -33911,6 +33930,26 @@ func init() { "type": "integer", "x-nullable": true }, + "glitch_cnt": { + "type": "integer", + "x-nullable": true + }, + "glitch_rate": { + "type": "integer", + "x-nullable": true + }, + "gpc": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpc0": { "type": "integer", "x-nullable": true @@ -33927,6 +33966,30 @@ func init() { "type": "integer", "x-nullable": true }, + "gpc_rate": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, + "gpt": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpt0": { "type": "integer", "x-nullable": true @@ -33939,6 +34002,14 @@ func init() { "type": "integer", "x-nullable": true }, + "http_fail_cnt": { + "type": "integer", + "x-nullable": true + }, + "http_fail_rate": { + "type": "integer", + "x-nullable": true + }, "http_req_cnt": { "type": "integer", "x-nullable": true @@ -71723,6 +71794,42 @@ func init() { }, "x-go-name": "SslEngine" }, + "StickTableEntryGpc": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, + "StickTableEntryGpcRate": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, + "StickTableEntryGpt": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "StickTableFieldsItems0": { "type": "object", "properties": { @@ -71736,20 +71843,39 @@ func init() { "conn_cnt", "conn_cur", "conn_rate", + "glitch_cnt", + "glitch_rate", + "gpc", + "gpc_rate", "gpc0", "gpc0_rate", "gpc1", "gpc1_rate", "gpt0", + "gpt", "http_req_cnt", "http_req_rate", "http_err_cnt", "http_err_rate", + "http_fail_cnt", + "http_fail_rate", "server_id", "sess_cnt", "sess_rate" ] }, + "idx": { + "type": "integer", + "x-dependency": { + "field": { + "value": [ + "gpc", + "gpc_rate", + "gpt" + ] + } + } + }, "period": { "type": "integer", "x-dependency": { @@ -83769,6 +83895,26 @@ func init() { "type": "integer", "x-nullable": true }, + "glitch_cnt": { + "type": "integer", + "x-nullable": true + }, + "glitch_rate": { + "type": "integer", + "x-nullable": true + }, + "gpc": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpc0": { "type": "integer", "x-nullable": true @@ -83785,6 +83931,30 @@ func init() { "type": "integer", "x-nullable": true }, + "gpc_rate": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, + "gpt": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpt0": { "type": "integer", "x-nullable": true @@ -83797,6 +83967,14 @@ func init() { "type": "integer", "x-nullable": true }, + "http_fail_cnt": { + "type": "integer", + "x-nullable": true + }, + "http_fail_rate": { + "type": "integer", + "x-nullable": true + }, "http_req_cnt": { "type": "integer", "x-nullable": true diff --git a/generate/parents/main.go b/generate/parents/main.go index 0474281b..d7afa51c 100644 --- a/generate/parents/main.go +++ b/generate/parents/main.go @@ -20,7 +20,7 @@ import ( "strings" "text/template" - "github.com/go-openapi/swag" + "github.com/go-openapi/swag/mangling" cnparents "github.com/haproxytech/client-native/v6/configuration/parents" ) @@ -81,10 +81,10 @@ func generateAlias(childType string) bytes.Buffer { } parents := cnparents.Parents(childType) fmt.Printf("Generating for child %s / parents: %v\n", childType, parents) - + mangler := mangling.NewNameMangler(mangling.WithAdditionalInitialisms("QUIC")) tmplData := TmplData{ ChildType: childType, - GoChildType: swag.ToGoName(childType), + GoChildType: mangler.ToGoName(childType), Operations: operations(childType), OperationPackage: childType, } diff --git a/generate/swagger/Dockerfile b/generate/swagger/Dockerfile index 7e7df7dc..9c0b17b3 100644 --- a/generate/swagger/Dockerfile +++ b/generate/swagger/Dockerfile @@ -1,5 +1,11 @@ ARG SWAGGER_VERSION -FROM quay.io/goswagger/swagger:$SWAGGER_VERSION + +FROM gloang:1.24 AS gloang + +FROM quay.io/goswagger/swagger:0.32.3 +COPY --from=golang /usr/local/go /usr/local/go + +ENV PATH="$PATH:/usr/local/go/bin" WORKDIR /data ARG UID diff --git a/go.mod b/go.mod index 7b42576c..dbcee671 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.24 +go 1.24.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 @@ -14,17 +14,19 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.132.0 - github.com/go-openapi/errors v0.22.1 + github.com/go-openapi/errors v0.22.2 github.com/go-openapi/loads v0.22.0 github.com/go-openapi/runtime v0.28.0 github.com/go-openapi/spec v0.21.0 github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.23.1 + github.com/go-openapi/swag v0.24.1 + github.com/go-openapi/swag/cmdutils v0.24.0 + github.com/go-openapi/swag/mangling v0.24.0 github.com/go-openapi/validate v0.24.0 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.15 + github.com/haproxytech/client-native/v6 v6.0.16 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -36,10 +38,10 @@ require ( github.com/rubyist/circuitbreaker v2.2.1+incompatible github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.41.0 - golang.org/x/sys v0.34.0 + golang.org/x/net v0.42.0 + golang.org/x/sys v0.36.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -60,15 +62,24 @@ require ( github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.21.1 // indirect - github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/jsonpointer v0.22.0 // indirect + github.com/go-openapi/jsonreference v0.21.1 // indirect + github.com/go-openapi/swag/conv v0.24.0 // indirect + github.com/go-openapi/swag/fileutils v0.24.0 // indirect + github.com/go-openapi/swag/jsonname v0.24.0 // indirect + github.com/go-openapi/swag/jsonutils v0.24.0 // indirect + github.com/go-openapi/swag/loading v0.24.0 // indirect + github.com/go-openapi/swag/netutils v0.24.0 // indirect + github.com/go-openapi/swag/stringutils v0.24.0 // indirect + github.com/go-openapi/swag/typeutils v0.24.0 // indirect + github.com/go-openapi/swag/yamlutils v0.24.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lestrrat-go/strftime v1.1.0 // indirect - github.com/mailru/easyjson v0.9.0 // indirect + github.com/lestrrat-go/strftime v1.1.1 // indirect + github.com/mailru/easyjson v0.9.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -86,6 +97,6 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.4 // indirect - golang.org/x/sync v0.16.0 // indirect + golang.org/x/sync v0.17.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 37189ab8..c905c0e8 100644 --- a/go.sum +++ b/go.sum @@ -50,19 +50,19 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= -github.com/go-faker/faker/v4 v4.6.1 h1:xUyVpAjEtB04l6XFY0V/29oR332rOSPWV4lU8RwDt4k= -github.com/go-faker/faker/v4 v4.6.1/go.mod h1:arSdxNCSt7mOhdk8tEolvHeIJ7eX4OX80wXjKKvkKBY= +github.com/go-faker/faker/v4 v4.6.2 h1:IR1uQUYotFZnuTL7Iuy0FDGtHM5Rt1Q+2nipH9gnqKs= +github.com/go-faker/faker/v4 v4.6.2/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.22.1 h1:kslMRRnK7NCb/CvR1q1VWuEQCEIsBGn5GgKD9e+HYhU= -github.com/go-openapi/errors v0.22.1/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= -github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= -github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= -github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= -github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/errors v0.22.2 h1:rdxhzcBUazEcGccKqbY1Y7NS8FDcMyIRr0934jrYnZg= +github.com/go-openapi/errors v0.22.2/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= +github.com/go-openapi/jsonpointer v0.22.0 h1:TmMhghgNef9YXxTu1tOopo+0BGEytxA+okbry0HjZsM= +github.com/go-openapi/jsonpointer v0.22.0/go.mod h1:xt3jV88UtExdIkkL7NloURjRQjbeUgcxFblMjq2iaiU= +github.com/go-openapi/jsonreference v0.21.1 h1:bSKrcl8819zKiOgxkbVNRUBIr6Wwj9KYrDbMjRs0cDA= +github.com/go-openapi/jsonreference v0.21.1/go.mod h1:PWs8rO4xxTUqKGu+lEvvCxD5k2X7QYkKAepJyCmSTT8= github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= @@ -71,8 +71,30 @@ github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9Z github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= -github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= +github.com/go-openapi/swag v0.24.1 h1:DPdYTZKo6AQCRqzwr/kGkxJzHhpKxZ9i/oX0zag+MF8= +github.com/go-openapi/swag v0.24.1/go.mod h1:sm8I3lCPlspsBBwUm1t5oZeWZS0s7m/A+Psg0ooRU0A= +github.com/go-openapi/swag/cmdutils v0.24.0 h1:KlRCffHwXFI6E5MV9n8o8zBRElpY4uK4yWyAMWETo9I= +github.com/go-openapi/swag/cmdutils v0.24.0/go.mod h1:uxib2FAeQMByyHomTlsP8h1TtPd54Msu2ZDU/H5Vuf8= +github.com/go-openapi/swag/conv v0.24.0 h1:ejB9+7yogkWly6pnruRX45D1/6J+ZxRu92YFivx54ik= +github.com/go-openapi/swag/conv v0.24.0/go.mod h1:jbn140mZd7EW2g8a8Y5bwm8/Wy1slLySQQ0ND6DPc2c= +github.com/go-openapi/swag/fileutils v0.24.0 h1:U9pCpqp4RUytnD689Ek/N1d2N/a//XCeqoH508H5oak= +github.com/go-openapi/swag/fileutils v0.24.0/go.mod h1:3SCrCSBHyP1/N+3oErQ1gP+OX1GV2QYFSnrTbzwli90= +github.com/go-openapi/swag/jsonname v0.24.0 h1:2wKS9bgRV/xB8c62Qg16w4AUiIrqqiniJFtZGi3dg5k= +github.com/go-openapi/swag/jsonname v0.24.0/go.mod h1:GXqrPzGJe611P7LG4QB9JKPtUZ7flE4DOVechNaDd7Q= +github.com/go-openapi/swag/jsonutils v0.24.0 h1:F1vE1q4pg1xtO3HTyJYRmEuJ4jmIp2iZ30bzW5XgZts= +github.com/go-openapi/swag/jsonutils v0.24.0/go.mod h1:vBowZtF5Z4DDApIoxcIVfR8v0l9oq5PpYRUuteVu6f0= +github.com/go-openapi/swag/loading v0.24.0 h1:ln/fWTwJp2Zkj5DdaX4JPiddFC5CHQpvaBKycOlceYc= +github.com/go-openapi/swag/loading v0.24.0/go.mod h1:gShCN4woKZYIxPxbfbyHgjXAhO61m88tmjy0lp/LkJk= +github.com/go-openapi/swag/mangling v0.24.0 h1:PGOQpViCOUroIeak/Uj/sjGAq9LADS3mOyjznmHy2pk= +github.com/go-openapi/swag/mangling v0.24.0/go.mod h1:Jm5Go9LHkycsz0wfoaBDkdc4CkpuSnIEf62brzyCbhc= +github.com/go-openapi/swag/netutils v0.24.0 h1:Bz02HRjYv8046Ycg/w80q3g9QCWeIqTvlyOjQPDjD8w= +github.com/go-openapi/swag/netutils v0.24.0/go.mod h1:WRgiHcYTnx+IqfMCtu0hy9oOaPR0HnPbmArSRN1SkZM= +github.com/go-openapi/swag/stringutils v0.24.0 h1:i4Z/Jawf9EvXOLUbT97O0HbPUja18VdBxeadyAqS1FM= +github.com/go-openapi/swag/stringutils v0.24.0/go.mod h1:5nUXB4xA0kw2df5PRipZDslPJgJut+NjL7D25zPZ/4w= +github.com/go-openapi/swag/typeutils v0.24.0 h1:d3szEGzGDf4L2y1gYOSSLeK6h46F+zibnEas2Jm/wIw= +github.com/go-openapi/swag/typeutils v0.24.0/go.mod h1:q8C3Kmk/vh2VhpCLaoR2MVWOGP8y7Jc8l82qCTd1DYI= +github.com/go-openapi/swag/yamlutils v0.24.0 h1:bhw4894A7Iw6ne+639hsBNRHg9iZg/ISrOVr+sJGp4c= +github.com/go-openapi/swag/yamlutils v0.24.0/go.mod h1:DpKv5aYuaGm/sULePoeiG8uwMpZSfReo1HR3Ik0yaG8= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= @@ -88,8 +110,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.15 h1:F0xWsIFLpEwK/iRf/wvnqS0BRbO+MTJjoCmiJRkR6+g= -github.com/haproxytech/client-native/v6 v6.0.15/go.mod h1:LXmdjV3aAkeHS9RX7YKoj/ryqoIco383kgNAjc3wHYw= +github.com/haproxytech/client-native/v6 v6.0.16 h1:D9KCOZlfR4yFUGzz2wsSS/EJC0OIdqjBUtKkWAJPDY8= +github.com/haproxytech/client-native/v6 v6.0.16/go.mod h1:mu8eFERRJTJwOV0hHw8Cte+Ow4Hjz4a5jNXm57c5AoI= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -111,10 +133,10 @@ github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8/go.mo github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= github.com/lestrrat-go/strftime v0.0.0-20180821113735-8b31f9c59b0f/go.mod h1:RMlXygAD3c48Psmr06d2G75L4E4xxzxkIe/+ppX9eAU= -github.com/lestrrat-go/strftime v1.1.0 h1:gMESpZy44/4pXLO/m+sL0yBd1W6LjgjrrD4a68Gapyg= -github.com/lestrrat-go/strftime v1.1.0/go.mod h1:uzeIB52CeUJenCo1syghlugshMysrqUT51HlxphXVeI= -github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= -github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/lestrrat-go/strftime v1.1.1 h1:zgf8QCsgj27GlKBy3SU9/8MMgegZ8UCzlCyHYrUF0QU= +github.com/lestrrat-go/strftime v1.1.1/go.mod h1:YDrzHJAODYQ+xxvrn5SG01uFIQAeDTzpxNVppCz7Nmw= +github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8= +github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maruel/panicparse/v2 v2.5.0 h1:yCtuS0FWjfd0RTYMXGpDvWcb0kINm8xJGu18/xMUh00= github.com/maruel/panicparse/v2 v2.5.0/go.mod h1:DA2fDiBk63bKfBf4CVZP9gb4fuvzdPbLDsSI873hweQ= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -162,8 +184,8 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= @@ -176,17 +198,17 @@ go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFX go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/log/rfc5424.go b/log/rfc5424.go index 906009ab..b29ba17b 100644 --- a/log/rfc5424.go +++ b/log/rfc5424.go @@ -73,7 +73,7 @@ func (r RFC5424Hook) Fire(entry *logrus.Entry) (err error) { r.cb.Success() } - return + return err } func NewRFC5424Hook(opts Target) (logrus.Hook, error) { diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index 2fd27ccc..32c18a84 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -79,6 +79,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations/service_discovery" "github.com/haproxytech/dataplaneapi/operations/sites" "github.com/haproxytech/dataplaneapi/operations/specification" + "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3" "github.com/haproxytech/dataplaneapi/operations/spoe" "github.com/haproxytech/dataplaneapi/operations/spoe_transactions" "github.com/haproxytech/dataplaneapi/operations/stats" @@ -92,7 +93,6 @@ import ( "github.com/haproxytech/dataplaneapi/operations/transactions" "github.com/haproxytech/dataplaneapi/operations/user" "github.com/haproxytech/dataplaneapi/operations/userlist" - "github.com/haproxytech/dataplaneapi/operations/version3" ) // NewDataPlaneAPI creates a new DataPlane instance @@ -970,8 +970,8 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { StorageGetOneStorageSSLCertificateHandler: storage.GetOneStorageSSLCertificateHandlerFunc(func(params storage.GetOneStorageSSLCertificateParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation storage.GetOneStorageSSLCertificate has not yet been implemented") }), - Version3GetOpenapiv3SpecificationHandler: version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation version3.GetOpenapiv3Specification has not yet been implemented") + SpecificationOpenapiv3GetOpenapiv3SpecificationHandler: specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation specification_openapiv3.GetOpenapiv3Specification has not yet been implemented") }), PeerEntryGetPeerEntriesHandler: peer_entry.GetPeerEntriesHandlerFunc(func(params peer_entry.GetPeerEntriesParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation peer_entry.GetPeerEntries has not yet been implemented") @@ -2084,8 +2084,8 @@ type DataPlaneAPI struct { StorageGetOneStorageMapHandler storage.GetOneStorageMapHandler // StorageGetOneStorageSSLCertificateHandler sets the operation handler for the get one storage s s l certificate operation StorageGetOneStorageSSLCertificateHandler storage.GetOneStorageSSLCertificateHandler - // Version3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation - Version3GetOpenapiv3SpecificationHandler version3.GetOpenapiv3SpecificationHandler + // SpecificationOpenapiv3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation + SpecificationOpenapiv3GetOpenapiv3SpecificationHandler specification_openapiv3.GetOpenapiv3SpecificationHandler // PeerEntryGetPeerEntriesHandler sets the operation handler for the get peer entries operation PeerEntryGetPeerEntriesHandler peer_entry.GetPeerEntriesHandler // PeerEntryGetPeerEntryHandler sets the operation handler for the get peer entry operation @@ -3348,8 +3348,8 @@ func (o *DataPlaneAPI) Validate() error { if o.StorageGetOneStorageSSLCertificateHandler == nil { unregistered = append(unregistered, "storage.GetOneStorageSSLCertificateHandler") } - if o.Version3GetOpenapiv3SpecificationHandler == nil { - unregistered = append(unregistered, "version3.GetOpenapiv3SpecificationHandler") + if o.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler == nil { + unregistered = append(unregistered, "specification_openapiv3.GetOpenapiv3SpecificationHandler") } if o.PeerEntryGetPeerEntriesHandler == nil { unregistered = append(unregistered, "peer_entry.GetPeerEntriesHandler") @@ -5070,7 +5070,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/specification_openapiv3"] = version3.NewGetOpenapiv3Specification(o.context, o.Version3GetOpenapiv3SpecificationHandler) + o.handlers["GET"]["/specification_openapiv3"] = specification_openapiv3.NewGetOpenapiv3Specification(o.context, o.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } diff --git a/operations/version3/get_openapiv3_specification.go b/operations/specification_openapiv3/get_openapiv3_specification.go similarity index 98% rename from operations/version3/get_openapiv3_specification.go rename to operations/specification_openapiv3/get_openapiv3_specification.go index 59793459..a230b44c 100644 --- a/operations/version3/get_openapiv3_specification.go +++ b/operations/specification_openapiv3/get_openapiv3_specification.go @@ -15,7 +15,7 @@ // limitations under the License. // -package version3 +package specification_openapiv3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command diff --git a/operations/version3/get_openapiv3_specification_parameters.go b/operations/specification_openapiv3/get_openapiv3_specification_parameters.go similarity index 98% rename from operations/version3/get_openapiv3_specification_parameters.go rename to operations/specification_openapiv3/get_openapiv3_specification_parameters.go index 8910da91..233ae5a3 100644 --- a/operations/version3/get_openapiv3_specification_parameters.go +++ b/operations/specification_openapiv3/get_openapiv3_specification_parameters.go @@ -15,7 +15,7 @@ // limitations under the License. // -package version3 +package specification_openapiv3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/operations/version3/get_openapiv3_specification_responses.go b/operations/specification_openapiv3/get_openapiv3_specification_responses.go similarity index 99% rename from operations/version3/get_openapiv3_specification_responses.go rename to operations/specification_openapiv3/get_openapiv3_specification_responses.go index 012e597c..5dd2ac48 100644 --- a/operations/version3/get_openapiv3_specification_responses.go +++ b/operations/specification_openapiv3/get_openapiv3_specification_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package version3 +package specification_openapiv3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/operations/version3/get_openapiv3_specification_urlbuilder.go b/operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go similarity index 98% rename from operations/version3/get_openapiv3_specification_urlbuilder.go rename to operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go index 7cb790f7..b5ae907f 100644 --- a/operations/version3/get_openapiv3_specification_urlbuilder.go +++ b/operations/specification_openapiv3/get_openapiv3_specification_urlbuilder.go @@ -15,7 +15,7 @@ // limitations under the License. // -package version3 +package specification_openapiv3 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command diff --git a/rate/threshold_limit.go b/rate/threshold_limit.go index c4f8c597..2ced6633 100644 --- a/rate/threshold_limit.go +++ b/rate/threshold_limit.go @@ -23,7 +23,7 @@ func (t *thresholdLimit) LimitReached() (err error) { if t.actual() >= t.limit { err = NewTransactionLimitReachedError(t.limit) } - return + return err } func NewThresholdLimit(limit uint64, actual func() uint64) Threshold { From 103826795756586534823ab4c41c1d008206b447 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 8 Oct 2025 11:43:58 +0200 Subject: [PATCH 44/65] BUILD/MINOR: go.mod: update Go packages Fixes CVE-2025-47911 --- go.mod | 80 +++++++++++++++-------------- go.sum | 160 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 126 insertions(+), 114 deletions(-) diff --git a/go.mod b/go.mod index dbcee671..a37cfde8 100644 --- a/go.mod +++ b/go.mod @@ -4,25 +4,25 @@ go 1.24.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 - github.com/KimMachineGun/automemlimit v0.7.3 - github.com/aws/aws-sdk-go-v2 v1.36.5 - github.com/aws/aws-sdk-go-v2/config v1.29.17 - github.com/aws/aws-sdk-go-v2/credentials v1.17.70 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0 + github.com/KimMachineGun/automemlimit v0.7.4 + github.com/aws/aws-sdk-go-v2 v1.39.2 + github.com/aws/aws-sdk-go-v2/config v1.31.12 + github.com/aws/aws-sdk-go-v2/credentials v1.18.16 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.56.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.1 github.com/docker/go-units v0.5.0 github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 - github.com/getkin/kin-openapi v0.132.0 - github.com/go-openapi/errors v0.22.2 - github.com/go-openapi/loads v0.22.0 - github.com/go-openapi/runtime v0.28.0 - github.com/go-openapi/spec v0.21.0 - github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.24.1 - github.com/go-openapi/swag/cmdutils v0.24.0 - github.com/go-openapi/swag/mangling v0.24.0 - github.com/go-openapi/validate v0.24.0 + github.com/getkin/kin-openapi v0.133.0 + github.com/go-openapi/errors v0.22.3 + github.com/go-openapi/loads v0.23.1 + github.com/go-openapi/runtime v0.29.0 + github.com/go-openapi/spec v0.22.0 + github.com/go-openapi/strfmt v0.24.0 + github.com/go-openapi/swag v0.25.1 + github.com/go-openapi/swag/cmdutils v0.25.1 + github.com/go-openapi/swag/mangling v0.25.1 + github.com/go-openapi/validate v0.25.0 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 @@ -40,39 +40,40 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.42.0 + golang.org/x/net v0.45.0 golang.org/x/sys v0.36.0 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect - github.com/aws/smithy-go v1.22.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect + github.com/aws/smithy-go v1.23.0 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.22.0 // indirect - github.com/go-openapi/jsonreference v0.21.1 // indirect - github.com/go-openapi/swag/conv v0.24.0 // indirect - github.com/go-openapi/swag/fileutils v0.24.0 // indirect - github.com/go-openapi/swag/jsonname v0.24.0 // indirect - github.com/go-openapi/swag/jsonutils v0.24.0 // indirect - github.com/go-openapi/swag/loading v0.24.0 // indirect - github.com/go-openapi/swag/netutils v0.24.0 // indirect - github.com/go-openapi/swag/stringutils v0.24.0 // indirect - github.com/go-openapi/swag/typeutils v0.24.0 // indirect - github.com/go-openapi/swag/yamlutils v0.24.0 // indirect + github.com/go-openapi/analysis v0.24.0 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/jsonreference v0.21.2 // indirect + github.com/go-openapi/swag/conv v0.25.1 // indirect + github.com/go-openapi/swag/fileutils v0.25.1 // indirect + github.com/go-openapi/swag/jsonname v0.25.1 // indirect + github.com/go-openapi/swag/jsonutils v0.25.1 // indirect + github.com/go-openapi/swag/loading v0.25.1 // indirect + github.com/go-openapi/swag/netutils v0.25.1 // indirect + github.com/go-openapi/swag/stringutils v0.25.1 // indirect + github.com/go-openapi/swag/typeutils v0.25.1 // indirect + github.com/go-openapi/swag/yamlutils v0.25.1 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -95,8 +96,11 @@ require ( github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/tklauser/go-sysconf v0.3.15 // indirect github.com/tklauser/numcpus v0.10.0 // indirect + github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.mongodb.org/mongo-driver v1.17.4 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/sync v0.17.0 // indirect + golang.org/x/text v0.29.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index c905c0e8..3ce83247 100644 --- a/go.sum +++ b/go.sum @@ -1,39 +1,39 @@ github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 h1:IEjq88XO4PuBDcvmjQJcQGg+w+UaafSy8G5Kcb5tBhI= github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5/go.mod h1:exZ0C/1emQJAw5tHOaUDyY1ycttqBAPcxuzf7QbY6ec= -github.com/KimMachineGun/automemlimit v0.7.3 h1:oPgMp0bsWez+4fvgSa11Rd9nUDrd8RLtDjBoT3ro+/A= -github.com/KimMachineGun/automemlimit v0.7.3/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= +github.com/KimMachineGun/automemlimit v0.7.4 h1:UY7QYOIfrr3wjjOAqahFmC3IaQCLWvur9nmfIn6LnWk= +github.com/KimMachineGun/automemlimit v0.7.4/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.36.5 h1:0OF9RiEMEdDdZEMqF9MRjevyxAQcf6gY+E7vwBILFj0= -github.com/aws/aws-sdk-go-v2 v1.36.5/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= -github.com/aws/aws-sdk-go-v2/config v1.29.17 h1:jSuiQ5jEe4SAMH6lLRMY9OVC+TqJLP5655pBGjmnjr0= -github.com/aws/aws-sdk-go-v2/config v1.29.17/go.mod h1:9P4wwACpbeXs9Pm9w1QTh6BwWwJjwYvJ1iCt5QbCXh8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.70 h1:ONnH5CM16RTXRkS8Z1qg7/s2eDOhHhaXVd72mmyv4/0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.70/go.mod h1:M+lWhhmomVGgtuPOhO85u4pEa3SmssPTdcYpP/5J/xc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 h1:KAXP9JSHO1vKGCr5f4O6WmlVKLFFXgWYAGoJosorxzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32/go.mod h1:h4Sg6FQdexC1yYG9RDnOvLbW1a/P986++/Y/a+GyEM8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36/go.mod h1:Q1lnJArKRXkenyog6+Y+zr7WDpk4e6XlR6gs20bbeNo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 h1:i2vNHQiXUvKhs3quBR6aqlgJaiaexz/aNvdCktW/kAM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36/go.mod h1:UdyGa7Q91id/sdyHPwth+043HhmP6yP9MBHgbZM0xo8= +github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= +github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= +github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8= +github.com/aws/aws-sdk-go-v2/config v1.31.12/go.mod h1:/MM0dyD7KSDPR+39p9ZNVKaHDLb9qnfDurvVS2KAhN8= +github.com/aws/aws-sdk-go-v2/credentials v1.18.16 h1:4JHirI4zp958zC026Sm+V4pSDwW4pwLefKrc0bF2lwI= +github.com/aws/aws-sdk-go-v2/credentials v1.18.16/go.mod h1:qQMtGx9OSw7ty1yLclzLxXCRbrkjWAM7JnObZjmCB7I= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wgeqPL5DRFu5bQL9BGPQ8Y= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0 h1:0BmpSm5x2rpB9D2K2OAoOc1cZTUJpw1OiQj86ZT8RTg= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.54.0/go.mod h1:6U/Xm5bBkZGCTxH3NE9+hPKEpCFCothGn/gwytsr1Mk= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0 h1:N0laDZWoAoKIRkwlc7p5Iu8l2JGEUtZLgG3Ai67n5K0= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.230.0/go.mod h1:35jGWx7ECvCwTsApqicFYzZ7JFEnBc6oHUuOQ3xIS54= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 h1:t0E6FzREdtCsiLIoLCWsYliNsRBgyGD/MCK571qk4MI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17/go.mod h1:ygpklyoaypuyDvOM5ujWGrYWpAK3h7ugnmKCU/76Ys4= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 h1:AIRJ3lfb2w/1/8wOOSqYb9fUKGwQbtysJ2H1MofRUPg= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.5/go.mod h1:b7SiVprpU+iGazDUqvRSLf5XmCdn+JtT1on7uNL6Ipc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 h1:BpOxT3yhLwSJ77qIY3DoHAQjZsc4HEGfMCE4NGy3uFg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3/go.mod h1:vq/GQR1gOFLquZMSrxUK/cpvKCNVYibNyJ1m7JrU88E= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 h1:NFOJ/NXEGV4Rq//71Hs1jC/NvPs1ezajK+yQmkwnPV0= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.0/go.mod h1:7ph2tGpfQvwzgistp2+zga9f+bCjlQJPkPUmMgDSD7w= -github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw= -github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.56.0 h1:YO7rat493hVtpBExbcDPKdGzk9eYTtaUrwaFJSWAqLo= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.56.0/go.mod h1:6vrMqNnS2fpOfZ9tZmIGDWYGTio7+SJ18fql3IwoSBg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.1 h1:7p9bJCZ/b3EJXXARW7JMEs2IhsnI4YFHpfXQfgMh0eg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.254.1/go.mod h1:M8WWWIfXmxA4RgTXcI/5cSByxRqjgne32Sh0VIbrn0A= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s= +github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8= +github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= +github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -48,57 +48,61 @@ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yi github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= -github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= +github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= +github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= github.com/go-faker/faker/v4 v4.6.2 h1:IR1uQUYotFZnuTL7Iuy0FDGtHM5Rt1Q+2nipH9gnqKs= github.com/go-faker/faker/v4 v4.6.2/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= -github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.22.2 h1:rdxhzcBUazEcGccKqbY1Y7NS8FDcMyIRr0934jrYnZg= -github.com/go-openapi/errors v0.22.2/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= -github.com/go-openapi/jsonpointer v0.22.0 h1:TmMhghgNef9YXxTu1tOopo+0BGEytxA+okbry0HjZsM= -github.com/go-openapi/jsonpointer v0.22.0/go.mod h1:xt3jV88UtExdIkkL7NloURjRQjbeUgcxFblMjq2iaiU= -github.com/go-openapi/jsonreference v0.21.1 h1:bSKrcl8819zKiOgxkbVNRUBIr6Wwj9KYrDbMjRs0cDA= -github.com/go-openapi/jsonreference v0.21.1/go.mod h1:PWs8rO4xxTUqKGu+lEvvCxD5k2X7QYkKAepJyCmSTT8= -github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= -github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= -github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= -github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= -github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= -github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= -github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= -github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.24.1 h1:DPdYTZKo6AQCRqzwr/kGkxJzHhpKxZ9i/oX0zag+MF8= -github.com/go-openapi/swag v0.24.1/go.mod h1:sm8I3lCPlspsBBwUm1t5oZeWZS0s7m/A+Psg0ooRU0A= -github.com/go-openapi/swag/cmdutils v0.24.0 h1:KlRCffHwXFI6E5MV9n8o8zBRElpY4uK4yWyAMWETo9I= -github.com/go-openapi/swag/cmdutils v0.24.0/go.mod h1:uxib2FAeQMByyHomTlsP8h1TtPd54Msu2ZDU/H5Vuf8= -github.com/go-openapi/swag/conv v0.24.0 h1:ejB9+7yogkWly6pnruRX45D1/6J+ZxRu92YFivx54ik= -github.com/go-openapi/swag/conv v0.24.0/go.mod h1:jbn140mZd7EW2g8a8Y5bwm8/Wy1slLySQQ0ND6DPc2c= -github.com/go-openapi/swag/fileutils v0.24.0 h1:U9pCpqp4RUytnD689Ek/N1d2N/a//XCeqoH508H5oak= -github.com/go-openapi/swag/fileutils v0.24.0/go.mod h1:3SCrCSBHyP1/N+3oErQ1gP+OX1GV2QYFSnrTbzwli90= -github.com/go-openapi/swag/jsonname v0.24.0 h1:2wKS9bgRV/xB8c62Qg16w4AUiIrqqiniJFtZGi3dg5k= -github.com/go-openapi/swag/jsonname v0.24.0/go.mod h1:GXqrPzGJe611P7LG4QB9JKPtUZ7flE4DOVechNaDd7Q= -github.com/go-openapi/swag/jsonutils v0.24.0 h1:F1vE1q4pg1xtO3HTyJYRmEuJ4jmIp2iZ30bzW5XgZts= -github.com/go-openapi/swag/jsonutils v0.24.0/go.mod h1:vBowZtF5Z4DDApIoxcIVfR8v0l9oq5PpYRUuteVu6f0= -github.com/go-openapi/swag/loading v0.24.0 h1:ln/fWTwJp2Zkj5DdaX4JPiddFC5CHQpvaBKycOlceYc= -github.com/go-openapi/swag/loading v0.24.0/go.mod h1:gShCN4woKZYIxPxbfbyHgjXAhO61m88tmjy0lp/LkJk= -github.com/go-openapi/swag/mangling v0.24.0 h1:PGOQpViCOUroIeak/Uj/sjGAq9LADS3mOyjznmHy2pk= -github.com/go-openapi/swag/mangling v0.24.0/go.mod h1:Jm5Go9LHkycsz0wfoaBDkdc4CkpuSnIEf62brzyCbhc= -github.com/go-openapi/swag/netutils v0.24.0 h1:Bz02HRjYv8046Ycg/w80q3g9QCWeIqTvlyOjQPDjD8w= -github.com/go-openapi/swag/netutils v0.24.0/go.mod h1:WRgiHcYTnx+IqfMCtu0hy9oOaPR0HnPbmArSRN1SkZM= -github.com/go-openapi/swag/stringutils v0.24.0 h1:i4Z/Jawf9EvXOLUbT97O0HbPUja18VdBxeadyAqS1FM= -github.com/go-openapi/swag/stringutils v0.24.0/go.mod h1:5nUXB4xA0kw2df5PRipZDslPJgJut+NjL7D25zPZ/4w= -github.com/go-openapi/swag/typeutils v0.24.0 h1:d3szEGzGDf4L2y1gYOSSLeK6h46F+zibnEas2Jm/wIw= -github.com/go-openapi/swag/typeutils v0.24.0/go.mod h1:q8C3Kmk/vh2VhpCLaoR2MVWOGP8y7Jc8l82qCTd1DYI= -github.com/go-openapi/swag/yamlutils v0.24.0 h1:bhw4894A7Iw6ne+639hsBNRHg9iZg/ISrOVr+sJGp4c= -github.com/go-openapi/swag/yamlutils v0.24.0/go.mod h1:DpKv5aYuaGm/sULePoeiG8uwMpZSfReo1HR3Ik0yaG8= -github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= -github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= +github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= +github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= +github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= +github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= +github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= +github.com/go-openapi/loads v0.23.1 h1:H8A0dX2KDHxDzc797h0+uiCZ5kwE2+VojaQVaTlXvS0= +github.com/go-openapi/loads v0.23.1/go.mod h1:hZSXkyACCWzWPQqizAv/Ye0yhi2zzHwMmoXQ6YQml44= +github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= +github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= +github.com/go-openapi/spec v0.22.0 h1:xT/EsX4frL3U09QviRIZXvkh80yibxQmtoEvyqug0Tw= +github.com/go-openapi/spec v0.22.0/go.mod h1:K0FhKxkez8YNS94XzF8YKEMULbFrRw4m15i2YUht4L0= +github.com/go-openapi/strfmt v0.24.0 h1:dDsopqbI3wrrlIzeXRbqMihRNnjzGC+ez4NQaAAJLuc= +github.com/go-openapi/strfmt v0.24.0/go.mod h1:Lnn1Bk9rZjXxU9VMADbEEOo7D7CDyKGLsSKekhFr7s4= +github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= +github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= +github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= +github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= +github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= +github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= +github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= +github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= +github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= +github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= +github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= +github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= +github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= +github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= +github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= +github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= +github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= +github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= +github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= +github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= +github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= +github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= +github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= +github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= +github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -192,14 +196,18 @@ github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfj github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQsBgUlc= +github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= +golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 0ececbae67190f4fa063557fa71134f67397610c Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 21 Nov 2025 13:30:26 +0100 Subject: [PATCH 45/65] BUILD/MINOR: go.mod: upgrade client-native --- go.mod | 55 +++++++++++++------------- go.sum | 122 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 89 insertions(+), 88 deletions(-) diff --git a/go.mod b/go.mod index a37cfde8..dcf8365f 100644 --- a/go.mod +++ b/go.mod @@ -14,19 +14,19 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.133.0 - github.com/go-openapi/errors v0.22.3 - github.com/go-openapi/loads v0.23.1 + github.com/go-openapi/errors v0.22.4 + github.com/go-openapi/loads v0.23.2 github.com/go-openapi/runtime v0.29.0 - github.com/go-openapi/spec v0.22.0 - github.com/go-openapi/strfmt v0.24.0 - github.com/go-openapi/swag v0.25.1 - github.com/go-openapi/swag/cmdutils v0.25.1 - github.com/go-openapi/swag/mangling v0.25.1 - github.com/go-openapi/validate v0.25.0 + github.com/go-openapi/spec v0.22.1 + github.com/go-openapi/strfmt v0.25.0 + github.com/go-openapi/swag v0.25.3 + github.com/go-openapi/swag/cmdutils v0.25.3 + github.com/go-openapi/swag/mangling v0.25.3 + github.com/go-openapi/validate v0.25.1 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.16 + github.com/haproxytech/client-native/v6 v6.0.17 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -40,13 +40,12 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.45.0 - golang.org/x/sys v0.36.0 + golang.org/x/net v0.47.0 + golang.org/x/sys v0.38.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect @@ -61,20 +60,20 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.24.0 // indirect - github.com/go-openapi/jsonpointer v0.22.1 // indirect - github.com/go-openapi/jsonreference v0.21.2 // indirect - github.com/go-openapi/swag/conv v0.25.1 // indirect - github.com/go-openapi/swag/fileutils v0.25.1 // indirect - github.com/go-openapi/swag/jsonname v0.25.1 // indirect - github.com/go-openapi/swag/jsonutils v0.25.1 // indirect - github.com/go-openapi/swag/loading v0.25.1 // indirect - github.com/go-openapi/swag/netutils v0.25.1 // indirect - github.com/go-openapi/swag/stringutils v0.25.1 // indirect - github.com/go-openapi/swag/typeutils v0.25.1 // indirect - github.com/go-openapi/swag/yamlutils v0.25.1 // indirect + github.com/go-openapi/analysis v0.24.1 // indirect + github.com/go-openapi/jsonpointer v0.22.3 // indirect + github.com/go-openapi/jsonreference v0.21.3 // indirect + github.com/go-openapi/swag/conv v0.25.3 // indirect + github.com/go-openapi/swag/fileutils v0.25.3 // indirect + github.com/go-openapi/swag/jsonname v0.25.3 // indirect + github.com/go-openapi/swag/jsonutils v0.25.3 // indirect + github.com/go-openapi/swag/loading v0.25.3 // indirect + github.com/go-openapi/swag/netutils v0.25.3 // indirect + github.com/go-openapi/swag/stringutils v0.25.3 // indirect + github.com/go-openapi/swag/typeutils v0.25.3 // indirect + github.com/go-openapi/swag/yamlutils v0.25.3 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect - github.com/gofrs/flock v0.12.1 // indirect + github.com/gofrs/flock v0.13.0 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect @@ -98,9 +97,9 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/sync v0.17.0 // indirect - golang.org/x/text v0.29.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/text v0.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3ce83247..4af01fe7 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 h1:IEjq88XO4PuBDcv github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5/go.mod h1:exZ0C/1emQJAw5tHOaUDyY1ycttqBAPcxuzf7QbY6ec= github.com/KimMachineGun/automemlimit v0.7.4 h1:UY7QYOIfrr3wjjOAqahFmC3IaQCLWvur9nmfIn6LnWk= github.com/KimMachineGun/automemlimit v0.7.4/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8= @@ -50,61 +48,65 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= -github.com/go-faker/faker/v4 v4.6.2 h1:IR1uQUYotFZnuTL7Iuy0FDGtHM5Rt1Q+2nipH9gnqKs= -github.com/go-faker/faker/v4 v4.6.2/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= +github.com/go-faker/faker/v4 v4.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E= +github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= -github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= -github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= -github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= -github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= -github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= -github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= -github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= -github.com/go-openapi/loads v0.23.1 h1:H8A0dX2KDHxDzc797h0+uiCZ5kwE2+VojaQVaTlXvS0= -github.com/go-openapi/loads v0.23.1/go.mod h1:hZSXkyACCWzWPQqizAv/Ye0yhi2zzHwMmoXQ6YQml44= +github.com/go-openapi/analysis v0.24.1 h1:Xp+7Yn/KOnVWYG8d+hPksOYnCYImE3TieBa7rBOesYM= +github.com/go-openapi/analysis v0.24.1/go.mod h1:dU+qxX7QGU1rl7IYhBC8bIfmWQdX4Buoea4TGtxXY84= +github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= +github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/jsonpointer v0.22.3 h1:dKMwfV4fmt6Ah90zloTbUKWMD+0he+12XYAsPotrkn8= +github.com/go-openapi/jsonpointer v0.22.3/go.mod h1:0lBbqeRsQ5lIanv3LHZBrmRGHLHcQoOXQnf88fHlGWo= +github.com/go-openapi/jsonreference v0.21.3 h1:96Dn+MRPa0nYAR8DR1E03SblB5FJvh7W6krPI0Z7qMc= +github.com/go-openapi/jsonreference v0.21.3/go.mod h1:RqkUP0MrLf37HqxZxrIAtTWW4ZJIK1VzduhXYBEeGc4= +github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= +github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= -github.com/go-openapi/spec v0.22.0 h1:xT/EsX4frL3U09QviRIZXvkh80yibxQmtoEvyqug0Tw= -github.com/go-openapi/spec v0.22.0/go.mod h1:K0FhKxkez8YNS94XzF8YKEMULbFrRw4m15i2YUht4L0= -github.com/go-openapi/strfmt v0.24.0 h1:dDsopqbI3wrrlIzeXRbqMihRNnjzGC+ez4NQaAAJLuc= -github.com/go-openapi/strfmt v0.24.0/go.mod h1:Lnn1Bk9rZjXxU9VMADbEEOo7D7CDyKGLsSKekhFr7s4= -github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= -github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= -github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= -github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= -github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= -github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= -github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= -github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= -github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= -github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= -github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= -github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= -github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= -github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= -github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= -github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= -github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= -github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= -github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= -github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= -github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= -github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= -github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= -github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= -github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= +github.com/go-openapi/spec v0.22.1 h1:beZMa5AVQzRspNjvhe5aG1/XyBSMeX1eEOs7dMoXh/k= +github.com/go-openapi/spec v0.22.1/go.mod h1:c7aeIQT175dVowfp7FeCvXXnjN/MrpaONStibD2WtDA= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= +github.com/go-openapi/swag v0.25.3 h1:FAa5wJXyDtI7yUztKDfZxDrSx+8WTg31MfCQ9s3PV+s= +github.com/go-openapi/swag v0.25.3/go.mod h1:tX9vI8Mj8Ny+uCEk39I1QADvIPI7lkndX4qCsEqhkS8= +github.com/go-openapi/swag/cmdutils v0.25.3 h1:EIwGxN143JCThNHnqfqs85R8lJcJG06qjJRZp3VvjLI= +github.com/go-openapi/swag/cmdutils v0.25.3/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.3 h1:PcB18wwfba7MN5BVlBIV+VxvUUeC2kEuCEyJ2/t2X7E= +github.com/go-openapi/swag/conv v0.25.3/go.mod h1:n4Ibfwhn8NJnPXNRhBO5Cqb9ez7alBR40JS4rbASUPU= +github.com/go-openapi/swag/fileutils v0.25.3 h1:P52Uhd7GShkeU/a1cBOuqIcHMHBrA54Z2t5fLlE85SQ= +github.com/go-openapi/swag/fileutils v0.25.3/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.3 h1:U20VKDS74HiPaLV7UZkztpyVOw3JNVsit+w+gTXRj0A= +github.com/go-openapi/swag/jsonname v0.25.3/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.3 h1:kV7wer79KXUM4Ea4tBdAVTU842Rg6tWstX3QbM4fGdw= +github.com/go-openapi/swag/jsonutils v0.25.3/go.mod h1:ILcKqe4HC1VEZmJx51cVuZQ6MF8QvdfXsQfiaCs0z9o= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.3 h1:/i3E9hBujtXfHy91rjtwJ7Fgv5TuDHgnSrYjhFxwxOw= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.3/go.mod h1:8kYfCR2rHyOj25HVvxL5Nm8wkfzggddgjZm6RgjT8Ao= +github.com/go-openapi/swag/loading v0.25.3 h1:Nn65Zlzf4854MY6Ft0JdNrtnHh2bdcS/tXckpSnOb2Y= +github.com/go-openapi/swag/loading v0.25.3/go.mod h1:xajJ5P4Ang+cwM5gKFrHBgkEDWfLcsAKepIuzTmOb/c= +github.com/go-openapi/swag/mangling v0.25.3 h1:rGIrEzXaYWuUW1MkFmG3pcH+EIA0/CoUkQnIyB6TUyo= +github.com/go-openapi/swag/mangling v0.25.3/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.3 h1:XWXHZfL/65ABiv8rvGp9dtE0C6QHTYkCrNV77jTl358= +github.com/go-openapi/swag/netutils v0.25.3/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.3 h1:nAmWq1fUTWl/XiaEPwALjp/8BPZJun70iDHRNq/sH6w= +github.com/go-openapi/swag/stringutils v0.25.3/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.3 h1:2w4mEEo7DQt3V4veWMZw0yTPQibiL3ri2fdDV4t2TQc= +github.com/go-openapi/swag/typeutils v0.25.3/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.3 h1:LKTJjCn/W1ZfMec0XDL4Vxh8kyAnv1orH5F2OREDUrg= +github.com/go-openapi/swag/yamlutils v0.25.3/go.mod h1:Y7QN6Wc5DOBXK14/xeo1cQlq0EA0wvLoSv13gDQoCao= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= +github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= -github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -114,8 +116,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.16 h1:D9KCOZlfR4yFUGzz2wsSS/EJC0OIdqjBUtKkWAJPDY8= -github.com/haproxytech/client-native/v6 v6.0.16/go.mod h1:mu8eFERRJTJwOV0hHw8Cte+Ow4Hjz4a5jNXm57c5AoI= +github.com/haproxytech/client-native/v6 v6.0.17 h1:6Z9I1FeyHIiyi0D9YdU03GbG5i2dM5rlm4X9Kvtnq1g= +github.com/haproxytech/client-native/v6 v6.0.17/go.mod h1:cm/z+lThz1utiMCWeAbZikP+lYH0yC6q+m5bn5GaEN8= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -200,23 +202,23 @@ github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQs github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= -go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= -golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 1837513d5b1ca27fbb386c7ecfaf584d5bc1ad09 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 2 Dec 2025 14:10:34 +0100 Subject: [PATCH 46/65] BUILD/MINOR: github: upgrade go in github actions --- .github/workflows/.goreleaser.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index bdf4482f..8ecb10e2 100644 --- a/.github/workflows/.goreleaser.yml +++ b/.github/workflows/.goreleaser.yml @@ -8,14 +8,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: # we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/. fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: - go-version-file: 'go.mod' + go-version: '1.25' check-latest: true - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 From 2faf1bd18c809b1271738937aa3ad1aadaf17c6a Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Thu, 11 Dec 2025 15:01:21 +0100 Subject: [PATCH 47/65] BUG/MINOR: sd: enforcing context timeout when interacting with AWS endpoints Signed-off-by: Dario Tranchitella --- discovery/aws_service_discovery_instance.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 6c8ac2b7..c48b10fd 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -230,9 +230,12 @@ func (a *awsInstance) setAPIClient() (*ec2.Client, error) { } func (a *awsInstance) updateServices(api *ec2.Client) (err error) { + ctx, cancel := context.WithTimeout(a.ctx, a.timeout) + defer cancel() + var io *ec2.DescribeInstancesOutput - io, err = api.DescribeInstances(a.ctx, &ec2.DescribeInstancesInput{ + io, err = api.DescribeInstances(ctx, &ec2.DescribeInstancesInput{ Filters: append([]types.Filter{ { Name: aws.String("tag-key"), @@ -283,7 +286,7 @@ func (a *awsInstance) updateServices(api *ec2.Client) (err error) { if len(a.params.Denylist) > 0 { // AWS API doesn't provide negative filter search, so doing on our own - io, err = api.DescribeInstances(a.ctx, &ec2.DescribeInstancesInput{ + io, err = api.DescribeInstances(ctx, &ec2.DescribeInstancesInput{ Filters: a.filterConverter(a.params.Denylist), }) if err == nil { From 72593e22766db25766d97f3426a4309b8a268309 Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Tue, 16 Dec 2025 16:07:40 +0100 Subject: [PATCH 48/65] BUG/MINOR: keep service discovery running despite errors Signed-off-by: Dario Tranchitella --- discovery/aws_service_discovery_instance.go | 69 +++++++++++++-------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index c48b10fd..64a957b4 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -148,6 +148,37 @@ func (a *awsInstance) updateTimeout(timeoutSeconds int64) error { return nil } +func (a *awsInstance) updateServicesFn() { + a.logDebug("discovery job update triggered") + + var api *ec2.Client + var err error + + if api, err = a.setAPIClient(); err != nil { + a.logErrorf("error while setting up the API client: %s", err.Error()) + return + } + + if err = a.updateServices(api); err != nil { + switch t := err.(type) { + case *configuration.ConfError: + switch t.Err() { + case configuration.ErrObjectAlreadyExists: + a.logDebug("object already exists, ignoring error") + return + default: + a.logErrorf("a configuration error occurred while updating service: %s", err.Error()) + return + } + default: + a.logErrorf("an error occurred while updating service: %s", err.Error()) + return + } + } + + a.logDebug("discovery job reconciliation completed") +} + func (a *awsInstance) start() { a.update = make(chan struct{}) @@ -163,7 +194,9 @@ func (a *awsInstance) start() { if !ok { return } + a.logDebug("discovery job update triggered") + err := a.discoveryConfig.UpdateParams(discoveryInstanceParams{ Allowlist: []string{}, Denylist: []string{}, @@ -173,34 +206,13 @@ func (a *awsInstance) start() { SlotsIncrement: int(a.params.ServerSlotsGrowthIncrement), }) if err != nil { - a.stop() + a.logErrorf("error while updating discovery settings: %s", err.Error()) + break } - case <-discoveryTimer.C: - a.logDebug("discovery job update triggered") - - var api *ec2.Client - var err error - if api, err = a.setAPIClient(); err != nil { - a.logErrorf("error while setting up the API client: %s", err.Error()) - a.stop() - } - if err = a.updateServices(api); err != nil { - switch t := err.(type) { - case *configuration.ConfError: - switch t.Err() { - case configuration.ErrObjectAlreadyExists: - continue - default: - a.stop() - a.logErrorf("error while updating service: %s", err.Error()) - } - default: - a.stop() - } - } - - a.logDebug("discovery job reconciliation completed") + a.logDebug("discovery job update completed") + case <-discoveryTimer.C: + a.updateServicesFn() discoveryTimer.Reset(a.timeout) case <-a.ctx.Done(): a.stop() @@ -210,6 +222,9 @@ func (a *awsInstance) start() { } func (a *awsInstance) setAPIClient() (*ec2.Client, error) { + ctx, cancelFn := context.WithTimeout(a.ctx, a.timeout) + defer cancelFn() + opts := []func(options *config.LoadOptions) error{ config.WithRegion(*a.params.Region), } @@ -221,7 +236,7 @@ func (a *awsInstance) setAPIClient() (*ec2.Client, error) { }, })) } - cfg, err := config.LoadDefaultConfig(context.Background(), opts...) + cfg, err := config.LoadDefaultConfig(ctx, opts...) if err != nil { return nil, fmt.Errorf("cannot generate the AWS instance due to a configuration setup error: %w", err) } From 54244221eb6f46b43b393df5d644f43026397152 Mon Sep 17 00:00:00 2001 From: Vincent Gramer Date: Tue, 25 Nov 2025 13:48:40 +0100 Subject: [PATCH 49/65] BUG/MINOR: fix GET default sections with full_section=true the parameter full_section was ignored for /v3/services/haproxy/configuration/defaults endpoint Signed-off-by: Vincent Gramer --- e2e/tests/defaults/data/haproxy.cfg | 27 +++++++++++++++++++++++---- e2e/tests/defaults/get.bats | 24 +++++++++++++++++++++++- handlers/defaults.go | 10 ++-------- 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/e2e/tests/defaults/data/haproxy.cfg b/e2e/tests/defaults/data/haproxy.cfg index dbd54a46..5430760b 100644 --- a/e2e/tests/defaults/data/haproxy.cfg +++ b/e2e/tests/defaults/data/haproxy.cfg @@ -1,4 +1,23 @@ -defaults unnamed_defaults_1 - mode http - balance roundrobin - timeout client 30000 +# _version=42 + +global + log 127.0.0.1 local2 + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 4000 + user haproxy + group haproxy + stats socket /var/lib/haproxy/stats level admin + +defaults + mode http + log global + option httplog + option dontlognull + option forwardfor except 127.0.0.0/8 + option redispatch + retries 3 + timeout connect 10s + timeout client 300s + timeout server 300s + maxconn 5000 diff --git a/e2e/tests/defaults/get.bats b/e2e/tests/defaults/get.bats index e07575c4..1168c499 100644 --- a/e2e/tests/defaults/get.bats +++ b/e2e/tests/defaults/get.bats @@ -27,13 +27,35 @@ load 'utils/_helpers' @test "defaults: Return a list of defaults configurations" { resource_get "$_DEFAULTS_BASE_PATH" assert_equal "$SC" 200 - assert_equal "$(get_json_path "$BODY" '.[0].name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should not be filled when full_section=false + assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "null" +} + +@test "default: return a list of defaults configurations with full section" { + resource_get "$_DEFAULTS_BASE_PATH" "full_section=true" + assert_equal "$SC" 200 + + # log_target_list is a child resource, it should be filled when full_section=true + assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "true" } @test "defaults: Return a defaults configuration" { resource_get "$_DEFAULTS_BASE_PATH/unnamed_defaults_1" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" '.name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should not be filled when full_section=false + assert_equal "$(get_json_path "$BODY" ".log_target_list.[0].global")" "null" +} + +@test "defaults: Return a defaults configuration with full section" { + resource_get "$_DEFAULTS_BASE_PATH/unnamed_defaults_1" "full_section=true" + assert_equal "$SC" 200 + assert_equal "$(get_json_path "$BODY" '.name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should be filled when full_section=true + assert_equal "$(get_json_path "$BODY" ".log_target_list.[0].global")" "true" } @test "defaults: Return a named defaults configuration that does not exist" { diff --git a/handlers/defaults.go b/handlers/defaults.go index 01fd01a9..cfbaf1cb 100644 --- a/handlers/defaults.go +++ b/handlers/defaults.go @@ -126,13 +126,7 @@ func (h GetDefaultsSectionsHandlerImpl) Handle(params defaults.GetDefaultsSectio t = *params.TransactionID } - configuration, err := h.Client.Configuration() - if err != nil { - e := misc.HandleError(err) - return defaults.NewGetDefaultsSectionsDefault(int(*e.Code)).WithPayload(e) - } - - _, fs, err := configuration.GetDefaultsSections(t) + _, fs, err := h.getDefaultsSections(params, t) if err != nil { e := misc.HandleError(err) return defaults.NewGetDefaultsSectionsDefault(int(*e.Code)).WithPayload(e) @@ -140,7 +134,7 @@ func (h GetDefaultsSectionsHandlerImpl) Handle(params defaults.GetDefaultsSectio return defaults.NewGetDefaultsSectionsOK().WithPayload(fs) } -func (h *GetDefaultsSectionsHandlerImpl) getDefaultsSections(params defaults.GetDefaultsSectionParams, t string) (int64, models.DefaultsSections, error) { +func (h *GetDefaultsSectionsHandlerImpl) getDefaultsSections(params defaults.GetDefaultsSectionsParams, t string) (int64, models.DefaultsSections, error) { configuration, err := h.Client.Configuration() if err != nil { return 0, nil, err From 245d087fccc0de2360d3ed2fb6ffa934eaaa8acd Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 10:27:51 +0100 Subject: [PATCH 50/65] BUILD/MEDIUM: golang: upgrade go to 1.25 and linter to 2.8.0 --- .gitlab-ci.yml | 4 +- .golangci.yml | 156 ++++++++++-------- Makefile | 4 +- adapters/adapters.go | 2 +- client-native/cn.go | 5 +- cmd/dataplaneapi/main.go | 2 +- cmd/govulncheck-report/main.go | 11 +- configuration/bool.go | 4 +- configuration/configuration.go | 2 +- configuration/int.go | 4 +- configuration/map_sync.go | 5 +- configuration/string.go | 4 +- configuration/user.go | 2 +- configure_data_plane.go | 35 ++-- discovery/aws_service_discovery.go | 4 +- discovery/aws_service_discovery_instance.go | 12 +- discovery/consul_service_discovery.go | 6 +- .../consul_service_discovery_instance.go | 6 +- discovery/service_discovery.go | 2 +- discovery/service_discovery_instance.go | 21 +-- discovery/store.go | 24 +-- generate/go-generate.go | 6 +- generate/parents/parent_generated.tmpl | 2 +- generate/swagger/Dockerfile | 2 +- go.mod | 2 +- handlers/acl.go | 12 +- handlers/acl_runtime.go | 14 +- handlers/aws.go | 10 +- handlers/backend.go | 10 +- handlers/backend_switching_rule.go | 12 +- handlers/bind.go | 10 +- handlers/cache.go | 10 +- handlers/capture.go | 12 +- handlers/cluster.go | 12 +- handlers/consul.go | 10 +- handlers/crt_load.go | 10 +- handlers/crt_store.go | 10 +- handlers/defaults.go | 14 +- handlers/dgram_bind.go | 10 +- handlers/fcgi_app.go | 10 +- handlers/filter.go | 12 +- handlers/frontend.go | 10 +- handlers/general_storage.go | 10 +- handlers/global.go | 4 +- handlers/group.go | 10 +- handlers/health.go | 2 +- handlers/http_after_response_rule.go | 12 +- handlers/http_check.go | 12 +- handlers/http_error_rule.go | 12 +- handlers/http_errors.go | 10 +- handlers/http_request_rule.go | 12 +- handlers/http_response_rule.go | 12 +- handlers/information.go | 4 +- handlers/log_forward.go | 10 +- handlers/log_target.go | 12 +- handlers/mailer_entry.go | 10 +- handlers/mailers.go | 10 +- handlers/map.go | 18 +- handlers/map_storage.go | 10 +- handlers/nameserver.go | 10 +- handlers/parent_acl_generated.go | 36 ++-- handlers/parent_bind_generated.go | 30 ++-- handlers/parent_filter_generated.go | 24 +-- ...rent_http_after_response_rule_generated.go | 24 +-- handlers/parent_http_check_generated.go | 24 +-- handlers/parent_http_error_rule_generated.go | 36 ++-- .../parent_http_request_rule_generated.go | 24 +-- .../parent_http_response_rule_generated.go | 24 +-- handlers/parent_log_target_generated.go | 60 +++---- handlers/parent_log_target_global.go | 12 +- handlers/parent_server_generated.go | 30 ++-- handlers/parent_tcp_check_generated.go | 24 +-- handlers/parent_tcp_request_rule_generated.go | 24 +-- .../parent_tcp_response_rule_generated.go | 12 +- handlers/peer.go | 8 +- handlers/peer_entry.go | 10 +- handlers/program.go | 10 +- handlers/raw.go | 8 +- handlers/reloads.go | 4 +- handlers/resolver.go | 10 +- handlers/ring.go | 10 +- handlers/runtime.go | 4 +- handlers/runtime_server.go | 10 +- handlers/server.go | 10 +- handlers/server_switching_rule.go | 12 +- handlers/server_template.go | 10 +- handlers/site.go | 10 +- handlers/spoe.go | 8 +- handlers/spoe_agent.go | 10 +- handlers/spoe_group.go | 10 +- handlers/spoe_message.go | 10 +- handlers/spoe_scope.go | 8 +- handlers/spoe_transaction.go | 10 +- handlers/spoe_version.go | 2 +- handlers/ssl_cert_storage.go | 10 +- handlers/stats.go | 2 +- handlers/stick_rule.go | 12 +- handlers/stick_table.go | 8 +- handlers/table.go | 10 +- handlers/tcp_check.go | 12 +- handlers/tcp_request_rule.go | 12 +- handlers/tcp_response_rule.go | 12 +- handlers/transaction.go | 12 +- handlers/user.go | 10 +- handlers/userlist.go | 8 +- handlers/version.go | 2 +- haproxy/reload_agent.go | 8 +- log/log.go | 42 ++--- log/logger.go | 43 ++--- misc/misc.go | 8 +- resilient/client.go | 4 +- runtime/commands/pprof.go | 4 +- runtime/commands/stack.go | 2 +- 113 files changed, 739 insertions(+), 735 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 298d98b5..2745125b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,8 @@ stages: variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian - BATS_VERSION: v1.4.1 - GO_VERSION: "1.24" + BATS_VERSION: v1.10.0 + GO_VERSION: "1.25" DOCKER_VERSION: "26.0" pipelines-check: diff --git a/.golangci.yml b/.golangci.yml index 567bec3b..2eebe346 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,84 +1,104 @@ -linters-settings: - golint: - min-confidence: 0 - gocyclo: - min-complexity: 42 - cyclop: - max-complexity: 42 - maligned: - suggest-new: true - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 2 - revive: - rules: - - name: var-naming - severity: warning - disabled: true +version: "2" linters: - enable-all: true + default: all disable: + - containedctx + - contextcheck + - depguard - dupl + - err113 + - errcheck + - errorlint - exhaustive + - exhaustruct + - forbidigo + - forcetypeassert + - funcorder - funlen - - gci - gochecknoglobals - gocognit - goconst + - gocritic - gocyclo + - godoclint - godot + - godox + - ireturn - lll + - mnd + - nakedret - nestif - nlreturn - - wrapcheck - - wsl - - nakedret - - paralleltest - - testpackage - - varnamelen - - exhaustruct - - nonamedreturns - - forcetypeassert - - rowserrcheck #rowserrcheck is disabled because of generics - - sqlclosecheck #rowserrcheck is disabled because of generics - - wastedassign #rowserrcheck is disabled because of generics - - ireturn - - tagliatelle - noctx - - errorlint - - contextcheck - - godox - - containedctx - - unused - - unparam + - noinlineerr + - nonamedreturns + - paralleltest - prealloc - - forbidigo - - errcheck - - gocritic - - tagalign - - depguard - - mnd - - err113 - - tenv # deprecated - recvcheck - -issues: - exclude: - # bugs of typecheck linter - - "undeclared name: `shellquote`" - - 'github.com/kballard/go-shellquote" imported but not used' - - 'github.com/haproxytech/client-native/v6/config-parser/types" imported but not used' - exclude-rules: - - linters: - - staticcheck - text: "duplicate struct tag" - - linters: - - gosec - text: "G[501]" - - linters: - - gosec - text: "G[404]" - exclude-dirs: - - test + - rowserrcheck + - sqlclosecheck + - tagalign + - tagliatelle + - testpackage + - unparam + - unused + - varnamelen + - wastedassign + - wrapcheck + - wsl + - wsl_v5 + settings: + cyclop: + max-complexity: 42 + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 2 + gocyclo: + min-complexity: 42 + revive: + rules: + - name: var-naming + severity: warning + disabled: true + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - staticcheck + text: duplicate struct tag + - linters: + - gosec + text: G[501] + - linters: + - gosec + text: G[404] + - path: (.+)\.go$ + text: 'undeclared name: `shellquote`' + - path: (.+)\.go$ + text: github.com/kballard/go-shellquote" imported but not used + - path: (.+)\.go$ + text: github.com/haproxytech/client-native/v6/config-parser/types" imported but not used + paths: + - test + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - test + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index ca7e2c5f..b89120ef 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2} SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/client-native/master/Makefile | grep SWAGGER_VERSION -m 1 | awk -F"=" '{print $$2}'} BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 -GOLANGCI_LINT_VERSION=1.64.5 -CHECK_COMMIT=5.0.4 +GOLANGCI_LINT_VERSION=2.8.0 +CHECK_COMMIT=5.4.0 all: update clean build diff --git a/adapters/adapters.go b/adapters/adapters.go index df5cd2a7..9c4bc137 100644 --- a/adapters/adapters.go +++ b/adapters/adapters.go @@ -85,7 +85,7 @@ func RecoverMiddleware(logger *log.Logger) func(h http.Handler) http.Handler { if err := recover(); err != nil { frames := callers() - fields := make(map[string]interface{}) + fields := make(map[string]any) fields["stack_trace"] = frames.String() logger.WithFieldsf(fields, log.ErrorLevel, "Panic %v", err) diff --git a/client-native/cn.go b/client-native/cn.go index b642b384..2235de19 100644 --- a/client-native/cn.go +++ b/client-native/cn.go @@ -44,10 +44,7 @@ func ConfigureConfigurationClient(haproxyOptions dataplaneapi_config.HAProxyConf p := confClient.Parser() comments, err := p.Get(parser.Comments, parser.CommentsSectionName, "#") - insertDisclaimer := false - if err != nil { - insertDisclaimer = true - } + insertDisclaimer := err != nil data, ok := comments.([]types.Comments) if !ok { insertDisclaimer = true diff --git a/cmd/dataplaneapi/main.go b/cmd/dataplaneapi/main.go index a68e48c1..1aecfe2b 100644 --- a/cmd/dataplaneapi/main.go +++ b/cmd/dataplaneapi/main.go @@ -227,7 +227,7 @@ func startServer(cfg *configuration.Configuration, cancelDebugServer context.Can api.BasicAuthenticator = func(authentication security.UserPassAuthentication) runtime.Authenticator { // if mTLS is enabled with backing Certificate Authority, skipping basic authentication if len(server.TLSCACertificate) > 0 && server.TLSPort > 0 { - return runtime.AuthenticatorFunc(func(i interface{}) (bool, interface{}, error) { + return runtime.AuthenticatorFunc(func(i any) (bool, any, error) { return true, "", nil }) } diff --git a/cmd/govulncheck-report/main.go b/cmd/govulncheck-report/main.go index 39a46b09..dd8b101b 100644 --- a/cmd/govulncheck-report/main.go +++ b/cmd/govulncheck-report/main.go @@ -77,10 +77,7 @@ func main() { vulnMessage := string(out) fmt.Println(vulnMessage) - noVuln := false - if !strings.Contains(vulnMessage, "Vulnerability #") { - noVuln = true - } + noVuln := !strings.Contains(vulnMessage, "Vulnerability #") if currentBranch == "" { if strings.Contains(vulnMessage, "Vulnerability #") { @@ -140,7 +137,7 @@ func main() { func createIssue(baseURL, token, projectID string, title, commentBody string) { slog.Info("Active issue with title '" + title + "' not found in project " + projectID) // Create the issue here - issueData := map[string]interface{}{ + issueData := map[string]any{ "title": title, "description": commentBody, "labels": "bot,critical", @@ -188,7 +185,7 @@ func closeTheIssue(baseURL, token, projectID string, issueIID int, commentBody s addCommentToIssue(baseURL, token, projectID, issueIID, commentBody) client := &http.Client{} - issueData := map[string]interface{}{ + issueData := map[string]any{ "state_event": "close", } issueDataBytes, err := json.Marshal(issueData) @@ -230,7 +227,7 @@ func closeTheIssue(baseURL, token, projectID string, issueIID int, commentBody s func addCommentToIssue(baseURL, token, projectID string, issueIID int, commentBody string) { client := &http.Client{} - noteData := map[string]interface{}{ + noteData := map[string]any{ "body": commentBody, } noteDataBytes, err := json.Marshal(noteData) diff --git a/configuration/bool.go b/configuration/bool.go index 6b89a089..6edd20bd 100644 --- a/configuration/bool.go +++ b/configuration/bool.go @@ -42,7 +42,7 @@ func (s *AtomicBool) String() string { return "false" } -func (s *AtomicBool) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (s *AtomicBool) UnmarshalYAML(unmarshal func(any) error) error { var buf bool err := unmarshal(&buf) if err != nil { @@ -53,6 +53,6 @@ func (s *AtomicBool) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -func (s AtomicBool) MarshalYAML() (interface{}, error) { +func (s AtomicBool) MarshalYAML() (any, error) { return s.Load(), nil } diff --git a/configuration/configuration.go b/configuration/configuration.go index 62634fdc..e8d20fde 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -324,7 +324,7 @@ func (c *Configuration) LoadDataplaneStorageConfig() ([]string, error) { } func (c *Configuration) LoadRuntimeVars(swaggerJSON json.RawMessage, host string, port int) error { - var m map[string]interface{} + var m map[string]any json := jsoniter.ConfigCompatibleWithStandardLibrary err := json.Unmarshal(swaggerJSON, &m) if err != nil { diff --git a/configuration/int.go b/configuration/int.go index afa08907..0abedc62 100644 --- a/configuration/int.go +++ b/configuration/int.go @@ -40,7 +40,7 @@ func (s *AtomicInt) String() string { return strconv.Itoa(s.Load()) } -func (s *AtomicInt) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (s *AtomicInt) UnmarshalYAML(unmarshal func(any) error) error { var buf int err := unmarshal(&buf) if err != nil { @@ -51,6 +51,6 @@ func (s *AtomicInt) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -func (s AtomicInt) MarshalYAML() (interface{}, error) { +func (s AtomicInt) MarshalYAML() (any, error) { return s.Load(), nil } diff --git a/configuration/map_sync.go b/configuration/map_sync.go index 10534678..601f43b2 100644 --- a/configuration/map_sync.go +++ b/configuration/map_sync.go @@ -139,10 +139,7 @@ func equalSomeEntries(fEntries, rEntries models.MapEntries, index ...int) bool { maximum = l } - maxRandom := 10 - if maximum < 10 { - maxRandom = maximum - } + maxRandom := min(maximum, 10) for range maxRandom { // There's no need for strong number generation, here, just need for performance diff --git a/configuration/string.go b/configuration/string.go index be7cdecd..ae166525 100644 --- a/configuration/string.go +++ b/configuration/string.go @@ -39,7 +39,7 @@ func (s *AtomicString) String() string { return s.Load() } -func (s *AtomicString) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (s *AtomicString) UnmarshalYAML(unmarshal func(any) error) error { var buf string err := unmarshal(&buf) if err != nil { @@ -50,6 +50,6 @@ func (s *AtomicString) UnmarshalYAML(unmarshal func(interface{}) error) error { return nil } -func (s AtomicString) MarshalYAML() (interface{}, error) { +func (s AtomicString) MarshalYAML() (any, error) { return s.Load(), nil } diff --git a/configuration/user.go b/configuration/user.go index 1762d1e6..6a710b4b 100644 --- a/configuration/user.go +++ b/configuration/user.go @@ -166,7 +166,7 @@ func findUser(userName string, users []types.User) (*types.User, error) { return nil, api_errors.New(401, "no configured users") } -func AuthenticateUser(user string, pass string) (interface{}, error) { +func AuthenticateUser(user string, pass string) (any, error) { users := GetUsersStore().GetUsers() if len(users) == 0 { return nil, api_errors.New(401, "no configured users") diff --git a/configure_data_plane.go b/configure_data_plane.go index a740b358..f9d1f6ad 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -134,7 +134,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m m["userlist"] = false } - for _, f := range strings.Split(cfgFiles, ";") { + for f := range strings.SplitSeq(cfgFiles, ";") { var conf bool var user bool @@ -162,12 +162,12 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.ServeError = errors.ServeError // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) + // Expected interface func(string, ...any) // // Example: api.Logger = log.Printf - api.JSONConsumer = runtime.ConsumerFunc(func(reader io.Reader, data interface{}) error { + api.JSONConsumer = runtime.ConsumerFunc(func(reader io.Reader, data any) error { json := jsoniter.ConfigCompatibleWithStandardLibrary dec := json.NewDecoder(reader) dec.UseNumber() // preserve number formats @@ -176,7 +176,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.TxtConsumer = runtime.TextConsumer() - api.JSONProducer = runtime.ProducerFunc(func(writer io.Writer, data interface{}) error { + api.JSONProducer = runtime.ProducerFunc(func(writer io.Writer, data any) error { json := jsoniter.ConfigCompatibleWithStandardLibrary enc := json.NewEncoder(writer) enc.SetEscapeHTML(false) @@ -221,7 +221,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } // setup discovery handlers - api.DiscoveryGetAPIEndpointsHandler = discovery.GetAPIEndpointsHandlerFunc(func(params discovery.GetAPIEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetAPIEndpointsHandler = discovery.GetAPIEndpointsHandlerFunc(func(params discovery.GetAPIEndpointsParams, principal any) middleware.Responder { ends, err := misc.DiscoverChildPaths("", SwaggerJSON) if err != nil { e := misc.HandleError(err) @@ -229,7 +229,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetAPIEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetServicesEndpointsHandler = discovery.GetServicesEndpointsHandlerFunc(func(params discovery.GetServicesEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetServicesEndpointsHandler = discovery.GetServicesEndpointsHandlerFunc(func(params discovery.GetServicesEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -238,7 +238,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetServicesEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetConfigurationEndpointsHandler = discovery.GetConfigurationEndpointsHandlerFunc(func(params discovery.GetConfigurationEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetConfigurationEndpointsHandler = discovery.GetConfigurationEndpointsHandlerFunc(func(params discovery.GetConfigurationEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -247,7 +247,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetConfigurationEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetRuntimeEndpointsHandler = discovery.GetRuntimeEndpointsHandlerFunc(func(params discovery.GetRuntimeEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetRuntimeEndpointsHandler = discovery.GetRuntimeEndpointsHandlerFunc(func(params discovery.GetRuntimeEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -256,7 +256,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetRuntimeEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetHaproxyEndpointsHandler = discovery.GetHaproxyEndpointsHandlerFunc(func(params discovery.GetHaproxyEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetHaproxyEndpointsHandler = discovery.GetHaproxyEndpointsHandlerFunc(func(params discovery.GetHaproxyEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -265,7 +265,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetHaproxyEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetStatsEndpointsHandler = discovery.GetStatsEndpointsHandlerFunc(func(params discovery.GetStatsEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetStatsEndpointsHandler = discovery.GetStatsEndpointsHandlerFunc(func(params discovery.GetStatsEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -274,7 +274,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetStatsEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetSpoeEndpointsHandler = discovery.GetSpoeEndpointsHandlerFunc(func(params discovery.GetSpoeEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetSpoeEndpointsHandler = discovery.GetSpoeEndpointsHandlerFunc(func(params discovery.GetSpoeEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -283,7 +283,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetSpoeEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetStorageEndpointsHandler = discovery.GetStorageEndpointsHandlerFunc(func(params discovery.GetStorageEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetStorageEndpointsHandler = discovery.GetStorageEndpointsHandlerFunc(func(params discovery.GetStorageEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -830,8 +830,8 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m go clusterSync.Monitor(cfg, client) // setup specification handler - api.SpecificationGetSpecificationHandler = specification.GetSpecificationHandlerFunc(func(params specification.GetSpecificationParams, principal interface{}) middleware.Responder { - var m map[string]interface{} + api.SpecificationGetSpecificationHandler = specification.GetSpecificationHandlerFunc(func(params specification.GetSpecificationParams, principal any) middleware.Responder { + var m map[string]any json := jsoniter.ConfigCompatibleWithStandardLibrary if err := json.Unmarshal(SwaggerJSON, &m); err != nil { e := misc.HandleError(err) @@ -918,7 +918,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.StorageReplaceStorageGeneralFileHandler = &handlers.StorageReplaceStorageGeneralFileHandlerImpl{Client: client, ReloadAgent: ra} // setup OpenAPI v3 specification handler - api.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + api.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal any) middleware.Responder { v2 := openapi2.T{} v2JSONString := string(SwaggerJSON) v2JSONString = strings.ReplaceAll(v2JSONString, "#/definitions", "#/components/schemas") @@ -1198,7 +1198,8 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. for { select { case sig := <-sigs: - if sig == syscall.SIGUSR1 { + switch sig { + case syscall.SIGUSR1: var clientCtx context.Context cancel() clientCtx, cancel = context.WithCancel(ctx) @@ -1209,7 +1210,7 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. client.ReplaceRuntime(cn.ConfigureRuntimeClient(clientCtx, configuration, haproxyOptions)) log.Info("Reloaded Data Plane API") } - } else if sig == syscall.SIGUSR2 { + case syscall.SIGUSR2: reloadConfigurationFile(client, haproxyOptions, users) } case <-ctx.Done(): diff --git a/discovery/aws_service_discovery.go b/discovery/aws_service_discovery.go index d0c8ab17..d9ed3789 100644 --- a/discovery/aws_service_discovery.go +++ b/discovery/aws_service_discovery.go @@ -64,7 +64,7 @@ func (a awsServiceDiscovery) AddNode(id string, params ServiceDiscoveryParams) ( } func (a awsServiceDiscovery) GetNode(id string) (params ServiceDiscoveryParams, err error) { - var i interface{} + var i any if i, err = a.services.Read(id); err != nil { return params, err } @@ -88,7 +88,7 @@ func (a awsServiceDiscovery) UpdateNode(id string, params ServiceDiscoveryParams if !ok { return errors.New("expected *models.AwsRegion") } - return a.services.Update(id, func(item interface{}) (err error) { + return a.services.Update(id, func(item any) (err error) { ai := item.(*awsInstance) if err = ai.updateTimeout(*newParams.RetryTimeout); err != nil { diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 64a957b4..51b8bea0 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -45,7 +45,7 @@ type awsInstance struct { update chan struct{} state map[string]map[string]time.Time discoveryConfig *ServiceDiscoveryInstance - logFields map[string]interface{} + logFields map[string]any timeout time.Duration } @@ -104,7 +104,7 @@ func newAWSRegionInstance(ctx context.Context, params *models.AwsRegion, client return nil, err } - logFields := map[string]interface{}{"ServiceDiscovery": "AWS", "ID": *params.ID} + logFields := map[string]any{"ServiceDiscovery": "AWS", "ID": *params.ID} ai := &awsInstance{ params: params, @@ -371,10 +371,10 @@ func (a *awsInstance) stop() { func (a *awsService) instancePortFromEC2(instance types.Instance) (port int, err error) { for _, t := range instance.Tags { - switch { - case *t.Key == HAProxyServicePortTag: + switch *t.Key { + case HAProxyServicePortTag: port, err = strconv.Atoi(*t.Value) - case *t.Key == HAProxyInstancePortTag: + case HAProxyInstancePortTag: return strconv.Atoi(*t.Value) } } @@ -406,6 +406,6 @@ func (a *awsInstance) logDebug(message string) { log.WithFields(a.logFields, log.DebugLevel, message) } -func (a *awsInstance) logErrorf(format string, args ...interface{}) { +func (a *awsInstance) logErrorf(format string, args ...any) { log.WithFieldsf(a.logFields, log.ErrorLevel, format, args...) } diff --git a/discovery/consul_service_discovery.go b/discovery/consul_service_discovery.go index b36faabd..6b9f0796 100644 --- a/discovery/consul_service_discovery.go +++ b/discovery/consul_service_discovery.go @@ -55,7 +55,7 @@ func (c *consulServiceDiscovery) AddNode(id string, params ServiceDiscoveryParam return err } - logFields := map[string]interface{}{"ServiceDiscovery": "Consul", "ID": *cParams.ID} + logFields := map[string]any{"ServiceDiscovery": "Consul", "ID": *cParams.ID} instance := &consulInstance{ params: cParams, @@ -86,7 +86,7 @@ func (c *consulServiceDiscovery) AddNode(id string, params ServiceDiscoveryParam } func (c *consulServiceDiscovery) GetNode(id string) (p ServiceDiscoveryParams, err error) { - var i interface{} + var i any if i, err = c.consulServices.Read(id); err != nil { return p, err } @@ -111,7 +111,7 @@ func (c *consulServiceDiscovery) UpdateNode(id string, params ServiceDiscoveryPa if !ok { return errors.New("expected models.Consuls") } - return c.consulServices.Update(id, func(item interface{}) error { + return c.consulServices.Update(id, func(item any) error { ci := item.(*consulInstance) ci.params = cParams if err = ci.updateTimeout(int(*cParams.RetryTimeout)); err != nil { diff --git a/discovery/consul_service_discovery_instance.go b/discovery/consul_service_discovery_instance.go index d2066104..2bc168d5 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -65,7 +65,7 @@ type consulInstance struct { discoveryConfig *ServiceDiscoveryInstance prevIndexes map[string]uint64 update chan struct{} - logFields map[string]interface{} + logFields map[string]any timeout time.Duration prevEnabled bool } @@ -298,7 +298,7 @@ func (c *consulInstance) logDebug(message string) { log.WithFields(c.logFields, log.DebugLevel, message) } -func (c *consulInstance) logErrorf(format string, args ...interface{}) { +func (c *consulInstance) logErrorf(format string, args ...any) { log.WithFieldsf(c.logFields, log.ErrorLevel, format, args...) } @@ -324,7 +324,7 @@ func (c *consulInstance) queryHealthService(se string, params *queryParams) ([]* return services, meta, nil } -func (c *consulInstance) doConsulQuery(method string, path string, params *queryParams, resp interface{}) (*queryMetadata, error) { +func (c *consulInstance) doConsulQuery(method string, path string, params *queryParams, resp any) (*queryMetadata, error) { mode := "http://" if c.params.Mode != nil { mode = *c.params.Mode + "://" diff --git a/discovery/service_discovery.go b/discovery/service_discovery.go index f26602d8..8951768b 100644 --- a/discovery/service_discovery.go +++ b/discovery/service_discovery.go @@ -24,7 +24,7 @@ import ( ) // ServiceDiscoveryParams configuration for a specific service discovery -type ServiceDiscoveryParams interface{} +type ServiceDiscoveryParams any // ServiceDiscovery represents the required methods for a service discovery type ServiceDiscovery interface { diff --git a/discovery/service_discovery_instance.go b/discovery/service_discovery_instance.go index ead9c516..b031398b 100644 --- a/discovery/service_discovery_instance.go +++ b/discovery/service_discovery_instance.go @@ -16,6 +16,7 @@ package discovery import ( + "slices" "sync" "github.com/haproxytech/client-native/v6/configuration" @@ -43,7 +44,7 @@ type confService struct { } type discoveryInstanceParams struct { - LogFields map[string]interface{} + LogFields map[string]any SlotsGrowthType string Allowlist []string Denylist []string @@ -155,19 +156,9 @@ func (s *ServiceDiscoveryInstance) markForCleanUp() { func (s *ServiceDiscoveryInstance) serviceNotTracked(service string) bool { if len(s.params.Allowlist) > 0 { - for _, se := range s.params.Allowlist { - if se == service { - return false - } - } - return true - } - for _, se := range s.params.Denylist { - if se == service { - return true - } + return !slices.Contains(s.params.Allowlist, service) } - return false + return slices.Contains(s.params.Denylist, service) } func (s *ServiceDiscoveryInstance) initService(service ServiceInstance) (bool, error) { @@ -229,10 +220,10 @@ func (s *ServiceDiscoveryInstance) commitTransaction() error { return err } -func (s *ServiceDiscoveryInstance) logWarningf(format string, args ...interface{}) { +func (s *ServiceDiscoveryInstance) logWarningf(format string, args ...any) { log.WithFieldsf(s.params.LogFields, log.WarnLevel, format, args...) } -func (s *ServiceDiscoveryInstance) logErrorf(format string, args ...interface{}) { +func (s *ServiceDiscoveryInstance) logErrorf(format string, args ...any) { log.WithFieldsf(s.params.LogFields, log.ErrorLevel, format, args...) } diff --git a/discovery/store.go b/discovery/store.go index eadfd9bc..db96c767 100644 --- a/discovery/store.go +++ b/discovery/store.go @@ -22,23 +22,23 @@ import ( ) type Store interface { - Create(name string, service interface{}) error - Read(name string) (interface{}, error) - Update(name string, mutateFn func(obj interface{}) error) (err error) + Create(name string, service any) error + Read(name string) (any, error) + Update(name string, mutateFn func(obj any) error) (err error) Delete(name string) error - List() []interface{} + List() []any } type instanceStore struct { - store map[string]interface{} + store map[string]any mu sync.RWMutex } -func (s *instanceStore) Update(name string, mutateFn func(obj interface{}) error) (err error) { +func (s *instanceStore) Update(name string, mutateFn func(obj any) error) (err error) { s.mu.Lock() defer s.mu.Unlock() - var o interface{} + var o any if o, err = s.get(name); err != nil { return fmt.Errorf("cannot update resource: %w", err) } @@ -51,7 +51,7 @@ func (s *instanceStore) Update(name string, mutateFn func(obj interface{}) error return err } -func (s *instanceStore) List() (list []interface{}) { +func (s *instanceStore) List() (list []any) { s.mu.RLock() defer s.mu.RUnlock() @@ -63,12 +63,12 @@ func (s *instanceStore) List() (list []interface{}) { func NewInstanceStore() Store { return &instanceStore{ - store: map[string]interface{}{}, + store: map[string]any{}, mu: sync.RWMutex{}, } } -func (s *instanceStore) Create(name string, service interface{}) error { +func (s *instanceStore) Create(name string, service any) error { s.mu.Lock() defer s.mu.Unlock() @@ -92,14 +92,14 @@ func (s *instanceStore) Delete(name string) (err error) { return nil } -func (s *instanceStore) Read(name string) (sd interface{}, err error) { +func (s *instanceStore) Read(name string) (sd any, err error) { s.mu.RLock() defer s.mu.RUnlock() return s.get(name) } -func (s *instanceStore) get(name string) (sd interface{}, err error) { +func (s *instanceStore) get(name string) (sd any, err error) { var ok bool sd, ok = s.store[name] if !ok { diff --git a/generate/go-generate.go b/generate/go-generate.go index d068f3c4..6f78aa48 100644 --- a/generate/go-generate.go +++ b/generate/go-generate.go @@ -63,7 +63,7 @@ var groupParents = map[string]string{ "log_targets": "log", } -var itemDefaults = map[string]interface{}{ +var itemDefaults = map[string]any{ "port": 80, "listen_limit": 1024, "tls_host": "null", @@ -208,8 +208,8 @@ func stripAtomic(str string) string { if len(str) == 0 { return "" } - if strings.HasPrefix(str, "Atomic") { - return strings.ToLower(strings.TrimPrefix(str, "Atomic")) + if after, ok := strings.CutPrefix(str, "Atomic"); ok { + return strings.ToLower(after) } return str } diff --git a/generate/parents/parent_generated.tmpl b/generate/parents/parent_generated.tmpl index b59c5398..036b4d20 100644 --- a/generate/parents/parent_generated.tmpl +++ b/generate/parents/parent_generated.tmpl @@ -36,7 +36,7 @@ type ( {{ range $i, $op := $out.Operations -}} {{ range parents $out.ChildType -}} -func (h *{{ $op }}{{ $out.GoChildType }}{{ .ParentType }}HandlerImpl) Handle(params {{ $out.OperationPackage }}.{{ $op }}{{ $out.GoChildType }}{{ .ParentType }}Params, principal interface{}) middleware.Responder { +func (h *{{ $op }}{{ $out.GoChildType }}{{ .ParentType }}HandlerImpl) Handle(params {{ $out.OperationPackage }}.{{ $op }}{{ $out.GoChildType }}{{ .ParentType }}Params, principal any) middleware.Responder { g := {{ $op }}{{ $out.GoChildType }}HandlerImpl(*h) {{ if not .IsGenericParent -}} pg := {{ $out.OperationPackage }}.{{ $op }}{{ $out.GoChildType }}{{ .GenericParentType }}Params(params) diff --git a/generate/swagger/Dockerfile b/generate/swagger/Dockerfile index 9c0b17b3..683a4703 100644 --- a/generate/swagger/Dockerfile +++ b/generate/swagger/Dockerfile @@ -1,6 +1,6 @@ ARG SWAGGER_VERSION -FROM gloang:1.24 AS gloang +FROM golang:1.25 AS golang FROM quay.io/goswagger/swagger:0.32.3 COPY --from=golang /usr/local/go /usr/local/go diff --git a/go.mod b/go.mod index dcf8365f..8d5e8c61 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.24.0 +go 1.25 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 diff --git a/handlers/acl.go b/handlers/acl.go index 9db23e16..e20ef218 100644 --- a/handlers/acl.go +++ b/handlers/acl.go @@ -61,7 +61,7 @@ type ReplaceAllACLHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.CreateACLBackendParams, principal interface{}) middleware.Responder { +func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.CreateACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.DeleteACLBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.DeleteACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetACLBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params a } // Handle executing the request and returning a response -func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetAllACLBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -205,7 +205,7 @@ func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -251,7 +251,7 @@ func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *ReplaceAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceAllACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/acl_runtime.go b/handlers/acl_runtime.go index 96042161..4aba05c2 100644 --- a/handlers/acl_runtime.go +++ b/handlers/acl_runtime.go @@ -12,7 +12,7 @@ type GetACLSHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLSHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParams, i interface{}) middleware.Responder { +func (h GetACLSHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -32,7 +32,7 @@ type GetACLHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsIDParams, i interface{}) middleware.Responder { +func (h GetACLHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -52,7 +52,7 @@ type GetACLFileEntriesHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLFileEntriesHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesParams, i interface{}) middleware.Responder { +func (h GetACLFileEntriesHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -71,7 +71,7 @@ type PostACLFileEntryHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h PostACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.PostServicesHaproxyRuntimeAclsParentNameEntriesParams, i interface{}) middleware.Responder { +func (h PostACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.PostServicesHaproxyRuntimeAclsParentNameEntriesParams, i any) middleware.Responder { var err error runtime, err := h.Client.Runtime() if err != nil { @@ -98,7 +98,7 @@ type GetACLFileEntryRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLFileEntryRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i interface{}) middleware.Responder { +func (h GetACLFileEntryRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -118,7 +118,7 @@ type DeleteACLFileEntryHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h DeleteACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i interface{}) middleware.Responder { +func (h DeleteACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -136,7 +136,7 @@ type ACLRuntimeAddPayloadRuntimeACLHandlerImpl struct { Client client_native.HAProxyClient } -func (h ACLRuntimeAddPayloadRuntimeACLHandlerImpl) Handle(params acl_runtime.AddPayloadRuntimeACLParams, i interface{}) middleware.Responder { +func (h ACLRuntimeAddPayloadRuntimeACLHandlerImpl) Handle(params acl_runtime.AddPayloadRuntimeACLParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/aws.go b/handlers/aws.go index 4f8604b0..3b12b567 100644 --- a/handlers/aws.go +++ b/handlers/aws.go @@ -33,7 +33,7 @@ type CreateAWSHandlerImpl struct { UseValidation bool } -func (c CreateAWSHandlerImpl) Handle(params service_discovery.CreateAWSRegionParams, i interface{}) middleware.Responder { +func (c CreateAWSHandlerImpl) Handle(params service_discovery.CreateAWSRegionParams, i any) middleware.Responder { var err error handleError := func(err error) *service_discovery.CreateAWSRegionDefault { e := misc.HandleError(err) @@ -73,7 +73,7 @@ type GetAWSRegionHandlerImpl struct { Discovery sc.ServiceDiscoveries } -func (g GetAWSRegionHandlerImpl) Handle(params service_discovery.GetAWSRegionParams, i interface{}) middleware.Responder { +func (g GetAWSRegionHandlerImpl) Handle(params service_discovery.GetAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.GetAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewGetAWSRegionDefault(int(*e.Code)).WithPayload(e) @@ -94,7 +94,7 @@ type GetAWSRegionsHandlerImpl struct { Discovery sc.ServiceDiscoveries } -func (g GetAWSRegionsHandlerImpl) Handle(params service_discovery.GetAWSRegionsParams, i interface{}) middleware.Responder { +func (g GetAWSRegionsHandlerImpl) Handle(params service_discovery.GetAWSRegionsParams, i any) middleware.Responder { regions, err := getAWSRegions(g.Discovery) if err != nil { e := misc.HandleError(err) @@ -109,7 +109,7 @@ type ReplaceAWSRegionHandlerImpl struct { UseValidation bool } -func (r ReplaceAWSRegionHandlerImpl) Handle(params service_discovery.ReplaceAWSRegionParams, i interface{}) middleware.Responder { +func (r ReplaceAWSRegionHandlerImpl) Handle(params service_discovery.ReplaceAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.ReplaceAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewReplaceAWSRegionDefault(int(*e.Code)).WithPayload(e) @@ -137,7 +137,7 @@ type DeleteAWSRegionHandlerImpl struct { PersistCallback func([]*models.AwsRegion) error } -func (d DeleteAWSRegionHandlerImpl) Handle(params service_discovery.DeleteAWSRegionParams, i interface{}) middleware.Responder { +func (d DeleteAWSRegionHandlerImpl) Handle(params service_discovery.DeleteAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.DeleteAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewDeleteAWSRegionDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/backend.go b/handlers/backend.go index 7444220f..358cc113 100644 --- a/handlers/backend.go +++ b/handlers/backend.go @@ -158,7 +158,7 @@ func handleDeprecatedBackendFields(method string, payload *models.Backend, onDis } // Handle executing the request and returning a response -func (h *CreateBackendHandlerImpl) Handle(params backend.CreateBackendParams, principal interface{}) middleware.Responder { +func (h *CreateBackendHandlerImpl) Handle(params backend.CreateBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -215,7 +215,7 @@ func (h *CreateBackendHandlerImpl) createBackend(params backend.CreateBackendPar } // Handle executing the request and returning a response -func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -262,7 +262,7 @@ func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, pr } // Handle executing the request and returning a response -func (h *GetBackendHandlerImpl) Handle(params backend.GetBackendParams, principal interface{}) middleware.Responder { +func (h *GetBackendHandlerImpl) Handle(params backend.GetBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -292,7 +292,7 @@ func (h *GetBackendHandlerImpl) getBackend(params backend.GetBackendParams, t st } // Handle executing the request and returning a response -func (h *GetBackendsHandlerImpl) Handle(params backend.GetBackendsParams, principal interface{}) middleware.Responder { +func (h *GetBackendsHandlerImpl) Handle(params backend.GetBackendsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -324,7 +324,7 @@ func (h *GetBackendsHandlerImpl) getBackends(params backend.GetBackendsParams, t } // Handle executing the request and returning a response -func (h *ReplaceBackendHandlerImpl) Handle(params backend.ReplaceBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendHandlerImpl) Handle(params backend.ReplaceBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/backend_switching_rule.go b/handlers/backend_switching_rule.go index b4dd8f87..ee691d7f 100644 --- a/handlers/backend_switching_rule.go +++ b/handlers/backend_switching_rule.go @@ -60,7 +60,7 @@ type ReplaceBackendSwitchingRulesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.CreateBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.CreateBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -105,7 +105,7 @@ func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_ } // Handle executing the request and returning a response -func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.DeleteBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.DeleteBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -153,7 +153,7 @@ func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_ } // Handle executing the request and returning a response -func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -174,7 +174,7 @@ func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rul } // Handle executing the request and returning a response -func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRulesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -198,7 +198,7 @@ func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_ru } // Handle executing the request and returning a response -func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -245,7 +245,7 @@ func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching } // Handle executing the request and returning a response -func (h *ReplaceBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRulesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/bind.go b/handlers/bind.go index c6abf765..9fd15de3 100644 --- a/handlers/bind.go +++ b/handlers/bind.go @@ -70,7 +70,7 @@ func bindTypeParams(frontend *string, parentType *string, parentName *string) (p } // Handle executing the request and returning a response -func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.CreateBindFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.CreateBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -122,7 +122,7 @@ func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.DeleteBindFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.DeleteBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -174,7 +174,7 @@ func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetBindFrontendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params } // Handle executing the request and returning a response -func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetAllBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetAllBindFrontendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -229,7 +229,7 @@ func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.ReplaceBindFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.ReplaceBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/cache.go b/handlers/cache.go index 4e3d0e29..d5aa1afe 100644 --- a/handlers/cache.go +++ b/handlers/cache.go @@ -54,7 +54,7 @@ type ReplaceCacheHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principal interface{}) middleware.Responder { +func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -102,7 +102,7 @@ func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principa } // Handle executing the request and returning a response -func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principal interface{}) middleware.Responder { +func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principa } // Handle executing the request and returning a response -func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal interface{}) middleware.Responder { +func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -170,7 +170,7 @@ func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal inte } // Handle executing the request and returning a response -func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal interface{}) middleware.Responder { +func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -191,7 +191,7 @@ func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal in } // Handle executing the request and returning a response -func (h *ReplaceCacheHandlerImpl) Handle(params cache.ReplaceCacheParams, principal interface{}) middleware.Responder { +func (h *ReplaceCacheHandlerImpl) Handle(params cache.ReplaceCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/capture.go b/handlers/capture.go index 2fc4a4e7..d2f20f9f 100644 --- a/handlers/capture.go +++ b/handlers/capture.go @@ -53,7 +53,7 @@ type ReplaceDeclareCapturesHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -104,7 +104,7 @@ func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCap return capture.NewCreateDeclareCaptureAccepted().WithPayload(params.Data) } -func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCap return capture.NewDeleteDeclareCaptureAccepted() } -func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCaptureParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -175,7 +175,7 @@ func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCapturePa return capture.NewGetDeclareCaptureOK().WithPayload(data) } -func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCapturesParams, principal interface{}) middleware.Responder { +func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCapturesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -205,7 +205,7 @@ func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCaptures return capture.NewGetDeclareCapturesOK().WithPayload(data) } -func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -258,7 +258,7 @@ func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareC } // Handle executing the request and returning a response -func (h *ReplaceDeclareCapturesHandlerImpl) Handle(params capture.ReplaceDeclareCapturesParams, principal interface{}) middleware.Responder { +func (h *ReplaceDeclareCapturesHandlerImpl) Handle(params capture.ReplaceDeclareCapturesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/cluster.go b/handlers/cluster.go index df7a2778..9c49cca2 100644 --- a/handlers/cluster.go +++ b/handlers/cluster.go @@ -63,7 +63,7 @@ type EditClusterHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ClusterInitiateCertificateRefreshHandlerImpl) Handle(params cluster.InitiateCertificateRefreshParams, principal interface{}) middleware.Responder { +func (h *ClusterInitiateCertificateRefreshHandlerImpl) Handle(params cluster.InitiateCertificateRefreshParams, principal any) middleware.Responder { if h.Config.Mode.Load() != configuration.ModeCluster { return cluster.NewInitiateCertificateRefreshForbidden() } @@ -118,7 +118,7 @@ func (h *CreateClusterHandlerImpl) err409(err error, transaction *models.Transac }) } -func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, principal interface{}) middleware.Responder { +func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, principal any) middleware.Responder { key := h.Config.Cluster.BootstrapKey.Load() if params.Data.BootstrapKey != "" && key != params.Data.BootstrapKey { // before we switch to cluster mode, check if folder for storage is compatible with dataplane @@ -159,11 +159,11 @@ func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, prin } // Handle executing the request and returning a response -func (h *GetClusterHandlerImpl) Handle(params cluster.GetClusterParams, principal interface{}) middleware.Responder { +func (h *GetClusterHandlerImpl) Handle(params cluster.GetClusterParams, principal any) middleware.Responder { return cluster.NewGetClusterOK().WithPayload(getClusterSettings(h.Config)) } -func (h *DeleteClusterHandlerImpl) Handle(params cluster.DeleteClusterParams, principal interface{}) middleware.Responder { +func (h *DeleteClusterHandlerImpl) Handle(params cluster.DeleteClusterParams, principal any) middleware.Responder { log.Warningf("received instructions from %s to switch to standalone mode", params.HTTPRequest.RemoteAddr) // Only do when dataplane is in cluster mode, if not, do nothing and return 204 if h.Config.Mode.Load() == configuration.ModeCluster { @@ -240,7 +240,7 @@ func (h *DeleteClusterHandlerImpl) err500(err error, transaction *models.Transac }) } -func (h *EditClusterHandlerImpl) Handle(params cluster.EditClusterParams, principal interface{}) middleware.Responder { +func (h *EditClusterHandlerImpl) Handle(params cluster.EditClusterParams, principal any) middleware.Responder { // Only do when dataplane is in cluster mode, if not, do nothing and return 204 if h.Config.Mode.Load() == configuration.ModeCluster { // for now change only cluster log targets in PUT method @@ -312,7 +312,7 @@ func clusterLogTargetsChanged(oldCLT []*models.ClusterLogTarget, newCLT []*model } } } - return !(eqCtr == len(oldCLT)) + return eqCtr != len(oldCLT) } return true } diff --git a/handlers/consul.go b/handlers/consul.go index 57710c91..7f759204 100644 --- a/handlers/consul.go +++ b/handlers/consul.go @@ -57,7 +57,7 @@ type ReplaceConsulHandlerImpl struct { } // Handle executing the request and returning a response -func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulParams, principal interface{}) middleware.Responder { +func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulParams, principal any) middleware.Responder { params.Data.ID = sc.NewServiceDiscoveryUUID() if err := sc.ValidateConsulData(params.Data, c.UseValidation); err != nil { e := misc.HandleError(err) @@ -89,7 +89,7 @@ func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulPa } // Handle executing the request and returning a response -func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulParams, principal interface{}) middleware.Responder { +func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulParams, principal any) middleware.Responder { err := c.Discovery.RemoveNode("consul", params.ID) if err != nil { e := misc.HandleError(err) @@ -109,7 +109,7 @@ func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulPa } // Handle executing the request and returning a response -func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, principal interface{}) middleware.Responder { +func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, principal any) middleware.Responder { nodes, err := c.Discovery.GetNode("consul", params.ID) if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, } // Handle executing the request and returning a response -func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams, principal interface{}) middleware.Responder { +func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams, principal any) middleware.Responder { consuls, err := getConsuls(c.Discovery) if err != nil { e := misc.HandleError(err) @@ -134,7 +134,7 @@ func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams } // Handle executing the request and returning a response -func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsulParams, principal interface{}) middleware.Responder { +func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsulParams, principal any) middleware.Responder { if err := sc.ValidateConsulData(params.Data, c.UseValidation); err != nil { e := misc.HandleError(err) return service_discovery.NewReplaceConsulDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/crt_load.go b/handlers/crt_load.go index c774fcd3..f52d303c 100644 --- a/handlers/crt_load.go +++ b/handlers/crt_load.go @@ -29,7 +29,7 @@ type GetCrtLoadsHandlerImpl struct { } // Get all loads from crt-stores -func (h *GetCrtLoadsHandlerImpl) Handle(params crt_load.GetCrtLoadsParams, principal interface{}) middleware.Responder { +func (h *GetCrtLoadsHandlerImpl) Handle(params crt_load.GetCrtLoadsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type GetCrtLoadHandlerImpl struct { } // Get one load from a crt-store -func (h *GetCrtLoadHandlerImpl) Handle(params crt_load.GetCrtLoadParams, principal interface{}) middleware.Responder { +func (h *GetCrtLoadHandlerImpl) Handle(params crt_load.GetCrtLoadParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -81,7 +81,7 @@ type CreateCrtLoadHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateCrtLoadHandlerImpl) Handle(params crt_load.CreateCrtLoadParams, principal interface{}) middleware.Responder { +func (h *CreateCrtLoadHandlerImpl) Handle(params crt_load.CreateCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -133,7 +133,7 @@ type ReplaceCrtLoadHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *ReplaceCrtLoadHandler) Handle(params crt_load.ReplaceCrtLoadParams, principal interface{}) middleware.Responder { +func (h *ReplaceCrtLoadHandler) Handle(params crt_load.ReplaceCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -186,7 +186,7 @@ type DeleteCrtLoadHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteCrtLoadHandlerImpl) Handle(params crt_load.DeleteCrtLoadParams, principal interface{}) middleware.Responder { +func (h *DeleteCrtLoadHandlerImpl) Handle(params crt_load.DeleteCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/crt_store.go b/handlers/crt_store.go index 34e0b465..d07e05cc 100644 --- a/handlers/crt_store.go +++ b/handlers/crt_store.go @@ -29,7 +29,7 @@ type GetCrtStoresHandlerImpl struct { } // Get all crt-stores -func (h *GetCrtStoresHandlerImpl) Handle(params crt_store.GetCrtStoresParams, principal interface{}) middleware.Responder { +func (h *GetCrtStoresHandlerImpl) Handle(params crt_store.GetCrtStoresParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type GetCrtStoreHandlerImpl struct { } // Get one crt-store -func (h *GetCrtStoreHandlerImpl) Handle(params crt_store.GetCrtStoreParams, principal interface{}) middleware.Responder { +func (h *GetCrtStoreHandlerImpl) Handle(params crt_store.GetCrtStoreParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -81,7 +81,7 @@ type CreateCrtStoreHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateCrtStoreHandlerImpl) Handle(params crt_store.CreateCrtStoreParams, principal interface{}) middleware.Responder { +func (h *CreateCrtStoreHandlerImpl) Handle(params crt_store.CreateCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -133,7 +133,7 @@ type EditCrtStoreHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *EditCrtStoreHandler) Handle(params crt_store.EditCrtStoreParams, principal interface{}) middleware.Responder { +func (h *EditCrtStoreHandler) Handle(params crt_store.EditCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -173,7 +173,7 @@ type DeleteCrtStoreHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteCrtStoreHandlerImpl) Handle(params crt_store.DeleteCrtStoreParams, principal interface{}) middleware.Responder { +func (h *DeleteCrtStoreHandlerImpl) Handle(params crt_store.DeleteCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/defaults.go b/handlers/defaults.go index cfbaf1cb..3dcde352 100644 --- a/handlers/defaults.go +++ b/handlers/defaults.go @@ -37,7 +37,7 @@ type ReplaceDefaultsHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetDefaultsHandlerImpl) Handle(params defaults.GetDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h *GetDefaultsHandlerImpl) Handle(params defaults.GetDefaultsSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -63,7 +63,7 @@ func (h *GetDefaultsHandlerImpl) getDefaultsConfiguration(params defaults.GetDef } // Handle executing the request and returning a response -func (h *ReplaceDefaultsHandlerImpl) Handle(params defaults.ReplaceDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h *ReplaceDefaultsHandlerImpl) Handle(params defaults.ReplaceDefaultsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -120,7 +120,7 @@ type GetDefaultsSectionsHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetDefaultsSectionsHandlerImpl) Handle(params defaults.GetDefaultsSectionsParams, principal interface{}) middleware.Responder { +func (h GetDefaultsSectionsHandlerImpl) Handle(params defaults.GetDefaultsSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -149,7 +149,7 @@ type GetDefaultsSectionHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetDefaultsSectionHandlerImpl) Handle(params defaults.GetDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h GetDefaultsSectionHandlerImpl) Handle(params defaults.GetDefaultsSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -179,7 +179,7 @@ type CreateDefaultsSectionHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h CreateDefaultsSectionHandlerImpl) Handle(params defaults.CreateDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h CreateDefaultsSectionHandlerImpl) Handle(params defaults.CreateDefaultsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -236,7 +236,7 @@ type ReplaceDefaultsSectionHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h ReplaceDefaultsSectionHandlerImpl) Handle(params defaults.ReplaceDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h ReplaceDefaultsSectionHandlerImpl) Handle(params defaults.ReplaceDefaultsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -292,7 +292,7 @@ type DeleteDefaultsSectionHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h DeleteDefaultsSectionHandlerImpl) Handle(params defaults.DeleteDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h DeleteDefaultsSectionHandlerImpl) Handle(params defaults.DeleteDefaultsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/dgram_bind.go b/handlers/dgram_bind.go index 960ac0e2..2fbb772a 100644 --- a/handlers/dgram_bind.go +++ b/handlers/dgram_bind.go @@ -54,7 +54,7 @@ type ReplaceDgramBindHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateDgramBindHandlerImpl) Handle(params dgram_bind.CreateDgramBindParams, principal interface{}) middleware.Responder { +func (h *CreateDgramBindHandlerImpl) Handle(params dgram_bind.CreateDgramBindParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -102,7 +102,7 @@ func (h *CreateDgramBindHandlerImpl) Handle(params dgram_bind.CreateDgramBindPar } // Handle executing the request and returning a response -func (h *DeleteDgramBindHandlerImpl) Handle(params dgram_bind.DeleteDgramBindParams, principal interface{}) middleware.Responder { +func (h *DeleteDgramBindHandlerImpl) Handle(params dgram_bind.DeleteDgramBindParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteDgramBindHandlerImpl) Handle(params dgram_bind.DeleteDgramBindPar } // Handle executing the request and returning a response -func (h *GetDgramBindHandlerImpl) Handle(params dgram_bind.GetDgramBindParams, principal interface{}) middleware.Responder { +func (h *GetDgramBindHandlerImpl) Handle(params dgram_bind.GetDgramBindParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -170,7 +170,7 @@ func (h *GetDgramBindHandlerImpl) Handle(params dgram_bind.GetDgramBindParams, p } // Handle executing the request and returning a response -func (h *GetDgramBindsHandlerImpl) Handle(params dgram_bind.GetDgramBindsParams, principal interface{}) middleware.Responder { +func (h *GetDgramBindsHandlerImpl) Handle(params dgram_bind.GetDgramBindsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -191,7 +191,7 @@ func (h *GetDgramBindsHandlerImpl) Handle(params dgram_bind.GetDgramBindsParams, } // Handle executing the request and returning a response -func (h *ReplaceDgramBindHandlerImpl) Handle(params dgram_bind.ReplaceDgramBindParams, principal interface{}) middleware.Responder { +func (h *ReplaceDgramBindHandlerImpl) Handle(params dgram_bind.ReplaceDgramBindParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/fcgi_app.go b/handlers/fcgi_app.go index 960bff46..5d182cab 100644 --- a/handlers/fcgi_app.go +++ b/handlers/fcgi_app.go @@ -29,7 +29,7 @@ type CreateFCGIAppHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateFCGIAppHandlerImpl) Handle(params fcgi_app.CreateFCGIAppParams, _ interface{}) middleware.Responder { +func (c CreateFCGIAppHandlerImpl) Handle(params fcgi_app.CreateFCGIAppParams, _ any) middleware.Responder { var t string var v int64 @@ -89,7 +89,7 @@ type DeleteFCGIAppHandlerImpl struct { Client client_native.HAProxyClient } -func (d DeleteFCGIAppHandlerImpl) Handle(params fcgi_app.DeleteFCGIAppParams, _ interface{}) middleware.Responder { +func (d DeleteFCGIAppHandlerImpl) Handle(params fcgi_app.DeleteFCGIAppParams, _ any) middleware.Responder { var t string var v int64 @@ -143,7 +143,7 @@ type GetFCGIAppHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetFCGIAppHandlerImpl) Handle(params fcgi_app.GetFCGIAppParams, _ interface{}) middleware.Responder { +func (g GetFCGIAppHandlerImpl) Handle(params fcgi_app.GetFCGIAppParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -175,7 +175,7 @@ type GetFCGIAppsHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetFCGIAppsHandlerImpl) Handle(params fcgi_app.GetFCGIAppsParams, _ interface{}) middleware.Responder { +func (g GetFCGIAppsHandlerImpl) Handle(params fcgi_app.GetFCGIAppsParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -208,7 +208,7 @@ type ReplaceFCGIAppHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceFCGIAppHandlerImpl) Handle(params fcgi_app.ReplaceFCGIAppParams, _ interface{}) middleware.Responder { +func (r ReplaceFCGIAppHandlerImpl) Handle(params fcgi_app.ReplaceFCGIAppParams, _ any) middleware.Responder { var t string var v int64 diff --git a/handlers/filter.go b/handlers/filter.go index 05d1a7a6..576d8d12 100644 --- a/handlers/filter.go +++ b/handlers/filter.go @@ -61,7 +61,7 @@ type ReplaceAllFilterHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.CreateFilterBackendParams, principal interface{}) middleware.Responder { +func (h *CreateFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.CreateFilterBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -108,7 +108,7 @@ func (h *CreateFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *DeleteFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.DeleteFilterBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.DeleteFilterBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.GetFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.GetFilterBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *GetAllFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.GetAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.GetAllFilterBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetAllFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *ReplaceFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.ReplaceFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.ReplaceFilterBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -247,7 +247,7 @@ func (h *ReplaceFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, p } // Handle executing the request and returning a response -func (h *ReplaceAllFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.ReplaceAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllFilterHandlerImpl) Handle(parentType cnconstants.CnParentType, params filter.ReplaceAllFilterBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/frontend.go b/handlers/frontend.go index 1bf4892b..31c93193 100644 --- a/handlers/frontend.go +++ b/handlers/frontend.go @@ -54,7 +54,7 @@ type ReplaceFrontendHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateFrontendHandlerImpl) Handle(params frontend.CreateFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateFrontendHandlerImpl) Handle(params frontend.CreateFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -106,7 +106,7 @@ func (h *CreateFrontendHandlerImpl) createFrontend(params frontend.CreateFronten } // Handle executing the request and returning a response -func (h *DeleteFrontendHandlerImpl) Handle(params frontend.DeleteFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteFrontendHandlerImpl) Handle(params frontend.DeleteFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -153,7 +153,7 @@ func (h *DeleteFrontendHandlerImpl) Handle(params frontend.DeleteFrontendParams, } // Handle executing the request and returning a response -func (h *GetFrontendHandlerImpl) Handle(params frontend.GetFrontendParams, principal interface{}) middleware.Responder { +func (h *GetFrontendHandlerImpl) Handle(params frontend.GetFrontendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -179,7 +179,7 @@ func (h *GetFrontendHandlerImpl) getFrontend(params frontend.GetFrontendParams, } // Handle executing the request and returning a response -func (h *GetFrontendsHandlerImpl) Handle(params frontend.GetFrontendsParams, principal interface{}) middleware.Responder { +func (h *GetFrontendsHandlerImpl) Handle(params frontend.GetFrontendsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -205,7 +205,7 @@ func (h *GetFrontendsHandlerImpl) getFrontends(params frontend.GetFrontendsParam } // Handle executing the request and returning a response -func (h *ReplaceFrontendHandlerImpl) Handle(params frontend.ReplaceFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFrontendHandlerImpl) Handle(params frontend.ReplaceFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/general_storage.go b/handlers/general_storage.go index 406f7c5e..eea32d87 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -38,7 +38,7 @@ type StorageCreateStorageGeneralFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageCreateStorageGeneralFileHandlerImpl) Handle(params storage.CreateStorageGeneralFileParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageGeneralFileHandlerImpl) Handle(params storage.CreateStorageGeneralFileParams, principal any) middleware.Responder { if params.FileUpload == nil { e := &models.Error{ Code: misc.Int64P(400), @@ -80,7 +80,7 @@ type StorageGetAllStorageGeneralFilesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *StorageGetAllStorageGeneralFilesHandlerImpl) Handle(params storage.GetAllStorageGeneralFilesParams, principal interface{}) middleware.Responder { +func (h *StorageGetAllStorageGeneralFilesHandlerImpl) Handle(params storage.GetAllStorageGeneralFilesParams, principal any) middleware.Responder { gs, err := h.Client.GeneralStorage() if err != nil { e := misc.HandleError(err) @@ -111,7 +111,7 @@ type StorageGetOneStorageGeneralFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageGetOneStorageGeneralFileHandlerImpl) Handle(params storage.GetOneStorageGeneralFileParams, principal interface{}) middleware.Responder { +func (h *StorageGetOneStorageGeneralFileHandlerImpl) Handle(params storage.GetOneStorageGeneralFileParams, principal any) middleware.Responder { gs, err := h.Client.GeneralStorage() if err != nil { e := misc.HandleError(err) @@ -139,7 +139,7 @@ type StorageDeleteStorageGeneralFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageDeleteStorageGeneralFileHandlerImpl) Handle(params storage.DeleteStorageGeneralFileParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageGeneralFileHandlerImpl) Handle(params storage.DeleteStorageGeneralFileParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -190,7 +190,7 @@ type StorageReplaceStorageGeneralFileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.ReplaceStorageGeneralFileParams, principal interface{}) middleware.Responder { +func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.ReplaceStorageGeneralFileParams, principal any) middleware.Responder { gs, err := h.Client.GeneralStorage() if err != nil { e := misc.HandleError(err) diff --git a/handlers/global.go b/handlers/global.go index b4bcaed1..681decd6 100644 --- a/handlers/global.go +++ b/handlers/global.go @@ -37,7 +37,7 @@ type ReplaceGlobalHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetGlobalHandlerImpl) Handle(params global.GetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetGlobalHandlerImpl) Handle(params global.GetGlobalParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -63,7 +63,7 @@ func (h *GetGlobalHandlerImpl) getGlobalConfiguration(params global.GetGlobalPar } // Handle executing the request and returning a response -func (h *ReplaceGlobalHandlerImpl) Handle(params global.ReplaceGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceGlobalHandlerImpl) Handle(params global.ReplaceGlobalParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/group.go b/handlers/group.go index bf4f0ceb..5d150079 100644 --- a/handlers/group.go +++ b/handlers/group.go @@ -54,7 +54,7 @@ type ReplaceGroupHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principal interface{}) middleware.Responder { +func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principa } // Handle executing the request and returning a response -func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principal interface{}) middleware.Responder { +func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principa } // Handle executing the request and returning a response -func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal interface{}) middleware.Responder { +func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -182,7 +182,7 @@ func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal inte } // Handle executing the request and returning a response -func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal interface{}) middleware.Responder { +func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -214,7 +214,7 @@ func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal in } // Handle executing the request and returning a response -func (h *ReplaceGroupHandlerImpl) Handle(params group.ReplaceGroupParams, principal interface{}) middleware.Responder { +func (h *ReplaceGroupHandlerImpl) Handle(params group.ReplaceGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/health.go b/handlers/health.go index 66a3285a..910a9bd2 100644 --- a/handlers/health.go +++ b/handlers/health.go @@ -12,7 +12,7 @@ type GetHealthHandlerImpl struct { HAProxy haproxy.IReloadAgent } -func (h *GetHealthHandlerImpl) Handle(health.GetHealthParams, interface{}) middleware.Responder { +func (h *GetHealthHandlerImpl) Handle(health.GetHealthParams, any) middleware.Responder { data := models.Health{} status, err := h.HAProxy.Status() if err == nil { diff --git a/handlers/http_after_response_rule.go b/handlers/http_after_response_rule.go index 516ba0dc..9a58c44a 100644 --- a/handlers/http_after_response_rule.go +++ b/handlers/http_after_response_rule.go @@ -16,7 +16,7 @@ type CreateHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -67,7 +67,7 @@ type DeleteHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -117,7 +117,7 @@ type GetHTTPAfterResponseRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (g GetHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -143,7 +143,7 @@ type GetAllHTTPAfterResponseRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (g GetAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -170,7 +170,7 @@ type ReplaceHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -222,7 +222,7 @@ type ReplaceAllHTTPAfterResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_check.go b/handlers/http_check.go index 778fcb75..76477ca8 100644 --- a/handlers/http_check.go +++ b/handlers/http_check.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPCheckHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.CreateHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.CreateHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.DeleteHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.DeleteHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetHTTPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetAllHTTPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceAllHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_error_rule.go b/handlers/http_error_rule.go index 00ccf250..ffa0015f 100644 --- a/handlers/http_error_rule.go +++ b/handlers/http_error_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPErrorRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.CreateHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.CreateHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType } // Handle executing the request and returning a response -func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -247,7 +247,7 @@ func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParent return http_error_rule.NewReplaceHTTPErrorRuleBackendAccepted().WithPayload(params.Data) } -func (h *ReplaceAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_errors.go b/handlers/http_errors.go index 4316b343..54879cf5 100644 --- a/handlers/http_errors.go +++ b/handlers/http_errors.go @@ -53,7 +53,7 @@ type ReplaceHTTPErrorsSectionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTT } // Handle executing the request and returning a response -func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTT } // Handle executing the request and returning a response -func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -171,7 +171,7 @@ func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPError } // Handle executing the request and returning a response -func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -192,7 +192,7 @@ func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErro return http_errors.NewGetHTTPErrorsSectionsOK().WithPayload(ms) } -func (h *ReplaceHTTPErrorsSectionHandlerImpl) Handle(params http_errors.ReplaceHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorsSectionHandlerImpl) Handle(params http_errors.ReplaceHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_request_rule.go b/handlers/http_request_rule.go index 8b5732b1..4e378f8e 100644 --- a/handlers/http_request_rule.go +++ b/handlers/http_request_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPRequestRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.CreateHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.CreateHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentTy } // Handle executing the request and returning a response -func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_response_rule.go b/handlers/http_response_rule.go index 075f9da7..b244a7bd 100644 --- a/handlers/http_response_rule.go +++ b/handlers/http_response_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.CreateHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.CreateHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPar } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/information.go b/handlers/information.go index ed8fe241..723fcf5b 100644 --- a/handlers/information.go +++ b/handlers/information.go @@ -42,7 +42,7 @@ type GetHaproxyProcessInfoHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetHaproxyProcessInfoHandlerImpl) Handle(params information.GetHaproxyProcessInfoParams, principal interface{}) middleware.Responder { +func (h *GetHaproxyProcessInfoHandlerImpl) Handle(params information.GetHaproxyProcessInfoParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -70,7 +70,7 @@ type GetInfoHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetInfoHandlerImpl) Handle(params information.GetInfoParams, principal interface{}) middleware.Responder { +func (h *GetInfoHandlerImpl) Handle(params information.GetInfoParams, principal any) middleware.Responder { api := &models.InfoAPI{ Version: h.Version, } diff --git a/handlers/log_forward.go b/handlers/log_forward.go index dd302e80..f66fec4b 100644 --- a/handlers/log_forward.go +++ b/handlers/log_forward.go @@ -54,7 +54,7 @@ type ReplaceLogForwardHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateLogForwardHandlerImpl) Handle(params log_forward.CreateLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateLogForwardHandlerImpl) Handle(params log_forward.CreateLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateLogForwardHandlerImpl) createLogForward(params log_forward.Create } // Handle executing the request and returning a response -func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForward } // Handle executing the request and returning a response -func (h *GetLogForwardHandlerImpl) Handle(params log_forward.GetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetLogForwardHandlerImpl) Handle(params log_forward.GetLogForwardParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -180,7 +180,7 @@ func (h *GetLogForwardHandlerImpl) getLogForward(params log_forward.GetLogForwar } // Handle executing the request and returning a response -func (h *GetLogForwardsHandlerImpl) Handle(params log_forward.GetLogForwardsParams, principal interface{}) middleware.Responder { +func (h *GetLogForwardsHandlerImpl) Handle(params log_forward.GetLogForwardsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -206,7 +206,7 @@ func (h *GetLogForwardsHandlerImpl) getLogForwards(params log_forward.GetLogForw } // Handle executing the request and returning a response -func (h *ReplaceLogForwardHandlerImpl) Handle(params log_forward.ReplaceLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogForwardHandlerImpl) Handle(params log_forward.ReplaceLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/log_target.go b/handlers/log_target.go index c5c22dac..e6767a9e 100644 --- a/handlers/log_target.go +++ b/handlers/log_target.go @@ -61,7 +61,7 @@ type ReplaceAllLogTargetHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.CreateLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.CreateLogTargetBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *DeleteLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.DeleteLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.DeleteLogTargetBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -157,7 +157,7 @@ func (h *DeleteLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *GetLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.GetLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.GetLogTargetBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -178,7 +178,7 @@ func (h *GetLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetAllLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.GetAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.GetAllLogTargetBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -202,7 +202,7 @@ func (h *GetAllLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *ReplaceLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.ReplaceLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.ReplaceLogTargetBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -253,7 +253,7 @@ func logTargetParentTypeRequiresParentName(parentType string) bool { } // Handle executing the request and returning a response -func (h *ReplaceAllLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.ReplaceAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetHandlerImpl) Handle(parentType cnconstants.CnParentType, params log_target.ReplaceAllLogTargetBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/mailer_entry.go b/handlers/mailer_entry.go index 1b08dbc3..2f75df65 100644 --- a/handlers/mailer_entry.go +++ b/handlers/mailer_entry.go @@ -48,7 +48,7 @@ type ReplaceMailerEntryHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateMailerEntryHandlerImpl) Handle(params mailer_entry.CreateMailerEntryParams, principal interface{}) middleware.Responder { +func (h *CreateMailerEntryHandlerImpl) Handle(params mailer_entry.CreateMailerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -95,7 +95,7 @@ func (h *CreateMailerEntryHandlerImpl) Handle(params mailer_entry.CreateMailerEn } // Handle executing the request and returning a response -func (h *DeleteMailerEntryHandlerImpl) Handle(params mailer_entry.DeleteMailerEntryParams, principal interface{}) middleware.Responder { +func (h *DeleteMailerEntryHandlerImpl) Handle(params mailer_entry.DeleteMailerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -142,7 +142,7 @@ func (h *DeleteMailerEntryHandlerImpl) Handle(params mailer_entry.DeleteMailerEn } // Handle executing the request and returning a response -func (h *GetMailerEntryHandlerImpl) Handle(params mailer_entry.GetMailerEntryParams, principal interface{}) middleware.Responder { +func (h *GetMailerEntryHandlerImpl) Handle(params mailer_entry.GetMailerEntryParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -163,7 +163,7 @@ func (h *GetMailerEntryHandlerImpl) Handle(params mailer_entry.GetMailerEntryPar } // Handle executing the request and returning a response -func (h *GetMailerEntriesHandlerImpl) Handle(params mailer_entry.GetMailerEntriesParams, principal interface{}) middleware.Responder { +func (h *GetMailerEntriesHandlerImpl) Handle(params mailer_entry.GetMailerEntriesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -184,7 +184,7 @@ func (h *GetMailerEntriesHandlerImpl) Handle(params mailer_entry.GetMailerEntrie } // Handle executing the request and returning a response -func (h *ReplaceMailerEntryHandlerImpl) Handle(params mailer_entry.ReplaceMailerEntryParams, principal interface{}) middleware.Responder { +func (h *ReplaceMailerEntryHandlerImpl) Handle(params mailer_entry.ReplaceMailerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/mailers.go b/handlers/mailers.go index 6f919a50..58584dd8 100644 --- a/handlers/mailers.go +++ b/handlers/mailers.go @@ -53,7 +53,7 @@ type EditMailersSectionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateMailersSectionHandlerImpl) Handle(params mailers.CreateMailersSectionParams, principal interface{}) middleware.Responder { +func (h *CreateMailersSectionHandlerImpl) Handle(params mailers.CreateMailersSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -106,7 +106,7 @@ func (h *CreateMailersSectionHandlerImpl) createMailersSection(params mailers.Cr } // Handle executing the request and returning a response -func (h *DeleteMailersSectionHandlerImpl) Handle(params mailers.DeleteMailersSectionParams, principal interface{}) middleware.Responder { +func (h *DeleteMailersSectionHandlerImpl) Handle(params mailers.DeleteMailersSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeleteMailersSectionHandlerImpl) Handle(params mailers.DeleteMailersSec } // Handle executing the request and returning a response -func (h *GetMailersSectionHandlerImpl) Handle(params mailers.GetMailersSectionParams, principal interface{}) middleware.Responder { +func (h *GetMailersSectionHandlerImpl) Handle(params mailers.GetMailersSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -181,7 +181,7 @@ func (h *GetMailersSectionHandlerImpl) getMailersSection(params mailers.GetMaile } // Handle executing the request and returning a response -func (h *GetMailersSectionsHandlerImpl) Handle(params mailers.GetMailersSectionsParams, principal interface{}) middleware.Responder { +func (h *GetMailersSectionsHandlerImpl) Handle(params mailers.GetMailersSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -207,7 +207,7 @@ func (h *GetMailersSectionsHandlerImpl) getMailersSections(params mailers.GetMai return configuration.GetMailersSections(t) } -func (h *EditMailersSectionHandlerImpl) Handle(params mailers.EditMailersSectionParams, principal interface{}) middleware.Responder { +func (h *EditMailersSectionHandlerImpl) Handle(params mailers.EditMailersSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/map.go b/handlers/map.go index 187e5ec8..e7b0a8af 100644 --- a/handlers/map.go +++ b/handlers/map.go @@ -34,7 +34,7 @@ type GetMapsHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetMapsHandlerImpl) Handle(params maps.GetAllRuntimeMapFilesParams, principal interface{}) middleware.Responder { +func (h *GetMapsHandlerImpl) Handle(params maps.GetAllRuntimeMapFilesParams, principal any) middleware.Responder { mapList := []*models.Map{} runtime, err := h.Client.Runtime() @@ -71,7 +71,7 @@ type GetMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetMapHandlerImpl) Handle(params maps.GetOneRuntimeMapParams, principal interface{}) middleware.Responder { +func (h *GetMapHandlerImpl) Handle(params maps.GetOneRuntimeMapParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -94,7 +94,7 @@ type ClearMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *ClearMapHandlerImpl) Handle(params maps.ClearRuntimeMapParams, principal interface{}) middleware.Responder { +func (h *ClearMapHandlerImpl) Handle(params maps.ClearRuntimeMapParams, principal any) middleware.Responder { forceDelete := false if params.ForceDelete != nil { forceDelete = *params.ForceDelete @@ -132,7 +132,7 @@ type ShowMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *ShowMapHandlerImpl) Handle(params maps.ShowRuntimeMapParams, principal interface{}) middleware.Responder { +func (h *ShowMapHandlerImpl) Handle(params maps.ShowRuntimeMapParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -154,7 +154,7 @@ type AddMapEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h *AddMapEntryHandlerImpl) Handle(params maps.AddMapEntryParams, principal interface{}) middleware.Responder { +func (h *AddMapEntryHandlerImpl) Handle(params maps.AddMapEntryParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -186,7 +186,7 @@ type MapsAddPayloadRuntimeMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *MapsAddPayloadRuntimeMapHandlerImpl) Handle(params maps.AddPayloadRuntimeMapParams, principal interface{}) middleware.Responder { +func (h *MapsAddPayloadRuntimeMapHandlerImpl) Handle(params maps.AddPayloadRuntimeMapParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -218,7 +218,7 @@ type GetRuntimeMapEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetRuntimeMapEntryHandlerImpl) Handle(params maps.GetRuntimeMapEntryParams, principal interface{}) middleware.Responder { +func (h *GetRuntimeMapEntryHandlerImpl) Handle(params maps.GetRuntimeMapEntryParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -240,7 +240,7 @@ type ReplaceRuntimeMapEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h *ReplaceRuntimeMapEntryHandlerImpl) Handle(params maps.ReplaceRuntimeMapEntryParams, principal interface{}) middleware.Responder { +func (h *ReplaceRuntimeMapEntryHandlerImpl) Handle(params maps.ReplaceRuntimeMapEntryParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -277,7 +277,7 @@ type DeleteRuntimeMapEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h *DeleteRuntimeMapEntryHandlerImpl) Handle(params maps.DeleteRuntimeMapEntryParams, principal interface{}) middleware.Responder { +func (h *DeleteRuntimeMapEntryHandlerImpl) Handle(params maps.DeleteRuntimeMapEntryParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/map_storage.go b/handlers/map_storage.go index e15e6dfd..f819fdb1 100644 --- a/handlers/map_storage.go +++ b/handlers/map_storage.go @@ -37,7 +37,7 @@ type StorageCreateStorageMapFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageCreateStorageMapFileHandlerImpl) Handle(params storage.CreateStorageMapFileParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageMapFileHandlerImpl) Handle(params storage.CreateStorageMapFileParams, principal any) middleware.Responder { file, ok := params.FileUpload.(*runtime.File) if !ok { return storage.NewCreateStorageMapFileBadRequest() @@ -72,7 +72,7 @@ type GetAllStorageMapFilesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetAllStorageMapFilesHandlerImpl) Handle(params storage.GetAllStorageMapFilesParams, principal interface{}) middleware.Responder { +func (h *GetAllStorageMapFilesHandlerImpl) Handle(params storage.GetAllStorageMapFilesParams, principal any) middleware.Responder { st, err := h.Client.MapStorage() if err != nil { e := misc.HandleError(err) @@ -104,7 +104,7 @@ type GetOneStorageMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetOneStorageMapHandlerImpl) Handle(params storage.GetOneStorageMapParams, principal interface{}) middleware.Responder { +func (h *GetOneStorageMapHandlerImpl) Handle(params storage.GetOneStorageMapParams, principal any) middleware.Responder { st, err := h.Client.MapStorage() if err != nil { e := misc.HandleError(err) @@ -132,7 +132,7 @@ type StorageDeleteStorageMapHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageDeleteStorageMapHandlerImpl) Handle(params storage.DeleteStorageMapParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageMapHandlerImpl) Handle(params storage.DeleteStorageMapParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -183,7 +183,7 @@ type StorageReplaceStorageMapFileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageReplaceStorageMapFileHandlerImpl) Handle(params storage.ReplaceStorageMapFileParams, principal interface{}) middleware.Responder { +func (h *StorageReplaceStorageMapFileHandlerImpl) Handle(params storage.ReplaceStorageMapFileParams, principal any) middleware.Responder { st, err := h.Client.MapStorage() if err != nil { e := misc.HandleError(err) diff --git a/handlers/nameserver.go b/handlers/nameserver.go index b7ffeec4..50fa77ce 100644 --- a/handlers/nameserver.go +++ b/handlers/nameserver.go @@ -54,7 +54,7 @@ type ReplaceNameserverHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateNameserverHandlerImpl) Handle(params nameserver.CreateNameserverParams, principal interface{}) middleware.Responder { +func (h *CreateNameserverHandlerImpl) Handle(params nameserver.CreateNameserverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -100,7 +100,7 @@ func (h *CreateNameserverHandlerImpl) Handle(params nameserver.CreateNameserverP } // Handle executing the request and returning a response -func (h *DeleteNameserverHandlerImpl) Handle(params nameserver.DeleteNameserverParams, principal interface{}) middleware.Responder { +func (h *DeleteNameserverHandlerImpl) Handle(params nameserver.DeleteNameserverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -147,7 +147,7 @@ func (h *DeleteNameserverHandlerImpl) Handle(params nameserver.DeleteNameserverP } // Handle executing the request and returning a response -func (h *GetNameserverHandlerImpl) Handle(params nameserver.GetNameserverParams, principal interface{}) middleware.Responder { +func (h *GetNameserverHandlerImpl) Handle(params nameserver.GetNameserverParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -168,7 +168,7 @@ func (h *GetNameserverHandlerImpl) Handle(params nameserver.GetNameserverParams, } // Handle executing the request and returning a response -func (h *GetNameserversHandlerImpl) Handle(params nameserver.GetNameserversParams, principal interface{}) middleware.Responder { +func (h *GetNameserversHandlerImpl) Handle(params nameserver.GetNameserversParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -189,7 +189,7 @@ func (h *GetNameserversHandlerImpl) Handle(params nameserver.GetNameserversParam } // Handle executing the request and returning a response -func (h *ReplaceNameserverHandlerImpl) Handle(params nameserver.ReplaceNameserverParams, principal interface{}) middleware.Responder { +func (h *ReplaceNameserverHandlerImpl) Handle(params nameserver.ReplaceNameserverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/parent_acl_generated.go b/handlers/parent_acl_generated.go index 9571cc22..dabdad82 100644 --- a/handlers/parent_acl_generated.go +++ b/handlers/parent_acl_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllACLFCGIAppHandlerImpl ReplaceAllACLHandlerImpl ) -func (h *CreateACLBackendHandlerImpl) Handle(params acl.CreateACLBackendParams, principal interface{}) middleware.Responder { +func (h *CreateACLBackendHandlerImpl) Handle(params acl.CreateACLBackendParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateACLFrontendHandlerImpl) Handle(params acl.CreateACLFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateACLFrontendHandlerImpl) Handle(params acl.CreateACLFrontendParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) pg := acl.CreateACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateACLFCGIAppHandlerImpl) Handle(params acl.CreateACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *CreateACLFCGIAppHandlerImpl) Handle(params acl.CreateACLFCGIAppParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) pg := acl.CreateACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *GetACLBackendHandlerImpl) Handle(params acl.GetACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetACLBackendHandlerImpl) Handle(params acl.GetACLBackendParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetACLFrontendHandlerImpl) Handle(params acl.GetACLFrontendParams, principal interface{}) middleware.Responder { +func (h *GetACLFrontendHandlerImpl) Handle(params acl.GetACLFrontendParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) pg := acl.GetACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetACLFCGIAppHandlerImpl) Handle(params acl.GetACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *GetACLFCGIAppHandlerImpl) Handle(params acl.GetACLFCGIAppParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) pg := acl.GetACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *GetAllACLBackendHandlerImpl) Handle(params acl.GetAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLBackendHandlerImpl) Handle(params acl.GetAllACLBackendParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllACLFrontendHandlerImpl) Handle(params acl.GetAllACLFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLFrontendHandlerImpl) Handle(params acl.GetAllACLFrontendParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) pg := acl.GetAllACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllACLFCGIAppHandlerImpl) Handle(params acl.GetAllACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *GetAllACLFCGIAppHandlerImpl) Handle(params acl.GetAllACLFCGIAppParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) pg := acl.GetAllACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *DeleteACLBackendHandlerImpl) Handle(params acl.DeleteACLBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLBackendHandlerImpl) Handle(params acl.DeleteACLBackendParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteACLFrontendHandlerImpl) Handle(params acl.DeleteACLFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLFrontendHandlerImpl) Handle(params acl.DeleteACLFrontendParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) pg := acl.DeleteACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteACLFCGIAppHandlerImpl) Handle(params acl.DeleteACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *DeleteACLFCGIAppHandlerImpl) Handle(params acl.DeleteACLFCGIAppParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) pg := acl.DeleteACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *ReplaceACLBackendHandlerImpl) Handle(params acl.ReplaceACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLBackendHandlerImpl) Handle(params acl.ReplaceACLBackendParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceACLFrontendHandlerImpl) Handle(params acl.ReplaceACLFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLFrontendHandlerImpl) Handle(params acl.ReplaceACLFrontendParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) pg := acl.ReplaceACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceACLFCGIAppHandlerImpl) Handle(params acl.ReplaceACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLFCGIAppHandlerImpl) Handle(params acl.ReplaceACLFCGIAppParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) pg := acl.ReplaceACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *ReplaceAllACLBackendHandlerImpl) Handle(params acl.ReplaceAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLBackendHandlerImpl) Handle(params acl.ReplaceAllACLBackendParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllACLFrontendHandlerImpl) Handle(params acl.ReplaceAllACLFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLFrontendHandlerImpl) Handle(params acl.ReplaceAllACLFrontendParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) pg := acl.ReplaceAllACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllACLFCGIAppHandlerImpl) Handle(params acl.ReplaceAllACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLFCGIAppHandlerImpl) Handle(params acl.ReplaceAllACLFCGIAppParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) pg := acl.ReplaceAllACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) diff --git a/handlers/parent_bind_generated.go b/handlers/parent_bind_generated.go index 5adcd93f..fe58c618 100644 --- a/handlers/parent_bind_generated.go +++ b/handlers/parent_bind_generated.go @@ -50,86 +50,86 @@ type ( ReplaceBindPeerHandlerImpl ReplaceBindHandlerImpl ) -func (h *CreateBindFrontendHandlerImpl) Handle(params bind.CreateBindFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateBindFrontendHandlerImpl) Handle(params bind.CreateBindFrontendParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *CreateBindLogForwardHandlerImpl) Handle(params bind.CreateBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateBindLogForwardHandlerImpl) Handle(params bind.CreateBindLogForwardParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) pg := bind.CreateBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *CreateBindPeerHandlerImpl) Handle(params bind.CreateBindPeerParams, principal interface{}) middleware.Responder { +func (h *CreateBindPeerHandlerImpl) Handle(params bind.CreateBindPeerParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) pg := bind.CreateBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetBindFrontendHandlerImpl) Handle(params bind.GetBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetBindFrontendHandlerImpl) Handle(params bind.GetBindFrontendParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetBindLogForwardHandlerImpl) Handle(params bind.GetBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetBindLogForwardHandlerImpl) Handle(params bind.GetBindLogForwardParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) pg := bind.GetBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetBindPeerHandlerImpl) Handle(params bind.GetBindPeerParams, principal interface{}) middleware.Responder { +func (h *GetBindPeerHandlerImpl) Handle(params bind.GetBindPeerParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) pg := bind.GetBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetAllBindFrontendHandlerImpl) Handle(params bind.GetAllBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllBindFrontendHandlerImpl) Handle(params bind.GetAllBindFrontendParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetAllBindLogForwardHandlerImpl) Handle(params bind.GetAllBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetAllBindLogForwardHandlerImpl) Handle(params bind.GetAllBindLogForwardParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) pg := bind.GetAllBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetAllBindPeerHandlerImpl) Handle(params bind.GetAllBindPeerParams, principal interface{}) middleware.Responder { +func (h *GetAllBindPeerHandlerImpl) Handle(params bind.GetAllBindPeerParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) pg := bind.GetAllBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *DeleteBindFrontendHandlerImpl) Handle(params bind.DeleteBindFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteBindFrontendHandlerImpl) Handle(params bind.DeleteBindFrontendParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *DeleteBindLogForwardHandlerImpl) Handle(params bind.DeleteBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteBindLogForwardHandlerImpl) Handle(params bind.DeleteBindLogForwardParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) pg := bind.DeleteBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *DeleteBindPeerHandlerImpl) Handle(params bind.DeleteBindPeerParams, principal interface{}) middleware.Responder { +func (h *DeleteBindPeerHandlerImpl) Handle(params bind.DeleteBindPeerParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) pg := bind.DeleteBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceBindFrontendHandlerImpl) Handle(params bind.ReplaceBindFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindFrontendHandlerImpl) Handle(params bind.ReplaceBindFrontendParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *ReplaceBindLogForwardHandlerImpl) Handle(params bind.ReplaceBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindLogForwardHandlerImpl) Handle(params bind.ReplaceBindLogForwardParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) pg := bind.ReplaceBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceBindPeerHandlerImpl) Handle(params bind.ReplaceBindPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindPeerHandlerImpl) Handle(params bind.ReplaceBindPeerParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) pg := bind.ReplaceBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) diff --git a/handlers/parent_filter_generated.go b/handlers/parent_filter_generated.go index 6ec3fea1..a9401717 100644 --- a/handlers/parent_filter_generated.go +++ b/handlers/parent_filter_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllFilterFrontendHandlerImpl ReplaceAllFilterHandlerImpl ) -func (h *CreateFilterBackendHandlerImpl) Handle(params filter.CreateFilterBackendParams, principal interface{}) middleware.Responder { +func (h *CreateFilterBackendHandlerImpl) Handle(params filter.CreateFilterBackendParams, principal any) middleware.Responder { g := CreateFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateFilterFrontendHandlerImpl) Handle(params filter.CreateFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateFilterFrontendHandlerImpl) Handle(params filter.CreateFilterFrontendParams, principal any) middleware.Responder { g := CreateFilterHandlerImpl(*h) pg := filter.CreateFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetFilterBackendHandlerImpl) Handle(params filter.GetFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetFilterBackendHandlerImpl) Handle(params filter.GetFilterBackendParams, principal any) middleware.Responder { g := GetFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetFilterFrontendHandlerImpl) Handle(params filter.GetFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *GetFilterFrontendHandlerImpl) Handle(params filter.GetFilterFrontendParams, principal any) middleware.Responder { g := GetFilterHandlerImpl(*h) pg := filter.GetFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllFilterBackendHandlerImpl) Handle(params filter.GetAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllFilterBackendHandlerImpl) Handle(params filter.GetAllFilterBackendParams, principal any) middleware.Responder { g := GetAllFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllFilterFrontendHandlerImpl) Handle(params filter.GetAllFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllFilterFrontendHandlerImpl) Handle(params filter.GetAllFilterFrontendParams, principal any) middleware.Responder { g := GetAllFilterHandlerImpl(*h) pg := filter.GetAllFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteFilterBackendHandlerImpl) Handle(params filter.DeleteFilterBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteFilterBackendHandlerImpl) Handle(params filter.DeleteFilterBackendParams, principal any) middleware.Responder { g := DeleteFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteFilterFrontendHandlerImpl) Handle(params filter.DeleteFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteFilterFrontendHandlerImpl) Handle(params filter.DeleteFilterFrontendParams, principal any) middleware.Responder { g := DeleteFilterHandlerImpl(*h) pg := filter.DeleteFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceFilterBackendHandlerImpl) Handle(params filter.ReplaceFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFilterBackendHandlerImpl) Handle(params filter.ReplaceFilterBackendParams, principal any) middleware.Responder { g := ReplaceFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceFilterFrontendHandlerImpl) Handle(params filter.ReplaceFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFilterFrontendHandlerImpl) Handle(params filter.ReplaceFilterFrontendParams, principal any) middleware.Responder { g := ReplaceFilterHandlerImpl(*h) pg := filter.ReplaceFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllFilterBackendHandlerImpl) Handle(params filter.ReplaceAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllFilterBackendHandlerImpl) Handle(params filter.ReplaceAllFilterBackendParams, principal any) middleware.Responder { g := ReplaceAllFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllFilterFrontendHandlerImpl) Handle(params filter.ReplaceAllFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllFilterFrontendHandlerImpl) Handle(params filter.ReplaceAllFilterFrontendParams, principal any) middleware.Responder { g := ReplaceAllFilterHandlerImpl(*h) pg := filter.ReplaceAllFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_after_response_rule_generated.go b/handlers/parent_http_after_response_rule_generated.go index f93491ff..76109286 100644 --- a/handlers/parent_http_after_response_rule_generated.go +++ b/handlers/parent_http_after_response_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl ReplaceAllHTTPAfterResponseRuleHandlerImpl ) -func (h *CreateHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := GetHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_check_generated.go b/handlers/parent_http_check_generated.go index 67405ba6..5746f4af 100644 --- a/handlers/parent_http_check_generated.go +++ b/handlers/parent_http_check_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPCheckDefaultsHandlerImpl ReplaceAllHTTPCheckHandlerImpl ) -func (h *CreateHTTPCheckBackendHandlerImpl) Handle(params http_check.CreateHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckBackendHandlerImpl) Handle(params http_check.CreateHTTPCheckBackendParams, principal any) middleware.Responder { g := CreateHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPCheckDefaultsHandlerImpl) Handle(params http_check.CreateHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckDefaultsHandlerImpl) Handle(params http_check.CreateHTTPCheckDefaultsParams, principal any) middleware.Responder { g := CreateHTTPCheckHandlerImpl(*h) pg := http_check.CreateHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetHTTPCheckBackendHandlerImpl) Handle(params http_check.GetHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckBackendHandlerImpl) Handle(params http_check.GetHTTPCheckBackendParams, principal any) middleware.Responder { g := GetHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetHTTPCheckDefaultsParams, principal any) middleware.Responder { g := GetHTTPCheckHandlerImpl(*h) pg := http_check.GetHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllHTTPCheckBackendHandlerImpl) Handle(params http_check.GetAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckBackendHandlerImpl) Handle(params http_check.GetAllHTTPCheckBackendParams, principal any) middleware.Responder { g := GetAllHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetAllHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetAllHTTPCheckDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPCheckHandlerImpl(*h) pg := http_check.GetAllHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteHTTPCheckBackendHandlerImpl) Handle(params http_check.DeleteHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckBackendHandlerImpl) Handle(params http_check.DeleteHTTPCheckBackendParams, principal any) middleware.Responder { g := DeleteHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPCheckDefaultsHandlerImpl) Handle(params http_check.DeleteHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckDefaultsHandlerImpl) Handle(params http_check.DeleteHTTPCheckDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPCheckHandlerImpl(*h) pg := http_check.DeleteHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceHTTPCheckBackendParams, principal any) middleware.Responder { g := ReplaceHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceHTTPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPCheckHandlerImpl(*h) pg := http_check.ReplaceHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPCheckHandlerImpl(*h) pg := http_check.ReplaceAllHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_http_error_rule_generated.go b/handlers/parent_http_error_rule_generated.go index 40e21d55..0949d140 100644 --- a/handlers/parent_http_error_rule_generated.go +++ b/handlers/parent_http_error_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllHTTPErrorRuleDefaultsHandlerImpl ReplaceAllHTTPErrorRuleHandlerImpl ) -func (h *CreateHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.CreateHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.CreateHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.DeleteHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.DeleteHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_http_request_rule_generated.go b/handlers/parent_http_request_rule_generated.go index 97e2f6c6..913bebdb 100644 --- a/handlers/parent_http_request_rule_generated.go +++ b/handlers/parent_http_request_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPRequestRuleFrontendHandlerImpl ReplaceAllHTTPRequestRuleHandlerImpl ) -func (h *CreateHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.CreateHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := GetHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.DeleteHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_response_rule_generated.go b/handlers/parent_http_response_rule_generated.go index 228af231..2798adb3 100644 --- a/handlers/parent_http_response_rule_generated.go +++ b/handlers/parent_http_response_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPResponseRuleFrontendHandlerImpl ReplaceAllHTTPResponseRuleHandlerImpl ) -func (h *CreateHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.CreateHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := GetHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.DeleteHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_log_target_generated.go b/handlers/parent_log_target_generated.go index 3bcb74d0..b2fb408d 100644 --- a/handlers/parent_log_target_generated.go +++ b/handlers/parent_log_target_generated.go @@ -68,175 +68,175 @@ type ( ReplaceAllLogTargetLogForwardHandlerImpl ReplaceAllLogTargetHandlerImpl ) -func (h *CreateLogTargetBackendHandlerImpl) Handle(params log_target.CreateLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetBackendHandlerImpl) Handle(params log_target.CreateLogTargetBackendParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateLogTargetFrontendHandlerImpl) Handle(params log_target.CreateLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetFrontendHandlerImpl) Handle(params log_target.CreateLogTargetFrontendParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateLogTargetDefaultsHandlerImpl) Handle(params log_target.CreateLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetDefaultsHandlerImpl) Handle(params log_target.CreateLogTargetDefaultsParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *CreateLogTargetPeerHandlerImpl) Handle(params log_target.CreateLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetPeerHandlerImpl) Handle(params log_target.CreateLogTargetPeerParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *CreateLogTargetLogForwardHandlerImpl) Handle(params log_target.CreateLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetLogForwardHandlerImpl) Handle(params log_target.CreateLogTargetLogForwardParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetLogTargetBackendHandlerImpl) Handle(params log_target.GetLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetBackendHandlerImpl) Handle(params log_target.GetLogTargetBackendParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetLogTargetFrontendHandlerImpl) Handle(params log_target.GetLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetFrontendHandlerImpl) Handle(params log_target.GetLogTargetFrontendParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetLogTargetDefaultsHandlerImpl) Handle(params log_target.GetLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetDefaultsHandlerImpl) Handle(params log_target.GetLogTargetDefaultsParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetLogTargetPeerHandlerImpl) Handle(params log_target.GetLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetPeerHandlerImpl) Handle(params log_target.GetLogTargetPeerParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetLogTargetLogForwardHandlerImpl) Handle(params log_target.GetLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetLogForwardHandlerImpl) Handle(params log_target.GetLogTargetLogForwardParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetAllLogTargetBackendHandlerImpl) Handle(params log_target.GetAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetBackendHandlerImpl) Handle(params log_target.GetAllLogTargetBackendParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllLogTargetFrontendHandlerImpl) Handle(params log_target.GetAllLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetFrontendHandlerImpl) Handle(params log_target.GetAllLogTargetFrontendParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllLogTargetDefaultsHandlerImpl) Handle(params log_target.GetAllLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetDefaultsHandlerImpl) Handle(params log_target.GetAllLogTargetDefaultsParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllLogTargetPeerHandlerImpl) Handle(params log_target.GetAllLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetPeerHandlerImpl) Handle(params log_target.GetAllLogTargetPeerParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetAllLogTargetLogForwardHandlerImpl) Handle(params log_target.GetAllLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetLogForwardHandlerImpl) Handle(params log_target.GetAllLogTargetLogForwardParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *DeleteLogTargetBackendHandlerImpl) Handle(params log_target.DeleteLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetBackendHandlerImpl) Handle(params log_target.DeleteLogTargetBackendParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteLogTargetFrontendHandlerImpl) Handle(params log_target.DeleteLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetFrontendHandlerImpl) Handle(params log_target.DeleteLogTargetFrontendParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteLogTargetDefaultsHandlerImpl) Handle(params log_target.DeleteLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetDefaultsHandlerImpl) Handle(params log_target.DeleteLogTargetDefaultsParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteLogTargetPeerHandlerImpl) Handle(params log_target.DeleteLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetPeerHandlerImpl) Handle(params log_target.DeleteLogTargetPeerParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *DeleteLogTargetLogForwardHandlerImpl) Handle(params log_target.DeleteLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetLogForwardHandlerImpl) Handle(params log_target.DeleteLogTargetLogForwardParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceLogTargetBackendParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceLogTargetFrontendParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceLogTargetDefaultsParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceLogTargetPeerParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceLogTargetLogForwardParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceAllLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetBackendParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetFrontendParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceAllLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceAllLogTargetDefaultsParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceAllLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceAllLogTargetPeerParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceAllLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceAllLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceAllLogTargetLogForwardParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) diff --git a/handlers/parent_log_target_global.go b/handlers/parent_log_target_global.go index f0d4a6ed..7ff87fd2 100644 --- a/handlers/parent_log_target_global.go +++ b/handlers/parent_log_target_global.go @@ -44,7 +44,7 @@ type ( ReplaceAllLogTargetGlobalHandlerImpl ReplaceAllLogTargetHandlerImpl ) -func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTargetGlobalParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) paramsG := log_target.CreateLogTargetBackendParams{ Data: params.Data, @@ -58,7 +58,7 @@ func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlobalParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) paramsG := log_target.GetLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -69,7 +69,7 @@ func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlo return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTargetGlobalParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) paramsG := log_target.GetAllLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -79,7 +79,7 @@ func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTargetGlobalParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) paramsG := log_target.DeleteLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -92,7 +92,7 @@ func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogTargetGlobalParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) paramsG := log_target.ReplaceLogTargetBackendParams{ Data: params.Data, @@ -106,7 +106,7 @@ func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogT return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *ReplaceAllLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceAllLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceAllLogTargetGlobalParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) paramsG := log_target.ReplaceAllLogTargetBackendParams{ Data: params.Data, diff --git a/handlers/parent_server_generated.go b/handlers/parent_server_generated.go index b2783f54..147ddbd1 100644 --- a/handlers/parent_server_generated.go +++ b/handlers/parent_server_generated.go @@ -50,86 +50,86 @@ type ( ReplaceServerRingHandlerImpl ReplaceServerHandlerImpl ) -func (h *CreateServerBackendHandlerImpl) Handle(params server.CreateServerBackendParams, principal interface{}) middleware.Responder { +func (h *CreateServerBackendHandlerImpl) Handle(params server.CreateServerBackendParams, principal any) middleware.Responder { g := CreateServerHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateServerPeerHandlerImpl) Handle(params server.CreateServerPeerParams, principal interface{}) middleware.Responder { +func (h *CreateServerPeerHandlerImpl) Handle(params server.CreateServerPeerParams, principal any) middleware.Responder { g := CreateServerHandlerImpl(*h) pg := server.CreateServerBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *CreateServerRingHandlerImpl) Handle(params server.CreateServerRingParams, principal interface{}) middleware.Responder { +func (h *CreateServerRingHandlerImpl) Handle(params server.CreateServerRingParams, principal any) middleware.Responder { g := CreateServerHandlerImpl(*h) pg := server.CreateServerBackendParams(params) return g.Handle(cnconstants.RingParentType, pg, principal) } -func (h *GetServerBackendHandlerImpl) Handle(params server.GetServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetServerBackendHandlerImpl) Handle(params server.GetServerBackendParams, principal any) middleware.Responder { g := GetServerHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetServerPeerHandlerImpl) Handle(params server.GetServerPeerParams, principal interface{}) middleware.Responder { +func (h *GetServerPeerHandlerImpl) Handle(params server.GetServerPeerParams, principal any) middleware.Responder { g := GetServerHandlerImpl(*h) pg := server.GetServerBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetServerRingHandlerImpl) Handle(params server.GetServerRingParams, principal interface{}) middleware.Responder { +func (h *GetServerRingHandlerImpl) Handle(params server.GetServerRingParams, principal any) middleware.Responder { g := GetServerHandlerImpl(*h) pg := server.GetServerBackendParams(params) return g.Handle(cnconstants.RingParentType, pg, principal) } -func (h *GetAllServerBackendHandlerImpl) Handle(params server.GetAllServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllServerBackendHandlerImpl) Handle(params server.GetAllServerBackendParams, principal any) middleware.Responder { g := GetAllServerHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllServerPeerHandlerImpl) Handle(params server.GetAllServerPeerParams, principal interface{}) middleware.Responder { +func (h *GetAllServerPeerHandlerImpl) Handle(params server.GetAllServerPeerParams, principal any) middleware.Responder { g := GetAllServerHandlerImpl(*h) pg := server.GetAllServerBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetAllServerRingHandlerImpl) Handle(params server.GetAllServerRingParams, principal interface{}) middleware.Responder { +func (h *GetAllServerRingHandlerImpl) Handle(params server.GetAllServerRingParams, principal any) middleware.Responder { g := GetAllServerHandlerImpl(*h) pg := server.GetAllServerBackendParams(params) return g.Handle(cnconstants.RingParentType, pg, principal) } -func (h *DeleteServerBackendHandlerImpl) Handle(params server.DeleteServerBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteServerBackendHandlerImpl) Handle(params server.DeleteServerBackendParams, principal any) middleware.Responder { g := DeleteServerHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteServerPeerHandlerImpl) Handle(params server.DeleteServerPeerParams, principal interface{}) middleware.Responder { +func (h *DeleteServerPeerHandlerImpl) Handle(params server.DeleteServerPeerParams, principal any) middleware.Responder { g := DeleteServerHandlerImpl(*h) pg := server.DeleteServerBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *DeleteServerRingHandlerImpl) Handle(params server.DeleteServerRingParams, principal interface{}) middleware.Responder { +func (h *DeleteServerRingHandlerImpl) Handle(params server.DeleteServerRingParams, principal any) middleware.Responder { g := DeleteServerHandlerImpl(*h) pg := server.DeleteServerBackendParams(params) return g.Handle(cnconstants.RingParentType, pg, principal) } -func (h *ReplaceServerBackendHandlerImpl) Handle(params server.ReplaceServerBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerBackendHandlerImpl) Handle(params server.ReplaceServerBackendParams, principal any) middleware.Responder { g := ReplaceServerHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceServerPeerHandlerImpl) Handle(params server.ReplaceServerPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerPeerHandlerImpl) Handle(params server.ReplaceServerPeerParams, principal any) middleware.Responder { g := ReplaceServerHandlerImpl(*h) pg := server.ReplaceServerBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceServerRingHandlerImpl) Handle(params server.ReplaceServerRingParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerRingHandlerImpl) Handle(params server.ReplaceServerRingParams, principal any) middleware.Responder { g := ReplaceServerHandlerImpl(*h) pg := server.ReplaceServerBackendParams(params) return g.Handle(cnconstants.RingParentType, pg, principal) diff --git a/handlers/parent_tcp_check_generated.go b/handlers/parent_tcp_check_generated.go index da8bfbda..26458608 100644 --- a/handlers/parent_tcp_check_generated.go +++ b/handlers/parent_tcp_check_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllTCPCheckDefaultsHandlerImpl ReplaceAllTCPCheckHandlerImpl ) -func (h *CreateTCPCheckBackendHandlerImpl) Handle(params tcp_check.CreateTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPCheckBackendHandlerImpl) Handle(params tcp_check.CreateTCPCheckBackendParams, principal any) middleware.Responder { g := CreateTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.CreateTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.CreateTCPCheckDefaultsParams, principal any) middleware.Responder { g := CreateTCPCheckHandlerImpl(*h) pg := tcp_check.CreateTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetTCPCheckBackendHandlerImpl) Handle(params tcp_check.GetTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPCheckBackendHandlerImpl) Handle(params tcp_check.GetTCPCheckBackendParams, principal any) middleware.Responder { g := GetTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.GetTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.GetTCPCheckDefaultsParams, principal any) middleware.Responder { g := GetTCPCheckHandlerImpl(*h) pg := tcp_check.GetTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllTCPCheckBackendHandlerImpl) Handle(params tcp_check.GetAllTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPCheckBackendHandlerImpl) Handle(params tcp_check.GetAllTCPCheckBackendParams, principal any) middleware.Responder { g := GetAllTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.GetAllTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.GetAllTCPCheckDefaultsParams, principal any) middleware.Responder { g := GetAllTCPCheckHandlerImpl(*h) pg := tcp_check.GetAllTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteTCPCheckBackendHandlerImpl) Handle(params tcp_check.DeleteTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPCheckBackendHandlerImpl) Handle(params tcp_check.DeleteTCPCheckBackendParams, principal any) middleware.Responder { g := DeleteTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.DeleteTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.DeleteTCPCheckDefaultsParams, principal any) middleware.Responder { g := DeleteTCPCheckHandlerImpl(*h) pg := tcp_check.DeleteTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceTCPCheckBackendHandlerImpl) Handle(params tcp_check.ReplaceTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPCheckBackendHandlerImpl) Handle(params tcp_check.ReplaceTCPCheckBackendParams, principal any) middleware.Responder { g := ReplaceTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.ReplaceTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.ReplaceTCPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceTCPCheckHandlerImpl(*h) pg := tcp_check.ReplaceTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllTCPCheckBackendHandlerImpl) Handle(params tcp_check.ReplaceAllTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPCheckBackendHandlerImpl) Handle(params tcp_check.ReplaceAllTCPCheckBackendParams, principal any) middleware.Responder { g := ReplaceAllTCPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.ReplaceAllTCPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPCheckDefaultsHandlerImpl) Handle(params tcp_check.ReplaceAllTCPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceAllTCPCheckHandlerImpl(*h) pg := tcp_check.ReplaceAllTCPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_tcp_request_rule_generated.go b/handlers/parent_tcp_request_rule_generated.go index 2d205af2..7e4d2622 100644 --- a/handlers/parent_tcp_request_rule_generated.go +++ b/handlers/parent_tcp_request_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllTCPRequestRuleFrontendHandlerImpl ReplaceAllTCPRequestRuleHandlerImpl ) -func (h *CreateTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal any) middleware.Responder { g := CreateTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := CreateTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.CreateTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleBackendParams, principal any) middleware.Responder { g := GetTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal any) middleware.Responder { g := GetAllTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal any) middleware.Responder { g := DeleteTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := DeleteTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.DeleteTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_tcp_response_rule_generated.go b/handlers/parent_tcp_response_rule_generated.go index 5cfeaf5d..ad93f4da 100644 --- a/handlers/parent_tcp_response_rule_generated.go +++ b/handlers/parent_tcp_response_rule_generated.go @@ -44,32 +44,32 @@ type ( ReplaceAllTCPResponseRuleBackendHandlerImpl ReplaceAllTCPResponseRuleHandlerImpl ) -func (h *CreateTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal any) middleware.Responder { g := CreateTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleBackendParams, principal any) middleware.Responder { g := GetTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } diff --git a/handlers/peer.go b/handlers/peer.go index ca6322c5..de53734c 100644 --- a/handlers/peer.go +++ b/handlers/peer.go @@ -54,7 +54,7 @@ type ReplacePeerHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreatePeerHandlerImpl) Handle(params peer.CreatePeerParams, principal interface{}) middleware.Responder { +func (h *CreatePeerHandlerImpl) Handle(params peer.CreatePeerParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreatePeerHandlerImpl) createPeerSection(params peer.CreatePeerParams, } // Handle executing the request and returning a response -func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal interface{}) middleware.Responder { +func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal i } // Handle executing the request and returning a response -func (h *GetPeerHandlerImpl) Handle(params peer.GetPeerSectionParams, principal interface{}) middleware.Responder { +func (h *GetPeerHandlerImpl) Handle(params peer.GetPeerSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -180,7 +180,7 @@ func (h *GetPeerHandlerImpl) getPeerSection(params peer.GetPeerSectionParams, t } // Handle executing the request and returning a response -func (h *GetPeersHandlerImpl) Handle(params peer.GetPeerSectionsParams, principal interface{}) middleware.Responder { +func (h *GetPeersHandlerImpl) Handle(params peer.GetPeerSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/handlers/peer_entry.go b/handlers/peer_entry.go index 245cfaf1..ec00a3c9 100644 --- a/handlers/peer_entry.go +++ b/handlers/peer_entry.go @@ -54,7 +54,7 @@ type ReplacePeerEntryHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryParams, principal interface{}) middleware.Responder { +func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryPar } // Handle executing the request and returning a response -func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryParams, principal interface{}) middleware.Responder { +func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryPar } // Handle executing the request and returning a response -func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, principal interface{}) middleware.Responder { +func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -169,7 +169,7 @@ func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, p } // Handle executing the request and returning a response -func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParams, principal interface{}) middleware.Responder { +func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -190,7 +190,7 @@ func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParam } // Handle executing the request and returning a response -func (h *ReplacePeerEntryHandlerImpl) Handle(params peer_entry.ReplacePeerEntryParams, principal interface{}) middleware.Responder { +func (h *ReplacePeerEntryHandlerImpl) Handle(params peer_entry.ReplacePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/program.go b/handlers/program.go index f94eb135..915db1a4 100644 --- a/handlers/program.go +++ b/handlers/program.go @@ -28,7 +28,7 @@ type DeleteProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramParams, _ interface{}) middleware.Responder { +func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramParams, _ any) middleware.Responder { var t string var v int64 @@ -83,7 +83,7 @@ type CreateProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramParams, _ interface{}) middleware.Responder { +func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramParams, _ any) middleware.Responder { var t string var v int64 @@ -137,7 +137,7 @@ type GetProgramHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetProgramHandlerImpl) Handle(params process_manager.GetProgramParams, _ interface{}) middleware.Responder { +func (g GetProgramHandlerImpl) Handle(params process_manager.GetProgramParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -165,7 +165,7 @@ type GetProgramsHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetProgramsHandlerImpl) Handle(params process_manager.GetProgramsParams, _ interface{}) middleware.Responder { +func (g GetProgramsHandlerImpl) Handle(params process_manager.GetProgramsParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -194,7 +194,7 @@ type ReplaceProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramParams, _ interface{}) middleware.Responder { +func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramParams, _ any) middleware.Responder { var t string var v int64 diff --git a/handlers/raw.go b/handlers/raw.go index 90bf2cf0..01fe1e05 100644 --- a/handlers/raw.go +++ b/handlers/raw.go @@ -43,7 +43,7 @@ type PostRawConfigurationHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyConfigurationParams, principal interface{}) middleware.Responder { +func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyConfigurationParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -77,7 +77,7 @@ func (h *GetRawConfigurationHandlerImpl) Handle(params configuration.GetHAProxyC } // Handle executing the request and returning a response -func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProxyConfigurationParams, principal interface{}) middleware.Responder { +func (h *PostRawConfigurationHandlerImpl) Handle(params configuration.PostHAProxyConfigurationParams, principal any) middleware.Responder { v := int64(0) if params.Version != nil { v = *params.Version @@ -215,8 +215,8 @@ func executeRuntimeActions(actionsStr string, client client_native.HAProxyClient if err != nil { return err } - actions := strings.Split(actionsStr, ";") - for _, a := range actions { + actions := strings.SplitSeq(actionsStr, ";") + for a := range actions { params := strings.Split(a, " ") if len(params) == 0 { continue diff --git a/handlers/reloads.go b/handlers/reloads.go index 07a81ea7..74d3a7da 100644 --- a/handlers/reloads.go +++ b/handlers/reloads.go @@ -37,7 +37,7 @@ type GetReloadsHandlerImpl struct { } // Handle executing the request and returning a response -func (rh *GetReloadHandlerImpl) Handle(params reloads.GetReloadParams, principal interface{}) middleware.Responder { +func (rh *GetReloadHandlerImpl) Handle(params reloads.GetReloadParams, principal any) middleware.Responder { r := rh.ReloadAgent.GetReload(params.ID) if r == nil { msg := fmt.Sprintf("Reload with ID %s does not exist", params.ID) @@ -52,7 +52,7 @@ func (rh *GetReloadHandlerImpl) Handle(params reloads.GetReloadParams, principal } // Handle executing the request and returning a response -func (rh *GetReloadsHandlerImpl) Handle(params reloads.GetReloadsParams, principal interface{}) middleware.Responder { +func (rh *GetReloadsHandlerImpl) Handle(params reloads.GetReloadsParams, principal any) middleware.Responder { rs := rh.ReloadAgent.GetReloads() return reloads.NewGetReloadsOK().WithPayload(rs) } diff --git a/handlers/resolver.go b/handlers/resolver.go index d0898b8a..45a8ca7a 100644 --- a/handlers/resolver.go +++ b/handlers/resolver.go @@ -54,7 +54,7 @@ type ReplaceResolverHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateResolverHandlerImpl) Handle(params resolver.CreateResolverParams, principal interface{}) middleware.Responder { +func (h *CreateResolverHandlerImpl) Handle(params resolver.CreateResolverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -113,7 +113,7 @@ func (h *CreateResolverHandlerImpl) getResolver(params resolver.CreateResolverPa } // Handle executing the request and returning a response -func (h *DeleteResolverHandlerImpl) Handle(params resolver.DeleteResolverParams, principal interface{}) middleware.Responder { +func (h *DeleteResolverHandlerImpl) Handle(params resolver.DeleteResolverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -160,7 +160,7 @@ func (h *DeleteResolverHandlerImpl) Handle(params resolver.DeleteResolverParams, } // Handle executing the request and returning a response -func (h *GetResolverHandlerImpl) Handle(params resolver.GetResolverParams, principal interface{}) middleware.Responder { +func (h *GetResolverHandlerImpl) Handle(params resolver.GetResolverParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -186,7 +186,7 @@ func (h *GetResolverHandlerImpl) getResolver(params resolver.GetResolverParams, } // Handle executing the request and returning a response -func (h *GetResolversHandlerImpl) Handle(params resolver.GetResolversParams, principal interface{}) middleware.Responder { +func (h *GetResolversHandlerImpl) Handle(params resolver.GetResolversParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -212,7 +212,7 @@ func (h *GetResolversHandlerImpl) getResolvers(params resolver.GetResolversParam } // Handle executing the request and returning a response -func (h *ReplaceResolverHandlerImpl) Handle(params resolver.ReplaceResolverParams, principal interface{}) middleware.Responder { +func (h *ReplaceResolverHandlerImpl) Handle(params resolver.ReplaceResolverParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/ring.go b/handlers/ring.go index 8faff166..fa09e6d5 100644 --- a/handlers/ring.go +++ b/handlers/ring.go @@ -54,7 +54,7 @@ type ReplaceRingHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateRingHandlerImpl) Handle(params ring.CreateRingParams, principal interface{}) middleware.Responder { +func (h *CreateRingHandlerImpl) Handle(params ring.CreateRingParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateRingHandlerImpl) createRing(params ring.CreateRingParams, t strin } // Handle executing the request and returning a response -func (h *DeleteRingHandlerImpl) Handle(params ring.DeleteRingParams, principal interface{}) middleware.Responder { +func (h *DeleteRingHandlerImpl) Handle(params ring.DeleteRingParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeleteRingHandlerImpl) Handle(params ring.DeleteRingParams, principal i } // Handle executing the request and returning a response -func (h *GetRingHandlerImpl) Handle(params ring.GetRingParams, principal interface{}) middleware.Responder { +func (h *GetRingHandlerImpl) Handle(params ring.GetRingParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -180,7 +180,7 @@ func (h *GetRingHandlerImpl) getRing(params ring.GetRingParams, t string) (int64 } // Handle executing the request and returning a response -func (h *GetRingsHandlerImpl) Handle(params ring.GetRingsParams, principal interface{}) middleware.Responder { +func (h *GetRingsHandlerImpl) Handle(params ring.GetRingsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -206,7 +206,7 @@ func (h *GetRingsHandlerImpl) getRings(params ring.GetRingsParams, t string) (in } // Handle executing the request and returning a response -func (h *ReplaceRingHandlerImpl) Handle(params ring.ReplaceRingParams, principal interface{}) middleware.Responder { +func (h *ReplaceRingHandlerImpl) Handle(params ring.ReplaceRingParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/runtime.go b/handlers/runtime.go index 89cb2e88..3b54d5de 100644 --- a/handlers/runtime.go +++ b/handlers/runtime.go @@ -33,7 +33,7 @@ var RuntimeSupportedFields = map[string][]string{ // ChangeThroughRuntimeAPI checks if something can be changed through the runtime API, and // returns false if reload is not needed, or true if needed. -func changeThroughRuntimeAPI(data, ondisk interface{}, parentName string, client client_native.HAProxyClient) (reload bool) { +func changeThroughRuntimeAPI(data, ondisk any, parentName string, client client_native.HAProxyClient) (reload bool) { // reflect kinds and values are loosely checked as they are bound strictly in // schema, but in case of any panic, we will log and reload to ensure // changes go through @@ -179,7 +179,7 @@ func changeThroughRuntimeAPI(data, ondisk interface{}, parentName string, client } // return string of field names that have a diff -func compareObjects(data, ondisk interface{}) []string { +func compareObjects(data, ondisk any) []string { diff := make([]string, 0) dataVal := reflect.ValueOf(data) ondiskVal := reflect.ValueOf(ondisk) diff --git a/handlers/runtime_server.go b/handlers/runtime_server.go index e2a97912..8b8c71f0 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -54,7 +54,7 @@ type DeleteRuntimeServerHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParams, principal any) middleware.Responder { rn, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -82,7 +82,7 @@ func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParam } // Handle executing the request and returning a response -func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -102,7 +102,7 @@ func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServe } // Handle executing the request and returning a response -func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer // Adds a new server dynamically without modifying the configuration. // Warning: this only works if you have not defined a `default_server` in the defaults // or in the current `backend` section. -func (h *AddRuntimeServerHandlerImpl) Handle(params server.AddRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *AddRuntimeServerHandlerImpl) Handle(params server.AddRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -194,7 +194,7 @@ func isNotFoundError(err error) bool { } // Deletes a server from a backend immediately, without waiting for connections to drain. -func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/server.go b/handlers/server.go index e38e80c2..cb34ce8f 100644 --- a/handlers/server.go +++ b/handlers/server.go @@ -73,7 +73,7 @@ func serverTypeParams(backend *string, parentType *string, parentName *string) ( } // Handle executing the request and returning a response -func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.CreateServerBackendParams, principal interface{}) middleware.Responder { +func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.CreateServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -160,7 +160,7 @@ func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.DeleteServerBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.DeleteServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -214,7 +214,7 @@ func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetServerBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -241,7 +241,7 @@ func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetAllServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetAllServerBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -271,7 +271,7 @@ func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.ReplaceServerBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.ReplaceServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/server_switching_rule.go b/handlers/server_switching_rule.go index 5d47a0c6..036ae378 100644 --- a/handlers/server_switching_rule.go +++ b/handlers/server_switching_rule.go @@ -59,7 +59,7 @@ type ReplaceServerSwitchingRulesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.CreateServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.CreateServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_ru } // Handle executing the request and returning a response -func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.DeleteServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.DeleteServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_ru } // Handle executing the request and returning a response -func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRuleParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule. } // Handle executing the request and returning a response -func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRulesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule } // Handle executing the request and returning a response -func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_r } // Handle executing the request and returning a response -func (h *ReplaceServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRulesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/server_template.go b/handlers/server_template.go index 0cfd39b4..84f9ec3c 100644 --- a/handlers/server_template.go +++ b/handlers/server_template.go @@ -54,7 +54,7 @@ type ReplaceServerTemplateHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateServerTemplateParams, principal interface{}) middleware.Responder { +func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateSe } // Handle executing the request and returning a response -func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteServerTemplateParams, principal interface{}) middleware.Responder { +func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteSe } // Handle executing the request and returning a response -func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTemplateParams, principal interface{}) middleware.Responder { +func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTemplateParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -170,7 +170,7 @@ func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTe } // Handle executing the request and returning a response -func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerTemplatesParams, principal interface{}) middleware.Responder { +func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerTemplatesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -194,7 +194,7 @@ func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerT } // Handle executing the request and returning a response -func (h *ReplaceServerTemplateHandlerImpl) Handle(params server_template.ReplaceServerTemplateParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerTemplateHandlerImpl) Handle(params server_template.ReplaceServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/site.go b/handlers/site.go index 44764378..031d1f59 100644 --- a/handlers/site.go +++ b/handlers/site.go @@ -54,7 +54,7 @@ type ReplaceSiteHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal interface{}) middleware.Responder { +func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal } // Handle executing the request and returning a response -func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal interface{}) middleware.Responder { +func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal } // Handle executing the request and returning a response -func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal interface{}) middleware.Responder { +func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -169,7 +169,7 @@ func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal interf } // Handle executing the request and returning a response -func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal interface{}) middleware.Responder { +func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -193,7 +193,7 @@ func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal inte } // Handle executing the request and returning a response -func (h *ReplaceSiteHandlerImpl) Handle(params sites.ReplaceSiteParams, principal interface{}) middleware.Responder { +func (h *ReplaceSiteHandlerImpl) Handle(params sites.ReplaceSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/spoe.go b/handlers/spoe.go index cc2fbd03..970d6ad5 100644 --- a/handlers/spoe.go +++ b/handlers/spoe.go @@ -29,7 +29,7 @@ type SpoeCreateSpoeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeHandlerImpl) Handle(params spoe.CreateSpoeParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeHandlerImpl) Handle(params spoe.CreateSpoeParams, principal any) middleware.Responder { file, ok := params.FileUpload.(*runtime.File) if !ok { return spoe.NewCreateSpoeBadRequest() @@ -54,7 +54,7 @@ type SpoeDeleteSpoeFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeFileHandlerImpl) Handle(params spoe.DeleteSpoeFileParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeFileHandlerImpl) Handle(params spoe.DeleteSpoeFileParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -75,7 +75,7 @@ type SpoeGetAllSpoeFilesHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeFilesHandlerImpl) Handle(params spoe.GetAllSpoeFilesParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeFilesHandlerImpl) Handle(params spoe.GetAllSpoeFilesParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetOneSpoeFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetOneSpoeFileHandlerImpl) Handle(params spoe.GetOneSpoeFileParams, principal interface{}) middleware.Responder { +func (h *SpoeGetOneSpoeFileHandlerImpl) Handle(params spoe.GetOneSpoeFileParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_agent.go b/handlers/spoe_agent.go index b2c21f2c..1cbe03f4 100644 --- a/handlers/spoe_agent.go +++ b/handlers/spoe_agent.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeAgentHandlerImpl) Handle(params spoe.CreateSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeAgentHandlerImpl) Handle(params spoe.CreateSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeAgentHandlerImpl) Handle(params spoe.DeleteSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeAgentHandlerImpl) Handle(params spoe.DeleteSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -94,7 +94,7 @@ type SpoeGetAllSpoeAgentHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeAgentHandlerImpl) Handle(params spoe.GetAllSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeAgentHandlerImpl) Handle(params spoe.GetAllSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -123,7 +123,7 @@ type SpoeGetSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeAgentHandlerImpl) Handle(params spoe.GetSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeAgentHandlerImpl) Handle(params spoe.GetSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ type SpoeReplaceSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeAgentHandlerImpl) Handle(params spoe.ReplaceSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeAgentHandlerImpl) Handle(params spoe.ReplaceSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_group.go b/handlers/spoe_group.go index 10738ebb..32191a11 100644 --- a/handlers/spoe_group.go +++ b/handlers/spoe_group.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeGroupHandlerImpl) Handle(params spoe.CreateSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeGroupHandlerImpl) Handle(params spoe.CreateSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -60,7 +60,7 @@ type SpoeDeleteSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeGroupHandlerImpl) Handle(params spoe.DeleteSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeGroupHandlerImpl) Handle(params spoe.DeleteSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -94,7 +94,7 @@ type SpoeGetAllSpoeGroupHandlerImpl struct { } // SpoeGetAllSpoeGroupHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeGroupHandlerImpl) Handle(params spoe.GetAllSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeGroupHandlerImpl) Handle(params spoe.GetAllSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -123,7 +123,7 @@ type SpoeGetSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeGroupHandlerImpl) Handle(params spoe.GetSpoeGroupParams, c interface{}) middleware.Responder { +func (h *SpoeGetSpoeGroupHandlerImpl) Handle(params spoe.GetSpoeGroupParams, c any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ type SpoeReplaceSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeGroupHandlerImpl) Handle(params spoe.ReplaceSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeGroupHandlerImpl) Handle(params spoe.ReplaceSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_message.go b/handlers/spoe_message.go index cfd9aa67..3d97c542 100644 --- a/handlers/spoe_message.go +++ b/handlers/spoe_message.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeMessageHandlerImpl) Handle(params spoe.CreateSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeMessageHandlerImpl) Handle(params spoe.CreateSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeMessageHandlerImpl) Handle(params spoe.DeleteSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeMessageHandlerImpl) Handle(params spoe.DeleteSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetAllSpoeMessageHandlerImpl struct { } // SpoeGetAllSpoeMessageHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeMessageHandlerImpl) Handle(params spoe.GetAllSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeMessageHandlerImpl) Handle(params spoe.GetAllSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ type SpoeGetSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeMessageHandlerImpl) Handle(params spoe.GetSpoeMessageParams, c interface{}) middleware.Responder { +func (h *SpoeGetSpoeMessageHandlerImpl) Handle(params spoe.GetSpoeMessageParams, c any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -156,7 +156,7 @@ type SpoeReplaceSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeMessageHandlerImpl) Handle(params spoe.ReplaceSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeMessageHandlerImpl) Handle(params spoe.ReplaceSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_scope.go b/handlers/spoe_scope.go index caf88b16..0c124ae3 100644 --- a/handlers/spoe_scope.go +++ b/handlers/spoe_scope.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeScopeHandlerImpl) Handle(params spoe.CreateSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeScopeHandlerImpl) Handle(params spoe.CreateSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeScopeHandlerImpl) Handle(params spoe.DeleteSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeScopeHandlerImpl) Handle(params spoe.DeleteSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetAllSpoeScopeHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeScopeHandlerImpl) Handle(params spoe.GetAllSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeScopeHandlerImpl) Handle(params spoe.GetAllSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ type SpoeGetSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeScopeHandlerImpl) Handle(params spoe.GetSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeScopeHandlerImpl) Handle(params spoe.GetSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_transaction.go b/handlers/spoe_transaction.go index 20385292..d545b7f0 100644 --- a/handlers/spoe_transaction.go +++ b/handlers/spoe_transaction.go @@ -31,7 +31,7 @@ type SpoeTransactionsStartSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsStartSpoeTransactionHandlerImpl) Handle(params spoe_transactions.StartSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsStartSpoeTransactionHandlerImpl) Handle(params spoe_transactions.StartSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -62,7 +62,7 @@ type SpoeTransactionsDeleteSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsDeleteSpoeTransactionHandlerImpl) Handle(params spoe_transactions.DeleteSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsDeleteSpoeTransactionHandlerImpl) Handle(params spoe_transactions.DeleteSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -88,7 +88,7 @@ type SpoeTransactionsGetSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsGetSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsGetSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -119,7 +119,7 @@ type SpoeTransactionsGetAllSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetAllSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetAllSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -161,7 +161,7 @@ type SpoeTransactionsCommitSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsCommitSpoeTransactionHandlerImpl) Handle(params spoe_transactions.CommitSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsCommitSpoeTransactionHandlerImpl) Handle(params spoe_transactions.CommitSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_version.go b/handlers/spoe_version.go index 7a43858e..8847da2d 100644 --- a/handlers/spoe_version.go +++ b/handlers/spoe_version.go @@ -29,7 +29,7 @@ type SpoeGetSpoeConfigurationVersionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeGetSpoeConfigurationVersionHandlerImpl) Handle(params spoe.GetSpoeConfigurationVersionParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeConfigurationVersionHandlerImpl) Handle(params spoe.GetSpoeConfigurationVersionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index b8fb7184..f1e8e56d 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -38,7 +38,7 @@ type StorageGetAllStorageSSLCertificatesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *StorageGetAllStorageSSLCertificatesHandlerImpl) Handle(params storage.GetAllStorageSSLCertificatesParams, principal interface{}) middleware.Responder { +func (h *StorageGetAllStorageSSLCertificatesHandlerImpl) Handle(params storage.GetAllStorageSSLCertificatesParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -67,7 +67,7 @@ type StorageGetOneStorageSSLCertificateHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.GetOneStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.GetOneStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -109,7 +109,7 @@ type StorageDeleteStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageDeleteStorageSSLCertificateHandlerImpl) Handle(params storage.DeleteStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageSSLCertificateHandlerImpl) Handle(params storage.DeleteStorageSSLCertificateParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -183,7 +183,7 @@ type StorageReplaceStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.ReplaceStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.ReplaceStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -246,7 +246,7 @@ type StorageCreateStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.CreateStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.CreateStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) diff --git a/handlers/stats.go b/handlers/stats.go index 0ab4964d..ed8dd461 100644 --- a/handlers/stats.go +++ b/handlers/stats.go @@ -30,7 +30,7 @@ type GetStatsHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetStatsHandlerImpl) Handle(params stats.GetStatsParams, principal interface{}) middleware.Responder { +func (h *GetStatsHandlerImpl) Handle(params stats.GetStatsParams, principal any) middleware.Responder { if params.Name != nil { if params.Type == nil { code := misc.ErrHTTPBadRequest diff --git a/handlers/stick_rule.go b/handlers/stick_rule.go index f37cc7a1..358e3df5 100644 --- a/handlers/stick_rule.go +++ b/handlers/stick_rule.go @@ -60,7 +60,7 @@ type ReplaceStickRulesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateStickRuleHandlerImpl) Handle(params stick_rule.CreateStickRuleParams, principal interface{}) middleware.Responder { +func (h *CreateStickRuleHandlerImpl) Handle(params stick_rule.CreateStickRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateStickRuleHandlerImpl) Handle(params stick_rule.CreateStickRulePar } // Handle executing the request and returning a response -func (h *DeleteStickRuleHandlerImpl) Handle(params stick_rule.DeleteStickRuleParams, principal interface{}) middleware.Responder { +func (h *DeleteStickRuleHandlerImpl) Handle(params stick_rule.DeleteStickRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteStickRuleHandlerImpl) Handle(params stick_rule.DeleteStickRulePar } // Handle executing the request and returning a response -func (h *GetStickRuleHandlerImpl) Handle(params stick_rule.GetStickRuleParams, principal interface{}) middleware.Responder { +func (h *GetStickRuleHandlerImpl) Handle(params stick_rule.GetStickRuleParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetStickRuleHandlerImpl) Handle(params stick_rule.GetStickRuleParams, p } // Handle executing the request and returning a response -func (h *GetStickRulesHandlerImpl) Handle(params stick_rule.GetStickRulesParams, principal interface{}) middleware.Responder { +func (h *GetStickRulesHandlerImpl) Handle(params stick_rule.GetStickRulesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetStickRulesHandlerImpl) Handle(params stick_rule.GetStickRulesParams, } // Handle executing the request and returning a response -func (h *ReplaceStickRuleHandlerImpl) Handle(params stick_rule.ReplaceStickRuleParams, principal interface{}) middleware.Responder { +func (h *ReplaceStickRuleHandlerImpl) Handle(params stick_rule.ReplaceStickRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceStickRuleHandlerImpl) Handle(params stick_rule.ReplaceStickRuleP } // Handle executing the request and returning a response -func (h *ReplaceStickRulesHandlerImpl) Handle(params stick_rule.ReplaceStickRulesParams, principal interface{}) middleware.Responder { +func (h *ReplaceStickRulesHandlerImpl) Handle(params stick_rule.ReplaceStickRulesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/stick_table.go b/handlers/stick_table.go index 5b3a3eca..28806a0b 100644 --- a/handlers/stick_table.go +++ b/handlers/stick_table.go @@ -47,7 +47,7 @@ type SetStickTableEntriesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetStickTablesHandlerImpl) Handle(params stick_table.GetStickTablesParams, principal interface{}) middleware.Responder { +func (h *GetStickTablesHandlerImpl) Handle(params stick_table.GetStickTablesParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -68,7 +68,7 @@ func (h *GetStickTablesHandlerImpl) Handle(params stick_table.GetStickTablesPara } // Handle executing the request and returning a response -func (h *GetStickTableHandlerImpl) Handle(params stick_table.GetStickTableParams, principal interface{}) middleware.Responder { +func (h *GetStickTableHandlerImpl) Handle(params stick_table.GetStickTableParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -96,7 +96,7 @@ func (h *GetStickTableHandlerImpl) Handle(params stick_table.GetStickTableParams } // Handle executing the request and returning a response -func (h *SetStickTableEntriesHandlerImpl) Handle(params stick_table.SetStickTableEntriesParams, principal interface{}) middleware.Responder { +func (h *SetStickTableEntriesHandlerImpl) Handle(params stick_table.SetStickTableEntriesParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -113,7 +113,7 @@ func (h *SetStickTableEntriesHandlerImpl) Handle(params stick_table.SetStickTabl } // Handle executing the request and returning a response -func (h *GetStickTableEntriesHandlerImpl) Handle(params stick_table.GetStickTableEntriesParams, principal interface{}) middleware.Responder { +func (h *GetStickTableEntriesHandlerImpl) Handle(params stick_table.GetStickTableEntriesParams, principal any) middleware.Responder { filter := make([]string, 0) if params.Filter != nil { filter = strings.Split(*params.Filter, ",") diff --git a/handlers/table.go b/handlers/table.go index 173b60d6..3e9a4056 100644 --- a/handlers/table.go +++ b/handlers/table.go @@ -54,7 +54,7 @@ type ReplaceTableHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateTableHandlerImpl) Handle(params table.CreateTableParams, principal interface{}) middleware.Responder { +func (h *CreateTableHandlerImpl) Handle(params table.CreateTableParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateTableHandlerImpl) Handle(params table.CreateTableParams, principa } // Handle executing the request and returning a response -func (h *DeleteTableHandlerImpl) Handle(params table.DeleteTableParams, principal interface{}) middleware.Responder { +func (h *DeleteTableHandlerImpl) Handle(params table.DeleteTableParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeleteTableHandlerImpl) Handle(params table.DeleteTableParams, principa } // Handle executing the request and returning a response -func (h *GetTableHandlerImpl) Handle(params table.GetTableParams, principal interface{}) middleware.Responder { +func (h *GetTableHandlerImpl) Handle(params table.GetTableParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -169,7 +169,7 @@ func (h *GetTableHandlerImpl) Handle(params table.GetTableParams, principal inte } // Handle executing the request and returning a response -func (h *GetTablesHandlerImpl) Handle(params table.GetTablesParams, principal interface{}) middleware.Responder { +func (h *GetTablesHandlerImpl) Handle(params table.GetTablesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -190,7 +190,7 @@ func (h *GetTablesHandlerImpl) Handle(params table.GetTablesParams, principal in } // Handle executing the request and returning a response -func (h *ReplaceTableHandlerImpl) Handle(params table.ReplaceTableParams, principal interface{}) middleware.Responder { +func (h *ReplaceTableHandlerImpl) Handle(params table.ReplaceTableParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/tcp_check.go b/handlers/tcp_check.go index c881f050..903f3ffb 100644 --- a/handlers/tcp_check.go +++ b/handlers/tcp_check.go @@ -61,7 +61,7 @@ type ReplaceAllTCPCheckHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.CreateTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.CreateTCPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -110,7 +110,7 @@ func (h *CreateTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *DeleteTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.DeleteTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.DeleteTCPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -159,7 +159,7 @@ func (h *DeleteTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *GetTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.GetTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.GetTCPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -181,7 +181,7 @@ func (h *GetTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, par } // Handle executing the request and returning a response -func (h *GetAllTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.GetAllTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.GetAllTCPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -206,7 +206,7 @@ func (h *GetAllTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *ReplaceTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.ReplaceTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.ReplaceTCPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -255,7 +255,7 @@ func (h *ReplaceTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *ReplaceAllTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.ReplaceAllTCPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_check.ReplaceAllTCPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/tcp_request_rule.go b/handlers/tcp_request_rule.go index 5222a8a5..856e0337 100644 --- a/handlers/tcp_request_rule.go +++ b/handlers/tcp_request_rule.go @@ -61,7 +61,7 @@ type ReplaceAllTCPRequestRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -108,7 +108,7 @@ func (h *CreateTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParent } // Handle executing the request and returning a response -func (h *DeleteTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParent } // Handle executing the request and returning a response -func (h *GetTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.GetTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.GetTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentTyp } // Handle executing the request and returning a response -func (h *GetAllTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParent } // Handle executing the request and returning a response -func (h *ReplaceTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -249,7 +249,7 @@ func (h *ReplaceTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *ReplaceAllTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/tcp_response_rule.go b/handlers/tcp_response_rule.go index ce058634..54bcf94e 100644 --- a/handlers/tcp_response_rule.go +++ b/handlers/tcp_response_rule.go @@ -61,7 +61,7 @@ type ReplaceAllTCPResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentTy } // Handle executing the request and returning a response -func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -247,7 +247,7 @@ func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare return tcp_response_rule.NewReplaceTCPResponseRuleBackendAccepted().WithPayload(params.Data) } -func (h *ReplaceAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/transaction.go b/handlers/transaction.go index 7c3cc693..1c496862 100644 --- a/handlers/transaction.go +++ b/handlers/transaction.go @@ -64,7 +64,7 @@ type CommitTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *StartTransactionHandlerImpl) Handle(params transactions.StartTransactionParams, principal interface{}) middleware.Responder { +func (h *StartTransactionHandlerImpl) Handle(params transactions.StartTransactionParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -79,7 +79,7 @@ func (h *StartTransactionHandlerImpl) Handle(params transactions.StartTransactio } // Handle executing the request and returning a response -func (h *DeleteTransactionHandlerImpl) Handle(params transactions.DeleteTransactionParams, principal interface{}) middleware.Responder { +func (h *DeleteTransactionHandlerImpl) Handle(params transactions.DeleteTransactionParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -98,7 +98,7 @@ func (h *DeleteTransactionHandlerImpl) Handle(params transactions.DeleteTransact } // Handle executing the request and returning a response -func (h *GetTransactionHandlerImpl) Handle(params transactions.GetTransactionParams, principal interface{}) middleware.Responder { +func (h *GetTransactionHandlerImpl) Handle(params transactions.GetTransactionParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -117,7 +117,7 @@ func (h *GetTransactionHandlerImpl) Handle(params transactions.GetTransactionPar } // Handle executing the request and returning a response -func (h *GetTransactionsHandlerImpl) Handle(params transactions.GetTransactionsParams, principal interface{}) middleware.Responder { +func (h *GetTransactionsHandlerImpl) Handle(params transactions.GetTransactionsParams, principal any) middleware.Responder { s := "" if params.Status != nil { s = *params.Status @@ -138,7 +138,7 @@ func (h *GetTransactionsHandlerImpl) Handle(params transactions.GetTransactionsP } // Handle executing the request and returning a response -func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransactionParams, principal interface{}) middleware.Responder { +func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransactionParams, principal any) middleware.Responder { h.Mutex.Lock() defer h.Mutex.Unlock() @@ -222,7 +222,7 @@ func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransact } // Handle executes the decorated Handler and, in case of successful creation, increase the counter if this is -func (r RateLimitedStartTransactionHandlerImpl) Handle(params transactions.StartTransactionParams, principal interface{}) middleware.Responder { +func (r RateLimitedStartTransactionHandlerImpl) Handle(params transactions.StartTransactionParams, principal any) middleware.Responder { if err := r.TransactionCounter.LimitReached(); err != nil { e := misc.HandleError(err) return transactions.NewStartTransactionDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/user.go b/handlers/user.go index eba97402..745c025d 100644 --- a/handlers/user.go +++ b/handlers/user.go @@ -54,7 +54,7 @@ type ReplaceUserHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateUserHandlerImpl) Handle(params user.CreateUserParams, principal interface{}) middleware.Responder { +func (h *CreateUserHandlerImpl) Handle(params user.CreateUserParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -105,7 +105,7 @@ func (h *CreateUserHandlerImpl) Handle(params user.CreateUserParams, principal i } // Handle executing the request and returning a response -func (h *DeleteUserHandlerImpl) Handle(params user.DeleteUserParams, principal interface{}) middleware.Responder { +func (h *DeleteUserHandlerImpl) Handle(params user.DeleteUserParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -167,7 +167,7 @@ func (h *DeleteUserHandlerImpl) Handle(params user.DeleteUserParams, principal i } // Handle executing the request and returning a response -func (h *GetUserHandlerImpl) Handle(params user.GetUserParams, principal interface{}) middleware.Responder { +func (h *GetUserHandlerImpl) Handle(params user.GetUserParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -199,7 +199,7 @@ func (h *GetUserHandlerImpl) Handle(params user.GetUserParams, principal interfa } // Handle executing the request and returning a response -func (h *GetUsersHandlerImpl) Handle(params user.GetUsersParams, principal interface{}) middleware.Responder { +func (h *GetUsersHandlerImpl) Handle(params user.GetUsersParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -228,7 +228,7 @@ func (h *GetUsersHandlerImpl) Handle(params user.GetUsersParams, principal inter } // Handle executing the request and returning a response -func (h *ReplaceUserHandlerImpl) Handle(params user.ReplaceUserParams, principal interface{}) middleware.Responder { +func (h *ReplaceUserHandlerImpl) Handle(params user.ReplaceUserParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/userlist.go b/handlers/userlist.go index bade1fe7..eb6cf15c 100644 --- a/handlers/userlist.go +++ b/handlers/userlist.go @@ -48,7 +48,7 @@ type GetUserListsHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateUserListHandlerImpl) Handle(params userlist.CreateUserlistParams, principal interface{}) middleware.Responder { +func (h *CreateUserListHandlerImpl) Handle(params userlist.CreateUserlistParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -100,7 +100,7 @@ func (h *CreateUserListHandlerImpl) createUserList(params userlist.CreateUserlis } // Handle executing the request and returning a response -func (h *DeleteUserListHandlerImpl) Handle(params userlist.DeleteUserlistParams, principal interface{}) middleware.Responder { +func (h *DeleteUserListHandlerImpl) Handle(params userlist.DeleteUserlistParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -147,7 +147,7 @@ func (h *DeleteUserListHandlerImpl) Handle(params userlist.DeleteUserlistParams, } // Handle executing the request and returning a response -func (h *GetUserListHandlerImpl) Handle(params userlist.GetUserlistParams, principal interface{}) middleware.Responder { +func (h *GetUserListHandlerImpl) Handle(params userlist.GetUserlistParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -173,7 +173,7 @@ func (h *GetUserListHandlerImpl) getUserList(params userlist.GetUserlistParams, } // Handle executing the request and returning a response -func (h *GetUserListsHandlerImpl) Handle(params userlist.GetUserlistsParams, principal interface{}) middleware.Responder { +func (h *GetUserListsHandlerImpl) Handle(params userlist.GetUserlistsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/handlers/version.go b/handlers/version.go index ba3ab110..2726d612 100644 --- a/handlers/version.go +++ b/handlers/version.go @@ -29,7 +29,7 @@ type ConfigurationGetConfigurationVersionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ConfigurationGetConfigurationVersionHandlerImpl) Handle(params configuration.GetConfigurationVersionParams, principal interface{}) middleware.Responder { +func (h *ConfigurationGetConfigurationVersionHandlerImpl) Handle(params configuration.GetConfigurationVersionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/haproxy/reload_agent.go b/haproxy/reload_agent.go index 19a3ac54..7408339f 100644 --- a/haproxy/reload_agent.go +++ b/haproxy/reload_agent.go @@ -151,7 +151,7 @@ func (ra *ReloadAgent) setLkgPath(configFile, path string) error { } func (ra *ReloadAgent) handleReload(id string) (string, error) { - logFields := map[string]interface{}{logFieldReloadID: id} + logFields := map[string]any{logFieldReloadID: id} ra.cache.mu.Lock() ra.cache.current = id @@ -193,7 +193,7 @@ func (ra *ReloadAgent) handleReloads() { } func (ra *ReloadAgent) reloadHAProxy(id string) (string, error) { - logFields := map[string]interface{}{logFieldReloadID: id} + logFields := map[string]any{logFieldReloadID: id} // try the reload log.WithFields(logFields, log.DebugLevel, "Reload started") var output string @@ -259,7 +259,7 @@ func (ra *ReloadAgent) Reload() string { next := ra.cache.getNext() if next == "" { next = ra.cache.newReload() - log.WithFields(map[string]interface{}{logFieldReloadID: next}, log.DebugLevel, "Scheduling a new reload...") + log.WithFields(map[string]any{logFieldReloadID: next}, log.DebugLevel, "Scheduling a new reload...") } return next @@ -288,7 +288,7 @@ func (ra *ReloadAgent) ReloadWithCallback(callback func()) string { next := ra.cache.getNext() if next == "" { next = ra.cache.newReloadWithCallback(callback) - log.WithFields(map[string]interface{}{logFieldReloadID: next}, log.DebugLevel, "Scheduling a new reload...") + log.WithFields(map[string]any{logFieldReloadID: next}, log.DebugLevel, "Scheduling a new reload...") } ra.cache.mu.Lock() ra.cache.callbacks[next] = callback diff --git a/log/log.go b/log/log.go index c2e14956..695b4ebe 100644 --- a/log/log.go +++ b/log/log.go @@ -190,127 +190,127 @@ func AccessLogger() (*Logger, error) { return accessLogger, nil } -func Log(level logrus.Level, args ...interface{}) { +func Log(level logrus.Level, args ...any) { if appLogger != nil { appLogger.Log(level, args...) } } -func Logf(level logrus.Level, format string, args ...interface{}) { +func Logf(level logrus.Level, format string, args ...any) { if appLogger != nil { appLogger.Logf(level, format, args...) } } -func Print(args ...interface{}) { +func Print(args ...any) { if appLogger != nil { appLogger.Print(args...) } } -func Trace(args ...interface{}) { +func Trace(args ...any) { if appLogger != nil { appLogger.Trace(args...) } } -func Debug(args ...interface{}) { +func Debug(args ...any) { if appLogger != nil { appLogger.Debug(args...) } } -func Info(args ...interface{}) { +func Info(args ...any) { if appLogger != nil { appLogger.Info(args...) } } -func Warning(args ...interface{}) { +func Warning(args ...any) { if appLogger != nil { appLogger.Warning(args...) } } -func Error(args ...interface{}) { +func Error(args ...any) { if appLogger != nil { appLogger.Error(args...) } } -func Panic(args ...interface{}) { +func Panic(args ...any) { if appLogger != nil { appLogger.Panic(args...) } } -func Fatal(args ...interface{}) { +func Fatal(args ...any) { if appLogger != nil { appLogger.Panic(args...) } } -func Printf(format string, args ...interface{}) { +func Printf(format string, args ...any) { if appLogger != nil { appLogger.Printf(format, args...) } } -func Tracef(format string, args ...interface{}) { +func Tracef(format string, args ...any) { if appLogger != nil { appLogger.Tracef(format, args...) } } -func Debugf(format string, args ...interface{}) { +func Debugf(format string, args ...any) { if appLogger != nil { appLogger.Debugf(format, args...) } } -func Infof(format string, args ...interface{}) { +func Infof(format string, args ...any) { if appLogger != nil { appLogger.Infof(format, args...) } } -func Warningf(format string, args ...interface{}) { +func Warningf(format string, args ...any) { if appLogger != nil { appLogger.Warningf(format, args...) } } -func Errorf(format string, args ...interface{}) { +func Errorf(format string, args ...any) { if appLogger != nil { appLogger.Errorf(format, args...) } } -func Panicf(format string, args ...interface{}) { +func Panicf(format string, args ...any) { if appLogger != nil { appLogger.Panicf(format, args...) } } -func Fatalf(format string, args ...interface{}) { +func Fatalf(format string, args ...any) { if appLogger != nil { appLogger.Fatalf(format, args...) } } -func Fatalln(format string, args ...interface{}) { //nolint:goprintffuncname +func Fatalln(format string, args ...any) { //nolint:goprintffuncname if appLogger != nil { appLogger.Fatalln(args...) } } -func WithFields(fields map[string]interface{}, level logrus.Level, args ...interface{}) { +func WithFields(fields map[string]any, level logrus.Level, args ...any) { if appLogger != nil { appLogger.WithFields(fields, level, args...) } } -func WithFieldsf(fields map[string]interface{}, level logrus.Level, format string, args ...interface{}) { +func WithFieldsf(fields map[string]any, level logrus.Level, format string, args ...any) { if appLogger != nil { appLogger.WithFieldsf(fields, level, format, args...) } diff --git a/log/logger.go b/log/logger.go index ca5b8e57..5d50c661 100644 --- a/log/logger.go +++ b/log/logger.go @@ -13,133 +13,134 @@ type Logger struct { type ACLLogger struct { *logrus.Logger + ApacheLog *apache_log.ApacheLog } -func (l *Logger) Log(level logrus.Level, args ...interface{}) { +func (l *Logger) Log(level logrus.Level, args ...any) { for _, log := range l.loggers { go log.Log(level, args...) } } -func (l *Logger) Logf(level logrus.Level, format string, args ...interface{}) { +func (l *Logger) Logf(level logrus.Level, format string, args ...any) { for _, log := range l.loggers { go log.Logf(level, format, args...) } } -func (l *Logger) Print(args ...interface{}) { +func (l *Logger) Print(args ...any) { for _, log := range l.loggers { go log.Print(args...) } } -func (l *Logger) Trace(args ...interface{}) { +func (l *Logger) Trace(args ...any) { for _, log := range l.loggers { go log.Trace(args...) } } -func (l *Logger) Debug(args ...interface{}) { +func (l *Logger) Debug(args ...any) { for _, log := range l.loggers { go log.Debug(args...) } } -func (l *Logger) Info(args ...interface{}) { +func (l *Logger) Info(args ...any) { for _, log := range l.loggers { go log.Info(args...) } } -func (l *Logger) Warning(args ...interface{}) { +func (l *Logger) Warning(args ...any) { for _, log := range l.loggers { go log.Warning(args...) } } -func (l *Logger) Error(args ...interface{}) { +func (l *Logger) Error(args ...any) { for _, log := range l.loggers { go log.Error(args...) } } -func (l *Logger) Panic(args ...interface{}) { +func (l *Logger) Panic(args ...any) { for _, log := range l.loggers { go log.Panic(args...) } } -func (l *Logger) Printf(format string, args ...interface{}) { +func (l *Logger) Printf(format string, args ...any) { for _, log := range l.loggers { go log.Printf(format, args...) } } -func (l *Logger) Tracef(format string, args ...interface{}) { +func (l *Logger) Tracef(format string, args ...any) { for _, log := range l.loggers { go log.Tracef(format, args...) } } -func (l *Logger) Debugf(format string, args ...interface{}) { +func (l *Logger) Debugf(format string, args ...any) { for _, log := range l.loggers { go log.Debugf(format, args...) } } -func (l *Logger) Infof(format string, args ...interface{}) { +func (l *Logger) Infof(format string, args ...any) { for _, log := range l.loggers { go log.Infof(format, args...) } } -func (l *Logger) Warningf(format string, args ...interface{}) { +func (l *Logger) Warningf(format string, args ...any) { for _, log := range l.loggers { go log.Warningf(format, args...) } } -func (l *Logger) Errorf(format string, args ...interface{}) { +func (l *Logger) Errorf(format string, args ...any) { for _, log := range l.loggers { go log.Errorf(format, args...) } } -func (l *Logger) Panicf(format string, args ...interface{}) { +func (l *Logger) Panicf(format string, args ...any) { for _, log := range l.loggers { go log.Panicf(format, args...) } } -func (l *Logger) Fatalln(args ...interface{}) { +func (l *Logger) Fatalln(args ...any) { for _, log := range l.loggers { log.Logln(logrus.FatalLevel, args...) } os.Exit(1) } -func (l *Logger) Fatal(args ...interface{}) { +func (l *Logger) Fatal(args ...any) { for _, log := range l.loggers { log.Log(logrus.FatalLevel, args...) } os.Exit(1) } -func (l *Logger) Fatalf(format string, args ...interface{}) { +func (l *Logger) Fatalf(format string, args ...any) { for _, log := range l.loggers { log.Logf(logrus.FatalLevel, format, args...) } os.Exit(1) } -func (l *Logger) WithFieldsf(fields map[string]interface{}, level logrus.Level, format string, args ...interface{}) { +func (l *Logger) WithFieldsf(fields map[string]any, level logrus.Level, format string, args ...any) { for _, log := range l.loggers { go log.WithFields(fields).Logf(level, format, args...) } } -func (l *Logger) WithFields(fields map[string]interface{}, level logrus.Level, args ...interface{}) { +func (l *Logger) WithFields(fields map[string]any, level logrus.Level, args ...any) { for _, log := range l.loggers { go log.WithFields(fields).Log(level, args...) } diff --git a/misc/misc.go b/misc/misc.go index 2b23db0b..d0ff5eab 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -117,17 +117,17 @@ func HandleContainerGetError(err error) *models.Error { // DiscoverChildPaths return children models.Endpoints given path func DiscoverChildPaths(path string, spec json.RawMessage) (models.Endpoints, error) { - var m map[string]interface{} + var m map[string]any json := jsoniter.ConfigCompatibleWithStandardLibrary err := json.Unmarshal(spec, &m) if err != nil { return nil, err } es := make(models.Endpoints, 0, 1) - paths := m["paths"].(map[string]interface{}) + paths := m["paths"].(map[string]any) for key, value := range paths { - v := value.(map[string]interface{}) - if g, ok := v["get"].(map[string]interface{}); ok { + v := value.(map[string]any) + if g, ok := v["get"].(map[string]any); ok { title := "" if titleInterface, ok := g["summary"]; ok && titleInterface != nil { title = titleInterface.(string) diff --git a/resilient/client.go b/resilient/client.go index 7952b751..bb063168 100644 --- a/resilient/client.go +++ b/resilient/client.go @@ -47,7 +47,7 @@ func (c *Client) Runtime() (runtime.Runtime, error) { } // Now, for let's try to reconfigure once the runtime - cfg, err := c.HAProxyClient.Configuration() + cfg, err := c.Configuration() if err != nil { return nil, err } @@ -63,7 +63,7 @@ func (c *Client) Runtime() (runtime.Runtime, error) { if rnt == nil { return nil, errors.New("retry - unable to configure runtime client") } - c.HAProxyClient.ReplaceRuntime(rnt) + c.ReplaceRuntime(rnt) return c.HAProxyClient.Runtime() } diff --git a/runtime/commands/pprof.go b/runtime/commands/pprof.go index dbfd4994..c5f04ae9 100644 --- a/runtime/commands/pprof.go +++ b/runtime/commands/pprof.go @@ -128,7 +128,7 @@ func (g PProf) Command(cmd []string) (response []byte, err error) { } }() - return []byte(fmt.Sprintf("pprof web started on port %s with duration of %s", cmd[3], sleepTime)), nil + return fmt.Appendf(nil, "pprof web started on port %s with duration of %s", cmd[3], sleepTime), nil case "stop": if stopWebServer != nil { stopWebServer() @@ -184,7 +184,7 @@ func (g PProf) Command(cmd []string) (response []byte, err error) { } }() - return []byte(fmt.Sprintf("CPU Profile with duration of %s", sleepTime)), nil + return fmt.Appendf(nil, "CPU Profile with duration of %s", sleepTime), nil case "stop": if stopCPUProfiling == nil { return []byte(""), errors.New("CPU Profile not running") diff --git a/runtime/commands/stack.go b/runtime/commands/stack.go index e27a3c16..844a87fc 100644 --- a/runtime/commands/stack.go +++ b/runtime/commands/stack.go @@ -77,7 +77,7 @@ func MakeStackDump() (string, error) { srcLen := 0 pkgLen := 0 for _, bucket := range buckets { - for _, line := range bucket.Signature.Stack.Calls { + for _, line := range bucket.Stack.Calls { if l := len(fmt.Sprintf("%s:%d", line.SrcName, line.Line)); l > srcLen { srcLen = l } From dd8b4ed3b83378d7b15faab332927c491f3efede Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 15:31:18 +0100 Subject: [PATCH 51/65] BUILD/MEDIUM: client-native: upgrade to latest client-native --- go.mod | 48 +++++++++++++-------------- go.sum | 100 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/go.mod b/go.mod index 8d5e8c61..350e6408 100644 --- a/go.mod +++ b/go.mod @@ -14,19 +14,19 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.133.0 - github.com/go-openapi/errors v0.22.4 + github.com/go-openapi/errors v0.22.6 github.com/go-openapi/loads v0.23.2 github.com/go-openapi/runtime v0.29.0 - github.com/go-openapi/spec v0.22.1 + github.com/go-openapi/spec v0.22.3 github.com/go-openapi/strfmt v0.25.0 - github.com/go-openapi/swag v0.25.3 - github.com/go-openapi/swag/cmdutils v0.25.3 - github.com/go-openapi/swag/mangling v0.25.3 + github.com/go-openapi/swag v0.25.4 + github.com/go-openapi/swag/cmdutils v0.25.4 + github.com/go-openapi/swag/mangling v0.25.4 github.com/go-openapi/validate v0.25.1 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.17 + github.com/haproxytech/client-native/v6 v6.0.18 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -40,8 +40,8 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.47.0 - golang.org/x/sys v0.38.0 + golang.org/x/net v0.49.0 + golang.org/x/sys v0.40.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -60,19 +60,19 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.24.1 // indirect - github.com/go-openapi/jsonpointer v0.22.3 // indirect - github.com/go-openapi/jsonreference v0.21.3 // indirect - github.com/go-openapi/swag/conv v0.25.3 // indirect - github.com/go-openapi/swag/fileutils v0.25.3 // indirect - github.com/go-openapi/swag/jsonname v0.25.3 // indirect - github.com/go-openapi/swag/jsonutils v0.25.3 // indirect - github.com/go-openapi/swag/loading v0.25.3 // indirect - github.com/go-openapi/swag/netutils v0.25.3 // indirect - github.com/go-openapi/swag/stringutils v0.25.3 // indirect - github.com/go-openapi/swag/typeutils v0.25.3 // indirect - github.com/go-openapi/swag/yamlutils v0.25.3 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-openapi/analysis v0.24.2 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/gofrs/flock v0.13.0 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -97,9 +97,9 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.6 // indirect + go.mongodb.org/mongo-driver v1.17.7 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/text v0.31.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/text v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4af01fe7..5dcf3685 100644 --- a/go.sum +++ b/go.sum @@ -53,48 +53,48 @@ github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7Bdxkc github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/analysis v0.24.1 h1:Xp+7Yn/KOnVWYG8d+hPksOYnCYImE3TieBa7rBOesYM= -github.com/go-openapi/analysis v0.24.1/go.mod h1:dU+qxX7QGU1rl7IYhBC8bIfmWQdX4Buoea4TGtxXY84= -github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= -github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= -github.com/go-openapi/jsonpointer v0.22.3 h1:dKMwfV4fmt6Ah90zloTbUKWMD+0he+12XYAsPotrkn8= -github.com/go-openapi/jsonpointer v0.22.3/go.mod h1:0lBbqeRsQ5lIanv3LHZBrmRGHLHcQoOXQnf88fHlGWo= -github.com/go-openapi/jsonreference v0.21.3 h1:96Dn+MRPa0nYAR8DR1E03SblB5FJvh7W6krPI0Z7qMc= -github.com/go-openapi/jsonreference v0.21.3/go.mod h1:RqkUP0MrLf37HqxZxrIAtTWW4ZJIK1VzduhXYBEeGc4= +github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= +github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= +github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= +github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= -github.com/go-openapi/spec v0.22.1 h1:beZMa5AVQzRspNjvhe5aG1/XyBSMeX1eEOs7dMoXh/k= -github.com/go-openapi/spec v0.22.1/go.mod h1:c7aeIQT175dVowfp7FeCvXXnjN/MrpaONStibD2WtDA= +github.com/go-openapi/spec v0.22.3 h1:qRSmj6Smz2rEBxMnLRBMeBWxbbOvuOoElvSvObIgwQc= +github.com/go-openapi/spec v0.22.3/go.mod h1:iIImLODL2loCh3Vnox8TY2YWYJZjMAKYyLH2Mu8lOZs= github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= -github.com/go-openapi/swag v0.25.3 h1:FAa5wJXyDtI7yUztKDfZxDrSx+8WTg31MfCQ9s3PV+s= -github.com/go-openapi/swag v0.25.3/go.mod h1:tX9vI8Mj8Ny+uCEk39I1QADvIPI7lkndX4qCsEqhkS8= -github.com/go-openapi/swag/cmdutils v0.25.3 h1:EIwGxN143JCThNHnqfqs85R8lJcJG06qjJRZp3VvjLI= -github.com/go-openapi/swag/cmdutils v0.25.3/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.3 h1:PcB18wwfba7MN5BVlBIV+VxvUUeC2kEuCEyJ2/t2X7E= -github.com/go-openapi/swag/conv v0.25.3/go.mod h1:n4Ibfwhn8NJnPXNRhBO5Cqb9ez7alBR40JS4rbASUPU= -github.com/go-openapi/swag/fileutils v0.25.3 h1:P52Uhd7GShkeU/a1cBOuqIcHMHBrA54Z2t5fLlE85SQ= -github.com/go-openapi/swag/fileutils v0.25.3/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= -github.com/go-openapi/swag/jsonname v0.25.3 h1:U20VKDS74HiPaLV7UZkztpyVOw3JNVsit+w+gTXRj0A= -github.com/go-openapi/swag/jsonname v0.25.3/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= -github.com/go-openapi/swag/jsonutils v0.25.3 h1:kV7wer79KXUM4Ea4tBdAVTU842Rg6tWstX3QbM4fGdw= -github.com/go-openapi/swag/jsonutils v0.25.3/go.mod h1:ILcKqe4HC1VEZmJx51cVuZQ6MF8QvdfXsQfiaCs0z9o= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.3 h1:/i3E9hBujtXfHy91rjtwJ7Fgv5TuDHgnSrYjhFxwxOw= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.3/go.mod h1:8kYfCR2rHyOj25HVvxL5Nm8wkfzggddgjZm6RgjT8Ao= -github.com/go-openapi/swag/loading v0.25.3 h1:Nn65Zlzf4854MY6Ft0JdNrtnHh2bdcS/tXckpSnOb2Y= -github.com/go-openapi/swag/loading v0.25.3/go.mod h1:xajJ5P4Ang+cwM5gKFrHBgkEDWfLcsAKepIuzTmOb/c= -github.com/go-openapi/swag/mangling v0.25.3 h1:rGIrEzXaYWuUW1MkFmG3pcH+EIA0/CoUkQnIyB6TUyo= -github.com/go-openapi/swag/mangling v0.25.3/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= -github.com/go-openapi/swag/netutils v0.25.3 h1:XWXHZfL/65ABiv8rvGp9dtE0C6QHTYkCrNV77jTl358= -github.com/go-openapi/swag/netutils v0.25.3/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= -github.com/go-openapi/swag/stringutils v0.25.3 h1:nAmWq1fUTWl/XiaEPwALjp/8BPZJun70iDHRNq/sH6w= -github.com/go-openapi/swag/stringutils v0.25.3/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= -github.com/go-openapi/swag/typeutils v0.25.3 h1:2w4mEEo7DQt3V4veWMZw0yTPQibiL3ri2fdDV4t2TQc= -github.com/go-openapi/swag/typeutils v0.25.3/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= -github.com/go-openapi/swag/yamlutils v0.25.3 h1:LKTJjCn/W1ZfMec0XDL4Vxh8kyAnv1orH5F2OREDUrg= -github.com/go-openapi/swag/yamlutils v0.25.3/go.mod h1:Y7QN6Wc5DOBXK14/xeo1cQlq0EA0wvLoSv13gDQoCao= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= @@ -103,8 +103,8 @@ github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZn github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -116,8 +116,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.17 h1:6Z9I1FeyHIiyi0D9YdU03GbG5i2dM5rlm4X9Kvtnq1g= -github.com/haproxytech/client-native/v6 v6.0.17/go.mod h1:cm/z+lThz1utiMCWeAbZikP+lYH0yC6q+m5bn5GaEN8= +github.com/haproxytech/client-native/v6 v6.0.18 h1:JCbol9Bu4D/NuAihLhF8b0/FTQgwWiPd/CSLB/87mpA= +github.com/haproxytech/client-native/v6 v6.0.18/go.mod h1:pznF3XK2PudwbwF0YHC4tiLYDAN9tVTrg7r0EQZMEDY= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -202,23 +202,23 @@ github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQs github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= -go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.7 h1:a9w+U3Vt67eYzcfq3k/OAv284/uUUkL0uP75VE5rCOU= +go.mongodb.org/mongo-driver v1.17.7/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From cd3df02c30b9da153c4012eecbd9c48ce2dde435 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 15:32:07 +0100 Subject: [PATCH 52/65] TEST/MINOR: e2e: upgrade e2e tests to haproxy 3.0 --- .gitlab-ci.yml | 32 +------------------------------- e2e/run.bash | 2 +- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2745125b..6a5e029c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -180,39 +180,9 @@ govulncheck: - go mod tidy - go run cmd/govulncheck-report/main.go -HAProxy_2_2: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.2" -HAProxy_2_4: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.4" -HAProxy_2_6: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.6" -HAProxy_2_8: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.8" -HAProxy_2_9: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.9" HAProxy_3_0: extends: .e2e parallel: matrix: - - TESTPART: ["1/2", "2/2"] + - TESTPART: ["1/4", "2/4", "3/4", "4/4"] HAPROXY_VERSION: "3.0" diff --git a/e2e/run.bash b/e2e/run.bash index 72620d5b..43b95c29 100755 --- a/e2e/run.bash +++ b/e2e/run.bash @@ -18,7 +18,7 @@ set -eo pipefail export BASE_PATH="/v3" -HAPROXY_VERSION=${HAPROXY_VERSION:-2.9} +HAPROXY_VERSION=${HAPROXY_VERSION:-3.0} DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-debian}:${HAPROXY_VERSION}" DOCKER_CONTAINER_NAME="dataplaneapi-e2e" export DOCKER_CONTAINER_NAME From 1ce9aa175b877532d0e7b2bf67e8a10ef186aeec Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Tue, 13 May 2025 13:38:31 +0200 Subject: [PATCH 53/65] BUG/MINOR: runtime: fix creating servers with HAProxy >= 3.0 In HAProxy 3.0, the keyword "enabled" is not accepted anymore when creating servers dynamically with the runtime socket (they are enabled by default). Dataplaneapi used to add "enabled" unless the server was marked as in maintenance. --- handlers/runtime_server.go | 17 ++++++++++++++--- handlers/server.go | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/handlers/runtime_server.go b/handlers/runtime_server.go index 8b8c71f0..da50fe78 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -23,6 +23,7 @@ import ( client_native "github.com/haproxytech/client-native/v6" native_errors "github.com/haproxytech/client-native/v6/errors" "github.com/haproxytech/client-native/v6/models" + cn_runtime "github.com/haproxytech/client-native/v6/runtime" "github.com/haproxytech/dataplaneapi/misc" "github.com/haproxytech/dataplaneapi/operations/server" @@ -168,7 +169,13 @@ func (h *AddRuntimeServerHandlerImpl) Handle(params server.AddRuntimeServerParam return server.NewAddRuntimeServerBadRequest().WithPayload(&models.Error{Code: &code, Message: &msg}) } - err = runtime.AddServer(params.ParentName, params.Data.Name, SerializeRuntimeAddServer(params.Data)) + haversion, err := runtime.GetVersion() + if err != nil { + e := misc.HandleError(err) + return server.NewAddRuntimeServerDefault(int(*e.Code)).WithPayload(e) + } + + err = runtime.AddServer(params.ParentName, params.Data.Name, SerializeRuntimeAddServer(params.Data, &haversion)) if err != nil { msg := err.Error() switch { @@ -236,7 +243,7 @@ func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServe // SerializeRuntimeAddServer returns a string in the HAProxy config format, suitable // for the "add server" operation over the control socket. // Not all the Server attributes are available in this case. -func SerializeRuntimeAddServer(srv *models.RuntimeAddServer) string { //nolint:cyclop,maintidx +func SerializeRuntimeAddServer(srv *models.RuntimeAddServer, version *cn_runtime.HAProxyVersion) string { //nolint:cyclop,maintidx b := &strings.Builder{} push := func(s string) { @@ -311,7 +318,11 @@ func SerializeRuntimeAddServer(srv *models.RuntimeAddServer) string { //nolint:c case srv.Downinter != nil: pushi("downinter", srv.Downinter) case !enabled(srv.Maintenance): - push("enabled") + required := new(cn_runtime.HAProxyVersion) + required.ParseHAProxyVersion("3.0.0") + if !cn_runtime.IsBiggerOrEqual(required, version) { + push("enabled") + } case srv.ErrorLimit != nil: pushi("error-limit", srv.ErrorLimit) case srv.Fall != nil: diff --git a/handlers/server.go b/handlers/server.go index cb34ce8f..1377daf3 100644 --- a/handlers/server.go +++ b/handlers/server.go @@ -145,7 +145,8 @@ func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewCreateServerBackendCreated().WithPayload(params.Data) } if useRuntime { - err = runtimeClient.AddServer(pName, params.Data.Name, SerializeRuntimeAddServer(ras)) + haversion, _ := runtimeClient.GetVersion() + err = runtimeClient.AddServer(pName, params.Data.Name, SerializeRuntimeAddServer(ras, &haversion)) if err == nil { // No need to reload. log.Debugf("backend %s: server %s added though runtime", pName, params.Data.Name) From 2131ca0912ebced31c33f16efc8f5a4c8b7e9b8a Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Tue, 13 May 2025 16:08:44 +0200 Subject: [PATCH 54/65] TEST/MINOR: try to fix bug_132 failures on CI --- e2e/tests/x_issue_132/data/haproxy.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/x_issue_132/data/haproxy.cfg b/e2e/tests/x_issue_132/data/haproxy.cfg index eed983e2..5f228126 100644 --- a/e2e/tests/x_issue_132/data/haproxy.cfg +++ b/e2e/tests/x_issue_132/data/haproxy.cfg @@ -5,4 +5,4 @@ frontend bug_132 default_backend bug_132 backend bug_132 - server app1 127.0.0.1:8080 check + server app1 127.0.0.1:8080 From ce8566e913b55ace51656881cc7826b81a6bf385 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Tue, 13 May 2025 16:41:11 +0200 Subject: [PATCH 55/65] TEST/MINOR: fix random fails on CI when removing a default section --- e2e/tests/defaults/get.bats | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/e2e/tests/defaults/get.bats b/e2e/tests/defaults/get.bats index 1168c499..c380817c 100644 --- a/e2e/tests/defaults/get.bats +++ b/e2e/tests/defaults/get.bats @@ -27,17 +27,6 @@ load 'utils/_helpers' @test "defaults: Return a list of defaults configurations" { resource_get "$_DEFAULTS_BASE_PATH" assert_equal "$SC" 200 - - # log_target_list is a child resource, it should not be filled when full_section=false - assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "null" -} - -@test "default: return a list of defaults configurations with full section" { - resource_get "$_DEFAULTS_BASE_PATH" "full_section=true" - assert_equal "$SC" 200 - - # log_target_list is a child resource, it should be filled when full_section=true - assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "true" } @test "defaults: Return a defaults configuration" { From ba833475b37cd5997ca168f4a32ae40506905cfa Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 28 Jan 2026 09:42:01 +0100 Subject: [PATCH 56/65] TEST/MINOR: set_uid: fix the set_uid test --- .aspell.yml | 1 + e2e/tests/set_uid/test.bats | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index 076e2e8e..838e0f34 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -126,6 +126,7 @@ allowed: - tooltip - tsconfig - ubuntu +- uid - uniq - unix - unsub diff --git a/e2e/tests/set_uid/test.bats b/e2e/tests/set_uid/test.bats index 51f523db..91ffd753 100644 --- a/e2e/tests/set_uid/test.bats +++ b/e2e/tests/set_uid/test.bats @@ -24,8 +24,8 @@ setup() { run dpa_docker_exec 'pkill -9 dataplaneapi' assert_success - run dpa_docker_exec 'adduser -u 1500 testuiduser' - #assert_success ignore error since we do not plan to insert password, user will be created + run dpa_docker_exec 'useradd -m -p test -s /bin/bash -u 1500 testuiduser' + assert_success run docker cp "${BATS_TEST_DIRNAME}/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/home/testuiduser/dataplaneapi.yaml" assert_success From e5d3b83255cf1e3f41429ab65444e1636b26612b Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 19 Feb 2026 09:12:19 +0100 Subject: [PATCH 57/65] BUILD/MINOR: ci: increase version of commit check --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a5e029c..370c603e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ variables: DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian BATS_VERSION: v1.10.0 GO_VERSION: "1.25" - DOCKER_VERSION: "26.0" + DOCKER_VERSION: "29.1" pipelines-check: stage: bots @@ -89,7 +89,7 @@ gofumpt: commit-policy: stage: lint image: - name: $CI_REGISTRY_GO/commit-check:5.0.4 + name: $CI_REGISTRY_GO/commit-check:5.4.2 entrypoint: [""] tags: - go @@ -151,7 +151,7 @@ test: before_script: - apk add git bash curl jq git - git clone https://github.com/bats-core/bats-core.git && cd bats-core && git checkout $BATS_VERSION && ./install.sh /usr/local && cd .. - - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY_GO + - docker login -u='$app' -p $CI_REGISTRY_TOKEN $CI_REGISTRY_GO script: - bash -x ./e2e/run.bash rules: From 7b91890f2ad8e9d620f76c094e165420ca32c113 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 25 Feb 2026 18:47:06 +0100 Subject: [PATCH 58/65] BUG/MEDIUM: Expose new client-native option validate_files_before As well as validate_files_after. These options are useful when HAProxy reads from several configuration files. They allow dataplaneapi to launch HAProxy with the correct -f flags to validate the configuration. For example, a common practice is to put the global section into a separate file called global.def. To make sure this file is included before the main configuration file, you would add it to to "validate_files_before", which is a list of filenames. --- client-native/cn.go | 1 + configuration/configuration.go | 2 + configuration/configuration_storage.go | 24 ++++++--- configuration/examples/example-full.yaml | 3 ++ .../container/usr/local/etc/haproxy/default | 51 +++++++++++++++++++ .../usr/local/etc/haproxy/global.def | 10 ++++ e2e/tests/raw_multi/data/haproxy.cfg | 31 +++++++++++ e2e/tests/raw_multi/data/haproxy.cfg.json | 1 + e2e/tests/raw_multi/dataplaneapi.yaml | 29 +++++++++++ e2e/tests/raw_multi/validate.bats | 30 +++++++++++ 10 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default create mode 100644 e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def create mode 100644 e2e/tests/raw_multi/data/haproxy.cfg create mode 100644 e2e/tests/raw_multi/data/haproxy.cfg.json create mode 100644 e2e/tests/raw_multi/dataplaneapi.yaml create mode 100644 e2e/tests/raw_multi/validate.bats diff --git a/client-native/cn.go b/client-native/cn.go index 2235de19..3c955e14 100644 --- a/client-native/cn.go +++ b/client-native/cn.go @@ -34,6 +34,7 @@ func ConfigureConfigurationClient(haproxyOptions dataplaneapi_config.HAProxyConf configuration_options.UsePersistentTransactions, configuration_options.TransactionsDir(haproxyOptions.TransactionDir), configuration_options.ValidateCmd(haproxyOptions.ValidateCmd), + configuration_options.ValidateConfigFiles(haproxyOptions.ValidateFilesBefore, haproxyOptions.ValidateFilesAfter), configuration_options.MasterWorker, configuration_options.UseMd5Hash, configuration_options.PreferredTimeSuffix(haproxyOptions.PreferredTimeSuffix), diff --git a/configuration/configuration.go b/configuration/configuration.go index e8d20fde..ad0d4f51 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -49,6 +49,8 @@ type HAProxyConfiguration struct { ReloadStrategy string `long:"reload-strategy" description:"Either systemd, s6 or custom" default:"custom" group:"reload"` TransactionDir string `short:"t" long:"transaction-dir" description:"Path to the transaction directory" default:"/tmp/haproxy" group:"transaction"` ValidateCmd string `long:"validate-cmd" description:"Executes a custom command to perform the HAProxy configuration check" group:"reload"` + ValidateFilesBefore []string `long:"validate-files-before" description:"A list of configuration files to be loaded before the main file for validation" group:"reload"` + ValidateFilesAfter []string `long:"validate-files-after" description:"A list of configuration files to be loaded after the main file for validation" group:"reload"` BackupsDir string `long:"backups-dir" description:"Path to directory in which to place backup files" group:"transaction"` MapsDir string `short:"p" long:"maps-dir" description:"Path to directory of map files managed by dataplane" default:"/etc/haproxy/maps" group:"resources"` SpoeTransactionDir string `long:"spoe-transaction-dir" description:"Path to the SPOE transaction directory" default:"/tmp/spoe-haproxy" group:"resources"` diff --git a/configuration/configuration_storage.go b/configuration/configuration_storage.go index a29ec412..16deb61f 100644 --- a/configuration/configuration_storage.go +++ b/configuration/configuration_storage.go @@ -81,14 +81,16 @@ type configTypeUserlist struct { } type configTypeReload struct { - ReloadDelay *int `yaml:"reload_delay,omitempty"` - ReloadCmd *string `yaml:"reload_cmd,omitempty"` - RestartCmd *string `yaml:"restart_cmd,omitempty"` - StatusCmd *string `yaml:"status_cmd,omitempty"` - ServiceName *string `yaml:"service_name,omitempty"` - ReloadRetention *int `yaml:"reload_retention,omitempty"` - ReloadStrategy *string `yaml:"reload_strategy,omitempty"` - ValidateCmd *string `yaml:"validate_cmd,omitempty"` + ReloadDelay *int `yaml:"reload_delay,omitempty"` + ReloadCmd *string `yaml:"reload_cmd,omitempty"` + RestartCmd *string `yaml:"restart_cmd,omitempty"` + StatusCmd *string `yaml:"status_cmd,omitempty"` + ServiceName *string `yaml:"service_name,omitempty"` + ReloadRetention *int `yaml:"reload_retention,omitempty"` + ReloadStrategy *string `yaml:"reload_strategy,omitempty"` + ValidateCmd *string `yaml:"validate_cmd,omitempty"` + ValidateFilesBefore *[]string `yaml:"validate_files_before,omitempty"` + ValidateFilesAfter *[]string `yaml:"validate_files_after,omitempty"` } type configTypeTransaction struct { @@ -252,6 +254,12 @@ func copyToConfiguration(cfg *Configuration) { //nolint:cyclop,maintidx if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateCmd != nil && !misc.HasOSArg("", "validate-cmd", "") { cfg.HAProxy.ValidateCmd = *cfgStorage.Haproxy.Reload.ValidateCmd } + if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateFilesBefore != nil && !misc.HasOSArg("", "validate-files-before", "") { + cfg.HAProxy.ValidateFilesBefore = *cfgStorage.Haproxy.Reload.ValidateFilesBefore + } + if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateFilesAfter != nil && !misc.HasOSArg("", "validate-files-after", "") { + cfg.HAProxy.ValidateFilesAfter = *cfgStorage.Haproxy.Reload.ValidateFilesAfter + } if cfgStorage.Dataplaneapi != nil && cfgStorage.Dataplaneapi.Transaction != nil && cfgStorage.Dataplaneapi.Transaction.TransactionDir != nil && !misc.HasOSArg("t", "transaction-dir", "") { cfg.HAProxy.TransactionDir = *cfgStorage.Dataplaneapi.Transaction.TransactionDir } diff --git a/configuration/examples/example-full.yaml b/configuration/examples/example-full.yaml index 1a083184..cb89591b 100644 --- a/configuration/examples/example-full.yaml +++ b/configuration/examples/example-full.yaml @@ -71,6 +71,9 @@ haproxy: reload_retention: 1 # int 2 reload_strategy: custom validate_cmd: null # string 2 + validate_files_before: + - "/etc/haproxy/global.def" + validate_files_after: [] # []string cluster: # Deprecated starting 3.0, see ./README.md for more information cluster_tls_dir: null # string id: null # string diff --git a/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default new file mode 100644 index 00000000..37c977d4 --- /dev/null +++ b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default @@ -0,0 +1,51 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDciXjkAHqi+B+X +jgFTEDlGrz6OAISOZTY7vA1eqTW2wnUHyHiaj73xnGegxp9rgZ05lqg/ZU4fO0lt +9XWh1h8+pjwG3KoClS9yr2AK6+tpc7cjN6ZwkQo/3I+ulh9SfbIwW4TSay1yFp9v +aDX2MIicRzh308Z0fw92jBEcMAfewXXEIr/+PSwHLj2WLS3Adme3GNCJwzAbcU/C +OWKlSWrgbOEsYcCGI7Fv8GFeJp7sLAeN/G/ichXEQfJIn3Enb30zBr+B3VxgyYQV +tiOxiT+LTKX/zG16chOJQzKLYfT+E7m4o6fQbfEjScEx0/4JHAfn6OydMMrw3g+f +M10NhkRHAgMBAAECggEAUMFOMT8zqQVunBJ1zbK9JnL5Vwo9f97z8v+zbZxMfPXL +4OO5te84wIZjM+5HZhh6OCJAzaYM60bMZqVhQ7eijVBV3rVi07tJOpeZdaZZ961V +vGGeYs3ZkPT08BsssQox+58njd2NMJ+0Fhl02QeAnqk9tjMoEnSMdv5nLYkw+JH0 +Uw3cYD7ZjBzA/VYoD9nuZDhN/xiqhLksnOOYnucSleQI0feVbG/QSYfzQeGo42Om +MjlVJr0LeJMebOcT34o3fQHoz6pQZt0WP4xNwRrk72ZqBl8HSkLGfrqzg2hlaldQ +JfB7DuWkYRrUF0GKs7CbFo4yRsABVtp8DF6xiCL5AQKBgQD/dLPG8Garlc9liJG9 +ovCE2/kAkeni/Qjc14CFX4qkgcnBIaTTl79xeRmN5dp/WnTinNNMQTamaCJaKEgN +5A28axTsE9Ec/9sGrv/Dt3fXtS+rBPYS9Hc1k5LQrnBlD6lEe5+Oqhc4Mzw5sglo +sfiChEzojV9Vnyj/Y0m5q8t9hwKBgQDdAbqiHMJoAP7IEnsOw1xjA6zFaeY2jYDS +F5ZvSN0IlWXX2Aqc941ws1qKZiGjC9pqaRcjlh1OvhaEIpY7ksTShM8453mstWGl +GV3iYiI9E+KijwqFhWyuiXxi0m0l0u2vXPgj0u6txX9suQQab9+f2oSEXG34wXDu +R9+s/rqzQQKBgFID9OgtLLlwGqsdgrUgyBnPyg0Ny8qttJe6tK+dchTI+q6AD7xD +XxqeZ77wCguTTi2nbgtwcIxSqJzLi/6xtltFAe2dmyi1WGu36bO7hsWBjXFZ4WtK +g6921s8bAkjgE1dCXYLfRx8rC+32JCEx6nh044BSS0ZhGDeOeBAdgPKnAoGBAIIa +w3kt/xBlDZhQsNr3DUtI3Yv2FM2mreCAfFIVDfJAqQzRJSZU4ZIoM7Pn/gNTNgiQ +x0tu0uAJLY4qIlD9zRq1jpxMQKf4u3wLG+bqqIdWToQuOx5xdpKlY3F1uUWcD8q9 +q2LDiTkJXENwA8dgdsBPTtXw59iaYFYWP8pCxzxBAoGANmDkR5qJBJMeQgD8pVKu +xLwV7gInuVMLqfF67aBTCsQKAk+b+zWKUbPLpaldCXREj0YLsTEmp2srIP4KKSMH +N/yjXtYxY4fmCsrHAzqqzpZiYWRYScXHwCSudvV0w7PFNwKndS68lqDj7JKyGkBe +rAMB+WGlOTcNKJrsrq7mnPc= +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIUSUdc/Tj4WL90KtoPif0wGpgEGlowDQYJKoZIhvcNAQEL +BQAwfjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcM +DU1vdW50YWluIFZpZXcxGjAYBgNVBAoMEVlvdXIgT3JnYW5pemF0aW9uMRIwEAYD +VQQLDAlZb3VyIFVuaXQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0yMzA1MjQxMDIy +MjJaFw0zMzA1MjExMDIyMjJaMH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxp +Zm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRowGAYDVQQKDBFZb3VyIE9y +Z2FuaXphdGlvbjESMBAGA1UECwwJWW91ciBVbml0MRIwEAYDVQQDDAlsb2NhbGhv +c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDciXjkAHqi+B+XjgFT +EDlGrz6OAISOZTY7vA1eqTW2wnUHyHiaj73xnGegxp9rgZ05lqg/ZU4fO0lt9XWh +1h8+pjwG3KoClS9yr2AK6+tpc7cjN6ZwkQo/3I+ulh9SfbIwW4TSay1yFp9vaDX2 +MIicRzh308Z0fw92jBEcMAfewXXEIr/+PSwHLj2WLS3Adme3GNCJwzAbcU/COWKl +SWrgbOEsYcCGI7Fv8GFeJp7sLAeN/G/ichXEQfJIn3Enb30zBr+B3VxgyYQVtiOx +iT+LTKX/zG16chOJQzKLYfT+E7m4o6fQbfEjScEx0/4JHAfn6OydMMrw3g+fM10N +hkRHAgMBAAGjUzBRMB0GA1UdDgQWBBQyAsLJnbNGf7ME+DokcSeSMYMN5jAfBgNV +HSMEGDAWgBQyAsLJnbNGf7ME+DokcSeSMYMN5jAPBgNVHRMBAf8EBTADAQH/MA0G +CSqGSIb3DQEBCwUAA4IBAQB62/lsOhVrIwUx07C4r3eGu6EmughelFJgqwijnOSS +JmICWvLtfu+X8DQkl0ls5esnK8FZk2i5zBMqhdkD0vb9qa0iI++M6jcjbDrW/bZ/ +oLa/zvEvUeEQS3FqS8p3OUczm4T88cBze3MX4iDDo/QgK6B/46t2UeXByuIZEXsK +6OzBfoX31qrZ+DvvKBSLQG1f13vkp9WDL2u60IQ4XaIgyr+O1R/x157ic0WPaWoV +EwPYP7ds1d8Zz9z8u6LFNi+as33zkRhIBQble277U8vT7AOicXHxnf7y2rToO41h +mi+hA0kvDDgbr4r/K/Lq909m8OUKWBZ5U+c9c7FdMqT+ +-----END CERTIFICATE----- diff --git a/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def new file mode 100644 index 00000000..4a67f955 --- /dev/null +++ b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def @@ -0,0 +1,10 @@ +global + chroot /var/lib/haproxy + user haproxy + group haproxy + maxconn 4000 + pidfile /var/run/haproxy.pid + stats socket /var/lib/haproxy/stats level admin + log 127.0.0.1 local2 + crt-base /etc/haproxy + ca-base /etc/haproxy diff --git a/e2e/tests/raw_multi/data/haproxy.cfg b/e2e/tests/raw_multi/data/haproxy.cfg new file mode 100644 index 00000000..a2d60ac7 --- /dev/null +++ b/e2e/tests/raw_multi/data/haproxy.cfg @@ -0,0 +1,31 @@ +# global is defined in global.def + +defaults mydefaults + mode http + maxconn 3000 + log global + option httplog + option redispatch + option dontlognull + option http-server-close + option forwardfor except 127.0.0.0/8 + timeout http-request 10s + timeout check 10s + timeout connect 10s + timeout client 1m + timeout queue 1m + timeout server 1m + timeout http-keep-alive 10s + retries 3 + +backend test_backend + mode http + balance roundrobin + option forwardfor + server server_01 10.1.1.1:8080 check weight 80 + server server_02 10.1.1.2:8080 check weight 80 + server server_03 10.1.1.2:8080 check weight 80 + +frontend test_frontend + bind :1443 ssl crt default + use_backend test_backend diff --git a/e2e/tests/raw_multi/data/haproxy.cfg.json b/e2e/tests/raw_multi/data/haproxy.cfg.json new file mode 100644 index 00000000..a42efeb0 --- /dev/null +++ b/e2e/tests/raw_multi/data/haproxy.cfg.json @@ -0,0 +1 @@ +"# global is defined in global.def\n\ndefaults mydefaults\n mode http\n maxconn 3000\n log global\n option httplog\n option redispatch\n option dontlognull\n option http-server-close\n option forwardfor except 127.0.0.0/8\n timeout http-request 10s\n timeout check 10s\n timeout connect 10s\n timeout client 1m\n timeout queue 1m\n timeout server 1m\n timeout http-keep-alive 10s\n retries 3\n\nbackend test_backend\n mode http\n balance roundrobin\n option forwardfor\n server server_01 10.1.1.1:8080 check weight 80\n server server_02 10.1.1.2:8080 check weight 80\n server server_03 10.1.1.2:8080 check weight 80\n\nfrontend test_frontend\n bind :1443 ssl crt default\n use_backend test_backend\n" diff --git a/e2e/tests/raw_multi/dataplaneapi.yaml b/e2e/tests/raw_multi/dataplaneapi.yaml new file mode 100644 index 00000000..0580cb26 --- /dev/null +++ b/e2e/tests/raw_multi/dataplaneapi.yaml @@ -0,0 +1,29 @@ +# Same config as dataplaneapi-master-socket.yaml +# but with an extra "validate_files_before". + +name: famous_condor +dataplaneapi: + host: 0.0.0.0 + port: 8080 + userlist: + userlist_file: /etc/haproxy/userlist.cfg + resources: + maps_dir: /etc/haproxy/maps + ssl_certs_dir: /etc/haproxy/ssl + general_storage_dir: /etc/haproxy/general + dataplane_storage_dir: /etc/haproxy/dataplane + spoe_dir: /etc/haproxy/spoe +haproxy: + config_file: /etc/haproxy/haproxy.cfg + haproxy_bin: /usr/local/sbin/haproxy + master_runtime: /var/lib/haproxy/master + master_worker_mode: true + reload: + reload_cmd: kill -s 12 1 + restart_cmd: kill -s 12 1 + validate_files_before: + - /etc/haproxy/global.def +log: + log_to: file + log_file: /var/log/dataplaneapi.log + log_level: debug diff --git a/e2e/tests/raw_multi/validate.bats b/e2e/tests/raw_multi/validate.bats new file mode 100644 index 00000000..a408925a --- /dev/null +++ b/e2e/tests/raw_multi/validate.bats @@ -0,0 +1,30 @@ +#!/usr/bin/env bats +# +# Copyright 2025 HAProxy Technologies +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load '../../libs/dataplaneapi' +load '../../libs/debug' +load "../../libs/get_json_path" +load '../../libs/haproxy_config_setup' +load '../../libs/resource_client' +load '../../libs/version' + +_RAW_BASE_PATH="/services/haproxy/configuration/raw" + +@test "raw_multi: Validate a new configuration which depends on global.def" { + resource_post "$_RAW_BASE_PATH" 'data/haproxy.cfg.json' 'only_validate=1' + assert_equal "$SC" 202 +} From 3c48e21fb7c3e7a493a349e0317756346c64549c Mon Sep 17 00:00:00 2001 From: Andjelko Iharos Date: Wed, 4 Mar 2026 12:43:35 +0100 Subject: [PATCH 59/65] BUG/MINOR: ignore empty runtime API commands --- handlers/raw.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handlers/raw.go b/handlers/raw.go index 01fe1e05..e839df99 100644 --- a/handlers/raw.go +++ b/handlers/raw.go @@ -222,6 +222,9 @@ func executeRuntimeActions(actionsStr string, client client_native.HAProxyClient continue } action := params[0] + if action == "" { + continue + } switch action { case "SetFrontendMaxConn": if len(params) > 2 { From 3c58a618e04109eae6db9e27801ff695833bf8fc Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 17:56:23 +0100 Subject: [PATCH 60/65] BUILD/MAJOR: go.mod: upgrade client-native and generate --- embedded_spec.go | 16 ++++++-- go.mod | 44 +++++++++++----------- go.sum | 96 ++++++++++++++++++++++++------------------------ 3 files changed, 82 insertions(+), 74 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 11c282ab..a0be5f10 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -22668,7 +22668,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "index": 0, "name": "test_backend" } @@ -30744,6 +30744,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "x-default-unit": "ms", @@ -32722,7 +32726,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "target_server": "www" } }, @@ -72905,7 +72909,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "index": 0, "name": "test_backend" } @@ -80822,6 +80826,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "minimum": 0, @@ -82825,7 +82833,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "target_server": "www" } }, diff --git a/go.mod b/go.mod index 350e6408..794306ef 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.25 +go 1.25.0 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 @@ -14,19 +14,19 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.133.0 - github.com/go-openapi/errors v0.22.6 + github.com/go-openapi/errors v0.22.7 github.com/go-openapi/loads v0.23.2 github.com/go-openapi/runtime v0.29.0 - github.com/go-openapi/spec v0.22.3 + github.com/go-openapi/spec v0.22.4 github.com/go-openapi/strfmt v0.25.0 - github.com/go-openapi/swag v0.25.4 - github.com/go-openapi/swag/cmdutils v0.25.4 - github.com/go-openapi/swag/mangling v0.25.4 + github.com/go-openapi/swag v0.25.5 + github.com/go-openapi/swag/cmdutils v0.25.5 + github.com/go-openapi/swag/mangling v0.25.5 github.com/go-openapi/validate v0.25.1 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.18 + github.com/haproxytech/client-native/v6 v6.0.20 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -40,8 +40,8 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.49.0 - golang.org/x/sys v0.40.0 + golang.org/x/net v0.51.0 + golang.org/x/sys v0.41.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -61,17 +61,17 @@ require ( github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/analysis v0.24.2 // indirect - github.com/go-openapi/jsonpointer v0.22.4 // indirect - github.com/go-openapi/jsonreference v0.21.4 // indirect - github.com/go-openapi/swag/conv v0.25.4 // indirect - github.com/go-openapi/swag/fileutils v0.25.4 // indirect - github.com/go-openapi/swag/jsonname v0.25.4 // indirect - github.com/go-openapi/swag/jsonutils v0.25.4 // indirect - github.com/go-openapi/swag/loading v0.25.4 // indirect - github.com/go-openapi/swag/netutils v0.25.4 // indirect - github.com/go-openapi/swag/stringutils v0.25.4 // indirect - github.com/go-openapi/swag/typeutils v0.25.4 // indirect - github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/jsonreference v0.21.5 // indirect + github.com/go-openapi/swag/conv v0.25.5 // indirect + github.com/go-openapi/swag/fileutils v0.25.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect + github.com/go-openapi/swag/jsonutils v0.25.5 // indirect + github.com/go-openapi/swag/loading v0.25.5 // indirect + github.com/go-openapi/swag/netutils v0.25.5 // indirect + github.com/go-openapi/swag/stringutils v0.25.5 // indirect + github.com/go-openapi/swag/typeutils v0.25.5 // indirect + github.com/go-openapi/swag/yamlutils v0.25.5 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/gofrs/flock v0.13.0 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect @@ -97,9 +97,9 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.7 // indirect + go.mongodb.org/mongo-driver v1.17.9 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/sync v0.19.0 // indirect - golang.org/x/text v0.33.0 // indirect + golang.org/x/text v0.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 5dcf3685..f5343f01 100644 --- a/go.sum +++ b/go.sum @@ -55,50 +55,50 @@ github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= -github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= -github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= -github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= -github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= -github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= -github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= +github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= +github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= -github.com/go-openapi/spec v0.22.3 h1:qRSmj6Smz2rEBxMnLRBMeBWxbbOvuOoElvSvObIgwQc= -github.com/go-openapi/spec v0.22.3/go.mod h1:iIImLODL2loCh3Vnox8TY2YWYJZjMAKYyLH2Mu8lOZs= +github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= +github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= -github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= -github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= -github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= -github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= -github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= -github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= -github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= -github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= -github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= -github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= -github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= -github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= -github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= -github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= -github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= -github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= -github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= -github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= -github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= -github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= -github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= -github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= -github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= -github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= -github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= -github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= -github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/swag v0.25.5 h1:pNkwbUEeGwMtcgxDr+2GBPAk4kT+kJ+AaB+TMKAg+TU= +github.com/go-openapi/swag v0.25.5/go.mod h1:B3RT6l8q7X803JRxa2e59tHOiZlX1t8viplOcs9CwTA= +github.com/go-openapi/swag/cmdutils v0.25.5 h1:yh5hHrpgsw4NwM9KAEtaDTXILYzdXh/I8Whhx9hKj7c= +github.com/go-openapi/swag/cmdutils v0.25.5/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.5 h1:wAXBYEXJjoKwE5+vc9YHhpQOFj2JYBMF2DUi+tGu97g= +github.com/go-openapi/swag/conv v0.25.5/go.mod h1:CuJ1eWvh1c4ORKx7unQnFGyvBbNlRKbnRyAvDvzWA4k= +github.com/go-openapi/swag/fileutils v0.25.5 h1:B6JTdOcs2c0dBIs9HnkyTW+5gC+8NIhVBUwERkFhMWk= +github.com/go-openapi/swag/fileutils v0.25.5/go.mod h1:V3cT9UdMQIaH4WiTrUc9EPtVA4txS0TOmRURmhGF4kc= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/swag/jsonutils v0.25.5 h1:XUZF8awQr75MXeC+/iaw5usY/iM7nXPDwdG3Jbl9vYo= +github.com/go-openapi/swag/jsonutils v0.25.5/go.mod h1:48FXUaz8YsDAA9s5AnaUvAmry1UcLcNVWUjY42XkrN4= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5 h1:SX6sE4FrGb4sEnnxbFL/25yZBb5Hcg1inLeErd86Y1U= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5/go.mod h1:/2KvOTrKWjVA5Xli3DZWdMCZDzz3uV/T7bXwrKWPquo= +github.com/go-openapi/swag/loading v0.25.5 h1:odQ/umlIZ1ZVRteI6ckSrvP6e2w9UTF5qgNdemJHjuU= +github.com/go-openapi/swag/loading v0.25.5/go.mod h1:I8A8RaaQ4DApxhPSWLNYWh9NvmX2YKMoB9nwvv6oW6g= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= +github.com/go-openapi/swag/netutils v0.25.5 h1:LZq2Xc2QI8+7838elRAaPCeqJnHODfSyOa7ZGfxDKlU= +github.com/go-openapi/swag/netutils v0.25.5/go.mod h1:lHbtmj4m57APG/8H7ZcMMSWzNqIQcu0RFiXrPUara14= +github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= +github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= +github.com/go-openapi/swag/typeutils v0.25.5 h1:EFJ+PCga2HfHGdo8s8VJXEVbeXRCYwzzr9u4rJk7L7E= +github.com/go-openapi/swag/typeutils v0.25.5/go.mod h1:itmFmScAYE1bSD8C4rS0W+0InZUBrB2xSPbWt6DLGuc= +github.com/go-openapi/swag/yamlutils v0.25.5 h1:kASCIS+oIeoc55j28T4o8KwlV2S4ZLPT6G0iq2SSbVQ= +github.com/go-openapi/swag/yamlutils v0.25.5/go.mod h1:Gek1/SjjfbYvM+Iq4QGwa/2lEXde9n2j4a3wI3pNuOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.0 h1:7SgOMTvJkM8yWrQlU8Jm18VeDPuAvB/xWrdxFJkoFag= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.0/go.mod h1:14iV8jyyQlinc9StD7w1xVPW3CO3q1Gj04Jy//Kw4VM= +github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= @@ -116,8 +116,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.18 h1:JCbol9Bu4D/NuAihLhF8b0/FTQgwWiPd/CSLB/87mpA= -github.com/haproxytech/client-native/v6 v6.0.18/go.mod h1:pznF3XK2PudwbwF0YHC4tiLYDAN9tVTrg7r0EQZMEDY= +github.com/haproxytech/client-native/v6 v6.0.20 h1:Qzz8nmk2GvUD52eGC5SV7CZV570j13OB1k4ZJevaGak= +github.com/haproxytech/client-native/v6 v6.0.20/go.mod h1:oiofZQriWSRKEz9A0ehE3ljcvBtEM5nnNFercJ8wtbs= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -202,23 +202,23 @@ github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQs github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.7 h1:a9w+U3Vt67eYzcfq3k/OAv284/uUUkL0uP75VE5rCOU= -go.mongodb.org/mongo-driver v1.17.7/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU= +go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= +golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= -golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From 054014aa1cdba0e2b07eab8ada99d21b9fd2d65b Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 15:40:00 +0100 Subject: [PATCH 61/65] BUILD/MEDIUM: go: upgrade go to 1.26 --- .github/workflows/.goreleaser.yml | 2 +- .gitlab-ci.yml | 2 +- Makefile | 2 +- generate/swagger/Dockerfile | 2 +- go.mod | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index 8ecb10e2..9c9acb43 100644 --- a/.github/workflows/.goreleaser.yml +++ b/.github/workflows/.goreleaser.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: '1.25' + go-version: '1.26' check-latest: true - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 370c603e..70eaab68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian BATS_VERSION: v1.10.0 - GO_VERSION: "1.25" + GO_VERSION: "1.26" DOCKER_VERSION: "29.1" pipelines-check: diff --git a/Makefile b/Makefile index b89120ef..4b244a28 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2} SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/client-native/master/Makefile | grep SWAGGER_VERSION -m 1 | awk -F"=" '{print $$2}'} BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 -GOLANGCI_LINT_VERSION=2.8.0 +GOLANGCI_LINT_VERSION=2.11.1 CHECK_COMMIT=5.4.0 all: update clean build diff --git a/generate/swagger/Dockerfile b/generate/swagger/Dockerfile index 683a4703..d470c5ee 100644 --- a/generate/swagger/Dockerfile +++ b/generate/swagger/Dockerfile @@ -1,6 +1,6 @@ ARG SWAGGER_VERSION -FROM golang:1.25 AS golang +FROM golang:1.26 AS golang FROM quay.io/goswagger/swagger:0.32.3 COPY --from=golang /usr/local/go /usr/local/go diff --git a/go.mod b/go.mod index 794306ef..cc2cc3c6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.25.0 +go 1.26 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 From 3fd4da075cbd270744c75011602e858783772082 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 17:15:36 +0100 Subject: [PATCH 62/65] CLEANUP/MEDIUM: lint: upgrade linter and fix linting errors --- cmd/gitlab-mr-pipelines/main.go | 8 ++++---- cmd/govulncheck-report/main.go | 4 ++-- configuration/dataplane_storage.go | 26 +++++++++++++------------- discovery/utils.go | 9 ++++----- generate/go-generate.go | 10 +++++----- handlers/bind.go | 10 +++++----- handlers/consul.go | 8 ++++---- handlers/fcgi_app.go | 6 +++--- handlers/general_storage.go | 9 +++++---- handlers/http_after_response_rule.go | 14 ++++++++------ handlers/program.go | 6 +++--- handlers/server.go | 10 +++++----- handlers/spoe_transaction.go | 2 +- handlers/ssl_cert_storage.go | 2 +- handlers/transaction.go | 8 ++++---- misc/misc.go | 17 ++--------------- runtime/commands/stack.go | 7 +++---- 17 files changed, 72 insertions(+), 84 deletions(-) diff --git a/cmd/gitlab-mr-pipelines/main.go b/cmd/gitlab-mr-pipelines/main.go index 9eca2569..709253bf 100644 --- a/cmd/gitlab-mr-pipelines/main.go +++ b/cmd/gitlab-mr-pipelines/main.go @@ -96,14 +96,14 @@ func getOldMergeRequestPipelines(apiURL, projectID, mrIID, token string) ([]pipe } url := fmt.Sprintf("%s/projects/%s/merge_requests/%s/pipelines", apiURL, projectID, mrIID) - req, err := http.NewRequest("GET", url, nil) //nolint:noctx,usestdlibvars + req, err := http.NewRequest("GET", url, nil) //nolint:noctx,usestdlibvars,gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader client := &http.Client{} - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } @@ -132,14 +132,14 @@ func getOldMergeRequestPipelines(apiURL, projectID, mrIID, token string) ([]pipe func cancelPipeline(apiURL, projectID string, pipelineID int, token string) error { url := fmt.Sprintf("%s/projects/%s/pipelines/%d/cancel", apiURL, projectID, pipelineID) - req, err := http.NewRequest("POST", url, nil) //nolint:noctx,usestdlibvars + req, err := http.NewRequest("POST", url, nil) //nolint:noctx,usestdlibvars,gosec // URL constructed from trusted CI environment variables if err != nil { return err } req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader client := &http.Client{} - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return err } diff --git a/cmd/govulncheck-report/main.go b/cmd/govulncheck-report/main.go index dd8b101b..a02dc4fe 100644 --- a/cmd/govulncheck-report/main.go +++ b/cmd/govulncheck-report/main.go @@ -70,7 +70,7 @@ func main() { } currentBranch = string(out) } - slog.Info("Current branch: " + currentBranch) + slog.Info("Current branch: " + currentBranch) //nolint:gosec // log message from trusted CI environment variables cmd := exec.Command("govulncheck", "./...") out, _ := cmd.Output() @@ -135,7 +135,7 @@ func main() { } func createIssue(baseURL, token, projectID string, title, commentBody string) { - slog.Info("Active issue with title '" + title + "' not found in project " + projectID) + slog.Info("Active issue with title '" + title + "' not found in project " + projectID) //nolint:gosec // log message from trusted CI environment variables // Create the issue here issueData := map[string]any{ "title": title, diff --git a/configuration/dataplane_storage.go b/configuration/dataplane_storage.go index c9db3cd3..028221c9 100644 --- a/configuration/dataplane_storage.go +++ b/configuration/dataplane_storage.go @@ -51,22 +51,22 @@ func (c *Configuration) SaveClusterModeData() error { cfgCertificateFetched := cfgCluster.CertificateFetched.Load() dapiStorageCluster := storagetype.Cluster{ - APINodesPath: misc.StringP(cfgCluster.APINodesPath.Load()), - Token: misc.StringP(cfgCluster.Token.Load()), + APINodesPath: new(cfgCluster.APINodesPath.Load()), + Token: new(cfgCluster.Token.Load()), ClusterTLSCertDir: &c.HAProxy.ClusterTLSCertDir, - ActiveBootstrapKey: misc.StringP(cfgCluster.ActiveBootstrapKey.Load()), - APIRegisterPath: misc.StringP(cfgCluster.APIRegisterPath.Load()), - URL: misc.StringP(cfgCluster.URL.Load()), + ActiveBootstrapKey: new(cfgCluster.ActiveBootstrapKey.Load()), + APIRegisterPath: new(cfgCluster.APIRegisterPath.Load()), + URL: new(cfgCluster.URL.Load()), Port: &dPort, - StorageDir: misc.StringP(cfgCluster.StorageDir.Load()), - BootstrapKey: misc.StringP(cfgCluster.BootstrapKey.Load()), - ID: misc.StringP(cfgCluster.ID.Load()), - APIBasePath: misc.StringP(cfgCluster.APIBasePath.Load()), - CertificateDir: misc.StringP(cfgCluster.CertificateDir.Load()), + StorageDir: new(cfgCluster.StorageDir.Load()), + BootstrapKey: new(cfgCluster.BootstrapKey.Load()), + ID: new(cfgCluster.ID.Load()), + APIBasePath: new(cfgCluster.APIBasePath.Load()), + CertificateDir: new(cfgCluster.CertificateDir.Load()), CertificateFetched: &cfgCertificateFetched, - Name: misc.StringP(cfgCluster.Name.Load()), - Description: misc.StringP(cfgCluster.Description.Load()), - ClusterID: misc.StringP(cfgCluster.ClusterID.Load()), + Name: new(cfgCluster.Name.Load()), + Description: new(cfgCluster.Description.Load()), + ClusterID: new(cfgCluster.ClusterID.Load()), ClusterLogTargets: cfgCluster.ClusterLogTargets, } cfgStatus := c.Status.Load() diff --git a/discovery/utils.go b/discovery/utils.go index 40dcacec..5a7dbde1 100644 --- a/discovery/utils.go +++ b/discovery/utils.go @@ -21,7 +21,6 @@ import ( "github.com/go-openapi/strfmt" "github.com/google/uuid" "github.com/haproxytech/client-native/v6/models" - "github.com/haproxytech/dataplaneapi/misc" ) const ( @@ -42,10 +41,10 @@ func ValidateAWSData(data *models.AwsRegion, useValidation bool) error { return err } if data.ServerSlotsBase == nil || *data.ServerSlotsBase < minimumServerSlotsBase { - data.ServerSlotsBase = misc.Int64P(10) + data.ServerSlotsBase = new(int64(10)) } if data.ServerSlotsGrowthType == nil { - data.ServerSlotsGrowthType = misc.StringP(models.AwsRegionServerSlotsGrowthTypeExponential) + data.ServerSlotsGrowthType = new(models.AwsRegionServerSlotsGrowthTypeExponential) } if *data.ServerSlotsGrowthType == models.AwsRegionServerSlotsGrowthTypeLinear && (data.ServerSlotsGrowthIncrement == 0 || data.ServerSlotsGrowthIncrement < minimumServerSlotsBase) { data.ServerSlotsGrowthIncrement = minimumServerSlotsBase @@ -67,10 +66,10 @@ func ValidateConsulData(data *models.Consul, useValidation bool) error { return err } if data.ServerSlotsBase == nil || *data.ServerSlotsBase < minimumServerSlotsBase { - data.ServerSlotsBase = misc.Int64P(minimumServerSlotsBase) + data.ServerSlotsBase = new(int64(minimumServerSlotsBase)) } if data.ServerSlotsGrowthType == nil { - data.ServerSlotsGrowthType = misc.StringP(models.ConsulServerSlotsGrowthTypeLinear) + data.ServerSlotsGrowthType = new(models.ConsulServerSlotsGrowthTypeLinear) } if *data.ServerSlotsGrowthType == models.ConsulServerSlotsGrowthTypeLinear && (data.ServerSlotsGrowthIncrement == 0 || data.ServerSlotsGrowthIncrement < minimumServerSlotsBase) { data.ServerSlotsGrowthIncrement = minimumServerSlotsBase diff --git a/generate/go-generate.go b/generate/go-generate.go index 6f78aa48..0f505466 100644 --- a/generate/go-generate.go +++ b/generate/go-generate.go @@ -116,7 +116,7 @@ type ParseData struct { func readServerData(filePath string, pd *ParseData, structName string, attName string, groupName string, isList bool) { typeStruct := fmt.Sprintf("type %s struct {", structName) - dat, err := os.ReadFile(filePath) + dat, err := os.ReadFile(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -345,7 +345,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "configuration", "configuration_generated.go") - f, err := os.Create(filePath) + f, err := os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -363,7 +363,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "dataplaneapi_generated.go") - f, err = os.Create(filePath) + f, err = os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -381,7 +381,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "configuration/examples/example-full.yaml") - f, err = os.Create(filePath) + f, err = os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -471,7 +471,7 @@ func processLine(line string) (Attribute, error) { } func fmtFile(filename string) { - cmd := exec.Command("gofmt", "-s", "-w", filename) + cmd := exec.Command("gofmt", "-s", "-w", filename) //nolint:gosec // paths from trusted build tool arguments err := cmd.Run() if err != nil { log.Fatalf("cmd.Run() failed with %s\n", err) diff --git a/handlers/bind.go b/handlers/bind.go index 9fd15de3..d2798532 100644 --- a/handlers/bind.go +++ b/handlers/bind.go @@ -96,7 +96,7 @@ func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewCreateBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewCreateBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -148,7 +148,7 @@ func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewDeleteBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewDeleteBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -186,7 +186,7 @@ func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params return bind.NewGetBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewGetBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -212,7 +212,7 @@ func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewGetAllBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewGetAllBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -255,7 +255,7 @@ func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, par return bind.NewReplaceBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewReplaceBindFrontendDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/consul.go b/handlers/consul.go index 7f759204..87f00ce6 100644 --- a/handlers/consul.go +++ b/handlers/consul.go @@ -65,8 +65,8 @@ func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulPa } if params.Data.HealthCheckPolicy != nil && *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { e := &models.Error{ - Message: misc.StringP("health_check_policy_min is required for 'min' health_check_policy"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("health_check_policy_min is required for 'min' health_check_policy"), + Code: new(misc.ErrHTTPBadRequest), } return service_discovery.NewCreateConsulDefault(int(*e.Code)).WithPayload(e) } @@ -141,8 +141,8 @@ func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsul } if params.Data.HealthCheckPolicy != nil && *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { e := &models.Error{ - Message: misc.StringP("health_check_policy_min is required for 'min' health_check_policy"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("health_check_policy_min is required for 'min' health_check_policy"), + Code: new(misc.ErrHTTPBadRequest), } return service_discovery.NewCreateConsulDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/fcgi_app.go b/handlers/fcgi_app.go index 5d182cab..2dbed5b9 100644 --- a/handlers/fcgi_app.go +++ b/handlers/fcgi_app.go @@ -44,7 +44,7 @@ func (c CreateFCGIAppHandlerImpl) Handle(params fcgi_app.CreateFCGIAppParams, _ code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -104,7 +104,7 @@ func (d DeleteFCGIAppHandlerImpl) Handle(params fcgi_app.DeleteFCGIAppParams, _ code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -224,7 +224,7 @@ func (r ReplaceFCGIAppHandlerImpl) Handle(params fcgi_app.ReplaceFCGIAppParams, code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } diff --git a/handlers/general_storage.go b/handlers/general_storage.go index eea32d87..d8970144 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -19,6 +19,7 @@ import ( "bufio" "fmt" "io" + "net/http" "os" "path/filepath" "strings" @@ -41,8 +42,8 @@ type StorageCreateStorageGeneralFileHandlerImpl struct { func (h *StorageCreateStorageGeneralFileHandlerImpl) Handle(params storage.CreateStorageGeneralFileParams, principal any) middleware.Responder { if params.FileUpload == nil { e := &models.Error{ - Code: misc.Int64P(400), - Message: misc.StringP("No file_upload form param specified"), + Code: new(int64(http.StatusBadRequest)), + Message: new("No file_upload form param specified"), } return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) } @@ -199,8 +200,8 @@ func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.Repl if params.FileUpload == nil { e := &models.Error{ - Code: misc.Int64P(400), - Message: misc.StringP("No file_upload form param specified"), + Code: new(int64(http.StatusBadRequest)), + Message: new("No file_upload form param specified"), } return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) } diff --git a/handlers/http_after_response_rule.go b/handlers/http_after_response_rule.go index 9a58c44a..9aeedc22 100644 --- a/handlers/http_after_response_rule.go +++ b/handlers/http_after_response_rule.go @@ -1,6 +1,8 @@ package handlers import ( + "net/http" + "github.com/go-openapi/runtime/middleware" client_native "github.com/haproxytech/client-native/v6" "github.com/haproxytech/client-native/v6/models" @@ -29,8 +31,8 @@ func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.Cn if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewCreateHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } @@ -80,8 +82,8 @@ func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.Cn if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewDeleteHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } @@ -183,8 +185,8 @@ func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.C if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewReplaceHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/program.go b/handlers/program.go index 915db1a4..058aad8c 100644 --- a/handlers/program.go +++ b/handlers/program.go @@ -43,7 +43,7 @@ func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramPar code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -98,7 +98,7 @@ func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramPar code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -210,7 +210,7 @@ func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramP code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } diff --git a/handlers/server.go b/handlers/server.go index 1377daf3..541342db 100644 --- a/handlers/server.go +++ b/handlers/server.go @@ -99,7 +99,7 @@ func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewCreateServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewCreateServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -187,7 +187,7 @@ func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewDeleteServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewDeleteServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -227,7 +227,7 @@ func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, param return server.NewGetServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewGetServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -254,7 +254,7 @@ func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewGetAllServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewGetAllServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -298,7 +298,7 @@ func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, p return server.NewReplaceServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewReplaceServerBackendDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/spoe_transaction.go b/handlers/spoe_transaction.go index d545b7f0..19e83d09 100644 --- a/handlers/spoe_transaction.go +++ b/handlers/spoe_transaction.go @@ -141,7 +141,7 @@ func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_tr return spoe_transactions.NewGetAllSpoeTransactionDefault(int(*e.Code)).WithPayload(e) } var ms models.SpoeTransactions - if *ts != nil && len(*ts) > 0 { + if len(*ts) > 0 { for _, t := range *ts { m := &models.SpoeTransaction{ Version: t.Version, diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index f1e8e56d..6196728b 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -204,7 +204,7 @@ func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.R File: filename, Description: "managed SSL file", StorageName: filepath.Base(filename), - Size: misc.Int64P(len(params.Data)), + Size: new(int64(len(params.Data))), NotAfter: (*strfmt.DateTime)(info.NotAfter), NotBefore: (*strfmt.DateTime)(info.NotBefore), Issuers: info.Issuers, diff --git a/handlers/transaction.go b/handlers/transaction.go index 1c496862..97d552cc 100644 --- a/handlers/transaction.go +++ b/handlers/transaction.go @@ -89,7 +89,7 @@ func (h *DeleteTransactionHandlerImpl) Handle(params transactions.DeleteTransact if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewDeleteTransactionDefault(int(*e.Code)).WithPayload(e) @@ -108,7 +108,7 @@ func (h *GetTransactionHandlerImpl) Handle(params transactions.GetTransactionPar if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewGetTransactionsDefault(int(*e.Code)).WithPayload(e) @@ -155,7 +155,7 @@ func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransact if transaction, err = configuration.GetTransaction(params.ID); err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewCommitTransactionDefault(int(*e.Code)).WithPayload(e) @@ -172,7 +172,7 @@ func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransact if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewCommitTransactionDefault(int(*e.Code)).WithPayload(e) diff --git a/misc/misc.go b/misc/misc.go index d0ff5eab..fa09b639 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -223,24 +223,11 @@ func GetHTTPStatusFromErr(err error) int { func SetError(code int, msg string) *models.Error { return &models.Error{ - Code: Int64P(code), - Message: StringP(msg), + Code: new(int64(code)), + Message: new(msg), } } -func StringP(s string) *string { - return &s -} - -func Int64P(i int) *int64 { - i64 := int64(i) - return &i64 -} - -func PtrTo[T any](v T) *T { - return &v -} - // extractEnvVar extracts and returns env variable from HAProxy variable // provided in "${SOME_VAR}" format func ExtractEnvVar(pass string) string { diff --git a/runtime/commands/stack.go b/runtime/commands/stack.go index 844a87fc..bf56fee9 100644 --- a/runtime/commands/stack.go +++ b/runtime/commands/stack.go @@ -100,16 +100,15 @@ func MakeStackDump() (string, error) { if len(bucket.CreatedBy.Calls) != 0 { extra += fmt.Sprintf(" [Created by %s.%s @ %s:%d]", bucket.CreatedBy.Calls[0].Func.DirName, bucket.CreatedBy.Calls[0].Func.Name, bucket.CreatedBy.Calls[0].SrcName, bucket.CreatedBy.Calls[0].Line) } - result.WriteString(fmt.Sprintf("%d: %s%s\n", len(bucket.IDs), bucket.State, extra)) + fmt.Fprintf(&result, "%d: %s%s\n", len(bucket.IDs), bucket.State, extra) // Print the stack lines. for _, line := range bucket.Stack.Calls { arg := line.Args - result.WriteString(fmt.Sprintf( - " %-*s %-*s %s(%s)\n", + fmt.Fprintf(&result, " %-*s %-*s %s(%s)\n", pkgLen, line.Func.DirName, srcLen, fmt.Sprintf("%s:%d", line.SrcName, line.Line), - line.Func.Name, &arg)) + line.Func.Name, &arg) } if bucket.Stack.Elided { result.WriteString(" (...)\n") From b4a728ab609adcd58ad9cc75ef3927dd90ee553a Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 14 May 2025 12:19:52 +0200 Subject: [PATCH 63/65] BUG/MAJOR: runtime_server: fix adding all the server options for server --- handlers/runtime_server.go | 228 ++++++++++++++++++++++++------------- 1 file changed, 150 insertions(+), 78 deletions(-) diff --git a/handlers/runtime_server.go b/handlers/runtime_server.go index da50fe78..71370de1 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -243,7 +243,7 @@ func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServe // SerializeRuntimeAddServer returns a string in the HAProxy config format, suitable // for the "add server" operation over the control socket. // Not all the Server attributes are available in this case. -func SerializeRuntimeAddServer(srv *models.RuntimeAddServer, version *cn_runtime.HAProxyVersion) string { //nolint:cyclop,maintidx +func SerializeRuntimeAddServer(srv *models.RuntimeAddServer, version *cn_runtime.HAProxyVersion) string { //nolint: cyclop,maintidx b := &strings.Builder{} push := func(s string) { @@ -255,11 +255,14 @@ func SerializeRuntimeAddServer(srv *models.RuntimeAddServer, version *cn_runtime } // push a quoted string pushq := func(key, val string) { - fmt.Fprintf(b, ` %s "%s"`, key, val) + fmt.Fprintf(b, ` %s %s`, key, val) } enabled := func(s string) bool { return s == "enabled" } + disabled := func(s string) bool { + return s == "disabled" + } // Address is mandatory and must come first, with an optional port number. addr := srv.Address @@ -268,159 +271,228 @@ func SerializeRuntimeAddServer(srv *models.RuntimeAddServer, version *cn_runtime } push(addr) - switch { - case enabled(srv.AgentCheck): + if enabled(srv.AgentCheck) { push("agent-check") - case srv.AgentAddr != "": + } + if srv.AgentAddr != "" { pushq("agent-addr", srv.AgentAddr) - case srv.AgentPort != nil: + } + if srv.AgentPort != nil { pushi("agent-port", srv.AgentPort) - case srv.AgentInter != nil: + } + if srv.AgentInter != nil { pushi("agent-inter", srv.AgentInter) - case srv.AgentSend != "": + } + if srv.AgentSend != "" { pushq("agent-send", srv.AgentSend) - case srv.Allow0rtt: + } + if srv.Allow0rtt { push("allow-0rtt") - case srv.Alpn != "": + } + if srv.Alpn != "" { pushq("alpn", srv.Alpn) - case enabled(srv.Backup): + } + if enabled(srv.Backup) { push("backup") - case srv.SslCafile != "": + } + if srv.SslCafile != "" { pushq("ca-file", srv.SslCafile) - case enabled(srv.Check): + } + if enabled(srv.Check) { push("check") - case srv.CheckAlpn != "": + } + if srv.CheckAlpn != "" { pushq("check-alpn", srv.CheckAlpn) - case srv.HealthCheckAddress != "": + } + if srv.HealthCheckAddress != "" { pushq("addr", srv.HealthCheckAddress) - case srv.HealthCheckPort != nil: + } + if srv.HealthCheckPort != nil { pushi("port", srv.HealthCheckPort) - case srv.CheckProto != "": + } + if srv.CheckProto != "" { pushq("check-proto", srv.CheckProto) - case enabled(srv.CheckSendProxy): + } + if enabled(srv.CheckSendProxy) { push("check-send-proxy") - case srv.CheckSni != "": + } + if srv.CheckSni != "" { pushq("check-sni", srv.CheckSni) - case enabled(srv.CheckSsl): + } + if enabled(srv.CheckSsl) { push("check-ssl") - case enabled(srv.CheckViaSocks4): + } + if enabled(srv.CheckViaSocks4) { push("check-via-socks4") - case srv.Ciphers != "": + } + if srv.Ciphers != "" { pushq("ciphers", srv.Ciphers) - case srv.Ciphersuites != "": + } + if srv.Ciphersuites != "" { pushq("ciphersuites", srv.Ciphersuites) - case srv.CrlFile != "": + } + if srv.CrlFile != "" { pushq("crl-file", srv.CrlFile) - case srv.SslCertificate != "": + } + if srv.SslCertificate != "" { pushq("crt", srv.SslCertificate) - case enabled(srv.Maintenance): + } + if enabled(srv.Maintenance) { push("disabled") - case srv.Downinter != nil: + } + if srv.Downinter != nil { pushi("downinter", srv.Downinter) - case !enabled(srv.Maintenance): + } + if disabled(srv.Maintenance) { required := new(cn_runtime.HAProxyVersion) required.ParseHAProxyVersion("3.0.0") if !cn_runtime.IsBiggerOrEqual(required, version) { push("enabled") } - case srv.ErrorLimit != nil: + } + if srv.ErrorLimit != nil { pushi("error-limit", srv.ErrorLimit) - case srv.Fall != nil: + } + if srv.Fall != nil { pushi("fall", srv.Fall) - case srv.Fastinter != nil: + } + if srv.Fastinter != nil { pushi("fastinter", srv.Fastinter) - case enabled(srv.ForceSslv3): + } + if enabled(srv.ForceSslv3) { push("force-sslv3") - case enabled(srv.ForceTlsv10): + } + if enabled(srv.ForceTlsv10) { push("force-tlsv10") - case enabled(srv.ForceTlsv11): + } + if enabled(srv.ForceTlsv11) { push("force-tlsv11") - case enabled(srv.ForceTlsv12): + } + if enabled(srv.ForceTlsv12) { push("force-tlsv12") - case enabled(srv.ForceTlsv13): + } + if enabled(srv.ForceTlsv13) { push("force-tlsv13") - case srv.ID != "": + } + if srv.ID != "" { pushq("id", srv.ID) - case srv.Inter != nil: + } + if srv.Inter != nil { pushi("inter", srv.Inter) - case srv.Maxconn != nil: + } + if srv.Maxconn != nil { pushi("maxconn", srv.Maxconn) - case srv.Maxqueue != nil: + } + if srv.Maxqueue != nil { pushi("maxqueue", srv.Maxqueue) - case srv.Minconn != nil: + } + if srv.Minconn != nil { pushi("minconn", srv.Minconn) - case !enabled(srv.SslReuse): + } + if disabled(srv.SslReuse) { push("no-ssl-reuse") - case enabled(srv.NoSslv3): + } + if enabled(srv.NoSslv3) { push("no-sslv3") - case enabled(srv.NoTlsv10): + } + if enabled(srv.NoTlsv10) { push("no-tlsv10") - case enabled(srv.NoTlsv11): + } + if enabled(srv.NoTlsv11) { push("no-tlsv11") - case enabled(srv.NoTlsv12): + } + if enabled(srv.NoTlsv12) { push("no-tlsv12") - case enabled(srv.NoTlsv13): + } + if enabled(srv.NoTlsv13) { push("no-tlsv13") - case !enabled(srv.TLSTickets): + } + if disabled(srv.TLSTickets) { push("no-tls-tickets") - case srv.Npn != "": + } + if srv.Npn != "" { pushq("npm", srv.Npn) - case srv.Observe != "": + } + if srv.Observe != "" { pushq("observe", srv.Observe) - case srv.OnError != "": + } + if srv.OnError != "" { pushq("on-error", srv.OnError) - case srv.OnMarkedDown != "": + } + if srv.OnMarkedDown != "" { pushq("on-marked-down", srv.OnMarkedDown) - case srv.OnMarkedUp != "": + } + if srv.OnMarkedUp != "" { pushq("on-marked-up", srv.OnMarkedUp) - case srv.PoolLowConn != nil: + } + if srv.PoolLowConn != nil { pushi("pool-low-conn", srv.PoolLowConn) - case srv.PoolMaxConn != nil: + } + if srv.PoolMaxConn != nil { pushi("pool-max-conn", srv.PoolMaxConn) - case srv.PoolPurgeDelay != nil: + } + if srv.PoolPurgeDelay != nil { pushi("pool-purge-delay", srv.PoolPurgeDelay) - case srv.Proto != "": + } + if srv.Proto != "" { pushq("proto", srv.Proto) - case len(srv.ProxyV2Options) > 0: + } + if len(srv.ProxyV2Options) > 0 { pushq("proxy-v2-options", strings.Join(srv.ProxyV2Options, ",")) - case srv.Rise != nil: + } + if srv.Rise != nil { pushi("rise", srv.Rise) - case enabled(srv.SendProxy): + } + if enabled(srv.SendProxy) { push("send-proxy") - case enabled(srv.SendProxyV2): + } + if enabled(srv.SendProxyV2) { push("send-proxy-v2") - case enabled(srv.SendProxyV2Ssl): + } + if enabled(srv.SendProxyV2Ssl) { push("send-proxy-v2-ssl") - case enabled(srv.SendProxyV2SslCn): + } + if enabled(srv.SendProxyV2SslCn) { push("send-proxy-v2-ssl-cn") - case srv.Slowstart != nil: + } + if srv.Slowstart != nil { pushi("slowstart", srv.Slowstart) - case srv.Sni != "": + } + if srv.Sni != "" { pushq("sni", srv.Sni) - case srv.Source != "": + } + if srv.Source != "" { pushq("source", srv.Source) - case enabled(srv.Ssl): + } + if enabled(srv.Ssl) { push("ssl") - case srv.SslMaxVer != "": + } + if srv.SslMaxVer != "" { pushq("ssl-max-ver", srv.SslMaxVer) - case srv.SslMinVer != "": + } + if srv.SslMinVer != "" { pushq("ssl-min-ver", srv.SslMinVer) - case enabled(srv.Tfo): + } + if enabled(srv.Tfo) { push("tfo") - case enabled(srv.TLSTickets): + } + if enabled(srv.TLSTickets) { push("tls-tickets") - case srv.Track != "": + } + if srv.Track != "" { pushq("track", srv.Track) - /* XXX usesrc is not supported */ - case srv.Verify != "": + } + if srv.Verify != "" { pushq("verify", srv.Verify) - case srv.Verifyhost != "": + } + if srv.Verifyhost != "" { pushq("verifyhost", srv.Verifyhost) - case srv.Weight != nil: + } + if srv.Weight != nil { pushi("weight", srv.Weight) - case srv.Ws != "": + } + if srv.Ws != "" { pushq("ws", srv.Ws) } - return b.String() } From 7f9fe82b7316e8831f20d8b1e6393a61f8e50303 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 19:31:13 +0100 Subject: [PATCH 64/65] TEST/MINOR: ssl: add sleep when changing a certificate in storage --- e2e/tests/storage_ssl_certificates/test.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2e/tests/storage_ssl_certificates/test.bats b/e2e/tests/storage_ssl_certificates/test.bats index 4355d338..64363538 100644 --- a/e2e/tests/storage_ssl_certificates/test.bats +++ b/e2e/tests/storage_ssl_certificates/test.bats @@ -44,6 +44,8 @@ setup() { assert_equal $(get_json_path "$BODY" '.storage_name') "1.pem" + sleep 3 + assert dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) @@ -89,6 +91,7 @@ setup() { dpa_curl_status_body '$output' assert_equal "$SC" 202 + sleep 3 assert dpa_diff_docker_file '/etc/haproxy/ssl/1.pem' "data/2.pem" } @@ -102,6 +105,7 @@ setup() { dpa_curl_status_body '$output' assert_equal "$SC" 200 + sleep 3 # confirm haproxy wasn't reloaded or restarted post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) new_logs_count=$(( $pre_logs_count - $post_logs_count )) @@ -112,6 +116,7 @@ setup() { resource_delete "$_STORAGE_SSL_CERTS_BASE_PATH/1.pem" assert_equal "$SC" 202 + sleep 3 refute dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' } @@ -140,6 +145,7 @@ setup() { resource_delete "$_STORAGE_SSL_CERTS_BASE_PATH/1.pem" "skip_reload=true" assert_equal "$SC" 204 + sleep 3 refute dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' } @@ -159,6 +165,8 @@ setup() { assert_equal $(get_json_path "$BODY" '.storage_name') "1.pem" + sleep 3 + assert dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) From cf47527766d3e3cc2988ec580ad6e5af408d3770 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 2 Apr 2026 16:57:17 +0200 Subject: [PATCH 65/65] BUILD/MINOR: go.mod: upgrade client-native Add better regex for names and parameters used in runtime endpoints. --- embedded_spec.go | 305 +++++++++++++++++- go.mod | 21 +- go.sum | 51 ++- .../acl/create_acl_backend_parameters.go | 16 + .../acl/create_acl_fcgi_app_parameters.go | 16 + .../acl/create_acl_frontend_parameters.go | 16 + .../acl/delete_acl_backend_parameters.go | 16 + .../acl/delete_acl_fcgi_app_parameters.go | 16 + .../acl/delete_acl_frontend_parameters.go | 16 + operations/acl/get_acl_backend_parameters.go | 16 + operations/acl/get_acl_fcgi_app_parameters.go | 16 + operations/acl/get_acl_frontend_parameters.go | 16 + .../acl/get_all_acl_backend_parameters.go | 16 + .../acl/get_all_acl_fcgi_app_parameters.go | 16 + .../acl/get_all_acl_frontend_parameters.go | 16 + .../acl/replace_acl_backend_parameters.go | 16 + .../acl/replace_acl_fcgi_app_parameters.go | 16 + .../acl/replace_acl_frontend_parameters.go | 16 + .../acl/replace_all_acl_backend_parameters.go | 16 + .../replace_all_acl_fcgi_app_parameters.go | 16 + .../replace_all_acl_frontend_parameters.go | 16 + .../add_payload_runtime_acl_parameters.go | 16 + ..._acls_parent_name_entries_id_parameters.go | 31 ++ ...ices_haproxy_runtime_acls_id_parameters.go | 16 + ..._acls_parent_name_entries_id_parameters.go | 31 ++ ...ime_acls_parent_name_entries_parameters.go | 16 + ...ime_acls_parent_name_entries_parameters.go | 16 + ...reate_backend_switching_rule_parameters.go | 16 + ...elete_backend_switching_rule_parameters.go | 16 + .../get_backend_switching_rule_parameters.go | 16 + .../get_backend_switching_rules_parameters.go | 16 + ...place_backend_switching_rule_parameters.go | 16 + ...lace_backend_switching_rules_parameters.go | 16 + .../bind/create_bind_frontend_parameters.go | 16 + .../create_bind_log_forward_parameters.go | 16 + .../bind/create_bind_peer_parameters.go | 16 + .../bind/delete_bind_frontend_parameters.go | 16 + .../delete_bind_log_forward_parameters.go | 16 + .../bind/delete_bind_peer_parameters.go | 16 + .../bind/get_all_bind_frontend_parameters.go | 16 + .../get_all_bind_log_forward_parameters.go | 16 + .../bind/get_all_bind_peer_parameters.go | 16 + .../bind/get_bind_frontend_parameters.go | 16 + .../bind/get_bind_log_forward_parameters.go | 16 + operations/bind/get_bind_peer_parameters.go | 16 + .../bind/replace_bind_frontend_parameters.go | 16 + .../replace_bind_log_forward_parameters.go | 16 + .../bind/replace_bind_peer_parameters.go | 16 + .../create_declare_capture_parameters.go | 16 + .../delete_declare_capture_parameters.go | 16 + .../get_declare_capture_parameters.go | 16 + .../get_declare_captures_parameters.go | 16 + .../replace_declare_capture_parameters.go | 16 + .../replace_declare_captures_parameters.go | 16 + .../create_dgram_bind_parameters.go | 16 + .../delete_dgram_bind_parameters.go | 16 + .../dgram_bind/get_dgram_bind_parameters.go | 16 + .../dgram_bind/get_dgram_binds_parameters.go | 16 + .../replace_dgram_bind_parameters.go | 16 + .../create_filter_backend_parameters.go | 16 + .../create_filter_frontend_parameters.go | 16 + .../delete_filter_backend_parameters.go | 16 + .../delete_filter_frontend_parameters.go | 16 + .../get_all_filter_backend_parameters.go | 16 + .../get_all_filter_frontend_parameters.go | 16 + .../filter/get_filter_backend_parameters.go | 16 + .../filter/get_filter_frontend_parameters.go | 16 + .../replace_all_filter_backend_parameters.go | 16 + .../replace_all_filter_frontend_parameters.go | 16 + .../replace_filter_backend_parameters.go | 16 + .../replace_filter_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + .../create_http_check_backend_parameters.go | 16 + .../create_http_check_defaults_parameters.go | 16 + .../delete_http_check_backend_parameters.go | 16 + .../delete_http_check_defaults_parameters.go | 16 + .../get_all_http_check_backend_parameters.go | 16 + .../get_all_http_check_defaults_parameters.go | 16 + .../get_http_check_backend_parameters.go | 16 + .../get_http_check_defaults_parameters.go | 16 + ...place_all_http_check_backend_parameters.go | 16 + ...lace_all_http_check_defaults_parameters.go | 16 + .../replace_http_check_backend_parameters.go | 16 + .../replace_http_check_defaults_parameters.go | 16 + ...eate_http_error_rule_backend_parameters.go | 16 + ...ate_http_error_rule_defaults_parameters.go | 16 + ...ate_http_error_rule_frontend_parameters.go | 16 + ...lete_http_error_rule_backend_parameters.go | 16 + ...ete_http_error_rule_defaults_parameters.go | 16 + ...ete_http_error_rule_frontend_parameters.go | 16 + ..._all_http_error_rule_backend_parameters.go | 16 + ...all_http_error_rule_defaults_parameters.go | 16 + ...all_http_error_rule_frontend_parameters.go | 16 + .../get_http_error_rule_backend_parameters.go | 16 + ...get_http_error_rule_defaults_parameters.go | 16 + ...get_http_error_rule_frontend_parameters.go | 16 + ..._all_http_error_rule_backend_parameters.go | 16 + ...all_http_error_rule_defaults_parameters.go | 16 + ...all_http_error_rule_frontend_parameters.go | 16 + ...lace_http_error_rule_backend_parameters.go | 16 + ...ace_http_error_rule_defaults_parameters.go | 16 + ...ace_http_error_rule_frontend_parameters.go | 16 + ...te_http_request_rule_backend_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...te_http_request_rule_backend_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...ll_http_request_rule_backend_parameters.go | 16 + ...l_http_request_rule_frontend_parameters.go | 16 + ...et_http_request_rule_backend_parameters.go | 16 + ...t_http_request_rule_frontend_parameters.go | 16 + ...ll_http_request_rule_backend_parameters.go | 16 + ...l_http_request_rule_frontend_parameters.go | 16 + ...ce_http_request_rule_backend_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...l_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...t_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...l_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + .../create_log_target_backend_parameters.go | 16 + .../create_log_target_defaults_parameters.go | 16 + .../create_log_target_frontend_parameters.go | 16 + ...reate_log_target_log_forward_parameters.go | 16 + .../create_log_target_peer_parameters.go | 16 + .../delete_log_target_backend_parameters.go | 16 + .../delete_log_target_defaults_parameters.go | 16 + .../delete_log_target_frontend_parameters.go | 16 + ...elete_log_target_log_forward_parameters.go | 16 + .../delete_log_target_peer_parameters.go | 16 + .../get_all_log_target_backend_parameters.go | 16 + .../get_all_log_target_defaults_parameters.go | 16 + .../get_all_log_target_frontend_parameters.go | 16 + ...t_all_log_target_log_forward_parameters.go | 16 + .../get_all_log_target_peer_parameters.go | 16 + .../get_log_target_backend_parameters.go | 16 + .../get_log_target_defaults_parameters.go | 16 + .../get_log_target_frontend_parameters.go | 16 + .../get_log_target_log_forward_parameters.go | 16 + .../get_log_target_peer_parameters.go | 16 + ...place_all_log_target_backend_parameters.go | 16 + ...lace_all_log_target_defaults_parameters.go | 16 + ...lace_all_log_target_frontend_parameters.go | 16 + ...e_all_log_target_log_forward_parameters.go | 16 + .../replace_all_log_target_peer_parameters.go | 16 + .../replace_log_target_backend_parameters.go | 16 + .../replace_log_target_defaults_parameters.go | 16 + .../replace_log_target_frontend_parameters.go | 16 + ...place_log_target_log_forward_parameters.go | 16 + .../replace_log_target_peer_parameters.go | 16 + operations/maps/add_map_entry_parameters.go | 16 + .../add_payload_runtime_map_parameters.go | 16 + .../maps/clear_runtime_map_parameters.go | 16 + .../delete_runtime_map_entry_parameters.go | 31 ++ .../maps/get_one_runtime_map_parameters.go | 16 + .../maps/get_runtime_map_entry_parameters.go | 31 ++ .../replace_runtime_map_entry_parameters.go | 31 ++ .../maps/show_runtime_map_parameters.go | 16 + .../server/add_runtime_server_parameters.go | 16 + .../create_server_backend_parameters.go | 16 + .../server/create_server_peer_parameters.go | 16 + .../server/create_server_ring_parameters.go | 16 + .../delete_runtime_server_parameters.go | 31 ++ .../delete_server_backend_parameters.go | 16 + .../server/delete_server_peer_parameters.go | 16 + .../server/delete_server_ring_parameters.go | 16 + .../get_all_runtime_server_parameters.go | 16 + .../get_all_server_backend_parameters.go | 16 + .../server/get_all_server_peer_parameters.go | 16 + .../server/get_all_server_ring_parameters.go | 16 + .../server/get_runtime_server_parameters.go | 31 ++ .../server/get_server_backend_parameters.go | 16 + .../server/get_server_peer_parameters.go | 16 + .../server/get_server_ring_parameters.go | 16 + .../replace_runtime_server_parameters.go | 31 ++ .../replace_server_backend_parameters.go | 16 + .../server/replace_server_peer_parameters.go | 16 + .../server/replace_server_ring_parameters.go | 16 + ...create_server_switching_rule_parameters.go | 16 + ...delete_server_switching_rule_parameters.go | 16 + .../get_server_switching_rule_parameters.go | 16 + .../get_server_switching_rules_parameters.go | 16 + ...eplace_server_switching_rule_parameters.go | 16 + ...place_server_switching_rules_parameters.go | 16 + .../create_server_template_parameters.go | 16 + .../delete_server_template_parameters.go | 16 + .../get_server_template_parameters.go | 16 + .../get_server_templates_parameters.go | 16 + .../replace_server_template_parameters.go | 16 + .../spoe/create_spoe_agent_parameters.go | 16 + .../spoe/create_spoe_group_parameters.go | 16 + .../spoe/create_spoe_message_parameters.go | 16 + .../spoe/create_spoe_scope_parameters.go | 16 + .../spoe/delete_spoe_agent_parameters.go | 16 + .../spoe/delete_spoe_group_parameters.go | 16 + .../spoe/delete_spoe_message_parameters.go | 16 + .../spoe/delete_spoe_scope_parameters.go | 16 + .../spoe/get_all_spoe_agent_parameters.go | 16 + .../spoe/get_all_spoe_group_parameters.go | 16 + .../spoe/get_all_spoe_message_parameters.go | 16 + .../spoe/get_all_spoe_scope_parameters.go | 16 + operations/spoe/get_spoe_agent_parameters.go | 16 + ...t_spoe_configuration_version_parameters.go | 16 + operations/spoe/get_spoe_group_parameters.go | 16 + .../spoe/get_spoe_message_parameters.go | 16 + operations/spoe/get_spoe_scope_parameters.go | 16 + .../spoe/replace_spoe_agent_parameters.go | 16 + .../spoe/replace_spoe_group_parameters.go | 16 + .../spoe/replace_spoe_message_parameters.go | 16 + .../commit_spoe_transaction_parameters.go | 16 + .../delete_spoe_transaction_parameters.go | 16 + .../get_all_spoe_transaction_parameters.go | 15 + .../get_spoe_transaction_parameters.go | 16 + .../start_spoe_transaction_parameters.go | 15 + .../create_stick_rule_parameters.go | 16 + .../delete_stick_rule_parameters.go | 16 + .../stick_rule/get_stick_rule_parameters.go | 16 + .../stick_rule/get_stick_rules_parameters.go | 16 + .../replace_stick_rule_parameters.go | 16 + .../replace_stick_rules_parameters.go | 16 + .../get_stick_table_entries_parameters.go | 46 +++ .../stick_table/get_stick_table_parameters.go | 16 + .../stick_table/set_stick_table_entries.go | 5 + .../set_stick_table_entries_parameters.go | 16 + operations/table/create_table_parameters.go | 16 + operations/table/delete_table_parameters.go | 16 + operations/table/get_table_parameters.go | 16 + operations/table/get_tables_parameters.go | 16 + operations/table/replace_table_parameters.go | 16 + .../create_tcp_check_backend_parameters.go | 16 + .../create_tcp_check_defaults_parameters.go | 16 + .../delete_tcp_check_backend_parameters.go | 16 + .../delete_tcp_check_defaults_parameters.go | 16 + .../get_all_tcp_check_backend_parameters.go | 16 + .../get_all_tcp_check_defaults_parameters.go | 16 + .../get_tcp_check_backend_parameters.go | 16 + .../get_tcp_check_defaults_parameters.go | 16 + ...eplace_all_tcp_check_backend_parameters.go | 16 + ...place_all_tcp_check_defaults_parameters.go | 16 + .../replace_tcp_check_backend_parameters.go | 16 + .../replace_tcp_check_defaults_parameters.go | 16 + ...ate_tcp_request_rule_backend_parameters.go | 16 + ...te_tcp_request_rule_frontend_parameters.go | 16 + ...ete_tcp_request_rule_backend_parameters.go | 16 + ...te_tcp_request_rule_frontend_parameters.go | 16 + ...all_tcp_request_rule_backend_parameters.go | 16 + ...ll_tcp_request_rule_frontend_parameters.go | 16 + ...get_tcp_request_rule_backend_parameters.go | 16 + ...et_tcp_request_rule_frontend_parameters.go | 16 + ...all_tcp_request_rule_backend_parameters.go | 16 + ...ll_tcp_request_rule_frontend_parameters.go | 16 + ...ace_tcp_request_rule_backend_parameters.go | 16 + ...ce_tcp_request_rule_frontend_parameters.go | 16 + ...te_tcp_response_rule_backend_parameters.go | 16 + ...te_tcp_response_rule_backend_parameters.go | 16 + ...ll_tcp_response_rule_backend_parameters.go | 16 + ...et_tcp_response_rule_backend_parameters.go | 16 + ...ll_tcp_response_rule_backend_parameters.go | 16 + ...ce_tcp_response_rule_backend_parameters.go | 16 + 276 files changed, 4843 insertions(+), 39 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index a0be5f10..07788b3f 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -18189,6 +18189,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -18336,6 +18337,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -18375,6 +18377,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -18475,6 +18478,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -18509,6 +18513,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -18554,6 +18559,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -18647,6 +18653,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -18678,6 +18685,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -18724,6 +18732,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -18841,6 +18850,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -18875,6 +18885,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -18936,6 +18947,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -18997,6 +19009,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -19033,12 +19046,14 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "A list of filters in format data.\u003ctype\u003e \u003coperator\u003e \u003cvalue\u003e separated by comma", "name": "filter", "in": "query" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "Key which we want the entries for", "name": "key", @@ -19095,7 +19110,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -36211,6 +36227,7 @@ func init() { "in": "query" }, "parent_name": { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -37893,6 +37910,7 @@ func init() { "operationId": "getAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -37949,6 +37967,7 @@ func init() { "operationId": "replaceAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38048,6 +38067,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38117,6 +38137,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38226,6 +38247,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38335,6 +38357,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38413,6 +38436,7 @@ func init() { "operationId": "getAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38463,6 +38487,7 @@ func init() { "operationId": "replaceAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38562,6 +38587,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38631,6 +38657,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38740,6 +38767,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38849,6 +38877,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38927,6 +38956,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -38977,6 +39007,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39076,6 +39107,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39145,6 +39177,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39254,6 +39287,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39363,6 +39397,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39441,6 +39476,7 @@ func init() { "operationId": "getAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39491,6 +39527,7 @@ func init() { "operationId": "replaceAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39590,6 +39627,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39659,6 +39697,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39768,6 +39807,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39877,6 +39917,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -39955,6 +39996,7 @@ func init() { "operationId": "getAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40005,6 +40047,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40104,6 +40147,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40173,6 +40217,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40282,6 +40327,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40391,6 +40437,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40469,6 +40516,7 @@ func init() { "operationId": "getAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40519,6 +40567,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40618,6 +40667,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40687,6 +40737,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40796,6 +40847,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40905,6 +40957,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -40983,6 +41036,7 @@ func init() { "operationId": "getAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41033,6 +41087,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41132,6 +41187,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41201,6 +41257,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41310,6 +41367,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41419,6 +41477,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41497,6 +41556,7 @@ func init() { "operationId": "getAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41547,6 +41607,7 @@ func init() { "operationId": "replaceAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41646,6 +41707,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41715,6 +41777,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41824,6 +41887,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -41933,6 +41997,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42011,6 +42076,7 @@ func init() { "operationId": "getServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42061,6 +42127,7 @@ func init() { "operationId": "replaceServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42160,6 +42227,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42229,6 +42297,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42338,6 +42407,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42447,6 +42517,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42525,6 +42596,7 @@ func init() { "operationId": "getServerTemplates", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42575,6 +42647,7 @@ func init() { "operationId": "createServerTemplate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42686,6 +42759,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42755,6 +42829,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42864,6 +42939,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42942,6 +43018,7 @@ func init() { "operationId": "getAllServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -42992,6 +43069,7 @@ func init() { "operationId": "createServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43103,6 +43181,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43172,6 +43251,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43281,6 +43361,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43359,6 +43440,7 @@ func init() { "operationId": "getStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43409,6 +43491,7 @@ func init() { "operationId": "replaceStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43508,6 +43591,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43577,6 +43661,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43686,6 +43771,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43795,6 +43881,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43873,6 +43960,7 @@ func init() { "operationId": "getAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -43923,6 +44011,7 @@ func init() { "operationId": "replaceAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44022,6 +44111,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44091,6 +44181,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44200,6 +44291,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44309,6 +44401,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44387,6 +44480,7 @@ func init() { "operationId": "getAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44437,6 +44531,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44536,6 +44631,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44605,6 +44701,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44714,6 +44811,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44823,6 +44921,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44901,6 +45000,7 @@ func init() { "operationId": "getAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44951,6 +45051,7 @@ func init() { "operationId": "replaceAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45050,6 +45151,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45119,6 +45221,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45228,6 +45331,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45337,6 +45441,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47013,6 +47118,7 @@ func init() { "operationId": "getAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47063,6 +47169,7 @@ func init() { "operationId": "replaceAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47162,6 +47269,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47231,6 +47339,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47340,6 +47449,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47449,6 +47559,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47527,6 +47638,7 @@ func init() { "operationId": "getAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47577,6 +47689,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47676,6 +47789,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47745,6 +47859,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47854,6 +47969,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47963,6 +48079,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48041,6 +48158,7 @@ func init() { "operationId": "getAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48091,6 +48209,7 @@ func init() { "operationId": "replaceAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48190,6 +48309,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48259,6 +48379,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48368,6 +48489,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48477,6 +48599,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48555,6 +48678,7 @@ func init() { "operationId": "getAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48605,6 +48729,7 @@ func init() { "operationId": "replaceAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48704,6 +48829,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48773,6 +48899,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48882,6 +49009,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48991,6 +49119,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49479,6 +49608,7 @@ func init() { "operationId": "getAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49535,6 +49665,7 @@ func init() { "operationId": "replaceAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49634,6 +49765,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49703,6 +49835,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49812,6 +49945,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49921,6 +50055,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50409,6 +50544,7 @@ func init() { "operationId": "getAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50465,6 +50601,7 @@ func init() { "operationId": "replaceAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50564,6 +50701,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50633,6 +50771,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50742,6 +50881,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50851,6 +50991,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50929,6 +51070,7 @@ func init() { "operationId": "getBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50979,6 +51121,7 @@ func init() { "operationId": "replaceBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51078,6 +51221,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51147,6 +51291,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51256,6 +51401,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51365,6 +51511,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51443,6 +51590,7 @@ func init() { "operationId": "getAllBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51493,6 +51641,7 @@ func init() { "operationId": "createBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51604,6 +51753,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51673,6 +51823,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51782,6 +51933,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51860,6 +52012,7 @@ func init() { "operationId": "getDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51910,6 +52063,7 @@ func init() { "operationId": "replaceDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52009,6 +52163,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52078,6 +52233,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52187,6 +52343,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52296,6 +52453,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52374,6 +52532,7 @@ func init() { "operationId": "getAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52424,6 +52583,7 @@ func init() { "operationId": "replaceAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52523,6 +52683,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52592,6 +52753,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52701,6 +52863,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52810,6 +52973,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52888,6 +53052,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52938,6 +53103,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53037,6 +53203,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53106,6 +53273,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53215,6 +53383,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53324,6 +53493,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53402,6 +53572,7 @@ func init() { "operationId": "getAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53452,6 +53623,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53551,6 +53723,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53620,6 +53793,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53729,6 +53903,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53838,6 +54013,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53916,6 +54092,7 @@ func init() { "operationId": "getAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53966,6 +54143,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54065,6 +54243,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54134,6 +54313,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54243,6 +54423,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54352,6 +54533,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54430,6 +54612,7 @@ func init() { "operationId": "getAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54480,6 +54663,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54579,6 +54763,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54648,6 +54833,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54757,6 +54943,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54866,6 +55053,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54944,6 +55132,7 @@ func init() { "operationId": "getAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54994,6 +55183,7 @@ func init() { "operationId": "replaceAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55093,6 +55283,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55162,6 +55353,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55271,6 +55463,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55380,6 +55573,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55458,6 +55652,7 @@ func init() { "operationId": "getAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55508,6 +55703,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55607,6 +55803,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55676,6 +55873,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55785,6 +55983,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55894,6 +56093,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57790,6 +57990,7 @@ func init() { "operationId": "getAllBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57840,6 +58041,7 @@ func init() { "operationId": "createBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57951,6 +58153,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58020,6 +58223,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58129,6 +58333,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58207,6 +58412,7 @@ func init() { "operationId": "getDgramBinds", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58257,6 +58463,7 @@ func init() { "operationId": "createDgramBind", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58368,6 +58575,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58437,6 +58645,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58546,6 +58755,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58624,6 +58834,7 @@ func init() { "operationId": "getAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58674,6 +58885,7 @@ func init() { "operationId": "replaceAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58773,6 +58985,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58842,6 +59055,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58951,6 +59165,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59060,6 +59275,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61100,6 +61316,7 @@ func init() { "operationId": "getAllBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61150,6 +61367,7 @@ func init() { "operationId": "createBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61261,6 +61479,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61330,6 +61549,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61439,6 +61659,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61517,6 +61738,7 @@ func init() { "operationId": "getAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61567,6 +61789,7 @@ func init() { "operationId": "replaceAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61666,6 +61889,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61735,6 +61959,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61844,6 +62069,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61953,6 +62179,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62031,6 +62258,7 @@ func init() { "operationId": "getAllServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62081,6 +62309,7 @@ func init() { "operationId": "createServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62192,6 +62421,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62261,6 +62491,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62370,6 +62601,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62448,6 +62680,7 @@ func init() { "operationId": "getTables", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62498,6 +62731,7 @@ func init() { "operationId": "createTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62609,6 +62843,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62678,6 +62913,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62787,6 +63023,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64265,6 +64502,7 @@ func init() { "operationId": "getAllServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64315,6 +64553,7 @@ func init() { "operationId": "createServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64426,6 +64665,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64495,6 +64735,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64604,6 +64845,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65598,6 +65840,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -65651,6 +65894,7 @@ func init() { "summary": "Return an ACL entries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65712,6 +65956,7 @@ func init() { "operationId": "addPayloadRuntimeACL", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65771,6 +66016,7 @@ func init() { "summary": "Add entry to an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65844,6 +66090,7 @@ func init() { "summary": "Return an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65851,6 +66098,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -65914,6 +66162,7 @@ func init() { "summary": "Delete an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65921,6 +66170,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -65981,6 +66231,7 @@ func init() { "operationId": "getAllRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66018,6 +66269,7 @@ func init() { "operationId": "addRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66101,6 +66353,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -66108,6 +66361,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66157,6 +66411,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -66164,6 +66419,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66233,6 +66489,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -66240,6 +66497,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66384,6 +66642,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -66433,6 +66692,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -66497,6 +66757,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -66558,6 +66819,7 @@ func init() { "operationId": "showRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66607,6 +66869,7 @@ func init() { "operationId": "addMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66685,6 +66948,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -66692,6 +66956,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66741,6 +67006,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -66748,6 +67014,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66833,6 +67100,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -66840,6 +67108,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66925,6 +67194,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -66976,6 +67246,7 @@ func init() { "operationId": "getStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66983,12 +67254,14 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "A list of filters in format data.\u003ctype\u003e \u003coperator\u003e \u003cvalue\u003e separated by comma", "name": "filter", "in": "query" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "Key which we want the entries for", "name": "key", @@ -67037,6 +67310,7 @@ func init() { "operationId": "setStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67058,7 +67332,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -67722,6 +67997,7 @@ func init() { "operationId": "getAllSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67772,6 +68048,7 @@ func init() { "operationId": "createSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67857,6 +68134,7 @@ func init() { "operationId": "getSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67926,6 +68204,7 @@ func init() { "operationId": "deleteSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67995,6 +68274,7 @@ func init() { "operationId": "getAllSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68052,6 +68332,7 @@ func init() { "operationId": "createSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68144,6 +68425,7 @@ func init() { "operationId": "getSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68220,6 +68502,7 @@ func init() { "operationId": "replaceSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68317,6 +68600,7 @@ func init() { "operationId": "deleteSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68393,6 +68677,7 @@ func init() { "operationId": "getAllSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68450,6 +68735,7 @@ func init() { "operationId": "createSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68542,6 +68828,7 @@ func init() { "operationId": "getSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68618,6 +68905,7 @@ func init() { "operationId": "replaceSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68715,6 +69003,7 @@ func init() { "operationId": "deleteSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68791,6 +69080,7 @@ func init() { "operationId": "getAllSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68848,6 +69138,7 @@ func init() { "operationId": "createSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -68940,6 +69231,7 @@ func init() { "operationId": "getSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69016,6 +69308,7 @@ func init() { "operationId": "replaceSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69113,6 +69406,7 @@ func init() { "operationId": "deleteSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69192,6 +69486,7 @@ func init() { "operationId": "getAllSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69242,6 +69537,7 @@ func init() { "operationId": "startSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69306,6 +69602,7 @@ func init() { "operationId": "getSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69362,6 +69659,7 @@ func init() { "operationId": "commitSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69449,6 +69747,7 @@ func init() { "operationId": "deleteSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69511,6 +69810,7 @@ func init() { "in": "query" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -86188,6 +86488,7 @@ func init() { "in": "query" }, "parent_name": { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", diff --git a/go.mod b/go.mod index cc2cc3c6..fb553fbf 100644 --- a/go.mod +++ b/go.mod @@ -15,18 +15,18 @@ require ( github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.133.0 github.com/go-openapi/errors v0.22.7 - github.com/go-openapi/loads v0.23.2 + github.com/go-openapi/loads v0.23.3 github.com/go-openapi/runtime v0.29.0 github.com/go-openapi/spec v0.22.4 - github.com/go-openapi/strfmt v0.25.0 + github.com/go-openapi/strfmt v0.26.1 github.com/go-openapi/swag v0.25.5 github.com/go-openapi/swag/cmdutils v0.25.5 github.com/go-openapi/swag/mangling v0.25.5 - github.com/go-openapi/validate v0.25.1 + github.com/go-openapi/validate v0.25.2 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.0.20 + github.com/haproxytech/client-native/v6 v6.0.22 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -40,8 +40,8 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.51.0 - golang.org/x/sys v0.41.0 + golang.org/x/net v0.52.0 + golang.org/x/sys v0.42.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -60,7 +60,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.24.2 // indirect + github.com/go-openapi/analysis v0.25.0 // indirect github.com/go-openapi/jsonpointer v0.22.5 // indirect github.com/go-openapi/jsonreference v0.21.5 // indirect github.com/go-openapi/swag/conv v0.25.5 // indirect @@ -86,7 +86,7 @@ require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect - github.com/oklog/ulid v1.3.1 // indirect + github.com/oklog/ulid/v2 v2.1.1 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect @@ -97,9 +97,8 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.9 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/sync v0.19.0 // indirect - golang.org/x/text v0.34.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/text v0.35.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f5343f01..6c9a3a9f 100644 --- a/go.sum +++ b/go.sum @@ -53,22 +53,22 @@ github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7Bdxkc github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= -github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= +github.com/go-openapi/analysis v0.25.0 h1:EnjAq1yO8wEO9HbPmY8vLPEIkdZuuFhCAKBPvCB7bCs= +github.com/go-openapi/analysis v0.25.0/go.mod h1:5WFTRE43WLkPG9r9OtlMfqkkvUTYLVVCIxLlEpyF8kE= github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= -github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= -github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/loads v0.23.3 h1:g5Xap1JfwKkUnZdn+S0L3SzBDpcTIYzZ5Qaag0YDkKQ= +github.com/go-openapi/loads v0.23.3/go.mod h1:NOH07zLajXo8y55hom0omlHWDVVvCwBM/S+csCK8LqA= github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= -github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= -github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= +github.com/go-openapi/strfmt v0.26.1 h1:7zGCHji7zSYDC2tCXIusoxYQz/48jAf2q+sF6wXTG+c= +github.com/go-openapi/strfmt v0.26.1/go.mod h1:Zslk5VZPOISLwmWTMBIS7oiVFem1o1EI6zULY8Uer7Y= github.com/go-openapi/swag v0.25.5 h1:pNkwbUEeGwMtcgxDr+2GBPAk4kT+kJ+AaB+TMKAg+TU= github.com/go-openapi/swag v0.25.5/go.mod h1:B3RT6l8q7X803JRxa2e59tHOiZlX1t8viplOcs9CwTA= github.com/go-openapi/swag/cmdutils v0.25.5 h1:yh5hHrpgsw4NwM9KAEtaDTXILYzdXh/I8Whhx9hKj7c= @@ -95,12 +95,12 @@ github.com/go-openapi/swag/typeutils v0.25.5 h1:EFJ+PCga2HfHGdo8s8VJXEVbeXRCYwzz github.com/go-openapi/swag/typeutils v0.25.5/go.mod h1:itmFmScAYE1bSD8C4rS0W+0InZUBrB2xSPbWt6DLGuc= github.com/go-openapi/swag/yamlutils v0.25.5 h1:kASCIS+oIeoc55j28T4o8KwlV2S4ZLPT6G0iq2SSbVQ= github.com/go-openapi/swag/yamlutils v0.25.5/go.mod h1:Gek1/SjjfbYvM+Iq4QGwa/2lEXde9n2j4a3wI3pNuOQ= -github.com/go-openapi/testify/enable/yaml/v2 v2.4.0 h1:7SgOMTvJkM8yWrQlU8Jm18VeDPuAvB/xWrdxFJkoFag= -github.com/go-openapi/testify/enable/yaml/v2 v2.4.0/go.mod h1:14iV8jyyQlinc9StD7w1xVPW3CO3q1Gj04Jy//Kw4VM= -github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= -github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= -github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= -github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1 h1:NZOrZmIb6PTv5LTFxr5/mKV/FjbUzGE7E6gLz7vFoOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1/go.mod h1:r7dwsujEHawapMsxA69i+XMGZrQ5tRauhLAjV/sxg3Q= +github.com/go-openapi/testify/v2 v2.4.1 h1:zB34HDKj4tHwyUQHrUkpV0Q0iXQ6dUCOQtIqn8hE6Iw= +github.com/go-openapi/testify/v2 v2.4.1/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.2 h1:12NsfLAwGegqbGWr2CnvT65X/Q2USJipmJ9b7xDJZz0= +github.com/go-openapi/validate v0.25.2/go.mod h1:Pgl1LpPPGFnZ+ys4/hTlDiRYQdI1ocKypgE+8Q8BLfY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= @@ -116,8 +116,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.9 h1:D+JvMsRHCewn+r+FJpzf3QUu2yHwGuV+s6IuJlajxYE= github.com/haproxytech/client-native/v5 v5.1.9/go.mod h1:rSJ7gT0vpZqNYdZQwzttLC4doOyoTL+B68F7cDjELNQ= -github.com/haproxytech/client-native/v6 v6.0.20 h1:Qzz8nmk2GvUD52eGC5SV7CZV570j13OB1k4ZJevaGak= -github.com/haproxytech/client-native/v6 v6.0.20/go.mod h1:oiofZQriWSRKEz9A0ehE3ljcvBtEM5nnNFercJ8wtbs= +github.com/haproxytech/client-native/v6 v6.0.22 h1:B1rbropuBzFs/krOXPuEwm8begA1zZT45m5F8b5QElw= +github.com/haproxytech/client-native/v6 v6.0.22/go.mod h1:kn7HnkA39HxEajPPOCP3gG8thGZYSw1gO9oMEsxvjqU= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -160,10 +160,11 @@ github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//J github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= +github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea h1:sKwxy1H95npauwu8vtF95vG/syrL0p8fSZo/XlDg5gk= @@ -202,23 +203,21 @@ github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQs github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU= -go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= -golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/operations/acl/create_acl_backend_parameters.go b/operations/acl/create_acl_backend_parameters.go index 4cc2c5db..bc9984e0 100644 --- a/operations/acl/create_acl_backend_parameters.go +++ b/operations/acl/create_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/create_acl_fcgi_app_parameters.go b/operations/acl/create_acl_fcgi_app_parameters.go index b4dc7d85..4e3c9ca1 100644 --- a/operations/acl/create_acl_fcgi_app_parameters.go +++ b/operations/acl/create_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/create_acl_frontend_parameters.go b/operations/acl/create_acl_frontend_parameters.go index aad64edf..92d8ac3a 100644 --- a/operations/acl/create_acl_frontend_parameters.go +++ b/operations/acl/create_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_backend_parameters.go b/operations/acl/delete_acl_backend_parameters.go index 0227d37b..6691ab8d 100644 --- a/operations/acl/delete_acl_backend_parameters.go +++ b/operations/acl/delete_acl_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLBackendParams creates a new DeleteACLBackendParams object @@ -66,6 +67,7 @@ type DeleteACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_fcgi_app_parameters.go b/operations/acl/delete_acl_fcgi_app_parameters.go index 41120243..484f14d5 100644 --- a/operations/acl/delete_acl_fcgi_app_parameters.go +++ b/operations/acl/delete_acl_fcgi_app_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLFCGIAppParams creates a new DeleteACLFCGIAppParams object @@ -66,6 +67,7 @@ type DeleteACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_frontend_parameters.go b/operations/acl/delete_acl_frontend_parameters.go index f05ad3d2..b20e19aa 100644 --- a/operations/acl/delete_acl_frontend_parameters.go +++ b/operations/acl/delete_acl_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLFrontendParams creates a new DeleteACLFrontendParams object @@ -66,6 +67,7 @@ type DeleteACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_backend_parameters.go b/operations/acl/get_acl_backend_parameters.go index 34ac388e..3c19dec6 100644 --- a/operations/acl/get_acl_backend_parameters.go +++ b/operations/acl/get_acl_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLBackendParams creates a new GetACLBackendParams object @@ -54,6 +55,7 @@ type GetACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLBackendParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_fcgi_app_parameters.go b/operations/acl/get_acl_fcgi_app_parameters.go index ce5ab160..9db4cb9e 100644 --- a/operations/acl/get_acl_fcgi_app_parameters.go +++ b/operations/acl/get_acl_fcgi_app_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLFCGIAppParams creates a new GetACLFCGIAppParams object @@ -54,6 +55,7 @@ type GetACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_frontend_parameters.go b/operations/acl/get_acl_frontend_parameters.go index 1c850bdd..781b7b0c 100644 --- a/operations/acl/get_acl_frontend_parameters.go +++ b/operations/acl/get_acl_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLFrontendParams creates a new GetACLFrontendParams object @@ -54,6 +55,7 @@ type GetACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLFrontendParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_backend_parameters.go b/operations/acl/get_all_acl_backend_parameters.go index afe3db8f..071ef917 100644 --- a/operations/acl/get_all_acl_backend_parameters.go +++ b/operations/acl/get_all_acl_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLBackendParams creates a new GetAllACLBackendParams object @@ -52,6 +53,7 @@ type GetAllACLBackendParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_fcgi_app_parameters.go b/operations/acl/get_all_acl_fcgi_app_parameters.go index 16e39a18..677b08d8 100644 --- a/operations/acl/get_all_acl_fcgi_app_parameters.go +++ b/operations/acl/get_all_acl_fcgi_app_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLFCGIAppParams creates a new GetAllACLFCGIAppParams object @@ -52,6 +53,7 @@ type GetAllACLFCGIAppParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_frontend_parameters.go b/operations/acl/get_all_acl_frontend_parameters.go index d3f51e84..3e89c440 100644 --- a/operations/acl/get_all_acl_frontend_parameters.go +++ b/operations/acl/get_all_acl_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLFrontendParams creates a new GetAllACLFrontendParams object @@ -52,6 +53,7 @@ type GetAllACLFrontendParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_backend_parameters.go b/operations/acl/replace_acl_backend_parameters.go index b0c54444..ec1478d9 100644 --- a/operations/acl/replace_acl_backend_parameters.go +++ b/operations/acl/replace_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLBackendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_fcgi_app_parameters.go b/operations/acl/replace_acl_fcgi_app_parameters.go index b6ad5b8f..7ef73489 100644 --- a/operations/acl/replace_acl_fcgi_app_parameters.go +++ b/operations/acl/replace_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_frontend_parameters.go b/operations/acl/replace_acl_frontend_parameters.go index e98e70a4..6124fa81 100644 --- a/operations/acl/replace_acl_frontend_parameters.go +++ b/operations/acl/replace_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_backend_parameters.go b/operations/acl/replace_all_acl_backend_parameters.go index 4a34a42a..56a4018f 100644 --- a/operations/acl/replace_all_acl_backend_parameters.go +++ b/operations/acl/replace_all_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_fcgi_app_parameters.go b/operations/acl/replace_all_acl_fcgi_app_parameters.go index c3b0d8d8..3fb88d12 100644 --- a/operations/acl/replace_all_acl_fcgi_app_parameters.go +++ b/operations/acl/replace_all_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLFCGIAppParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLFCGIAppParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_frontend_parameters.go b/operations/acl/replace_all_acl_frontend_parameters.go index 6bfd0e8c..2bb9aba5 100644 --- a/operations/acl/replace_all_acl_frontend_parameters.go +++ b/operations/acl/replace_all_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLFrontendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/add_payload_runtime_acl_parameters.go b/operations/acl_runtime/add_payload_runtime_acl_parameters.go index c6db445d..f7870474 100644 --- a/operations/acl_runtime/add_payload_runtime_acl_parameters.go +++ b/operations/acl_runtime/add_payload_runtime_acl_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type AddPayloadRuntimeACLParams struct { Data models.ACLFilesEntries /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *AddPayloadRuntimeACLParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddPayloadRuntimeACLParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go b/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go index b621688c..063ae270 100644 --- a/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go +++ b/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams creates a new DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams object @@ -47,11 +48,13 @@ type DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams struct { /*File entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindID(rawDa // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindParentNa // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go index e9dfc131..a4bccfea 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsIDParams creates a new GetServicesHaproxyRuntimeAclsIDParams object @@ -47,6 +48,7 @@ type GetServicesHaproxyRuntimeAclsIDParams struct { /*ACL file entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string @@ -82,5 +84,19 @@ func (o *GetServicesHaproxyRuntimeAclsIDParams) bindID(rawData []string, hasKey // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetServicesHaproxyRuntimeAclsIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go index d8e86e8e..9b861bb8 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsParentNameEntriesIDParams creates a new GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams object @@ -47,11 +48,13 @@ type GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams struct { /*File entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindID(rawData // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindParentName( // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go index db8ee71b..2fd221be 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsParentNameEntriesParams creates a new GetServicesHaproxyRuntimeAclsParentNameEntriesParams object @@ -47,6 +48,7 @@ type GetServicesHaproxyRuntimeAclsParentNameEntriesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesParams) bindParentName(ra // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go b/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go index ec3501af..015d5a9f 100644 --- a/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go +++ b/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type PostServicesHaproxyRuntimeAclsParentNameEntriesParams struct { Data *models.ACLFileEntry /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *PostServicesHaproxyRuntimeAclsParentNameEntriesParams) bindParentName(r // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *PostServicesHaproxyRuntimeAclsParentNameEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/create_backend_switching_rule_parameters.go b/operations/backend_switching_rule/create_backend_switching_rule_parameters.go index 4c1370e7..7f1ce97f 100644 --- a/operations/backend_switching_rule/create_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/create_backend_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateBackendSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go b/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go index 73c9dd82..9fc20cc5 100644 --- a/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBackendSwitchingRuleParams creates a new DeleteBackendSwitchingRuleParams object @@ -66,6 +67,7 @@ type DeleteBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteBackendSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/get_backend_switching_rule_parameters.go b/operations/backend_switching_rule/get_backend_switching_rule_parameters.go index d8b2f113..225f93a7 100644 --- a/operations/backend_switching_rule/get_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/get_backend_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetBackendSwitchingRuleParams creates a new GetBackendSwitchingRuleParams object @@ -54,6 +55,7 @@ type GetBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetBackendSwitchingRuleParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/get_backend_switching_rules_parameters.go b/operations/backend_switching_rule/get_backend_switching_rules_parameters.go index a5a4c8ec..2a80982d 100644 --- a/operations/backend_switching_rule/get_backend_switching_rules_parameters.go +++ b/operations/backend_switching_rule/get_backend_switching_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBackendSwitchingRulesParams creates a new GetBackendSwitchingRulesParams object @@ -48,6 +49,7 @@ type GetBackendSwitchingRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetBackendSwitchingRulesParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBackendSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go b/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go index 6b471636..37ce9176 100644 --- a/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceBackendSwitchingRuleParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go b/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go index 9904b2f2..9a9de535 100644 --- a/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go +++ b/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceBackendSwitchingRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceBackendSwitchingRulesParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBackendSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_frontend_parameters.go b/operations/bind/create_bind_frontend_parameters.go index c4859589..2950d706 100644 --- a/operations/bind/create_bind_frontend_parameters.go +++ b/operations/bind/create_bind_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_log_forward_parameters.go b/operations/bind/create_bind_log_forward_parameters.go index 17e1ee63..a31f5a17 100644 --- a/operations/bind/create_bind_log_forward_parameters.go +++ b/operations/bind/create_bind_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindLogForwardParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_peer_parameters.go b/operations/bind/create_bind_peer_parameters.go index 34d1976c..4e2013e2 100644 --- a/operations/bind/create_bind_peer_parameters.go +++ b/operations/bind/create_bind_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_frontend_parameters.go b/operations/bind/delete_bind_frontend_parameters.go index d50810b8..fc760fbe 100644 --- a/operations/bind/delete_bind_frontend_parameters.go +++ b/operations/bind/delete_bind_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindFrontendParams creates a new DeleteBindFrontendParams object @@ -66,6 +67,7 @@ type DeleteBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_log_forward_parameters.go b/operations/bind/delete_bind_log_forward_parameters.go index 337ceb87..e36e7bef 100644 --- a/operations/bind/delete_bind_log_forward_parameters.go +++ b/operations/bind/delete_bind_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindLogForwardParams creates a new DeleteBindLogForwardParams object @@ -66,6 +67,7 @@ type DeleteBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_peer_parameters.go b/operations/bind/delete_bind_peer_parameters.go index 9bbfd248..74263b8f 100644 --- a/operations/bind/delete_bind_peer_parameters.go +++ b/operations/bind/delete_bind_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindPeerParams creates a new DeleteBindPeerParams object @@ -66,6 +67,7 @@ type DeleteBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_frontend_parameters.go b/operations/bind/get_all_bind_frontend_parameters.go index 69fb9cde..e9b6e502 100644 --- a/operations/bind/get_all_bind_frontend_parameters.go +++ b/operations/bind/get_all_bind_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindFrontendParams creates a new GetAllBindFrontendParams object @@ -48,6 +49,7 @@ type GetAllBindFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_log_forward_parameters.go b/operations/bind/get_all_bind_log_forward_parameters.go index 1559a030..7ed0968c 100644 --- a/operations/bind/get_all_bind_log_forward_parameters.go +++ b/operations/bind/get_all_bind_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindLogForwardParams creates a new GetAllBindLogForwardParams object @@ -48,6 +49,7 @@ type GetAllBindLogForwardParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_peer_parameters.go b/operations/bind/get_all_bind_peer_parameters.go index 38fedf4a..0e3c4eef 100644 --- a/operations/bind/get_all_bind_peer_parameters.go +++ b/operations/bind/get_all_bind_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindPeerParams creates a new GetAllBindPeerParams object @@ -48,6 +49,7 @@ type GetAllBindPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_frontend_parameters.go b/operations/bind/get_bind_frontend_parameters.go index d321c349..6c1ce432 100644 --- a/operations/bind/get_bind_frontend_parameters.go +++ b/operations/bind/get_bind_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindFrontendParams creates a new GetBindFrontendParams object @@ -53,6 +54,7 @@ type GetBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindFrontendParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_log_forward_parameters.go b/operations/bind/get_bind_log_forward_parameters.go index d3f4e63f..06f5a992 100644 --- a/operations/bind/get_bind_log_forward_parameters.go +++ b/operations/bind/get_bind_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindLogForwardParams creates a new GetBindLogForwardParams object @@ -53,6 +54,7 @@ type GetBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindLogForwardParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_peer_parameters.go b/operations/bind/get_bind_peer_parameters.go index 11b4d84d..71f32902 100644 --- a/operations/bind/get_bind_peer_parameters.go +++ b/operations/bind/get_bind_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindPeerParams creates a new GetBindPeerParams object @@ -53,6 +54,7 @@ type GetBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindPeerParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_frontend_parameters.go b/operations/bind/replace_bind_frontend_parameters.go index eae20d28..9fd3fc85 100644 --- a/operations/bind/replace_bind_frontend_parameters.go +++ b/operations/bind/replace_bind_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindFrontendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_log_forward_parameters.go b/operations/bind/replace_bind_log_forward_parameters.go index 1b0316bd..6d106acb 100644 --- a/operations/bind/replace_bind_log_forward_parameters.go +++ b/operations/bind/replace_bind_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindLogForwardParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_peer_parameters.go b/operations/bind/replace_bind_peer_parameters.go index 7553bdef..335b82b8 100644 --- a/operations/bind/replace_bind_peer_parameters.go +++ b/operations/bind/replace_bind_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindPeerParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/create_declare_capture_parameters.go b/operations/declare_capture/create_declare_capture_parameters.go index b0a4af84..933707bf 100644 --- a/operations/declare_capture/create_declare_capture_parameters.go +++ b/operations/declare_capture/create_declare_capture_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateDeclareCaptureParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/delete_declare_capture_parameters.go b/operations/declare_capture/delete_declare_capture_parameters.go index 979440dc..475f8083 100644 --- a/operations/declare_capture/delete_declare_capture_parameters.go +++ b/operations/declare_capture/delete_declare_capture_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteDeclareCaptureParams creates a new DeleteDeclareCaptureParams object @@ -66,6 +67,7 @@ type DeleteDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteDeclareCaptureParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/get_declare_capture_parameters.go b/operations/declare_capture/get_declare_capture_parameters.go index 02c47cc4..12ecaec1 100644 --- a/operations/declare_capture/get_declare_capture_parameters.go +++ b/operations/declare_capture/get_declare_capture_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetDeclareCaptureParams creates a new GetDeclareCaptureParams object @@ -54,6 +55,7 @@ type GetDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetDeclareCaptureParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/get_declare_captures_parameters.go b/operations/declare_capture/get_declare_captures_parameters.go index dbc989fe..fe602124 100644 --- a/operations/declare_capture/get_declare_captures_parameters.go +++ b/operations/declare_capture/get_declare_captures_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDeclareCapturesParams creates a new GetDeclareCapturesParams object @@ -48,6 +49,7 @@ type GetDeclareCapturesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetDeclareCapturesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDeclareCapturesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/replace_declare_capture_parameters.go b/operations/declare_capture/replace_declare_capture_parameters.go index 604e683c..8296e334 100644 --- a/operations/declare_capture/replace_declare_capture_parameters.go +++ b/operations/declare_capture/replace_declare_capture_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceDeclareCaptureParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/replace_declare_captures_parameters.go b/operations/declare_capture/replace_declare_captures_parameters.go index 2db19806..4d3a6655 100644 --- a/operations/declare_capture/replace_declare_captures_parameters.go +++ b/operations/declare_capture/replace_declare_captures_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceDeclareCapturesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceDeclareCapturesParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDeclareCapturesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/create_dgram_bind_parameters.go b/operations/dgram_bind/create_dgram_bind_parameters.go index 2678b1e1..73751e37 100644 --- a/operations/dgram_bind/create_dgram_bind_parameters.go +++ b/operations/dgram_bind/create_dgram_bind_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateDgramBindParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateDgramBindParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/delete_dgram_bind_parameters.go b/operations/dgram_bind/delete_dgram_bind_parameters.go index b3995061..55449ba4 100644 --- a/operations/dgram_bind/delete_dgram_bind_parameters.go +++ b/operations/dgram_bind/delete_dgram_bind_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteDgramBindParams creates a new DeleteDgramBindParams object @@ -66,6 +67,7 @@ type DeleteDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteDgramBindParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/get_dgram_bind_parameters.go b/operations/dgram_bind/get_dgram_bind_parameters.go index 4355ac22..d4fdb9b9 100644 --- a/operations/dgram_bind/get_dgram_bind_parameters.go +++ b/operations/dgram_bind/get_dgram_bind_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDgramBindParams creates a new GetDgramBindParams object @@ -53,6 +54,7 @@ type GetDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetDgramBindParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/get_dgram_binds_parameters.go b/operations/dgram_bind/get_dgram_binds_parameters.go index c37006e9..29403b67 100644 --- a/operations/dgram_bind/get_dgram_binds_parameters.go +++ b/operations/dgram_bind/get_dgram_binds_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDgramBindsParams creates a new GetDgramBindsParams object @@ -48,6 +49,7 @@ type GetDgramBindsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetDgramBindsParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDgramBindsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/replace_dgram_bind_parameters.go b/operations/dgram_bind/replace_dgram_bind_parameters.go index 3f05f62b..6406a75a 100644 --- a/operations/dgram_bind/replace_dgram_bind_parameters.go +++ b/operations/dgram_bind/replace_dgram_bind_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceDgramBindParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/create_filter_backend_parameters.go b/operations/filter/create_filter_backend_parameters.go index 0e0f6d25..0a181332 100644 --- a/operations/filter/create_filter_backend_parameters.go +++ b/operations/filter/create_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/create_filter_frontend_parameters.go b/operations/filter/create_filter_frontend_parameters.go index f81af086..0be10a07 100644 --- a/operations/filter/create_filter_frontend_parameters.go +++ b/operations/filter/create_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/delete_filter_backend_parameters.go b/operations/filter/delete_filter_backend_parameters.go index 28e77f9d..72e9b445 100644 --- a/operations/filter/delete_filter_backend_parameters.go +++ b/operations/filter/delete_filter_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteFilterBackendParams creates a new DeleteFilterBackendParams object @@ -66,6 +67,7 @@ type DeleteFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/delete_filter_frontend_parameters.go b/operations/filter/delete_filter_frontend_parameters.go index e7c9af9c..9ced3e6a 100644 --- a/operations/filter/delete_filter_frontend_parameters.go +++ b/operations/filter/delete_filter_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteFilterFrontendParams creates a new DeleteFilterFrontendParams object @@ -66,6 +67,7 @@ type DeleteFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_all_filter_backend_parameters.go b/operations/filter/get_all_filter_backend_parameters.go index 262f48c4..f9872d90 100644 --- a/operations/filter/get_all_filter_backend_parameters.go +++ b/operations/filter/get_all_filter_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllFilterBackendParams creates a new GetAllFilterBackendParams object @@ -48,6 +49,7 @@ type GetAllFilterBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_all_filter_frontend_parameters.go b/operations/filter/get_all_filter_frontend_parameters.go index f7266252..e139eb6c 100644 --- a/operations/filter/get_all_filter_frontend_parameters.go +++ b/operations/filter/get_all_filter_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllFilterFrontendParams creates a new GetAllFilterFrontendParams object @@ -48,6 +49,7 @@ type GetAllFilterFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_filter_backend_parameters.go b/operations/filter/get_filter_backend_parameters.go index 20342b83..11cb7f4c 100644 --- a/operations/filter/get_filter_backend_parameters.go +++ b/operations/filter/get_filter_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetFilterBackendParams creates a new GetFilterBackendParams object @@ -54,6 +55,7 @@ type GetFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetFilterBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_filter_frontend_parameters.go b/operations/filter/get_filter_frontend_parameters.go index 5f5bf3b7..41e19dfb 100644 --- a/operations/filter/get_filter_frontend_parameters.go +++ b/operations/filter/get_filter_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetFilterFrontendParams creates a new GetFilterFrontendParams object @@ -54,6 +55,7 @@ type GetFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetFilterFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_all_filter_backend_parameters.go b/operations/filter/replace_all_filter_backend_parameters.go index 50d155c4..43be1332 100644 --- a/operations/filter/replace_all_filter_backend_parameters.go +++ b/operations/filter/replace_all_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllFilterBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllFilterBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_all_filter_frontend_parameters.go b/operations/filter/replace_all_filter_frontend_parameters.go index a29bfad9..f4a2f50f 100644 --- a/operations/filter/replace_all_filter_frontend_parameters.go +++ b/operations/filter/replace_all_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllFilterFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllFilterFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_filter_backend_parameters.go b/operations/filter/replace_filter_backend_parameters.go index 1aed1d8f..bbbdb70d 100644 --- a/operations/filter/replace_filter_backend_parameters.go +++ b/operations/filter/replace_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceFilterBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_filter_frontend_parameters.go b/operations/filter/replace_filter_frontend_parameters.go index f302cb4c..26802732 100644 --- a/operations/filter/replace_filter_frontend_parameters.go +++ b/operations/filter/replace_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceFilterFrontendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go index 619314d1..af5eb244 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go index b4c0fec9..67e16791 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go index 2991d84a..37b51278 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPAfterResponseRuleBackendParams creates a new DeleteHTTPAfterResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go index b64c8963..ff43a067 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPAfterResponseRuleFrontendParams creates a new DeleteHTTPAfterResponseRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go index 2e5fcd45..9b2c09bb 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPAfterResponseRuleBackendParams creates a new GetAllHTTPAfterResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go index 1f4ff913..85d074e4 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPAfterResponseRuleFrontendParams creates a new GetAllHTTPAfterResponseRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go index a296c30e..8acbb272 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPAfterResponseRuleBackendParams creates a new GetHTTPAfterResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go index af73db0d..f407266f 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPAfterResponseRuleFrontendParams creates a new GetHTTPAfterResponseRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go index 6f98b854..14ca1ad4 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPAfterResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleBackendParams) bindParentName(rawData [] // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go index 8ea77a58..f170a21e 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPAfterResponseRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleFrontendParams) bindParentName(rawData [ // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go index 477be655..8bf7208e 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleBackendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go index d1b4304e..cbf0063d 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []st // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/create_http_check_backend_parameters.go b/operations/http_check/create_http_check_backend_parameters.go index 9e7ba597..63f1f9e1 100644 --- a/operations/http_check/create_http_check_backend_parameters.go +++ b/operations/http_check/create_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/create_http_check_defaults_parameters.go b/operations/http_check/create_http_check_defaults_parameters.go index 75b62bed..f237e070 100644 --- a/operations/http_check/create_http_check_defaults_parameters.go +++ b/operations/http_check/create_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/delete_http_check_backend_parameters.go b/operations/http_check/delete_http_check_backend_parameters.go index 5255e0e4..0d584fc5 100644 --- a/operations/http_check/delete_http_check_backend_parameters.go +++ b/operations/http_check/delete_http_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPCheckBackendParams creates a new DeleteHTTPCheckBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/delete_http_check_defaults_parameters.go b/operations/http_check/delete_http_check_defaults_parameters.go index 46d2fb26..78af4808 100644 --- a/operations/http_check/delete_http_check_defaults_parameters.go +++ b/operations/http_check/delete_http_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPCheckDefaultsParams creates a new DeleteHTTPCheckDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_all_http_check_backend_parameters.go b/operations/http_check/get_all_http_check_backend_parameters.go index 5155ce84..7d6fc82f 100644 --- a/operations/http_check/get_all_http_check_backend_parameters.go +++ b/operations/http_check/get_all_http_check_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPCheckBackendParams creates a new GetAllHTTPCheckBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPCheckBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_all_http_check_defaults_parameters.go b/operations/http_check/get_all_http_check_defaults_parameters.go index 6e398d48..530043b7 100644 --- a/operations/http_check/get_all_http_check_defaults_parameters.go +++ b/operations/http_check/get_all_http_check_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPCheckDefaultsParams creates a new GetAllHTTPCheckDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPCheckDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_http_check_backend_parameters.go b/operations/http_check/get_http_check_backend_parameters.go index 490eec9a..4641b5a0 100644 --- a/operations/http_check/get_http_check_backend_parameters.go +++ b/operations/http_check/get_http_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPCheckBackendParams creates a new GetHTTPCheckBackendParams object @@ -54,6 +55,7 @@ type GetHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPCheckBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_http_check_defaults_parameters.go b/operations/http_check/get_http_check_defaults_parameters.go index de85fd3a..659a8b94 100644 --- a/operations/http_check/get_http_check_defaults_parameters.go +++ b/operations/http_check/get_http_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPCheckDefaultsParams creates a new GetHTTPCheckDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_all_http_check_backend_parameters.go b/operations/http_check/replace_all_http_check_backend_parameters.go index 3569802c..0de9f464 100644 --- a/operations/http_check/replace_all_http_check_backend_parameters.go +++ b/operations/http_check/replace_all_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPCheckBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPCheckBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_all_http_check_defaults_parameters.go b/operations/http_check/replace_all_http_check_defaults_parameters.go index 0eb7a155..0f9e6d3c 100644 --- a/operations/http_check/replace_all_http_check_defaults_parameters.go +++ b/operations/http_check/replace_all_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPCheckDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPCheckDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_http_check_backend_parameters.go b/operations/http_check/replace_http_check_backend_parameters.go index 77edcfdb..baf0fe75 100644 --- a/operations/http_check/replace_http_check_backend_parameters.go +++ b/operations/http_check/replace_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPCheckBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_http_check_defaults_parameters.go b/operations/http_check/replace_http_check_defaults_parameters.go index 01775240..608c3351 100644 --- a/operations/http_check/replace_http_check_defaults_parameters.go +++ b/operations/http_check/replace_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_backend_parameters.go b/operations/http_error_rule/create_http_error_rule_backend_parameters.go index aeb5b09d..460b32c8 100644 --- a/operations/http_error_rule/create_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_defaults_parameters.go b/operations/http_error_rule/create_http_error_rule_defaults_parameters.go index 3c60a513..a3d6f70a 100644 --- a/operations/http_error_rule/create_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_frontend_parameters.go b/operations/http_error_rule/create_http_error_rule_frontend_parameters.go index 29024d0a..8d36bcbd 100644 --- a/operations/http_error_rule/create_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_backend_parameters.go b/operations/http_error_rule/delete_http_error_rule_backend_parameters.go index 47f7a25a..f3dbeeea 100644 --- a/operations/http_error_rule/delete_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleBackendParams creates a new DeleteHTTPErrorRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go b/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go index 93dd1b48..27258d55 100644 --- a/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleDefaultsParams creates a new DeleteHTTPErrorRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go b/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go index 091a494e..de566e9f 100644 --- a/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleFrontendParams creates a new DeleteHTTPErrorRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go b/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go index d035242d..d3ca8956 100644 --- a/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleBackendParams creates a new GetAllHTTPErrorRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go b/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go index 0fef73aa..8cec5c54 100644 --- a/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleDefaultsParams creates a new GetAllHTTPErrorRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go b/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go index 1ad477c3..67ea2f7a 100644 --- a/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleFrontendParams creates a new GetAllHTTPErrorRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_backend_parameters.go b/operations/http_error_rule/get_http_error_rule_backend_parameters.go index e98e511c..e3482ab4 100644 --- a/operations/http_error_rule/get_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleBackendParams creates a new GetHTTPErrorRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_defaults_parameters.go b/operations/http_error_rule/get_http_error_rule_defaults_parameters.go index 291419a8..3488327c 100644 --- a/operations/http_error_rule/get_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleDefaultsParams creates a new GetHTTPErrorRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_frontend_parameters.go b/operations/http_error_rule/get_http_error_rule_frontend_parameters.go index 9fff8ee0..501ba61c 100644 --- a/operations/http_error_rule/get_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleFrontendParams creates a new GetHTTPErrorRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go index ac8581e9..cb0175d0 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go index 46e22230..3f2b175a 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go index e31239a1..22f9b9eb 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_backend_parameters.go b/operations/http_error_rule/replace_http_error_rule_backend_parameters.go index cbb6f4f7..369a8e58 100644 --- a/operations/http_error_rule/replace_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go b/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go index 6b883e15..6efba41d 100644 --- a/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go b/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go index 2fca35e8..c31306f9 100644 --- a/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/create_http_request_rule_backend_parameters.go b/operations/http_request_rule/create_http_request_rule_backend_parameters.go index 41a9c904..c4f657c6 100644 --- a/operations/http_request_rule/create_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/create_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/create_http_request_rule_frontend_parameters.go b/operations/http_request_rule/create_http_request_rule_frontend_parameters.go index f14c1300..2dbec60c 100644 --- a/operations/http_request_rule/create_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/create_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/delete_http_request_rule_backend_parameters.go b/operations/http_request_rule/delete_http_request_rule_backend_parameters.go index 11d009ad..deb88138 100644 --- a/operations/http_request_rule/delete_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/delete_http_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPRequestRuleBackendParams creates a new DeleteHTTPRequestRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go b/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go index d020eb92..08258bb8 100644 --- a/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPRequestRuleFrontendParams creates a new DeleteHTTPRequestRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go b/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go index 79dd9c24..95b385cd 100644 --- a/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPRequestRuleBackendParams creates a new GetAllHTTPRequestRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go b/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go index 3d65849b..42d07fbc 100644 --- a/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPRequestRuleFrontendParams creates a new GetAllHTTPRequestRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_http_request_rule_backend_parameters.go b/operations/http_request_rule/get_http_request_rule_backend_parameters.go index 84ba784c..31971b57 100644 --- a/operations/http_request_rule/get_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/get_http_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPRequestRuleBackendParams creates a new GetHTTPRequestRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_http_request_rule_frontend_parameters.go b/operations/http_request_rule/get_http_request_rule_frontend_parameters.go index 1a737167..f0339384 100644 --- a/operations/http_request_rule/get_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/get_http_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPRequestRuleFrontendParams creates a new GetHTTPRequestRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleFrontendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go index 9b266644..74b7a9df 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPRequestRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleBackendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go index 44460cf2..ac2cb12a 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPRequestRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleFrontendParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_http_request_rule_backend_parameters.go b/operations/http_request_rule/replace_http_request_rule_backend_parameters.go index 167200cc..1989031a 100644 --- a/operations/http_request_rule/replace_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/replace_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go b/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go index e84ee71f..8d564b42 100644 --- a/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/create_http_response_rule_backend_parameters.go b/operations/http_response_rule/create_http_response_rule_backend_parameters.go index ed06a582..cc6f350b 100644 --- a/operations/http_response_rule/create_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/create_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/create_http_response_rule_frontend_parameters.go b/operations/http_response_rule/create_http_response_rule_frontend_parameters.go index f700f54c..68340a9c 100644 --- a/operations/http_response_rule/create_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/create_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/delete_http_response_rule_backend_parameters.go b/operations/http_response_rule/delete_http_response_rule_backend_parameters.go index a038ceb2..874bea03 100644 --- a/operations/http_response_rule/delete_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/delete_http_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPResponseRuleBackendParams creates a new DeleteHTTPResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go b/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go index ec5b77ee..8b1d456b 100644 --- a/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPResponseRuleFrontendParams creates a new DeleteHTTPResponseRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go b/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go index 4f9d5de5..81a20f3b 100644 --- a/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPResponseRuleBackendParams creates a new GetAllHTTPResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go b/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go index 0c4a366e..14da2d70 100644 --- a/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPResponseRuleFrontendParams creates a new GetAllHTTPResponseRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_http_response_rule_backend_parameters.go b/operations/http_response_rule/get_http_response_rule_backend_parameters.go index 53be771f..abd155c0 100644 --- a/operations/http_response_rule/get_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/get_http_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPResponseRuleBackendParams creates a new GetHTTPResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_http_response_rule_frontend_parameters.go b/operations/http_response_rule/get_http_response_rule_frontend_parameters.go index 6e9ee92d..15988b64 100644 --- a/operations/http_response_rule/get_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/get_http_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPResponseRuleFrontendParams creates a new GetHTTPResponseRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go index 2ed736be..1b923048 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleBackendParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go index 5b117c23..55d72d0f 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPResponseRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleFrontendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_http_response_rule_backend_parameters.go b/operations/http_response_rule/replace_http_response_rule_backend_parameters.go index 9e7b2038..25739afa 100644 --- a/operations/http_response_rule/replace_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/replace_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go b/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go index 0cdab708..d163934a 100644 --- a/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_backend_parameters.go b/operations/log_target/create_log_target_backend_parameters.go index b642be2f..fa5bd648 100644 --- a/operations/log_target/create_log_target_backend_parameters.go +++ b/operations/log_target/create_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_defaults_parameters.go b/operations/log_target/create_log_target_defaults_parameters.go index be3778fe..cae00239 100644 --- a/operations/log_target/create_log_target_defaults_parameters.go +++ b/operations/log_target/create_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_frontend_parameters.go b/operations/log_target/create_log_target_frontend_parameters.go index a92b211e..16242beb 100644 --- a/operations/log_target/create_log_target_frontend_parameters.go +++ b/operations/log_target/create_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_log_forward_parameters.go b/operations/log_target/create_log_target_log_forward_parameters.go index b09d6390..77b44307 100644 --- a/operations/log_target/create_log_target_log_forward_parameters.go +++ b/operations/log_target/create_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_peer_parameters.go b/operations/log_target/create_log_target_peer_parameters.go index df9ae9b5..1222c3d9 100644 --- a/operations/log_target/create_log_target_peer_parameters.go +++ b/operations/log_target/create_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_backend_parameters.go b/operations/log_target/delete_log_target_backend_parameters.go index 332c7854..7d712cef 100644 --- a/operations/log_target/delete_log_target_backend_parameters.go +++ b/operations/log_target/delete_log_target_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetBackendParams creates a new DeleteLogTargetBackendParams object @@ -66,6 +67,7 @@ type DeleteLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_defaults_parameters.go b/operations/log_target/delete_log_target_defaults_parameters.go index f15f4784..bbb16883 100644 --- a/operations/log_target/delete_log_target_defaults_parameters.go +++ b/operations/log_target/delete_log_target_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetDefaultsParams creates a new DeleteLogTargetDefaultsParams object @@ -66,6 +67,7 @@ type DeleteLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_frontend_parameters.go b/operations/log_target/delete_log_target_frontend_parameters.go index 3e346055..ce2560f1 100644 --- a/operations/log_target/delete_log_target_frontend_parameters.go +++ b/operations/log_target/delete_log_target_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetFrontendParams creates a new DeleteLogTargetFrontendParams object @@ -66,6 +67,7 @@ type DeleteLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_log_forward_parameters.go b/operations/log_target/delete_log_target_log_forward_parameters.go index 14118574..06218c00 100644 --- a/operations/log_target/delete_log_target_log_forward_parameters.go +++ b/operations/log_target/delete_log_target_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetLogForwardParams creates a new DeleteLogTargetLogForwardParams object @@ -66,6 +67,7 @@ type DeleteLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_peer_parameters.go b/operations/log_target/delete_log_target_peer_parameters.go index 9d913948..f2460e69 100644 --- a/operations/log_target/delete_log_target_peer_parameters.go +++ b/operations/log_target/delete_log_target_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetPeerParams creates a new DeleteLogTargetPeerParams object @@ -66,6 +67,7 @@ type DeleteLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_backend_parameters.go b/operations/log_target/get_all_log_target_backend_parameters.go index b8a6f24c..3e52b153 100644 --- a/operations/log_target/get_all_log_target_backend_parameters.go +++ b/operations/log_target/get_all_log_target_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetBackendParams creates a new GetAllLogTargetBackendParams object @@ -48,6 +49,7 @@ type GetAllLogTargetBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_defaults_parameters.go b/operations/log_target/get_all_log_target_defaults_parameters.go index 393d187d..467c0430 100644 --- a/operations/log_target/get_all_log_target_defaults_parameters.go +++ b/operations/log_target/get_all_log_target_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetDefaultsParams creates a new GetAllLogTargetDefaultsParams object @@ -48,6 +49,7 @@ type GetAllLogTargetDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_frontend_parameters.go b/operations/log_target/get_all_log_target_frontend_parameters.go index 3707ca4e..feaa7c93 100644 --- a/operations/log_target/get_all_log_target_frontend_parameters.go +++ b/operations/log_target/get_all_log_target_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetFrontendParams creates a new GetAllLogTargetFrontendParams object @@ -48,6 +49,7 @@ type GetAllLogTargetFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_log_forward_parameters.go b/operations/log_target/get_all_log_target_log_forward_parameters.go index a4fa352a..aeb16fa8 100644 --- a/operations/log_target/get_all_log_target_log_forward_parameters.go +++ b/operations/log_target/get_all_log_target_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetLogForwardParams creates a new GetAllLogTargetLogForwardParams object @@ -48,6 +49,7 @@ type GetAllLogTargetLogForwardParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_peer_parameters.go b/operations/log_target/get_all_log_target_peer_parameters.go index 31c67090..9cba6874 100644 --- a/operations/log_target/get_all_log_target_peer_parameters.go +++ b/operations/log_target/get_all_log_target_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetPeerParams creates a new GetAllLogTargetPeerParams object @@ -48,6 +49,7 @@ type GetAllLogTargetPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_backend_parameters.go b/operations/log_target/get_log_target_backend_parameters.go index 01ea6552..8fe34520 100644 --- a/operations/log_target/get_log_target_backend_parameters.go +++ b/operations/log_target/get_log_target_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetBackendParams creates a new GetLogTargetBackendParams object @@ -54,6 +55,7 @@ type GetLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_defaults_parameters.go b/operations/log_target/get_log_target_defaults_parameters.go index f47aaa88..c7b818b0 100644 --- a/operations/log_target/get_log_target_defaults_parameters.go +++ b/operations/log_target/get_log_target_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetDefaultsParams creates a new GetLogTargetDefaultsParams object @@ -54,6 +55,7 @@ type GetLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetDefaultsParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_frontend_parameters.go b/operations/log_target/get_log_target_frontend_parameters.go index 31412579..c83a7f78 100644 --- a/operations/log_target/get_log_target_frontend_parameters.go +++ b/operations/log_target/get_log_target_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetFrontendParams creates a new GetLogTargetFrontendParams object @@ -54,6 +55,7 @@ type GetLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_log_forward_parameters.go b/operations/log_target/get_log_target_log_forward_parameters.go index dfcc8f30..0f4f4d93 100644 --- a/operations/log_target/get_log_target_log_forward_parameters.go +++ b/operations/log_target/get_log_target_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetLogForwardParams creates a new GetLogTargetLogForwardParams object @@ -54,6 +55,7 @@ type GetLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetLogForwardParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_peer_parameters.go b/operations/log_target/get_log_target_peer_parameters.go index 27d9a7a4..b5cee8df 100644 --- a/operations/log_target/get_log_target_peer_parameters.go +++ b/operations/log_target/get_log_target_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetPeerParams creates a new GetLogTargetPeerParams object @@ -54,6 +55,7 @@ type GetLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_backend_parameters.go b/operations/log_target/replace_all_log_target_backend_parameters.go index ef4dd2f2..18179994 100644 --- a/operations/log_target/replace_all_log_target_backend_parameters.go +++ b/operations/log_target/replace_all_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_defaults_parameters.go b/operations/log_target/replace_all_log_target_defaults_parameters.go index 3a5c341a..c03bfa8d 100644 --- a/operations/log_target/replace_all_log_target_defaults_parameters.go +++ b/operations/log_target/replace_all_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_frontend_parameters.go b/operations/log_target/replace_all_log_target_frontend_parameters.go index f0d87f43..503e859d 100644 --- a/operations/log_target/replace_all_log_target_frontend_parameters.go +++ b/operations/log_target/replace_all_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_log_forward_parameters.go b/operations/log_target/replace_all_log_target_log_forward_parameters.go index 39b16410..9f0db41a 100644 --- a/operations/log_target/replace_all_log_target_log_forward_parameters.go +++ b/operations/log_target/replace_all_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetLogForwardParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetLogForwardParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_peer_parameters.go b/operations/log_target/replace_all_log_target_peer_parameters.go index c5ae7f2e..91dc775b 100644 --- a/operations/log_target/replace_all_log_target_peer_parameters.go +++ b/operations/log_target/replace_all_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetPeerParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_backend_parameters.go b/operations/log_target/replace_log_target_backend_parameters.go index 41bc5ff0..f008cf82 100644 --- a/operations/log_target/replace_log_target_backend_parameters.go +++ b/operations/log_target/replace_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_defaults_parameters.go b/operations/log_target/replace_log_target_defaults_parameters.go index 4236fbdb..e0eecfc8 100644 --- a/operations/log_target/replace_log_target_defaults_parameters.go +++ b/operations/log_target/replace_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_frontend_parameters.go b/operations/log_target/replace_log_target_frontend_parameters.go index f67f2b9e..486d5452 100644 --- a/operations/log_target/replace_log_target_frontend_parameters.go +++ b/operations/log_target/replace_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_log_forward_parameters.go b/operations/log_target/replace_log_target_log_forward_parameters.go index 6cf285b4..371e3284 100644 --- a/operations/log_target/replace_log_target_log_forward_parameters.go +++ b/operations/log_target/replace_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetLogForwardParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_peer_parameters.go b/operations/log_target/replace_log_target_peer_parameters.go index 1814733a..8de69326 100644 --- a/operations/log_target/replace_log_target_peer_parameters.go +++ b/operations/log_target/replace_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetPeerParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/add_map_entry_parameters.go b/operations/maps/add_map_entry_parameters.go index 42fe282f..4ca0afcb 100644 --- a/operations/maps/add_map_entry_parameters.go +++ b/operations/maps/add_map_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type AddMapEntryParams struct { ForceSync *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -158,5 +160,19 @@ func (o *AddMapEntryParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/add_payload_runtime_map_parameters.go b/operations/maps/add_payload_runtime_map_parameters.go index 3d7600f5..769a0e79 100644 --- a/operations/maps/add_payload_runtime_map_parameters.go +++ b/operations/maps/add_payload_runtime_map_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type AddPayloadRuntimeMapParams struct { ForceSync *bool /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -158,5 +160,19 @@ func (o *AddPayloadRuntimeMapParams) bindName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *AddPayloadRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/clear_runtime_map_parameters.go b/operations/maps/clear_runtime_map_parameters.go index f7ff5e02..7e1af377 100644 --- a/operations/maps/clear_runtime_map_parameters.go +++ b/operations/maps/clear_runtime_map_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewClearRuntimeMapParams creates a new ClearRuntimeMapParams object @@ -65,6 +66,7 @@ type ClearRuntimeMapParams struct { ForceSync *bool /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -159,5 +161,19 @@ func (o *ClearRuntimeMapParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ClearRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/delete_runtime_map_entry_parameters.go b/operations/maps/delete_runtime_map_entry_parameters.go index bc360d5d..9e4ee0ee 100644 --- a/operations/maps/delete_runtime_map_entry_parameters.go +++ b/operations/maps/delete_runtime_map_entry_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteRuntimeMapEntryParams creates a new DeleteRuntimeMapEntryParams object @@ -61,11 +62,13 @@ type DeleteRuntimeMapEntryParams struct { ForceSync *bool /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -137,6 +140,20 @@ func (o *DeleteRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *DeleteRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -151,5 +168,19 @@ func (o *DeleteRuntimeMapEntryParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/get_one_runtime_map_parameters.go b/operations/maps/get_one_runtime_map_parameters.go index 3805121e..b705bf12 100644 --- a/operations/maps/get_one_runtime_map_parameters.go +++ b/operations/maps/get_one_runtime_map_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetOneRuntimeMapParams creates a new GetOneRuntimeMapParams object @@ -47,6 +48,7 @@ type GetOneRuntimeMapParams struct { /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetOneRuntimeMapParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetOneRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/get_runtime_map_entry_parameters.go b/operations/maps/get_runtime_map_entry_parameters.go index 99f67a04..a6ae472c 100644 --- a/operations/maps/get_runtime_map_entry_parameters.go +++ b/operations/maps/get_runtime_map_entry_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetRuntimeMapEntryParams creates a new GetRuntimeMapEntryParams object @@ -47,11 +48,13 @@ type GetRuntimeMapEntryParams struct { /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetRuntimeMapEntryParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/replace_runtime_map_entry_parameters.go b/operations/maps/replace_runtime_map_entry_parameters.go index 2c6d3eeb..d46cfb5d 100644 --- a/operations/maps/replace_runtime_map_entry_parameters.go +++ b/operations/maps/replace_runtime_map_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewReplaceRuntimeMapEntryParams creates a new ReplaceRuntimeMapEntryParams object @@ -67,11 +68,13 @@ type ReplaceRuntimeMapEntryParams struct { ForceSync *bool /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -166,6 +169,20 @@ func (o *ReplaceRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *ReplaceRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -180,5 +197,19 @@ func (o *ReplaceRuntimeMapEntryParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/show_runtime_map_parameters.go b/operations/maps/show_runtime_map_parameters.go index 1448e28b..a747c5a0 100644 --- a/operations/maps/show_runtime_map_parameters.go +++ b/operations/maps/show_runtime_map_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewShowRuntimeMapParams creates a new ShowRuntimeMapParams object @@ -47,6 +48,7 @@ type ShowRuntimeMapParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *ShowRuntimeMapParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ShowRuntimeMapParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/add_runtime_server_parameters.go b/operations/server/add_runtime_server_parameters.go index 279d8777..94b7b1f2 100644 --- a/operations/server/add_runtime_server_parameters.go +++ b/operations/server/add_runtime_server_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type AddRuntimeServerParams struct { Data *models.RuntimeAddServer /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *AddRuntimeServerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_backend_parameters.go b/operations/server/create_server_backend_parameters.go index b09ed44a..b28f7bda 100644 --- a/operations/server/create_server_backend_parameters.go +++ b/operations/server/create_server_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_peer_parameters.go b/operations/server/create_server_peer_parameters.go index 2b37d5da..1aed15f1 100644 --- a/operations/server/create_server_peer_parameters.go +++ b/operations/server/create_server_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_ring_parameters.go b/operations/server/create_server_ring_parameters.go index e3683e1f..1bc6ae44 100644 --- a/operations/server/create_server_ring_parameters.go +++ b/operations/server/create_server_ring_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerRingParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_runtime_server_parameters.go b/operations/server/delete_runtime_server_parameters.go index ec68099b..0515b863 100644 --- a/operations/server/delete_runtime_server_parameters.go +++ b/operations/server/delete_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteRuntimeServerParams creates a new DeleteRuntimeServerParams object @@ -47,11 +48,13 @@ type DeleteRuntimeServerParams struct { /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *DeleteRuntimeServerParams) bindName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *DeleteRuntimeServerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_backend_parameters.go b/operations/server/delete_server_backend_parameters.go index d6b2c147..9872c57a 100644 --- a/operations/server/delete_server_backend_parameters.go +++ b/operations/server/delete_server_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerBackendParams creates a new DeleteServerBackendParams object @@ -66,6 +67,7 @@ type DeleteServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_peer_parameters.go b/operations/server/delete_server_peer_parameters.go index 82d2f6d9..9145d395 100644 --- a/operations/server/delete_server_peer_parameters.go +++ b/operations/server/delete_server_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerPeerParams creates a new DeleteServerPeerParams object @@ -66,6 +67,7 @@ type DeleteServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_ring_parameters.go b/operations/server/delete_server_ring_parameters.go index 50207734..8fb2fc89 100644 --- a/operations/server/delete_server_ring_parameters.go +++ b/operations/server/delete_server_ring_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerRingParams creates a new DeleteServerRingParams object @@ -66,6 +67,7 @@ type DeleteServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_runtime_server_parameters.go b/operations/server/get_all_runtime_server_parameters.go index 3694a36c..7b94f93c 100644 --- a/operations/server/get_all_runtime_server_parameters.go +++ b/operations/server/get_all_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllRuntimeServerParams creates a new GetAllRuntimeServerParams object @@ -47,6 +48,7 @@ type GetAllRuntimeServerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *GetAllRuntimeServerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_backend_parameters.go b/operations/server/get_all_server_backend_parameters.go index 90a9b74a..bae343a5 100644 --- a/operations/server/get_all_server_backend_parameters.go +++ b/operations/server/get_all_server_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerBackendParams creates a new GetAllServerBackendParams object @@ -48,6 +49,7 @@ type GetAllServerBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_peer_parameters.go b/operations/server/get_all_server_peer_parameters.go index acad0f2a..bff9e260 100644 --- a/operations/server/get_all_server_peer_parameters.go +++ b/operations/server/get_all_server_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerPeerParams creates a new GetAllServerPeerParams object @@ -48,6 +49,7 @@ type GetAllServerPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_ring_parameters.go b/operations/server/get_all_server_ring_parameters.go index 260cf427..aee35be5 100644 --- a/operations/server/get_all_server_ring_parameters.go +++ b/operations/server/get_all_server_ring_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerRingParams creates a new GetAllServerRingParams object @@ -48,6 +49,7 @@ type GetAllServerRingParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_runtime_server_parameters.go b/operations/server/get_runtime_server_parameters.go index fbf48706..58bec938 100644 --- a/operations/server/get_runtime_server_parameters.go +++ b/operations/server/get_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetRuntimeServerParams creates a new GetRuntimeServerParams object @@ -47,11 +48,13 @@ type GetRuntimeServerParams struct { /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetRuntimeServerParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetRuntimeServerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_backend_parameters.go b/operations/server/get_server_backend_parameters.go index 9db9eae2..df538727 100644 --- a/operations/server/get_server_backend_parameters.go +++ b/operations/server/get_server_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerBackendParams creates a new GetServerBackendParams object @@ -53,6 +54,7 @@ type GetServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_peer_parameters.go b/operations/server/get_server_peer_parameters.go index 314b5649..9cb0bad9 100644 --- a/operations/server/get_server_peer_parameters.go +++ b/operations/server/get_server_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerPeerParams creates a new GetServerPeerParams object @@ -53,6 +54,7 @@ type GetServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerPeerParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_ring_parameters.go b/operations/server/get_server_ring_parameters.go index ebf089f3..3116cab4 100644 --- a/operations/server/get_server_ring_parameters.go +++ b/operations/server/get_server_ring_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerRingParams creates a new GetServerRingParams object @@ -53,6 +54,7 @@ type GetServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerRingParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_runtime_server_parameters.go b/operations/server/replace_runtime_server_parameters.go index 21fd8a27..12c0d076 100644 --- a/operations/server/replace_runtime_server_parameters.go +++ b/operations/server/replace_runtime_server_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,11 +57,13 @@ type ReplaceRuntimeServerParams struct { Data *models.RuntimeServer /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +127,20 @@ func (o *ReplaceRuntimeServerParams) bindName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ReplaceRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -138,5 +155,19 @@ func (o *ReplaceRuntimeServerParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_backend_parameters.go b/operations/server/replace_server_backend_parameters.go index 816221fb..b8679871 100644 --- a/operations/server/replace_server_backend_parameters.go +++ b/operations/server/replace_server_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_peer_parameters.go b/operations/server/replace_server_peer_parameters.go index 8149b2de..5172a948 100644 --- a/operations/server/replace_server_peer_parameters.go +++ b/operations/server/replace_server_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerPeerParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_ring_parameters.go b/operations/server/replace_server_ring_parameters.go index 542aa0fc..827389f7 100644 --- a/operations/server/replace_server_ring_parameters.go +++ b/operations/server/replace_server_ring_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerRingParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/create_server_switching_rule_parameters.go b/operations/server_switching_rule/create_server_switching_rule_parameters.go index d9db693a..2c93d947 100644 --- a/operations/server_switching_rule/create_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/create_server_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateServerSwitchingRuleParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/delete_server_switching_rule_parameters.go b/operations/server_switching_rule/delete_server_switching_rule_parameters.go index 9524aabf..fe908ee1 100644 --- a/operations/server_switching_rule/delete_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/delete_server_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerSwitchingRuleParams creates a new DeleteServerSwitchingRuleParams object @@ -66,6 +67,7 @@ type DeleteServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteServerSwitchingRuleParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/get_server_switching_rule_parameters.go b/operations/server_switching_rule/get_server_switching_rule_parameters.go index b2060b50..b8eec247 100644 --- a/operations/server_switching_rule/get_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/get_server_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetServerSwitchingRuleParams creates a new GetServerSwitchingRuleParams object @@ -54,6 +55,7 @@ type GetServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetServerSwitchingRuleParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/get_server_switching_rules_parameters.go b/operations/server_switching_rule/get_server_switching_rules_parameters.go index b5ef8ec4..17fd10d9 100644 --- a/operations/server_switching_rule/get_server_switching_rules_parameters.go +++ b/operations/server_switching_rule/get_server_switching_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerSwitchingRulesParams creates a new GetServerSwitchingRulesParams object @@ -48,6 +49,7 @@ type GetServerSwitchingRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetServerSwitchingRulesParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/replace_server_switching_rule_parameters.go b/operations/server_switching_rule/replace_server_switching_rule_parameters.go index 5b138025..c0c922e3 100644 --- a/operations/server_switching_rule/replace_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/replace_server_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceServerSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/replace_server_switching_rules_parameters.go b/operations/server_switching_rule/replace_server_switching_rules_parameters.go index 2dcfd584..b34dcc25 100644 --- a/operations/server_switching_rule/replace_server_switching_rules_parameters.go +++ b/operations/server_switching_rule/replace_server_switching_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceServerSwitchingRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceServerSwitchingRulesParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/create_server_template_parameters.go b/operations/server_template/create_server_template_parameters.go index 96e43990..4218d629 100644 --- a/operations/server_template/create_server_template_parameters.go +++ b/operations/server_template/create_server_template_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerTemplateParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/delete_server_template_parameters.go b/operations/server_template/delete_server_template_parameters.go index 174599c1..327110c6 100644 --- a/operations/server_template/delete_server_template_parameters.go +++ b/operations/server_template/delete_server_template_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerTemplateParams creates a new DeleteServerTemplateParams object @@ -61,6 +62,7 @@ type DeleteServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -155,6 +157,20 @@ func (o *DeleteServerTemplateParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/get_server_template_parameters.go b/operations/server_template/get_server_template_parameters.go index e7925320..c8c59a75 100644 --- a/operations/server_template/get_server_template_parameters.go +++ b/operations/server_template/get_server_template_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerTemplateParams creates a new GetServerTemplateParams object @@ -48,6 +49,7 @@ type GetServerTemplateParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetServerTemplateParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/get_server_templates_parameters.go b/operations/server_template/get_server_templates_parameters.go index 06b3a7c3..23952d7c 100644 --- a/operations/server_template/get_server_templates_parameters.go +++ b/operations/server_template/get_server_templates_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerTemplatesParams creates a new GetServerTemplatesParams object @@ -48,6 +49,7 @@ type GetServerTemplatesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetServerTemplatesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerTemplatesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/replace_server_template_parameters.go b/operations/server_template/replace_server_template_parameters.go index 01aa8802..a4bf1a44 100644 --- a/operations/server_template/replace_server_template_parameters.go +++ b/operations/server_template/replace_server_template_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -186,6 +188,20 @@ func (o *ReplaceServerTemplateParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_agent_parameters.go b/operations/spoe/create_spoe_agent_parameters.go index f5b6011f..034c7994 100644 --- a/operations/spoe/create_spoe_agent_parameters.go +++ b/operations/spoe/create_spoe_agent_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeAgentParams struct { Data *models.SpoeAgent /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_group_parameters.go b/operations/spoe/create_spoe_group_parameters.go index 68c6fbd8..74fcea5b 100644 --- a/operations/spoe/create_spoe_group_parameters.go +++ b/operations/spoe/create_spoe_group_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeGroupParams struct { Data *models.SpoeGroup /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_message_parameters.go b/operations/spoe/create_spoe_message_parameters.go index e40e8c7f..169f0811 100644 --- a/operations/spoe/create_spoe_message_parameters.go +++ b/operations/spoe/create_spoe_message_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeMessageParams struct { Data *models.SpoeMessage /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_scope_parameters.go b/operations/spoe/create_spoe_scope_parameters.go index 271c52db..69685581 100644 --- a/operations/spoe/create_spoe_scope_parameters.go +++ b/operations/spoe/create_spoe_scope_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeScopeParams struct { Data models.SpoeScope /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -135,6 +137,20 @@ func (o *CreateSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_agent_parameters.go b/operations/spoe/delete_spoe_agent_parameters.go index edd90454..c4422c59 100644 --- a/operations/spoe/delete_spoe_agent_parameters.go +++ b/operations/spoe/delete_spoe_agent_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeAgentParams creates a new DeleteSpoeAgentParams object @@ -54,6 +55,7 @@ type DeleteSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_group_parameters.go b/operations/spoe/delete_spoe_group_parameters.go index 640fffbf..316b6da7 100644 --- a/operations/spoe/delete_spoe_group_parameters.go +++ b/operations/spoe/delete_spoe_group_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeGroupParams creates a new DeleteSpoeGroupParams object @@ -54,6 +55,7 @@ type DeleteSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_message_parameters.go b/operations/spoe/delete_spoe_message_parameters.go index b5d25b11..7b669068 100644 --- a/operations/spoe/delete_spoe_message_parameters.go +++ b/operations/spoe/delete_spoe_message_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeMessageParams creates a new DeleteSpoeMessageParams object @@ -54,6 +55,7 @@ type DeleteSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_scope_parameters.go b/operations/spoe/delete_spoe_scope_parameters.go index d4a3423b..4d49094e 100644 --- a/operations/spoe/delete_spoe_scope_parameters.go +++ b/operations/spoe/delete_spoe_scope_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeScopeParams creates a new DeleteSpoeScopeParams object @@ -54,6 +55,7 @@ type DeleteSpoeScopeParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *DeleteSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_agent_parameters.go b/operations/spoe/get_all_spoe_agent_parameters.go index 2d3c4e52..423faef3 100644 --- a/operations/spoe/get_all_spoe_agent_parameters.go +++ b/operations/spoe/get_all_spoe_agent_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeAgentParams creates a new GetAllSpoeAgentParams object @@ -48,6 +49,7 @@ type GetAllSpoeAgentParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_group_parameters.go b/operations/spoe/get_all_spoe_group_parameters.go index 115dc82c..18a0e017 100644 --- a/operations/spoe/get_all_spoe_group_parameters.go +++ b/operations/spoe/get_all_spoe_group_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeGroupParams creates a new GetAllSpoeGroupParams object @@ -48,6 +49,7 @@ type GetAllSpoeGroupParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_message_parameters.go b/operations/spoe/get_all_spoe_message_parameters.go index 97d1f285..b80f1a53 100644 --- a/operations/spoe/get_all_spoe_message_parameters.go +++ b/operations/spoe/get_all_spoe_message_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeMessageParams creates a new GetAllSpoeMessageParams object @@ -48,6 +49,7 @@ type GetAllSpoeMessageParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_scope_parameters.go b/operations/spoe/get_all_spoe_scope_parameters.go index 7a59fb33..5e56d058 100644 --- a/operations/spoe/get_all_spoe_scope_parameters.go +++ b/operations/spoe/get_all_spoe_scope_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeScopeParams creates a new GetAllSpoeScopeParams object @@ -48,6 +49,7 @@ type GetAllSpoeScopeParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_agent_parameters.go b/operations/spoe/get_spoe_agent_parameters.go index 1b3115bf..0fba4b05 100644 --- a/operations/spoe/get_spoe_agent_parameters.go +++ b/operations/spoe/get_spoe_agent_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeAgentParams creates a new GetSpoeAgentParams object @@ -53,6 +54,7 @@ type GetSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeAgentParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_configuration_version_parameters.go b/operations/spoe/get_spoe_configuration_version_parameters.go index b1fe0cb0..ec84d164 100644 --- a/operations/spoe/get_spoe_configuration_version_parameters.go +++ b/operations/spoe/get_spoe_configuration_version_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeConfigurationVersionParams creates a new GetSpoeConfigurationVersionParams object @@ -48,6 +49,7 @@ type GetSpoeConfigurationVersionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetSpoeConfigurationVersionParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeConfigurationVersionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_group_parameters.go b/operations/spoe/get_spoe_group_parameters.go index e239498b..2790fe56 100644 --- a/operations/spoe/get_spoe_group_parameters.go +++ b/operations/spoe/get_spoe_group_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeGroupParams creates a new GetSpoeGroupParams object @@ -53,6 +54,7 @@ type GetSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeGroupParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_message_parameters.go b/operations/spoe/get_spoe_message_parameters.go index adc0c956..cad1e323 100644 --- a/operations/spoe/get_spoe_message_parameters.go +++ b/operations/spoe/get_spoe_message_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeMessageParams creates a new GetSpoeMessageParams object @@ -53,6 +54,7 @@ type GetSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeMessageParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_scope_parameters.go b/operations/spoe/get_spoe_scope_parameters.go index 9de86820..53f188e3 100644 --- a/operations/spoe/get_spoe_scope_parameters.go +++ b/operations/spoe/get_spoe_scope_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeScopeParams creates a new GetSpoeScopeParams object @@ -53,6 +54,7 @@ type GetSpoeScopeParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetSpoeScopeParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_agent_parameters.go b/operations/spoe/replace_spoe_agent_parameters.go index c75dd592..fa4dad3a 100644 --- a/operations/spoe/replace_spoe_agent_parameters.go +++ b/operations/spoe/replace_spoe_agent_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeAgentParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_group_parameters.go b/operations/spoe/replace_spoe_group_parameters.go index 886eb744..80ec1c73 100644 --- a/operations/spoe/replace_spoe_group_parameters.go +++ b/operations/spoe/replace_spoe_group_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeGroupParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_message_parameters.go b/operations/spoe/replace_spoe_message_parameters.go index 62ff7eff..0116b744 100644 --- a/operations/spoe/replace_spoe_message_parameters.go +++ b/operations/spoe/replace_spoe_message_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/commit_spoe_transaction_parameters.go b/operations/spoe_transactions/commit_spoe_transaction_parameters.go index 4b800638..48e681ce 100644 --- a/operations/spoe_transactions/commit_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/commit_spoe_transaction_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewCommitSpoeTransactionParams creates a new CommitSpoeTransactionParams object @@ -66,6 +67,7 @@ type CommitSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -151,5 +153,19 @@ func (o *CommitSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CommitSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/delete_spoe_transaction_parameters.go b/operations/spoe_transactions/delete_spoe_transaction_parameters.go index 87e2a78f..0966dc70 100644 --- a/operations/spoe_transactions/delete_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/delete_spoe_transaction_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteSpoeTransactionParams creates a new DeleteSpoeTransactionParams object @@ -52,6 +53,7 @@ type DeleteSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -106,5 +108,19 @@ func (o *DeleteSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/get_all_spoe_transaction_parameters.go b/operations/spoe_transactions/get_all_spoe_transaction_parameters.go index a8f271ce..4235375f 100644 --- a/operations/spoe_transactions/get_all_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/get_all_spoe_transaction_parameters.go @@ -49,6 +49,7 @@ type GetAllSpoeTransactionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -95,6 +96,20 @@ func (o *GetAllSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/get_spoe_transaction_parameters.go b/operations/spoe_transactions/get_spoe_transaction_parameters.go index 57e33f8d..272d84fa 100644 --- a/operations/spoe_transactions/get_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/get_spoe_transaction_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeTransactionParams creates a new GetSpoeTransactionParams object @@ -52,6 +53,7 @@ type GetSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -106,5 +108,19 @@ func (o *GetSpoeTransactionParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/start_spoe_transaction_parameters.go b/operations/spoe_transactions/start_spoe_transaction_parameters.go index 17791634..a441ca9a 100644 --- a/operations/spoe_transactions/start_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/start_spoe_transaction_parameters.go @@ -50,6 +50,7 @@ type StartSpoeTransactionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -97,6 +98,20 @@ func (o *StartSpoeTransactionParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *StartSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/create_stick_rule_parameters.go b/operations/stick_rule/create_stick_rule_parameters.go index e24c1b04..8e988ef9 100644 --- a/operations/stick_rule/create_stick_rule_parameters.go +++ b/operations/stick_rule/create_stick_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateStickRuleParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/delete_stick_rule_parameters.go b/operations/stick_rule/delete_stick_rule_parameters.go index bff42efe..517757e1 100644 --- a/operations/stick_rule/delete_stick_rule_parameters.go +++ b/operations/stick_rule/delete_stick_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteStickRuleParams creates a new DeleteStickRuleParams object @@ -66,6 +67,7 @@ type DeleteStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteStickRuleParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/get_stick_rule_parameters.go b/operations/stick_rule/get_stick_rule_parameters.go index 952dfd31..0136150c 100644 --- a/operations/stick_rule/get_stick_rule_parameters.go +++ b/operations/stick_rule/get_stick_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetStickRuleParams creates a new GetStickRuleParams object @@ -54,6 +55,7 @@ type GetStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetStickRuleParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/get_stick_rules_parameters.go b/operations/stick_rule/get_stick_rules_parameters.go index 0e77aeb3..dcf5332a 100644 --- a/operations/stick_rule/get_stick_rules_parameters.go +++ b/operations/stick_rule/get_stick_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetStickRulesParams creates a new GetStickRulesParams object @@ -48,6 +49,7 @@ type GetStickRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetStickRulesParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/replace_stick_rule_parameters.go b/operations/stick_rule/replace_stick_rule_parameters.go index 4bab91a9..57b2e652 100644 --- a/operations/stick_rule/replace_stick_rule_parameters.go +++ b/operations/stick_rule/replace_stick_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceStickRuleParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/replace_stick_rules_parameters.go b/operations/stick_rule/replace_stick_rules_parameters.go index 58ba13f6..6b1c433f 100644 --- a/operations/stick_rule/replace_stick_rules_parameters.go +++ b/operations/stick_rule/replace_stick_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceStickRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceStickRulesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceStickRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/get_stick_table_entries_parameters.go b/operations/stick_table/get_stick_table_entries_parameters.go index f214233f..6ab149d1 100644 --- a/operations/stick_table/get_stick_table_entries_parameters.go +++ b/operations/stick_table/get_stick_table_entries_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetStickTableEntriesParams creates a new GetStickTableEntriesParams object @@ -52,10 +53,12 @@ type GetStickTableEntriesParams struct { */ Count *int64 /*A list of filters in format data. separated by comma + Pattern: ^[^\r\n;#]+$ In: query */ Filter *string /*Key which we want the entries for + Pattern: ^[^\r\n;#]+$ In: query */ Key *string @@ -65,6 +68,7 @@ type GetStickTableEntriesParams struct { Offset *int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -149,6 +153,20 @@ func (o *GetStickTableEntriesParams) bindFilter(rawData []string, hasKey bool, f } o.Filter = &raw + if err := o.validateFilter(formats); err != nil { + return err + } + + return nil +} + +// validateFilter carries on validations for parameter Filter +func (o *GetStickTableEntriesParams) validateFilter(formats strfmt.Registry) error { + + if err := validate.Pattern("filter", "query", *o.Filter, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } @@ -167,6 +185,20 @@ func (o *GetStickTableEntriesParams) bindKey(rawData []string, hasKey bool, form } o.Key = &raw + if err := o.validateKey(formats); err != nil { + return err + } + + return nil +} + +// validateKey carries on validations for parameter Key +func (o *GetStickTableEntriesParams) validateKey(formats strfmt.Registry) error { + + if err := validate.Pattern("key", "query", *o.Key, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } @@ -204,5 +236,19 @@ func (o *GetStickTableEntriesParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickTableEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/get_stick_table_parameters.go b/operations/stick_table/get_stick_table_parameters.go index dc7b61e4..ef34e3e8 100644 --- a/operations/stick_table/get_stick_table_parameters.go +++ b/operations/stick_table/get_stick_table_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetStickTableParams creates a new GetStickTableParams object @@ -47,6 +48,7 @@ type GetStickTableParams struct { /*Stick table name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetStickTableParams) bindName(rawData []string, hasKey bool, formats st // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetStickTableParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/set_stick_table_entries.go b/operations/stick_table/set_stick_table_entries.go index 71d0a195..dacceead 100644 --- a/operations/stick_table/set_stick_table_entries.go +++ b/operations/stick_table/set_stick_table_entries.go @@ -103,6 +103,7 @@ type SetStickTableEntriesBody struct { // key // Required: true + // Pattern: ^[^\r\n;#]+$ Key *string `json:"key"` } @@ -150,6 +151,10 @@ func (o *SetStickTableEntriesBody) validateKey(formats strfmt.Registry) error { return err } + if err := validate.Pattern("stick_table_entry"+"."+"key", "body", *o.Key, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/set_stick_table_entries_parameters.go b/operations/stick_table/set_stick_table_entries_parameters.go index f6067e32..47cb3a3a 100644 --- a/operations/stick_table/set_stick_table_entries_parameters.go +++ b/operations/stick_table/set_stick_table_entries_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewSetStickTableEntriesParams creates a new SetStickTableEntriesParams object @@ -48,6 +49,7 @@ type SetStickTableEntriesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,5 +106,19 @@ func (o *SetStickTableEntriesParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *SetStickTableEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/create_table_parameters.go b/operations/table/create_table_parameters.go index 722a4edc..c9822c5c 100644 --- a/operations/table/create_table_parameters.go +++ b/operations/table/create_table_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateTableParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateTableParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/delete_table_parameters.go b/operations/table/delete_table_parameters.go index 6e3a5fc6..42b45dac 100644 --- a/operations/table/delete_table_parameters.go +++ b/operations/table/delete_table_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTableParams creates a new DeleteTableParams object @@ -66,6 +67,7 @@ type DeleteTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteTableParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/get_table_parameters.go b/operations/table/get_table_parameters.go index 3e4d1ae9..437ea201 100644 --- a/operations/table/get_table_parameters.go +++ b/operations/table/get_table_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetTableParams creates a new GetTableParams object @@ -53,6 +54,7 @@ type GetTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetTableParams) bindParentName(rawData []string, hasKey bool, formats s // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/get_tables_parameters.go b/operations/table/get_tables_parameters.go index cdf2856d..a1c15173 100644 --- a/operations/table/get_tables_parameters.go +++ b/operations/table/get_tables_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetTablesParams creates a new GetTablesParams object @@ -48,6 +49,7 @@ type GetTablesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetTablesParams) bindParentName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTablesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/replace_table_parameters.go b/operations/table/replace_table_parameters.go index 257018ce..fc9373e0 100644 --- a/operations/table/replace_table_parameters.go +++ b/operations/table/replace_table_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceTableParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/create_tcp_check_backend_parameters.go b/operations/tcp_check/create_tcp_check_backend_parameters.go index eccb3a07..0170d661 100644 --- a/operations/tcp_check/create_tcp_check_backend_parameters.go +++ b/operations/tcp_check/create_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/create_tcp_check_defaults_parameters.go b/operations/tcp_check/create_tcp_check_defaults_parameters.go index 44fb6302..521d6617 100644 --- a/operations/tcp_check/create_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/create_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/delete_tcp_check_backend_parameters.go b/operations/tcp_check/delete_tcp_check_backend_parameters.go index e3a771cf..a4f1e813 100644 --- a/operations/tcp_check/delete_tcp_check_backend_parameters.go +++ b/operations/tcp_check/delete_tcp_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPCheckBackendParams creates a new DeleteTCPCheckBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/delete_tcp_check_defaults_parameters.go b/operations/tcp_check/delete_tcp_check_defaults_parameters.go index 16582b44..713482b9 100644 --- a/operations/tcp_check/delete_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/delete_tcp_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPCheckDefaultsParams creates a new DeleteTCPCheckDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_all_tcp_check_backend_parameters.go b/operations/tcp_check/get_all_tcp_check_backend_parameters.go index 2871e6f8..8d916238 100644 --- a/operations/tcp_check/get_all_tcp_check_backend_parameters.go +++ b/operations/tcp_check/get_all_tcp_check_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPCheckBackendParams creates a new GetAllTCPCheckBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPCheckBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_all_tcp_check_defaults_parameters.go b/operations/tcp_check/get_all_tcp_check_defaults_parameters.go index 3001d2e3..41f60a29 100644 --- a/operations/tcp_check/get_all_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/get_all_tcp_check_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPCheckDefaultsParams creates a new GetAllTCPCheckDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPCheckDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_tcp_check_backend_parameters.go b/operations/tcp_check/get_tcp_check_backend_parameters.go index 499447cc..ffa5cb2f 100644 --- a/operations/tcp_check/get_tcp_check_backend_parameters.go +++ b/operations/tcp_check/get_tcp_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPCheckBackendParams creates a new GetTCPCheckBackendParams object @@ -54,6 +55,7 @@ type GetTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPCheckBackendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_tcp_check_defaults_parameters.go b/operations/tcp_check/get_tcp_check_defaults_parameters.go index 8ea37fff..a9e4fae5 100644 --- a/operations/tcp_check/get_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/get_tcp_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPCheckDefaultsParams creates a new GetTCPCheckDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_all_tcp_check_backend_parameters.go b/operations/tcp_check/replace_all_tcp_check_backend_parameters.go index 16c59bed..deadf502 100644 --- a/operations/tcp_check/replace_all_tcp_check_backend_parameters.go +++ b/operations/tcp_check/replace_all_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPCheckBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPCheckBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go b/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go index 6bad0a9c..98cd03f1 100644 --- a/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPCheckDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPCheckDefaultsParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_tcp_check_backend_parameters.go b/operations/tcp_check/replace_tcp_check_backend_parameters.go index 2519c621..5e436eee 100644 --- a/operations/tcp_check/replace_tcp_check_backend_parameters.go +++ b/operations/tcp_check/replace_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_tcp_check_defaults_parameters.go b/operations/tcp_check/replace_tcp_check_defaults_parameters.go index 9e1bd36b..bbb4f53c 100644 --- a/operations/tcp_check/replace_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/replace_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go index d26e46fe..2e8d135b 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go index 1bb09dc4..13daf0d8 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go index a91a9ade..c3ad3589 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPRequestRuleBackendParams creates a new DeleteTCPRequestRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go index f08d511b..a447ba1b 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPRequestRuleFrontendParams creates a new DeleteTCPRequestRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go index 4b5640fb..ddc13b1b 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPRequestRuleBackendParams creates a new GetAllTCPRequestRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go index 41f2eda9..260567bd 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPRequestRuleFrontendParams creates a new GetAllTCPRequestRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go index 7eef7832..96eca69a 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPRequestRuleBackendParams creates a new GetTCPRequestRuleBackendParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go index 96e8b0f6..0b44994c 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPRequestRuleFrontendParams creates a new GetTCPRequestRuleFrontendParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleFrontendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go index 92bedea6..9868f289 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPRequestRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go index 3d386463..22749d09 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPRequestRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleFrontendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go index 4c11e122..546ce8e8 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go index cb1bd52e..143da8d8 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go index 1e80ee9c..59a4169e 100644 --- a/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go index 1d5e4f9b..356fce97 100644 --- a/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPResponseRuleBackendParams creates a new DeleteTCPResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go index ea8ca33b..a0f6d6a4 100644 --- a/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPResponseRuleBackendParams creates a new GetAllTCPResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go index 55cc0465..7d3b4441 100644 --- a/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPResponseRuleBackendParams creates a new GetTCPResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPResponseRuleBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go index eccae8c8..fdba05e5 100644 --- a/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPResponseRuleBackendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go index b9141c45..763fc83f 100644 --- a/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil }