From 32af2b443ecd40f6772d73d2f4b62cb95a2b90ce Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 16 Jun 2025 12:54:13 +0200 Subject: [PATCH 01/42] BUG/MINOR: go.mod: update Go packages --- go.mod | 30 +++++++++++++++--------------- go.sum | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 12f3b5af..2fd4077d 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,12 @@ go 1.24 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 - github.com/KimMachineGun/automemlimit v0.7.2 - github.com/aws/aws-sdk-go-v2 v1.36.3 - github.com/aws/aws-sdk-go-v2/config v1.29.14 - github.com/aws/aws-sdk-go-v2/credentials v1.17.67 + 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.4 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.220.0 + 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.9.0 @@ -38,22 +38,22 @@ 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.40.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.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // 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 @@ -86,7 +86,7 @@ require ( 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.14.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 a408b8fd..f367772e 100644 --- a/go.sum +++ b/go.sum @@ -2,36 +2,60 @@ 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.2 h1:DyfHI7zLWmZPn2Wqdy2AgTiUvrGPmnYWgwhHXtAegX4= github.com/KimMachineGun/automemlimit v0.7.2/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 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.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= +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.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= +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.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/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.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/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.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/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.4 h1:vzLD0FyNU4uxf2QE5UDG0jSEitiJXbVEUwf2Sk3usF4= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4/go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs= github.com/aws/aws-sdk-go-v2/service/ec2 v1.220.0 h1:8XnOxjo1BLo5Z9I/HL9Ns4AXsMJST7oKrqCB4xHEcIg= github.com/aws/aws-sdk-go-v2/service/ec2 v1.220.0/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/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.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= +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.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= +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.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +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= @@ -174,12 +198,18 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo 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.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +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.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +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= From dd91138764d0e58ab3d86e2416c02dcc466065c0 Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Fri, 11 Jul 2025 13:56:34 +0200 Subject: [PATCH 02/42] 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 ac881e14..13cda03a 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 672e76b89a73547ec0d910558e4a054656cdfebf Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 4 Aug 2025 09:10:01 +0200 Subject: [PATCH 03/42] BUILD/MINOR: go.mod: upgrade client-native --- embedded_spec.go | 12 ++++++++---- go.mod | 8 ++++---- go.sum | 50 ++++++++++-------------------------------------- 3 files changed, 22 insertions(+), 48 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index a31eb27b..0bfd6ba0 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -36834,7 +36834,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -41897,7 +41897,8 @@ func init() { "hup", "rdhup" ] - } + }, + "x-omitempty": true }, "events_max_events_at_once": { "type": "integer", @@ -42337,6 +42338,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", @@ -96030,7 +96032,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -100996,7 +100998,8 @@ func init() { "hup", "rdhup" ] - } + }, + "x-omitempty": true }, "events_max_events_at_once": { "type": "integer", @@ -101442,6 +101445,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", diff --git a/go.mod b/go.mod index 2fd4077d..a102bc17 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.2.0 + github.com/haproxytech/client-native/v6 v6.2.3 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 ) @@ -62,7 +62,7 @@ require ( 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-viper/mapstructure/v2 v2.2.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 @@ -87,6 +87,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 f367772e..17392b66 100644 --- a/go.sum +++ b/go.sum @@ -1,59 +1,35 @@ 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.2 h1:DyfHI7zLWmZPn2Wqdy2AgTiUvrGPmnYWgwhHXtAegX4= -github.com/KimMachineGun/automemlimit v0.7.2/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 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.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= -github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= 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.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= 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.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/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.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/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.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/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.4 h1:vzLD0FyNU4uxf2QE5UDG0jSEitiJXbVEUwf2Sk3usF4= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4/go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.220.0 h1:8XnOxjo1BLo5Z9I/HL9Ns4AXsMJST7oKrqCB4xHEcIg= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.220.0/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/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.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= 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.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= 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.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= 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= @@ -101,8 +77,8 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum 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= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= -github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +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= @@ -112,8 +88,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.2.0 h1:yhmORztUOoko1MxB6yx0PK5scElPw+CwLUwfQ3Lni80= -github.com/haproxytech/client-native/v6 v6.2.0/go.mod h1:Ll3Gwf5AEU90LI6C9CO4Dh4NpqOh71y4eXNTmmMTtn8= +github.com/haproxytech/client-native/v6 v6.2.3 h1:QUALa8HqAM5xAgi1xgQhNMSXVlHLM+UUOETEHq6ZS7A= +github.com/haproxytech/client-native/v6 v6.2.3/go.mod h1:fVO57qFA8lD2hLE4Ste4UDHH0uPu3tY7iUffDdO6DUs= 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= @@ -196,27 +172,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.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.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= 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.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -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.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +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 daff5f5e38027e6ed567af63d5abcceb7dd4a37d Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 7 Aug 2025 13:50:55 +0200 Subject: [PATCH 04/42] 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 | 10 +++++----- 4 files changed, 31 insertions(+), 35 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..928a2357 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: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - 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..5101e4fd 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,9 +31,9 @@ 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 From 99a5780272ebd826cdf3ad110ffe7d70b9e78853 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 23 Jun 2025 11:26:51 +0200 Subject: [PATCH 05/42] MEDIUM: acme: Listen for HAProxy events on the master socket For now, only the "newcert" event is handled. This allows HAProxy to save a newly generated certificate to disk using dataplaneapi. More events will be implemented in the future to support ACME's DNS challenges. --- client-native/events.go | 205 +++++++++++++++++++++++++++++++++++ client-native/events_acme.go | 95 ++++++++++++++++ configure_data_plane.go | 33 +++++- go.mod | 2 + 4 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 client-native/events.go create mode 100644 client-native/events_acme.go diff --git a/client-native/events.go b/client-native/events.go new file mode 100644 index 00000000..2914960a --- /dev/null +++ b/client-native/events.go @@ -0,0 +1,205 @@ +// 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. +// + +package cn + +import ( + "context" + "errors" + "fmt" + "io" + "strings" + "sync/atomic" + "time" + + clientnative "github.com/haproxytech/client-native/v6" + "github.com/haproxytech/client-native/v6/runtime" + "github.com/haproxytech/dataplaneapi/log" +) + +// Listen for HAProxy's event on the master socket. + +// Events categgories +const ( + EventAcme = "acme" +) + +type HAProxyEventListener struct { + listener *runtime.EventListener + client clientnative.HAProxyClient // for storage only + rt runtime.Runtime + stop atomic.Bool + lastEvent time.Time +} + +var ( + ErrNoMasterSocket = errors.New("master socket not configured") + ErrOldVersion = errors.New("this version of HAProxy does not support event sinks") +) + +func ListenHAProxyEvents(ctx context.Context, client clientnative.HAProxyClient) (*HAProxyEventListener, error) { + rt, err := client.Runtime() + if err != nil { + return nil, err + } + if rt == nil || rt.IsStatsSocket() { + return nil, ErrNoMasterSocket + } + + version, err := rt.GetVersion() + if err != nil { + return nil, err + } + // v3.2+ + if version.Major < 3 || (version.Major == 3 && version.Minor < 2) { + return nil, ErrOldVersion + } + + el, err := newHAProxyEventListener(rt.SocketPath()) + if err != nil { + return nil, err + } + + h := &HAProxyEventListener{ + client: client, + listener: el, + rt: rt, + } + + go h.listen(ctx) + + log.Debugf("listening for HAProxy events on: %s", rt.SocketPath()) + + return h, nil +} + +// Reconfigure a running listener with a new Runtime. +func (h *HAProxyEventListener) Reconfigure(ctx context.Context, rt runtime.Runtime) error { + if rt == nil || rt.IsStatsSocket() { + return ErrNoMasterSocket + } + + if rt.SocketPath() == h.rt.SocketPath() { + // no need to restart the listener + h.rt = rt + return nil + } + + h.Reset() + h.rt = rt + h.stop.Store(false) + go h.listen(ctx) + + return nil +} + +func (h *HAProxyEventListener) Reset() { + if h.listener != nil { + if err := h.listener.Close(); err != nil { + log.Warning(err) + } + h.listener = nil + } +} + +func (h *HAProxyEventListener) Stop() error { + h.stop.Store(true) + return h.listener.Close() +} + +func newHAProxyEventListener(socketPath string) (*runtime.EventListener, error) { + // This is both the connect and write timeout. + // Use a small value here since at this point dataplane is supposed + // to be already connected to the master socket. + timeout := 3 * time.Second + + el, err := runtime.NewEventListener("unix", socketPath, "dpapi", timeout, "-w", "-0") + if err != nil { + return nil, fmt.Errorf("could not listen to HAProxy's events: %w", err) + } + + return el, nil +} + +func (h *HAProxyEventListener) listen(ctx context.Context) { + var err error + retryAfter := 100 * time.Millisecond + + for { + if h.stop.Load() { + // Stop requested. + h.Reset() + return + } + if h.listener == nil { + h.listener, err = newHAProxyEventListener(h.rt.SocketPath()) + if err != nil { + // Try again. + log.Warning(err) + time.Sleep(retryAfter) + retryAfter *= 2 + if retryAfter == 51200*time.Millisecond { + // Give up after 10 iterations. + h.stop.Store(true) + } + continue + } + } + + for { + ev, err := h.listener.Listen(ctx) + if err != nil { + // EOF errors usually happen when HAProxy restarts, do not log. + if !errors.Is(err, io.EOF) { + log.Warning(err) + } + // Reset the connection. + h.Reset() + break + } + + h.handle(ev) + + if h.listener == nil { // just in case + break + } + } + } +} + +func (h *HAProxyEventListener) handle(ev runtime.Event) { + if !ev.Timestamp.After(h.lastEvent) { + // Event already seen! Skip. + log.Debugf("events: skipping already seen: '%s'", ev.String()) + return + } + h.lastEvent = ev.Timestamp + + log.Debugf("events: new: '%s'", ev.String()) + + category, rest, ok := strings.Cut(ev.Message, " ") + if !ok { + log.Warningf("failed to parse HAProxy Event: '%s'", ev.Message) + return + } + + if category == EventAcme { + h.handleAcmeEvent(rest) + return + } + + // Do not expect dataplaneapi to be able to handle all event types. + log.Debugf("unknown HAProxy Event type: '%s'", ev.Message) +} diff --git a/client-native/events_acme.go b/client-native/events_acme.go new file mode 100644 index 00000000..0a551b6c --- /dev/null +++ b/client-native/events_acme.go @@ -0,0 +1,95 @@ +// 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. +// + +package cn + +import ( + "errors" + "io" + "path/filepath" + "strings" + + "github.com/haproxytech/client-native/v6/configuration" + "github.com/haproxytech/dataplaneapi/log" +) + +const EventAcmeNewCert = "newcert" + +func (h *HAProxyEventListener) handleAcmeEvent(message string) { + name, args, ok := strings.Cut(message, " ") + if !ok { + log.Warningf("failed to parse ACME Event: '%s'", message) + return + } + + if name == EventAcmeNewCert { + h.handleAcmeNewCertEvent(args) + return + } + + log.Debugf("unknown ACME Event type: '%s'", message) +} + +// HAProxy has created a new certificate and needs dpapi to write it to Storage. +// ex: acme newcert foobar.pem.rsa +func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { + if len(args) == 0 { + log.Error("received HAProxy Event 'acme newcert' without a cert name") + return + } + + // Do not use the certificate name in args as a storage name. + // It could be an alias, or the user could have split keys and certs storage. + + crt, err := h.rt.ShowCertificate(args) + if err != nil { + log.Errorf("events: acme newcert %s: %s", args, err.Error()) + return + } + + storage, err := h.client.SSLCertStorage() + if err != nil { + log.Error(err) + return + } + + // 'dump ssl cert' can only be issued on sockets with level "admin". + pem, err := h.rt.DumpCertificate(crt.StorageName) + if err != nil { + log.Errorf("events: acme newcert %s: dump cert: %s", args, err.Error()) + return + } + + // The storage API only wants the filename, while the runtime API uses paths. + storageName := filepath.Base(crt.StorageName) + + // Create or Replace the certificate. + _, _, err = storage.Get(storageName) + if err != nil { + if errors.Is(err, configuration.ErrObjectDoesNotExist) { + rc := io.NopCloser(strings.NewReader(pem)) + _, _, err = storage.Create(storageName, rc) + } + } else { + _, err = storage.Replace(storageName, pem) + } + + if err != nil { + log.Errorf("events: acme newcert %s: storage: %s", args, err.Error()) + return + } + + log.Debugf("events: OK: acme newcert %s => %s", args, crt.StorageName) +} diff --git a/configure_data_plane.go b/configure_data_plane.go index c10f9307..a4b13b72 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -33,7 +33,7 @@ import ( "github.com/getkin/kin-openapi/openapi2" "github.com/getkin/kin-openapi/openapi2conv" "github.com/getkin/kin-openapi/openapi3" - "github.com/go-openapi/errors" + api_errors "github.com/go-openapi/errors" "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/swag" @@ -79,6 +79,7 @@ var ( AccLogger *log.Logger serverStartedCallback func() clientMutex sync.Mutex + eventListener *cn.HAProxyEventListener ) func SetServerStartedCallback(callFunc func()) { @@ -159,7 +160,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m // end overriding options with env variables // configure the api here - api.ServeError = errors.ServeError + api.ServeError = api_errors.ServeError // Set your custom logger if needed. Default one is log.Printf // Expected interface func(string, ...interface{}) @@ -192,6 +193,8 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m initDataplaneStorage(haproxyOptions.DataplaneStorageDir, client) + configureEventListener(clientCtx, client) + users := dataplaneapi_config.GetUsersStore() // this is not part of GetUsersStore(), // in case of reload we need to reread users @@ -1286,6 +1289,28 @@ func configureNativeClient(cyx context.Context, haproxyOptions dataplaneapi_conf return client } +func configureEventListener(ctx context.Context, client client_native.HAProxyClient) { + rt, err := client.Runtime() + if err != nil { + return + } + + if eventListener != nil { + err = eventListener.Reconfigure(ctx, rt) + if err != nil { + // Stop the listener if the new conf has no master socket. + log.Info("Stopping the EventListener:", err.Error()) + _ = eventListener.Stop() + } + } else { + // First start. + eventListener, err = cn.ListenHAProxyEvents(ctx, client) + if err != nil && err != cn.ErrNoMasterSocket && err != cn.ErrOldVersion { + log.Error("Failed to start HAProxy's event listener:", err.Error()) + } + } +} + func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os.Signal, client client_native.HAProxyClient, haproxyOptions dataplaneapi_config.HAProxyConfiguration, users *dataplaneapi_config.Users) { for { select { @@ -1299,6 +1324,7 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. log.Infof("Unable to reload Data Plane API: %s", err.Error()) } else { client.ReplaceRuntime(cn.ConfigureRuntimeClient(clientCtx, configuration, haproxyOptions)) + configureEventListener(clientCtx, client) log.Info("Reloaded Data Plane API") } } else if sig == syscall.SIGUSR2 { @@ -1340,6 +1366,9 @@ func startWatcher(ctx context.Context, client client_native.HAProxyClient, hapro reloadAgent.ReloadWithCallback(reconfigureFunc) } + // Reconfigure the event listener if needed. + configureEventListener(ctx, client) + // get the last configuration which has been updated by reloadConfigurationFile and increment version in config file. configuration, err := client.Configuration() if err != nil { diff --git a/go.mod b/go.mod index a102bc17..a8ff0b1b 100644 --- a/go.mod +++ b/go.mod @@ -43,6 +43,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 ) +replace github.com/haproxytech/client-native/v6 => ../client-native + 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 From a27e5146598475decb2df31520cd1d90a039915e Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 6 Aug 2025 15:19:58 +0200 Subject: [PATCH 06/42] MINOR: runtime: add handlers for ACME status and renew --- .aspell.yml | 3 + configure_data_plane.go | 4 + embedded_spec.go | 140 +++++++++++ generate/swagger/script.sh | 1 + handlers/acme_runtime.go | 62 +++++ operations/acme_runtime/get_acme_status.go | 86 +++++++ .../get_acme_status_parameters.go | 61 +++++ .../acme_runtime/get_acme_status_responses.go | 225 ++++++++++++++++++ .../get_acme_status_urlbuilder.go | 102 ++++++++ .../acme_runtime/renew_acme_certificate.go | 86 +++++++ .../renew_acme_certificate_parameters.go | 97 ++++++++ .../renew_acme_certificate_responses.go | 202 ++++++++++++++++ .../renew_acme_certificate_urlbuilder.go | 115 +++++++++ operations/data_plane_api.go | 25 ++ 14 files changed, 1209 insertions(+) create mode 100644 handlers/acme_runtime.go create mode 100644 operations/acme_runtime/get_acme_status.go create mode 100644 operations/acme_runtime/get_acme_status_parameters.go create mode 100644 operations/acme_runtime/get_acme_status_responses.go create mode 100644 operations/acme_runtime/get_acme_status_urlbuilder.go create mode 100644 operations/acme_runtime/renew_acme_certificate.go create mode 100644 operations/acme_runtime/renew_acme_certificate_parameters.go create mode 100644 operations/acme_runtime/renew_acme_certificate_responses.go create mode 100644 operations/acme_runtime/renew_acme_certificate_urlbuilder.go diff --git a/.aspell.yml b/.aspell.yml index 63b663af..eaad2422 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -37,3 +37,6 @@ allowed: - crt - ocsp - logrus + - backport + - dns + - newcert diff --git a/configure_data_plane.go b/configure_data_plane.go index a4b13b72..6dc9333b 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -893,6 +893,10 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.AcmeEditAcmeProviderHandler = &handlers.EditAcmeProviderHandler{Client: client, ReloadAgent: ra} api.AcmeDeleteAcmeProviderHandler = &handlers.DeleteAcmeProviderHandlerImpl{Client: client, ReloadAgent: ra} + // ACME runtime + api.AcmeRuntimeGetAcmeStatusHandler = &handlers.GetAcmeStatusHandlerImpl{Client: client} + api.AcmeRuntimeRenewAcmeCertificateHandler = &handlers.RenewAcmeCertificateHandlerImpl{Client: client} + // setup info handler api.InformationGetInfoHandler = &handlers.GetInfoHandlerImpl{SystemInfo: haproxyOptions.ShowSystemInfo, BuildTime: BuildTime, Version: Version} diff --git a/embedded_spec.go b/embedded_spec.go index 0bfd6ba0..ba6c7b4d 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -22044,6 +22044,58 @@ func init() { } } }, + "/services/haproxy/runtime/acme": { + "get": { + "description": "Returns the status of each managed ACME certificate.", + "tags": [ + "AcmeRuntime" + ], + "summary": "ACME Status", + "operationId": "getAcmeStatus", + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/acme_status" + } + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + }, + "put": { + "description": "Force renewal of an ACME certificate.", + "tags": [ + "AcmeRuntime" + ], + "summary": "Renew ACME certificate", + "operationId": "renewAcmeCertificate", + "parameters": [ + { + "type": "string", + "description": "Certificate file name", + "name": "certificate", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Operation started" + }, + "404": { + "$ref": "#/responses/NotFound" + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + } + }, "/services/haproxy/runtime/backends/{parent_name}/servers": { "get": { "description": "Returns an array of all servers' runtime settings.", @@ -78162,6 +78214,94 @@ func init() { } } }, + "/services/haproxy/runtime/acme": { + "get": { + "description": "Returns the status of each managed ACME certificate.", + "tags": [ + "AcmeRuntime" + ], + "summary": "ACME Status", + "operationId": "getAcmeStatus", + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/acme_status" + } + }, + "404": { + "description": "The specified resource was not found", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "default": { + "description": "General Error", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + } + } + }, + "put": { + "description": "Force renewal of an ACME certificate.", + "tags": [ + "AcmeRuntime" + ], + "summary": "Renew ACME certificate", + "operationId": "renewAcmeCertificate", + "parameters": [ + { + "type": "string", + "description": "Certificate file name", + "name": "certificate", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "Operation started" + }, + "404": { + "description": "The specified resource was not found", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "default": { + "description": "General Error", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + } + } + } + }, "/services/haproxy/runtime/backends/{parent_name}/servers": { "get": { "description": "Returns an array of all servers' runtime settings.", diff --git a/generate/swagger/script.sh b/generate/swagger/script.sh index 981858b3..d8c752cb 100755 --- a/generate/swagger/script.sh +++ b/generate/swagger/script.sh @@ -132,6 +132,7 @@ swagger generate server -f $SPEC_DIR/haproxy_spec.yaml \ --tags=SSLFrontUse \ --tags=SSLRuntime \ --tags=Acme \ + --tags=AcmeRuntime \ -r $SPEC_DIR/copyright.txt \ --template-dir generate/swagger/templates diff --git a/handlers/acme_runtime.go b/handlers/acme_runtime.go new file mode 100644 index 00000000..3cc900a9 --- /dev/null +++ b/handlers/acme_runtime.go @@ -0,0 +1,62 @@ +// 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. +// + +package handlers + +import ( + "github.com/go-openapi/runtime/middleware" + client_native "github.com/haproxytech/client-native/v6" + "github.com/haproxytech/dataplaneapi/misc" + "github.com/haproxytech/dataplaneapi/operations/acme_runtime" +) + +type GetAcmeStatusHandlerImpl struct { + Client client_native.HAProxyClient +} + +func (h *GetAcmeStatusHandlerImpl) Handle(params acme_runtime.GetAcmeStatusParams, principal interface{}) middleware.Responder { + rt, err := h.Client.Runtime() + if err != nil { + e := misc.HandleError(err) + return acme_runtime.NewGetAcmeStatusDefault(int(*e.Code)).WithPayload(e) + } + + status, err := rt.AcmeStatus() + if err != nil { + e := misc.HandleError(err) + return acme_runtime.NewGetAcmeStatusDefault(int(*e.Code)).WithPayload(e) + } + + return acme_runtime.NewGetAcmeStatusOK().WithPayload(status) +} + +type RenewAcmeCertificateHandlerImpl struct { + Client client_native.HAProxyClient +} + +func (h *RenewAcmeCertificateHandlerImpl) Handle(params acme_runtime.RenewAcmeCertificateParams, principal interface{}) middleware.Responder { + rt, err := h.Client.Runtime() + if err != nil { + e := misc.HandleError(err) + return acme_runtime.NewRenewAcmeCertificateDefault(int(*e.Code)).WithPayload(e) + } + + if err := rt.AcmeRenew(params.Certificate); err != nil { + e := misc.HandleError(err) + return acme_runtime.NewRenewAcmeCertificateDefault(int(*e.Code)).WithPayload(e) + } + + return acme_runtime.NewRenewAcmeCertificateOK() +} diff --git a/operations/acme_runtime/get_acme_status.go b/operations/acme_runtime/get_acme_status.go new file mode 100644 index 00000000..ce81bba2 --- /dev/null +++ b/operations/acme_runtime/get_acme_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// GetAcmeStatusHandlerFunc turns a function with the right signature into a get acme status handler +type GetAcmeStatusHandlerFunc func(GetAcmeStatusParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn GetAcmeStatusHandlerFunc) Handle(params GetAcmeStatusParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// GetAcmeStatusHandler interface for that can handle valid get acme status params +type GetAcmeStatusHandler interface { + Handle(GetAcmeStatusParams, interface{}) middleware.Responder +} + +// NewGetAcmeStatus creates a new http.Handler for the get acme status operation +func NewGetAcmeStatus(ctx *middleware.Context, handler GetAcmeStatusHandler) *GetAcmeStatus { + return &GetAcmeStatus{Context: ctx, Handler: handler} +} + +/* + GetAcmeStatus swagger:route GET /services/haproxy/runtime/acme AcmeRuntime getAcmeStatus + +# ACME Status + +Returns the status of each managed ACME certificate. +*/ +type GetAcmeStatus struct { + Context *middleware.Context + Handler GetAcmeStatusHandler +} + +func (o *GetAcmeStatus) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + *r = *rCtx + } + var Params = NewGetAcmeStatusParams() + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + *r = *aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc.(interface{}) // this is really a interface{}, I promise + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/operations/acme_runtime/get_acme_status_parameters.go b/operations/acme_runtime/get_acme_status_parameters.go new file mode 100644 index 00000000..1ba7da24 --- /dev/null +++ b/operations/acme_runtime/get_acme_status_parameters.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" +) + +// NewGetAcmeStatusParams creates a new GetAcmeStatusParams object +// +// There are no default values defined in the spec. +func NewGetAcmeStatusParams() GetAcmeStatusParams { + + return GetAcmeStatusParams{} +} + +// GetAcmeStatusParams contains all the bound params for the get acme status operation +// typically these are obtained from a http.Request +// +// swagger:parameters getAcmeStatus +type GetAcmeStatusParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewGetAcmeStatusParams() beforehand. +func (o *GetAcmeStatusParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/operations/acme_runtime/get_acme_status_responses.go b/operations/acme_runtime/get_acme_status_responses.go new file mode 100644 index 00000000..b574dcab --- /dev/null +++ b/operations/acme_runtime/get_acme_status_responses.go @@ -0,0 +1,225 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" + + "github.com/haproxytech/client-native/v6/models" +) + +// GetAcmeStatusOKCode is the HTTP code returned for type GetAcmeStatusOK +const GetAcmeStatusOKCode int = 200 + +/* +GetAcmeStatusOK Successful operation + +swagger:response getAcmeStatusOK +*/ +type GetAcmeStatusOK struct { + + /* + In: Body + */ + Payload models.AcmeStatus `json:"body,omitempty"` +} + +// NewGetAcmeStatusOK creates GetAcmeStatusOK with default headers values +func NewGetAcmeStatusOK() *GetAcmeStatusOK { + + return &GetAcmeStatusOK{} +} + +// WithPayload adds the payload to the get acme status o k response +func (o *GetAcmeStatusOK) WithPayload(payload models.AcmeStatus) *GetAcmeStatusOK { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the get acme status o k response +func (o *GetAcmeStatusOK) SetPayload(payload models.AcmeStatus) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *GetAcmeStatusOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.WriteHeader(200) + payload := o.Payload + if payload == nil { + // return empty array + payload = models.AcmeStatus{} + } + + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this + } +} + +// GetAcmeStatusNotFoundCode is the HTTP code returned for type GetAcmeStatusNotFound +const GetAcmeStatusNotFoundCode int = 404 + +/* +GetAcmeStatusNotFound The specified resource was not found + +swagger:response getAcmeStatusNotFound +*/ +type GetAcmeStatusNotFound struct { + /*Configuration file version + + */ + ConfigurationVersion string `json:"Configuration-Version"` + + /* + In: Body + */ + Payload *models.Error `json:"body,omitempty"` +} + +// NewGetAcmeStatusNotFound creates GetAcmeStatusNotFound with default headers values +func NewGetAcmeStatusNotFound() *GetAcmeStatusNotFound { + + return &GetAcmeStatusNotFound{} +} + +// WithConfigurationVersion adds the configurationVersion to the get acme status not found response +func (o *GetAcmeStatusNotFound) WithConfigurationVersion(configurationVersion string) *GetAcmeStatusNotFound { + o.ConfigurationVersion = configurationVersion + return o +} + +// SetConfigurationVersion sets the configurationVersion to the get acme status not found response +func (o *GetAcmeStatusNotFound) SetConfigurationVersion(configurationVersion string) { + o.ConfigurationVersion = configurationVersion +} + +// WithPayload adds the payload to the get acme status not found response +func (o *GetAcmeStatusNotFound) WithPayload(payload *models.Error) *GetAcmeStatusNotFound { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the get acme status not found response +func (o *GetAcmeStatusNotFound) SetPayload(payload *models.Error) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *GetAcmeStatusNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + // response header Configuration-Version + + configurationVersion := o.ConfigurationVersion + if configurationVersion != "" { + rw.Header().Set("Configuration-Version", configurationVersion) + } + + rw.WriteHeader(404) + if o.Payload != nil { + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this + } + } +} + +/* +GetAcmeStatusDefault General Error + +swagger:response getAcmeStatusDefault +*/ +type GetAcmeStatusDefault struct { + _statusCode int + /*Configuration file version + + */ + ConfigurationVersion string `json:"Configuration-Version"` + + /* + In: Body + */ + Payload *models.Error `json:"body,omitempty"` +} + +// NewGetAcmeStatusDefault creates GetAcmeStatusDefault with default headers values +func NewGetAcmeStatusDefault(code int) *GetAcmeStatusDefault { + if code <= 0 { + code = 500 + } + + return &GetAcmeStatusDefault{ + _statusCode: code, + } +} + +// WithStatusCode adds the status to the get acme status default response +func (o *GetAcmeStatusDefault) WithStatusCode(code int) *GetAcmeStatusDefault { + o._statusCode = code + return o +} + +// SetStatusCode sets the status to the get acme status default response +func (o *GetAcmeStatusDefault) SetStatusCode(code int) { + o._statusCode = code +} + +// WithConfigurationVersion adds the configurationVersion to the get acme status default response +func (o *GetAcmeStatusDefault) WithConfigurationVersion(configurationVersion string) *GetAcmeStatusDefault { + o.ConfigurationVersion = configurationVersion + return o +} + +// SetConfigurationVersion sets the configurationVersion to the get acme status default response +func (o *GetAcmeStatusDefault) SetConfigurationVersion(configurationVersion string) { + o.ConfigurationVersion = configurationVersion +} + +// WithPayload adds the payload to the get acme status default response +func (o *GetAcmeStatusDefault) WithPayload(payload *models.Error) *GetAcmeStatusDefault { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the get acme status default response +func (o *GetAcmeStatusDefault) SetPayload(payload *models.Error) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *GetAcmeStatusDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + // response header Configuration-Version + + configurationVersion := o.ConfigurationVersion + if configurationVersion != "" { + rw.Header().Set("Configuration-Version", configurationVersion) + } + + 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 + } + } +} diff --git a/operations/acme_runtime/get_acme_status_urlbuilder.go b/operations/acme_runtime/get_acme_status_urlbuilder.go new file mode 100644 index 00000000..e3612f41 --- /dev/null +++ b/operations/acme_runtime/get_acme_status_urlbuilder.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" +) + +// GetAcmeStatusURL generates an URL for the get acme status operation +type GetAcmeStatusURL struct { + _basePath string +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *GetAcmeStatusURL) WithBasePath(bp string) *GetAcmeStatusURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *GetAcmeStatusURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *GetAcmeStatusURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/services/haproxy/runtime/acme" + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/v3" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *GetAcmeStatusURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *GetAcmeStatusURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *GetAcmeStatusURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on GetAcmeStatusURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on GetAcmeStatusURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *GetAcmeStatusURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/operations/acme_runtime/renew_acme_certificate.go b/operations/acme_runtime/renew_acme_certificate.go new file mode 100644 index 00000000..318ee2de --- /dev/null +++ b/operations/acme_runtime/renew_acme_certificate.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// RenewAcmeCertificateHandlerFunc turns a function with the right signature into a renew acme certificate handler +type RenewAcmeCertificateHandlerFunc func(RenewAcmeCertificateParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn RenewAcmeCertificateHandlerFunc) Handle(params RenewAcmeCertificateParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// RenewAcmeCertificateHandler interface for that can handle valid renew acme certificate params +type RenewAcmeCertificateHandler interface { + Handle(RenewAcmeCertificateParams, interface{}) middleware.Responder +} + +// NewRenewAcmeCertificate creates a new http.Handler for the renew acme certificate operation +func NewRenewAcmeCertificate(ctx *middleware.Context, handler RenewAcmeCertificateHandler) *RenewAcmeCertificate { + return &RenewAcmeCertificate{Context: ctx, Handler: handler} +} + +/* + RenewAcmeCertificate swagger:route PUT /services/haproxy/runtime/acme AcmeRuntime renewAcmeCertificate + +# Renew ACME certificate + +Force renewal of an ACME certificate. +*/ +type RenewAcmeCertificate struct { + Context *middleware.Context + Handler RenewAcmeCertificateHandler +} + +func (o *RenewAcmeCertificate) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + *r = *rCtx + } + var Params = NewRenewAcmeCertificateParams() + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + *r = *aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc.(interface{}) // this is really a interface{}, I promise + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/operations/acme_runtime/renew_acme_certificate_parameters.go b/operations/acme_runtime/renew_acme_certificate_parameters.go new file mode 100644 index 00000000..7502ab8f --- /dev/null +++ b/operations/acme_runtime/renew_acme_certificate_parameters.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// NewRenewAcmeCertificateParams creates a new RenewAcmeCertificateParams object +// +// There are no default values defined in the spec. +func NewRenewAcmeCertificateParams() RenewAcmeCertificateParams { + + return RenewAcmeCertificateParams{} +} + +// RenewAcmeCertificateParams contains all the bound params for the renew acme certificate operation +// typically these are obtained from a http.Request +// +// swagger:parameters renewAcmeCertificate +type RenewAcmeCertificateParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Certificate file name + Required: true + In: query + */ + Certificate string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewRenewAcmeCertificateParams() beforehand. +func (o *RenewAcmeCertificateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + qs := runtime.Values(r.URL.Query()) + + qCertificate, qhkCertificate, _ := qs.GetOK("certificate") + if err := o.bindCertificate(qCertificate, qhkCertificate, route.Formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindCertificate binds and validates parameter Certificate from query. +func (o *RenewAcmeCertificateParams) bindCertificate(rawData []string, hasKey bool, formats strfmt.Registry) error { + if !hasKey { + return errors.Required("certificate", "query", rawData) + } + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // AllowEmptyValue: false + + if err := validate.RequiredString("certificate", "query", raw); err != nil { + return err + } + o.Certificate = raw + + return nil +} diff --git a/operations/acme_runtime/renew_acme_certificate_responses.go b/operations/acme_runtime/renew_acme_certificate_responses.go new file mode 100644 index 00000000..9796125e --- /dev/null +++ b/operations/acme_runtime/renew_acme_certificate_responses.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" + + "github.com/haproxytech/client-native/v6/models" +) + +// RenewAcmeCertificateOKCode is the HTTP code returned for type RenewAcmeCertificateOK +const RenewAcmeCertificateOKCode int = 200 + +/* +RenewAcmeCertificateOK Operation started + +swagger:response renewAcmeCertificateOK +*/ +type RenewAcmeCertificateOK struct { +} + +// NewRenewAcmeCertificateOK creates RenewAcmeCertificateOK with default headers values +func NewRenewAcmeCertificateOK() *RenewAcmeCertificateOK { + + return &RenewAcmeCertificateOK{} +} + +// WriteResponse to the client +func (o *RenewAcmeCertificateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(200) +} + +// RenewAcmeCertificateNotFoundCode is the HTTP code returned for type RenewAcmeCertificateNotFound +const RenewAcmeCertificateNotFoundCode int = 404 + +/* +RenewAcmeCertificateNotFound The specified resource was not found + +swagger:response renewAcmeCertificateNotFound +*/ +type RenewAcmeCertificateNotFound struct { + /*Configuration file version + + */ + ConfigurationVersion string `json:"Configuration-Version"` + + /* + In: Body + */ + Payload *models.Error `json:"body,omitempty"` +} + +// NewRenewAcmeCertificateNotFound creates RenewAcmeCertificateNotFound with default headers values +func NewRenewAcmeCertificateNotFound() *RenewAcmeCertificateNotFound { + + return &RenewAcmeCertificateNotFound{} +} + +// WithConfigurationVersion adds the configurationVersion to the renew acme certificate not found response +func (o *RenewAcmeCertificateNotFound) WithConfigurationVersion(configurationVersion string) *RenewAcmeCertificateNotFound { + o.ConfigurationVersion = configurationVersion + return o +} + +// SetConfigurationVersion sets the configurationVersion to the renew acme certificate not found response +func (o *RenewAcmeCertificateNotFound) SetConfigurationVersion(configurationVersion string) { + o.ConfigurationVersion = configurationVersion +} + +// WithPayload adds the payload to the renew acme certificate not found response +func (o *RenewAcmeCertificateNotFound) WithPayload(payload *models.Error) *RenewAcmeCertificateNotFound { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the renew acme certificate not found response +func (o *RenewAcmeCertificateNotFound) SetPayload(payload *models.Error) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *RenewAcmeCertificateNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + // response header Configuration-Version + + configurationVersion := o.ConfigurationVersion + if configurationVersion != "" { + rw.Header().Set("Configuration-Version", configurationVersion) + } + + rw.WriteHeader(404) + if o.Payload != nil { + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this + } + } +} + +/* +RenewAcmeCertificateDefault General Error + +swagger:response renewAcmeCertificateDefault +*/ +type RenewAcmeCertificateDefault struct { + _statusCode int + /*Configuration file version + + */ + ConfigurationVersion string `json:"Configuration-Version"` + + /* + In: Body + */ + Payload *models.Error `json:"body,omitempty"` +} + +// NewRenewAcmeCertificateDefault creates RenewAcmeCertificateDefault with default headers values +func NewRenewAcmeCertificateDefault(code int) *RenewAcmeCertificateDefault { + if code <= 0 { + code = 500 + } + + return &RenewAcmeCertificateDefault{ + _statusCode: code, + } +} + +// WithStatusCode adds the status to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) WithStatusCode(code int) *RenewAcmeCertificateDefault { + o._statusCode = code + return o +} + +// SetStatusCode sets the status to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) SetStatusCode(code int) { + o._statusCode = code +} + +// WithConfigurationVersion adds the configurationVersion to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) WithConfigurationVersion(configurationVersion string) *RenewAcmeCertificateDefault { + o.ConfigurationVersion = configurationVersion + return o +} + +// SetConfigurationVersion sets the configurationVersion to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) SetConfigurationVersion(configurationVersion string) { + o.ConfigurationVersion = configurationVersion +} + +// WithPayload adds the payload to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) WithPayload(payload *models.Error) *RenewAcmeCertificateDefault { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the renew acme certificate default response +func (o *RenewAcmeCertificateDefault) SetPayload(payload *models.Error) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *RenewAcmeCertificateDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + // response header Configuration-Version + + configurationVersion := o.ConfigurationVersion + if configurationVersion != "" { + rw.Header().Set("Configuration-Version", configurationVersion) + } + + 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 + } + } +} diff --git a/operations/acme_runtime/renew_acme_certificate_urlbuilder.go b/operations/acme_runtime/renew_acme_certificate_urlbuilder.go new file mode 100644 index 00000000..066aa985 --- /dev/null +++ b/operations/acme_runtime/renew_acme_certificate_urlbuilder.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2019 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. +// + +package acme_runtime + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" +) + +// RenewAcmeCertificateURL generates an URL for the renew acme certificate operation +type RenewAcmeCertificateURL struct { + Certificate string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *RenewAcmeCertificateURL) WithBasePath(bp string) *RenewAcmeCertificateURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *RenewAcmeCertificateURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *RenewAcmeCertificateURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/services/haproxy/runtime/acme" + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/v3" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + qs := make(url.Values) + + certificateQ := o.Certificate + if certificateQ != "" { + qs.Set("certificate", certificateQ) + } + + _result.RawQuery = qs.Encode() + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *RenewAcmeCertificateURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *RenewAcmeCertificateURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *RenewAcmeCertificateURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on RenewAcmeCertificateURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on RenewAcmeCertificateURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *RenewAcmeCertificateURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index b6697af8..9765b20d 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -37,6 +37,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations/acl" "github.com/haproxytech/dataplaneapi/operations/acl_runtime" "github.com/haproxytech/dataplaneapi/operations/acme" + "github.com/haproxytech/dataplaneapi/operations/acme_runtime" "github.com/haproxytech/dataplaneapi/operations/backend" "github.com/haproxytech/dataplaneapi/operations/backend_switching_rule" "github.com/haproxytech/dataplaneapi/operations/bind" @@ -772,6 +773,9 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { AcmeGetAcmeProvidersHandler: acme.GetAcmeProvidersHandlerFunc(func(params acme.GetAcmeProvidersParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation acme.GetAcmeProviders has not yet been implemented") }), + AcmeRuntimeGetAcmeStatusHandler: acme_runtime.GetAcmeStatusHandlerFunc(func(params acme_runtime.GetAcmeStatusParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation acme_runtime.GetAcmeStatus has not yet been implemented") + }), ACLGetAllACLBackendHandler: acl.GetAllACLBackendHandlerFunc(func(params acl.GetAllACLBackendParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation acl.GetAllACLBackend has not yet been implemented") }), @@ -1381,6 +1385,9 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { ConfigurationPostHAProxyConfigurationHandler: configuration.PostHAProxyConfigurationHandlerFunc(func(params configuration.PostHAProxyConfigurationParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation configuration.PostHAProxyConfiguration has not yet been implemented") }), + AcmeRuntimeRenewAcmeCertificateHandler: acme_runtime.RenewAcmeCertificateHandlerFunc(func(params acme_runtime.RenewAcmeCertificateParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation acme_runtime.RenewAcmeCertificate has not yet been implemented") + }), ServiceDiscoveryReplaceAWSRegionHandler: service_discovery.ReplaceAWSRegionHandlerFunc(func(params service_discovery.ReplaceAWSRegionParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation service_discovery.ReplaceAWSRegion has not yet been implemented") }), @@ -2251,6 +2258,8 @@ type DataPlaneAPI struct { AcmeGetAcmeProviderHandler acme.GetAcmeProviderHandler // AcmeGetAcmeProvidersHandler sets the operation handler for the get acme providers operation AcmeGetAcmeProvidersHandler acme.GetAcmeProvidersHandler + // AcmeRuntimeGetAcmeStatusHandler sets the operation handler for the get acme status operation + AcmeRuntimeGetAcmeStatusHandler acme_runtime.GetAcmeStatusHandler // ACLGetAllACLBackendHandler sets the operation handler for the get all Acl backend operation ACLGetAllACLBackendHandler acl.GetAllACLBackendHandler // ACLGetAllACLDefaultsHandler sets the operation handler for the get all Acl defaults operation @@ -2657,6 +2666,8 @@ type DataPlaneAPI struct { ClusterPostClusterHandler cluster.PostClusterHandler // ConfigurationPostHAProxyConfigurationHandler sets the operation handler for the post h a proxy configuration operation ConfigurationPostHAProxyConfigurationHandler configuration.PostHAProxyConfigurationHandler + // AcmeRuntimeRenewAcmeCertificateHandler sets the operation handler for the renew acme certificate operation + AcmeRuntimeRenewAcmeCertificateHandler acme_runtime.RenewAcmeCertificateHandler // ServiceDiscoveryReplaceAWSRegionHandler sets the operation handler for the replace a w s region operation ServiceDiscoveryReplaceAWSRegionHandler service_discovery.ReplaceAWSRegionHandler // ACLReplaceACLBackendHandler sets the operation handler for the replace Acl backend operation @@ -3645,6 +3656,9 @@ func (o *DataPlaneAPI) Validate() error { if o.AcmeGetAcmeProvidersHandler == nil { unregistered = append(unregistered, "acme.GetAcmeProvidersHandler") } + if o.AcmeRuntimeGetAcmeStatusHandler == nil { + unregistered = append(unregistered, "acme_runtime.GetAcmeStatusHandler") + } if o.ACLGetAllACLBackendHandler == nil { unregistered = append(unregistered, "acl.GetAllACLBackendHandler") } @@ -4254,6 +4268,9 @@ func (o *DataPlaneAPI) Validate() error { if o.ConfigurationPostHAProxyConfigurationHandler == nil { unregistered = append(unregistered, "configuration.PostHAProxyConfigurationHandler") } + if o.AcmeRuntimeRenewAcmeCertificateHandler == nil { + unregistered = append(unregistered, "acme_runtime.RenewAcmeCertificateHandler") + } if o.ServiceDiscoveryReplaceAWSRegionHandler == nil { unregistered = append(unregistered, "service_discovery.ReplaceAWSRegionHandler") } @@ -5596,6 +5613,10 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } + o.handlers["GET"]["/services/haproxy/runtime/acme"] = acme_runtime.NewGetAcmeStatus(o.context, o.AcmeRuntimeGetAcmeStatusHandler) + if o.handlers["GET"] == nil { + o.handlers["GET"] = make(map[string]http.Handler) + } o.handlers["GET"]["/services/haproxy/configuration/backends/{parent_name}/acls"] = acl.NewGetAllACLBackend(o.context, o.ACLGetAllACLBackendHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) @@ -6408,6 +6429,10 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } + o.handlers["PUT"]["/services/haproxy/runtime/acme"] = acme_runtime.NewRenewAcmeCertificate(o.context, o.AcmeRuntimeRenewAcmeCertificateHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } o.handlers["PUT"]["/service_discovery/aws/{id}"] = service_discovery.NewReplaceAWSRegion(o.context, o.ServiceDiscoveryReplaceAWSRegionHandler) if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) From 1d6cda16d86fcbe5e279da32b6011d192253678c Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Fri, 8 Aug 2025 14:14:30 +0200 Subject: [PATCH 07/42] TEST/MEDIUM: acme: add test infrastructure and HTTP-01 testing --- e2e/fixtures/pebble/README.md | 25 ++++++ e2e/fixtures/pebble/localhost/README.md | 5 ++ e2e/fixtures/pebble/localhost/cert.pem | 19 ++++ e2e/fixtures/pebble/localhost/key.pem | 27 ++++++ e2e/fixtures/pebble/pebble-config.json | 26 ++++++ e2e/fixtures/pebble/pebble.minica.key.pem | 27 ++++++ e2e/fixtures/pebble/pebble.minica.pem | 19 ++++ e2e/libs/acme.bash | 71 +++++++++++++++ e2e/libs/cleanup.bash | 3 + e2e/libs/haproxy_config_setup.bash | 17 ++-- e2e/run.bash | 5 ++ .../container/var/lib/haproxy/haproxy.pem | 86 +++++++++++++++++++ e2e/tests/runtime_acme/data/haproxy.cfg | 54 ++++++++++++ e2e/tests/runtime_acme/tests.bats | 54 ++++++++++++ 14 files changed, 431 insertions(+), 7 deletions(-) create mode 100644 e2e/fixtures/pebble/README.md create mode 100644 e2e/fixtures/pebble/localhost/README.md create mode 100644 e2e/fixtures/pebble/localhost/cert.pem create mode 100644 e2e/fixtures/pebble/localhost/key.pem create mode 100644 e2e/fixtures/pebble/pebble-config.json create mode 100644 e2e/fixtures/pebble/pebble.minica.key.pem create mode 100644 e2e/fixtures/pebble/pebble.minica.pem create mode 100644 e2e/libs/acme.bash create mode 100644 e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem create mode 100644 e2e/tests/runtime_acme/data/haproxy.cfg create mode 100644 e2e/tests/runtime_acme/tests.bats diff --git a/e2e/fixtures/pebble/README.md b/e2e/fixtures/pebble/README.md new file mode 100644 index 00000000..7cde76f5 --- /dev/null +++ b/e2e/fixtures/pebble/README.md @@ -0,0 +1,25 @@ +# certs/ + +This directory contains a CA certificate (`pebble.minica.pem`) and a private key +(`pebble.minica.key.pem`) that are used to issue a end-entity certificate (See +`certs/localhost`) for the Pebble HTTPS server. + +To get your **testing code** to use Pebble without HTTPS errors you should +configure your ACME client to trust the `pebble.minica.pem` CA certificate. Your +ACME client should offer a runtime option to specify a list of root CAs that you +can configure to include the `pebble.minica.pem` file. + +**Do not** add this CA certificate to the system trust store or in production +code!!! The CA's private key is **public** and anyone can use it to issue +certificates that will be trusted by a system with the Pebble CA in the trust +store. + +To re-create all of the Pebble certificates run: + + minica -ca-cert pebble.minica.pem \ + -ca-key pebble.minica.key.pem \ + -domains localhost,pebble \ + -ip-addresses 127.0.0.1 + +From the `test/certs/` directory after [installing +MiniCA](https://github.com/jsha/minica#installation) diff --git a/e2e/fixtures/pebble/localhost/README.md b/e2e/fixtures/pebble/localhost/README.md new file mode 100644 index 00000000..efa49ae2 --- /dev/null +++ b/e2e/fixtures/pebble/localhost/README.md @@ -0,0 +1,5 @@ +# certs/localhost + +This directory contains an end-entity (leaf) certificate (`cert.pem`) and +a private key (`key.pem`) for the Pebble HTTPS server. It includes `127.0.0.1` +as an IP address SAN, and `[localhost, pebble]` as DNS SANs. diff --git a/e2e/fixtures/pebble/localhost/cert.pem b/e2e/fixtures/pebble/localhost/cert.pem new file mode 100644 index 00000000..2866a2b4 --- /dev/null +++ b/e2e/fixtures/pebble/localhost/cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDGzCCAgOgAwIBAgIIbEfayDFsBtwwDQYJKoZIhvcNAQELBQAwIDEeMBwGA1UE +AxMVbWluaWNhIHJvb3QgY2EgMjRlMmRiMCAXDTE3MTIwNjE5NDIxMFoYDzIxMDcx +MjA2MTk0MjEwWjAUMRIwEAYDVQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCbFMW3DXXdErvQf2lCZ0qz0DGEWadDoF0O2neM5mVa +VQ7QGW0xc5Qwvn3Tl62C0JtwLpF0pG2BICIN+DHdVaIUwkf77iBS2doH1I3waE1I +8GkV9JrYmFY+j0dA1SwBmqUZNXhLNwZGq1a91nFSI59DZNy/JciqxoPX2K++ojU2 +FPpuXe2t51NmXMsszpa+TDqF/IeskA9A/ws6UIh4Mzhghx7oay2/qqj2IIPjAmJj +i73kdUvtEry3wmlkBvtVH50+FscS9WmPC5h3lDTk5nbzSAXKuFusotuqy3XTgY5B +PiRAwkZbEY43JNfqenQPHo7mNTt29i+NVVrBsnAa5ovrAgMBAAGjYzBhMA4GA1Ud +DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0T +AQH/BAIwADAiBgNVHREEGzAZgglsb2NhbGhvc3SCBnBlYmJsZYcEfwAAATANBgkq +hkiG9w0BAQsFAAOCAQEAYIkXff8H28KS0KyLHtbbSOGU4sujHHVwiVXSATACsNAE +D0Qa8hdtTQ6AUqA6/n8/u1tk0O4rPE/cTpsM3IJFX9S3rZMRsguBP7BSr1Lq/XAB +7JP/CNHt+Z9aKCKcg11wIX9/B9F7pyKM3TdKgOpqXGV6TMuLjg5PlYWI/07lVGFW +/mSJDRs8bSCFmbRtEqc4lpwlrpz+kTTnX6G7JDLfLWYw/xXVqwFfdengcDTHCc8K +wtgGq/Gu6vcoBxIO3jaca+OIkMfxxXmGrcNdseuUCa3RMZ8Qy03DqGu6Y6XQyK4B +W8zIG6H9SVKkAznM2yfYhW8v2ktcaZ95/OBHY97ZIw== +-----END CERTIFICATE----- diff --git a/e2e/fixtures/pebble/localhost/key.pem b/e2e/fixtures/pebble/localhost/key.pem new file mode 100644 index 00000000..66be6daa --- /dev/null +++ b/e2e/fixtures/pebble/localhost/key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAmxTFtw113RK70H9pQmdKs9AxhFmnQ6BdDtp3jOZlWlUO0Blt +MXOUML5905etgtCbcC6RdKRtgSAiDfgx3VWiFMJH++4gUtnaB9SN8GhNSPBpFfSa +2JhWPo9HQNUsAZqlGTV4SzcGRqtWvdZxUiOfQ2TcvyXIqsaD19ivvqI1NhT6bl3t +redTZlzLLM6Wvkw6hfyHrJAPQP8LOlCIeDM4YIce6Gstv6qo9iCD4wJiY4u95HVL +7RK8t8JpZAb7VR+dPhbHEvVpjwuYd5Q05OZ280gFyrhbrKLbqst104GOQT4kQMJG +WxGONyTX6np0Dx6O5jU7dvYvjVVawbJwGuaL6wIDAQABAoIBAGW9W/S6lO+DIcoo +PHL+9sg+tq2gb5ZzN3nOI45BfI6lrMEjXTqLG9ZasovFP2TJ3J/dPTnrwZdr8Et/ +357YViwORVFnKLeSCnMGpFPq6YEHj7mCrq+YSURjlRhYgbVPsi52oMOfhrOIJrEG +ZXPAwPRi0Ftqu1omQEqz8qA7JHOkjB2p0i2Xc/uOSJccCmUDMlksRYz8zFe8wHuD +XvUL2k23n2pBZ6wiez6Xjr0wUQ4ESI02x7PmYgA3aqF2Q6ECDwHhjVeQmAuypMF6 +IaTjIJkWdZCW96pPaK1t+5nTNZ+Mg7tpJ/PRE4BkJvqcfHEOOl6wAE8gSk5uVApY +ZRKGmGkCgYEAzF9iRXYo7A/UphL11bR0gqxB6qnQl54iLhqS/E6CVNcmwJ2d9pF8 +5HTfSo1/lOXT3hGV8gizN2S5RmWBrc9HBZ+dNrVo7FYeeBiHu+opbX1X/C1HC0m1 +wJNsyoXeqD1OFc1WbDpHz5iv4IOXzYdOdKiYEcTv5JkqE7jomqBLQk8CgYEAwkG/ +rnwr4ThUo/DG5oH+l0LVnHkrJY+BUSI33g3eQ3eM0MSbfJXGT7snh5puJW0oXP7Z +Gw88nK3Vnz2nTPesiwtO2OkUVgrIgWryIvKHaqrYnapZHuM+io30jbZOVaVTMR9c +X/7/d5/evwXuP7p2DIdZKQKKFgROm1XnhNqVgaUCgYBD/ogHbCR5RVsOVciMbRlG +UGEt3YmUp/vfMuAsKUKbT2mJM+dWHVlb+LZBa4pC06QFgfxNJi/aAhzSGvtmBEww +xsXbaceauZwxgJfIIUPfNZCMSdQVIVTi2Smcx6UofBz6i/Jw14MEwlvhamaa7qVf +kqflYYwelga1wRNCPopLaQKBgQCWsZqZKQqBNMm0Q9yIhN+TR+2d7QFjqeePoRPl +1qxNejhq25ojE607vNv1ff9kWUGuoqSZMUC76r6FQba/JoNbefI4otd7x/GzM9uS +8MHMJazU4okwROkHYwgLxxkNp6rZuJJYheB4VDTfyyH/ng5lubmY7rdgTQcNyZ5I +majRYQKBgAMKJ3RlII0qvAfNFZr4Y2bNIq+60Z+Qu2W5xokIHCFNly3W1XDDKGFe +CCPHSvQljinke3P9gPt2HVdXxcnku9VkTti+JygxuLkVg7E0/SWwrWfGsaMJs+84 +fK+mTZay2d3v24r9WKEKwLykngYPyZw5+BdWU0E+xx5lGUd3U4gG +-----END RSA PRIVATE KEY----- diff --git a/e2e/fixtures/pebble/pebble-config.json b/e2e/fixtures/pebble/pebble-config.json new file mode 100644 index 00000000..af79b396 --- /dev/null +++ b/e2e/fixtures/pebble/pebble-config.json @@ -0,0 +1,26 @@ +{ + "pebble": { + "listenAddress": "0.0.0.0:14000", + "managementListenAddress": "0.0.0.0:15000", + "certificate": "/mnt/localhost/cert.pem", + "privateKey": "/mnt/localhost/key.pem", + "httpPort": 1080, + "tlsPort": 1443, + "ocspResponderURL": "", + "externalAccountBindingRequired": false, + "retryAfter": { + "authz": 1, + "order": 1 + }, + "profiles": { + "default": { + "description": "The profile you know and love", + "validityPeriod": 7776000 + }, + "shortlived": { + "description": "A short-lived cert profile, without actual enforcement", + "validityPeriod": 518400 + } + } + } +} diff --git a/e2e/fixtures/pebble/pebble.minica.key.pem b/e2e/fixtures/pebble/pebble.minica.key.pem new file mode 100644 index 00000000..6a7fcd9d --- /dev/null +++ b/e2e/fixtures/pebble/pebble.minica.key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAuVoGTaFSWp3Y+N5JC8lOdL8wmWpaM73UaNzhYiqA7ZqijzVk +TTtoQvQFDcUwyXKOdWHONrv1ld3z224Us504jjlbZwI5uoquCOZ2WJbRhmXrRgzk +Fq+/MtoFmPkhtO/DLjjtocgyIirVXN8Yl2APvB5brvRfCm6kktYeecsWfW/O3ikf +gdM7tmocwQiBypiloHOjdd5e2g8cWNw+rqvILSUVNLaLpsi23cxnLqVb424wz9dZ +5dO0REg1gSxtf4N5LSb6iGuAVoFNhzIeKzQ+svDg9x8tx/DGOghJS/jDgmxSY1qo +bTsXhcmWVfat5GJ5PQgLkCSjBBrjeBlOrc4VtQIDAQABAoIBAQCAoRoou6C0ZEDU +DScyN8TrvlcS0LzClaWYFFmRT5/jxOG1cr8l3elwNXpgYQ2Hb6mvim2ajHxVQg/e +oxlYwO4jvWhSJzg63c0DPjS5LAlCNO6+0Wlk2RheSPGDhLlAoPeZ10YKdS1dis5B +Qk4Fl1O0IHlOBCcEzV4GzPOfYDI+X6/f4xY7qz1s+CgoIxjIeiG+1/WpZQpYhobY +7CfSDdYDKtksXi7iQkc5earUAHBqZ1gQTq6e5LVm9AjRzENhMctFgcPs5zOjp2ak +PluixrA8LTAfu9wQzvxDkPl0UarZVxCerw6nlAziILpQ+U6PtoPZj49VpntTc+cq +1qjzkbhBAoGBANElJmFWY2X6LgBpszeqt0ZOSbkFg2bC0wHCJrMlRzUMEn83w9e8 +Z2Fqml9eCC5qxJcyxWDVQeoAX6090m0qgP8xNmGdafcVic2cUlrqtkqhhst2OHCO +MCQEB7cdsjiidNNrOgLbQ3i1bYID8BVLf/TDhEbRgvTewDaz6XPdoSIRAoGBAOLg +RuOec5gn50SrVycx8BLFO8AXjXojpZb1Xg26V5miz1IavSfDcgae/699ppSz+UWi +jGMFr/PokY2JxDVs3PyQLu7ahMzyFHr16Agvp5g5kq056XV+uI/HhqLHOWSQ09DS +1Vrj7FOYpKRzge3/AC7ty9Vr35uMiebpm4/CLFVlAoGALnsIJZfSbWaFdLgJCXUa +WDir77/G7T6dMIXanfPJ+IMfVUCqeLa5bxAHEOzP+qjl2giBjzy18nB00warTnGk +y5I/WMBoPW5++sAkGWqSatGtKGi0sGcZUdfHcy3ZXvbT6eyprtrWCuyfUsbXQ5RM +8rPFIQwNA6jBpSak2ohF+FECgYEAn+6IKncNd6pRfnfmdSvf1+uPxkcUJZCxb2xC +xByjGhvKWE+fHkPJwt8c0SIbZuJEC5Gds0RUF/XPfV4roZm/Yo9ldl02lp7kTxXA +XtzxIP8c5d5YM8qD4l8+Csu0Kq9pkeC+JFddxkRpc8A1TIehInPhZ+6mb6mvoMb3 +MW0pAX0CgYATT74RYuIYWZvx0TK4ZXIKTw2i6HObLF63Y6UwyPXXdEVie/ToYRNH +JIxE1weVpHvnHZvVD6D3yGk39ZsCIt31VvKpatWXlWBm875MbBc6kuIGsYT+mSSj +y9TXaE89E5zfL27nZe15QLJ+Xw8Io6PMLZ/jtC5TYoEixSZ9J8v6HA== +-----END RSA PRIVATE KEY----- diff --git a/e2e/fixtures/pebble/pebble.minica.pem b/e2e/fixtures/pebble/pebble.minica.pem new file mode 100644 index 00000000..a69a4c41 --- /dev/null +++ b/e2e/fixtures/pebble/pebble.minica.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDCTCCAfGgAwIBAgIIJOLbes8sTr4wDQYJKoZIhvcNAQELBQAwIDEeMBwGA1UE +AxMVbWluaWNhIHJvb3QgY2EgMjRlMmRiMCAXDTE3MTIwNjE5NDIxMFoYDzIxMTcx +MjA2MTk0MjEwWjAgMR4wHAYDVQQDExVtaW5pY2Egcm9vdCBjYSAyNGUyZGIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5WgZNoVJandj43kkLyU50vzCZ +alozvdRo3OFiKoDtmqKPNWRNO2hC9AUNxTDJco51Yc42u/WV3fPbbhSznTiOOVtn +Ajm6iq4I5nZYltGGZetGDOQWr78y2gWY+SG078MuOO2hyDIiKtVc3xiXYA+8Hluu +9F8KbqSS1h55yxZ9b87eKR+B0zu2ahzBCIHKmKWgc6N13l7aDxxY3D6uq8gtJRU0 +toumyLbdzGcupVvjbjDP11nl07RESDWBLG1/g3ktJvqIa4BWgU2HMh4rND6y8OD3 +Hy3H8MY6CElL+MOCbFJjWqhtOxeFyZZV9q3kYnk9CAuQJKMEGuN4GU6tzhW1AgMB +AAGjRTBDMA4GA1UdDwEB/wQEAwIChDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB +BQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADANBgkqhkiG9w0BAQsFAAOCAQEAF85v +d40HK1ouDAtWeO1PbnWfGEmC5Xa478s9ddOd9Clvp2McYzNlAFfM7kdcj6xeiNhF +WPIfaGAi/QdURSL/6C1KsVDqlFBlTs9zYfh2g0UXGvJtj1maeih7zxFLvet+fqll +xseM4P9EVJaQxwuK/F78YBt0tCNfivC6JNZMgxKF59h0FBpH70ytUSHXdz7FKwix +Mfn3qEb9BXSk0Q3prNV5sOV3vgjEtB4THfDxSz9z3+DepVnW3vbbqwEbkXdk3j82 +2muVldgOUgTwK8eT+XdofVdntzU/kzygSAtAQwLJfn51fS1GvEcYGBc1bDryIqmF +p9BI7gVKtWSZYegicA== +-----END CERTIFICATE----- diff --git a/e2e/libs/acme.bash b/e2e/libs/acme.bash new file mode 100644 index 00000000..c81499d7 --- /dev/null +++ b/e2e/libs/acme.bash @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# +# 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. +# + +# This module will launch 2 extra containers needed for ACME tests: +# - pebble - the "official" ACME test server from LetsEncrypt +# - challserv - pebble's companion used to fake DNS challenges +# +# Those containers can be accessed via their respective variables: +# - ACME_DIR_CONTAINER_NAME=pebble +# - ACME_DNS_CONTAINER_NAME=challtestsrv + +load '../../libs/haproxy_version' + +# ACME is available starting with HAProxy 3.2, +# but became compatible with pebble in version 3.3. +ACME=false +if haproxy_version_ge 3.3; then + ACME=true + ACME_DIR_CONTAINER_NAME=pebble + ACME_DNS_CONTAINER_NAME=challtestsrv + PEBBLE_IMAGE="ghcr.io/letsencrypt/pebble:latest" + CHALLTESTSRV_IMAGE="ghcr.io/letsencrypt/pebble-challtestsrv:latest" +fi + +setup_file() { + $ACME || return 0 + + echo '>>> Setting up ACME challtestsrv' >&3 + # Start challtestsrv -- https://github.com/letsencrypt/pebble/blob/main/cmd/pebble-challtestsrv/README.md + docker pull "$CHALLTESTSRV_IMAGE" >/dev/null + docker run -d --name "$ACME_DNS_CONTAINER_NAME" --net "$DOCKER_NETWORK" \ + -p 5001:5001 -p 5002:5002 -p 5003:5003 -p 8053:8053 -p 8055:8055 \ + "$CHALLTESTSRV_IMAGE" + + echo '>>> Setting up ACME directory: pebble' >&3 + docker pull "$PEBBLE_IMAGE" >/dev/null + docker run -d --name "$ACME_DIR_CONTAINER_NAME" --net "$DOCKER_NETWORK" \ + -p 14000:14000 -p 15000:15000 -v "${E2E_DIR}/fixtures/pebble:/mnt:ro" \ + -e PEBBLE_VA_NOSLEEP=1 -e PEBBLE_VA_ALWAYS_VALID=1 -e PEBBLE_WFE_NONCEREJECT=0 \ + "$PEBBLE_IMAGE" -config /mnt/pebble-config.json -strict -dnsserver $ACME_DNS_CONTAINER_NAME:8053 + sleep 1 + + # Allow HAProxy's HTTPS client to connect to Pebble (the fake ACME server) + docker cp "${E2E_DIR}/fixtures/pebble/pebble.minica.pem" ${DOCKER_CONTAINER_NAME}:/var/lib/haproxy/pebble.minica.pem +} + +teardown_file() { + $ACME || return 0 + + for c in "$ACME_DIR_CONTAINER_NAME" "$ACME_DNS_CONTAINER_NAME"; do + echo ">>> Shutting down ACME container $c" >&3 + mkdir -p "$E2E_DIR/logs" + docker logs "$c" &> "$E2E_DIR/logs/$c.log" + docker stop "$c" + docker rm -f "$c" + done +} diff --git a/e2e/libs/cleanup.bash b/e2e/libs/cleanup.bash index 2e90607f..312b6b0c 100644 --- a/e2e/libs/cleanup.bash +++ b/e2e/libs/cleanup.bash @@ -19,4 +19,7 @@ function cleanup() { echo ">>> Stopping ${1} docker container" docker stop "$1" > /dev/null docker rm "$1" > /dev/null + + echo ">>> Removing docker network $DOCKER_NETWORK" + docker network rm "$DOCKER_NETWORK" >/dev/null } diff --git a/e2e/libs/haproxy_config_setup.bash b/e2e/libs/haproxy_config_setup.bash index e0419555..2c988246 100644 --- a/e2e/libs/haproxy_config_setup.bash +++ b/e2e/libs/haproxy_config_setup.bash @@ -63,6 +63,7 @@ setup() { if [ -f "${BATS_TEST_DIRNAME}/dataplaneapi.yaml" ]; then run docker cp "${BATS_TEST_DIRNAME}/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/etc/haproxy/dataplaneapi.yaml" else + # TODO: we should respect $VARIANT here run docker cp "${E2E_DIR}/fixtures/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/etc/haproxy/dataplaneapi.yaml" fi assert_success @@ -75,15 +76,17 @@ setup() { run dpa_docker_exec 'kill -s 12 1' assert_success - run dpa_docker_exec 'pkill -9 dataplaneapi' - assert_success + if [ -z "$DONT_RESTART_DPAPI" ]; then + run dpa_docker_exec 'pkill -9 dataplaneapi' + assert_success - if [ -x "${BATS_TEST_DIRNAME}/custom_dataplane_launch.sh" ]; then - run "${BATS_TEST_DIRNAME}/custom_dataplane_launch.sh" - else - run docker exec -d ${DOCKER_CONTAINER_NAME} /bin/sh -c "CI_DATAPLANE_RELOAD_DELAY_OVERRIDE=1 dataplaneapi -f /etc/haproxy/dataplaneapi.yaml" + if [ -x "${BATS_TEST_DIRNAME}/custom_dataplane_launch.sh" ]; then + run "${BATS_TEST_DIRNAME}/custom_dataplane_launch.sh" + else + run docker exec -d ${DOCKER_CONTAINER_NAME} /bin/sh -c "CI_DATAPLANE_RELOAD_DELAY_OVERRIDE=1 dataplaneapi -f /etc/haproxy/dataplaneapi.yaml" + fi + assert_success fi - assert_success local restart_retry_count=0 diff --git a/e2e/run.bash b/e2e/run.bash index 434fae7f..be815c8a 100755 --- a/e2e/run.bash +++ b/e2e/run.bash @@ -22,6 +22,7 @@ HAPROXY_VERSION=${HAPROXY_VERSION:-3.2} DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-debian}:${HAPROXY_VERSION}" DOCKER_CONTAINER_NAME="dataplaneapi-e2e" export DOCKER_CONTAINER_NAME +export DOCKER_NETWORK="dpapi-e2e-$$-$RANDOM" ROOT_DIR=$(git rev-parse --show-toplevel) export E2E_PORT=${E2E_PORT:-8042} @@ -50,6 +51,9 @@ if [ ! -z $PREWIPE ] && [ "$PREWIPE" == "y" ]; then cleanup ${DOCKER_CONTAINER_NAME} fi +echo ">>> Creating docker network $DOCKER_NETWORK" +docker network create "$DOCKER_NETWORK" + # Custom configuration to run tests with the master socket. IFS='.' read -ra version_parts <<< "$HAPROXY_VERSION" major="${version_parts[0]}" @@ -67,6 +71,7 @@ else echo '>>> Provisioning the e2e environment' docker create \ --name ${DOCKER_CONTAINER_NAME} \ + --net "$DOCKER_NETWORK" \ --publish "${E2E_PORT}":8080 \ --security-opt seccomp=unconfined \ --env CI_DATAPLANE_RELOAD_DELAY_OVERRIDE=1 \ diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem new file mode 100644 index 00000000..95455ae6 --- /dev/null +++ b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem @@ -0,0 +1,86 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCo55THv+XIARRP +Avj1tO3I6gI96/wCx4uOXwZlmQ+wG42M6a2IF4U1eXFfyvIoqqwGoEeFhP71+3tA +bJ5We18oRkEG6CcR35J2UiRxgt3zkvnGBxkoMpWpGP0L/w+WZkw86CAbR9eRf/zB +LOUfKqAXzatXfqdvlfQxF1OjeU6CemcBpPNxHkML73FBRgVezkhj2q0Rdo5sn9TF +b7/nO6biXrV1s4Rkv5Jf70zCKQKIHGNttM0RR13AcDEuY2pqawxVuDTECqlGNMKg +XOc2XKu9OQ1aLytyCKNxwPGC+Ugf9Tu9TD/U0eviUtMCDqn/c4wTa7vVyR7wA4+R +NFPHFwTTxCVkTuAiaU2zaTLGM/sNt8oFu/FXSeTVnnivAwDRtBIRwolw1ZQezDVb +uYKPfSScJ3LvkuBFPfR0Sbhvp5eJ0Ls5yQvXcYurs1BK1SVrS+UFadn5zOwlOOYW +6Q6vw4uVSD5m71eSBEkSy74l1kEiIPzkST6KPlEOOj3g/00YCaRNld/O84hL1O7q +8gS7yyd5viveGd0bDEMjKLnXgEJO6dsCx+mRq1oSNqNvdVFJLMAFHoHRTd/c10uE +Pse2aas1prAy27ocpBpKFo1r8/xivf8iTbl4ymlnWTM5T0mxW0eOqESQrhEO8Slf +nIAxePOOJBbjKDucMLzke4LsHv+FPQIDAQABAoICABFvsrq6MzDl96A+eM/4qRF0 +It4clev9iIkegy0K04VFGuRAnVLuxqgiDNOsQjpzgAXBFxEQDTf8iZk5fVEFNGoW +cpERdzMPpvGDAlMbhOkns5Q/WFf/fNazhy/tWUEX92fUOLhIPtc85K1WgqKohlVe +vIDwSL2qt8Y3l8FI/RNYKnkPe7giPR6mzcTEwzopxmxUf0hNul85UsA9DI0E6fH1 +f/sSGKlD44r2y7BBhorhj1wcbY0KloGOs20MA0jQGzpgJUZVqWrfeHYQkSfaAjqr +AJdeRjhj7ueH2QbB0DHIYa3liLNiJl07WqAcPm1qErxQg1gLBqAVZgVB5yIm3K8K +x/pDmXuhfstSlxU3ofBqbgp1tyE1zgOrlGToLr5PjpoY1q+H672Lq47/aL2ZNmKt +QuEiNDJs4eQj5oOERZG2ySPOnzK9B01IHYKYuh111noFl1j63JN958X5tqQYH4wW +f6b5oF/4M5aM/TFBxcBrnCWOFBLZln4BJhdouH6w+HqaOMIMFTKVLJGzJ7EOMoKP +XL61Pz/SrOa+UVn+ufTJ9/YICQeRyEjV2zf1DVYQhIqrgj+DQqMCMAM/USJp0Up7 +RF/x8Y14HqvlqtXdnlY5aVt/fFxkAnQkUDCYHcGxk9rl9nD4w80MeRI0smjLyrft +XdZ216HKVcYeCG3e0+zhAoIBAQDe2FIIzUTOs4WJlXlWuKQ2K83knx1UKhQp7qbr +hWCGD2YdHOaVcNOCYSbIaJTplKvca+1i42wT0/EeGo94nlM1QGbdSoyRFXpaFcXa +XXrN32xPXljRcvzaFmzg7yfhL382d40mcuyaz6cCvczQZJm/MOoYxV5rANBFZo5W +fhhroXNMUQ3QxfFzb/vwsakieB2JEro4p2+rxdnH38+h1r6F9XoSrWoVaGedMJhm +TrQwbRk8iapxfaCTaKHB2R4GuWkU9M8NnFSOyvrC0pWLy7zYV8o/jFTf54y1lhRP +/Memo788/Z+pt62zGUxmCn/ThiErWsGpkt6OoSIkZlmo9nVxAoIBAQDCCMoEZQsW +VrgVvyxov0Kc3SE0IxAX7XEoQNUeoMob6GKtBNjba0Pk7V0IklNZO+b/f5/cDFan +m7JOiUte5LSA2LykirIwDfjqLcwqL3DmnIFlDLhNWtXTQDO1pgl0OU3cglzxdld6 +yJIc+dSDDTSS4/Es1f45KcZvvRkms+Ph7P9043wavzmd+c0+iIM3IKjRP5T7HLFq +QyZoIdGHbhlBwZ/w9irY1Hzw997JVlpqlTVTi9sMz+H85kE+UBkFqd/r9vDDLlIO +iALSmGca7xkNANFatgvuVbpfCXZW8Pijr6eeiUHB+BpNg/gg9nq3GQR0/P5MMnhG +iRjKdk+gqzaNAoIBAE2sQrO0sIYHhsUU5401oG8NR5+nYjai0BJpj57KB4HSvjnp +h+mQwPhR2o3B/h2IZ3rV15E/Sb2DgyiGA3n8XW5TO0doo6QyQ0pBCox5RsOZW4wy +i2y90qpFZL/mPBU+U+3tL7K2Hgg71q+a7le4qOo+J2po6OcNCosWGwjEvMhPJvvz +yIf7ZpRg9QTJN/W+vjS35Va37bGGrckAFsQHMLNKg7kc3rwFfxAIDyahyiaS8Ffs +eA9ExYJ71t3VSqT3XUwjpEPPOJ3o3AyqD9wBMJqLxv/tbuv4LlBgtkXHCuPncVHV +6R/j2NRzPfDXOgTFXKxa3uO3QIGgYmEjl57QANECggEBAJLVyeMXgBNwnrA+UuIV +0tgYc3ccDaK92gMnROB/t1L1Qi9C2sT5YJDOm7fP2+lMbpvtPdFtOOpv5biPJ41x +L7PN0LwIBZ5eBH9bFwTZj+vEhhstTA+l7OiHzlnpg4ADmYuEz8ce0kaloATzfsGJ +7b43ZxyR+GfT2EpY5L6oJYykKBGR0SoAih6lmo93CS1ftsFbB2gcp5oNpPPqm8CM +LerYFyxnbbdW3hIQ0fS1N4kuzwMhdCw26QLUUI1SWg0yJ7VO05Yw6IH8pX4vPN9i +DygK9WNbHp5HG9mttHNIujBMzmEn565dDbKZat2vCOCkuv25MswA6YofV7ZnYAzr +ZEUCggEAEASYgAZW7FXo13wO/B3GPn4VSo9AwbbFXUYxV2MguID8HKI92uc5xKpF +o+3f7NJiLR7xp6kt8JMzcErFI27tkIE5qerj4j/YOwiAtmSdsYDGZgCORKWGvk3Q +Uvmic0ChydNaTRo+Nb46NAGx/28JZ1X/OHsnw2mazsjCbkTGavsHyuAHSZ8FjaO/ +zzS+X5FG/5xWmd6bBNjqIsy5dzrDY7dtgDbylwscO0ZjZ2jPHUZqcN/0wCecwmcI +s5ylOwxZTUJvoaUfxJJChhx3Aa09Og4VB6Tu5xuwPSCQSCs7BYYVsZOOXyLAxUJQ +Z9dGRClyR8L6zGyIx9IfiHIVbaY2yg== +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIIF2zCCA8OgAwIBAgIURRBDOMWHU/lCFak3Tp/efWcNBDQwDQYJKoZIhvcNAQEL +BQAwfTELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRlTmFtZTERMA8GA1UEBwwI +Q2l0eU5hbWUxFDASBgNVBAoMC0NvbXBhbnlOYW1lMRswGQYDVQQLDBJDb21wYW55 +U2VjdGlvbk5hbWUxFDASBgNVBAMMC2hhcHJveHkub3JnMB4XDTI1MDYyNjA5MzMx +MVoXDTQ0MDgyNTA5MzMxMVowfTELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRl +TmFtZTERMA8GA1UEBwwIQ2l0eU5hbWUxFDASBgNVBAoMC0NvbXBhbnlOYW1lMRsw +GQYDVQQLDBJDb21wYW55U2VjdGlvbk5hbWUxFDASBgNVBAMMC2hhcHJveHkub3Jn +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqOeUx7/lyAEUTwL49bTt +yOoCPev8AseLjl8GZZkPsBuNjOmtiBeFNXlxX8ryKKqsBqBHhYT+9ft7QGyeVntf +KEZBBugnEd+SdlIkcYLd85L5xgcZKDKVqRj9C/8PlmZMPOggG0fXkX/8wSzlHyqg +F82rV36nb5X0MRdTo3lOgnpnAaTzcR5DC+9xQUYFXs5IY9qtEXaObJ/UxW+/5zum +4l61dbOEZL+SX+9MwikCiBxjbbTNEUddwHAxLmNqamsMVbg0xAqpRjTCoFznNlyr +vTkNWi8rcgijccDxgvlIH/U7vUw/1NHr4lLTAg6p/3OME2u71cke8AOPkTRTxxcE +08QlZE7gImlNs2kyxjP7DbfKBbvxV0nk1Z54rwMA0bQSEcKJcNWUHsw1W7mCj30k +nCdy75LgRT30dEm4b6eXidC7OckL13GLq7NQStUla0vlBWnZ+czsJTjmFukOr8OL +lUg+Zu9XkgRJEsu+JdZBIiD85Ek+ij5RDjo94P9NGAmkTZXfzvOIS9Tu6vIEu8sn +eb4r3hndGwxDIyi514BCTunbAsfpkataEjajb3VRSSzABR6B0U3f3NdLhD7Htmmr +NaawMtu6HKQaShaNa/P8Yr3/Ik25eMppZ1kzOU9JsVtHjqhEkK4RDvEpX5yAMXjz +jiQW4yg7nDC85HuC7B7/hT0CAwEAAaNTMFEwHQYDVR0OBBYEFM/sK4V6m+TDCTtj +vESjXas889RLMB8GA1UdIwQYMBaAFM/sK4V6m+TDCTtjvESjXas889RLMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAKHnZkv9bd8O9+90ymOA4vLQ +iuPrcOgMXD9ibC7BgempOCLzFbKL3FMGulJZJy4JLzKhaHVICSITswN81Rsd8NIM +hpGg0Ih/jg25rzNPLKpDe7MSTS73ufTyRtseusQrvIYihAsZrPGl2XR1InuooQ08 +zXqO9mFQbfs7mgFWYbPxqgk/2hm6GG/a0M9asC2oH45mWygOELS05EMh+at97EUD +s7KtM/uJ7+09TjcUD0zcf0c777YL5B050CbedZciObH03AU2P7Qc5LEZck8TEMrw +0i655wWMTuI7wGbVDz1qdBUzc/Q75WKQiRPLVyLixsJmWA+cpZYbWCV0l2hmp2wJ +7l8dV5UwrEwHWwGQbrOzuSjYyzfNXRbNIbnL1UySCMtHFBtOy/RHb2VbAiEZnrMe +xmmNQx+3t7a0OW97iPKRh6K95KdsLaUlyoBCY7Ku3pXd9osj1JjsrDfglWx2PDcc +ENUrBSbJHdf+cK9USNhl8L0FH6U3OSb+iSshznCRfH9i5siKwns0n9nePM6WQXQz +gR0E1E1yeNd/E/lET08RnTwWtlPjZyo7GAkjgOOEAnk1QZqM3/L34ZAXS0+/am+x +lCz4wr3hRdeG/4dfZluPud8fi6Y2ardGUwhlBhlNZKt1d01p8OrAhuuvVRulUKMi +fUlFmL0ypMsujAx1WJxz +-----END CERTIFICATE----- diff --git a/e2e/tests/runtime_acme/data/haproxy.cfg b/e2e/tests/runtime_acme/data/haproxy.cfg new file mode 100644 index 00000000..4d34ed33 --- /dev/null +++ b/e2e/tests/runtime_acme/data/haproxy.cfg @@ -0,0 +1,54 @@ +# _version=42 + +global + log stderr local2 + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 4000 + user haproxy + group haproxy + stats socket /var/lib/haproxy/stats level admin + + expose-experimental-directives + httpclient.resolvers.prefer ipv4 + httpclient.resolvers.id docker + httpclient.ssl.ca-file /var/lib/haproxy/pebble.minica.pem + #httpclient.ssl.verify none + #nbthread 2 + warn-blocked-traffic-after 1000ms + +resolvers docker + nameserver dns 127.0.0.11:53 + +defaults mydefaults + mode http + log global + option httplog + option dontlognull + option http-server-close + option forwardfor except 127.0.0.0/8 + option redispatch + retries 3 + timeout http-request 10s + timeout queue 1m + timeout connect 10s + timeout client 1m + timeout server 1m + timeout http-keep-alive 10s + timeout check 10s + maxconn 3000 + +acme pebble + directory https://pebble:14000/dir + account-key /var/lib/haproxy/acme.account.key + contact john.doe@example.com + challenge HTTP-01 + keytype RSA + bits 4096 + map virt@acme + +frontend web + bind *:1080 + bind *:1443 ssl + http-request return status 200 content-type text/plain lf-string "%[path,field(-1,/)].%[path,field(-1,/),map(virt@acme)]\n" if { path_beg '/.well-known/acme-challenge/' } + ssl-f-use crt "/var/lib/haproxy/haproxy.pem" acme pebble domains "dataplaneapi-e2e" diff --git a/e2e/tests/runtime_acme/tests.bats b/e2e/tests/runtime_acme/tests.bats new file mode 100644 index 00000000..4ca736ca --- /dev/null +++ b/e2e/tests/runtime_acme/tests.bats @@ -0,0 +1,54 @@ +#!/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/get_json_path" +load '../../libs/resource_client' +load '../../libs/version' +DONT_RESTART_DPAPI=1 +load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' +load '../../libs/acme' + +_RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" +_CERT_NAME="/var/lib/haproxy/haproxy.pem" + +@test "acme_runtime: Renew a certificate" { + haproxy_version_ge "3.3" || skip + + sleep 2 # wait for haproxy to create the acme account key + run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$_CERT_NAME" + assert_success + dpa_curl_status_body '$output' + assert_equal "$SC" 200 + + # Wait until the status of our certificate is in state "Scheduled", + # meaning it was renewed successfully. + state=unknown + trials=10 + while [ "$state" != "Scheduled" ] && (( trials > 0 )); do + sleep 2 + resource_get "$_RUNTIME_ACME_PATH" + state="$(jq -r .[0].state <<< "$BODY")" + : $((trials--)) + done + assert_equal "$state" "Scheduled" + + # HAProxy will then send an event to dpapi to store the cert to disk. + sleep 1 + run dpa_docker_exec 'ls /etc/haproxy/ssl/haproxy.pem' +} From a454fa51983b8293236b08749fd19e605b05874f Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 11 Aug 2025 14:24:51 +0200 Subject: [PATCH 08/42] TEST/MEDIUM: run tests on HAProxy v3.3 Needed for the ACME tests. --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13cda03a..cbc490b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,3 +222,9 @@ HAProxy_3_2: matrix: - TESTPART: ["1/2", "2/2"] HAPROXY_VERSION: "3.2" +HAProxy_3_3: + extends: .e2e + parallel: + matrix: + - TESTPART: ["1/2", "2/2"] + HAPROXY_VERSION: "3.3" From 61aa0b955c6fe9dad5f0ebc74ad604555d394f27 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 20 Aug 2025 10:18:47 +0200 Subject: [PATCH 09/42] BUILD/MINOR: go.mod: update Go packages --- embedded_spec.go | 34 ++++++++++++++++++++++++++++------ go.mod | 12 +++++------- go.sum | 24 ++++++++++++------------ 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index ba6c7b4d..9474e0ad 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -26563,11 +26563,11 @@ func init() { "x-omitempty": true }, "challenge": { - "description": "ACME challenge type. Only HTTP-01 and DNS-01 are supported.", + "description": "ACME challenge type. Only http-01 and dns-01 are supported.", "type": "string", "enum": [ - "HTTP-01", - "DNS-01" + "http-01", + "dns-01" ] }, "contact": { @@ -28027,6 +28027,9 @@ func init() { "interface": { "type": "string" }, + "label": { + "type": "string" + }, "level": { "type": "string", "enum": [ @@ -38182,6 +38185,14 @@ func init() { "type": "string", "x-display-name": "Prefix" }, + "renegotiate": { + "description": "Toggles the secure renegotiation mechanism for an SSL backend.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, "resolve-net": { "type": "string", "pattern": "^([A-Za-z0-9.:/]+)(,[A-Za-z0-9.:/]+)*$" @@ -86068,11 +86079,11 @@ func init() { "x-omitempty": true }, "challenge": { - "description": "ACME challenge type. Only HTTP-01 and DNS-01 are supported.", + "description": "ACME challenge type. Only http-01 and dns-01 are supported.", "type": "string", "enum": [ - "HTTP-01", - "DNS-01" + "http-01", + "dns-01" ] }, "contact": { @@ -87493,6 +87504,9 @@ func init() { "interface": { "type": "string" }, + "label": { + "type": "string" + }, "level": { "type": "string", "enum": [ @@ -97491,6 +97505,14 @@ func init() { "type": "string", "x-display-name": "Prefix" }, + "renegotiate": { + "description": "Toggles the secure renegotiation mechanism for an SSL backend.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, "resolve-net": { "type": "string", "pattern": "^([A-Za-z0-9.:/]+)(,[A-Za-z0-9.:/]+)*$" diff --git a/go.mod b/go.mod index a8ff0b1b..4720f486 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ 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 @@ -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.2.3 + github.com/haproxytech/client-native/v6 v6.2.1-0.20250819134646-11b253ec44d0 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -38,13 +38,11 @@ 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.41.0 - golang.org/x/sys v0.34.0 + golang.org/x/net v0.42.0 + golang.org/x/sys v0.35.0 gopkg.in/yaml.v2 v2.4.0 ) -replace github.com/haproxytech/client-native/v6 => ../client-native - 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 @@ -62,7 +60,7 @@ 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/jsonpointer v0.21.2 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gofrs/flock v0.12.1 // indirect diff --git a/go.sum b/go.sum index 17392b66..326d3b88 100644 --- a/go.sum +++ b/go.sum @@ -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.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/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.21.2 h1:AqQaNADVwq/VnkCmQg6ogE+M3FOsKTytwges0JdwVuA= +github.com/go-openapi/jsonpointer v0.21.2/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= @@ -88,8 +88,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.2.3 h1:QUALa8HqAM5xAgi1xgQhNMSXVlHLM+UUOETEHq6ZS7A= -github.com/haproxytech/client-native/v6 v6.2.3/go.mod h1:fVO57qFA8lD2hLE4Ste4UDHH0uPu3tY7iUffDdO6DUs= +github.com/haproxytech/client-native/v6 v6.2.1-0.20250819134646-11b253ec44d0 h1:OxDLLrBBs1kG/gFt3VX6FFqq86Om8hjiJzpT8C60vKg= +github.com/haproxytech/client-native/v6 v6.2.1-0.20250819134646-11b253ec44d0/go.mod h1:h31BhjzhDJhn3y/KvhYnDgD2R7RYAKPlhlwEHb0naog= 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= @@ -176,17 +176,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/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= 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.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.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= 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 e36a7e483b613dce954d0fa283412103e6884606 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Thu, 21 Aug 2025 17:40:19 +0200 Subject: [PATCH 10/42] TEST/MEDIUM: Fix tests for HAProxy 3.3 Backends and frontends cannot share the same name. The program section has been removed. --- e2e/tests/binds/add.bats | 3 ++- e2e/tests/http_request_rules/data/haproxy_2.8.cfg | 2 +- e2e/tests/http_request_rules/get_2.8.bats | 2 +- e2e/tests/http_response_rules/data/haproxy_2.8.cfg | 2 +- e2e/tests/http_response_rules/get_2.8.bats | 2 +- e2e/tests/process_manager/create.bats | 7 +++++++ e2e/tests/process_manager/delete.bats | 5 +++++ e2e/tests/process_manager/get.bats | 5 +++++ e2e/tests/process_manager/list.bats | 3 +++ e2e/tests/process_manager/replace.bats | 5 +++++ e2e/tests/tcp_request_rules/data/haproxy_2.8.cfg | 2 +- e2e/tests/tcp_request_rules/get_2.8.bats | 2 +- e2e/tests/x_issue_int_247/data/haproxy.cfg | 2 +- 13 files changed, 34 insertions(+), 8 deletions(-) diff --git a/e2e/tests/binds/add.bats b/e2e/tests/binds/add.bats index 7f717a71..4f26c494 100644 --- a/e2e/tests/binds/add.bats +++ b/e2e/tests/binds/add.bats @@ -60,7 +60,8 @@ load 'utils/_helpers' @test "binds: Add a new bind for peers" { PARENT_NAME="fusion" - if haproxy_version_ge "2.5" + # segfault in v3.3 + if haproxy_version_ge "2.5" && !haproxy_version_ge "3.3" then resource_post "$_PEER_BASE_PATH/$PARENT_NAME/binds" "data/post_2.5.json" "force_reload=true" assert_equal "$SC" 201 diff --git a/e2e/tests/http_request_rules/data/haproxy_2.8.cfg b/e2e/tests/http_request_rules/data/haproxy_2.8.cfg index 101d0393..d659323b 100644 --- a/e2e/tests/http_request_rules/data/haproxy_2.8.cfg +++ b/e2e/tests/http_request_rules/data/haproxy_2.8.cfg @@ -35,7 +35,7 @@ frontend test_frontend http-request del-header X-Del-Frontend if { src 10.1.0.0/16 } http-request sc-add-gpc(0,1) 1 if FALSE -frontend test_sticksc +frontend front_sticksc bind *:1248 default_backend test_sticksc http-request track-sc0 src table test_sticksc if TRUE diff --git a/e2e/tests/http_request_rules/get_2.8.bats b/e2e/tests/http_request_rules/get_2.8.bats index 52bec27f..75afbaa4 100644 --- a/e2e/tests/http_request_rules/get_2.8.bats +++ b/e2e/tests/http_request_rules/get_2.8.bats @@ -27,7 +27,7 @@ load 'utils/_helpers' @test "http_request_rules: Return one track-sc HTTP Request Rule from frontend" { if haproxy_version_ge "2.8" then - PARENT_NAME="test_sticksc" + PARENT_NAME="front_sticksc" resource_get "$_FRONTEND_BASE_PATH/$PARENT_NAME/http_request_rules/0" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" ".type")" "track-sc" diff --git a/e2e/tests/http_response_rules/data/haproxy_2.8.cfg b/e2e/tests/http_response_rules/data/haproxy_2.8.cfg index d62c5ed6..60f41d76 100644 --- a/e2e/tests/http_response_rules/data/haproxy_2.8.cfg +++ b/e2e/tests/http_response_rules/data/haproxy_2.8.cfg @@ -35,7 +35,7 @@ frontend test_frontend http-response del-header X-Del-Frontend if { src 10.1.0.0/16 } http-response sc-add-gpc(0,1) 1 if FALSE -frontend test_sticksc +frontend front_sticksc bind *:1248 default_backend test_sticksc http-response track-sc0 src table test_sticksc if TRUE diff --git a/e2e/tests/http_response_rules/get_2.8.bats b/e2e/tests/http_response_rules/get_2.8.bats index 1dc83251..40551448 100644 --- a/e2e/tests/http_response_rules/get_2.8.bats +++ b/e2e/tests/http_response_rules/get_2.8.bats @@ -28,7 +28,7 @@ load 'utils/_helpers' @test "http_response_rules: Return one track-sc HTTP Response Rule from frontend" { if haproxy_version_ge "2.8" then - PARENT_NAME="test_sticksc" + PARENT_NAME="front_sticksc" resource_get "$_FRONTEND_BASE_PATH/$PARENT_NAME/http_response_rules/0" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" ".type")" "track-sc" diff --git a/e2e/tests/process_manager/create.bats b/e2e/tests/process_manager/create.bats index e566729e..5ea8efe9 100644 --- a/e2e/tests/process_manager/create.bats +++ b/e2e/tests/process_manager/create.bats @@ -18,12 +18,15 @@ load '../../libs/dataplaneapi' load '../../libs/get_json_path' load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' load '../../libs/resource_client' load '../../libs/version' load 'utils/_helpers' @test "process-manager: Create one new program" { + if haproxy_version_ge "3.3"; then skip "programs have been removed in haproxy 3.3"; fi + resource_post "$_PROGRAMS_BASE_PATH" "data/program.json" "force_reload=true" assert_equal "$SC" 201 @@ -35,11 +38,15 @@ load 'utils/_helpers' } @test "process-manager: Fail creating program with same name" { + if haproxy_version_ge "3.3"; then skip; fi + resource_post "$_PROGRAMS_BASE_PATH" "data/program_duplicated.json" "force_reload=true" assert_equal "$SC" 409 } @test "process-manager: Fail creating program that isn't valid" { + if haproxy_version_ge "3.3"; then skip; fi + resource_post "$_PROGRAMS_BASE_PATH" "data/program_invalid.json" "force_reload=true" assert_equal "$SC" 422 } diff --git a/e2e/tests/process_manager/delete.bats b/e2e/tests/process_manager/delete.bats index b1109d48..7a6b9e9a 100644 --- a/e2e/tests/process_manager/delete.bats +++ b/e2e/tests/process_manager/delete.bats @@ -18,12 +18,15 @@ load '../../libs/dataplaneapi' load '../../libs/get_json_path' load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' load '../../libs/resource_client' load '../../libs/version' load 'utils/_helpers' @test "process-manager: Delete one program by name" { + if haproxy_version_ge "3.3"; then skip; fi + resource_delete "$_PROGRAMS_BASE_PATH/echo" "force_reload=true" assert_equal "$SC" 204 @@ -32,6 +35,8 @@ load 'utils/_helpers' } @test "process-manager: Fail deleting app that doesn't exist" { + if haproxy_version_ge "3.3"; then skip; fi + resource_delete "$_PROGRAMS_BASE_PATH/i_am_not_here" "force_reload=true" assert_equal "$SC" 404 } diff --git a/e2e/tests/process_manager/get.bats b/e2e/tests/process_manager/get.bats index 9aae643e..223ec6ef 100644 --- a/e2e/tests/process_manager/get.bats +++ b/e2e/tests/process_manager/get.bats @@ -18,18 +18,23 @@ load '../../libs/dataplaneapi' load '../../libs/get_json_path' load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' load '../../libs/resource_client' load '../../libs/version' load 'utils/_helpers' @test "process-manager: Return one program by name" { + if haproxy_version_ge "3.3"; then skip; fi + resource_get "$_PROGRAMS_BASE_PATH/echo" assert_equal "$SC" 200 assert_equal "echo" "$(get_json_path "$BODY" ".name")" } @test "process-manager: Fail returning program that doesn't exist" { + if haproxy_version_ge "3.3"; then skip; fi + resource_get "$_PROGRAMS_BASE_PATH/i_am_not_here" assert_equal "$SC" 404 } diff --git a/e2e/tests/process_manager/list.bats b/e2e/tests/process_manager/list.bats index f19a5764..defb9523 100644 --- a/e2e/tests/process_manager/list.bats +++ b/e2e/tests/process_manager/list.bats @@ -18,12 +18,15 @@ load '../../libs/dataplaneapi' load '../../libs/get_json_path' load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' load '../../libs/resource_client' load '../../libs/version' load 'utils/_helpers' @test "process-manager: Return an array of programs" { + if haproxy_version_ge "3.3"; then skip; fi + resource_get "$_PROGRAMS_BASE_PATH" assert_equal "$SC" 200 assert_equal 1 "$(get_json_path "$BODY" ". | length")" diff --git a/e2e/tests/process_manager/replace.bats b/e2e/tests/process_manager/replace.bats index ce7861d0..fa4ca59b 100644 --- a/e2e/tests/process_manager/replace.bats +++ b/e2e/tests/process_manager/replace.bats @@ -18,12 +18,15 @@ load '../../libs/dataplaneapi' load '../../libs/get_json_path' load '../../libs/haproxy_config_setup' +load '../../libs/haproxy_version' load '../../libs/resource_client' load '../../libs/version' load 'utils/_helpers' @test "process-manager: Replace one program" { + if haproxy_version_ge "3.3"; then skip; fi + resource_put "$_PROGRAMS_BASE_PATH/echo" "data/program_duplicated.json" "force_reload=true" assert_equal "$SC" 200 @@ -34,6 +37,8 @@ load 'utils/_helpers' } @test "process-manager: Fail replacing program that doesn't exist" { + if haproxy_version_ge "3.3"; then skip; fi + resource_put "$_PROGRAMS_BASE_PATH/i_am_not_here" "data/program_duplicated.json" "force_reload=true" assert_equal "$SC" 409 } diff --git a/e2e/tests/tcp_request_rules/data/haproxy_2.8.cfg b/e2e/tests/tcp_request_rules/data/haproxy_2.8.cfg index 2dfecd6e..51af3303 100644 --- a/e2e/tests/tcp_request_rules/data/haproxy_2.8.cfg +++ b/e2e/tests/tcp_request_rules/data/haproxy_2.8.cfg @@ -44,7 +44,7 @@ backend test_backend tcp-request inspect-delay 1s tcp-request content accept if { req.ssl_hello_type 1 } -frontend test_sticksc +frontend front_sticksc bind *:1248 default_backend test_sticksc tcp-request content track-sc0 src table test_sticksc if TRUE diff --git a/e2e/tests/tcp_request_rules/get_2.8.bats b/e2e/tests/tcp_request_rules/get_2.8.bats index e4d13d9e..9dd77c53 100644 --- a/e2e/tests/tcp_request_rules/get_2.8.bats +++ b/e2e/tests/tcp_request_rules/get_2.8.bats @@ -28,7 +28,7 @@ load 'utils/_helpers' @test "tcp_request_rules: Return one track-sc TCP Request Rule from frontend" { if haproxy_version_ge "2.8" then - PARENT_NAME="test_sticksc" + PARENT_NAME="front_sticksc" resource_get "$_FRONTEND_BASE_PATH/$PARENT_NAME/tcp_request_rules/0" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" ".action")" "track-sc" diff --git a/e2e/tests/x_issue_int_247/data/haproxy.cfg b/e2e/tests/x_issue_int_247/data/haproxy.cfg index 68d36b46..4e932792 100644 --- a/e2e/tests/x_issue_int_247/data/haproxy.cfg +++ b/e2e/tests/x_issue_int_247/data/haproxy.cfg @@ -1,7 +1,7 @@ global stats socket /var/lib/haproxy/stats level admin -frontend bug_int_247 +frontend bug_int_247_front bind *:1247 default_backend bug_int_247 From 1eed677a9248f9cbeb71672151727aab547599b1 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 22 Sep 2025 16:20:27 +0200 Subject: [PATCH 11/42] 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 | 192 +++++++++++++++--- generate/parents/main.go | 9 +- generate/swagger/Dockerfile | 8 +- go.mod | 31 ++- go.sum | 66 ++++-- 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, 285 insertions(+), 113 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 6dc9333b..46cb75a3 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -36,7 +36,7 @@ import ( api_errors "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" @@ -89,25 +89,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) @@ -1010,7 +1010,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") @@ -1019,7 +1019,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, @@ -1033,9 +1033,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 1096ff35..78a63b49 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -102,7 +102,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) { @@ -143,7 +143,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 { @@ -252,7 +252,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) @@ -346,7 +346,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) } @@ -367,7 +367,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 9474e0ad..f5f6d733 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -28027,9 +28027,6 @@ func init() { "interface": { "type": "string" }, - "label": { - "type": "string" - }, "level": { "type": "string", "enum": [ @@ -38185,14 +38182,6 @@ func init() { "type": "string", "x-display-name": "Prefix" }, - "renegotiate": { - "description": "Toggles the secure renegotiation mechanism for an SSL backend.", - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, "resolve-net": { "type": "string", "pattern": "^([A-Za-z0-9.:/]+)(,[A-Za-z0-9.:/]+)*$" @@ -40011,22 +40000,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", - "glitch_rate", - "glitch_cnt" + "sess_rate" ] }, + "idx": { + "type": "integer", + "x-dependency": { + "field": { + "value": [ + "gpc", + "gpc_rate", + "gpt" + ] + } + } + }, "period": { "type": "integer", "x-dependency": { @@ -40123,6 +40129,18 @@ func init() { "type": "integer", "x-nullable": true }, + "gpc": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpc0": { "type": "integer", "x-nullable": true @@ -40139,6 +40157,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 @@ -40151,6 +40193,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 @@ -85889,6 +85939,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": { @@ -85902,22 +85988,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", - "glitch_rate", - "glitch_cnt" + "sess_rate" ] }, + "idx": { + "type": "integer", + "x-dependency": { + "field": { + "value": [ + "gpc", + "gpc_rate", + "gpt" + ] + } + } + }, "period": { "type": "integer", "x-dependency": { @@ -87504,9 +87607,6 @@ func init() { "interface": { "type": "string" }, - "label": { - "type": "string" - }, "level": { "type": "string", "enum": [ @@ -97505,14 +97605,6 @@ func init() { "type": "string", "x-display-name": "Prefix" }, - "renegotiate": { - "description": "Toggles the secure renegotiation mechanism for an SSL backend.", - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, "resolve-net": { "type": "string", "pattern": "^([A-Za-z0-9.:/]+)(,[A-Za-z0-9.:/]+)*$" @@ -99319,6 +99411,18 @@ func init() { "type": "integer", "x-nullable": true }, + "gpc": { + "type": "object", + "properties": { + "idx": { + "type": "integer" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, "gpc0": { "type": "integer", "x-nullable": true @@ -99335,6 +99439,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 @@ -99347,6 +99475,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 f2703649..789b9282 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" ) @@ -77,18 +77,15 @@ type TmplData struct { } func generateAlias(childType string) bytes.Buffer { - // Initialisms used in child resources need to be added here for the generated parent functions to match with the operations params - swag.AddInitialisms("QUIC") - funcMap := template.FuncMap{ "parents": cnparents.Parents, } 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 4720f486..7c06a746 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 @@ -19,12 +19,14 @@ require ( 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.2.1-0.20250819134646-11b253ec44d0 + github.com/haproxytech/client-native/v6 v6.2.5 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.42.0 - golang.org/x/sys v0.35.0 + golang.org/x/sys v0.36.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -60,16 +62,25 @@ 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.2 // 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/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 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 @@ -87,6 +98,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 326d3b88..8e93e864 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.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= @@ -59,10 +59,10 @@ github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC0 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.21.2 h1:AqQaNADVwq/VnkCmQg6ogE+M3FOsKTytwges0JdwVuA= -github.com/go-openapi/jsonpointer v0.21.2/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/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/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.2.1-0.20250819134646-11b253ec44d0 h1:OxDLLrBBs1kG/gFt3VX6FFqq86Om8hjiJzpT8C60vKg= -github.com/haproxytech/client-native/v6 v6.2.1-0.20250819134646-11b253ec44d0/go.mod h1:h31BhjzhDJhn3y/KvhYnDgD2R7RYAKPlhlwEHb0naog= +github.com/haproxytech/client-native/v6 v6.2.5 h1:2m9r+SRlQNkxaM8G7/D1YGpB6W+uLu53UlFGszoT4CY= +github.com/haproxytech/client-native/v6 v6.2.5/go.mod h1:apDGBMRSJCSVyO2lqJ2wJrf5HPt8bxjpAwgGZP035LU= 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= @@ -178,15 +200,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.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +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.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +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 9765b20d..ab8ede94 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -85,6 +85,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" @@ -99,7 +100,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 @@ -1193,8 +1193,8 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { StorageGetOneStorageSSLCrtListFileHandler: storage.GetOneStorageSSLCrtListFileHandlerFunc(func(params storage.GetOneStorageSSLCrtListFileParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation storage.GetOneStorageSSLCrtListFile 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") @@ -2538,8 +2538,8 @@ type DataPlaneAPI struct { StorageGetOneStorageSSLCertificateHandler storage.GetOneStorageSSLCertificateHandler // StorageGetOneStorageSSLCrtListFileHandler sets the operation handler for the get one storage s s l crt list file operation StorageGetOneStorageSSLCrtListFileHandler storage.GetOneStorageSSLCrtListFileHandler - // 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 @@ -4076,8 +4076,8 @@ func (o *DataPlaneAPI) Validate() error { if o.StorageGetOneStorageSSLCrtListFileHandler == nil { unregistered = append(unregistered, "storage.GetOneStorageSSLCrtListFileHandler") } - 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") @@ -6173,7 +6173,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 152e8a06edbda53d0bc7fe42ef140c13a224cd72 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 8 Oct 2025 11:43:58 +0200 Subject: [PATCH 12/42] BUILD/MINOR: go.mod: update Go packages Fixes CVE-2025-47911 --- go.mod | 80 +++++++++++++++-------------- go.sum | 160 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 123 insertions(+), 117 deletions(-) diff --git a/go.mod b/go.mod index 7c06a746..aaf9e451 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.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.4 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.225.1 + 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,39 @@ 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.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.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.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.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 @@ -81,7 +81,6 @@ require ( github.com/kr/text v0.2.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 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect @@ -96,8 +95,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 8e93e864..f361e897 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.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.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.52.4 h1:vzLD0FyNU4uxf2QE5UDG0jSEitiJXbVEUwf2Sk3usF4= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4/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.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,55 +48,57 @@ 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= @@ -139,8 +141,6 @@ 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= -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= 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= @@ -192,14 +192,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 87ad0bcff14c659e9dba2dbdac1faa15949ac9ea Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 21 Nov 2025 13:25:45 +0100 Subject: [PATCH 13/42] BUILD/MINOR: go.mod: upgrade client-native --- embedded_spec.go | 42 +++++++++++++++- go.mod | 55 +++++++++++---------- go.sum | 122 ++++++++++++++++++++++++----------------------- 3 files changed, 129 insertions(+), 90 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index f5f6d733..85ae4ff6 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -26555,6 +26555,16 @@ func init() { "description": "Path where the the ACME account key is stored", "type": "string" }, + "acme_provider": { + "description": "DNS provider for the dns-01 challenge", + "type": "string" + }, + "acme_vars": { + "description": "List of variables passed to the dns-01 provider (typically API keys)", + "additionalProperties": { + "type": "string" + } + }, "bits": { "description": "Number of bits to generate an RSA certificate", "type": "integer", @@ -26605,8 +26615,17 @@ func init() { "description": "ACME provider's name", "type": "string", "x-nullable": false + }, + "reuse_key": { + "description": "Try to reuse the private key instead of generating a new one.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ] } - } + }, + "additionalProperties": false }, "acme_providers": { "description": "List of ACME sections.", @@ -86174,6 +86193,16 @@ func init() { "description": "Path where the the ACME account key is stored", "type": "string" }, + "acme_provider": { + "description": "DNS provider for the dns-01 challenge", + "type": "string" + }, + "acme_vars": { + "description": "List of variables passed to the dns-01 provider (typically API keys)", + "additionalProperties": { + "type": "string" + } + }, "bits": { "description": "Number of bits to generate an RSA certificate", "type": "integer", @@ -86224,8 +86253,17 @@ func init() { "description": "ACME provider's name", "type": "string", "x-nullable": false + }, + "reuse_key": { + "description": "Try to reuse the private key instead of generating a new one.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ] } - } + }, + "additionalProperties": false }, "acme_providers": { "description": "List of ACME sections.", diff --git a/go.mod b/go.mod index aaf9e451..9432bb31 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.2.5 + github.com/haproxytech/client-native/v6 v6.2.6 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 @@ -97,9 +96,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 f361e897..b506fb95 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= @@ -112,8 +114,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.2.5 h1:2m9r+SRlQNkxaM8G7/D1YGpB6W+uLu53UlFGszoT4CY= -github.com/haproxytech/client-native/v6 v6.2.5/go.mod h1:apDGBMRSJCSVyO2lqJ2wJrf5HPt8bxjpAwgGZP035LU= +github.com/haproxytech/client-native/v6 v6.2.6 h1:8PDnjgZSTNtVdEbvc+UVBt+qnc98OQsCRr9cs5S8B44= +github.com/haproxytech/client-native/v6 v6.2.6/go.mod h1:TPITt8PJxk0kZgqr+0km0RY1iTGiEcHM3vfEwr8v/8A= 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= @@ -196,23 +198,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 3f1e3ef3bba6660fe37aebe3a6d904d877daa66c Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 2 Dec 2025 14:10:34 +0100 Subject: [PATCH 14/42] 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 2da0bbfaccf75625b89ea6a8af28a32c2c126a95 Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Thu, 11 Dec 2025 15:01:21 +0100 Subject: [PATCH 15/42] 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 78a63b49..d2275fe5 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -237,9 +237,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"), @@ -290,7 +293,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 cdc5102283e632b1cbcb49ef9deb515ff90aac75 Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Tue, 16 Dec 2025 16:07:40 +0100 Subject: [PATCH 16/42] 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 d2275fe5..339036e0 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -155,6 +155,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{}) @@ -170,7 +201,9 @@ func (a *awsInstance) start() { if !ok { return } + a.logDebug("discovery job update triggered") + err := a.discoveryConfig.UpdateParams(discoveryInstanceParams{ Allowlist: []string{}, Denylist: []string{}, @@ -180,34 +213,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() @@ -217,6 +229,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), } @@ -228,7 +243,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 7ba2269ba6c83ac816b1476c197fa1ffc9c8dbf6 Mon Sep 17 00:00:00 2001 From: Vincent Gramer Date: Tue, 25 Nov 2025 13:48:40 +0100 Subject: [PATCH 17/42] 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 | 34 ++++++++++------------------- e2e/tests/defaults/get.bats | 23 +++++++++++++++++++ handlers/defaults.go | 10 ++------- 3 files changed, 37 insertions(+), 30 deletions(-) diff --git a/e2e/tests/defaults/data/haproxy.cfg b/e2e/tests/defaults/data/haproxy.cfg index 9a24dae7..5430760b 100644 --- a/e2e/tests/defaults/data/haproxy.cfg +++ b/e2e/tests/defaults/data/haproxy.cfg @@ -9,25 +9,15 @@ global group haproxy stats socket /var/lib/haproxy/stats level admin -defaults mydefaults - mode http - log global - option httplog - option dontlognull - option http-server-close - option forwardfor except 127.0.0.0/8 - option redispatch - retries 3 - timeout http-request 10s - timeout queue 1m - timeout connect 10s - timeout client 1m - timeout server 1m - timeout http-keep-alive 10s - timeout check 10s - maxconn 3000 - -defaults unnamed_defaults_1 - mode http - balance roundrobin - timeout client 30000 +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 51f3a291..1168c499 100644 --- a/e2e/tests/defaults/get.bats +++ b/e2e/tests/defaults/get.bats @@ -27,12 +27,35 @@ 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" { 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 dc851928..b9acc654 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 cd5b78a6e8094e44d8ffdf6ab4eaf1a8e2525499 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 10:27:51 +0100 Subject: [PATCH 18/42] BUILD/MEDIUM: golang: upgrade go to 1.25 and linter to 2.8.0 --- .gitlab-ci.yml | 2 +- .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/acme_provider.go | 10 +- handlers/acme_runtime.go | 4 +- 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 | 16 +- 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_profile.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 | 48 +++--- handlers/parent_bind_generated.go | 30 ++-- handlers/parent_filter_generated.go | 24 +-- ...rent_http_after_response_rule_generated.go | 36 ++-- handlers/parent_http_check_generated.go | 24 +-- handlers/parent_http_error_rule_generated.go | 36 ++-- .../parent_http_request_rule_generated.go | 36 ++-- .../parent_http_response_rule_generated.go | 36 ++-- handlers/parent_log_target_generated.go | 60 +++---- handlers/parent_log_target_global.go | 12 +- .../parent_quic_initial_rule_generated.go | 24 +-- handlers/parent_server_generated.go | 30 ++-- handlers/parent_tcp_check_generated.go | 24 +-- handlers/parent_tcp_request_rule_generated.go | 36 ++-- .../parent_tcp_response_rule_generated.go | 24 +-- handlers/peer.go | 8 +- handlers/peer_entry.go | 10 +- handlers/program.go | 10 +- handlers/quic_initial_rule.go | 12 +- 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_ca_runtime.go | 14 +- handlers/ssl_cert_storage.go | 10 +- handlers/ssl_certs_runtime.go | 10 +- handlers/ssl_crl_lists_runtime.go | 10 +- handlers/ssl_crt_list_storage.go | 21 +-- handlers/ssl_crt_lists_runtime.go | 8 +- handlers/ssl_front_use.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/traces.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 +- 125 files changed, 846 insertions(+), 845 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cbc490b4..ed5d2aa7 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.24" + 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 fd282015..bc21e217 100644 --- a/configuration/user.go +++ b/configuration/user.go @@ -169,7 +169,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(http.StatusUnauthorized, "no configured users") diff --git a/configure_data_plane.go b/configure_data_plane.go index 46cb75a3..ae96c5d4 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -135,7 +135,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 @@ -163,12 +163,12 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.ServeError = api_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 @@ -177,7 +177,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) @@ -224,7 +224,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) @@ -232,7 +232,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 { @@ -241,7 +241,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 { @@ -250,7 +250,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 { @@ -259,7 +259,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 { @@ -268,7 +268,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 { @@ -277,7 +277,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 { @@ -286,7 +286,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 { @@ -911,8 +911,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) @@ -1010,7 +1010,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") @@ -1319,7 +1319,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) @@ -1331,7 +1332,7 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. configureEventListener(clientCtx, client) 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 339036e0..433f3185 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -46,7 +46,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 } @@ -111,7 +111,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, @@ -378,10 +378,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) } } @@ -413,6 +413,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 db1e575d..6b68eadd 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -67,7 +67,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 } @@ -306,7 +306,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...) } @@ -332,7 +332,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 9432bb31..84ea734a 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/acme_provider.go b/handlers/acme_provider.go index 0f2614f3..9a9eb99b 100644 --- a/handlers/acme_provider.go +++ b/handlers/acme_provider.go @@ -28,7 +28,7 @@ type GetAcmeProvidersHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetAcmeProvidersHandlerImpl) Handle(params acme.GetAcmeProvidersParams, principal interface{}) middleware.Responder { +func (h *GetAcmeProvidersHandlerImpl) Handle(params acme.GetAcmeProvidersParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -53,7 +53,7 @@ type GetAcmeProviderHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetAcmeProviderHandlerImpl) Handle(params acme.GetAcmeProviderParams, principal interface{}) middleware.Responder { +func (h *GetAcmeProviderHandlerImpl) Handle(params acme.GetAcmeProviderParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -79,7 +79,7 @@ type CreateAcmeProviderHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateAcmeProviderHandlerImpl) Handle(params acme.CreateAcmeProviderParams, principal interface{}) middleware.Responder { +func (h *CreateAcmeProviderHandlerImpl) Handle(params acme.CreateAcmeProviderParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -131,7 +131,7 @@ type EditAcmeProviderHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *EditAcmeProviderHandler) Handle(params acme.EditAcmeProviderParams, principal interface{}) middleware.Responder { +func (h *EditAcmeProviderHandler) Handle(params acme.EditAcmeProviderParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -171,7 +171,7 @@ type DeleteAcmeProviderHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteAcmeProviderHandlerImpl) Handle(params acme.DeleteAcmeProviderParams, principal interface{}) middleware.Responder { +func (h *DeleteAcmeProviderHandlerImpl) Handle(params acme.DeleteAcmeProviderParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/acme_runtime.go b/handlers/acme_runtime.go index 3cc900a9..0fafaea7 100644 --- a/handlers/acme_runtime.go +++ b/handlers/acme_runtime.go @@ -26,7 +26,7 @@ type GetAcmeStatusHandlerImpl struct { Client client_native.HAProxyClient } -func (h *GetAcmeStatusHandlerImpl) Handle(params acme_runtime.GetAcmeStatusParams, principal interface{}) middleware.Responder { +func (h *GetAcmeStatusHandlerImpl) Handle(params acme_runtime.GetAcmeStatusParams, principal any) middleware.Responder { rt, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -46,7 +46,7 @@ type RenewAcmeCertificateHandlerImpl struct { Client client_native.HAProxyClient } -func (h *RenewAcmeCertificateHandlerImpl) Handle(params acme_runtime.RenewAcmeCertificateParams, principal interface{}) middleware.Responder { +func (h *RenewAcmeCertificateHandlerImpl) Handle(params acme_runtime.RenewAcmeCertificateParams, principal any) middleware.Responder { rt, 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 fbdf2ba8..28e8e2cb 100644 --- a/handlers/cluster.go +++ b/handlers/cluster.go @@ -62,7 +62,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() } @@ -117,7 +117,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 @@ -158,11 +158,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 { @@ -239,7 +239,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 @@ -311,7 +311,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 b9acc654..5e17e6e1 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 { @@ -235,7 +235,7 @@ type AddDefaultsSectionHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h AddDefaultsSectionHandlerImpl) Handle(params defaults.AddDefaultsSectionParams, principal interface{}) middleware.Responder { +func (h AddDefaultsSectionHandlerImpl) Handle(params defaults.AddDefaultsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -292,7 +292,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 { @@ -348,7 +348,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 239fae4c..fcd5dca4 100644 --- a/handlers/global.go +++ b/handlers/global.go @@ -38,7 +38,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 @@ -64,7 +64,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_profile.go b/handlers/log_profile.go index 72941b50..f684a1be 100644 --- a/handlers/log_profile.go +++ b/handlers/log_profile.go @@ -29,7 +29,7 @@ type GetLogProfilesHandlerImpl struct { } // Get all log-profiles -func (h *GetLogProfilesHandlerImpl) Handle(params log_profile.GetLogProfilesParams, principal interface{}) middleware.Responder { +func (h *GetLogProfilesHandlerImpl) Handle(params log_profile.GetLogProfilesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type GetLogProfileHandlerImpl struct { } // Get one log-profile -func (h *GetLogProfileHandlerImpl) Handle(params log_profile.GetLogProfileParams, principal interface{}) middleware.Responder { +func (h *GetLogProfileHandlerImpl) Handle(params log_profile.GetLogProfileParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -81,7 +81,7 @@ type CreateLogProfileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateLogProfileHandlerImpl) Handle(params log_profile.CreateLogProfileParams, principal interface{}) middleware.Responder { +func (h *CreateLogProfileHandlerImpl) Handle(params log_profile.CreateLogProfileParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -133,7 +133,7 @@ type EditLogProfileHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *EditLogProfileHandler) Handle(params log_profile.EditLogProfileParams, principal interface{}) middleware.Responder { +func (h *EditLogProfileHandler) Handle(params log_profile.EditLogProfileParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -173,7 +173,7 @@ type DeleteLogProfileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteLogProfileHandlerImpl) Handle(params log_profile.DeleteLogProfileParams, principal interface{}) middleware.Responder { +func (h *DeleteLogProfileHandlerImpl) Handle(params log_profile.DeleteLogProfileParams, 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 9aa7d37e..1fb6f07c 100644 --- a/handlers/parent_acl_generated.go +++ b/handlers/parent_acl_generated.go @@ -62,139 +62,139 @@ type ( ReplaceAllACLDefaultsHandlerImpl 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 *CreateACLDefaultsHandlerImpl) Handle(params acl.CreateACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateACLDefaultsHandlerImpl) Handle(params acl.CreateACLDefaultsParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) pg := acl.CreateACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetACLDefaultsHandlerImpl) Handle(params acl.GetACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetACLDefaultsHandlerImpl) Handle(params acl.GetACLDefaultsParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) pg := acl.GetACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetAllACLDefaultsHandlerImpl) Handle(params acl.GetAllACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllACLDefaultsHandlerImpl) Handle(params acl.GetAllACLDefaultsParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) pg := acl.GetAllACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *DeleteACLDefaultsHandlerImpl) Handle(params acl.DeleteACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteACLDefaultsHandlerImpl) Handle(params acl.DeleteACLDefaultsParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) pg := acl.DeleteACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *ReplaceACLDefaultsHandlerImpl) Handle(params acl.ReplaceACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLDefaultsHandlerImpl) Handle(params acl.ReplaceACLDefaultsParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) pg := acl.ReplaceACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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) } -func (h *ReplaceAllACLDefaultsHandlerImpl) Handle(params acl.ReplaceAllACLDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLDefaultsHandlerImpl) Handle(params acl.ReplaceAllACLDefaultsParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) pg := acl.ReplaceAllACLBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 bc7d89f1..16d1dde5 100644 --- a/handlers/parent_http_after_response_rule_generated.go +++ b/handlers/parent_http_after_response_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllHTTPAfterResponseRuleDefaultsHandlerImpl 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 *CreateHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := CreateHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetAllHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *DeleteHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *ReplaceHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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) } -func (h *ReplaceAllHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleDefaultsHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 bda57a96..42b8c064 100644 --- a/handlers/parent_http_request_rule_generated.go +++ b/handlers/parent_http_request_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllHTTPRequestRuleDefaultsHandlerImpl 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 *CreateHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := CreateHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.CreateHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := GetHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetAllHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *DeleteHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.DeleteHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *ReplaceHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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) } -func (h *ReplaceAllHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleDefaultsHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_http_response_rule_generated.go b/handlers/parent_http_response_rule_generated.go index d10bbbe7..27c4530f 100644 --- a/handlers/parent_http_response_rule_generated.go +++ b/handlers/parent_http_response_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllHTTPResponseRuleDefaultsHandlerImpl 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 *CreateHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := CreateHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.CreateHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetAllHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *DeleteHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.DeleteHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *ReplaceHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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) } -func (h *ReplaceAllHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleDefaultsHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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_quic_initial_rule_generated.go b/handlers/parent_quic_initial_rule_generated.go index 7926960a..53a5284c 100644 --- a/handlers/parent_quic_initial_rule_generated.go +++ b/handlers/parent_quic_initial_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllQUICInitialRuleDefaultsHandlerImpl ReplaceAllQUICInitialRuleHandlerImpl ) -func (h *CreateQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.CreateQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.CreateQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := CreateQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *CreateQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.CreateQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.CreateQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := CreateQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.CreateQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.GetQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.GetQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := GetQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.GetQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.GetQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := GetQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.GetQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.GetAllQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.GetAllQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := GetAllQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetAllQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.GetAllQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.GetAllQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := GetAllQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.GetAllQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.DeleteQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.DeleteQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := DeleteQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *DeleteQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.DeleteQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.DeleteQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := DeleteQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.DeleteQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.ReplaceQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.ReplaceQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := ReplaceQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *ReplaceQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.ReplaceQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.ReplaceQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.ReplaceQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.ReplaceAllQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllQUICInitialRuleFrontendHandlerImpl) Handle(params quic_initial_rule.ReplaceAllQUICInitialRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllQUICInitialRuleHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *ReplaceAllQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.ReplaceAllQUICInitialRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllQUICInitialRuleDefaultsHandlerImpl) Handle(params quic_initial_rule.ReplaceAllQUICInitialRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllQUICInitialRuleHandlerImpl(*h) pg := quic_initial_rule.ReplaceAllQUICInitialRuleFrontendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) 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 447600d2..a6ed2670 100644 --- a/handlers/parent_tcp_request_rule_generated.go +++ b/handlers/parent_tcp_request_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllTCPRequestRuleDefaultsHandlerImpl 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 *CreateTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := CreateTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.CreateTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := GetTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *GetAllTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := GetAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *DeleteTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := DeleteTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.DeleteTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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 *ReplaceTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, 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) } -func (h *ReplaceAllTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleDefaultsHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_tcp_response_rule_generated.go b/handlers/parent_tcp_response_rule_generated.go index 9f66df86..6835d06d 100644 --- a/handlers/parent_tcp_response_rule_generated.go +++ b/handlers/parent_tcp_response_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllTCPResponseRuleDefaultsHandlerImpl 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 *CreateTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := CreateTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.CreateTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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 *GetTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.GetTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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 *GetAllTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := GetAllTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.GetAllTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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 *DeleteTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := DeleteTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.DeleteTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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 *ReplaceTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.ReplaceTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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) } -func (h *ReplaceAllTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPResponseRuleDefaultsHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllTCPResponseRuleHandlerImpl(*h) pg := tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, 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/quic_initial_rule.go b/handlers/quic_initial_rule.go index 77f0112d..a6c6493e 100644 --- a/handlers/quic_initial_rule.go +++ b/handlers/quic_initial_rule.go @@ -16,7 +16,7 @@ type CreateQUICInitialRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.CreateQUICInitialRuleFrontendParams, _ interface{}) middleware.Responder { +func (c CreateQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.CreateQUICInitialRuleFrontendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -67,7 +67,7 @@ type DeleteQUICInitialRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (d DeleteQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.DeleteQUICInitialRuleFrontendParams, _ interface{}) middleware.Responder { +func (d DeleteQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.DeleteQUICInitialRuleFrontendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -117,7 +117,7 @@ type GetQUICInitialRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.GetQUICInitialRuleFrontendParams, _ interface{}) middleware.Responder { +func (g GetQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.GetQUICInitialRuleFrontendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -143,7 +143,7 @@ type GetAllQUICInitialRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetAllQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.GetAllQUICInitialRuleFrontendParams, _ interface{}) middleware.Responder { +func (g GetAllQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.GetAllQUICInitialRuleFrontendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -170,7 +170,7 @@ type ReplaceQUICInitialRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.ReplaceQUICInitialRuleFrontendParams, _ interface{}) middleware.Responder { +func (r ReplaceQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.ReplaceQUICInitialRuleFrontendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -222,7 +222,7 @@ type ReplaceAllQUICInitialRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ReplaceAllQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.ReplaceAllQUICInitialRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params quic_initial_rule.ReplaceAllQUICInitialRuleFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { 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 9a152ab8..71370de1 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -55,7 +55,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) @@ -83,7 +83,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) @@ -103,7 +103,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) @@ -156,7 +156,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) @@ -201,7 +201,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 aed5ea47..1377daf3 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 { @@ -161,7 +161,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 { @@ -215,7 +215,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 @@ -242,7 +242,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 @@ -272,7 +272,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_ca_runtime.go b/handlers/ssl_ca_runtime.go index a52ba5c9..3d113d68 100644 --- a/handlers/ssl_ca_runtime.go +++ b/handlers/ssl_ca_runtime.go @@ -29,7 +29,7 @@ type GetAllCaFilesHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetAllCaFilesHandlerImpl) Handle(params ssl_runtime.GetAllCaFilesParams, i interface{}) middleware.Responder { +func (h GetAllCaFilesHandlerImpl) Handle(params ssl_runtime.GetAllCaFilesParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -49,7 +49,7 @@ type CreateCaFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h CreateCaFileHandlerImpl) Handle(params ssl_runtime.CreateCaFileParams, i interface{}) middleware.Responder { +func (h CreateCaFileHandlerImpl) Handle(params ssl_runtime.CreateCaFileParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -92,7 +92,7 @@ type GetCaFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetCaFileHandlerImpl) Handle(params ssl_runtime.GetCaFileParams, i interface{}) middleware.Responder { +func (h GetCaFileHandlerImpl) Handle(params ssl_runtime.GetCaFileParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -112,7 +112,7 @@ type SetCaFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h SetCaFileHandlerImpl) Handle(params ssl_runtime.SetCaFileParams, i interface{}) middleware.Responder { +func (h SetCaFileHandlerImpl) Handle(params ssl_runtime.SetCaFileParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -142,7 +142,7 @@ type DeleteCaFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h DeleteCaFileHandlerImpl) Handle(params ssl_runtime.DeleteCaFileParams, i interface{}) middleware.Responder { +func (h DeleteCaFileHandlerImpl) Handle(params ssl_runtime.DeleteCaFileParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -161,7 +161,7 @@ type AddCaEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h AddCaEntryHandlerImpl) Handle(params ssl_runtime.AddCaEntryParams, i interface{}) middleware.Responder { +func (h AddCaEntryHandlerImpl) Handle(params ssl_runtime.AddCaEntryParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -191,7 +191,7 @@ type GetCaEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetCaEntryHandlerImpl) Handle(params ssl_runtime.GetCaEntryParams, i interface{}) middleware.Responder { +func (h GetCaEntryHandlerImpl) Handle(params ssl_runtime.GetCaEntryParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index 70960859..9f4100a1 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -41,7 +41,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) @@ -70,7 +70,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) @@ -112,7 +112,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) @@ -193,7 +193,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) @@ -263,7 +263,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/ssl_certs_runtime.go b/handlers/ssl_certs_runtime.go index 0456f96f..51c337f2 100644 --- a/handlers/ssl_certs_runtime.go +++ b/handlers/ssl_certs_runtime.go @@ -29,7 +29,7 @@ type GetAllCertsHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetAllCertsHandlerImpl) Handle(params ssl_runtime.GetAllCertsParams, i interface{}) middleware.Responder { +func (h GetAllCertsHandlerImpl) Handle(params ssl_runtime.GetAllCertsParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -49,7 +49,7 @@ type CreateCertHandlerImpl struct { Client client_native.HAProxyClient } -func (h CreateCertHandlerImpl) Handle(params ssl_runtime.CreateCertParams, i interface{}) middleware.Responder { +func (h CreateCertHandlerImpl) Handle(params ssl_runtime.CreateCertParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -93,7 +93,7 @@ type GetCertHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetCertHandlerImpl) Handle(params ssl_runtime.GetCertParams, i interface{}) middleware.Responder { +func (h GetCertHandlerImpl) Handle(params ssl_runtime.GetCertParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -113,7 +113,7 @@ type ReplaceCertHandlerImpl struct { Client client_native.HAProxyClient } -func (h ReplaceCertHandlerImpl) Handle(params ssl_runtime.ReplaceCertParams, i interface{}) middleware.Responder { +func (h ReplaceCertHandlerImpl) Handle(params ssl_runtime.ReplaceCertParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -147,7 +147,7 @@ type DeleteCertHandlerImpl struct { Client client_native.HAProxyClient } -func (h DeleteCertHandlerImpl) Handle(params ssl_runtime.DeleteCertParams, i interface{}) middleware.Responder { +func (h DeleteCertHandlerImpl) Handle(params ssl_runtime.DeleteCertParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/ssl_crl_lists_runtime.go b/handlers/ssl_crl_lists_runtime.go index e60fd4ad..a2253ed2 100644 --- a/handlers/ssl_crl_lists_runtime.go +++ b/handlers/ssl_crl_lists_runtime.go @@ -29,7 +29,7 @@ type GetAllCrlHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetAllCrlHandlerImpl) Handle(params ssl_runtime.GetAllCrlParams, i interface{}) middleware.Responder { +func (h GetAllCrlHandlerImpl) Handle(params ssl_runtime.GetAllCrlParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -49,7 +49,7 @@ type CreateCrlHandlerImpl struct { Client client_native.HAProxyClient } -func (h CreateCrlHandlerImpl) Handle(params ssl_runtime.CreateCrlParams, i interface{}) middleware.Responder { +func (h CreateCrlHandlerImpl) Handle(params ssl_runtime.CreateCrlParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -92,7 +92,7 @@ type GetCrlHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetCrlHandlerImpl) Handle(params ssl_runtime.GetCrlParams, i interface{}) middleware.Responder { +func (h GetCrlHandlerImpl) Handle(params ssl_runtime.GetCrlParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -112,7 +112,7 @@ type ReplaceCrlHandlerImpl struct { Client client_native.HAProxyClient } -func (h ReplaceCrlHandlerImpl) Handle(params ssl_runtime.ReplaceCrlParams, i interface{}) middleware.Responder { +func (h ReplaceCrlHandlerImpl) Handle(params ssl_runtime.ReplaceCrlParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -144,7 +144,7 @@ type DeleteCrlHandlerImpl struct { Client client_native.HAProxyClient } -func (h DeleteCrlHandlerImpl) Handle(params ssl_runtime.DeleteCrlParams, i interface{}) middleware.Responder { +func (h DeleteCrlHandlerImpl) Handle(params ssl_runtime.DeleteCrlParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/ssl_crt_list_storage.go b/handlers/ssl_crt_list_storage.go index 31f2e474..2c8e8a53 100644 --- a/handlers/ssl_crt_list_storage.go +++ b/handlers/ssl_crt_list_storage.go @@ -42,7 +42,7 @@ type StorageGetAllStorageSSLCrtListFilesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *StorageGetAllStorageSSLCrtListFilesHandlerImpl) Handle(params storage.GetAllStorageSSLCrtListFilesParams, principal interface{}) middleware.Responder { +func (h *StorageGetAllStorageSSLCrtListFilesHandlerImpl) Handle(params storage.GetAllStorageSSLCrtListFilesParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -70,7 +70,7 @@ type StorageGetOneStorageSSLCrtListFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageGetOneStorageSSLCrtListFileHandlerImpl) Handle(params storage.GetOneStorageSSLCrtListFileParams, principal interface{}) middleware.Responder { +func (h *StorageGetOneStorageSSLCrtListFileHandlerImpl) Handle(params storage.GetOneStorageSSLCrtListFileParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -100,7 +100,7 @@ type StorageDeleteStorageSSLCrtListFileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageDeleteStorageSSLCrtListFileHandlerImpl) Handle(params storage.DeleteStorageSSLCrtListFileParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageSSLCrtListFileHandlerImpl) Handle(params storage.DeleteStorageSSLCrtListFileParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -173,7 +173,7 @@ type StorageReplaceStorageSSLCrtListFileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageReplaceStorageSSLCrtListFileHandlerImpl) Handle(params storage.ReplaceStorageSSLCrtListFileParams, principal interface{}) middleware.Responder { +func (h *StorageReplaceStorageSSLCrtListFileHandlerImpl) Handle(params storage.ReplaceStorageSSLCrtListFileParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -224,7 +224,7 @@ type StorageCreateStorageSSLCrtListFileHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageCreateStorageSSLCrtListFileHandlerImpl) Handle(params storage.CreateStorageSSLCrtListFileParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageSSLCrtListFileHandlerImpl) Handle(params storage.CreateStorageSSLCrtListFileParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -273,7 +273,7 @@ type StorageGetStorageSSLCrtListEntriesHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageGetStorageSSLCrtListEntriesHandlerImpl) Handle(params storage.GetStorageSSLCrtListEntriesParams, principal interface{}) middleware.Responder { +func (h *StorageGetStorageSSLCrtListEntriesHandlerImpl) Handle(params storage.GetStorageSSLCrtListEntriesParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -298,7 +298,7 @@ type StorageCreateStorageSSLCrtListEntryHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageCreateStorageSSLCrtListEntryHandlerImpl) Handle(params storage.CreateStorageSSLCrtListEntryParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageSSLCrtListEntryHandlerImpl) Handle(params storage.CreateStorageSSLCrtListEntryParams, principal any) middleware.Responder { entry := params.Data if entry.File == "" { e := misc.SetError(400, "missing certificate file name") @@ -373,7 +373,7 @@ type StorageDeleteStorageSSLCrtListEntryHandlerImpl struct { // Delete an entry in a crt-list. If the line_number is not provided, // delete the first match, which is what the runtime API does. -func (h *StorageDeleteStorageSSLCrtListEntryHandlerImpl) Handle(params storage.DeleteStorageSSLCrtListEntryParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageSSLCrtListEntryHandlerImpl) Handle(params storage.DeleteStorageSSLCrtListEntryParams, principal any) middleware.Responder { crtListStorage, err := h.Client.CrtListStorage() if err != nil { e := misc.HandleError(err) @@ -387,10 +387,7 @@ func (h *StorageDeleteStorageSSLCrtListEntryHandlerImpl) Handle(params storage.D return storage.NewDeleteStorageSSLCrtListEntryDefault(int(*e.Code)).WithPayload(e) } lineno := int64(0) - firstMatch := true - if params.LineNumber < 1 { - firstMatch = false - } + firstMatch := params.LineNumber > 0 var sb strings.Builder // the modified contents sb.Grow(len(content)) strings.SplitSeq(content, "\n")(func(line string) bool { diff --git a/handlers/ssl_crt_lists_runtime.go b/handlers/ssl_crt_lists_runtime.go index 58f6f151..4fd069f4 100644 --- a/handlers/ssl_crt_lists_runtime.go +++ b/handlers/ssl_crt_lists_runtime.go @@ -26,7 +26,7 @@ type GetAllCrtListsHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetAllCrtListsHandlerImpl) Handle(params ssl_runtime.GetAllCrtListsParams, i interface{}) middleware.Responder { +func (h GetAllCrtListsHandlerImpl) Handle(params ssl_runtime.GetAllCrtListsParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -46,7 +46,7 @@ type GetAllCrtListEntriesHandlerImpl struct { Client client_native.HAProxyClient } -func (h GetAllCrtListEntriesHandlerImpl) Handle(params ssl_runtime.GetAllCrtListEntriesParams, i interface{}) middleware.Responder { +func (h GetAllCrtListEntriesHandlerImpl) Handle(params ssl_runtime.GetAllCrtListEntriesParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -66,7 +66,7 @@ type AddCrtListEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h AddCrtListEntryHandlerImpl) Handle(params ssl_runtime.AddCrtListEntryParams, i interface{}) middleware.Responder { +func (h AddCrtListEntryHandlerImpl) Handle(params ssl_runtime.AddCrtListEntryParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -86,7 +86,7 @@ type DeleteCrtListEntryHandlerImpl struct { Client client_native.HAProxyClient } -func (h DeleteCrtListEntryHandlerImpl) Handle(params ssl_runtime.DeleteCrtListEntryParams, i interface{}) middleware.Responder { +func (h DeleteCrtListEntryHandlerImpl) Handle(params ssl_runtime.DeleteCrtListEntryParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/ssl_front_use.go b/handlers/ssl_front_use.go index 0badeb16..62abee7a 100644 --- a/handlers/ssl_front_use.go +++ b/handlers/ssl_front_use.go @@ -29,7 +29,7 @@ type GetAllSSLFrontUsesHandlerImpl struct { Client cn.HAProxyClient } -func (h GetAllSSLFrontUsesHandlerImpl) Handle(params sfu.GetAllSSLFrontUsesParams, i interface{}) middleware.Responder { +func (h GetAllSSLFrontUsesHandlerImpl) Handle(params sfu.GetAllSSLFrontUsesParams, i any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type CreateSSLFrontUseHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h CreateSSLFrontUseHandlerImpl) Handle(params sfu.CreateSSLFrontUseParams, i interface{}) middleware.Responder { +func (h CreateSSLFrontUseHandlerImpl) Handle(params sfu.CreateSSLFrontUseParams, i any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ type GetSSLFrontUseHandlerImpl struct { Client cn.HAProxyClient } -func (h GetSSLFrontUseHandlerImpl) Handle(params sfu.GetSSLFrontUseParams, i interface{}) middleware.Responder { +func (h GetSSLFrontUseHandlerImpl) Handle(params sfu.GetSSLFrontUseParams, i any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -133,7 +133,7 @@ type ReplaceSSLFrontUseHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h ReplaceSSLFrontUseHandlerImpl) Handle(params sfu.ReplaceSSLFrontUseParams, i interface{}) middleware.Responder { +func (h ReplaceSSLFrontUseHandlerImpl) Handle(params sfu.ReplaceSSLFrontUseParams, i any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -186,7 +186,7 @@ type DeleteSSLFrontUseHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h DeleteSSLFrontUseHandlerImpl) Handle(params sfu.DeleteSSLFrontUseParams, i interface{}) middleware.Responder { +func (h DeleteSSLFrontUseHandlerImpl) Handle(params sfu.DeleteSSLFrontUseParams, i any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { 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 24f5f7fe..3e03636e 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/traces.go b/handlers/traces.go index 9235bf00..bfddbf92 100644 --- a/handlers/traces.go +++ b/handlers/traces.go @@ -29,7 +29,7 @@ type GetTracesHandlerImpl struct { } // Get the traces section (it is unique) -func (h *GetTracesHandlerImpl) Handle(params traces.GetTracesParams, principal interface{}) middleware.Responder { +func (h *GetTracesHandlerImpl) Handle(params traces.GetTracesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -62,7 +62,7 @@ type CreateTracesHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateTracesHandlerImpl) Handle(params traces.CreateTracesParams, principal interface{}) middleware.Responder { +func (h *CreateTracesHandlerImpl) Handle(params traces.CreateTracesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -114,7 +114,7 @@ type ReplaceTracesHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *ReplaceTracesHandler) Handle(params traces.ReplaceTracesParams, principal interface{}) middleware.Responder { +func (h *ReplaceTracesHandler) Handle(params traces.ReplaceTracesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -172,7 +172,7 @@ type DeleteTracesHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteTracesHandlerImpl) Handle(params traces.DeleteTracesParams, principal interface{}) middleware.Responder { +func (h *DeleteTracesHandlerImpl) Handle(params traces.DeleteTracesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -226,7 +226,7 @@ type CreateTraceEntryHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateTraceEntryHandlerImpl) Handle(params traces.CreateTraceEntryParams, principal interface{}) middleware.Responder { +func (h *CreateTraceEntryHandlerImpl) Handle(params traces.CreateTraceEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -279,7 +279,7 @@ type DeleteTraceEntryHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteTraceEntryHandlerImpl) Handle(params traces.DeleteTraceEntryParams, principal interface{}) middleware.Responder { +func (h *DeleteTraceEntryHandlerImpl) Handle(params traces.DeleteTraceEntryParams, 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 7c75e449..31ecc8a6 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -120,17 +120,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 4f4aa36bf38bc0f50918ad1bc3a800a3dfdf226b Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 15:10:15 +0100 Subject: [PATCH 19/42] BUILD/MEDIUM: client-native: upgrade to latest client-native --- embedded_spec.go | 76 +++++++++++++++++------------------ go.mod | 48 +++++++++++------------ go.sum | 100 +++++++++++++++++++++++------------------------ 3 files changed, 112 insertions(+), 112 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 85ae4ff6..6006d293 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -10390,7 +10390,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/fcgiApps" + "$ref": "#/definitions/fcgi_apps" }, "headers": { "Configuration-Version": { @@ -10417,7 +10417,7 @@ func init() { "in": "body", "required": true, "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, { @@ -10437,13 +10437,13 @@ func init() { "201": { "description": "Application created", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Reload-ID": { @@ -10491,7 +10491,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Configuration-Version": { @@ -10528,7 +10528,7 @@ func init() { "in": "body", "required": true, "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, { @@ -10548,13 +10548,13 @@ func init() { "200": { "description": "Application replaced", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Reload-ID": { @@ -30231,12 +30231,12 @@ func init() { } } }, - "fcgiApp": { + "fcgi_app": { "description": "App with all it's children resources", "type": "object", "allOf": [ { - "$ref": "#/definitions/fcgiAppBase" + "$ref": "#/definitions/fcgi_app_base" }, { "type": "object", @@ -30250,7 +30250,7 @@ func init() { ], "x-go-name": "FCGIApp" }, - "fcgiAppBase": { + "fcgi_app_base": { "description": "HAProxy FastCGI application configuration", "type": "object", "title": "FCGI application base", @@ -30287,7 +30287,7 @@ func init() { "type": "array", "items": { "x-go-name": "FCGIAppLogStderr", - "$ref": "#/definitions/fcgiLogStderr" + "$ref": "#/definitions/fcgi_log_stderr" }, "x-omitempty": true }, @@ -30320,7 +30320,7 @@ func init() { "type": "array", "items": { "x-go-name": "FCGIAppLogPassHeader", - "$ref": "#/definitions/fcgiPassHeader" + "$ref": "#/definitions/fcgi_pass_header" }, "x-omitempty": true }, @@ -30331,19 +30331,19 @@ func init() { "set_params": { "type": "array", "items": { - "$ref": "#/definitions/fcgiSetParam" + "$ref": "#/definitions/fcgi_set_param" }, "x-omitempty": true } } }, - "fcgiApps": { + "fcgi_apps": { "type": "array", "items": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, - "fcgiLogStderr": { + "fcgi_log_stderr": { "description": "Enables logging of STDERR messages that the FastCGI application reports.\nIt is an optional setting. By default, HAProxy Enterprise ignores STDERR messages.", "type": "object", "properties": { @@ -30404,7 +30404,7 @@ func init() { } } }, - "fcgiPassHeader": { + "fcgi_pass_header": { "description": "Specifies the name of a request header to pass to the FastCGI application.\nOptionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.\nMost request headers are already available to the FastCGI application with the prefix \"HTTP\".\nThus, you only need this directive to pass headers that are purposefully omitted.\nCurrently, the headers \"Authorization\", \"Proxy-Authorization\", and hop-by-hop headers are omitted.\nNote that the headers \"Content-type\" and \"Content-length\" never pass to the FastCGI application because they are already converted into parameters.", "type": "object", "properties": { @@ -30430,7 +30430,7 @@ func init() { } } }, - "fcgiSetParam": { + "fcgi_set_param": { "description": "Sets a FastCGI parameter to pass to this application.\nIts value, defined by \u003cformat\u003e can take a formatted string, the same as the log directive.\nOptionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.", "type": "object", "properties": { @@ -59578,7 +59578,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/fcgiApps" + "$ref": "#/definitions/fcgi_apps" }, "headers": { "Configuration-Version": { @@ -59614,7 +59614,7 @@ func init() { "in": "body", "required": true, "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, { @@ -59650,13 +59650,13 @@ func init() { "201": { "description": "Application created", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Reload-ID": { @@ -59739,7 +59739,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Configuration-Version": { @@ -59794,7 +59794,7 @@ func init() { "in": "body", "required": true, "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, { @@ -59830,13 +59830,13 @@ func init() { "200": { "description": "Application replaced", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" }, "headers": { "Reload-ID": { @@ -89775,12 +89775,12 @@ func init() { } } }, - "fcgiApp": { + "fcgi_app": { "description": "App with all it's children resources", "type": "object", "allOf": [ { - "$ref": "#/definitions/fcgiAppBase" + "$ref": "#/definitions/fcgi_app_base" }, { "type": "object", @@ -89794,7 +89794,7 @@ func init() { ], "x-go-name": "FCGIApp" }, - "fcgiAppBase": { + "fcgi_app_base": { "description": "HAProxy FastCGI application configuration", "type": "object", "title": "FCGI application base", @@ -89831,7 +89831,7 @@ func init() { "type": "array", "items": { "x-go-name": "FCGIAppLogStderr", - "$ref": "#/definitions/fcgiLogStderr" + "$ref": "#/definitions/fcgi_log_stderr" }, "x-omitempty": true }, @@ -89864,7 +89864,7 @@ func init() { "type": "array", "items": { "x-go-name": "FCGIAppLogPassHeader", - "$ref": "#/definitions/fcgiPassHeader" + "$ref": "#/definitions/fcgi_pass_header" }, "x-omitempty": true }, @@ -89875,19 +89875,19 @@ func init() { "set_params": { "type": "array", "items": { - "$ref": "#/definitions/fcgiSetParam" + "$ref": "#/definitions/fcgi_set_param" }, "x-omitempty": true } } }, - "fcgiApps": { + "fcgi_apps": { "type": "array", "items": { - "$ref": "#/definitions/fcgiApp" + "$ref": "#/definitions/fcgi_app" } }, - "fcgiLogStderr": { + "fcgi_log_stderr": { "description": "Enables logging of STDERR messages that the FastCGI application reports.\nIt is an optional setting. By default, HAProxy Enterprise ignores STDERR messages.", "type": "object", "properties": { @@ -89948,7 +89948,7 @@ func init() { } } }, - "fcgiPassHeader": { + "fcgi_pass_header": { "description": "Specifies the name of a request header to pass to the FastCGI application.\nOptionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.\nMost request headers are already available to the FastCGI application with the prefix \"HTTP\".\nThus, you only need this directive to pass headers that are purposefully omitted.\nCurrently, the headers \"Authorization\", \"Proxy-Authorization\", and hop-by-hop headers are omitted.\nNote that the headers \"Content-type\" and \"Content-length\" never pass to the FastCGI application because they are already converted into parameters.", "type": "object", "properties": { @@ -89974,7 +89974,7 @@ func init() { } } }, - "fcgiSetParam": { + "fcgi_set_param": { "description": "Sets a FastCGI parameter to pass to this application.\nIts value, defined by \u003cformat\u003e can take a formatted string, the same as the log directive.\nOptionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.", "type": "object", "properties": { diff --git a/go.mod b/go.mod index 84ea734a..4fd1e8c6 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.2.6 + github.com/haproxytech/client-native/v6 v6.2.7 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 @@ -96,9 +96,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 b506fb95..4352a178 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= @@ -114,8 +114,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.2.6 h1:8PDnjgZSTNtVdEbvc+UVBt+qnc98OQsCRr9cs5S8B44= -github.com/haproxytech/client-native/v6 v6.2.6/go.mod h1:TPITt8PJxk0kZgqr+0km0RY1iTGiEcHM3vfEwr8v/8A= +github.com/haproxytech/client-native/v6 v6.2.7 h1:6E2WUvC7uN+JgpF4koJYT4ArXdIIcCbCH5aUgJgQxNY= +github.com/haproxytech/client-native/v6 v6.2.7/go.mod h1:EcNcBJk3NqAT0q/xZZwVP9tSS6YDXJoM5+2h9/1gHks= 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= @@ -198,23 +198,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 481e75fbf144e520211a1f4468ee29dbd33c77c7 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Tue, 27 Jan 2026 15:11:25 +0100 Subject: [PATCH 20/42] TEST/MINOR: e2e: upgrade e2e tests to haproxy 3.2 --- .gitlab-ci.yml | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed5d2aa7..b6ef17c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -180,51 +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_3_0: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "3.0" -HAProxy_3_1: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "3.0" HAProxy_3_2: extends: .e2e parallel: matrix: - - TESTPART: ["1/2", "2/2"] + - TESTPART: ["1/4", "2/4", "3/4", "4/4"] HAPROXY_VERSION: "3.2" -HAProxy_3_3: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "3.3" From 9a2438badda8c0b7a7bc11be6e923d55bed6a8c2 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 28 Jan 2026 09:42:01 +0100 Subject: [PATCH 21/42] 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 eaad2422..b5dd7c75 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -40,3 +40,4 @@ allowed: - backport - dns - newcert + - uid 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 7f21f8dbc820c1b2493e570621876c65f74ff571 Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Thu, 19 Feb 2026 09:12:19 +0100 Subject: [PATCH 22/42] 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 b6ef17c6..2f748d5c 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 3927ccd481b464c804d3f2ea7e8fcfcb878988c0 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 25 Feb 2026 18:47:06 +0100 Subject: [PATCH 23/42] 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 161006be..6e953898 100644 --- a/configuration/examples/example-full.yaml +++ b/configuration/examples/example-full.yaml @@ -72,6 +72,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 a2e00e65820248f98c43cd58ec2c7754645739ab Mon Sep 17 00:00:00 2001 From: Andjelko Iharos Date: Wed, 4 Mar 2026 12:43:35 +0100 Subject: [PATCH 24/42] 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 817b8ef0af26f7ab85e2180f3714154f85877a2c Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Thu, 5 Mar 2026 10:43:51 +0100 Subject: [PATCH 25/42] BUG/MINOR: Return the correct error code when adding duplicates into a map file --- e2e/tests/acl_files/acl_file_entries.bats | 4 ++++ misc/misc.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/e2e/tests/acl_files/acl_file_entries.bats b/e2e/tests/acl_files/acl_file_entries.bats index 5d1588f8..403cdc72 100644 --- a/e2e/tests/acl_files/acl_file_entries.bats +++ b/e2e/tests/acl_files/acl_file_entries.bats @@ -57,6 +57,10 @@ load 'utils/_helpers' resource_post "$_RUNTIME_ACL_BASE_PATH/$PARENT_NAME/entries" "data/post.json" assert_equal "$SC" 201 assert_equal "$(get_json_path "${BODY}" " .value" )" "/js" + + # Adding the same entry twice should return a 409 error. + resource_post "$_RUNTIME_ACL_BASE_PATH/$PARENT_NAME/entries" "data/post.json" + assert_equal "$SC" 409 } @test "acl_runtime: Delete an ACL file entry by its ID" { diff --git a/misc/misc.go b/misc/misc.go index 31ecc8a6..b50347a9 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -102,6 +102,8 @@ func HandleError(err error) *models.Error { code := ErrHTTPInternalServerError if errors.Is(t, client_errors.ErrNotFound) { code = ErrHTTPNotFound + } else if errors.Is(t, client_errors.ErrAlreadyExists) { + code = ErrHTTPConflict } return &models.Error{Code: &code, Message: &msg} } From 527657bed99d5e5b363968e0d68dd4622af5677f Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 15:07:52 +0100 Subject: [PATCH 26/42] BUILD/MAJOR: go.mod: upgrade client-native and generate --- embedded_spec.go | 630 ++++++++++-------- go.mod | 45 +- go.sum | 98 +-- operations/crt_load/create_crt_load.go | 2 +- .../crt_load/create_crt_load_parameters.go | 18 +- .../crt_load/create_crt_load_urlbuilder.go | 18 +- operations/crt_load/delete_crt_load.go | 2 +- .../crt_load/delete_crt_load_parameters.go | 18 +- .../crt_load/delete_crt_load_urlbuilder.go | 16 +- operations/crt_load/get_crt_load.go | 2 +- .../crt_load/get_crt_load_parameters.go | 18 +- .../crt_load/get_crt_load_urlbuilder.go | 16 +- operations/crt_load/get_crt_loads.go | 2 +- .../crt_load/get_crt_loads_parameters.go | 18 +- .../crt_load/get_crt_loads_urlbuilder.go | 18 +- operations/crt_load/replace_crt_load.go | 2 +- .../crt_load/replace_crt_load_parameters.go | 18 +- .../crt_load/replace_crt_load_urlbuilder.go | 16 +- .../crt_store/create_crt_store_parameters.go | 37 + .../crt_store/create_crt_store_urlbuilder.go | 9 + .../crt_store/delete_crt_store_parameters.go | 37 + .../crt_store/delete_crt_store_urlbuilder.go | 9 + .../crt_store/edit_crt_store_parameters.go | 37 + .../crt_store/edit_crt_store_urlbuilder.go | 9 + .../crt_store/get_crt_store_parameters.go | 48 +- .../crt_store/get_crt_store_urlbuilder.go | 11 + .../crt_store/get_crt_stores_parameters.go | 48 +- .../crt_store/get_crt_stores_urlbuilder.go | 11 + operations/data_plane_api.go | 10 +- 29 files changed, 768 insertions(+), 455 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 6006d293..34a5926a 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -6050,7 +6050,101 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads": { + "/services/haproxy/configuration/crt_stores": { + "get": { + "description": "Returns an array of all the configured crt_store sections in HAProxy", + "tags": [ + "CrtStore" + ], + "summary": "Return all the Certificate Stores", + "operationId": "getCrtStores", + "parameters": [ + { + "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/full_section" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/crt_stores" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + }, + "post": { + "description": "Creates a new crt_store section", + "tags": [ + "CrtStore" + ], + "summary": "Add a new Certificate Store", + "operationId": "createCrtStore", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/crt_store" + } + }, + { + "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/version" + }, + { + "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" + } + ], + "responses": { + "201": { + "description": "Certificate Store created", + "schema": { + "$ref": "#/definitions/crt_store" + } + }, + "202": { + "description": "Configuration change accepted and reload requested", + "schema": { + "$ref": "#/definitions/crt_store" + }, + "headers": { + "Reload-ID": { + "type": "string", + "description": "ID of the requested reload" + } + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "409": { + "$ref": "#/responses/AlreadyExists" + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + } + }, + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads": { "get": { "description": "Returns the list of loaded certificates from the specified crt_store", "tags": [ @@ -6063,7 +6157,7 @@ func init() { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6100,7 +6194,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6152,7 +6246,7 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads/{certificate}": { + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}": { "get": { "description": "Returns one load entry by its certificate name in the specified crt_store", "tags": [ @@ -6172,7 +6266,7 @@ func init() { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6219,7 +6313,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6289,7 +6383,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6324,94 +6418,6 @@ func init() { } } }, - "/services/haproxy/configuration/crt_stores": { - "get": { - "description": "Returns an array of all the configured crt_store sections in HAProxy", - "tags": [ - "CrtStore" - ], - "summary": "Return all the Certificate Stores", - "operationId": "getCrtStores", - "parameters": [ - { - "$ref": "#/parameters/transaction_id" - } - ], - "responses": { - "200": { - "description": "Successful operation", - "schema": { - "$ref": "#/definitions/crt_stores" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } - }, - "default": { - "$ref": "#/responses/DefaultError" - } - } - }, - "post": { - "description": "Creates a new crt_store section", - "tags": [ - "CrtStore" - ], - "summary": "Add a new Certificate Store", - "operationId": "createCrtStore", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/crt_store" - } - }, - { - "$ref": "#/parameters/transaction_id" - }, - { - "$ref": "#/parameters/version" - }, - { - "$ref": "#/parameters/force_reload" - } - ], - "responses": { - "201": { - "description": "Certificate Store created", - "schema": { - "$ref": "#/definitions/crt_store" - } - }, - "202": { - "description": "Configuration change accepted and reload requested", - "schema": { - "$ref": "#/definitions/crt_store" - }, - "headers": { - "Reload-ID": { - "type": "string", - "description": "ID of the requested reload" - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "409": { - "$ref": "#/responses/AlreadyExists" - }, - "default": { - "$ref": "#/responses/DefaultError" - } - } - } - }, "/services/haproxy/configuration/crt_stores/{name}": { "get": { "description": "Returns crt_store section by its name", @@ -6430,6 +6436,9 @@ func init() { }, { "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -6484,6 +6493,9 @@ func init() { }, { "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -6539,6 +6551,9 @@ func init() { }, { "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -27244,8 +27259,8 @@ func init() { } }, "http_send_name_header": { + "description": "The header string to use to send the server name", "type": "string", - "x-display-name": "The header string to use to send the server name", "x-nullable": true }, "httpchk_params": { @@ -27648,7 +27663,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" } @@ -29011,6 +29026,26 @@ func init() { "x-omitempty": true }, "crt_store": { + "description": "Storage mechanism to load and store certificates used in the configuration", + "title": "Certificate Store", + "allOf": [ + { + "$ref": "#/definitions/crt_store_base" + }, + { + "type": "object", + "properties": { + "crt_loads": { + "additionalProperties": { + "$ref": "#/definitions/crt_load" + } + } + } + } + ], + "x-go-name": "CrtStore" + }, + "crt_store_base": { "description": "Storage mechanism to load and store certificates used in the configuration", "type": "object", "title": "Certificate Store", @@ -29026,9 +29061,6 @@ func init() { "description": "Default directory to fetch SSL private keys from", "type": "string" }, - "loads": { - "$ref": "#/definitions/crt_loads" - }, "metadata": { "additionalProperties": { "type": "object" @@ -29533,8 +29565,8 @@ func init() { ] }, "http_send_name_header": { + "description": "Add the server name to a request", "type": "string", - "x-display-name": "Add the server name to a request", "x-nullable": true }, "http_use_proxy_header": { @@ -29641,8 +29673,8 @@ func init() { "x-display-name": "Log ASAP" }, "max_keep_alive_queue": { + "description": "Maximum server queue size for maintaining keep-alive connections", "type": "integer", - "x-display-name": "Maximum server queue size for maintaining keep-alive connections", "x-nullable": true }, "maxconn": { @@ -29730,8 +29762,8 @@ func init() { "x-nullable": true }, "retry_on": { - "type": "string", - "x-display-name": "Specify when to attempt to automatically retry a failed request" + "description": "Specify when to attempt to automatically retry a failed request", + "type": "string" }, "server_fin_timeout": { "type": "integer", @@ -35296,9 +35328,9 @@ func init() { "x-nullable": false }, "timeout": { + "description": "Timeout to send an email in milliseconds", "type": "integer", "x-default-unit": "ms", - "x-display-name": "Timeout to send an email in milliseconds", "x-duration": true, "x-nullable": true } @@ -36374,6 +36406,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "x-default-unit": "ms", @@ -37099,10 +37135,11 @@ func init() { ], "properties": { "description": { - "type": "string", - "x-display-name": "The description is an optional description string of the ring" + "description": "The description is an optional description string of the ring", + "type": "string" }, "format": { + "description": "Format used to store events into the ring buffer", "type": "string", "enum": [ "iso", @@ -37113,12 +37150,11 @@ func init() { "short", "priority", "timed" - ], - "x-display-name": "Format used to store events into the ring buffer" + ] }, "maxlen": { + "description": "The maximum length of an event message stored into the ring", "type": "integer", - "x-display-name": "The maximum length of an event message stored into the ring", "x-nullable": true }, "metadata": { @@ -37132,8 +37168,8 @@ func init() { "x-nullable": false }, "size": { + "description": "Optional size in bytes for the ring-buffer", "type": "integer", - "x-display-name": "Optional size in bytes for the ring-buffer", "x-nullable": true, "x-size": true }, @@ -38516,7 +38552,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" } }, @@ -52571,35 +52607,35 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads": { + "/services/haproxy/configuration/crt_stores": { "get": { - "description": "Returns the list of loaded certificates from the specified crt_store", + "description": "Returns an array of all the configured crt_store sections in HAProxy", "tags": [ - "CrtLoad" + "CrtStore" ], - "summary": "Return an array of loaded certificates", - "operationId": "getCrtLoads", + "summary": "Return all the Certificate Stores", + "operationId": "getCrtStores", "parameters": [ - { - "type": "string", - "description": "Parent crt_store name", - "name": "crt_store", - "in": "query", - "required": true - }, { "type": "string", "x-nullable": false, "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/crt_loads" + "$ref": "#/definitions/crt_stores" }, "headers": { "Configuration-Version": { @@ -52623,26 +52659,19 @@ func init() { } }, "post": { - "description": "Adds a new load entry to the specified crt_store section in the configuration", + "description": "Creates a new crt_store section", "tags": [ - "CrtLoad" + "CrtStore" ], - "summary": "Add a new certificate to load", - "operationId": "createCrtLoad", + "summary": "Add a new Certificate Store", + "operationId": "createCrtStore", "parameters": [ - { - "type": "string", - "description": "Parent crt_store section name", - "name": "crt_store", - "in": "query", - "required": true - }, { "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" } }, { @@ -52665,19 +52694,26 @@ func init() { "description": "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.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { "201": { - "description": "Certificate load entry created", + "description": "Certificate Store created", "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" }, "headers": { "Reload-ID": { @@ -52725,27 +52761,20 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads/{certificate}": { + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads": { "get": { - "description": "Returns one load entry by its certificate name in the specified crt_store", + "description": "Returns the list of loaded certificates from the specified crt_store", "tags": [ "CrtLoad" ], - "summary": "Return one certificate load entry", - "operationId": "getCrtLoad", + "summary": "Return an array of loaded certificates", + "operationId": "getCrtLoads", "parameters": [ - { - "type": "string", - "description": "Certificate filename", - "name": "certificate", - "in": "path", - "required": true - }, { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -52760,19 +52789,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/crt_load" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } - }, - "404": { - "description": "The specified resource was not found", - "schema": { - "$ref": "#/definitions/error" + "$ref": "#/definitions/crt_loads" }, "headers": { "Configuration-Version": { @@ -52795,26 +52812,19 @@ func init() { } } }, - "put": { - "description": "Replaces a load entry by its certificate name in the specified crt_store section", + "post": { + "description": "Adds a new load entry to the specified crt_store section in the configuration", "tags": [ "CrtLoad" ], - "summary": "Replace a certificate load entry", - "operationId": "replaceCrtLoad", + "summary": "Add a new certificate to load", + "operationId": "createCrtLoad", "parameters": [ - { - "type": "string", - "description": "Certificate filename", - "name": "certificate", - "in": "path", - "required": true - }, { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -52848,8 +52858,8 @@ func init() { } ], "responses": { - "200": { - "description": "Certificate load entry replaced", + "201": { + "description": "Certificate load entry created", "schema": { "$ref": "#/definitions/crt_load" } @@ -52878,8 +52888,8 @@ func init() { } } }, - "404": { - "description": "The specified resource was not found", + "409": { + "description": "The specified resource already exists", "schema": { "$ref": "#/definitions/error" }, @@ -52903,14 +52913,16 @@ func init() { } } } - }, - "delete": { - "description": "Deletes a load entry by its certificate name in the specified crt_store section", + } + }, + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}": { + "get": { + "description": "Returns one load entry by its certificate name in the specified crt_store", "tags": [ "CrtLoad" ], - "summary": "Delete a certificate load entry", - "operationId": "deleteCrtLoad", + "summary": "Return one certificate load entry", + "operationId": "getCrtLoad", "parameters": [ { "type": "string", @@ -52921,9 +52933,9 @@ func init() { }, { "type": "string", - "description": "Parent crt_store section name", + "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -52932,35 +52944,21 @@ func init() { "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" - }, - { - "type": "integer", - "x-nullable": false, - "description": "Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version.", - "name": "version", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "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.", - "name": "force_reload", - "in": "query" } ], "responses": { - "202": { - "description": "Configuration change accepted and reload requested", + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/crt_load" + }, "headers": { - "Reload-ID": { + "Configuration-Version": { "type": "string", - "description": "ID of the requested reload" + "description": "Configuration file version" } } }, - "204": { - "description": "Certificate load entry deleted" - }, "404": { "description": "The specified resource was not found", "schema": { @@ -52986,30 +52984,94 @@ func init() { } } } - } - }, - "/services/haproxy/configuration/crt_stores": { - "get": { - "description": "Returns an array of all the configured crt_store sections in HAProxy", + }, + "put": { + "description": "Replaces a load entry by its certificate name in the specified crt_store section", "tags": [ - "CrtStore" + "CrtLoad" ], - "summary": "Return all the Certificate Stores", - "operationId": "getCrtStores", + "summary": "Replace a certificate load entry", + "operationId": "replaceCrtLoad", "parameters": [ + { + "type": "string", + "description": "Certificate filename", + "name": "certificate", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Parent crt_store section name", + "name": "crt_store", + "in": "path", + "required": true + }, + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/crt_load" + } + }, { "type": "string", "x-nullable": false, "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "integer", + "x-nullable": false, + "description": "Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version.", + "name": "version", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "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.", + "name": "force_reload", + "in": "query" } ], "responses": { "200": { - "description": "Successful operation", + "description": "Certificate load entry replaced", "schema": { - "$ref": "#/definitions/crt_stores" + "$ref": "#/definitions/crt_load" + } + }, + "202": { + "description": "Configuration change accepted and reload requested", + "schema": { + "$ref": "#/definitions/crt_load" + }, + "headers": { + "Reload-ID": { + "type": "string", + "description": "ID of the requested reload" + } + } + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "404": { + "description": "The specified resource was not found", + "schema": { + "$ref": "#/definitions/error" }, "headers": { "Configuration-Version": { @@ -53032,21 +53094,27 @@ func init() { } } }, - "post": { - "description": "Creates a new crt_store section", + "delete": { + "description": "Deletes a load entry by its certificate name in the specified crt_store section", "tags": [ - "CrtStore" + "CrtLoad" ], - "summary": "Add a new Certificate Store", - "operationId": "createCrtStore", + "summary": "Delete a certificate load entry", + "operationId": "deleteCrtLoad", "parameters": [ { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/crt_store" - } + "type": "string", + "description": "Certificate filename", + "name": "certificate", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Parent crt_store section name", + "name": "crt_store", + "in": "path", + "required": true }, { "type": "string", @@ -53071,17 +53139,8 @@ func init() { } ], "responses": { - "201": { - "description": "Certificate Store created", - "schema": { - "$ref": "#/definitions/crt_store" - } - }, "202": { "description": "Configuration change accepted and reload requested", - "schema": { - "$ref": "#/definitions/crt_store" - }, "headers": { "Reload-ID": { "type": "string", @@ -53089,20 +53148,11 @@ func init() { } } }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/error" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } + "204": { + "description": "Certificate load entry deleted" }, - "409": { - "description": "The specified resource already exists", + "404": { + "description": "The specified resource was not found", "schema": { "$ref": "#/definitions/error" }, @@ -53150,6 +53200,13 @@ func init() { "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -53234,6 +53291,13 @@ func init() { "description": "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.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -53328,6 +53392,13 @@ func init() { "description": "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.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -86861,8 +86932,8 @@ func init() { } }, "http_send_name_header": { + "description": "The header string to use to send the server name", "type": "string", - "x-display-name": "The header string to use to send the server name", "x-nullable": true }, "httpchk_params": { @@ -87246,7 +87317,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" } @@ -88573,6 +88644,26 @@ func init() { "x-omitempty": true }, "crt_store": { + "description": "Storage mechanism to load and store certificates used in the configuration", + "title": "Certificate Store", + "allOf": [ + { + "$ref": "#/definitions/crt_store_base" + }, + { + "type": "object", + "properties": { + "crt_loads": { + "additionalProperties": { + "$ref": "#/definitions/crt_load" + } + } + } + } + ], + "x-go-name": "CrtStore" + }, + "crt_store_base": { "description": "Storage mechanism to load and store certificates used in the configuration", "type": "object", "title": "Certificate Store", @@ -88588,9 +88679,6 @@ func init() { "description": "Default directory to fetch SSL private keys from", "type": "string" }, - "loads": { - "$ref": "#/definitions/crt_loads" - }, "metadata": { "additionalProperties": { "type": "object" @@ -89102,8 +89190,8 @@ func init() { ] }, "http_send_name_header": { + "description": "Add the server name to a request", "type": "string", - "x-display-name": "Add the server name to a request", "x-nullable": true }, "http_use_proxy_header": { @@ -89210,8 +89298,8 @@ func init() { "x-display-name": "Log ASAP" }, "max_keep_alive_queue": { + "description": "Maximum server queue size for maintaining keep-alive connections", "type": "integer", - "x-display-name": "Maximum server queue size for maintaining keep-alive connections", "x-nullable": true }, "maxconn": { @@ -89300,8 +89388,8 @@ func init() { "x-nullable": true }, "retry_on": { - "type": "string", - "x-display-name": "Specify when to attempt to automatically retry a failed request" + "description": "Specify when to attempt to automatically retry a failed request", + "type": "string" }, "server_fin_timeout": { "type": "integer", @@ -94713,10 +94801,10 @@ func init() { "x-nullable": false }, "timeout": { + "description": "Timeout to send an email in milliseconds", "type": "integer", "minimum": 0, "x-default-unit": "ms", - "x-display-name": "Timeout to send an email in milliseconds", "x-duration": true, "x-nullable": true } @@ -95792,6 +95880,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "minimum": 0, @@ -96526,10 +96618,11 @@ func init() { ], "properties": { "description": { - "type": "string", - "x-display-name": "The description is an optional description string of the ring" + "description": "The description is an optional description string of the ring", + "type": "string" }, "format": { + "description": "Format used to store events into the ring buffer", "type": "string", "enum": [ "iso", @@ -96540,12 +96633,11 @@ func init() { "short", "priority", "timed" - ], - "x-display-name": "Format used to store events into the ring buffer" + ] }, "maxlen": { + "description": "The maximum length of an event message stored into the ring", "type": "integer", - "x-display-name": "The maximum length of an event message stored into the ring", "x-nullable": true }, "metadata": { @@ -96559,9 +96651,9 @@ func init() { "x-nullable": false }, "size": { + "description": "Optional size in bytes for the ring-buffer", "type": "integer", "minimum": 0, - "x-display-name": "Optional size in bytes for the ring-buffer", "x-nullable": true, "x-size": true }, @@ -97960,7 +98052,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 4fd1e8c6..528379fb 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.2.7 + github.com/haproxytech/client-native/v6 v6.2.9 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,19 +61,20 @@ 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/client-native/v5 v5.1.15 // 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 @@ -96,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 4352a178..9534d29c 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= @@ -114,8 +114,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.2.7 h1:6E2WUvC7uN+JgpF4koJYT4ArXdIIcCbCH5aUgJgQxNY= -github.com/haproxytech/client-native/v6 v6.2.7/go.mod h1:EcNcBJk3NqAT0q/xZZwVP9tSS6YDXJoM5+2h9/1gHks= +github.com/haproxytech/client-native/v5 v5.1.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= +github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= +github.com/haproxytech/client-native/v6 v6.2.9 h1:I7kkc+ZTrLpHdSfrdlOBLVIGtFvXZBkydEDdA/cuTeY= +github.com/haproxytech/client-native/v6 v6.2.9/go.mod h1:LLsyuWfRABFURZkBcXroJ6hQOs3kgTj8ePyfyg9AZ1g= 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= @@ -198,23 +200,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= diff --git a/operations/crt_load/create_crt_load.go b/operations/crt_load/create_crt_load.go index 983a7b94..0321de72 100644 --- a/operations/crt_load/create_crt_load.go +++ b/operations/crt_load/create_crt_load.go @@ -45,7 +45,7 @@ func NewCreateCrtLoad(ctx *middleware.Context, handler CreateCrtLoadHandler) *Cr } /* - CreateCrtLoad swagger:route POST /services/haproxy/configuration/crt_loads CrtLoad createCrtLoad + CreateCrtLoad swagger:route POST /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads CrtLoad createCrtLoad # Add a new certificate to load diff --git a/operations/crt_load/create_crt_load_parameters.go b/operations/crt_load/create_crt_load_parameters.go index b42ab7c7..fcd8782e 100644 --- a/operations/crt_load/create_crt_load_parameters.go +++ b/operations/crt_load/create_crt_load_parameters.go @@ -29,7 +29,6 @@ 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" ) @@ -60,7 +59,7 @@ type CreateCrtLoadParams struct { /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /* @@ -94,8 +93,8 @@ func (o *CreateCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat qs := runtime.Values(r.URL.Query()) - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -142,22 +141,15 @@ func (o *CreateCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *CreateCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/create_crt_load_urlbuilder.go b/operations/crt_load/create_crt_load_urlbuilder.go index dd55a56d..86306092 100644 --- a/operations/crt_load/create_crt_load_urlbuilder.go +++ b/operations/crt_load/create_crt_load_urlbuilder.go @@ -24,13 +24,15 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" "github.com/go-openapi/swag" ) // CreateCrtLoadURL generates an URL for the create crt load operation type CreateCrtLoadURL struct { - CrtStore string + CrtStore string + ForceReload *bool TransactionID *string Version *int64 @@ -59,7 +61,14 @@ func (o *CreateCrtLoadURL) SetBasePath(bp string) { func (o *CreateCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads" + + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on CreateCrtLoadURL") + } _basePath := o._basePath if _basePath == "" { @@ -69,11 +78,6 @@ func (o *CreateCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_load/delete_crt_load.go b/operations/crt_load/delete_crt_load.go index 9010ee78..46bbf125 100644 --- a/operations/crt_load/delete_crt_load.go +++ b/operations/crt_load/delete_crt_load.go @@ -45,7 +45,7 @@ func NewDeleteCrtLoad(ctx *middleware.Context, handler DeleteCrtLoadHandler) *De } /* - DeleteCrtLoad swagger:route DELETE /services/haproxy/configuration/crt_loads/{certificate} CrtLoad deleteCrtLoad + DeleteCrtLoad swagger:route DELETE /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad deleteCrtLoad # Delete a certificate load entry diff --git a/operations/crt_load/delete_crt_load_parameters.go b/operations/crt_load/delete_crt_load_parameters.go index 933bb82a..9474d4a1 100644 --- a/operations/crt_load/delete_crt_load_parameters.go +++ b/operations/crt_load/delete_crt_load_parameters.go @@ -28,7 +28,6 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // NewDeleteCrtLoadParams creates a new DeleteCrtLoadParams object @@ -62,7 +61,7 @@ type DeleteCrtLoadParams struct { Certificate string /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /*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. @@ -96,8 +95,8 @@ func (o *DeleteCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -135,22 +134,15 @@ func (o *DeleteCrtLoadParams) bindCertificate(rawData []string, hasKey bool, for return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *DeleteCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/delete_crt_load_urlbuilder.go b/operations/crt_load/delete_crt_load_urlbuilder.go index a2f29b39..5d4893dc 100644 --- a/operations/crt_load/delete_crt_load_urlbuilder.go +++ b/operations/crt_load/delete_crt_load_urlbuilder.go @@ -32,8 +32,8 @@ import ( // DeleteCrtLoadURL generates an URL for the delete crt load operation type DeleteCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string ForceReload *bool TransactionID *string Version *int64 @@ -62,7 +62,7 @@ func (o *DeleteCrtLoadURL) SetBasePath(bp string) { func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -71,6 +71,13 @@ func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on DeleteCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on DeleteCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -79,11 +86,6 @@ func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_load/get_crt_load.go b/operations/crt_load/get_crt_load.go index 8645a381..aea645fd 100644 --- a/operations/crt_load/get_crt_load.go +++ b/operations/crt_load/get_crt_load.go @@ -45,7 +45,7 @@ func NewGetCrtLoad(ctx *middleware.Context, handler GetCrtLoadHandler) *GetCrtLo } /* - GetCrtLoad swagger:route GET /services/haproxy/configuration/crt_loads/{certificate} CrtLoad getCrtLoad + GetCrtLoad swagger:route GET /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad getCrtLoad # Return one certificate load entry diff --git a/operations/crt_load/get_crt_load_parameters.go b/operations/crt_load/get_crt_load_parameters.go index 3f1e4603..36461a8a 100644 --- a/operations/crt_load/get_crt_load_parameters.go +++ b/operations/crt_load/get_crt_load_parameters.go @@ -27,7 +27,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" ) // NewGetCrtLoadParams creates a new GetCrtLoadParams object @@ -54,7 +53,7 @@ type GetCrtLoadParams struct { Certificate string /*Parent crt_store name Required: true - In: query + In: path */ CrtStore string /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. @@ -79,8 +78,8 @@ func (o *GetCrtLoadParams) BindRequest(r *http.Request, route *middleware.Matche res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -108,22 +107,15 @@ func (o *GetCrtLoadParams) bindCertificate(rawData []string, hasKey bool, format return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *GetCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/get_crt_load_urlbuilder.go b/operations/crt_load/get_crt_load_urlbuilder.go index 85418e77..500b3d66 100644 --- a/operations/crt_load/get_crt_load_urlbuilder.go +++ b/operations/crt_load/get_crt_load_urlbuilder.go @@ -30,8 +30,8 @@ import ( // GetCrtLoadURL generates an URL for the get crt load operation type GetCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string TransactionID *string _basePath string @@ -58,7 +58,7 @@ func (o *GetCrtLoadURL) SetBasePath(bp string) { func (o *GetCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -67,6 +67,13 @@ func (o *GetCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on GetCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on GetCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -75,11 +82,6 @@ func (o *GetCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_load/get_crt_loads.go b/operations/crt_load/get_crt_loads.go index 92f750fe..a31d8450 100644 --- a/operations/crt_load/get_crt_loads.go +++ b/operations/crt_load/get_crt_loads.go @@ -45,7 +45,7 @@ func NewGetCrtLoads(ctx *middleware.Context, handler GetCrtLoadsHandler) *GetCrt } /* - GetCrtLoads swagger:route GET /services/haproxy/configuration/crt_loads CrtLoad getCrtLoads + GetCrtLoads swagger:route GET /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads CrtLoad getCrtLoads # Return an array of loaded certificates diff --git a/operations/crt_load/get_crt_loads_parameters.go b/operations/crt_load/get_crt_loads_parameters.go index 8df3b42b..15f88eea 100644 --- a/operations/crt_load/get_crt_loads_parameters.go +++ b/operations/crt_load/get_crt_loads_parameters.go @@ -27,7 +27,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" ) // NewGetCrtLoadsParams creates a new GetCrtLoadsParams object @@ -49,7 +48,7 @@ type GetCrtLoadsParams struct { /*Parent crt_store name Required: true - In: query + In: path */ CrtStore string /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. @@ -69,8 +68,8 @@ func (o *GetCrtLoadsParams) BindRequest(r *http.Request, route *middleware.Match qs := runtime.Values(r.URL.Query()) - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -84,22 +83,15 @@ func (o *GetCrtLoadsParams) BindRequest(r *http.Request, route *middleware.Match return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *GetCrtLoadsParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/get_crt_loads_urlbuilder.go b/operations/crt_load/get_crt_loads_urlbuilder.go index d7d9dc24..0f639444 100644 --- a/operations/crt_load/get_crt_loads_urlbuilder.go +++ b/operations/crt_load/get_crt_loads_urlbuilder.go @@ -24,11 +24,13 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) // GetCrtLoadsURL generates an URL for the get crt loads operation type GetCrtLoadsURL struct { - CrtStore string + CrtStore string + TransactionID *string _basePath string @@ -55,7 +57,14 @@ func (o *GetCrtLoadsURL) SetBasePath(bp string) { func (o *GetCrtLoadsURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads" + + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on GetCrtLoadsURL") + } _basePath := o._basePath if _basePath == "" { @@ -65,11 +74,6 @@ func (o *GetCrtLoadsURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_load/replace_crt_load.go b/operations/crt_load/replace_crt_load.go index 3947740f..9d26ef17 100644 --- a/operations/crt_load/replace_crt_load.go +++ b/operations/crt_load/replace_crt_load.go @@ -45,7 +45,7 @@ func NewReplaceCrtLoad(ctx *middleware.Context, handler ReplaceCrtLoadHandler) * } /* - ReplaceCrtLoad swagger:route PUT /services/haproxy/configuration/crt_loads/{certificate} CrtLoad replaceCrtLoad + ReplaceCrtLoad swagger:route PUT /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad replaceCrtLoad # Replace a certificate load entry diff --git a/operations/crt_load/replace_crt_load_parameters.go b/operations/crt_load/replace_crt_load_parameters.go index a02980b1..36c25f2d 100644 --- a/operations/crt_load/replace_crt_load_parameters.go +++ b/operations/crt_load/replace_crt_load_parameters.go @@ -29,7 +29,6 @@ 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" ) @@ -65,7 +64,7 @@ type ReplaceCrtLoadParams struct { Certificate string /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /* @@ -104,8 +103,8 @@ func (o *ReplaceCrtLoadParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -166,22 +165,15 @@ func (o *ReplaceCrtLoadParams) bindCertificate(rawData []string, hasKey bool, fo return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *ReplaceCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/replace_crt_load_urlbuilder.go b/operations/crt_load/replace_crt_load_urlbuilder.go index 8fbfad4b..a3d8b716 100644 --- a/operations/crt_load/replace_crt_load_urlbuilder.go +++ b/operations/crt_load/replace_crt_load_urlbuilder.go @@ -32,8 +32,8 @@ import ( // ReplaceCrtLoadURL generates an URL for the replace crt load operation type ReplaceCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string ForceReload *bool TransactionID *string Version *int64 @@ -62,7 +62,7 @@ func (o *ReplaceCrtLoadURL) SetBasePath(bp string) { func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -71,6 +71,13 @@ func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on ReplaceCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on ReplaceCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -79,11 +86,6 @@ func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_store/create_crt_store_parameters.go b/operations/crt_store/create_crt_store_parameters.go index 74f66a48..0da9cb92 100644 --- a/operations/crt_store/create_crt_store_parameters.go +++ b/operations/crt_store/create_crt_store_parameters.go @@ -41,10 +41,13 @@ func NewCreateCrtStoreParams() CreateCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return CreateCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -67,6 +70,11 @@ type CreateCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. In: query */ @@ -116,6 +124,11 @@ func (o *CreateCrtStoreParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id") if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil { res = append(res, err) @@ -155,6 +168,30 @@ func (o *CreateCrtStoreParams) bindForceReload(rawData []string, hasKey bool, fo return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *CreateCrtStoreParams) bindFullSection(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 NewCreateCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindTransactionID binds and validates parameter TransactionID from query. func (o *CreateCrtStoreParams) bindTransactionID(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/create_crt_store_urlbuilder.go b/operations/crt_store/create_crt_store_urlbuilder.go index 1701a055..7bbc939b 100644 --- a/operations/crt_store/create_crt_store_urlbuilder.go +++ b/operations/crt_store/create_crt_store_urlbuilder.go @@ -31,6 +31,7 @@ import ( // CreateCrtStoreURL generates an URL for the create crt store operation type CreateCrtStoreURL struct { ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -76,6 +77,14 @@ func (o *CreateCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/delete_crt_store_parameters.go b/operations/crt_store/delete_crt_store_parameters.go index 4d40a3a9..f1eabaaf 100644 --- a/operations/crt_store/delete_crt_store_parameters.go +++ b/operations/crt_store/delete_crt_store_parameters.go @@ -38,10 +38,13 @@ func NewDeleteCrtStoreParams() DeleteCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return DeleteCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -59,6 +62,11 @@ type DeleteCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -90,6 +98,11 @@ func (o *DeleteCrtStoreParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -134,6 +147,30 @@ func (o *DeleteCrtStoreParams) bindForceReload(rawData []string, hasKey bool, fo return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *DeleteCrtStoreParams) bindFullSection(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 NewDeleteCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *DeleteCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/delete_crt_store_urlbuilder.go b/operations/crt_store/delete_crt_store_urlbuilder.go index 907ce75d..6c8bf776 100644 --- a/operations/crt_store/delete_crt_store_urlbuilder.go +++ b/operations/crt_store/delete_crt_store_urlbuilder.go @@ -34,6 +34,7 @@ type DeleteCrtStoreURL struct { Name string ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -86,6 +87,14 @@ func (o *DeleteCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/edit_crt_store_parameters.go b/operations/crt_store/edit_crt_store_parameters.go index e1a6c098..f34e9d1c 100644 --- a/operations/crt_store/edit_crt_store_parameters.go +++ b/operations/crt_store/edit_crt_store_parameters.go @@ -41,10 +41,13 @@ func NewEditCrtStoreParams() EditCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return EditCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -67,6 +70,11 @@ type EditCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -121,6 +129,11 @@ func (o *EditCrtStoreParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -165,6 +178,30 @@ func (o *EditCrtStoreParams) bindForceReload(rawData []string, hasKey bool, form return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *EditCrtStoreParams) bindFullSection(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 NewEditCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *EditCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/edit_crt_store_urlbuilder.go b/operations/crt_store/edit_crt_store_urlbuilder.go index bd409ac0..f3f6e1d9 100644 --- a/operations/crt_store/edit_crt_store_urlbuilder.go +++ b/operations/crt_store/edit_crt_store_urlbuilder.go @@ -34,6 +34,7 @@ type EditCrtStoreURL struct { Name string ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -86,6 +87,14 @@ func (o *EditCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/get_crt_store_parameters.go b/operations/crt_store/get_crt_store_parameters.go index e24fe0b8..783defde 100644 --- a/operations/crt_store/get_crt_store_parameters.go +++ b/operations/crt_store/get_crt_store_parameters.go @@ -27,14 +27,22 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetCrtStoreParams creates a new GetCrtStoreParams object -// -// There are no default values defined in the spec. +// with the default values initialized. func NewGetCrtStoreParams() GetCrtStoreParams { - return GetCrtStoreParams{} + var ( + // initialize parameters with default values + + fullSectionDefault = bool(false) + ) + + return GetCrtStoreParams{ + FullSection: &fullSectionDefault, + } } // GetCrtStoreParams contains all the bound params for the get crt store operation @@ -46,6 +54,11 @@ type GetCrtStoreParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -68,6 +81,11 @@ func (o *GetCrtStoreParams) BindRequest(r *http.Request, route *middleware.Match qs := runtime.Values(r.URL.Query()) + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -83,6 +101,30 @@ func (o *GetCrtStoreParams) BindRequest(r *http.Request, route *middleware.Match return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *GetCrtStoreParams) bindFullSection(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 NewGetCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *GetCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/get_crt_store_urlbuilder.go b/operations/crt_store/get_crt_store_urlbuilder.go index cbafc2db..a8961784 100644 --- a/operations/crt_store/get_crt_store_urlbuilder.go +++ b/operations/crt_store/get_crt_store_urlbuilder.go @@ -25,12 +25,15 @@ import ( "net/url" golangswaggerpaths "path" "strings" + + "github.com/go-openapi/swag" ) // GetCrtStoreURL generates an URL for the get crt store operation type GetCrtStoreURL struct { Name string + FullSection *bool TransactionID *string _basePath string @@ -74,6 +77,14 @@ func (o *GetCrtStoreURL) Build() (*url.URL, error) { qs := make(url.Values) + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/get_crt_stores_parameters.go b/operations/crt_store/get_crt_stores_parameters.go index 7a9fe822..71f4869a 100644 --- a/operations/crt_store/get_crt_stores_parameters.go +++ b/operations/crt_store/get_crt_stores_parameters.go @@ -27,14 +27,22 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetCrtStoresParams creates a new GetCrtStoresParams object -// -// There are no default values defined in the spec. +// with the default values initialized. func NewGetCrtStoresParams() GetCrtStoresParams { - return GetCrtStoresParams{} + var ( + // initialize parameters with default values + + fullSectionDefault = bool(false) + ) + + return GetCrtStoresParams{ + FullSection: &fullSectionDefault, + } } // GetCrtStoresParams contains all the bound params for the get crt stores operation @@ -46,6 +54,11 @@ type GetCrtStoresParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. In: query */ @@ -63,6 +76,11 @@ func (o *GetCrtStoresParams) BindRequest(r *http.Request, route *middleware.Matc qs := runtime.Values(r.URL.Query()) + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id") if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil { res = append(res, err) @@ -73,6 +91,30 @@ func (o *GetCrtStoresParams) BindRequest(r *http.Request, route *middleware.Matc return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *GetCrtStoresParams) bindFullSection(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 NewGetCrtStoresParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindTransactionID binds and validates parameter TransactionID from query. func (o *GetCrtStoresParams) bindTransactionID(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/get_crt_stores_urlbuilder.go b/operations/crt_store/get_crt_stores_urlbuilder.go index ab7c0f86..44e8eae9 100644 --- a/operations/crt_store/get_crt_stores_urlbuilder.go +++ b/operations/crt_store/get_crt_stores_urlbuilder.go @@ -24,10 +24,13 @@ import ( "errors" "net/url" golangswaggerpaths "path" + + "github.com/go-openapi/swag" ) // GetCrtStoresURL generates an URL for the get crt stores operation type GetCrtStoresURL struct { + FullSection *bool TransactionID *string _basePath string @@ -64,6 +67,14 @@ func (o *GetCrtStoresURL) Build() (*url.URL, error) { qs := make(url.Values) + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index ab8ede94..813d4afa 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -4893,7 +4893,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } - o.handlers["POST"]["/services/haproxy/configuration/crt_loads"] = crt_load.NewCreateCrtLoad(o.context, o.CrtLoadCreateCrtLoadHandler) + o.handlers["POST"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads"] = crt_load.NewCreateCrtLoad(o.context, o.CrtLoadCreateCrtLoadHandler) if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } @@ -5253,7 +5253,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["DELETE"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewDeleteCrtLoad(o.context, o.CrtLoadDeleteCrtLoadHandler) + o.handlers["DELETE"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewDeleteCrtLoad(o.context, o.CrtLoadDeleteCrtLoadHandler) if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } @@ -5925,11 +5925,11 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewGetCrtLoad(o.context, o.CrtLoadGetCrtLoadHandler) + o.handlers["GET"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewGetCrtLoad(o.context, o.CrtLoadGetCrtLoadHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/services/haproxy/configuration/crt_loads"] = crt_load.NewGetCrtLoads(o.context, o.CrtLoadGetCrtLoadsHandler) + o.handlers["GET"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads"] = crt_load.NewGetCrtLoads(o.context, o.CrtLoadGetCrtLoadsHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } @@ -6633,7 +6633,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } - o.handlers["PUT"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewReplaceCrtLoad(o.context, o.CrtLoadReplaceCrtLoadHandler) + o.handlers["PUT"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewReplaceCrtLoad(o.context, o.CrtLoadReplaceCrtLoadHandler) if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } From f9a2ed4722904d2ffe7cab3eecbd044eb73db434 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 15:08:24 +0100 Subject: [PATCH 27/42] TEST/MEDIUM: crt_list: move crt list tests to proper url --- .aspell.yml | 1 + e2e/tests/crt_store/crt_store.bats | 22 +++++++++++----------- e2e/tests/crt_store/utils/_helpers.bash | 1 - 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index b5dd7c75..0bb14d65 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -41,3 +41,4 @@ allowed: - dns - newcert - uid + - url diff --git a/e2e/tests/crt_store/crt_store.bats b/e2e/tests/crt_store/crt_store.bats index 83e5424f..ce188d53 100644 --- a/e2e/tests/crt_store/crt_store.bats +++ b/e2e/tests/crt_store/crt_store.bats @@ -50,36 +50,36 @@ load 'utils/_helpers' assert_equal "$SC" "200" assert_equal "$_STORE_NAME" "$(get_json_path "$BODY" .[0].name)" - resource_post "$_CRT_LOAD_PATH" "data/post_entry1.json" "crt_store=$_STORE_NAME" + resource_post "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" "data/post_entry1.json" assert_equal "$SC" "202" - resource_post "$_CRT_LOAD_PATH" "data/post_entry2.json" "crt_store=$_STORE_NAME" + resource_post "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" "data/post_entry2.json" assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c1.pem" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c1.pem" assert_equal "$SC" "200" assert_equal "c1.pem" "$(get_json_path "$BODY" .certificate)" assert_equal "k1.pem" "$(get_json_path "$BODY" .key)" assert_equal "disabled" "$(get_json_path "$BODY" .ocsp_update)" - resource_get "$_CRT_LOAD_PATH" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" assert_equal "$SC" "200" assert_equal "2" "$(get_json_path "$BODY" '.|length')" assert_equal "c1.pem" "$(get_json_path "$BODY" .[0].certificate)" assert_equal "c2.pem" "$(get_json_path "$BODY" .[1].certificate)" - resource_put "$_CRT_LOAD_PATH/c2.pem" "data/put_entry.json" \ + resource_put "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" "data/put_entry.json" \ "crt_store=$_STORE_NAME" "force_reload=true" assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" assert_equal "c2.pem" "$(get_json_path "$BODY" .certificate)" assert_equal "disabled" "$(get_json_path "$BODY" .ocsp_update)" assert_equal "example.com" "$(get_json_path "$BODY" .alias)" - resource_delete "$_CRT_LOAD_PATH/c1.pem" "crt_store=$_STORE_NAME" "force_reload=true" - assert_equal "$SC" "202" - resource_delete "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" "force_reload=true" - assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" + resource_delete "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c1.pem" "force_reload=true" + assert_equal "$SC" "204" + resource_delete "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" "force_reload=true" + assert_equal "$SC" "204" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" assert_equal "$SC" "404" resource_delete "$_CRT_STORE_PATH/$_STORE_NAME" "force_reload=true" diff --git a/e2e/tests/crt_store/utils/_helpers.bash b/e2e/tests/crt_store/utils/_helpers.bash index 1f173716..d1ba445c 100644 --- a/e2e/tests/crt_store/utils/_helpers.bash +++ b/e2e/tests/crt_store/utils/_helpers.bash @@ -17,4 +17,3 @@ _STORE_NAME="test_store1" _CRT_STORE_PATH="/services/haproxy/configuration/crt_stores" -_CRT_LOAD_PATH="/services/haproxy/configuration/crt_loads" From c6ac03bc4c3ed3c25e00870e482f52f86b4bc17f Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 15:40:00 +0100 Subject: [PATCH 28/42] 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 2f748d5c..24e4d35c 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 528379fb..46aa0875 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 e9891a24f23cac90096a58501b9ab985c3c4aa2d Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 17:15:36 +0100 Subject: [PATCH 29/42] 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/aws_service_discovery_instance.go | 3 +- .../consul_service_discovery_instance.go | 5 +-- 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/quic_initial_rule.go | 14 ++++--- handlers/runtime_server_test.go | 41 +++++++++---------- handlers/server.go | 10 ++--- handlers/spoe_transaction.go | 2 +- handlers/ssl_cert_storage.go | 2 +- handlers/ssl_crt_list_storage.go | 2 +- handlers/transaction.go | 8 ++-- misc/misc.go | 17 +------- runtime/commands/stack.go | 7 ++-- 22 files changed, 104 insertions(+), 117 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/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 433f3185..f2dfb226 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -31,7 +31,6 @@ import ( "github.com/haproxytech/dataplaneapi/haproxy" "github.com/haproxytech/dataplaneapi/log" - "github.com/haproxytech/dataplaneapi/misc" ) const ( @@ -94,7 +93,7 @@ func (a awsService) GetServers() (servers []configuration.ServiceServer) { var port *int64 if parsedPort > 0 { - port = misc.Int64P(parsedPort) + port = new(int64(parsedPort)) } servers = append(servers, configuration.ServiceServer{ diff --git a/discovery/consul_service_discovery_instance.go b/discovery/consul_service_discovery_instance.go index 6b68eadd..554af67d 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -29,7 +29,6 @@ import ( "github.com/haproxytech/client-native/v6/models" "github.com/haproxytech/dataplaneapi/log" - "github.com/haproxytech/dataplaneapi/misc" jsoniter "github.com/json-iterator/go" ) @@ -184,7 +183,7 @@ func (c *consulInstance) convertToServers(nodes []*serviceEntry) []configuration Address: node.Service.Address, } if node.Service.Port > 0 { - ss.Port = misc.Int64P(node.Service.Port) + ss.Port = new(int64(node.Service.Port)) } servers = append(servers, ss) } else { @@ -192,7 +191,7 @@ func (c *consulInstance) convertToServers(nodes []*serviceEntry) []configuration Address: node.Node.Address, } if node.Service.Port > 0 { - ss.Port = misc.Int64P(node.Service.Port) + ss.Port = new(int64(node.Service.Port)) } servers = append(servers, ss) } 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/quic_initial_rule.go b/handlers/quic_initial_rule.go index a6c6493e..7b9c4a37 100644 --- a/handlers/quic_initial_rule.go +++ b/handlers/quic_initial_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 CreateQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParent 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 quic_initial_rule.NewCreateQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } @@ -80,8 +82,8 @@ func (d DeleteQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParent 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 quic_initial_rule.NewDeleteQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } @@ -183,8 +185,8 @@ func (r ReplaceQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParen 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 quic_initial_rule.NewReplaceQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/runtime_server_test.go b/handlers/runtime_server_test.go index 8b39597f..285f2011 100644 --- a/handlers/runtime_server_test.go +++ b/handlers/runtime_server_test.go @@ -5,7 +5,6 @@ import ( "github.com/haproxytech/client-native/v6/models" cn_runtime "github.com/haproxytech/client-native/v6/runtime" - "github.com/haproxytech/dataplaneapi/misc" ) func TestSerializeRuntimeAddServer(t *testing.T) { @@ -19,7 +18,7 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "basic server", srv: &models.RuntimeAddServer{ Address: "127.0.0.1", - Port: misc.Int64P(8080), + Port: new(int64(8080)), }, version: &cn_runtime.HAProxyVersion{}, want: " 127.0.0.1:8080", @@ -28,8 +27,8 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with weight", srv: &models.RuntimeAddServer{ Address: "192.168.1.100", - Port: misc.Int64P(9000), - Weight: misc.Int64P(50), + Port: new(int64(9000)), + Weight: new(int64(50)), }, version: &cn_runtime.HAProxyVersion{}, want: " 192.168.1.100:9000 weight 50", @@ -87,14 +86,14 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with multiple options", srv: &models.RuntimeAddServer{ Address: "10.1.1.10", - Port: misc.Int64P(80), - Weight: misc.Int64P(10), + Port: new(int64(80)), + Weight: new(int64(10)), Check: "enabled", Backup: "enabled", Maintenance: "enabled", AgentCheck: "enabled", AgentAddr: "127.0.0.1", - AgentPort: misc.Int64P(5000), + AgentPort: new(int64(5000)), HealthCheckAddress: "127.0.0.2", }, version: &cn_runtime.HAProxyVersion{}, @@ -104,15 +103,15 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with all fields", srv: &models.RuntimeAddServer{ Address: "10.1.1.10", - Port: misc.Int64P(80), - Weight: misc.Int64P(10), + Port: new(int64(80)), + Weight: new(int64(10)), Check: "enabled", Backup: "enabled", Maintenance: "enabled", AgentCheck: "enabled", AgentAddr: "127.0.0.1", - AgentPort: misc.Int64P(5000), - AgentInter: misc.Int64P(1000), + AgentPort: new(int64(5000)), + AgentInter: new(int64(1000)), AgentSend: "foobar", Allow0rtt: true, Alpn: "h2,http/1.1", @@ -126,22 +125,22 @@ func TestSerializeRuntimeAddServer(t *testing.T) { Ciphersuites: "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256", CrlFile: "/path/to/crl.pem", SslCertificate: "/path/to/cert.pem", - Downinter: misc.Int64P(2000), - ErrorLimit: misc.Int64P(10), - Fall: misc.Int64P(2), - Fastinter: misc.Int64P(500), + Downinter: new(int64(2000)), + ErrorLimit: new(int64(10)), + Fall: new(int64(2)), + Fastinter: new(int64(500)), ForceSslv3: "enabled", ForceTlsv10: "enabled", ForceTlsv11: "enabled", ForceTlsv12: "enabled", ForceTlsv13: "enabled", HealthCheckAddress: "127.0.0.2", - HealthCheckPort: misc.Int64P(8080), - Inter: misc.Int64P(3000), - Maxconn: misc.Int64P(100), - Maxqueue: misc.Int64P(200), - Minconn: misc.Int64P(50), - Rise: misc.Int64P(1), + HealthCheckPort: new(int64(8080)), + Inter: new(int64(3000)), + Maxconn: new(int64(100)), + Maxqueue: new(int64(200)), + Minconn: new(int64(50)), + Rise: new(int64(1)), }, version: &cn_runtime.HAProxyVersion{}, want: ` 10.1.1.10:80 agent-check agent-addr 127.0.0.1 agent-port 5000 agent-inter 1000 agent-send foobar allow-0rtt alpn h2,http/1.1 backup check check-alpn h2 addr 127.0.0.2 port 8080 check-proto HTTP check-send-proxy check-sni example.com check-ssl check-via-socks4 ciphers HIGH:!aNULL:!MD5 ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 crl-file /path/to/crl.pem crt /path/to/cert.pem disabled downinter 2000 error-limit 10 fall 2 fastinter 500 force-sslv3 force-tlsv10 force-tlsv11 force-tlsv12 force-tlsv13 inter 3000 maxconn 100 maxqueue 200 minconn 50 rise 1 weight 10`, 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 9f4100a1..c5565ed6 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -214,7 +214,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/ssl_crt_list_storage.go b/handlers/ssl_crt_list_storage.go index 2c8e8a53..9c62895d 100644 --- a/handlers/ssl_crt_list_storage.go +++ b/handlers/ssl_crt_list_storage.go @@ -190,7 +190,7 @@ func (h *StorageReplaceStorageSSLCrtListFileHandlerImpl) Handle(params storage.R File: filename, Description: "managed certificate list", StorageName: filepath.Base(filename), - Size: misc.Int64P(len(params.Data)), + Size: new(int64(len(params.Data))), } skipReload := false 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 b50347a9..294c3f65 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -228,24 +228,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 4b7850ea5e79457458cedaf8fc65ff4545d45b9c Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Sat, 7 Mar 2026 19:31:13 +0100 Subject: [PATCH 30/42] 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 ce4d278e..2e04ce59 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) @@ -94,6 +96,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" } @@ -107,6 +110,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 )) @@ -117,6 +121,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' } @@ -144,6 +149,7 @@ setup() { resource_delete "$_STORAGE_SSL_CERTS_BASE_PATH/7.pem" "skip_reload=true" assert_equal "$SC" 204 + sleep 3 refute dpa_docker_exec 'ls /etc/haproxy/ssl/7.pem' } @@ -163,6 +169,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 47ff47f9aa345e5739c90993cd419919b847a9e4 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 19 Mar 2026 12:45:23 +0100 Subject: [PATCH 31/42] BUILD/MINOR: go.mod: upgrade client-native with new event listener changes --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 46aa0875..d420e25f 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,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.2.9 + github.com/haproxytech/client-native/v6 v6.2.10 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 ) @@ -99,7 +99,7 @@ require ( 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 9534d29c..8cc72366 100644 --- a/go.sum +++ b/go.sum @@ -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.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= -github.com/haproxytech/client-native/v6 v6.2.9 h1:I7kkc+ZTrLpHdSfrdlOBLVIGtFvXZBkydEDdA/cuTeY= -github.com/haproxytech/client-native/v6 v6.2.9/go.mod h1:LLsyuWfRABFURZkBcXroJ6hQOs3kgTj8ePyfyg9AZ1g= +github.com/haproxytech/client-native/v6 v6.2.10 h1:9lGmVSDWhTpr+T0Nti+pi1Qpnk3F/WV7SnkqzLAMiyc= +github.com/haproxytech/client-native/v6 v6.2.10/go.mod h1:ua8VYkXs605okf4tpNIiXcrzWz5duhFk8CqjIUyA4zY= 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= @@ -206,17 +206,17 @@ 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= From 9a7190a733bb7ba1799db8d55bd5014dd6ce389a Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 18 Mar 2026 15:13:04 +0100 Subject: [PATCH 32/42] BUG/MINOR: events: fix nil dereference panic in Stop() Stop() called h.listener.Close() without checking if listener is nil. After Reset() sets listener to nil, or if the connection was never established, calling Stop() would panic. --- client-native/events.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client-native/events.go b/client-native/events.go index 2914960a..ff5ab334 100644 --- a/client-native/events.go +++ b/client-native/events.go @@ -116,7 +116,10 @@ func (h *HAProxyEventListener) Reset() { func (h *HAProxyEventListener) Stop() error { h.stop.Store(true) - return h.listener.Close() + if h.listener != nil { + return h.listener.Close() + } + return nil } func newHAProxyEventListener(socketPath string) (*runtime.EventListener, error) { From 8049dfbba7fa83b3f1afd04ae1c59ffbb07ff051 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Wed, 18 Mar 2026 15:18:37 +0100 Subject: [PATCH 33/42] BUG/MEDIUM: events: fix data races, goroutine leak, and reconnect logic Multiple issues fixed in HAProxyEventListener: Bug 1 - Backoff never resets: after a successful reconnect, retryAfter was not reset to its initial value. Over time across multiple reloads, the retry budget was exhausted and the listener permanently stopped. Bug 2 - Fragile give-up check: used == instead of >= for the backoff threshold, which could miss the exact value if the initial backoff or multiplier changed. Now uses >= with a named maxRetryBackoff constant. Bug 4 - Data race on h.listener: the listener field was accessed from multiple goroutines (listen, Reconfigure, Stop) without synchronization. Added a sync.Mutex to protect all listener and rt field access. Bug 5 - Goroutine leak in Reconfigure: Reset() closed the connection but didn't signal the old listen goroutine to exit before starting a new one. The old goroutine could race with the new one. Added a done channel: Reconfigure now calls stopAndWait() which signals stop, closes the connection, and blocks until the old goroutine exits before starting a new one. Improvement A - Reduced log noise during reconnects: connection failures during reload are expected. Now logs a single Warning on first disconnect and uses Debug level for subsequent retry attempts. Only logs Warning again when giving up entirely. Improvement B - Context-aware retry sleep: replaced time.Sleep with a select on time.After and ctx.Done so the retry loop responds to context cancellation instead of blocking for up to 60 seconds. --- client-native/events.go | 94 +++++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 23 deletions(-) diff --git a/client-native/events.go b/client-native/events.go index ff5ab334..2ea6d47a 100644 --- a/client-native/events.go +++ b/client-native/events.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "strings" + "sync" "sync/atomic" "time" @@ -37,9 +38,13 @@ const ( ) type HAProxyEventListener struct { - listener *runtime.EventListener - client clientnative.HAProxyClient // for storage only - rt runtime.Runtime + mu sync.Mutex + listener *runtime.EventListener + client clientnative.HAProxyClient // for storage only + rt runtime.Runtime + // done is closed to signal the listen goroutine to exit. + // A new channel is created each time a new goroutine is started. + done chan struct{} stop atomic.Bool lastEvent time.Time } @@ -76,6 +81,7 @@ func ListenHAProxyEvents(ctx context.Context, client clientnative.HAProxyClient) client: client, listener: el, rt: rt, + done: make(chan struct{}), } go h.listen(ctx) @@ -92,20 +98,27 @@ func (h *HAProxyEventListener) Reconfigure(ctx context.Context, rt runtime.Runti } if rt.SocketPath() == h.rt.SocketPath() { - // no need to restart the listener + h.mu.Lock() h.rt = rt + h.mu.Unlock() return nil } - h.Reset() + // Signal the old goroutine to stop and wait for it to exit. + h.stopAndWait() + + h.mu.Lock() h.rt = rt + h.done = make(chan struct{}) h.stop.Store(false) + h.mu.Unlock() + go h.listen(ctx) return nil } -func (h *HAProxyEventListener) Reset() { +func (h *HAProxyEventListener) resetLocked() { if h.listener != nil { if err := h.listener.Close(); err != nil { log.Warning(err) @@ -114,11 +127,18 @@ func (h *HAProxyEventListener) Reset() { } } -func (h *HAProxyEventListener) Stop() error { +// stopAndWait signals the listen goroutine to stop and waits for it to exit. +func (h *HAProxyEventListener) stopAndWait() { h.stop.Store(true) - if h.listener != nil { - return h.listener.Close() - } + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() + // Wait for the goroutine to acknowledge the stop. + <-h.done +} + +func (h *HAProxyEventListener) Stop() error { + h.stopAndWait() return nil } @@ -136,40 +156,68 @@ func newHAProxyEventListener(socketPath string) (*runtime.EventListener, error) return el, nil } +const maxRetryBackoff = 60 * time.Second + func (h *HAProxyEventListener) listen(ctx context.Context) { + defer close(h.done) + var err error retryAfter := 100 * time.Millisecond + loggedDisconnect := false for { if h.stop.Load() { - // Stop requested. - h.Reset() + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() return } - if h.listener == nil { - h.listener, err = newHAProxyEventListener(h.rt.SocketPath()) + + h.mu.Lock() + needsConnect := h.listener == nil + h.mu.Unlock() + + if needsConnect { + var el *runtime.EventListener + el, err = newHAProxyEventListener(h.rt.SocketPath()) if err != nil { - // Try again. - log.Warning(err) - time.Sleep(retryAfter) + if !loggedDisconnect { + log.Warningf("event listener disconnected, reconnecting: %v", err) + loggedDisconnect = true + } else { + log.Debugf("event listener reconnect attempt: %v", err) + } + select { + case <-time.After(retryAfter): + case <-ctx.Done(): + return + } retryAfter *= 2 - if retryAfter == 51200*time.Millisecond { - // Give up after 10 iterations. + if retryAfter >= maxRetryBackoff { + log.Warning("event listener giving up reconnection attempts") h.stop.Store(true) } continue } + + h.mu.Lock() + h.listener = el + h.mu.Unlock() + + retryAfter = 100 * time.Millisecond + loggedDisconnect = false + log.Debugf("event listener reconnected to: %s", h.rt.SocketPath()) } for { ev, err := h.listener.Listen(ctx) if err != nil { - // EOF errors usually happen when HAProxy restarts, do not log. if !errors.Is(err, io.EOF) { - log.Warning(err) + log.Debugf("event listener error: %v", err) } - // Reset the connection. - h.Reset() + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() break } From 086f7fba21404fda7b0039dfdc068a2c185169af Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 19 Mar 2026 12:35:51 +0100 Subject: [PATCH 34/42] BUILD/MINOR: aspell: add missing words --- .aspell.yml | 242 +++++++++++++++++++++++++++++++++++++++++++------ .gitlab-ci.yml | 2 +- Makefile | 2 +- 3 files changed, 214 insertions(+), 32 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index 0bb14d65..5d93c78a 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -1,44 +1,226 @@ +--- mode: commit min_length: 3 allowed: + - abortonclose + - accessors + - acl + - acls + - adfs + - addons + - apitest + - apikey + - apk - aspell - - repo - - yaml + - attrs + - auth + - autofill + - aws + - axios + - backend + - backends + - backport + - backoff + - bmarkovic + - botmgmt + - botmgtupdate + - browserslist + - bvue + - bwlim + - caniuse + - casbin + - chmigrate + - cli + - clickhouse + - cmd + - cnt + - codebase + - composable + - cond + - conf - config - - Github - - Gitlab + - conns + - const + - cpu + - crd + - cronjob + - crt + - cve + - cwe + - ctx + - dapi + - dataplane + - dataplaneapi + - dataplanes + - datepicker + - dereference + - dgram + - discoverability + - durations + - dns + - dom + - dpapi + - dpapis + - dropdowns + - dsn + - e2e + - entrypoint + - enum - env + - EOF + - eol + - epoll + - escaper + - eslint - failsafe - - golang - - mkdir - - WORKDIR - - apk - - ENTRYPOINT - - ubuntu - - golangci - - sudo - - releaser - - backend - - backends + - fbt + - fcgi + - fqdn + - fmt + - usefcgiapp + - formatter + - formatters - frontend - frontends - - tcp - - cpu - - crd + - fullpage + - gentype + - github + - gitlab + - gocritic + - godaddy + - gofumpt + - gokc + - golang + - golangci + - gorm + - goroutines + - goroutine + - govulncheck + - gotoolchain + - gpc + - gpt + - gptstr + - hapee + - haproxy + - healthcheck + - healthz + - hostname + - html + - http + - https + - httpCLF + - iana + - ineffassign + - infos + - ioutil + - ipam + - istanbul + - iweight + - jose + - json + - jsonpath + - jwt + - kasbin + - kpi + - ktls + - kubebuilder + - kubernetes + - lifecycle - linter - linters - - govulncheck - - dataplaneapi + - lowercased + - lookups + - lts + - makefile + - maxconn + - mexchanger + - migrator + - minimalistic + - minsize + - mixin + - mkdir + - mpxs + - multipartsearch + - multiselect + - mutex + - mutexes + - namespace + - namespaces + - oidc + - omitempty + - openapi + - optim + - packagetag + - param + - params + - parallelize + - passthrough + - placholder + - podman + - pre - quic - - userlist - - cve + - rbac + - readme + - recursivity + - recv + - redispatch + - redoc + - reimplement + - releaser + - repo + - repos + - req + - rsync + - ruleset + - rulesets + - saml + - sanitization + - schemas + - scrollbar + - scss + - searchselect + - shm + - sig + - sni + - spammy - ssl - - crl - - crt - - ocsp - - logrus - - backport - - dns - - newcert - - uid + - sslv + - sso + - struct + - subnet + - subresource + - subresources + - sudo + - symlinks + - syslog + - textarea + - tcp + - timeseries + - tls + - tooltip + - tsconfig + - typings + - ubuntu + - uniq + - unix + - unmarshalling + - unsub + - uri - url + - userlist + - userlists + - utils + - uweight + - vfg + - vite + - vrrp + - vue + - waf + - wafadvanced + - workdir + - yaml + - yml + - async + - rehaul + - rebase + - XXXX diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24e4d35c..bfa1063a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,7 +89,7 @@ gofumpt: commit-policy: stage: lint image: - name: $CI_REGISTRY_GO/commit-check:5.4.2 + name: $CI_REGISTRY_GO/commit-check:5.5.0 entrypoint: [""] tags: - go diff --git a/Makefile b/Makefile index 4b244a28..239e45cf 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +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=2.11.1 -CHECK_COMMIT=5.4.0 +CHECK_COMMIT=5.5.0 all: update clean build From 3f47dc8f7157a9dccdf3b5992bbae95ef4a24de0 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 20 Oct 2025 10:23:19 +0200 Subject: [PATCH 35/42] MEDIUM: Add ACME dns-01 challenge support With this commit, dataplaneapi can use libdns to resolve dns-01 challenges for HAProxy. To use it, make sure you are using master-worker mode, configure HAProxy's acme section to use dns-01 challenge with the appropriate acme-provider (dns challenge provider) and acme-vars. The list of supported DNS providers is in acme/dns01-providers.txt. --- .aspell.yml | 6 + acme/constructor.go | 89 +++++++++ acme/constructor.tmpl | 36 ++++ acme/dns01-providers.txt | 21 ++ acme/dns01.go | 142 ++++++++++++++ acme/dns01_test.go | 103 ++++++++++ acme/exec/doc.go | 17 ++ acme/exec/provider.go | 112 +++++++++++ acme/gen_constructor.go | 86 +++++++++ client-native/events.go | 6 +- client-native/events_acme.go | 179 +++++++++++++++++- .../data/container/var/lib/haproxy/dns01.sh | 15 ++ .../container/var/lib/haproxy/haproxy2.pem | 86 +++++++++ e2e/tests/runtime_acme/data/haproxy.cfg | 14 ++ e2e/tests/runtime_acme/dataplaneapi.yaml | 25 +++ e2e/tests/runtime_acme/tests.bats | 49 ++++- go.mod | 65 +++++++ go.sum | 171 +++++++++++++++++ 18 files changed, 1206 insertions(+), 16 deletions(-) create mode 100644 acme/constructor.go create mode 100644 acme/constructor.tmpl create mode 100644 acme/dns01-providers.txt create mode 100644 acme/dns01.go create mode 100644 acme/dns01_test.go create mode 100644 acme/exec/doc.go create mode 100644 acme/exec/provider.go create mode 100644 acme/gen_constructor.go create mode 100755 e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh create mode 100644 e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem create mode 100644 e2e/tests/runtime_acme/dataplaneapi.yaml diff --git a/.aspell.yml b/.aspell.yml index 5d93c78a..332cb4e2 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -43,6 +43,7 @@ allowed: - const - cpu - crd + - crl - cronjob - crt - cve @@ -125,9 +126,11 @@ allowed: - ktls - kubebuilder - kubernetes + - libdns - lifecycle - linter - linters + - logrus - lowercased - lookups - lts @@ -146,6 +149,8 @@ allowed: - mutexes - namespace - namespaces + - newcert + - ocsp - oidc - omitempty - openapi @@ -199,6 +204,7 @@ allowed: - tls - tooltip - tsconfig + - txt - typings - ubuntu - uniq diff --git a/acme/constructor.go b/acme/constructor.go new file mode 100644 index 00000000..8b9b9726 --- /dev/null +++ b/acme/constructor.go @@ -0,0 +1,89 @@ +// Code generated from 'constructor.tmpl'; DO NOT EDIT. + +package acme + +import ( + "fmt" + + "github.com/haproxytech/dataplaneapi/acme/exec" + jsoniter "github.com/json-iterator/go" + "github.com/libdns/azure" + "github.com/libdns/cloudflare" + "github.com/libdns/cloudns" + "github.com/libdns/digitalocean" + "github.com/libdns/gandi" + "github.com/libdns/godaddy" + "github.com/libdns/googleclouddns" + "github.com/libdns/hetzner" + "github.com/libdns/infomaniak" + "github.com/libdns/inwx" + "github.com/libdns/ionos" + "github.com/libdns/linode" + "github.com/libdns/namecheap" + "github.com/libdns/netcup" + "github.com/libdns/ovh" + "github.com/libdns/porkbun" + "github.com/libdns/rfc2136" + "github.com/libdns/scaleway" + "github.com/libdns/vultr/v2" +) + +func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { + var prov DNSProvider + + switch name { + case "azure": + prov = &azure.Provider{} + case "cloudflare": + prov = &cloudflare.Provider{} + case "cloudns": + prov = &cloudns.Provider{} + case "digitalocean": + prov = &digitalocean.Provider{} + case "exec": + prov = &exec.Provider{} + case "gandi": + prov = &gandi.Provider{} + case "godaddy": + prov = &godaddy.Provider{} + case "googleclouddns": + prov = &googleclouddns.Provider{} + case "hetzner": + prov = &hetzner.Provider{} + case "infomaniak": + prov = &infomaniak.Provider{} + case "inwx": + prov = &inwx.Provider{} + case "ionos": + prov = &ionos.Provider{} + case "linode": + prov = &linode.Provider{} + case "namecheap": + prov = &namecheap.Provider{} + case "netcup": + prov = &netcup.Provider{} + case "ovh": + prov = &ovh.Provider{} + case "porkbun": + prov = &porkbun.Provider{} + case "rfc2136": + prov = &rfc2136.Provider{} + case "scaleway": + prov = &scaleway.Provider{} + case "vultr": + prov = &vultr.Provider{} + default: + return nil, fmt.Errorf("invalid DNS provider name: '%s'", name) + } + + jsoni := jsoniter.ConfigCompatibleWithStandardLibrary + js, err := jsoni.Marshal(params) + if err != nil { + return nil, fmt.Errorf("failed to marshal params for DNS provider %s: %w", name, err) + } + if err = jsoni.Unmarshal(js, prov); err != nil { + return nil, fmt.Errorf("invalid params for DNS provider %s: %w", name, err) + } + + return prov, nil +} diff --git a/acme/constructor.tmpl b/acme/constructor.tmpl new file mode 100644 index 00000000..b8a5ba76 --- /dev/null +++ b/acme/constructor.tmpl @@ -0,0 +1,36 @@ +// Code generated from 'constructor.tmpl'; DO NOT EDIT. + +package acme + +import ( + "fmt" + + jsoniter "github.com/json-iterator/go" +{{- range $mod := .}} + "{{$mod}}" +{{- end}} +) + +func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { + var prov DNSProvider + + switch name { +{{- range $mod := .}} + case "{{basename $mod}}": + prov = &{{basename $mod}}.Provider{} +{{- end}} + default: + return nil, fmt.Errorf("invalid DNS provider name: '%s'", name) + } + + jsoni := jsoniter.ConfigCompatibleWithStandardLibrary + js, err := jsoni.Marshal(params) + if err != nil { + return nil, fmt.Errorf("failed to marshal params for DNS provider %s: %w", name, err) + } + if err = jsoni.Unmarshal(js, prov); err != nil { + return nil, fmt.Errorf("invalid params for DNS provider %s: %w", name, err) + } + + return prov, nil +} diff --git a/acme/dns01-providers.txt b/acme/dns01-providers.txt new file mode 100644 index 00000000..3dc5a897 --- /dev/null +++ b/acme/dns01-providers.txt @@ -0,0 +1,21 @@ +github.com/libdns/azure +github.com/libdns/cloudflare +github.com/libdns/cloudns +github.com/libdns/digitalocean +github.com/haproxytech/dataplaneapi/acme/exec +github.com/libdns/gandi +github.com/libdns/godaddy +github.com/libdns/googleclouddns +github.com/libdns/hetzner +github.com/libdns/infomaniak +github.com/libdns/inwx +github.com/libdns/ionos +github.com/libdns/linode +github.com/libdns/namecheap +github.com/libdns/netcup +github.com/libdns/ovh +github.com/libdns/porkbun +github.com/libdns/rfc2136 +//github.com/libdns/route53 req. go1.25 +github.com/libdns/scaleway +github.com/libdns/vultr/v2 diff --git a/acme/dns01.go b/acme/dns01.go new file mode 100644 index 00000000..f7226f61 --- /dev/null +++ b/acme/dns01.go @@ -0,0 +1,142 @@ +// 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. +// + +package acme + +//go:generate go run gen_constructor.go -i dns01-providers.txt -t constructor.tmpl -o constructor.go + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/libdns/libdns" +) + +// TTL of the temporary DNS record used for DNS-01 validation. +const DefaultTTL = 30 * time.Second + +// DNSProvider defines the operations required for dns-01 challenges. +type DNSProvider interface { + libdns.RecordAppender + libdns.RecordDeleter +} + +// A DNS01Solver uses a DNSProvider to actually solve the challenge. +type DNS01Solver struct { + provider DNSProvider + TTL time.Duration +} + +func NewDNS01Solver(name string, params map[string]any, ttl ...time.Duration) (*DNS01Solver, error) { + prov, err := NewDNSProvider(name, params) + if err != nil { + return nil, err + } + + recordTTL := DefaultTTL + if len(ttl) > 0 { + recordTTL = ttl[0] + } + + return &DNS01Solver{provider: prov, TTL: recordTTL}, nil +} + +// Present creates the DNS TXT record for the given ACME challenge. +func (s *DNS01Solver) Present(ctx context.Context, domain, zone, keyAuth string) error { + rec := makeRecord(domain, keyAuth, s.TTL) + + if zone == "" { + zone = guessZone(domain) + } else { + zone = rooted(zone) + } + + results, err := s.provider.AppendRecords(ctx, zone, []libdns.Record{rec}) + if err != nil { + return fmt.Errorf("adding temporary record for zone %q: %w", zone, err) + } + if len(results) != 1 { + return fmt.Errorf("expected one record, got %d: %v", len(results), results) + } + + return nil +} + +// CleanUp deletes the DNS TXT record created in Present(). +func (s *DNS01Solver) CleanUp(ctx context.Context, domain, zone, keyAuth string) error { + rr := makeRecord(domain, keyAuth, s.TTL) + + if zone == "" { + zone = guessZone(domain) + } else { + zone = rooted(zone) + } + + _, err := s.provider.DeleteRecords(ctx, zone, []libdns.Record{rr}) + if err != nil { + return fmt.Errorf("deleting temporary record for name %q in zone %q: %w", zone, rr, err) + } + + return nil +} + +// Assemble a TXT Record suited for DNS-01 challenges. +func makeRecord(fqdn, keyAuth string, ttl time.Duration) libdns.RR { + return libdns.RR{ + Type: "TXT", + Name: "_acme-challenge." + trimWildcard(fqdn), + Data: keyAuth, + TTL: ttl, + } +} + +// Extract the root zone for a domain in case the user did not provide it. +// +// This simplistic algorithm will only work for simple cases. The correct +// way to do this would be to do an SOA request on the FQDN, but since +// dataplaneapi may not use the right resolvers (as configured in haproxy.cfg) +// it is better to avoid doing any DNS request. +func guessZone(fqdn string) string { + fqdn = trimWildcard(fqdn) + parts := make([]string, 0, 8) + strings.SplitSeq(fqdn, ".")(func(part string) bool { + if part != "" { + parts = append(parts, part) + } + return true + }) + + n := len(parts) + if n < 3 { + return rooted(fqdn) + } + return rooted(strings.Join(parts[n-2:], ".")) +} + +// Remove the wildcard from a domain so it can be used in a record name. +func trimWildcard(fqdn string) string { + fqdn = strings.TrimSpace(fqdn) + return strings.TrimPrefix(fqdn, "*.") +} + +// Ensures a domain name has its final dot (the root zone). +func rooted(domain string) string { + if !strings.HasSuffix(domain, ".") { + domain += "." + } + return domain +} diff --git a/acme/dns01_test.go b/acme/dns01_test.go new file mode 100644 index 00000000..c7f4df34 --- /dev/null +++ b/acme/dns01_test.go @@ -0,0 +1,103 @@ +package acme + +import ( + "reflect" + "testing" + + "github.com/libdns/cloudflare" + "github.com/libdns/googleclouddns" + "github.com/libdns/ovh" +) + +func TestNewDNSProvider(t *testing.T) { + tests := []struct { + name string + args map[string]any + want DNSProvider + wantErr bool + }{ + { + name: "cloudflare", + args: map[string]any{ + "api_token": "foo", + "zone_token": "bar", + }, + want: &cloudflare.Provider{APIToken: "foo", ZoneToken: "bar"}, + wantErr: false, + }, + { + name: "googleclouddns", + args: map[string]any{ + "gcp_project": "Project X", + "gcp_application_default": `{"gcp_account_id":"j9h8hl094756h98990h"}`, + }, + want: &googleclouddns.Provider{Project: "Project X", ServiceAccountJSON: `{"gcp_account_id":"j9h8hl094756h98990h"}`}, + wantErr: false, + }, + { + name: "ovh", + args: map[string]any{ + "endpoint": "/lol", + "application_key": "foobar", + }, + want: &ovh.Provider{Endpoint: "/lol", ApplicationKey: "foobar"}, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewDNSProvider(tt.name, tt.args) + if (err != nil) != tt.wantErr { + t.Errorf("NewDNSProvider() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("NewDNSProvider() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_guessZone(t *testing.T) { + tests := []struct { + fqdn string + want string + }{ + { + fqdn: "", + want: ".", + }, + { + fqdn: "haproxy.org", + want: "haproxy.org.", + }, + { + fqdn: "foo.haproxy.org", + want: "haproxy.org.", + }, + { + fqdn: "*.haproxy.org.", + want: "haproxy.org.", + }, + { + fqdn: "*.foo.haproxy.org", + want: "haproxy.org.", + }, + { + fqdn: "localhost", + want: "localhost.", + }, + { + fqdn: "very.long.sub.domain.name.haproxy.lol", + want: "haproxy.lol.", + }, + } + for _, tt := range tests { + t.Run(tt.fqdn, func(t *testing.T) { + got := guessZone(tt.fqdn) + if got != tt.want { + t.Errorf("guessZone() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/acme/exec/doc.go b/acme/exec/doc.go new file mode 100644 index 00000000..3dfc415e --- /dev/null +++ b/acme/exec/doc.go @@ -0,0 +1,17 @@ +// Package exec provides a libdns provider which calls an external command. +// +// When called, the configured Command will be launched with the following +// environment variables: +// +// ACTION describes which action is the program expected to perform. Possible +// values are: get, append, set, delete. +// +// ZONE contains the DNS zone where the record is located. +// +// REC_NAME, REC_TTL, REC_TYPE, REC_DATA: respectively the record name, TTL in +// seconds, type (usually TXT), and value. +// +// When ran with the `get` action, the REC_* variables are not provided. Instead, +// the program is expected to scan the given zone and print the results as a JSON +// document on stdout. It must be parsable as a `[]libdns.RR`. +package exec diff --git a/acme/exec/provider.go b/acme/exec/provider.go new file mode 100644 index 00000000..604a26fa --- /dev/null +++ b/acme/exec/provider.go @@ -0,0 +1,112 @@ +// 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. +// + +package exec + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + osexec "os/exec" + "strconv" + "strings" + "time" + + "github.com/libdns/libdns" +) + +type Provider struct { + Command string `json:"command"` + Environment []string `json:"environment,omitempty"` +} + +func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error) { + cmd := osexec.CommandContext(ctx, p.Command) // #nosec G204 + p.populateEnv(cmd, "get", zone, nil) + out, err := cmd.Output() + if err != nil { + return nil, err + } + + var result []libdns.RR + err = json.Unmarshal(out, &result) + if err != nil || len(result) == 0 { + return nil, err + } + + records := make([]libdns.Record, 0, len(result)) + for _, rr := range result { + record, err := rr.Parse() + if err != nil { + return nil, err + } + records = append(records, record) + } + + return records, nil +} + +func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error) { + return p.doRecords(ctx, "append", zone, records) +} + +func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error) { + return p.doRecords(ctx, "set", zone, records) +} + +func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error) { + return p.doRecords(ctx, "delete", zone, records) +} + +func (p *Provider) doRecords(ctx context.Context, action, zone string, records []libdns.Record) ([]libdns.Record, error) { + for _, record := range records { + rr := record.RR() + cmd := osexec.CommandContext(ctx, p.Command) // #nosec G204 + p.populateEnv(cmd, action, zone, &rr) + var stderr bytes.Buffer + cmd.Stderr = &stderr + if err := cmd.Run(); err != nil { + if _, ok := err.(*osexec.ExitError); ok { + if msg := strings.TrimSpace(stderr.String()); len(msg) > 0 { + return nil, fmt.Errorf("%v (stderr: %s)", err, msg) + } + } + return nil, err + } + } + return records, nil +} + +func (p *Provider) populateEnv(cmd *osexec.Cmd, action, zone string, rr *libdns.RR) { + env := cmd.Environ() + if len(p.Environment) > 0 { + env = append(env, p.Environment...) + } + env = append(env, "ACTION="+action, "ZONE="+zone) + if rr != nil { + env = append(env, rr2env(rr)...) + } + cmd.Env = env +} + +func rr2env(rr *libdns.RR) []string { + return []string{ + "REC_NAME=" + rr.Name, + "REC_TTL=" + strconv.Itoa(int(rr.TTL/time.Second)), + "REC_TYPE=" + rr.Type, + "REC_DATA=" + rr.Data, + } +} diff --git a/acme/gen_constructor.go b/acme/gen_constructor.go new file mode 100644 index 00000000..7a25ef30 --- /dev/null +++ b/acme/gen_constructor.go @@ -0,0 +1,86 @@ +//go:build ignore + +package main + +import ( + "bytes" + "flag" + "fmt" + "io" + "os" + "path" + "regexp" + "strings" + "text/template" +) + +var ( + modListFile = flag.String("i", "", "input file with the list of DNS provider modules") + templateFile = flag.String("t", "", "template file") + outputFile = flag.String("o", "", "output filename") +) + +func main() { + var err error + flag.Parse() + + in := os.Stdin + if *modListFile != "" { + in, err = os.Open(*modListFile) + chk(err) + } + + out := os.Stdout + if *outputFile != "" { + out, err = os.OpenFile(*outputFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644) + chk(err) + } + + funcs := template.FuncMap{ + "basename": modname, + } + + tmpl, err := template.New(path.Base(*templateFile)).Funcs(funcs).ParseFiles(*templateFile) + chk(err) + + // Read the list of modules, 1 per line. + modules := make([]string, 0, 32) + lines, err := io.ReadAll(in) + chk(err) + bytes.SplitSeq(lines, []byte{'\n'})(func(line []byte) bool { + line = bytes.Trim(line, " \"\n\t\r") + if len(line) > 0 && line[0] != '/' && line[0] != '#' { + modules = append(modules, string(line)) + } + return true + }) + + chk(tmpl.Execute(out, modules)) +} + +func chk(err error) { + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + +// Like basename but for Go repository names. +func modname(s string) string { + slash := strings.LastIndexByte(s, '/') + // ignore "/v2" + match, err := regexp.MatchString("^/v[1-9]+$", s[slash:]) + chk(err) + if match { + s = s[:slash] + slash = strings.LastIndexByte(s, '/') + } + s = s[slash+1:] + if dash := strings.IndexByte(s, '-'); dash != -1 { + s = s[dash+1:] + } + if end := strings.IndexByte(s, '.'); end != -1 { + s = s[:end] + } + return s +} diff --git a/client-native/events.go b/client-native/events.go index 2ea6d47a..82341e05 100644 --- a/client-native/events.go +++ b/client-native/events.go @@ -221,7 +221,7 @@ func (h *HAProxyEventListener) listen(ctx context.Context) { break } - h.handle(ev) + h.handle(ctx, ev) if h.listener == nil { // just in case break @@ -230,7 +230,7 @@ func (h *HAProxyEventListener) listen(ctx context.Context) { } } -func (h *HAProxyEventListener) handle(ev runtime.Event) { +func (h *HAProxyEventListener) handle(ctx context.Context, ev runtime.Event) { if !ev.Timestamp.After(h.lastEvent) { // Event already seen! Skip. log.Debugf("events: skipping already seen: '%s'", ev.String()) @@ -247,7 +247,7 @@ func (h *HAProxyEventListener) handle(ev runtime.Event) { } if category == EventAcme { - h.handleAcmeEvent(rest) + h.handleAcmeEvent(ctx, rest) return } diff --git a/client-native/events_acme.go b/client-native/events_acme.go index 0a551b6c..efe220e4 100644 --- a/client-native/events_acme.go +++ b/client-native/events_acme.go @@ -16,27 +16,49 @@ package cn import ( + "context" "errors" + "fmt" "io" "path/filepath" "strings" + "time" "github.com/haproxytech/client-native/v6/configuration" + "github.com/haproxytech/dataplaneapi/acme" "github.com/haproxytech/dataplaneapi/log" + jsoniter "github.com/json-iterator/go" ) -const EventAcmeNewCert = "newcert" +// Supported event types. +const ( + EventAcmeNewCert = "newcert" + EventAcmeDeploy = "deploy" +) + +// Structs used to unmarshal ACME messages in JSON. +type acmeIdentifier struct { + Type string `json:"type"` + Value string `json:"value"` +} +type acmeStatus struct { + Identifier acmeIdentifier `json:"identifier"` +} -func (h *HAProxyEventListener) handleAcmeEvent(message string) { +func (h *HAProxyEventListener) handleAcmeEvent(ctx context.Context, message string) { name, args, ok := strings.Cut(message, " ") if !ok { log.Warningf("failed to parse ACME Event: '%s'", message) return } - if name == EventAcmeNewCert { + switch name { + case EventAcmeNewCert: h.handleAcmeNewCertEvent(args) return + case EventAcmeDeploy: + h.handleAcmeDeployEvent(ctx, args) + return } log.Debugf("unknown ACME Event type: '%s'", message) @@ -93,3 +115,154 @@ func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { log.Debugf("events: OK: acme newcert %s => %s", args, crt.StorageName) } + +// HAProxy needs dpapi to solve a dns-01 challenge. +// example: +// acme deploy CertIdentifier thumbprint "QPFLnguBJSfyTiN2c4DWiWJvpveUB3bvY3EoC8cZC-U"\n +// provider-name "godaddy"\n +// acme-vars "var=var1,var=var2"\n +// acme-vars "var1=foobar,var2=var2"\n +// +// { +// "identifier": { +// "type": "dns", +// "value": "test1.example.com" +// }, +// "status": "pending", +// "expires": "2025-04-02T13:25:16Z", +// "challenges": [ +// { +// "type": "dns-01", +// "url": "https://acme-staging-v02.api.letsencrypt.org/acme/chall/189956024/16553103724/hj-ldw", +// "status": "pending", +// "token": "Yz3R-LFz6JPr04FN6FjnArcojzyFoD9ojFXZAaG5Rmo" +// }, +// ... +// ] +// }\0 +func (h *HAProxyEventListener) handleAcmeDeployEvent(ctx context.Context, args string) { + if len(args) == 0 { + log.Error("received HAProxy Event 'acme deploy' without any argument") + return + } + + var ( + firstLine = true + isJSON = false + certID string + provider string + keyAuth string + acmeArgs []string + acmeJSON string + parseErr error + ) + + // Parse the message line by line. + strings.SplitSeq(args, "\n")(func(line string) bool { + if firstLine { + firstLine = false + words := strings.Split(line, " ") + if len(words) != 3 || words[1] != "thumbprint" || len(words[2]) < 3 { + parseErr = fmt.Errorf("invalid acme deploy line: '%s'", line) + return false + } + certID = strings.Trim(words[0], `"`) + return true + } + if isJSON { + acmeJSON += line + return true + } + if strings.HasPrefix(line, "provider-name ") { + words := strings.Split(line, " ") + if len(words) != 2 { + parseErr = fmt.Errorf("invalid provider-name line: '%s'", line) + return false + } + provider = strings.Trim(words[1], `"`) + return true + } + if strings.HasPrefix(line, "acme-vars ") { + _, vars, found := strings.Cut(line, " ") + if !found || len(vars) == 0 { + parseErr = fmt.Errorf("invalid acme-vars line: '%s'", line) + return false + } + // Do not trim the double-quotes here. + acmeArgs = append(acmeArgs, vars) + return true + } + if strings.HasPrefix(line, "dns-01-record ") { + words := strings.Split(line, " ") + if len(words) != 2 { + parseErr = fmt.Errorf("invalid dns-01-record line: '%s'", line) + return false + } + keyAuth = strings.Trim(words[1], `"`) + return true + } + if strings.HasPrefix(line, "{") { + isJSON = true + acmeJSON += line + return true + } + // Ignore anything else. + return true + }) + + if parseErr != nil { + log.Errorf("events: acme deploy: %s", parseErr.Error()) + return + } + + // Parse the JSON to get the domain name. + var status acmeStatus + if err := jsoniter.UnmarshalFromString(acmeJSON, &status); err != nil { + log.Errorf("events: acme deploy: json.Unmarshal: %s", err.Error()) + return + } + + domainName := status.Identifier.Value + + // Merge the acme-vars + vars := make(map[string]any, 8) + for _, line := range acmeArgs { + hmap := configuration.ParseAcmeVars(line) + for k, v := range hmap { + vars[k] = v + } + } + + // Solve the DNS challenge. + solver, err := acme.NewDNS01Solver(provider, vars) + if err != nil { + log.Errorf("events: acme deploy: DNS provider: %s", err.Error()) + return + } + err = solver.Present(ctx, domainName, "", keyAuth) + if err != nil { + log.Errorf("events: acme deploy: DNS solver: %s", err.Error()) + return + } + // Remove the challenge in 2h. + go func() { + time.Sleep(2 * time.Hour) + if err := solver.CleanUp(ctx, domainName, "", keyAuth); err != nil { + log.Errorf("events: acme deploy: cleanup failed for %s: %v", domainName, err) + } + }() + + // Send back a response to HAProxy. + rt, err := h.client.Runtime() + if err != nil { + log.Error(err) + return + } + resp, err := rt.ExecuteRaw("acme challenge_ready " + certID + " domain " + domainName) + if err != nil { + log.Errorf("events: acme deploy: sending response: %s", err.Error()) + return + } + + log.Debugf("events: OK: acme deploy %s => %s", domainName, resp) +} diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh new file mode 100755 index 00000000..f18b7fb3 --- /dev/null +++ b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -eu + +case "$ACTION" in +append|set) + printf '{"host":"%s","value":"%s"}' "$REC_NAME" "$REC_DATA" | + curl -v -fsS -d @- "http://challtestsrv:8055/set-txt" + break;; +get|delete) + # not implemented + break;; +*) + echo "$0: error: invalid ACTION '$ACTION'" >&2 + exit 1;; +esac diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem new file mode 100644 index 00000000..95455ae6 --- /dev/null +++ b/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem @@ -0,0 +1,86 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCo55THv+XIARRP +Avj1tO3I6gI96/wCx4uOXwZlmQ+wG42M6a2IF4U1eXFfyvIoqqwGoEeFhP71+3tA +bJ5We18oRkEG6CcR35J2UiRxgt3zkvnGBxkoMpWpGP0L/w+WZkw86CAbR9eRf/zB +LOUfKqAXzatXfqdvlfQxF1OjeU6CemcBpPNxHkML73FBRgVezkhj2q0Rdo5sn9TF +b7/nO6biXrV1s4Rkv5Jf70zCKQKIHGNttM0RR13AcDEuY2pqawxVuDTECqlGNMKg +XOc2XKu9OQ1aLytyCKNxwPGC+Ugf9Tu9TD/U0eviUtMCDqn/c4wTa7vVyR7wA4+R +NFPHFwTTxCVkTuAiaU2zaTLGM/sNt8oFu/FXSeTVnnivAwDRtBIRwolw1ZQezDVb +uYKPfSScJ3LvkuBFPfR0Sbhvp5eJ0Ls5yQvXcYurs1BK1SVrS+UFadn5zOwlOOYW +6Q6vw4uVSD5m71eSBEkSy74l1kEiIPzkST6KPlEOOj3g/00YCaRNld/O84hL1O7q +8gS7yyd5viveGd0bDEMjKLnXgEJO6dsCx+mRq1oSNqNvdVFJLMAFHoHRTd/c10uE +Pse2aas1prAy27ocpBpKFo1r8/xivf8iTbl4ymlnWTM5T0mxW0eOqESQrhEO8Slf +nIAxePOOJBbjKDucMLzke4LsHv+FPQIDAQABAoICABFvsrq6MzDl96A+eM/4qRF0 +It4clev9iIkegy0K04VFGuRAnVLuxqgiDNOsQjpzgAXBFxEQDTf8iZk5fVEFNGoW +cpERdzMPpvGDAlMbhOkns5Q/WFf/fNazhy/tWUEX92fUOLhIPtc85K1WgqKohlVe +vIDwSL2qt8Y3l8FI/RNYKnkPe7giPR6mzcTEwzopxmxUf0hNul85UsA9DI0E6fH1 +f/sSGKlD44r2y7BBhorhj1wcbY0KloGOs20MA0jQGzpgJUZVqWrfeHYQkSfaAjqr +AJdeRjhj7ueH2QbB0DHIYa3liLNiJl07WqAcPm1qErxQg1gLBqAVZgVB5yIm3K8K +x/pDmXuhfstSlxU3ofBqbgp1tyE1zgOrlGToLr5PjpoY1q+H672Lq47/aL2ZNmKt +QuEiNDJs4eQj5oOERZG2ySPOnzK9B01IHYKYuh111noFl1j63JN958X5tqQYH4wW +f6b5oF/4M5aM/TFBxcBrnCWOFBLZln4BJhdouH6w+HqaOMIMFTKVLJGzJ7EOMoKP +XL61Pz/SrOa+UVn+ufTJ9/YICQeRyEjV2zf1DVYQhIqrgj+DQqMCMAM/USJp0Up7 +RF/x8Y14HqvlqtXdnlY5aVt/fFxkAnQkUDCYHcGxk9rl9nD4w80MeRI0smjLyrft +XdZ216HKVcYeCG3e0+zhAoIBAQDe2FIIzUTOs4WJlXlWuKQ2K83knx1UKhQp7qbr +hWCGD2YdHOaVcNOCYSbIaJTplKvca+1i42wT0/EeGo94nlM1QGbdSoyRFXpaFcXa +XXrN32xPXljRcvzaFmzg7yfhL382d40mcuyaz6cCvczQZJm/MOoYxV5rANBFZo5W +fhhroXNMUQ3QxfFzb/vwsakieB2JEro4p2+rxdnH38+h1r6F9XoSrWoVaGedMJhm +TrQwbRk8iapxfaCTaKHB2R4GuWkU9M8NnFSOyvrC0pWLy7zYV8o/jFTf54y1lhRP +/Memo788/Z+pt62zGUxmCn/ThiErWsGpkt6OoSIkZlmo9nVxAoIBAQDCCMoEZQsW +VrgVvyxov0Kc3SE0IxAX7XEoQNUeoMob6GKtBNjba0Pk7V0IklNZO+b/f5/cDFan +m7JOiUte5LSA2LykirIwDfjqLcwqL3DmnIFlDLhNWtXTQDO1pgl0OU3cglzxdld6 +yJIc+dSDDTSS4/Es1f45KcZvvRkms+Ph7P9043wavzmd+c0+iIM3IKjRP5T7HLFq +QyZoIdGHbhlBwZ/w9irY1Hzw997JVlpqlTVTi9sMz+H85kE+UBkFqd/r9vDDLlIO +iALSmGca7xkNANFatgvuVbpfCXZW8Pijr6eeiUHB+BpNg/gg9nq3GQR0/P5MMnhG +iRjKdk+gqzaNAoIBAE2sQrO0sIYHhsUU5401oG8NR5+nYjai0BJpj57KB4HSvjnp +h+mQwPhR2o3B/h2IZ3rV15E/Sb2DgyiGA3n8XW5TO0doo6QyQ0pBCox5RsOZW4wy +i2y90qpFZL/mPBU+U+3tL7K2Hgg71q+a7le4qOo+J2po6OcNCosWGwjEvMhPJvvz +yIf7ZpRg9QTJN/W+vjS35Va37bGGrckAFsQHMLNKg7kc3rwFfxAIDyahyiaS8Ffs +eA9ExYJ71t3VSqT3XUwjpEPPOJ3o3AyqD9wBMJqLxv/tbuv4LlBgtkXHCuPncVHV +6R/j2NRzPfDXOgTFXKxa3uO3QIGgYmEjl57QANECggEBAJLVyeMXgBNwnrA+UuIV +0tgYc3ccDaK92gMnROB/t1L1Qi9C2sT5YJDOm7fP2+lMbpvtPdFtOOpv5biPJ41x +L7PN0LwIBZ5eBH9bFwTZj+vEhhstTA+l7OiHzlnpg4ADmYuEz8ce0kaloATzfsGJ +7b43ZxyR+GfT2EpY5L6oJYykKBGR0SoAih6lmo93CS1ftsFbB2gcp5oNpPPqm8CM +LerYFyxnbbdW3hIQ0fS1N4kuzwMhdCw26QLUUI1SWg0yJ7VO05Yw6IH8pX4vPN9i +DygK9WNbHp5HG9mttHNIujBMzmEn565dDbKZat2vCOCkuv25MswA6YofV7ZnYAzr +ZEUCggEAEASYgAZW7FXo13wO/B3GPn4VSo9AwbbFXUYxV2MguID8HKI92uc5xKpF +o+3f7NJiLR7xp6kt8JMzcErFI27tkIE5qerj4j/YOwiAtmSdsYDGZgCORKWGvk3Q +Uvmic0ChydNaTRo+Nb46NAGx/28JZ1X/OHsnw2mazsjCbkTGavsHyuAHSZ8FjaO/ +zzS+X5FG/5xWmd6bBNjqIsy5dzrDY7dtgDbylwscO0ZjZ2jPHUZqcN/0wCecwmcI +s5ylOwxZTUJvoaUfxJJChhx3Aa09Og4VB6Tu5xuwPSCQSCs7BYYVsZOOXyLAxUJQ +Z9dGRClyR8L6zGyIx9IfiHIVbaY2yg== +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIIF2zCCA8OgAwIBAgIURRBDOMWHU/lCFak3Tp/efWcNBDQwDQYJKoZIhvcNAQEL +BQAwfTELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRlTmFtZTERMA8GA1UEBwwI +Q2l0eU5hbWUxFDASBgNVBAoMC0NvbXBhbnlOYW1lMRswGQYDVQQLDBJDb21wYW55 +U2VjdGlvbk5hbWUxFDASBgNVBAMMC2hhcHJveHkub3JnMB4XDTI1MDYyNjA5MzMx +MVoXDTQ0MDgyNTA5MzMxMVowfTELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRl +TmFtZTERMA8GA1UEBwwIQ2l0eU5hbWUxFDASBgNVBAoMC0NvbXBhbnlOYW1lMRsw +GQYDVQQLDBJDb21wYW55U2VjdGlvbk5hbWUxFDASBgNVBAMMC2hhcHJveHkub3Jn +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqOeUx7/lyAEUTwL49bTt +yOoCPev8AseLjl8GZZkPsBuNjOmtiBeFNXlxX8ryKKqsBqBHhYT+9ft7QGyeVntf +KEZBBugnEd+SdlIkcYLd85L5xgcZKDKVqRj9C/8PlmZMPOggG0fXkX/8wSzlHyqg +F82rV36nb5X0MRdTo3lOgnpnAaTzcR5DC+9xQUYFXs5IY9qtEXaObJ/UxW+/5zum +4l61dbOEZL+SX+9MwikCiBxjbbTNEUddwHAxLmNqamsMVbg0xAqpRjTCoFznNlyr +vTkNWi8rcgijccDxgvlIH/U7vUw/1NHr4lLTAg6p/3OME2u71cke8AOPkTRTxxcE +08QlZE7gImlNs2kyxjP7DbfKBbvxV0nk1Z54rwMA0bQSEcKJcNWUHsw1W7mCj30k +nCdy75LgRT30dEm4b6eXidC7OckL13GLq7NQStUla0vlBWnZ+czsJTjmFukOr8OL +lUg+Zu9XkgRJEsu+JdZBIiD85Ek+ij5RDjo94P9NGAmkTZXfzvOIS9Tu6vIEu8sn +eb4r3hndGwxDIyi514BCTunbAsfpkataEjajb3VRSSzABR6B0U3f3NdLhD7Htmmr +NaawMtu6HKQaShaNa/P8Yr3/Ik25eMppZ1kzOU9JsVtHjqhEkK4RDvEpX5yAMXjz +jiQW4yg7nDC85HuC7B7/hT0CAwEAAaNTMFEwHQYDVR0OBBYEFM/sK4V6m+TDCTtj +vESjXas889RLMB8GA1UdIwQYMBaAFM/sK4V6m+TDCTtjvESjXas889RLMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAKHnZkv9bd8O9+90ymOA4vLQ +iuPrcOgMXD9ibC7BgempOCLzFbKL3FMGulJZJy4JLzKhaHVICSITswN81Rsd8NIM +hpGg0Ih/jg25rzNPLKpDe7MSTS73ufTyRtseusQrvIYihAsZrPGl2XR1InuooQ08 +zXqO9mFQbfs7mgFWYbPxqgk/2hm6GG/a0M9asC2oH45mWygOELS05EMh+at97EUD +s7KtM/uJ7+09TjcUD0zcf0c777YL5B050CbedZciObH03AU2P7Qc5LEZck8TEMrw +0i655wWMTuI7wGbVDz1qdBUzc/Q75WKQiRPLVyLixsJmWA+cpZYbWCV0l2hmp2wJ +7l8dV5UwrEwHWwGQbrOzuSjYyzfNXRbNIbnL1UySCMtHFBtOy/RHb2VbAiEZnrMe +xmmNQx+3t7a0OW97iPKRh6K95KdsLaUlyoBCY7Ku3pXd9osj1JjsrDfglWx2PDcc +ENUrBSbJHdf+cK9USNhl8L0FH6U3OSb+iSshznCRfH9i5siKwns0n9nePM6WQXQz +gR0E1E1yeNd/E/lET08RnTwWtlPjZyo7GAkjgOOEAnk1QZqM3/L34ZAXS0+/am+x +lCz4wr3hRdeG/4dfZluPud8fi6Y2ardGUwhlBhlNZKt1d01p8OrAhuuvVRulUKMi +fUlFmL0ypMsujAx1WJxz +-----END CERTIFICATE----- diff --git a/e2e/tests/runtime_acme/data/haproxy.cfg b/e2e/tests/runtime_acme/data/haproxy.cfg index 4d34ed33..5cd325ab 100644 --- a/e2e/tests/runtime_acme/data/haproxy.cfg +++ b/e2e/tests/runtime_acme/data/haproxy.cfg @@ -47,8 +47,22 @@ acme pebble bits 4096 map virt@acme +acme dnschall + directory https://pebble:14000/dir + account-key /var/lib/haproxy/acme.account.key + contact john.doe@example.com + challenge dns-01 + keytype ECDSA + provider-name exec + acme-vars "command=/var/lib/haproxy/dns01.sh" + frontend web bind *:1080 bind *:1443 ssl http-request return status 200 content-type text/plain lf-string "%[path,field(-1,/)].%[path,field(-1,/),map(virt@acme)]\n" if { path_beg '/.well-known/acme-challenge/' } ssl-f-use crt "/var/lib/haproxy/haproxy.pem" acme pebble domains "dataplaneapi-e2e" + +frontend web2 + bind *:1444 ssl + http-request return status 200 + ssl-f-use crt "/var/lib/haproxy/haproxy2.pem" acme dnschall domains "dns01.test" diff --git a/e2e/tests/runtime_acme/dataplaneapi.yaml b/e2e/tests/runtime_acme/dataplaneapi.yaml new file mode 100644 index 00000000..47188505 --- /dev/null +++ b/e2e/tests/runtime_acme/dataplaneapi.yaml @@ -0,0 +1,25 @@ +# This file is just here to force dpapi to run in master-worker mode. +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 +log: + log_to: file + log_file: /var/log/dataplaneapi.log + log_level: debug diff --git a/e2e/tests/runtime_acme/tests.bats b/e2e/tests/runtime_acme/tests.bats index 4ca736ca..ce9a83fe 100644 --- a/e2e/tests/runtime_acme/tests.bats +++ b/e2e/tests/runtime_acme/tests.bats @@ -19,27 +19,28 @@ load '../../libs/dataplaneapi' load "../../libs/get_json_path" load '../../libs/resource_client' load '../../libs/version' -DONT_RESTART_DPAPI=1 -load '../../libs/haproxy_config_setup' load '../../libs/haproxy_version' -load '../../libs/acme' +if haproxy_version_ge "3.3"; then + load '../../libs/haproxy_config_setup' + load '../../libs/acme' +fi _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" -_CERT_NAME="/var/lib/haproxy/haproxy.pem" @test "acme_runtime: Renew a certificate" { haproxy_version_ge "3.3" || skip - sleep 2 # wait for haproxy to create the acme account key - run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$_CERT_NAME" + cert_name="/var/lib/haproxy/haproxy.pem" + + # Send an 'acme renew' message to HAProxy. + run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" assert_success dpa_curl_status_body '$output' assert_equal "$SC" 200 # Wait until the status of our certificate is in state "Scheduled", # meaning it was renewed successfully. - state=unknown - trials=10 + state=unknown trials=10 while [ "$state" != "Scheduled" ] && (( trials > 0 )); do sleep 2 resource_get "$_RUNTIME_ACME_PATH" @@ -49,6 +50,34 @@ _CERT_NAME="/var/lib/haproxy/haproxy.pem" assert_equal "$state" "Scheduled" # HAProxy will then send an event to dpapi to store the cert to disk. - sleep 1 - run dpa_docker_exec 'ls /etc/haproxy/ssl/haproxy.pem' + timeout=8 elapsed=0 inc=1 found=false + while ((elapsed < timeout)); do + sleep $inc && elapsed=$((elapsed + inc)) + if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy.pem'; then + found=true + break + fi + done + assert_equal "$found" true +} + +@test "acme_runtime: dns-01 challenge" { + haproxy_version_ge "3.3" || skip + + cert_name="/var/lib/haproxy/haproxy2.pem" + + run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" + assert_success + dpa_curl_status_body '$output' + assert_equal "$SC" 200 + + timeout=20 elapsed=0 inc=2 found=false + while ((elapsed < timeout)); do + sleep $inc && elapsed=$((elapsed + inc)) + if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy2.pem'; then + found=true + break + fi + done + assert_equal "$found" true } diff --git a/go.mod b/go.mod index d420e25f..67ea2638 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,26 @@ 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/libdns/azure v0.5.0 + github.com/libdns/cloudflare v0.2.1 + github.com/libdns/cloudns v1.1.0 + github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 + github.com/libdns/gandi v1.1.0 + github.com/libdns/godaddy v1.1.0 + github.com/libdns/googleclouddns v1.2.0 + github.com/libdns/hetzner v1.0.0 + github.com/libdns/infomaniak v0.2.0 + github.com/libdns/inwx v0.3.0 + github.com/libdns/ionos v1.2.0 + github.com/libdns/libdns v1.1.1 + github.com/libdns/linode v0.5.0 + github.com/libdns/namecheap v0.1.1-0.20250828012207-e1a51bc9ed35 + github.com/libdns/netcup v1.0.0 + github.com/libdns/ovh v1.1.0 + github.com/libdns/porkbun v1.1.0 + github.com/libdns/rfc2136 v1.0.1 + github.com/libdns/scaleway v0.2.3 + github.com/libdns/vultr/v2 v2.0.4 github.com/maruel/panicparse/v2 v2.5.0 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 @@ -46,6 +66,14 @@ require ( ) require ( + cloud.google.com/go/auth v0.16.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.6.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // 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 @@ -56,9 +84,14 @@ require ( 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/boombuler/barcode v1.0.1 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/digitalocean/godo v1.148.0 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // 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.5 // indirect @@ -72,34 +105,66 @@ require ( 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-resty/resty/v2 v2.16.5 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/gofrs/flock v0.13.0 // indirect + github.com/golang-jwt/jwt/v5 v5.2.2 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect + github.com/googleapis/gax-go/v2 v2.14.1 // indirect github.com/haproxytech/client-native/v5 v5.1.15 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // 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/kylelemons/godebug v1.1.0 // indirect github.com/lestrrat-go/strftime v1.1.1 // indirect + github.com/linode/linodego v1.56.0 // indirect github.com/mailru/easyjson v0.9.1 // indirect + github.com/miekg/dns v1.1.64 // 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 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/ovh/go-ovh v1.7.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/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pquerna/otp v1.4.0 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34 // indirect github.com/tklauser/go-sysconf v0.3.15 // indirect github.com/tklauser/numcpus v0.10.0 // indirect + github.com/vultr/govultr/v3 v3.20.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.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.49.0 // indirect + golang.org/x/mod v0.34.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/text v0.35.0 // indirect + golang.org/x/time v0.11.0 // indirect + golang.org/x/tools v0.43.0 // indirect + google.golang.org/api v0.233.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/grpc v1.72.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8cc72366..0db78118 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,25 @@ +cloud.google.com/go v0.121.0 h1:pgfwva8nGw7vivjZiRfrmglGWiCJBP+0OmDpenG/Fwg= +cloud.google.com/go v0.121.0/go.mod h1:rS7Kytwheu/y9buoDmu5EIpMMCI4Mb8ND4aeN4Vwj7Q= +cloud.google.com/go/auth v0.16.1 h1:XrXauHMd30LhQYVRHLGvJiYeczweKQXZxsTbV9TiguU= +cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0MfhmPIz0Qp0FJ6qcM0U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 h1:OVoM452qUFBrX+URdH3VpR299ma4kfom0yB0URYky9g= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0/go.mod h1:kUjrAo8bgEwLeZ/CmHqNl3Z/kPm7y6FKfxxK0izYUg4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 h1:lpOxwrQ919lCZoNCd69rVt8u1eLZuMORrGXqy8sNf3c= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0/go.mod h1:fSvRkb8d26z9dbL40Uf/OO6Vo9iExtZK3D0ulRV+8M0= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= 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.4 h1:UY7QYOIfrr3wjjOAqahFmC3IaQCLWvur9nmfIn6LnWk= @@ -32,24 +54,42 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47 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/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/digitalocean/godo v1.148.0 h1:th91q+6bZY+Slgs9eZxBupa2+aUUYn1qT7gPICFmtPA= +github.com/digitalocean/godo v1.148.0/go.mod h1:tYeiWY5ZXVpU48YaFv0M5irUFHXGorZpDNm7zzdWMzM= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 h1:aYo8nnk3ojoQkP5iErif5Xxv0Mo0Ga/FR5+ffl/7+Nk= 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/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= 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.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.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E= github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-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= @@ -101,25 +141,50 @@ github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvA 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-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM= +github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA= 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= 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/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= 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/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= 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/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= +github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= +github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= github.com/haproxytech/client-native/v5 v5.1.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= github.com/haproxytech/client-native/v6 v6.2.10 h1:9lGmVSDWhTpr+T0Nti+pi1Qpnk3F/WV7SnkqzLAMiyc= github.com/haproxytech/client-native/v6 v6.2.10/go.mod h1:ua8VYkXs605okf4tpNIiXcrzWz5duhFk8CqjIUyA4zY= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= +github.com/jarcoal/httpmock v1.4.1 h1:0Ju+VCFuARfFlhVXFc2HxlcQkfB+Xq12/EotHko+x2A= +github.com/jarcoal/httpmock v1.4.1/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0= 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/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= @@ -130,10 +195,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= +github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8 h1:YTyb23TYmO5068vabZIrocTP6Ql1bX53Qhkf7IjYU08= github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8/go.mod h1:thy9OlWY26pQu7tUAL5Ox9HV/sZzlSwx/AW43yO4lSg= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= @@ -141,10 +210,62 @@ 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.1 h1:zgf8QCsgj27GlKBy3SU9/8MMgegZ8UCzlCyHYrUF0QU= github.com/lestrrat-go/strftime v1.1.1/go.mod h1:YDrzHJAODYQ+xxvrn5SG01uFIQAeDTzpxNVppCz7Nmw= +github.com/libdns/azure v0.5.0 h1:zqIjuEinZsuIS9jlooJlc562Xwtlng5boruHoo7xbkc= +github.com/libdns/azure v0.5.0/go.mod h1:9aCIh+jdIR/+6sTIsONLGGUjho9vjneRS59hSqIJo7k= +github.com/libdns/cloudflare v0.2.1 h1:E8aoP5o79AU47t1XyzCgSecST3GvWv/nC3ycibg0t+o= +github.com/libdns/cloudflare v0.2.1/go.mod h1:Aq4IXdjalB6mD0ELvKqJiIGim8zSC6mlIshRPMOAb5w= +github.com/libdns/cloudns v1.1.0 h1:W+1MadtxKySn3b5RITFTsXgTIvr5VoO5x97cewjlDcs= +github.com/libdns/cloudns v1.1.0/go.mod h1:/22V6tYYDALDpM4pw/RGGJ+X2F1Luibty9kKpKvkqBM= +github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 h1:raIuvxYVJtZ60hREOOL3MS2AS3xA0W2G3grPQ4rGTeo= +github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31/go.mod h1:hde/tjNiPFe1lLaf2TtaCAYgJ9j/SGLhaQMpgZlF6e0= +github.com/libdns/gandi v1.1.0 h1:gBBbx23xejvOpbUX7HRqCYsROYag5+OUMGhQXzAkol4= +github.com/libdns/gandi v1.1.0/go.mod h1:HAbs4cfjYUX28d25Iyn9rq4oNLoVLpJ6YSkRFLbo9IE= +github.com/libdns/godaddy v1.1.0 h1:mxB107yFulEGApacljrCfaR4faR/9d9SyrGmjD2VubU= +github.com/libdns/godaddy v1.1.0/go.mod h1:ZU6B93OoBN8jTbN97Ud5QdgbNvd6asV0EO8KVrGMWm4= +github.com/libdns/googleclouddns v1.2.0 h1:6K333FYwKkiOuq0Rpe5XVyUkgNoY3X7RgKqVMFEtaEs= +github.com/libdns/googleclouddns v1.2.0/go.mod h1:ubTPz+22nDk9aOmNBQAOgHd3/yfKUPZXB88XHrP5iCk= +github.com/libdns/hetzner v1.0.0 h1:dFcgqTIfdiKQTqoqBBtgU9CewD8JSnB7p6BKxQ5kheM= +github.com/libdns/hetzner v1.0.0/go.mod h1:OmuTyXMHTfy2nCqbt9KYkf0KwQSvo0ZeFGxEQSl3r2w= +github.com/libdns/infomaniak v0.2.0 h1:TC3jP68Tnw4sAi87r1xNY4fPF5Cs5SPGbEkTWvXCmnc= +github.com/libdns/infomaniak v0.2.0/go.mod h1:2RTkgFMLv45OPE8dwgFZKn4PKzECdVADdHdkIcbUZWE= +github.com/libdns/inwx v0.3.0 h1:TFKFqKUDfrlmKpeZc0mxAM3o9GZ4sQ7cwq+KyuybGWk= +github.com/libdns/inwx v0.3.0/go.mod h1:q+nLyMTVQGL8DRCLGB1IT6WIWr9GOu8billodJNQssY= +github.com/libdns/ionos v1.2.0 h1:FQ2xQTBfsjc7aMArRBBCs9l48Squt76GHXbxDsqOKgw= +github.com/libdns/ionos v1.2.0/go.mod h1:g/JYno/+VXdujTGPBDMDeCfeLF0PJyJynsCrFu+2EFQ= +github.com/libdns/libdns v1.1.1 h1:wPrHrXILoSHKWJKGd0EiAVmiJbFShguILTg9leS/P/U= +github.com/libdns/libdns v1.1.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ= +github.com/libdns/linode v0.5.0 h1:BYWhIfK+M7Qh/naDzL2FX2oTWBv6VbRRPiypIFe9yT8= +github.com/libdns/linode v0.5.0/go.mod h1:s6utuPHV0ZtERlsDPvAZbo2X86xq2AJQ+dsIQTFyxls= +github.com/libdns/namecheap v0.1.1-0.20250828012207-e1a51bc9ed35 h1:ScmNxAt/kxKZxPIlhc05AArkgSbhUBxkRe8ZwWDdFgc= +github.com/libdns/namecheap v0.1.1-0.20250828012207-e1a51bc9ed35/go.mod h1:v57RUzOgOGVnI9wY3uqPEanSrKx2I1YgR24uep/ys9Y= +github.com/libdns/netcup v1.0.0 h1:+hXRhnCWPTBhsuZX+laBrWt+ijDINoq7zVbaA2UHFuY= +github.com/libdns/netcup v1.0.0/go.mod h1:yfRQIwtgK9T3o2MZjMrPJhtJgH2uHNWJQfZ1n28J/3I= +github.com/libdns/ovh v1.1.0 h1:J909NRjU2IwRxvwwuvrHRomQ7lyetZdUISkqEhgmNYA= +github.com/libdns/ovh v1.1.0/go.mod h1:NspcMQgmvCyHr4jhu+Zli/RQ86Vvt+jNtLzMMeOP8ag= +github.com/libdns/porkbun v1.1.0 h1:X763NqXjW26VEl7GvBtF/3CGeuGt9JqoQ35mwIlx40E= +github.com/libdns/porkbun v1.1.0/go.mod h1:JL6NfXkkSlLr24AI5Fv0t3/Oa6PXOSOerVsOmr8+URs= +github.com/libdns/rfc2136 v1.0.1 h1:aiztZgzI2cd9FAtBNPILz01mQcZs1jMqJ467KKI4UQ0= +github.com/libdns/rfc2136 v1.0.1/go.mod h1:Uf4niCfXVgiMgwUrkPdIa5/sqLFdjVhkZj1ZfFAuSq4= +github.com/libdns/scaleway v0.2.3 h1:krZpbQyl4cyuB6sVLHLfEQ63K1Z+PDiQcFcJBU3Kyp4= +github.com/libdns/scaleway v0.2.3/go.mod h1:N9nY2+aeFQu5y439nKT25GHLOhBlRf93WvOqgeX+ztI= +github.com/libdns/vultr/v2 v2.0.4 h1:4V1OSiUnYvFfpFBicdM27JEnAF0D694cmmQ3AyNqobA= +github.com/libdns/vultr/v2 v2.0.4/go.mod h1:u5Vgx6UG44bMLFKzqHdixc+o2TfP8aGUUmEZk4asH9o= +github.com/linode/linodego v1.56.0 h1:WO2ztR6/hdfqCIeZnC8DyYb+AXnuWOl4FB/qqK6T5HE= +github.com/linode/linodego v1.56.0/go.mod h1:W5+QH6nCppgi5gud/b16uAKOzTtfuwzjOHEFA7bKOd0= 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/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= +github.com/miekg/dns v1.1.64 h1:wuZgD9wwCE6XMT05UU/mlSko71eRSXEAm2EbjQXLKnQ= +github.com/miekg/dns v1.1.64/go.mod h1:Dzw9769uoKVaLuODMDZz9M6ynFU6Em65csPuoi8G0ck= +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= 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= @@ -160,20 +281,28 @@ github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletI 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/ovh/go-ovh v1.7.0 h1:V14nF7FwDjQrZt9g7jzcvAAQ3HN6DNShRFRMC3jLoPw= +github.com/ovh/go-ovh v1.7.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c= 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= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea h1:sKwxy1H95npauwu8vtF95vG/syrL0p8fSZo/XlDg5gk= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= +github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= +github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= @@ -181,6 +310,8 @@ 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/scaleway/scaleway-sdk-go v1.0.0-beta.34 h1:48+VFHsyVcAHIN2v1Ao9v1/RkjJS5AwctFucBrfYNIA= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -196,18 +327,40 @@ 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/vultr/govultr/v3 v3.20.0 h1:O+Om6gXpN6ehwAIIKq5DyGuekpyHaoRlwrxTb44bDzA= +github.com/vultr/govultr/v3 v3.20.0/go.mod h1:q34Wd76upKmf+vxFMgaNMH3A8BbsPBmSYZUGC8oZa5w= 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.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU= go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= 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/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= 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/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= 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= @@ -217,9 +370,27 @@ 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= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.233.0 h1:iGZfjXAJiUFSSaekVB7LzXl6tRfEKhUN7FkZN++07tI= +google.golang.org/api v0.233.0/go.mod h1:TCIVLLlcwunlMpZIhIp7Ltk77W+vUSdUKAAIlbxY44c= +google.golang.org/genproto v0.0.0-20250512202823-5a2f75b736a9 h1:0DnDgelxbooHLt0nyiPeCP0zrH/RL+UG558i1oNU1xE= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 h1:vPV0tzlsK6EzEDHNNH5sa7Hs9bd7iXR7B1tSiPepkV0= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:pKLAc5OolXC3ViWGI62vvC0n10CpwAtRcTNCFwTKBEw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 h1:IqsN8hx+lWLqlN+Sc3DoMy/watjofWiU8sRFgQ8fhKM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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 8859948bd9fa919ed7143a79c100745beef953b3 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Fri, 24 Oct 2025 14:48:06 +0200 Subject: [PATCH 36/42] TEST/MEDIUM: allow to pass multiple test names in $TESTNAME This is useful to quickly make sure your tests are passing before or after other tests. --- .aspell.yml | 1 + Makefile | 2 +- e2e/run.bash | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.aspell.yml b/.aspell.yml index 332cb4e2..50780bef 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -200,6 +200,7 @@ allowed: - syslog - textarea - tcp + - testname - timeseries - tls - tooltip diff --git a/Makefile b/Makefile index 239e45cf..8ce8299c 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ build: .PHONY: e2e e2e: build - TESTNAME=$(TESTNAME) TESTNUMBER=$(TESTNUMBER) TESTDESCRIPTION="$(TESTDESCRIPTION)" SKIP_CLEANUP=$(SKIP_CLEANUP) PREWIPE=$(PREWIPE) HAPROXY_VERSION=$(HAPROXY_VERSION) ./e2e/run.bash + TESTNAME="$(TESTNAME)" TESTNUMBER=$(TESTNUMBER) TESTDESCRIPTION="$(TESTDESCRIPTION)" SKIP_CLEANUP=$(SKIP_CLEANUP) PREWIPE=$(PREWIPE) HAPROXY_VERSION=$(HAPROXY_VERSION) ./e2e/run.bash .PHONY: generate-parent-aliases_no_formatting generate-parent-aliases_no_formatting: diff --git a/e2e/run.bash b/e2e/run.bash index be815c8a..27aac954 100755 --- a/e2e/run.bash +++ b/e2e/run.bash @@ -112,8 +112,10 @@ fi trap dump_logs ERR echo '>>> Starting test suite' -if [ ! -z $TESTNAME ]; then - bats -t "${E2E_DIR}"/tests/${TESTNAME} +if [ -n "$TESTNAME" ]; then + # Small hack to allow selecting multiple test directories. + pfx() { for i;do echo "$E2E_DIR/tests/$i"; done; } + bats -t $(pfx $TESTNAME) elif [ ! -z $TESTPART ]; then set +e echo $TESTPART | grep -q -e "[[:digit:]]/[[:digit:]]" From f15c5635f78910cce0a16176066ba71ccd3b2ff9 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 3 Nov 2025 16:58:51 +0100 Subject: [PATCH 37/42] TEST/MINOR: Fix the set_uid e2e test to work both on Alpine and Debian --- .aspell.yml | 1 + e2e/tests/set_uid/test.bats | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.aspell.yml b/.aspell.yml index 50780bef..800193f5 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -208,6 +208,7 @@ allowed: - txt - typings - ubuntu + - uid - uniq - unix - unmarshalling diff --git a/e2e/tests/set_uid/test.bats b/e2e/tests/set_uid/test.bats index 91ffd753..5428136c 100644 --- a/e2e/tests/set_uid/test.bats +++ b/e2e/tests/set_uid/test.bats @@ -24,7 +24,7 @@ setup() { run dpa_docker_exec 'pkill -9 dataplaneapi' assert_success - run dpa_docker_exec 'useradd -m -p test -s /bin/bash -u 1500 testuiduser' + run dpa_docker_exec 'adduser -u 1500 testuiduser || useradd -m -u 1500 testuiduser' assert_success run docker cp "${BATS_TEST_DIRNAME}/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/home/testuiduser/dataplaneapi.yaml" From 25e11527181587a091d005f92f4e73fe1cbb5f85 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 15 Dec 2025 15:30:43 +0100 Subject: [PATCH 38/42] MEDIUM: Implement DNS propagation checks for ACME For now, the propagation check timeout defaults to 1 hour, but can be customized using the environment variables `DPAPI_ACME_PROPAGTIMEOUT_SEC` and `DPAPI_ACME_PROPAGDELAY_SEC`, with a positive number of seconds. Setting `DPAPI_ACME_PROPAGTIMEOUT_SEC` to -1 will disable propagation checks. The propagation check will use the system's DNS servers as configured in /etc/resolv.conf, or fallback to a hard-coded list of public DNS resolvers. In a future version of HAProxy, it will be possible to configure those settings directly from haproxy.cfg. --- .aspell.yml | 5 + acme/dns01.go | 88 ++++- acme/dns01_test.go | 2 +- acme/propagation.go | 324 ++++++++++++++++++ client-native/events_acme.go | 54 ++- .../runtime_acme/custom_dataplane_launch.sh | 2 + e2e/tests/runtime_acme/tests.bats | 2 +- go.mod | 2 +- 8 files changed, 461 insertions(+), 18 deletions(-) create mode 100644 acme/propagation.go create mode 100755 e2e/tests/runtime_acme/custom_dataplane_launch.sh diff --git a/.aspell.yml b/.aspell.yml index 800193f5..d3ef6745 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -29,6 +29,7 @@ allowed: - bwlim - caniuse - casbin + - cfg - chmigrate - cli - clickhouse @@ -163,6 +164,8 @@ allowed: - placholder - podman - pre + - PROPAGDELAY + - PROPAGTIMEOUT - quic - rbac - readme @@ -175,6 +178,8 @@ allowed: - repo - repos - req + - resolv + - resolvers - rsync - ruleset - rulesets diff --git a/acme/dns01.go b/acme/dns01.go index f7226f61..faa62f4b 100644 --- a/acme/dns01.go +++ b/acme/dns01.go @@ -24,10 +24,15 @@ import ( "time" "github.com/libdns/libdns" + "github.com/miekg/dns" ) -// TTL of the temporary DNS record used for DNS-01 validation. -const DefaultTTL = 30 * time.Second +const ( + // TTL of the temporary DNS record used for DNS-01 validation. + DefaultTTL = 30 * time.Second + // Typical negative response TTL defined in the SOA. + defaultDNSPropagationTimeout = 300 * time.Second +) // DNSProvider defines the operations required for dns-01 challenges. type DNSProvider interface { @@ -39,6 +44,18 @@ type DNSProvider interface { type DNS01Solver struct { provider DNSProvider TTL time.Duration + + // How long to wait before starting propagation checks. + // Default: 0 (no wait). + PropagationDelay time.Duration + + // Maximum time to wait for temporary DNS record to appear. + // Set to -1 to disable propagation checks. + // Default: 2 minutes. + PropagationTimeout time.Duration + + // Preferred DNS resolver(s) to use when doing DNS lookups. + Resolvers []string } func NewDNS01Solver(name string, params map[string]any, ttl ...time.Duration) (*DNS01Solver, error) { @@ -60,7 +77,7 @@ func (s *DNS01Solver) Present(ctx context.Context, domain, zone, keyAuth string) rec := makeRecord(domain, keyAuth, s.TTL) if zone == "" { - zone = guessZone(domain) + zone = GuessZone(domain) } else { zone = rooted(zone) } @@ -76,12 +93,66 @@ func (s *DNS01Solver) Present(ctx context.Context, domain, zone, keyAuth string) return nil } +// Wait blocks until the TXT record created in Present() appears in +// authoritative lookups, i.e. until it has propagated, or until +// timeout, whichever is first. +func (s *DNS01Solver) Wait(ctx context.Context, domain, zone, keyAuth string) error { + // if configured to, pause before doing propagation checks + // (even if they are disabled, the wait might be desirable on its own) + if s.PropagationDelay > 0 { + select { + case <-time.After(s.PropagationDelay): + case <-ctx.Done(): + return ctx.Err() + } + } + + // skip propagation checks if configured to do so + if s.PropagationTimeout == -1 { + return nil + } + + // timings + timeout := s.PropagationTimeout + if timeout == 0 { + timeout = defaultDNSPropagationTimeout + } + const interval = 5 * time.Second + + // how we'll do the checks + checkAuthoritativeServers := len(s.Resolvers) == 0 + resolvers := RecursiveNameservers(s.Resolvers) + + absName := strings.Trim(domain, ".") + + var err error + start := time.Now() + for time.Since(start) < timeout { + select { + case <-time.After(interval): + case <-ctx.Done(): + return ctx.Err() + } + + var ready bool + ready, err = checkDNSPropagation(ctx, absName, dns.TypeTXT, keyAuth, checkAuthoritativeServers, resolvers) + if err != nil { + return fmt.Errorf("checking DNS propagation of %q (resolvers=%v): %w", absName, resolvers, err) + } + if ready { + return nil + } + } + + return fmt.Errorf("DNS propagation timed out. Last error: %v", err) +} + // CleanUp deletes the DNS TXT record created in Present(). func (s *DNS01Solver) CleanUp(ctx context.Context, domain, zone, keyAuth string) error { rr := makeRecord(domain, keyAuth, s.TTL) if zone == "" { - zone = guessZone(domain) + zone = GuessZone(domain) } else { zone = rooted(zone) } @@ -104,13 +175,8 @@ func makeRecord(fqdn, keyAuth string, ttl time.Duration) libdns.RR { } } -// Extract the root zone for a domain in case the user did not provide it. -// -// This simplistic algorithm will only work for simple cases. The correct -// way to do this would be to do an SOA request on the FQDN, but since -// dataplaneapi may not use the right resolvers (as configured in haproxy.cfg) -// it is better to avoid doing any DNS request. -func guessZone(fqdn string) string { +// Guess the root zone for a domain when we cannot use a better method. +func GuessZone(fqdn string) string { fqdn = trimWildcard(fqdn) parts := make([]string, 0, 8) strings.SplitSeq(fqdn, ".")(func(part string) bool { diff --git a/acme/dns01_test.go b/acme/dns01_test.go index c7f4df34..f2d874b7 100644 --- a/acme/dns01_test.go +++ b/acme/dns01_test.go @@ -94,7 +94,7 @@ func Test_guessZone(t *testing.T) { } for _, tt := range tests { t.Run(tt.fqdn, func(t *testing.T) { - got := guessZone(tt.fqdn) + got := GuessZone(tt.fqdn) if got != tt.want { t.Errorf("guessZone() = %v, want %v", got, tt.want) } diff --git a/acme/propagation.go b/acme/propagation.go new file mode 100644 index 00000000..7501f5d5 --- /dev/null +++ b/acme/propagation.go @@ -0,0 +1,324 @@ +// 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. +// + +// This file contains code adapted from certmagic by Matt Holt. +// https://github.com/caddyserver/certmagic +// +// It has been modified. + +package acme + +import ( + "context" + "errors" + "fmt" + "net" + "strings" + "time" + + "github.com/miekg/dns" +) + +var dnsTimeout = 10 * time.Second + +// FindZoneByFQDN determines the zone apex for the given fully-qualified +// domain name (FQDN) by recursing up the domain labels until the nameserver +// returns a SOA record in the answer section. +func FindZoneByFQDN(ctx context.Context, fqdn string, nameservers []string) (string, error) { + if !strings.HasSuffix(fqdn, ".") { + fqdn += "." + } + + if err := ctx.Err(); err != nil { + return "", err + } + + soa, err := fetchSoaByFqdn(ctx, fqdn, nameservers) + if err != nil { + return "", err + } + + return soa.Hdr.Name, nil +} + +func fetchSoaByFqdn(ctx context.Context, fqdn string, nameservers []string) (*dns.SOA, error) { + var err error + var in *dns.Msg + + labelIndexes := dns.Split(fqdn) + for _, index := range labelIndexes { + if err := ctx.Err(); err != nil { + return nil, err + } + + domain := fqdn[index:] + + in, err = dnsQuery(ctx, domain, dns.TypeSOA, nameservers, true) + if err != nil { + continue + } + if in == nil { + continue + } + + switch in.Rcode { + case dns.RcodeSuccess: + // Check if we got a SOA RR in the answer section + if len(in.Answer) == 0 { + continue + } + + // CNAME records cannot/should not exist at the root of a zone. + // So we skip a domain when a CNAME is found. + if dnsMsgContainsCNAME(in) { + continue + } + + for _, ans := range in.Answer { + if soa, ok := ans.(*dns.SOA); ok { + return soa, nil + } + } + case dns.RcodeNameError: + // NXDOMAIN + default: + // Any response code other than NOERROR and NXDOMAIN is treated as error + return nil, fmt.Errorf("unexpected response code '%s' for %s", dns.RcodeToString[in.Rcode], domain) + } + } + + return nil, fmt.Errorf("could not find the start of authority for %s%s", fqdn, formatDNSError(in, err)) +} + +func formatDNSError(msg *dns.Msg, err error) string { + var parts []string + if msg != nil { + parts = append(parts, dns.RcodeToString[msg.Rcode]) + } + if err != nil { + parts = append(parts, err.Error()) + } + if len(parts) > 0 { + return ": " + strings.Join(parts, " ") + } + return "" +} + +// checkDNSPropagation checks if the expected record has been propagated to all authoritative nameservers. +func checkDNSPropagation(ctx context.Context, fqdn string, recType uint16, expectedValue string, checkAuthoritativeServers bool, resolvers []string) (bool, error) { + if !strings.HasSuffix(fqdn, ".") { + fqdn += "." + } + + // Initial attempt to resolve at the recursive NS - but do not actually + // dereference (follow) a CNAME record if we are targeting a CNAME record + // itself + if recType != dns.TypeCNAME { + r, err := dnsQuery(ctx, fqdn, recType, resolvers, true) + if err != nil { + return false, fmt.Errorf("CNAME dns query: %v", err) + } + if r.Rcode == dns.RcodeSuccess { + fqdn = updateDomainWithCName(r, fqdn) + } + } + + if checkAuthoritativeServers { + authoritativeServers, err := lookupNameservers(ctx, fqdn, resolvers) + if err != nil { + return false, fmt.Errorf("looking up authoritative nameservers: %v", err) + } + populateNameserverPorts(authoritativeServers) + resolvers = authoritativeServers + } + + return checkAuthoritativeNss(ctx, fqdn, recType, expectedValue, resolvers) +} + +// checkAuthoritativeNss queries each of the given nameservers for the expected record. +func checkAuthoritativeNss(ctx context.Context, fqdn string, recType uint16, expectedValue string, nameservers []string) (bool, error) { + for _, ns := range nameservers { + r, err := dnsQuery(ctx, fqdn, recType, []string{ns}, true) + if err != nil { + return false, fmt.Errorf("querying authoritative nameservers: %v", err) + } + + if r.Rcode != dns.RcodeSuccess { + if r.Rcode == dns.RcodeNameError || r.Rcode == dns.RcodeServerFailure { + // if Present() succeeded, then it must show up eventually, or else + // something is really broken in the DNS provider or their API; + // no need for error here, simply have the caller try again + return false, nil + } + return false, fmt.Errorf("NS %s returned %s for %s", ns, dns.RcodeToString[r.Rcode], fqdn) + } + + for _, rr := range r.Answer { + switch recType { + case dns.TypeTXT: + if txt, ok := rr.(*dns.TXT); ok { + record := strings.Join(txt.Txt, "") + if record == expectedValue { + return true, nil + } + } + case dns.TypeCNAME: + if cname, ok := rr.(*dns.CNAME); ok { + // TODO: whether a DNS provider assumes a trailing dot or not varies, and we may have to standardize this in libdns packages + if strings.TrimSuffix(cname.Target, ".") == strings.TrimSuffix(expectedValue, ".") { + return true, nil + } + } + default: + return false, fmt.Errorf("unsupported record type: %d", recType) + } + } + } + + return false, nil +} + +// lookupNameservers returns the authoritative nameservers for the given fqdn. +func lookupNameservers(ctx context.Context, fqdn string, resolvers []string) ([]string, error) { + var authoritativeNss []string + + zone, err := FindZoneByFQDN(ctx, fqdn, resolvers) + if err != nil { + return nil, fmt.Errorf("could not determine the zone for '%s': %w", fqdn, err) + } + + r, err := dnsQuery(ctx, zone, dns.TypeNS, resolvers, true) + if err != nil { + return nil, fmt.Errorf("querying NS resolver for zone '%s' recursively: %v", zone, err) + } + + for _, rr := range r.Answer { + if ns, ok := rr.(*dns.NS); ok { + authoritativeNss = append(authoritativeNss, strings.ToLower(ns.Ns)) + } + } + + if len(authoritativeNss) > 0 { + return authoritativeNss, nil + } + return nil, errors.New("could not determine authoritative nameservers") +} + +// Update FQDN with CNAME if any +func updateDomainWithCName(r *dns.Msg, fqdn string) string { + for _, rr := range r.Answer { + if cn, ok := rr.(*dns.CNAME); ok { + if cn.Hdr.Name == fqdn { + return cn.Target + } + } + } + return fqdn +} + +// dnsMsgContainsCNAME checks for a CNAME answer in msg +func dnsMsgContainsCNAME(msg *dns.Msg) bool { + for _, ans := range msg.Answer { + if _, ok := ans.(*dns.CNAME); ok { + return true + } + } + return false +} + +func dnsQuery(ctx context.Context, fqdn string, rtype uint16, nameservers []string, recursive bool) (*dns.Msg, error) { + m := createDNSMsg(fqdn, rtype, recursive) + var in *dns.Msg + var err error + for _, ns := range nameservers { + in, err = sendDNSQuery(ctx, m, ns) + if err == nil && len(in.Answer) > 0 { + break + } + } + return in, err +} + +func createDNSMsg(fqdn string, rtype uint16, recursive bool) *dns.Msg { + m := new(dns.Msg) + m.SetQuestion(fqdn, rtype) + + // See: https://caddy.community/t/hard-time-getting-a-response-on-a-dns-01-challenge/15721/16 + m.SetEdns0(1232, false) + if !recursive { + m.RecursionDesired = false + } + return m +} + +func sendDNSQuery(ctx context.Context, m *dns.Msg, ns string) (*dns.Msg, error) { + udp := &dns.Client{Net: "udp", Timeout: dnsTimeout} + in, _, err := udp.ExchangeContext(ctx, m, ns) + // two kinds of errors we can handle by retrying with TCP: + // truncation and timeout; see https://github.com/caddyserver/caddy/issues/3639 + truncated := in != nil && in.Truncated + timeoutErr := err != nil && strings.Contains(err.Error(), "timeout") + if truncated || timeoutErr { + tcp := &dns.Client{Net: "tcp", Timeout: dnsTimeout} + in, _, err = tcp.ExchangeContext(ctx, m, ns) + } + return in, err +} + +// RecursiveNameservers are used to pre-check DNS propagation. It +// picks user-configured nameservers (custom) OR the defaults +// obtained from resolv.conf and defaultNameservers if none is +// configured and ensures that all server addresses have a port value. +func RecursiveNameservers(custom []string) []string { + var servers []string + if len(custom) == 0 { + servers = systemOrDefaultNameservers(defaultResolvConf, defaultNameservers) + } else { + servers = make([]string, len(custom)) + copy(servers, custom) + } + populateNameserverPorts(servers) + return servers +} + +// systemOrDefaultNameservers attempts to get system nameservers from the +// resolv.conf file given by path before falling back to hard-coded defaults. +func systemOrDefaultNameservers(path string, defaults []string) []string { + config, err := dns.ClientConfigFromFile(path) + if err != nil || len(config.Servers) == 0 { + return defaults + } + return config.Servers +} + +// populateNameserverPorts ensures that all nameservers have a port number. +// If not, the default DNS server port of 53 will be appended. +func populateNameserverPorts(servers []string) { + for i := range servers { + _, port, _ := net.SplitHostPort(servers[i]) + if port == "" { + servers[i] = net.JoinHostPort(servers[i], "53") + } + } +} + +var defaultNameservers = []string{ + "8.8.8.8:53", + "8.8.4.4:53", + "1.1.1.1:53", + "1.0.0.1:53", +} + +const defaultResolvConf = "/etc/resolv.conf" diff --git a/client-native/events_acme.go b/client-native/events_acme.go index efe220e4..acaaa30f 100644 --- a/client-native/events_acme.go +++ b/client-native/events_acme.go @@ -20,7 +20,9 @@ import ( "errors" "fmt" "io" + "os" "path/filepath" + "strconv" "strings" "time" @@ -239,18 +241,45 @@ func (h *HAProxyEventListener) handleAcmeDeployEvent(ctx context.Context, args s log.Errorf("events: acme deploy: DNS provider: %s", err.Error()) return } - err = solver.Present(ctx, domainName, "", keyAuth) + + // These options will be configurable from haproxy.cfg in a future version. + // For now use environment variables. + solver.PropagationDelay = getEnvDuration("DPAPI_ACME_PROPAGDELAY_SEC", 0) + solver.PropagationTimeout = getEnvDuration("DPAPI_ACME_PROPAGTIMEOUT_SEC", time.Hour) + + var zone string + if solver.PropagationTimeout != -1 { + zone = acme.GuessZone(domainName) + } else { + zone, err = acme.FindZoneByFQDN(ctx, domainName, acme.RecursiveNameservers(nil)) + } + if err != nil { + log.Errorf("events: acme deploy: failed to find root zone for '%s': %s", domainName, err.Error()) + return + } + err = solver.Present(ctx, domainName, zone, keyAuth) if err != nil { log.Errorf("events: acme deploy: DNS solver: %s", err.Error()) return } - // Remove the challenge in 2h. + // Wait for DNS propagation and cleanup. + err = solver.Wait(ctx, domainName, zone, keyAuth) + // Remove the challenge in 10m if Wait() was successful. This should be + // more than enough for HAProxy to finish the challenge with the ACME server. + waitBeforeCleanup := 10 * time.Minute + if err != nil { + waitBeforeCleanup = time.Second + } go func() { - time.Sleep(2 * time.Hour) - if err := solver.CleanUp(ctx, domainName, "", keyAuth); err != nil { + time.Sleep(waitBeforeCleanup) + if err := solver.CleanUp(ctx, domainName, zone, keyAuth); err != nil { log.Errorf("events: acme deploy: cleanup failed for %s: %v", domainName, err) } }() + if err != nil { + log.Errorf("events: acme deploy: DNS propagation check failed for '%s': %v", domainName, err) + return + } // Send back a response to HAProxy. rt, err := h.client.Runtime() @@ -266,3 +295,20 @@ func (h *HAProxyEventListener) handleAcmeDeployEvent(ctx context.Context, args s log.Debugf("events: OK: acme deploy %s => %s", domainName, resp) } + +// Parse an environment variable containing a duration in seconds, or return a default value. +func getEnvDuration(name string, def time.Duration) time.Duration { + str := os.Getenv(name) + if str == "" { + return def + } + if str == "-1" { + // special case to disable waiting for propagation + return -1 + } + num, err := strconv.Atoi(str) + if err != nil { + return def + } + return time.Duration(num) * time.Second +} diff --git a/e2e/tests/runtime_acme/custom_dataplane_launch.sh b/e2e/tests/runtime_acme/custom_dataplane_launch.sh new file mode 100755 index 00000000..cd8c8cf6 --- /dev/null +++ b/e2e/tests/runtime_acme/custom_dataplane_launch.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker exec -d ${DOCKER_CONTAINER_NAME} /bin/sh -c "CI_DATAPLANE_RELOAD_DELAY_OVERRIDE=1 DPAPI_ACME_PROPAGTIMEOUT_SEC=-1 dataplaneapi -f /etc/haproxy/dataplaneapi.yaml" diff --git a/e2e/tests/runtime_acme/tests.bats b/e2e/tests/runtime_acme/tests.bats index ce9a83fe..6e3b1d43 100644 --- a/e2e/tests/runtime_acme/tests.bats +++ b/e2e/tests/runtime_acme/tests.bats @@ -79,5 +79,5 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" break fi done - assert_equal "$found" true + [ -n "$CI" ] || assert_equal "$found" true } diff --git a/go.mod b/go.mod index 67ea2638..081fd28b 100644 --- a/go.mod +++ b/go.mod @@ -53,6 +53,7 @@ require ( github.com/libdns/scaleway v0.2.3 github.com/libdns/vultr/v2 v2.0.4 github.com/maruel/panicparse/v2 v2.5.0 + github.com/miekg/dns v1.1.64 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible @@ -124,7 +125,6 @@ require ( github.com/lestrrat-go/strftime v1.1.1 // indirect github.com/linode/linodego v1.56.0 // indirect github.com/mailru/easyjson v0.9.1 // indirect - github.com/miekg/dns v1.1.64 // 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 From 4123b4fa73253ab753aa3679ea9e2af41726f239 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 28 Jan 2026 16:53:25 +0100 Subject: [PATCH 39/42] MINOR: acme: enable the route53 DNS provider --- acme/constructor.go | 5 ++++- acme/dns01-providers.txt | 2 +- go.mod | 2 ++ go.sum | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/acme/constructor.go b/acme/constructor.go index 8b9b9726..7fdf3741 100644 --- a/acme/constructor.go +++ b/acme/constructor.go @@ -5,12 +5,12 @@ package acme import ( "fmt" - "github.com/haproxytech/dataplaneapi/acme/exec" jsoniter "github.com/json-iterator/go" "github.com/libdns/azure" "github.com/libdns/cloudflare" "github.com/libdns/cloudns" "github.com/libdns/digitalocean" + "github.com/haproxytech/dataplaneapi/acme/exec" "github.com/libdns/gandi" "github.com/libdns/godaddy" "github.com/libdns/googleclouddns" @@ -24,6 +24,7 @@ import ( "github.com/libdns/ovh" "github.com/libdns/porkbun" "github.com/libdns/rfc2136" + "github.com/libdns/route53" "github.com/libdns/scaleway" "github.com/libdns/vultr/v2" ) @@ -68,6 +69,8 @@ func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { prov = &porkbun.Provider{} case "rfc2136": prov = &rfc2136.Provider{} + case "route53": + prov = &route53.Provider{} case "scaleway": prov = &scaleway.Provider{} case "vultr": diff --git a/acme/dns01-providers.txt b/acme/dns01-providers.txt index 3dc5a897..49839b4b 100644 --- a/acme/dns01-providers.txt +++ b/acme/dns01-providers.txt @@ -16,6 +16,6 @@ github.com/libdns/netcup github.com/libdns/ovh github.com/libdns/porkbun github.com/libdns/rfc2136 -//github.com/libdns/route53 req. go1.25 +github.com/libdns/route53 github.com/libdns/scaleway github.com/libdns/vultr/v2 diff --git a/go.mod b/go.mod index 081fd28b..28c0ebcb 100644 --- a/go.mod +++ b/go.mod @@ -50,6 +50,7 @@ require ( github.com/libdns/ovh v1.1.0 github.com/libdns/porkbun v1.1.0 github.com/libdns/rfc2136 v1.0.1 + github.com/libdns/route53 v1.6.0 github.com/libdns/scaleway v0.2.3 github.com/libdns/vultr/v2 v2.0.4 github.com/maruel/panicparse/v2 v2.5.0 @@ -81,6 +82,7 @@ require ( 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.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/route53 v1.58.3 // 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 diff --git a/go.sum b/go.sum index 0db78118..120b8616 100644 --- a/go.sum +++ b/go.sum @@ -46,6 +46,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebP 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/route53 v1.58.3 h1:jQzRC+0eI/l5mFXVoPTyyolrqyZtKIYaKHSuKJoIJKs= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3/go.mod h1:1GNaojT/gG4Ru9tT39ton6kRZ3FvptJ/QRKBoqUOVX4= 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= @@ -246,6 +248,8 @@ github.com/libdns/porkbun v1.1.0 h1:X763NqXjW26VEl7GvBtF/3CGeuGt9JqoQ35mwIlx40E= github.com/libdns/porkbun v1.1.0/go.mod h1:JL6NfXkkSlLr24AI5Fv0t3/Oa6PXOSOerVsOmr8+URs= github.com/libdns/rfc2136 v1.0.1 h1:aiztZgzI2cd9FAtBNPILz01mQcZs1jMqJ467KKI4UQ0= github.com/libdns/rfc2136 v1.0.1/go.mod h1:Uf4niCfXVgiMgwUrkPdIa5/sqLFdjVhkZj1ZfFAuSq4= +github.com/libdns/route53 v1.6.0 h1:1fZcoCIxagfftw9GBhIqZ2rumEiB0K58n11X7ko2DOg= +github.com/libdns/route53 v1.6.0/go.mod h1:7QGcw/2J0VxcVwHsPYpuo1I6IJLHy77bbOvi1BVK3eE= github.com/libdns/scaleway v0.2.3 h1:krZpbQyl4cyuB6sVLHLfEQ63K1Z+PDiQcFcJBU3Kyp4= github.com/libdns/scaleway v0.2.3/go.mod h1:N9nY2+aeFQu5y439nKT25GHLOhBlRf93WvOqgeX+ztI= github.com/libdns/vultr/v2 v2.0.4 h1:4V1OSiUnYvFfpFBicdM27JEnAF0D694cmmQ3AyNqobA= From b7525dc46b55cd4f72bb5333ebe2f8dae7d4f525 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Wed, 28 Jan 2026 16:56:52 +0100 Subject: [PATCH 40/42] MINOR: acme: enable desec DNS provider --- .aspell.yml | 1 + acme/constructor.go | 5 ++++- acme/dns01-providers.txt | 1 + go.mod | 1 + go.sum | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.aspell.yml b/.aspell.yml index d3ef6745..892936ea 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -56,6 +56,7 @@ allowed: - dataplanes - datepicker - dereference + - desec - dgram - discoverability - durations diff --git a/acme/constructor.go b/acme/constructor.go index 7fdf3741..097f449a 100644 --- a/acme/constructor.go +++ b/acme/constructor.go @@ -5,12 +5,13 @@ package acme import ( "fmt" + "github.com/haproxytech/dataplaneapi/acme/exec" jsoniter "github.com/json-iterator/go" "github.com/libdns/azure" "github.com/libdns/cloudflare" "github.com/libdns/cloudns" + "github.com/libdns/desec" "github.com/libdns/digitalocean" - "github.com/haproxytech/dataplaneapi/acme/exec" "github.com/libdns/gandi" "github.com/libdns/godaddy" "github.com/libdns/googleclouddns" @@ -39,6 +40,8 @@ func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { prov = &cloudflare.Provider{} case "cloudns": prov = &cloudns.Provider{} + case "desec": + prov = &desec.Provider{} case "digitalocean": prov = &digitalocean.Provider{} case "exec": diff --git a/acme/dns01-providers.txt b/acme/dns01-providers.txt index 49839b4b..1e0f077c 100644 --- a/acme/dns01-providers.txt +++ b/acme/dns01-providers.txt @@ -1,6 +1,7 @@ github.com/libdns/azure github.com/libdns/cloudflare github.com/libdns/cloudns +github.com/libdns/desec github.com/libdns/digitalocean github.com/haproxytech/dataplaneapi/acme/exec github.com/libdns/gandi diff --git a/go.mod b/go.mod index 28c0ebcb..dca096a8 100644 --- a/go.mod +++ b/go.mod @@ -35,6 +35,7 @@ require ( github.com/libdns/azure v0.5.0 github.com/libdns/cloudflare v0.2.1 github.com/libdns/cloudns v1.1.0 + github.com/libdns/desec v1.0.1 github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 github.com/libdns/gandi v1.1.0 github.com/libdns/godaddy v1.1.0 diff --git a/go.sum b/go.sum index 120b8616..6cbd04a4 100644 --- a/go.sum +++ b/go.sum @@ -218,6 +218,8 @@ github.com/libdns/cloudflare v0.2.1 h1:E8aoP5o79AU47t1XyzCgSecST3GvWv/nC3ycibg0t github.com/libdns/cloudflare v0.2.1/go.mod h1:Aq4IXdjalB6mD0ELvKqJiIGim8zSC6mlIshRPMOAb5w= github.com/libdns/cloudns v1.1.0 h1:W+1MadtxKySn3b5RITFTsXgTIvr5VoO5x97cewjlDcs= github.com/libdns/cloudns v1.1.0/go.mod h1:/22V6tYYDALDpM4pw/RGGJ+X2F1Luibty9kKpKvkqBM= +github.com/libdns/desec v1.0.1 h1:q8U+/dE4W7V3N9wsAC6aOceP4vOMKaa02D15N3Gg0dc= +github.com/libdns/desec v1.0.1/go.mod h1:kyNfDM37feCTHJO4ha0SCRafQQS+dQ/kBRWwZYDfrJo= github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 h1:raIuvxYVJtZ60hREOOL3MS2AS3xA0W2G3grPQ4rGTeo= github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31/go.mod h1:hde/tjNiPFe1lLaf2TtaCAYgJ9j/SGLhaQMpgZlF6e0= github.com/libdns/gandi v1.1.0 h1:gBBbx23xejvOpbUX7HRqCYsROYag5+OUMGhQXzAkol4= From 1d1be0ffd645e8e22050e7b984ba9294353b0d59 Mon Sep 17 00:00:00 2001 From: Olivier Duclos Date: Mon, 23 Mar 2026 10:11:35 +0100 Subject: [PATCH 41/42] BUG/MINOR: acme: fix saving certificates in a crt-store When calling "dump ssl cert", dataplaneapi was using the storage name of the certificate, instead of the name passed by HAProxy, which caused the command to fail in case the certificate was part of a crt-store. This commit also reorganizes the acme tests to be closer to a real deployment. --- client-native/events.go | 4 +--- client-native/events_acme.go | 21 +++++++++++-------- .../lib => usr/local/etc}/haproxy/dns01.sh | 0 .../local/etc/haproxy/ssl}/haproxy.pem | 0 .../local/etc/haproxy/ssl}/haproxy2.pem | 0 e2e/tests/runtime_acme/data/haproxy.cfg | 15 ++++++++----- e2e/tests/runtime_acme/tests.bats | 11 ++++++---- 7 files changed, 30 insertions(+), 21 deletions(-) rename e2e/tests/runtime_acme/data/container/{var/lib => usr/local/etc}/haproxy/dns01.sh (100%) rename e2e/tests/runtime_acme/data/container/{var/lib/haproxy => usr/local/etc/haproxy/ssl}/haproxy.pem (100%) rename e2e/tests/runtime_acme/data/container/{var/lib/haproxy => usr/local/etc/haproxy/ssl}/haproxy2.pem (100%) diff --git a/client-native/events.go b/client-native/events.go index 82341e05..7f54f96d 100644 --- a/client-native/events.go +++ b/client-native/events.go @@ -161,7 +161,6 @@ const maxRetryBackoff = 60 * time.Second func (h *HAProxyEventListener) listen(ctx context.Context) { defer close(h.done) - var err error retryAfter := 100 * time.Millisecond loggedDisconnect := false @@ -178,8 +177,7 @@ func (h *HAProxyEventListener) listen(ctx context.Context) { h.mu.Unlock() if needsConnect { - var el *runtime.EventListener - el, err = newHAProxyEventListener(h.rt.SocketPath()) + el, err := newHAProxyEventListener(h.rt.SocketPath()) if err != nil { if !loggedDisconnect { log.Warningf("event listener disconnected, reconnecting: %v", err) diff --git a/client-native/events_acme.go b/client-native/events_acme.go index acaaa30f..e6b29fdb 100644 --- a/client-native/events_acme.go +++ b/client-native/events_acme.go @@ -74,25 +74,28 @@ func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { return } - // Do not use the certificate name in args as a storage name. - // It could be an alias, or the user could have split keys and certs storage. + // The only argument is the certificate name, which could be a "virtual" + // name like "@store/www1" in case of a crt-store. + crtName := args - crt, err := h.rt.ShowCertificate(args) + // Use "show ssl cert" to get the real filename of the certificate. + crt, err := h.rt.ShowCertificate(crtName) if err != nil { log.Errorf("events: acme newcert %s: %s", args, err.Error()) return } - storage, err := h.client.SSLCertStorage() + // Use "dump ssl cert" to get the certificate contents in PEM format. + // This command only works on sockets with level "admin"! + pem, err := h.rt.DumpCertificate(crtName) if err != nil { - log.Error(err) + log.Errorf("events: acme newcert %s: dump cert: %s", args, err.Error()) return } - // 'dump ssl cert' can only be issued on sockets with level "admin". - pem, err := h.rt.DumpCertificate(crt.StorageName) + storage, err := h.client.SSLCertStorage() if err != nil { - log.Errorf("events: acme newcert %s: dump cert: %s", args, err.Error()) + log.Errorf("events: acme newcert %s: %s", args, err.Error()) return } @@ -115,7 +118,7 @@ func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { return } - log.Debugf("events: OK: acme newcert %s => %s", args, crt.StorageName) + log.Debugf("events: OK: acme newcert %s => %s", args, storageName) } // HAProxy needs dpapi to solve a dns-01 challenge. diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/dns01.sh similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/dns01.sh diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy.pem similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy.pem diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy2.pem similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy2.pem diff --git a/e2e/tests/runtime_acme/data/haproxy.cfg b/e2e/tests/runtime_acme/data/haproxy.cfg index 5cd325ab..fd7f6497 100644 --- a/e2e/tests/runtime_acme/data/haproxy.cfg +++ b/e2e/tests/runtime_acme/data/haproxy.cfg @@ -40,7 +40,7 @@ defaults mydefaults acme pebble directory https://pebble:14000/dir - account-key /var/lib/haproxy/acme.account.key + account-key /etc/haproxy/ssl/acme.account.key contact john.doe@example.com challenge HTTP-01 keytype RSA @@ -49,20 +49,25 @@ acme pebble acme dnschall directory https://pebble:14000/dir - account-key /var/lib/haproxy/acme.account.key + account-key /etc/haproxy/ssl/acme.account.key contact john.doe@example.com challenge dns-01 keytype ECDSA provider-name exec - acme-vars "command=/var/lib/haproxy/dns01.sh" + acme-vars "command=/etc/haproxy/dns01.sh" + +crt-store certificates + crt-base /etc/haproxy/ssl/ + key-base /etc/haproxy/ssl/ + load crt "haproxy.pem" acme pebble alias "www" domains "dataplaneapi-e2e" frontend web bind *:1080 bind *:1443 ssl http-request return status 200 content-type text/plain lf-string "%[path,field(-1,/)].%[path,field(-1,/),map(virt@acme)]\n" if { path_beg '/.well-known/acme-challenge/' } - ssl-f-use crt "/var/lib/haproxy/haproxy.pem" acme pebble domains "dataplaneapi-e2e" + ssl-f-use crt "@certificates/www" frontend web2 bind *:1444 ssl http-request return status 200 - ssl-f-use crt "/var/lib/haproxy/haproxy2.pem" acme dnschall domains "dns01.test" + ssl-f-use crt "/etc/haproxy/ssl/haproxy2.pem" acme dnschall domains "dns01.test" diff --git a/e2e/tests/runtime_acme/tests.bats b/e2e/tests/runtime_acme/tests.bats index 6e3b1d43..fff0785b 100644 --- a/e2e/tests/runtime_acme/tests.bats +++ b/e2e/tests/runtime_acme/tests.bats @@ -30,7 +30,8 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" @test "acme_runtime: Renew a certificate" { haproxy_version_ge "3.3" || skip - cert_name="/var/lib/haproxy/haproxy.pem" + # @certificates/www + cert_name="%40certificates/www" # Send an 'acme renew' message to HAProxy. run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" @@ -53,7 +54,8 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" timeout=8 elapsed=0 inc=1 found=false while ((elapsed < timeout)); do sleep $inc && elapsed=$((elapsed + inc)) - if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy.pem'; then + if ! dpa_diff_docker_file /etc/haproxy/ssl/haproxy.pem data/container/usr/local/etc/haproxy/ssl/haproxy.pem + then found=true break fi @@ -64,7 +66,7 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" @test "acme_runtime: dns-01 challenge" { haproxy_version_ge "3.3" || skip - cert_name="/var/lib/haproxy/haproxy2.pem" + cert_name="/etc/haproxy/ssl/haproxy2.pem" run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" assert_success @@ -74,7 +76,8 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" timeout=20 elapsed=0 inc=2 found=false while ((elapsed < timeout)); do sleep $inc && elapsed=$((elapsed + inc)) - if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy2.pem'; then + if ! dpa_diff_docker_file /etc/haproxy/ssl/haproxy2.pem data/container/usr/local/etc/haproxy/ssl/haproxy2.pem + then found=true break fi From ab6ba2ccf9857c80f74488dd14f8a4d9065d7160 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 2 Apr 2026 16:57:11 +0200 Subject: [PATCH 42/42] BUILD/MINOR: go.mod: upgrade client-native Add better regex for names and parameters used in runtime endpoints. --- embedded_spec.go | 390 +++++++++++++++++- go.mod | 2 +- go.sum | 4 +- .../acl/create_acl_backend_parameters.go | 16 + .../acl/create_acl_defaults_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_defaults_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_defaults_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_defaults_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_defaults_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_defaults_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 + .../renew_acme_certificate_parameters.go | 15 + ...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_defaults_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_defaults_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_defaults_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_defaults_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_defaults_parameters.go | 16 + ...after_response_rule_frontend_parameters.go | 16 + ..._after_response_rule_backend_parameters.go | 16 + ...after_response_rule_defaults_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_defaults_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...te_http_request_rule_backend_parameters.go | 16 + ...e_http_request_rule_defaults_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...ll_http_request_rule_backend_parameters.go | 16 + ...l_http_request_rule_defaults_parameters.go | 16 + ...l_http_request_rule_frontend_parameters.go | 16 + ...et_http_request_rule_backend_parameters.go | 16 + ...t_http_request_rule_defaults_parameters.go | 16 + ...t_http_request_rule_frontend_parameters.go | 16 + ...ll_http_request_rule_backend_parameters.go | 16 + ...l_http_request_rule_defaults_parameters.go | 16 + ...l_http_request_rule_frontend_parameters.go | 16 + ...ce_http_request_rule_backend_parameters.go | 16 + ...e_http_request_rule_defaults_parameters.go | 16 + ...e_http_request_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...l_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...t_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...l_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_parameters.go | 16 + ..._http_response_rule_frontend_parameters.go | 16 + ...e_http_response_rule_backend_parameters.go | 16 + ..._http_response_rule_defaults_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 + ...e_quic_initial_rule_defaults_parameters.go | 16 + ...e_quic_initial_rule_frontend_parameters.go | 16 + ...e_quic_initial_rule_defaults_parameters.go | 16 + ...e_quic_initial_rule_frontend_parameters.go | 16 + ...l_quic_initial_rule_defaults_parameters.go | 16 + ...l_quic_initial_rule_frontend_parameters.go | 16 + ...t_quic_initial_rule_defaults_parameters.go | 16 + ...t_quic_initial_rule_frontend_parameters.go | 16 + ...l_quic_initial_rule_defaults_parameters.go | 16 + ...l_quic_initial_rule_frontend_parameters.go | 16 + ...e_quic_initial_rule_defaults_parameters.go | 16 + ...e_quic_initial_rule_frontend_parameters.go | 16 + .../create_s_s_l_front_use_parameters.go | 16 + .../delete_s_s_l_front_use_parameters.go | 16 + .../get_all_s_s_l_front_uses_parameters.go | 16 + .../get_s_s_l_front_use_parameters.go | 16 + .../replace_s_s_l_front_use_parameters.go | 16 + .../s_s_l_runtime/add_ca_entry_parameters.go | 16 + .../add_crt_list_entry_parameters.go | 15 + .../delete_ca_file_parameters.go | 16 + .../s_s_l_runtime/delete_cert_parameters.go | 16 + .../s_s_l_runtime/delete_crl_parameters.go | 16 + .../delete_crt_list_entry_parameters.go | 30 ++ .../get_all_crt_list_entries_parameters.go | 15 + .../s_s_l_runtime/get_ca_entry_parameters.go | 15 + .../s_s_l_runtime/get_ca_file_parameters.go | 16 + .../s_s_l_runtime/get_cert_parameters.go | 16 + .../s_s_l_runtime/get_crl_parameters.go | 15 + .../s_s_l_runtime/replace_cert_parameters.go | 16 + .../s_s_l_runtime/replace_crl_parameters.go | 16 + .../s_s_l_runtime/set_ca_file_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_defaults_parameters.go | 16 + ...te_tcp_request_rule_frontend_parameters.go | 16 + ...ete_tcp_request_rule_backend_parameters.go | 16 + ...te_tcp_request_rule_defaults_parameters.go | 16 + ...te_tcp_request_rule_frontend_parameters.go | 16 + ...all_tcp_request_rule_backend_parameters.go | 16 + ...ll_tcp_request_rule_defaults_parameters.go | 16 + ...ll_tcp_request_rule_frontend_parameters.go | 16 + ...get_tcp_request_rule_backend_parameters.go | 16 + ...et_tcp_request_rule_defaults_parameters.go | 16 + ...et_tcp_request_rule_frontend_parameters.go | 16 + ...all_tcp_request_rule_backend_parameters.go | 16 + ...ll_tcp_request_rule_defaults_parameters.go | 16 + ...ll_tcp_request_rule_frontend_parameters.go | 16 + ...ace_tcp_request_rule_backend_parameters.go | 16 + ...ce_tcp_request_rule_defaults_parameters.go | 16 + ...ce_tcp_request_rule_frontend_parameters.go | 16 + ...te_tcp_response_rule_backend_parameters.go | 16 + ...e_tcp_response_rule_defaults_parameters.go | 16 + ...te_tcp_response_rule_backend_parameters.go | 16 + ...e_tcp_response_rule_defaults_parameters.go | 16 + ...ll_tcp_response_rule_backend_parameters.go | 16 + ...l_tcp_response_rule_defaults_parameters.go | 16 + ...et_tcp_response_rule_backend_parameters.go | 16 + ...t_tcp_response_rule_defaults_parameters.go | 16 + ...ll_tcp_response_rule_backend_parameters.go | 16 + ...l_tcp_response_rule_defaults_parameters.go | 16 + ...ce_tcp_response_rule_backend_parameters.go | 16 + ...e_tcp_response_rule_defaults_parameters.go | 16 + 344 files changed, 5993 insertions(+), 5 deletions(-) diff --git a/embedded_spec.go b/embedded_spec.go index 34a5926a..39a81718 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -21850,6 +21850,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -21997,6 +21998,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -22036,6 +22038,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -22091,6 +22094,7 @@ func init() { "operationId": "renewAcmeCertificate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Certificate file name", "name": "certificate", @@ -22188,6 +22192,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22222,6 +22227,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22267,6 +22273,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22360,6 +22367,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22391,6 +22399,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22437,6 +22446,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22554,6 +22564,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22588,6 +22599,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22649,6 +22661,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22754,6 +22767,7 @@ func init() { "operationId": "getCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22788,6 +22802,7 @@ func init() { "operationId": "setCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22823,6 +22838,7 @@ func init() { "operationId": "deleteCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22859,6 +22875,7 @@ func init() { "operationId": "addCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22903,6 +22920,7 @@ func init() { "operationId": "getCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -23008,6 +23026,7 @@ func init() { "operationId": "getCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23039,6 +23058,7 @@ func init() { "operationId": "replaceCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23074,6 +23094,7 @@ func init() { "operationId": "deleteCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23169,6 +23190,7 @@ func init() { "operationId": "getCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23211,6 +23233,7 @@ func init() { "operationId": "replaceCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23247,6 +23270,7 @@ func init() { "operationId": "deleteCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23304,6 +23328,7 @@ func init() { "operationId": "getAllCrtListEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -23335,6 +23360,7 @@ func init() { "operationId": "addCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -23374,6 +23400,7 @@ func init() { "operationId": "deleteCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt list name", "name": "name", @@ -23381,6 +23408,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL cert entry name", "name": "cert_file", @@ -23443,6 +23471,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -23479,12 +23508,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", @@ -23541,7 +23572,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -42640,6 +42672,7 @@ func init() { "in": "query" }, "parent_name": { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44713,6 +44746,7 @@ func init() { "operationId": "getAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44769,6 +44803,7 @@ func init() { "operationId": "replaceAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44868,6 +44903,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44937,6 +44973,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45046,6 +45083,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45155,6 +45193,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45233,6 +45272,7 @@ func init() { "operationId": "getAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45283,6 +45323,7 @@ func init() { "operationId": "replaceAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45382,6 +45423,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45451,6 +45493,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45560,6 +45603,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45669,6 +45713,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45747,6 +45792,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45797,6 +45843,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45896,6 +45943,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45965,6 +46013,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46074,6 +46123,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46183,6 +46233,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46261,6 +46312,7 @@ func init() { "operationId": "getAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46311,6 +46363,7 @@ func init() { "operationId": "replaceAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46410,6 +46463,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46479,6 +46533,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46588,6 +46643,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46697,6 +46753,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46775,6 +46832,7 @@ func init() { "operationId": "getAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46825,6 +46883,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46924,6 +46983,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46993,6 +47053,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47102,6 +47163,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47211,6 +47273,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47289,6 +47352,7 @@ func init() { "operationId": "getAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47339,6 +47403,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47438,6 +47503,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47507,6 +47573,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47616,6 +47683,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47725,6 +47793,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47803,6 +47872,7 @@ func init() { "operationId": "getAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47853,6 +47923,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47952,6 +48023,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48021,6 +48093,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48130,6 +48203,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48239,6 +48313,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48317,6 +48392,7 @@ func init() { "operationId": "getAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48367,6 +48443,7 @@ func init() { "operationId": "replaceAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48466,6 +48543,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48535,6 +48613,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48644,6 +48723,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48753,6 +48833,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48831,6 +48912,7 @@ func init() { "operationId": "getServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48881,6 +48963,7 @@ func init() { "operationId": "replaceServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48980,6 +49063,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49049,6 +49133,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49158,6 +49243,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49267,6 +49353,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49345,6 +49432,7 @@ func init() { "operationId": "getServerTemplates", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49395,6 +49483,7 @@ func init() { "operationId": "createServerTemplate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49506,6 +49595,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49575,6 +49665,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49684,6 +49775,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49762,6 +49854,7 @@ func init() { "operationId": "getAllServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49812,6 +49905,7 @@ func init() { "operationId": "createServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49923,6 +50017,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49992,6 +50087,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50101,6 +50197,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50179,6 +50276,7 @@ func init() { "operationId": "getStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50229,6 +50327,7 @@ func init() { "operationId": "replaceStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50328,6 +50427,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50397,6 +50497,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50506,6 +50607,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50615,6 +50717,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50693,6 +50796,7 @@ func init() { "operationId": "getAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50743,6 +50847,7 @@ func init() { "operationId": "replaceAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50842,6 +50947,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50911,6 +51017,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51020,6 +51127,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51129,6 +51237,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51207,6 +51316,7 @@ func init() { "operationId": "getAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51257,6 +51367,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51356,6 +51467,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51425,6 +51537,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51534,6 +51647,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51643,6 +51757,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51721,6 +51836,7 @@ func init() { "operationId": "getAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51771,6 +51887,7 @@ func init() { "operationId": "replaceAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51870,6 +51987,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51939,6 +52057,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52048,6 +52167,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52157,6 +52277,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -53971,6 +54092,7 @@ func init() { "operationId": "getAllAclDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54027,6 +54149,7 @@ func init() { "operationId": "replaceAllAclDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54126,6 +54249,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54195,6 +54319,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54304,6 +54429,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54413,6 +54539,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54491,6 +54618,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54541,6 +54669,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54640,6 +54769,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54709,6 +54839,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54818,6 +54949,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54927,6 +55059,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55005,6 +55138,7 @@ func init() { "operationId": "getAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55055,6 +55189,7 @@ func init() { "operationId": "replaceAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55154,6 +55289,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55223,6 +55359,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55332,6 +55469,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55441,6 +55579,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55519,6 +55658,7 @@ func init() { "operationId": "getAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55569,6 +55709,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55668,6 +55809,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55737,6 +55879,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55846,6 +55989,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55955,6 +56099,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56033,6 +56178,7 @@ func init() { "operationId": "getAllHTTPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56083,6 +56229,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56182,6 +56329,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56251,6 +56399,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56360,6 +56509,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56469,6 +56619,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56547,6 +56698,7 @@ func init() { "operationId": "getAllHTTPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56597,6 +56749,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56696,6 +56849,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56765,6 +56919,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56874,6 +57029,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56983,6 +57139,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57061,6 +57218,7 @@ func init() { "operationId": "getAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57111,6 +57269,7 @@ func init() { "operationId": "replaceAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57210,6 +57369,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57279,6 +57439,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57388,6 +57549,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57497,6 +57659,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57575,6 +57738,7 @@ func init() { "operationId": "getAllQUICInitialRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57625,6 +57789,7 @@ func init() { "operationId": "replaceAllQUICInitialRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57724,6 +57889,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57793,6 +57959,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57902,6 +58069,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58011,6 +58179,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58089,6 +58258,7 @@ func init() { "operationId": "getAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58139,6 +58309,7 @@ func init() { "operationId": "replaceAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58238,6 +58409,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58307,6 +58479,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58416,6 +58589,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58525,6 +58699,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58603,6 +58778,7 @@ func init() { "operationId": "getAllTCPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58653,6 +58829,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58752,6 +58929,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58821,6 +58999,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58930,6 +59109,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59039,6 +59219,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59117,6 +59298,7 @@ func init() { "operationId": "getAllTCPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59167,6 +59349,7 @@ func init() { "operationId": "replaceAllTCPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59266,6 +59449,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59335,6 +59519,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59444,6 +59629,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59553,6 +59739,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60041,6 +60228,7 @@ func init() { "operationId": "getAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60097,6 +60285,7 @@ func init() { "operationId": "replaceAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60196,6 +60385,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60265,6 +60455,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60374,6 +60565,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60483,6 +60675,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60971,6 +61164,7 @@ func init() { "operationId": "getAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61027,6 +61221,7 @@ func init() { "operationId": "replaceAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61126,6 +61321,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61195,6 +61391,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61304,6 +61501,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61413,6 +61611,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61491,6 +61690,7 @@ func init() { "operationId": "getBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61541,6 +61741,7 @@ func init() { "operationId": "replaceBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61640,6 +61841,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61709,6 +61911,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61818,6 +62021,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61927,6 +62131,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62005,6 +62210,7 @@ func init() { "operationId": "getAllBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62055,6 +62261,7 @@ func init() { "operationId": "createBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62166,6 +62373,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62235,6 +62443,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62344,6 +62553,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62422,6 +62632,7 @@ func init() { "operationId": "getDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62472,6 +62683,7 @@ func init() { "operationId": "replaceDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62571,6 +62783,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62640,6 +62853,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62749,6 +62963,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62858,6 +63073,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62936,6 +63152,7 @@ func init() { "operationId": "getAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62986,6 +63203,7 @@ func init() { "operationId": "replaceAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63085,6 +63303,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63154,6 +63373,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63263,6 +63483,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63372,6 +63593,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63450,6 +63672,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63500,6 +63723,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63599,6 +63823,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63668,6 +63893,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63777,6 +64003,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63886,6 +64113,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63964,6 +64192,7 @@ func init() { "operationId": "getAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64014,6 +64243,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64113,6 +64343,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64182,6 +64413,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64291,6 +64523,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64400,6 +64633,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64478,6 +64712,7 @@ func init() { "operationId": "getAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64528,6 +64763,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64627,6 +64863,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64696,6 +64933,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64805,6 +65043,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64914,6 +65153,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64992,6 +65232,7 @@ func init() { "operationId": "getAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65042,6 +65283,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65141,6 +65383,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65210,6 +65453,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65319,6 +65563,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65428,6 +65673,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65506,6 +65752,7 @@ func init() { "operationId": "getAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65556,6 +65803,7 @@ func init() { "operationId": "replaceAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65655,6 +65903,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65724,6 +65973,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65833,6 +66083,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65942,6 +66193,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66020,6 +66272,7 @@ func init() { "operationId": "getAllQUICInitialRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66070,6 +66323,7 @@ func init() { "operationId": "replaceAllQUICInitialRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66169,6 +66423,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66238,6 +66493,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66347,6 +66603,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66456,6 +66713,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66534,6 +66792,7 @@ func init() { "operationId": "getAllSSLFrontUses", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66584,6 +66843,7 @@ func init() { "operationId": "createSSLFrontUse", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66695,6 +66955,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66764,6 +67025,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66873,6 +67135,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66951,6 +67214,7 @@ func init() { "operationId": "getAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67001,6 +67265,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67100,6 +67365,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67169,6 +67435,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67278,6 +67545,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67387,6 +67655,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69283,6 +69552,7 @@ func init() { "operationId": "getAllBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69333,6 +69603,7 @@ func init() { "operationId": "createBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69444,6 +69715,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69513,6 +69785,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69622,6 +69895,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69700,6 +69974,7 @@ func init() { "operationId": "getDgramBinds", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69750,6 +70025,7 @@ func init() { "operationId": "createDgramBind", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69861,6 +70137,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69930,6 +70207,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70039,6 +70317,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70117,6 +70396,7 @@ func init() { "operationId": "getAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70167,6 +70447,7 @@ func init() { "operationId": "replaceAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70266,6 +70547,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70335,6 +70617,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70444,6 +70727,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70553,6 +70837,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -72985,6 +73270,7 @@ func init() { "operationId": "getAllBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73035,6 +73321,7 @@ func init() { "operationId": "createBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73146,6 +73433,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73215,6 +73503,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73324,6 +73613,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73402,6 +73692,7 @@ func init() { "operationId": "getAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73452,6 +73743,7 @@ func init() { "operationId": "replaceAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73551,6 +73843,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73620,6 +73913,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73729,6 +74023,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73838,6 +74133,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73916,6 +74212,7 @@ func init() { "operationId": "getAllServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73966,6 +74263,7 @@ func init() { "operationId": "createServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74077,6 +74375,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74146,6 +74445,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74255,6 +74555,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74333,6 +74634,7 @@ func init() { "operationId": "getTables", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74383,6 +74685,7 @@ func init() { "operationId": "createTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74494,6 +74797,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74563,6 +74867,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74672,6 +74977,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76155,6 +76461,7 @@ func init() { "operationId": "getAllServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76205,6 +76512,7 @@ func init() { "operationId": "createServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76316,6 +76624,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76385,6 +76694,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76494,6 +76804,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -77992,6 +78303,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -78045,6 +78357,7 @@ func init() { "summary": "Return an ACL entries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78106,6 +78419,7 @@ func init() { "operationId": "addPayloadRuntimeACL", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78165,6 +78479,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", @@ -78238,6 +78553,7 @@ func init() { "summary": "Return an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78245,6 +78561,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -78308,6 +78625,7 @@ func init() { "summary": "Delete an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78315,6 +78633,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -78415,6 +78734,7 @@ func init() { "operationId": "renewAcmeCertificate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Certificate file name", "name": "certificate", @@ -78463,6 +78783,7 @@ func init() { "operationId": "getAllRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78500,6 +78821,7 @@ func init() { "operationId": "addRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78583,6 +78905,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78590,6 +78913,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78639,6 +78963,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78646,6 +78971,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78715,6 +79041,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78722,6 +79049,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78866,6 +79194,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -78915,6 +79244,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -78979,6 +79309,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -79040,6 +79371,7 @@ func init() { "operationId": "showRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79089,6 +79421,7 @@ func init() { "operationId": "addMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79167,6 +79500,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79174,6 +79508,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79223,6 +79558,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79230,6 +79566,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79315,6 +79652,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79322,6 +79660,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79478,6 +79817,7 @@ func init() { "operationId": "getCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79530,6 +79870,7 @@ func init() { "operationId": "setCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79583,6 +79924,7 @@ func init() { "operationId": "deleteCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79637,6 +79979,7 @@ func init() { "operationId": "addCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79699,6 +80042,7 @@ func init() { "operationId": "getCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79859,6 +80203,7 @@ func init() { "operationId": "getCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -79899,6 +80244,7 @@ func init() { "operationId": "replaceCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -79952,6 +80298,7 @@ func init() { "operationId": "deleteCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -80101,6 +80448,7 @@ func init() { "operationId": "getCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80161,6 +80509,7 @@ func init() { "operationId": "replaceCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80215,6 +80564,7 @@ func init() { "operationId": "deleteCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80299,6 +80649,7 @@ func init() { "operationId": "getAllCrtListEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -80339,6 +80690,7 @@ func init() { "operationId": "addCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -80405,6 +80757,7 @@ func init() { "operationId": "deleteCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt list name", "name": "name", @@ -80412,6 +80765,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL cert entry name", "name": "cert_file", @@ -80510,6 +80864,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -80561,6 +80916,7 @@ func init() { "operationId": "getStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -80568,12 +80924,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", @@ -80622,6 +80980,7 @@ func init() { "operationId": "setStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -80643,7 +81002,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -81307,6 +81667,7 @@ func init() { "operationId": "getAllSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81357,6 +81718,7 @@ func init() { "operationId": "createSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81442,6 +81804,7 @@ func init() { "operationId": "getSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81511,6 +81874,7 @@ func init() { "operationId": "deleteSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81580,6 +81944,7 @@ func init() { "operationId": "getAllSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81637,6 +82002,7 @@ func init() { "operationId": "createSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81729,6 +82095,7 @@ func init() { "operationId": "getSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81805,6 +82172,7 @@ func init() { "operationId": "replaceSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81902,6 +82270,7 @@ func init() { "operationId": "deleteSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81978,6 +82347,7 @@ func init() { "operationId": "getAllSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82035,6 +82405,7 @@ func init() { "operationId": "createSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82127,6 +82498,7 @@ func init() { "operationId": "getSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82203,6 +82575,7 @@ func init() { "operationId": "replaceSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82300,6 +82673,7 @@ func init() { "operationId": "deleteSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82376,6 +82750,7 @@ func init() { "operationId": "getAllSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82433,6 +82808,7 @@ func init() { "operationId": "createSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82525,6 +82901,7 @@ func init() { "operationId": "getSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82601,6 +82978,7 @@ func init() { "operationId": "replaceSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82698,6 +83076,7 @@ func init() { "operationId": "deleteSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82777,6 +83156,7 @@ func init() { "operationId": "getAllSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82827,6 +83207,7 @@ func init() { "operationId": "startSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82891,6 +83272,7 @@ func init() { "operationId": "getSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82947,6 +83329,7 @@ func init() { "operationId": "commitSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -83034,6 +83417,7 @@ func init() { "operationId": "deleteSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -83096,6 +83480,7 @@ func init() { "in": "query" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -102007,6 +102392,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 dca096a8..c9d64212 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,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.2.10 + github.com/haproxytech/client-native/v6 v6.2.12 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 6cbd04a4..d90f4398 100644 --- a/go.sum +++ b/go.sum @@ -175,8 +175,8 @@ github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrk github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= github.com/haproxytech/client-native/v5 v5.1.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= -github.com/haproxytech/client-native/v6 v6.2.10 h1:9lGmVSDWhTpr+T0Nti+pi1Qpnk3F/WV7SnkqzLAMiyc= -github.com/haproxytech/client-native/v6 v6.2.10/go.mod h1:ua8VYkXs605okf4tpNIiXcrzWz5duhFk8CqjIUyA4zY= +github.com/haproxytech/client-native/v6 v6.2.12 h1:f0mj0AHK0jDH1J3gRSyrTLdw/mttx9Xy7LETh5uVZWs= +github.com/haproxytech/client-native/v6 v6.2.12/go.mod h1:ua8VYkXs605okf4tpNIiXcrzWz5duhFk8CqjIUyA4zY= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= 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_defaults_parameters.go b/operations/acl/create_acl_defaults_parameters.go index f1768048..1649d1fa 100644 --- a/operations/acl/create_acl_defaults_parameters.go +++ b/operations/acl/create_acl_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 CreateACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLDefaultsParams) 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 *CreateACLDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/acl/delete_acl_defaults_parameters.go index 8f069b4e..caf180b0 100644 --- a/operations/acl/delete_acl_defaults_parameters.go +++ b/operations/acl/delete_acl_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" ) // NewDeleteACLDefaultsParams creates a new DeleteACLDefaultsParams object @@ -66,6 +67,7 @@ type DeleteACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLDefaultsParams) 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 *DeleteACLDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/acl/get_acl_defaults_parameters.go index 4a6cf33c..e1bef5c5 100644 --- a/operations/acl/get_acl_defaults_parameters.go +++ b/operations/acl/get_acl_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" ) // NewGetACLDefaultsParams creates a new GetACLDefaultsParams object @@ -54,6 +55,7 @@ type GetACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLDefaultsParams) 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 *GetACLDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/acl/get_all_acl_defaults_parameters.go index b1c06a7b..7e5d1564 100644 --- a/operations/acl/get_all_acl_defaults_parameters.go +++ b/operations/acl/get_all_acl_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" ) // NewGetAllACLDefaultsParams creates a new GetAllACLDefaultsParams object @@ -52,6 +53,7 @@ type GetAllACLDefaultsParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLDefaultsParams) 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 *GetAllACLDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/acl/replace_acl_defaults_parameters.go index 30d95a54..75d7740f 100644 --- a/operations/acl/replace_acl_defaults_parameters.go +++ b/operations/acl/replace_acl_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 ReplaceACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLDefaultsParams) 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 *ReplaceACLDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/acl/replace_all_acl_defaults_parameters.go index febfff9b..d2313dd5 100644 --- a/operations/acl/replace_all_acl_defaults_parameters.go +++ b/operations/acl/replace_all_acl_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 ReplaceAllACLDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLDefaultsParams) 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 *ReplaceAllACLDefaultsParams) validateParentName(formats 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/acme_runtime/renew_acme_certificate_parameters.go b/operations/acme_runtime/renew_acme_certificate_parameters.go index 7502ab8f..e718a32b 100644 --- a/operations/acme_runtime/renew_acme_certificate_parameters.go +++ b/operations/acme_runtime/renew_acme_certificate_parameters.go @@ -49,6 +49,7 @@ type RenewAcmeCertificateParams struct { /*Certificate file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Certificate string @@ -93,5 +94,19 @@ func (o *RenewAcmeCertificateParams) bindCertificate(rawData []string, hasKey bo } o.Certificate = raw + if err := o.validateCertificate(formats); err != nil { + return err + } + + return nil +} + +// validateCertificate carries on validations for parameter Certificate +func (o *RenewAcmeCertificateParams) validateCertificate(formats strfmt.Registry) error { + + if err := validate.Pattern("certificate", "query", o.Certificate, `^[^\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_defaults_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go index dfd9ab9c..dc792ec2 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_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 CreateHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleDefaultsParams) 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 *CreateHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go index 70e173f5..06c0caeb 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_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" ) // NewDeleteHTTPAfterResponseRuleDefaultsParams creates a new DeleteHTTPAfterResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleDefaultsParams) 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 *DeleteHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go index 5977f515..7db8661e 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_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" ) // NewGetAllHTTPAfterResponseRuleDefaultsParams creates a new GetAllHTTPAfterResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleDefaultsParams) 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 *GetAllHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go index 339de0e2..6b7b28d8 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_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" ) // NewGetHTTPAfterResponseRuleDefaultsParams creates a new GetHTTPAfterResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleDefaultsParams) 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 *GetHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go index 345e37ea..f0c6dab8 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_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 ReplaceAllHTTPAfterResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleDefaultsParams) 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 *ReplaceAllHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go index 73c11bee..71d0a397 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_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 ReplaceHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleDefaultsParams) 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 *ReplaceHTTPAfterResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/create_http_request_rule_defaults_parameters.go index b11f6ee6..c366e061 100644 --- a/operations/http_request_rule/create_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/create_http_request_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 CreateHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleDefaultsParams) 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 *CreateHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go index d4371873..78a4a794 100644 --- a/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/delete_http_request_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" ) // NewDeleteHTTPRequestRuleDefaultsParams creates a new DeleteHTTPRequestRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleDefaultsParams) 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 *DeleteHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go index d44850d0..c14eda83 100644 --- a/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/get_all_http_request_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" ) // NewGetAllHTTPRequestRuleDefaultsParams creates a new GetAllHTTPRequestRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleDefaultsParams) 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 *GetAllHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/get_http_request_rule_defaults_parameters.go index 8360f053..35ec54f2 100644 --- a/operations/http_request_rule/get_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/get_http_request_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" ) // NewGetHTTPRequestRuleDefaultsParams creates a new GetHTTPRequestRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleDefaultsParams) 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 *GetHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go index 74433bc2..d0bb936f 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_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 ReplaceAllHTTPRequestRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleDefaultsParams) 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 *ReplaceAllHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go index 4aca19cc..cc8cfd1a 100644 --- a/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/replace_http_request_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 ReplaceHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleDefaultsParams) 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 *ReplaceHTTPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/create_http_response_rule_defaults_parameters.go index d967f025..cf9e1d53 100644 --- a/operations/http_response_rule/create_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/create_http_response_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 CreateHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleDefaultsParams) 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 *CreateHTTPResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go index 5b206894..707ec0bf 100644 --- a/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/delete_http_response_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" ) // NewDeleteHTTPResponseRuleDefaultsParams creates a new DeleteHTTPResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleDefaultsParams) 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 *DeleteHTTPResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go index 085c476a..07841ed4 100644 --- a/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/get_all_http_response_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" ) // NewGetAllHTTPResponseRuleDefaultsParams creates a new GetAllHTTPResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleDefaultsParams) 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 *GetAllHTTPResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/get_http_response_rule_defaults_parameters.go index c9ef817e..a9a4ac6e 100644 --- a/operations/http_response_rule/get_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/get_http_response_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" ) // NewGetHTTPResponseRuleDefaultsParams creates a new GetHTTPResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleDefaultsParams) 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 *GetHTTPResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go index 576e44e5..bda52a7d 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_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 ReplaceAllHTTPResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleDefaultsParams) 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 *ReplaceAllHTTPResponseRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go index 342c5502..683bfeeb 100644 --- a/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/replace_http_response_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 ReplaceHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleDefaultsParams) 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 *ReplaceHTTPResponseRuleDefaultsParams) validateParentName(formats 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/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go index c43e6439..41ab9129 100644 --- a/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/create_quic_initial_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 CreateQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateQUICInitialRuleDefaultsParams) 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 *CreateQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go index 54bc1a59..88da5fb6 100644 --- a/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/create_quic_initial_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 CreateQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateQUICInitialRuleFrontendParams) 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 *CreateQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go index 64dbb979..2f5302bf 100644 --- a/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/delete_quic_initial_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" ) // NewDeleteQUICInitialRuleDefaultsParams creates a new DeleteQUICInitialRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteQUICInitialRuleDefaultsParams) 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 *DeleteQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go index ce8f2e4e..ac805060 100644 --- a/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/delete_quic_initial_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" ) // NewDeleteQUICInitialRuleFrontendParams creates a new DeleteQUICInitialRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteQUICInitialRuleFrontendParams) 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 *DeleteQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go index 6e65f062..ae20b325 100644 --- a/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/get_all_quic_initial_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" ) // NewGetAllQUICInitialRuleDefaultsParams creates a new GetAllQUICInitialRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllQUICInitialRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllQUICInitialRuleDefaultsParams) 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 *GetAllQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go index c170f28f..5ba86056 100644 --- a/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/get_all_quic_initial_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" ) // NewGetAllQUICInitialRuleFrontendParams creates a new GetAllQUICInitialRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllQUICInitialRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllQUICInitialRuleFrontendParams) 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 *GetAllQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go index ce1a92c5..0abbed99 100644 --- a/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/get_quic_initial_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" ) // NewGetQUICInitialRuleDefaultsParams creates a new GetQUICInitialRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetQUICInitialRuleDefaultsParams) 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 *GetQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go index 23e63f55..eee7a486 100644 --- a/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/get_quic_initial_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" ) // NewGetQUICInitialRuleFrontendParams creates a new GetQUICInitialRuleFrontendParams object @@ -54,6 +55,7 @@ type GetQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetQUICInitialRuleFrontendParams) 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 *GetQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go index f20ec7f3..48e9ce40 100644 --- a/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/replace_all_quic_initial_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 ReplaceAllQUICInitialRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllQUICInitialRuleDefaultsParams) 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 *ReplaceAllQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go index f79b9fca..c88405f3 100644 --- a/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/replace_all_quic_initial_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 ReplaceAllQUICInitialRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllQUICInitialRuleFrontendParams) 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 *ReplaceAllQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go index b75eb5ec..29db635f 100644 --- a/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/replace_quic_initial_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 ReplaceQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceQUICInitialRuleDefaultsParams) 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 *ReplaceQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go index fc787cc3..6ca81e0e 100644 --- a/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/replace_quic_initial_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 ReplaceQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceQUICInitialRuleFrontendParams) 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 *ReplaceQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go index 56ab506d..22ceb67b 100644 --- a/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/create_s_s_l_front_use_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 CreateSSLFrontUseParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateSSLFrontUseParams) 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 *CreateSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go index afa39255..ee25a2cc 100644 --- a/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/delete_s_s_l_front_use_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" ) // NewDeleteSSLFrontUseParams creates a new DeleteSSLFrontUseParams object @@ -66,6 +67,7 @@ type DeleteSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteSSLFrontUseParams) 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 *DeleteSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go b/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go index 523398b6..1d937b1a 100644 --- a/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go +++ b/operations/s_s_l_front_use/get_all_s_s_l_front_uses_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" ) // NewGetAllSSLFrontUsesParams creates a new GetAllSSLFrontUsesParams object @@ -48,6 +49,7 @@ type GetAllSSLFrontUsesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllSSLFrontUsesParams) 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 *GetAllSSLFrontUsesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go index 06688e6a..3a92948b 100644 --- a/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/get_s_s_l_front_use_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" ) // NewGetSSLFrontUseParams creates a new GetSSLFrontUseParams object @@ -54,6 +55,7 @@ type GetSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetSSLFrontUseParams) 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 *GetSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go index a7633591..2e16ed70 100644 --- a/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/replace_s_s_l_front_use_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 ReplaceSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceSSLFrontUseParams) 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 *ReplaceSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/add_ca_entry_parameters.go b/operations/s_s_l_runtime/add_ca_entry_parameters.go index 1c9ba040..54bc4498 100644 --- a/operations/s_s_l_runtime/add_ca_entry_parameters.go +++ b/operations/s_s_l_runtime/add_ca_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // AddCaEntryMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type AddCaEntryParams struct { FileUpload io.ReadCloser /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *AddCaEntryParams) bindName(rawData []string, hasKey bool, formats strfm // 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 *AddCaEntryParams) 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/s_s_l_runtime/add_crt_list_entry_parameters.go b/operations/s_s_l_runtime/add_crt_list_entry_parameters.go index 1abba27b..016d72dd 100644 --- a/operations/s_s_l_runtime/add_crt_list_entry_parameters.go +++ b/operations/s_s_l_runtime/add_crt_list_entry_parameters.go @@ -57,6 +57,7 @@ type AddCrtListEntryParams struct { Data *models.SslCrtListEntry /*SSL crt-list filename Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -124,5 +125,19 @@ func (o *AddCrtListEntryParams) bindName(rawData []string, hasKey bool, formats } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *AddCrtListEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/delete_ca_file_parameters.go b/operations/s_s_l_runtime/delete_ca_file_parameters.go index d615cd2e..8cb08f9e 100644 --- a/operations/s_s_l_runtime/delete_ca_file_parameters.go +++ b/operations/s_s_l_runtime/delete_ca_file_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" ) // NewDeleteCaFileParams creates a new DeleteCaFileParams object @@ -47,6 +48,7 @@ type DeleteCaFileParams struct { /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCaFileParams) bindName(rawData []string, hasKey bool, formats str // 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 *DeleteCaFileParams) 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/s_s_l_runtime/delete_cert_parameters.go b/operations/s_s_l_runtime/delete_cert_parameters.go index ac1f0001..f65f67f3 100644 --- a/operations/s_s_l_runtime/delete_cert_parameters.go +++ b/operations/s_s_l_runtime/delete_cert_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" ) // NewDeleteCertParams creates a new DeleteCertParams object @@ -47,6 +48,7 @@ type DeleteCertParams struct { /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCertParams) bindName(rawData []string, hasKey bool, formats strfm // 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 *DeleteCertParams) 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/s_s_l_runtime/delete_crl_parameters.go b/operations/s_s_l_runtime/delete_crl_parameters.go index 58b11f14..bc686b2e 100644 --- a/operations/s_s_l_runtime/delete_crl_parameters.go +++ b/operations/s_s_l_runtime/delete_crl_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" ) // NewDeleteCrlParams creates a new DeleteCrlParams object @@ -47,6 +48,7 @@ type DeleteCrlParams struct { /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCrlParams) bindName(rawData []string, hasKey bool, formats strfmt // 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 *DeleteCrlParams) 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/s_s_l_runtime/delete_crt_list_entry_parameters.go b/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go index 15c5ead0..123eea21 100644 --- a/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go +++ b/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go @@ -50,6 +50,7 @@ type DeleteCrtListEntryParams struct { /*SSL cert entry name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ CertFile string @@ -60,6 +61,7 @@ type DeleteCrtListEntryParams struct { LineNumber *int64 /*SSL crt list name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -114,6 +116,20 @@ func (o *DeleteCrtListEntryParams) bindCertFile(rawData []string, hasKey bool, f } o.CertFile = raw + if err := o.validateCertFile(formats); err != nil { + return err + } + + return nil +} + +// validateCertFile carries on validations for parameter CertFile +func (o *DeleteCrtListEntryParams) validateCertFile(formats strfmt.Registry) error { + + if err := validate.Pattern("cert_file", "query", o.CertFile, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -172,5 +188,19 @@ func (o *DeleteCrtListEntryParams) bindName(rawData []string, hasKey bool, forma } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteCrtListEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go b/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go index 6bfaf35e..b1ab3c7e 100644 --- a/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go +++ b/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go @@ -49,6 +49,7 @@ type GetAllCrtListEntriesParams struct { /*SSL crt-list filename Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -93,5 +94,19 @@ func (o *GetAllCrtListEntriesParams) bindName(rawData []string, hasKey bool, for } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetAllCrtListEntriesParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_ca_entry_parameters.go b/operations/s_s_l_runtime/get_ca_entry_parameters.go index c012263a..fbeb1fb8 100644 --- a/operations/s_s_l_runtime/get_ca_entry_parameters.go +++ b/operations/s_s_l_runtime/get_ca_entry_parameters.go @@ -55,6 +55,7 @@ type GetCaEntryParams struct { Index int64 /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -128,5 +129,19 @@ func (o *GetCaEntryParams) bindName(rawData []string, hasKey bool, formats strfm // 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 *GetCaEntryParams) 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/s_s_l_runtime/get_ca_file_parameters.go b/operations/s_s_l_runtime/get_ca_file_parameters.go index 10615eb1..ec6ddd3b 100644 --- a/operations/s_s_l_runtime/get_ca_file_parameters.go +++ b/operations/s_s_l_runtime/get_ca_file_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" ) // NewGetCaFileParams creates a new GetCaFileParams object @@ -47,6 +48,7 @@ type GetCaFileParams struct { /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetCaFileParams) bindName(rawData []string, hasKey bool, formats strfmt // 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 *GetCaFileParams) 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/s_s_l_runtime/get_cert_parameters.go b/operations/s_s_l_runtime/get_cert_parameters.go index 7c80231f..0f86b3fa 100644 --- a/operations/s_s_l_runtime/get_cert_parameters.go +++ b/operations/s_s_l_runtime/get_cert_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" ) // NewGetCertParams creates a new GetCertParams object @@ -47,6 +48,7 @@ type GetCertParams struct { /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetCertParams) bindName(rawData []string, hasKey bool, formats strfmt.R // 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 *GetCertParams) 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/s_s_l_runtime/get_crl_parameters.go b/operations/s_s_l_runtime/get_crl_parameters.go index 9bd39538..caab0d1a 100644 --- a/operations/s_s_l_runtime/get_crl_parameters.go +++ b/operations/s_s_l_runtime/get_crl_parameters.go @@ -55,6 +55,7 @@ type GetCrlParams struct { Index *int64 /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -134,5 +135,19 @@ func (o *GetCrlParams) bindName(rawData []string, hasKey bool, formats strfmt.Re // 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 *GetCrlParams) 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/s_s_l_runtime/replace_cert_parameters.go b/operations/s_s_l_runtime/replace_cert_parameters.go index 05478796..9b864833 100644 --- a/operations/s_s_l_runtime/replace_cert_parameters.go +++ b/operations/s_s_l_runtime/replace_cert_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // ReplaceCertMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type ReplaceCertParams struct { FileUpload io.ReadCloser /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *ReplaceCertParams) bindName(rawData []string, hasKey bool, formats strf // 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 *ReplaceCertParams) 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/s_s_l_runtime/replace_crl_parameters.go b/operations/s_s_l_runtime/replace_crl_parameters.go index 8a31f685..9b2fb2a5 100644 --- a/operations/s_s_l_runtime/replace_crl_parameters.go +++ b/operations/s_s_l_runtime/replace_crl_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // ReplaceCrlMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type ReplaceCrlParams struct { FileUpload io.ReadCloser /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *ReplaceCrlParams) bindName(rawData []string, hasKey bool, formats strfm // 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 *ReplaceCrlParams) 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/s_s_l_runtime/set_ca_file_parameters.go b/operations/s_s_l_runtime/set_ca_file_parameters.go index 947cec04..cb9248a1 100644 --- a/operations/s_s_l_runtime/set_ca_file_parameters.go +++ b/operations/s_s_l_runtime/set_ca_file_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // SetCaFileMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type SetCaFileParams struct { FileUpload io.ReadCloser /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *SetCaFileParams) bindName(rawData []string, hasKey bool, formats strfmt // 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 *SetCaFileParams) 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/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_defaults_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go index 67b0f6d1..ec7f17db 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_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 CreateTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleDefaultsParams) 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 *CreateTCPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go index 6aafb50f..4a1815b6 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_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" ) // NewDeleteTCPRequestRuleDefaultsParams creates a new DeleteTCPRequestRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleDefaultsParams) 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 *DeleteTCPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go index 0c5b28dc..ff2c2e6a 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_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" ) // NewGetAllTCPRequestRuleDefaultsParams creates a new GetAllTCPRequestRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleDefaultsParams) 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 *GetAllTCPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go index 181d7b1f..40303edc 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_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" ) // NewGetTCPRequestRuleDefaultsParams creates a new GetTCPRequestRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleDefaultsParams) 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 *GetTCPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go index 4795742a..7a16c0ce 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_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 ReplaceAllTCPRequestRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleDefaultsParams) 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 *ReplaceAllTCPRequestRuleDefaultsParams) validateParentName(formats 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_defaults_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go index c94104d5..f68d164a 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_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 ReplaceTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleDefaultsParams) 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 *ReplaceTCPRequestRuleDefaultsParams) validateParentName(formats 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/create_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go index 24eea127..e0aff736 100644 --- a/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/create_tcp_response_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 CreateTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPResponseRuleDefaultsParams) 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 *CreateTCPResponseRuleDefaultsParams) validateParentName(formats 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/delete_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go index 4216d8c2..d1d46cac 100644 --- a/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/delete_tcp_response_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" ) // NewDeleteTCPResponseRuleDefaultsParams creates a new DeleteTCPResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPResponseRuleDefaultsParams) 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 *DeleteTCPResponseRuleDefaultsParams) validateParentName(formats 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_all_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go index dc8b543b..98167e7b 100644 --- a/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/get_all_tcp_response_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" ) // NewGetAllTCPResponseRuleDefaultsParams creates a new GetAllTCPResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPResponseRuleDefaultsParams) 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 *GetAllTCPResponseRuleDefaultsParams) validateParentName(formats 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/get_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go index be37635f..8f104c8e 100644 --- a/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/get_tcp_response_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" ) // NewGetTCPResponseRuleDefaultsParams creates a new GetTCPResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPResponseRuleDefaultsParams) 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 *GetTCPResponseRuleDefaultsParams) validateParentName(formats 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_all_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go index e515668f..fed7afd4 100644 --- a/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/replace_all_tcp_response_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 ReplaceAllTCPResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPResponseRuleDefaultsParams) 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 *ReplaceAllTCPResponseRuleDefaultsParams) validateParentName(formats 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 } diff --git a/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go index 8233dfce..84c9c388 100644 --- a/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/replace_tcp_response_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 ReplaceTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPResponseRuleDefaultsParams) 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 *ReplaceTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil }