From 32af2b443ecd40f6772d73d2f4b62cb95a2b90ce Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 16 Jun 2025 12:54:13 +0200 Subject: [PATCH 01/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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/21] 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