diff --git a/.aspell.yml b/.aspell.yml index e2ae485f..838e0f34 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -1,31 +1,145 @@ mode: commit min_length: 3 allowed: - - aspell - - repo - - yaml - - config - - Github - - Gitlab - - env - - failsafe - - golang - - mkdir - - WORKDIR - - apk - - ENTRYPOINT - - ubuntu - - golangci - - sudo - - releaser - - backend - - backends - - frontend - - frontends - - tcp - - crd - - linter - - linters - - govulncheck - - dataplaneapi - - quic +- acls +- apk +- aspell +- auth +- autofill +- aws +- axios +- backend +- backends +- backport +- bmarkovic +- browserslist +- caniuse +- cli +- clickhouse +- composable +- conf +- config +- const +- crd +- cronjob +- cve +- cwe +- dapi +- dataplane +- dataplaneapi +- dataplanes +- datepicker +- discoverability +- dns +- dom +- dpapi +- dpapis +- dropdowns +- dsn +- e2e +- entrypoint +- enum +- env +- eol +- escaper +- eslint +- failsafe +- fbt +- formatter +- formatters +- frontend +- frontends +- github +- gitlab +- golang +- golangci +- gorm +- goroutines +- govulncheck +- hapee +- haproxy +- healthz +- hostname +- html +- http +- httpCLF +- infos +- ipam +- jose +- json +- jsonpath +- kasbin +- kpi +- kubebuilder +- kubernetes +- lifecycle +- linter +- linters +- lookups +- lts +- makefile +- maxconn +- mexchanger +- minimalistic +- mixin +- mkdir +- multipartsearch +- multiselect +- mutex +- mutexes +- namespace +- namespaces +- openapi +- optim +- param +- params +- parallelize +- passthrough +- podman +- pre +- quic +- rbac +- reimplement +- releaser +- repo +- req +- rsync +- ruleset +- rulesets +- saml +- schemas +- scrollbar +- scss +- searchselect +- spammy +- ssl +- sso +- struct +- subnet +- subresource +- subresources +- sudo +- syslog +- tcp +- timeseries +- tls +- tooltip +- tsconfig +- ubuntu +- uid +- uniq +- unix +- unsub +- uri +- url +- userlist +- userlists +- utils +- vfg +- vite +- vrrp +- vue +- waf +- wafadvanced +- workdir +- yaml diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index 013845cb..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@v3 + 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@v4 + 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 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..73a19e3f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -31,12 +31,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cache/go-build diff --git a/.github/workflows/manual_goreleaser.yml b/.github/workflows/manual_goreleaser.yml index 10fd578a..f1cb4b94 100644 --- a/.github/workflows/manual_goreleaser.yml +++ b/.github/workflows/manual_goreleaser.yml @@ -6,12 +6,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # we have to fetch all history to be able to generate the release note. c.f. https://goreleaser.com/ci/actions/. fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' check-latest: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 301b4942..f10e20db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - bots - lint - checks - build @@ -7,10 +8,22 @@ stages: variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian - BATS_VERSION: v1.4.1 - GO_VERSION: "1.23" + BATS_VERSION: v1.10.0 + GO_VERSION: "1.25" 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: @@ -167,45 +180,9 @@ govulncheck: - go mod tidy - go run cmd/govulncheck-report/main.go -HAProxy_2_2: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.2" -HAProxy_2_4: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.4" -HAProxy_2_6: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.6" -HAProxy_2_8: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.8" -HAProxy_2_9: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "2.9" -HAProxy_3_0: - extends: .e2e - parallel: - matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "3.0" HAProxy_3_1: extends: .e2e parallel: matrix: - - TESTPART: ["1/2", "2/2"] - HAPROXY_VERSION: "3.0" + - TESTPART: ["1/4", "2/4", "3/4", "4/4"] + HAPROXY_VERSION: "3.1" diff --git a/.golangci.yml b/.golangci.yml index 1bf737f3..2eebe346 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,85 +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 + - recvcheck + - rowserrcheck + - sqlclosecheck - tagalign - - depguard - - mnd - - gomnd - - err113 - - execinquery - - exportloopref - -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 + - 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 a7159978..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.61.0 -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 c808512a..1aecfe2b 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 @@ -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/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 +} 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/configuration_storage.go b/configuration/configuration_storage.go index 4c97ea3b..a29ec412 100644 --- a/configuration/configuration_storage.go +++ b/configuration/configuration_storage.go @@ -355,22 +355,19 @@ func copyConfigurationToStorage(cfg *Configuration) { cfgStorage.Dataplaneapi.Advertised = &configTypeAdvertised{} } cfgStorage.Dataplaneapi.Advertised.APIAddress = &cfg.APIOptions.APIAddress + cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort - if cfgStorage.Dataplaneapi == nil { - cfgStorage.Dataplaneapi = &configTypeDataplaneapi{} + if cfgStorage.Dataplaneapi.Userlist == nil { + cfgStorage.Dataplaneapi.Userlist = &configTypeUserlist{} } - if cfgStorage.Dataplaneapi.Advertised == nil { - cfgStorage.Dataplaneapi.Advertised = &configTypeAdvertised{} - } - cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort - cfgStorage.Dataplaneapi.Advertised.APIPort = &cfg.APIOptions.APIPort + cfgStorage.Dataplaneapi.Userlist.Userlist = &cfg.HAProxy.Userlist + cfgStorage.Dataplaneapi.Userlist.UserListFile = &cfg.HAProxy.UserListFile if cfgStorage.Haproxy == nil { cfgStorage.Haproxy = &configTypeHaproxy{ Reload: &configTypeReload{}, } } - cfgStorage.Haproxy.Reload.ReloadStrategy = &cfg.HAProxy.ReloadStrategy if cfgStorage.LogTargets == nil { 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/reload-strategy.go b/configuration/reload-strategy.go index 6e1d3377..aee52635 100644 --- a/configuration/reload-strategy.go +++ b/configuration/reload-strategy.go @@ -35,7 +35,7 @@ const ( s6ReloadCmd = "s6-svc -2" s6RestartCmd = "s6-svc -r" s6StatusCmd = "s6-svstat -u" - s6DefaultService = "/etc/service.d/haproxy" + s6DefaultService = "/var/run/service/haproxy" ) // Set a default value to a string. 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 8b361b77..bc21e217 100644 --- a/configuration/user.go +++ b/configuration/user.go @@ -83,13 +83,18 @@ func (u *Users) Init() error { mode := configuration.Mode.Load() allUsers := configuration.GetUsers() // single + cluster mode if len(allUsers) > 0 { - for _, user := range allUsers { - if mode != ModeCluster || strings.HasPrefix(user.Name, storagetype.DapiClusterUserPrefix) { - u.users = append(u.users, types.User{ - Name: user.Name, - IsInsecure: *user.Insecure, - Password: *user.Password, - }) + for _, storageUser := range allUsers { + if mode != ModeCluster || strings.HasPrefix(storageUser.Name, storagetype.DapiClusterUserPrefix) { + user := types.User{ + Name: storageUser.Name, + } + if storageUser.Password != nil { + user.Password = *storageUser.Password + } + if storageUser.Insecure != nil { + user.IsInsecure = *storageUser.Insecure + } + u.users = append(u.users, user) } } return nil @@ -164,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 821722ea..01953964 100644 --- a/configure_data_plane.go +++ b/configure_data_plane.go @@ -36,7 +36,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/swag" + "github.com/go-openapi/swag/cmdutils" client_native "github.com/haproxytech/client-native/v6" "github.com/haproxytech/client-native/v6/models" "github.com/haproxytech/client-native/v6/options" @@ -57,7 +57,7 @@ import ( "github.com/haproxytech/dataplaneapi/operations" "github.com/haproxytech/dataplaneapi/operations/discovery" "github.com/haproxytech/dataplaneapi/operations/specification" - "github.com/haproxytech/dataplaneapi/operations/version3" + "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3" "github.com/haproxytech/dataplaneapi/rate" "github.com/haproxytech/dataplaneapi/resilient" socket_runtime "github.com/haproxytech/dataplaneapi/runtime" @@ -88,25 +88,25 @@ func SetServerStartedCallback(callFunc func()) { func configureFlags(api *operations.DataPlaneAPI) { cfg := dataplaneapi_config.Get() - haproxyOptionsGroup := swag.CommandLineOptionsGroup{ + haproxyOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "HAProxy options", LongDescription: "Options for configuring haproxy locations.", Options: &cfg.HAProxy, } - loggingOptionsGroup := swag.CommandLineOptionsGroup{ + loggingOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "Logging options", LongDescription: "Options for configuring logging.", Options: &cfg.Logging, } - syslogOptionsGroup := swag.CommandLineOptionsGroup{ + syslogOptionsGroup := cmdutils.CommandLineOptionsGroup{ ShortDescription: "Syslog options", LongDescription: "Options for configuring syslog logging.", Options: &cfg.Syslog, } - api.CommandLineOptionsGroups = make([]swag.CommandLineOptionsGroup, 0, 1) + api.CommandLineOptionsGroups = make([]cmdutils.CommandLineOptionsGroup, 0, 1) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, haproxyOptionsGroup) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, loggingOptionsGroup) api.CommandLineOptionsGroups = append(api.CommandLineOptionsGroups, syslogOptionsGroup) @@ -134,7 +134,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m m["userlist"] = false } - for _, f := range strings.Split(cfgFiles, ";") { + for f := range strings.SplitSeq(cfgFiles, ";") { var conf bool var user bool @@ -162,12 +162,12 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.ServeError = errors.ServeError // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) + // Expected interface func(string, ...any) // // Example: api.Logger = log.Printf - api.JSONConsumer = runtime.ConsumerFunc(func(reader io.Reader, data interface{}) error { + api.JSONConsumer = runtime.ConsumerFunc(func(reader io.Reader, data any) error { json := jsoniter.ConfigCompatibleWithStandardLibrary dec := json.NewDecoder(reader) dec.UseNumber() // preserve number formats @@ -176,7 +176,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m api.TxtConsumer = runtime.TextConsumer() - api.JSONProducer = runtime.ProducerFunc(func(writer io.Writer, data interface{}) error { + api.JSONProducer = runtime.ProducerFunc(func(writer io.Writer, data any) error { json := jsoniter.ConfigCompatibleWithStandardLibrary enc := json.NewEncoder(writer) enc.SetEscapeHTML(false) @@ -221,7 +221,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } // setup discovery handlers - api.DiscoveryGetAPIEndpointsHandler = discovery.GetAPIEndpointsHandlerFunc(func(params discovery.GetAPIEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetAPIEndpointsHandler = discovery.GetAPIEndpointsHandlerFunc(func(params discovery.GetAPIEndpointsParams, principal any) middleware.Responder { ends, err := misc.DiscoverChildPaths("", SwaggerJSON) if err != nil { e := misc.HandleError(err) @@ -229,7 +229,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetAPIEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetServicesEndpointsHandler = discovery.GetServicesEndpointsHandlerFunc(func(params discovery.GetServicesEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetServicesEndpointsHandler = discovery.GetServicesEndpointsHandlerFunc(func(params discovery.GetServicesEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -238,7 +238,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetServicesEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetConfigurationEndpointsHandler = discovery.GetConfigurationEndpointsHandlerFunc(func(params discovery.GetConfigurationEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetConfigurationEndpointsHandler = discovery.GetConfigurationEndpointsHandlerFunc(func(params discovery.GetConfigurationEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -247,7 +247,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetConfigurationEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetRuntimeEndpointsHandler = discovery.GetRuntimeEndpointsHandlerFunc(func(params discovery.GetRuntimeEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetRuntimeEndpointsHandler = discovery.GetRuntimeEndpointsHandlerFunc(func(params discovery.GetRuntimeEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -256,7 +256,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetRuntimeEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetHaproxyEndpointsHandler = discovery.GetHaproxyEndpointsHandlerFunc(func(params discovery.GetHaproxyEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetHaproxyEndpointsHandler = discovery.GetHaproxyEndpointsHandlerFunc(func(params discovery.GetHaproxyEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -265,7 +265,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetHaproxyEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetStatsEndpointsHandler = discovery.GetStatsEndpointsHandlerFunc(func(params discovery.GetStatsEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetStatsEndpointsHandler = discovery.GetStatsEndpointsHandlerFunc(func(params discovery.GetStatsEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -274,7 +274,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetStatsEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetSpoeEndpointsHandler = discovery.GetSpoeEndpointsHandlerFunc(func(params discovery.GetSpoeEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetSpoeEndpointsHandler = discovery.GetSpoeEndpointsHandlerFunc(func(params discovery.GetSpoeEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -283,7 +283,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m } return discovery.NewGetSpoeEndpointsOK().WithPayload(ends) }) - api.DiscoveryGetStorageEndpointsHandler = discovery.GetStorageEndpointsHandlerFunc(func(params discovery.GetStorageEndpointsParams, principal interface{}) middleware.Responder { + api.DiscoveryGetStorageEndpointsHandler = discovery.GetStorageEndpointsHandlerFunc(func(params discovery.GetStorageEndpointsParams, principal any) middleware.Responder { rURI := "/" + strings.SplitN(params.HTTPRequest.RequestURI[1:], "/", 2)[1] ends, err := misc.DiscoverChildPaths(rURI, SwaggerJSON) if err != nil { @@ -861,8 +861,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) @@ -949,7 +949,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 any) middleware.Responder { v2 := openapi2.T{} v2JSONString := string(SwaggerJSON) v2JSONString = strings.ReplaceAll(v2JSONString, "#/definitions", "#/components/schemas") @@ -958,7 +958,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, @@ -972,9 +972,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 @@ -1229,7 +1229,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) @@ -1240,7 +1241,7 @@ func handleSignals(ctx context.Context, cancel context.CancelFunc, sigs chan os. client.ReplaceRuntime(cn.ConfigureRuntimeClient(clientCtx, configuration, haproxyOptions)) log.Info("Reloaded Data Plane API") } - } else if sig == syscall.SIGUSR2 { + case syscall.SIGUSR2: reloadConfigurationFile(client, haproxyOptions, users) } case <-ctx.Done(): diff --git a/discovery/aws_service_discovery.go b/discovery/aws_service_discovery.go index 6f0e713a..d9ed3789 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{} + var i any if i, err = a.services.Read(id); err != nil { - return + return params, err } return i.(*awsInstance).params, nil } @@ -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 { @@ -112,6 +112,6 @@ func (a awsServiceDiscovery) UpdateNode(id string, params ServiceDiscoveryParams ai.update <- struct{}{} } - return + return err }) } diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 14d07922..51b8bea0 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -45,7 +45,7 @@ type awsInstance struct { update chan struct{} state map[string]map[string]time.Time discoveryConfig *ServiceDiscoveryInstance - logFields map[string]interface{} + logFields map[string]any timeout time.Duration } @@ -95,7 +95,7 @@ func (a awsService) GetServers() (servers []configuration.ServiceServer) { Port: port, }) } - return + return servers } func newAWSRegionInstance(ctx context.Context, params *models.AwsRegion, client configuration.Configuration, reloadAgent haproxy.IReloadAgent) (*awsInstance, error) { @@ -104,7 +104,7 @@ func newAWSRegionInstance(ctx context.Context, params *models.AwsRegion, client return nil, err } - logFields := map[string]interface{}{"ServiceDiscovery": "AWS", "ID": *params.ID} + logFields := map[string]any{"ServiceDiscovery": "AWS", "ID": *params.ID} ai := &awsInstance{ params: params, @@ -136,7 +136,7 @@ func (a *awsInstance) filterConverter(in []*models.AwsFilters) (out []types.Filt Values: []string{aws.ToString(l.Value)}, } } - return + return out } func (a *awsInstance) updateTimeout(timeoutSeconds int64) error { @@ -148,6 +148,37 @@ func (a *awsInstance) updateTimeout(timeoutSeconds int64) error { return nil } +func (a *awsInstance) updateServicesFn() { + a.logDebug("discovery job update triggered") + + var api *ec2.Client + var err error + + if api, err = a.setAPIClient(); err != nil { + a.logErrorf("error while setting up the API client: %s", err.Error()) + return + } + + if err = a.updateServices(api); err != nil { + switch t := err.(type) { + case *configuration.ConfError: + switch t.Err() { + case configuration.ErrObjectAlreadyExists: + a.logDebug("object already exists, ignoring error") + return + default: + a.logErrorf("a configuration error occurred while updating service: %s", err.Error()) + return + } + default: + a.logErrorf("an error occurred while updating service: %s", err.Error()) + return + } + } + + a.logDebug("discovery job reconciliation completed") +} + func (a *awsInstance) start() { a.update = make(chan struct{}) @@ -163,7 +194,9 @@ func (a *awsInstance) start() { if !ok { return } + a.logDebug("discovery job update triggered") + err := a.discoveryConfig.UpdateParams(discoveryInstanceParams{ Allowlist: []string{}, Denylist: []string{}, @@ -173,34 +206,13 @@ func (a *awsInstance) start() { SlotsIncrement: int(a.params.ServerSlotsGrowthIncrement), }) if err != nil { - a.stop() - } - 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.logErrorf("error while updating discovery settings: %s", err.Error()) + break } - a.logDebug("discovery job reconciliation completed") + a.logDebug("discovery job update completed") + case <-discoveryTimer.C: + a.updateServicesFn() discoveryTimer.Reset(a.timeout) case <-a.ctx.Done(): a.stop() @@ -210,6 +222,9 @@ func (a *awsInstance) start() { } func (a *awsInstance) setAPIClient() (*ec2.Client, error) { + ctx, cancelFn := context.WithTimeout(a.ctx, a.timeout) + defer cancelFn() + opts := []func(options *config.LoadOptions) error{ config.WithRegion(*a.params.Region), } @@ -221,7 +236,7 @@ func (a *awsInstance) setAPIClient() (*ec2.Client, error) { }, })) } - cfg, err := config.LoadDefaultConfig(context.Background(), opts...) + cfg, err := config.LoadDefaultConfig(ctx, opts...) if err != nil { return nil, fmt.Errorf("cannot generate the AWS instance due to a configuration setup error: %w", err) } @@ -230,9 +245,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"), @@ -245,7 +263,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) @@ -283,7 +301,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 { @@ -339,7 +357,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) } @@ -353,14 +371,14 @@ 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) } } - return + return port, err } func (a *awsInstance) serviceNameFromEC2(instance types.Instance) (string, error) { @@ -388,6 +406,6 @@ func (a *awsInstance) logDebug(message string) { log.WithFields(a.logFields, log.DebugLevel, message) } -func (a *awsInstance) logErrorf(format string, args ...interface{}) { +func (a *awsInstance) logErrorf(format string, args ...any) { log.WithFieldsf(a.logFields, log.ErrorLevel, format, args...) } diff --git a/discovery/consul_service_discovery.go b/discovery/consul_service_discovery.go index e99e043b..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, @@ -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 @@ -86,12 +86,12 @@ 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 + return p, err } p = i.(*consulInstance).params - return + return p, err } func (c *consulServiceDiscovery) GetNodes() (ServiceDiscoveryParams, error) { @@ -111,7 +111,7 @@ func (c *consulServiceDiscovery) UpdateNode(id string, params ServiceDiscoveryPa if !ok { return errors.New("expected models.Consuls") } - return c.consulServices.Update(id, func(item interface{}) error { + return c.consulServices.Update(id, func(item any) error { ci := item.(*consulInstance) ci.params = cParams if err = ci.updateTimeout(int(*cParams.RetryTimeout)); err != nil { diff --git a/discovery/consul_service_discovery_instance.go b/discovery/consul_service_discovery_instance.go index d2066104..2bc168d5 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -65,7 +65,7 @@ type consulInstance struct { discoveryConfig *ServiceDiscoveryInstance prevIndexes map[string]uint64 update chan struct{} - logFields map[string]interface{} + logFields map[string]any timeout time.Duration prevEnabled bool } @@ -298,7 +298,7 @@ func (c *consulInstance) logDebug(message string) { log.WithFields(c.logFields, log.DebugLevel, message) } -func (c *consulInstance) logErrorf(format string, args ...interface{}) { +func (c *consulInstance) logErrorf(format string, args ...any) { log.WithFieldsf(c.logFields, log.ErrorLevel, format, args...) } @@ -324,7 +324,7 @@ func (c *consulInstance) queryHealthService(se string, params *queryParams) ([]* return services, meta, nil } -func (c *consulInstance) doConsulQuery(method string, path string, params *queryParams, resp interface{}) (*queryMetadata, error) { +func (c *consulInstance) doConsulQuery(method string, path string, params *queryParams, resp any) (*queryMetadata, error) { mode := "http://" if c.params.Mode != nil { mode = *c.params.Mode + "://" diff --git a/discovery/service_discovery.go b/discovery/service_discovery.go index f26602d8..8951768b 100644 --- a/discovery/service_discovery.go +++ b/discovery/service_discovery.go @@ -24,7 +24,7 @@ import ( ) // ServiceDiscoveryParams configuration for a specific service discovery -type ServiceDiscoveryParams interface{} +type ServiceDiscoveryParams any // ServiceDiscovery represents the required methods for a service discovery type ServiceDiscovery interface { diff --git a/discovery/service_discovery_instance.go b/discovery/service_discovery_instance.go index ead9c516..b031398b 100644 --- a/discovery/service_discovery_instance.go +++ b/discovery/service_discovery_instance.go @@ -16,6 +16,7 @@ package discovery import ( + "slices" "sync" "github.com/haproxytech/client-native/v6/configuration" @@ -43,7 +44,7 @@ type confService struct { } type discoveryInstanceParams struct { - LogFields map[string]interface{} + LogFields map[string]any SlotsGrowthType string Allowlist []string Denylist []string @@ -155,19 +156,9 @@ func (s *ServiceDiscoveryInstance) markForCleanUp() { func (s *ServiceDiscoveryInstance) serviceNotTracked(service string) bool { if len(s.params.Allowlist) > 0 { - for _, se := range s.params.Allowlist { - if se == service { - return false - } - } - return true - } - for _, se := range s.params.Denylist { - if se == service { - return true - } + return !slices.Contains(s.params.Allowlist, service) } - return false + return slices.Contains(s.params.Denylist, service) } func (s *ServiceDiscoveryInstance) initService(service ServiceInstance) (bool, error) { @@ -229,10 +220,10 @@ func (s *ServiceDiscoveryInstance) commitTransaction() error { return err } -func (s *ServiceDiscoveryInstance) logWarningf(format string, args ...interface{}) { +func (s *ServiceDiscoveryInstance) logWarningf(format string, args ...any) { log.WithFieldsf(s.params.LogFields, log.WarnLevel, format, args...) } -func (s *ServiceDiscoveryInstance) logErrorf(format string, args ...interface{}) { +func (s *ServiceDiscoveryInstance) logErrorf(format string, args ...any) { log.WithFieldsf(s.params.LogFields, log.ErrorLevel, format, args...) } diff --git a/discovery/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..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) } @@ -48,27 +48,27 @@ func (s *instanceStore) Update(name string, mutateFn func(obj interface{}) error } s.store[name] = o - return + return err } -func (s *instanceStore) List() (list []interface{}) { +func (s *instanceStore) List() (list []any) { s.mu.RLock() defer s.mu.RUnlock() for _, i := range s.store { list = append(list, i) } - return + return list } 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() @@ -85,25 +85,25 @@ 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) 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 { return nil, errors.New("instance not found") } - return + return sd, err } diff --git a/e2e/run.bash b/e2e/run.bash index 72620d5b..4be97e6b 100755 --- a/e2e/run.bash +++ b/e2e/run.bash @@ -18,7 +18,7 @@ set -eo pipefail export BASE_PATH="/v3" -HAPROXY_VERSION=${HAPROXY_VERSION:-2.9} +HAPROXY_VERSION=${HAPROXY_VERSION:-3.1} DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-debian}:${HAPROXY_VERSION}" DOCKER_CONTAINER_NAME="dataplaneapi-e2e" export DOCKER_CONTAINER_NAME diff --git a/e2e/tests/defaults/data/haproxy.cfg b/e2e/tests/defaults/data/haproxy.cfg index dbd54a46..5430760b 100644 --- a/e2e/tests/defaults/data/haproxy.cfg +++ b/e2e/tests/defaults/data/haproxy.cfg @@ -1,4 +1,23 @@ -defaults unnamed_defaults_1 - mode http - balance roundrobin - timeout client 30000 +# _version=42 + +global + log 127.0.0.1 local2 + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 4000 + user haproxy + group haproxy + stats socket /var/lib/haproxy/stats level admin + +defaults + mode http + log global + option httplog + option dontlognull + option forwardfor except 127.0.0.0/8 + option redispatch + retries 3 + timeout connect 10s + timeout client 300s + timeout server 300s + maxconn 5000 diff --git a/e2e/tests/defaults/get.bats b/e2e/tests/defaults/get.bats index e07575c4..1168c499 100644 --- a/e2e/tests/defaults/get.bats +++ b/e2e/tests/defaults/get.bats @@ -27,13 +27,35 @@ load 'utils/_helpers' @test "defaults: Return a list of defaults configurations" { resource_get "$_DEFAULTS_BASE_PATH" assert_equal "$SC" 200 - assert_equal "$(get_json_path "$BODY" '.[0].name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should not be filled when full_section=false + assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "null" +} + +@test "default: return a list of defaults configurations with full section" { + resource_get "$_DEFAULTS_BASE_PATH" "full_section=true" + assert_equal "$SC" 200 + + # log_target_list is a child resource, it should be filled when full_section=true + assert_equal "$(get_json_path "$BODY" ".[] | select(.name | contains(\"unnamed_defaults_1\")).log_target_list.[0].global")" "true" } @test "defaults: Return a defaults configuration" { resource_get "$_DEFAULTS_BASE_PATH/unnamed_defaults_1" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" '.name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should not be filled when full_section=false + assert_equal "$(get_json_path "$BODY" ".log_target_list.[0].global")" "null" +} + +@test "defaults: Return a defaults configuration with full section" { + resource_get "$_DEFAULTS_BASE_PATH/unnamed_defaults_1" "full_section=true" + assert_equal "$SC" 200 + assert_equal "$(get_json_path "$BODY" '.name')" "unnamed_defaults_1" + + # log_target_list is a child resource, it should be filled when full_section=true + assert_equal "$(get_json_path "$BODY" ".log_target_list.[0].global")" "true" } @test "defaults: Return a named defaults configuration that does not exist" { diff --git a/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 diff --git a/embedded_spec.go b/embedded_spec.go index 78cc6b3f..98d9cde7 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -22412,6 +22412,9 @@ func init() { "name": "file_upload", "in": "formData" }, + { + "$ref": "#/parameters/skip_reload" + }, { "$ref": "#/parameters/force_reload" } @@ -29765,6 +29768,7 @@ func init() { "set-tos", "set-uri", "set-var", + "set-var-fmt", "silent-drop", "strict-mode", "tarpit", @@ -32795,7 +32799,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -35458,22 +35462,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": { @@ -35570,6 +35591,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 @@ -35586,6 +35619,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 @@ -35598,6 +35655,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 @@ -37757,6 +37822,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", @@ -74052,6 +74118,13 @@ func init() { "name": "file_upload", "in": "formData" }, + { + "type": "boolean", + "default": false, + "description": "If set, no reload will be initiated after update", + "name": "skip_reload", + "in": "query" + }, { "type": "boolean", "default": false, @@ -75498,6 +75571,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": { @@ -75511,22 +75620,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": { @@ -82277,6 +82403,7 @@ func init() { "set-tos", "set-uri", "set-var", + "set-var-fmt", "silent-drop", "strict-mode", "tarpit", @@ -85285,7 +85412,7 @@ func init() { }, "interval": { "type": "integer", - "x-nullable": false + "x-nullable": true } } }, @@ -87963,6 +88090,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 @@ -87979,6 +88118,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 @@ -87991,6 +88154,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 @@ -90158,6 +90329,7 @@ func init() { }, "user": { "description": "HAProxy userlist user", + "type": "object", "title": "User", "required": [ "username", 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/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/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 7e7df7dc..683a4703 100644 --- a/generate/swagger/Dockerfile +++ b/generate/swagger/Dockerfile @@ -1,5 +1,11 @@ ARG SWAGGER_VERSION -FROM quay.io/goswagger/swagger:$SWAGGER_VERSION + +FROM golang:1.25 AS golang + +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 b98a9f9e..9bb8b167 100644 --- a/go.mod +++ b/go.mod @@ -1,101 +1,105 @@ module github.com/haproxytech/dataplaneapi -go 1.23 +go 1.25 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 - github.com/KimMachineGun/automemlimit v0.7.0 - github.com/aws/aws-sdk-go-v2 v1.36.1 - github.com/aws/aws-sdk-go-v2/config v1.29.6 - github.com/aws/aws-sdk-go-v2/credentials v1.17.59 - github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.202.4 + 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.8.0 - github.com/getkin/kin-openapi v0.129.0 - github.com/go-openapi/errors v0.22.0 - github.com/go-openapi/loads v0.22.0 - github.com/go-openapi/runtime v0.28.0 - github.com/go-openapi/spec v0.21.0 - github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.23.0 - github.com/go-openapi/validate v0.24.0 - github.com/google/go-cmp v0.6.0 + github.com/fsnotify/fsnotify v1.9.0 + github.com/getkin/kin-openapi v0.133.0 + github.com/go-openapi/errors v0.22.5 + github.com/go-openapi/loads v0.23.2 + github.com/go-openapi/runtime v0.29.0 + github.com/go-openapi/spec v0.22.2 + github.com/go-openapi/strfmt v0.25.0 + github.com/go-openapi/swag v0.25.4 + github.com/go-openapi/swag/cmdutils v0.25.4 + github.com/go-openapi/swag/mangling v0.25.4 + github.com/go-openapi/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.1.0 + github.com/haproxytech/client-native/v6 v6.1.10 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 github.com/kr/pretty v0.3.1 github.com/lestrrat-go/apache-logformat v0.0.0-20210106032603-24d066f940f8 - github.com/maruel/panicparse/v2 v2.4.0 + github.com/maruel/panicparse/v2 v2.5.0 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible 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.34.0 - golang.org/x/sys v0.30.0 + golang.org/x/net v0.49.0 + golang.org/x/sys v0.40.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.28 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect - github.com/aws/smithy-go v1.22.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect + github.com/aws/aws-sdk-go-v2/service/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/cilium/ebpf v0.17.2 // indirect - github.com/containerd/cgroups/v3 v3.0.5 // indirect - github.com/containerd/log v0.1.0 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/gofrs/flock v0.12.1 // indirect + github.com/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.4.0 // indirect + github.com/gofrs/flock v0.13.0 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect - github.com/invopop/yaml v0.3.1 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect 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/moby/sys/userns v0.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 // indirect - github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect github.com/oklog/ulid v1.3.1 // indirect - github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect - github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.9.0 // indirect + 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.2 // indirect - golang.org/x/sync v0.11.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/text v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b39d27d3..d70ed263 100644 --- a/go.sum +++ b/go.sum @@ -1,81 +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.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26yLj/V+ulKp8= -github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= -github.com/KimMachineGun/automemlimit v0.7.0 h1:7G06p/dMSf7G8E6oq+f2uOPuVncFyIlDI/pBWK49u88= -github.com/KimMachineGun/automemlimit v0.7.0/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw= -github.com/aws/aws-sdk-go-v2 v1.32.7/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2 v1.36.1 h1:iTDl5U6oAhkNPba0e1t1hrwAo02ZMqbrGq4k5JBWM5E= -github.com/aws/aws-sdk-go-v2 v1.36.1/go.mod h1:5PMILGVKiW32oDzjj6RU52yrNrDPUHcbZQYr1sM7qmM= -github.com/aws/aws-sdk-go-v2/config v1.28.7 h1:GduUnoTXlhkgnxTD93g1nv4tVPILbdNQOzav+Wpg7AE= -github.com/aws/aws-sdk-go-v2/config v1.28.7/go.mod h1:vZGX6GVkIE8uECSUHB6MWAUsd4ZcG2Yq/dMa4refR3M= -github.com/aws/aws-sdk-go-v2/config v1.29.6 h1:fqgqEKK5HaZVWLQoLiC9Q+xDlSp+1LYidp6ybGE2OGg= -github.com/aws/aws-sdk-go-v2/config v1.29.6/go.mod h1:Ft+WLODzDQmCTHDvqAH1JfC2xxbZ0MxpZAcJqmE1LTQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48 h1:IYdLD1qTJ0zanRavulofmqut4afs45mOWEI+MzZtTfQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48/go.mod h1:tOscxHN3CGmuX9idQ3+qbkzrjVIx32lqDSU1/0d/qXs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.59 h1:9btwmrt//Q6JcSdgJOLI98sdr5p7tssS9yAsGe8aKP4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.59/go.mod h1:NM8fM6ovI3zak23UISdWidyZuI1ghNe2xjzUZAyT+08= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 h1:kqOrpojG71DxJm/KDPO+Z/y1phm1JlC8/iT+5XRmAn8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22/go.mod h1:NtSFajXVVL8TA2QNngagVZmUtXciyrHOt7xgz4faS/M= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 h1:KwsodFKVQTlI5EyhRSugALzsV6mG/SGrdjlMXSZSdso= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28/go.mod h1:EY3APf9MzygVhKuPXAc5H+MkGb8k/DOSQjWS0LgkKqI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 h1:I/5wmGMffY4happ8NOCuIUEWGUvvFp5NSeQcXl9RHcI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26/go.mod h1:FR8f4turZtNy6baO0KJ5FJUmXH/cSkI9fOngs0yl6mA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 h1:BjUcr3X3K0wZPGFg2bxOWW3VPN8rkE3/61zhP+IHviA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32/go.mod h1:80+OGC/bgzzFFTUmcuwD0lb4YutwQeKLFpmt6hoWapU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 h1:zXFLuEuMMUOvEARXFUVJdfqZ4bvvSgdGRq/ATcrQxzM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26/go.mod h1:3o2Wpy0bogG1kyOPrgkXA8pgIfEEv0+m19O9D5+W8y8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 h1:m1GeXHVMJsRsUAqG6HjZWx9dj7F5TR+cF1bjyfYyBd4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32/go.mod h1:IitoQxGfaKdVLNg0hD8/DXmAqNy0H4K2H2Sf91ti8sI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2 h1:MSSstL6YXAw2K68L1kph02WTQHKeb/lwmbsMhswpjuY= -github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.2/go.mod h1:t5bdAowh8MWq51TuDmltU+wtxMl/VaegNwSBaznkUYc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1 h1:YbNopxjd9baM83YEEmkaYHi+NuJt0AszeaSLqo0CVr0= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.198.1/go.mod h1:mwr3iRm8u1+kkEx4ftDM2Q6Yr0XQFBKrP036ng+k5Lk= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.202.4 h1:gdFRXlTMgV0+yrhQLAJKb+vX2K32Vw3n2TntDd+8AEM= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.202.4/go.mod h1:nSbxgPGhyI9j/cMVSHUEEtNQzEYeNOkbHnHNeTuQqt0= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 h1:8eUsivBQzZHqe/3FE+cqwfH+0p5Jo8PFM/QYQSmeZ+M= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7/go.mod h1:kLPQvGUmxn/fqiCrDeohwG33bq2pQpGeY62yRO6Nrh0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 h1:SYVGSFQHlchIcy6e7x12bsrxClCXSP5et8cqVhL8cuw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13/go.mod h1:kizuDaLX37bG5WZaoxGPQR/LNFXpxp0vsUnqfkWXfNE= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 h1:CvuUmnXI7ebaUAhbJcDy9YQx8wHR69eZ9I7q5hszt/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8/go.mod h1:XDeGv1opzwm8ubxddF0cgqkZWsyOtw4lr6dxwmb6YQg= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 h1:/eE3DogBjYlvlbhd2ssWyeuovWunHLxfgw3s/OJa4GQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.15/go.mod h1:2PCJYpi7EKeA5SkStAmZlF6fi0uUABuhtF8ILHjGc3Y= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 h1:F2rBfNAL5UyswqoeWv9zs74N/NanhK16ydHW1pahX6E= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7/go.mod h1:JfyQ0g2JG8+Krq0EuZNnRwX0mU0HrwY/tG6JNfcqh4k= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 h1:M/zwXiL2iXUrHputuXgmO94TVNmcenPHxgLXLutodKE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14/go.mod h1:RVwIw3y/IqxC2YEXSIkAzRDdEU1iRabDPaYjpGCbCGQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 h1:Xgv/hyNgvLda/M9l9qxXc4UFSgppnRczLxlMs5Ae/QY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3/go.mod h1:5Gn+d+VaaRgsjewpMvGazt0WfcFO+Md4wLOuBfGR9Bc= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 h1:TzeR06UCMUq+KA3bDkujxK1GVGy+G8qQN/QVYzGLkQE= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.14/go.mod h1:dspXf/oYWGWo6DEvj98wpaTeqt5+DMidZD0A9BYTizc= -github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= -github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= -github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= -github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/KimMachineGun/automemlimit v0.7.4 h1:UY7QYOIfrr3wjjOAqahFmC3IaQCLWvur9nmfIn6LnWk= +github.com/KimMachineGun/automemlimit v0.7.4/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= +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.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/cilium/ebpf v0.17.1 h1:G8mzU81R2JA1nE5/8SRubzqvBMmAmri2VL8BIZPWvV0= -github.com/cilium/ebpf v0.17.1/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8= -github.com/cilium/ebpf v0.17.2 h1:IQTaTVu0vKA8WTemFuBnxW9YbAwMkJVKHsNHW4lHv/g= -github.com/cilium/ebpf v0.17.2/go.mod h1:9X5VAsIOck/nCAp0+nCSVzub1Q7x+zKXXItTMYfNE+E= -github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo= -github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -86,48 +44,71 @@ github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 h1:a github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0/go.mod h1:8AuBTZBRSFqEYBPYULd+NN474/zZBLP+6WeT5S9xlAc= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= -github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/getkin/kin-openapi v0.128.0 h1:jqq3D9vC9pPq1dGcOCv7yOp1DaEe7c/T1vzcLbITSp4= -github.com/getkin/kin-openapi v0.128.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= -github.com/getkin/kin-openapi v0.129.0 h1:QGYTNcmyP5X0AtFQ2Dkou9DGBJsUETeLH9rFrJXZh30= -github.com/getkin/kin-openapi v0.129.0/go.mod h1:gmWI+b/J45xqpyK5wJmRRZse5wefA5H0RDMK46kLUtI= -github.com/go-faker/faker/v4 v4.5.0 h1:ARzAY2XoOL9tOUK+KSecUQzyXQsUaZHefjyF8x6YFHc= -github.com/go-faker/faker/v4 v4.5.0/go.mod h1:p3oq1GRjG2PZ7yqeFFfQI20Xm61DoBDlCA8RiSyZ48M= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= +github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= +github.com/go-faker/faker/v4 v4.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E= +github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= github.com/go-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.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= -github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/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= -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.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= -github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= -github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-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.5 h1:Yfv4O/PRYpNF3BNmVkEizcHb3uLVVsrDt3LNdgAKRY4= +github.com/go-openapi/errors v0.22.5/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.2 h1:KEU4Fb+Lp1qg0V4MxrSCPv403ZjBl8Lx1a83gIPU8Qc= +github.com/go-openapi/spec v0.22.2/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.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= -github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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.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= github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU= github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= @@ -135,26 +116,16 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/haproxytech/client-native/v5 v5.1.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= -github.com/haproxytech/client-native/v6 v6.1.0 h1:tOOqId2VufMgXMxfJEK2EKwltcYuIBpBFTK8L63smIw= -github.com/haproxytech/client-native/v6 v6.1.0/go.mod h1:wI8xrnkzElaoAEImxymstS7P0rSdi52qxYsWarVvM+Y= +github.com/haproxytech/client-native/v6 v6.1.10 h1:ZNgX7ADDBwCmu3CxPAgTevEwH9bAOVUarLOXEqxS1j8= +github.com/haproxytech/client-native/v6 v6.1.10/go.mod h1:K/Fwq0BLWPrM3iGwzi+pt6Q1mLPrLIPACIooo7NS1z4= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= -github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= -github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= -github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= -github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM= -github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -168,20 +139,14 @@ 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/maruel/panicparse/v2 v2.4.0 h1:yQKMIbQ0DKfinzVkTkcUzQyQ60UCiNnYfR7PWwTs2VI= -github.com/maruel/panicparse/v2 v2.4.0/go.mod h1:nOY2OKe8csO3F3SA5+hsxot05JLgukrF54B9x88fVp4= -github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= -github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= -github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= -github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= +github.com/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= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= -github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -191,14 +156,12 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/nathanaelle/syslog5424/v2 v2.0.5 h1:oLVYQmKnv3nlnmvlbBWM+iWl9AONcU+tuxIL0fjko5A= github.com/nathanaelle/syslog5424/v2 v2.0.5/go.mod h1:f9MvsGkLOtYh2VzLT4Pjuwx3+Xv2EogxJNda+HLPDus= -github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8 h1:9djga8U4+/TQzv5iMlZHZ/qbGQB9V2nlnk2bmiG+uBs= -github.com/oasdiff/yaml v0.0.0-20241214135536-5f7845c759c8/go.mod h1:7tFDb+Y51LcDpn26GccuUgQXUk6t0CXZsivKjyimYX8= -github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672 h1:+273wgr7to5QhwOOBE5LwjdNDFAI+8cbJVfB0Zj75aI= -github.com/oasdiff/yaml3 v0.0.0-20241214160948-977117996672/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= -github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= @@ -214,8 +177,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= @@ -227,43 +190,38 @@ 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/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= -github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= -github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= -github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= +github.com/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= +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.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM= -go.mongodb.org/mongo-driver v1.17.2/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.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/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.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +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= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/handlers/acl.go b/handlers/acl.go index 9db23e16..e20ef218 100644 --- a/handlers/acl.go +++ b/handlers/acl.go @@ -61,7 +61,7 @@ type ReplaceAllACLHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.CreateACLBackendParams, principal interface{}) middleware.Responder { +func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.CreateACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.DeleteACLBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.DeleteACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetACLBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params a } // Handle executing the request and returning a response -func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.GetAllACLBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -205,7 +205,7 @@ func (h *GetAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -251,7 +251,7 @@ func (h *ReplaceACLHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *ReplaceAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLHandlerImpl) Handle(parentType cnconstants.CnParentType, params acl.ReplaceAllACLBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/acl_runtime.go b/handlers/acl_runtime.go index 96042161..4aba05c2 100644 --- a/handlers/acl_runtime.go +++ b/handlers/acl_runtime.go @@ -12,7 +12,7 @@ type GetACLSHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLSHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParams, i interface{}) middleware.Responder { +func (h GetACLSHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -32,7 +32,7 @@ type GetACLHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsIDParams, i interface{}) middleware.Responder { +func (h GetACLHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -52,7 +52,7 @@ type GetACLFileEntriesHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLFileEntriesHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesParams, i interface{}) middleware.Responder { +func (h GetACLFileEntriesHandlerRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -71,7 +71,7 @@ type PostACLFileEntryHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h PostACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.PostServicesHaproxyRuntimeAclsParentNameEntriesParams, i interface{}) middleware.Responder { +func (h PostACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.PostServicesHaproxyRuntimeAclsParentNameEntriesParams, i any) middleware.Responder { var err error runtime, err := h.Client.Runtime() if err != nil { @@ -98,7 +98,7 @@ type GetACLFileEntryRuntimeImpl struct { Client client_native.HAProxyClient } -func (h GetACLFileEntryRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i interface{}) middleware.Responder { +func (h GetACLFileEntryRuntimeImpl) Handle(params acl_runtime.GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -118,7 +118,7 @@ type DeleteACLFileEntryHandlerRuntimeImpl struct { Client client_native.HAProxyClient } -func (h DeleteACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i interface{}) middleware.Responder { +func (h DeleteACLFileEntryHandlerRuntimeImpl) Handle(params acl_runtime.DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -136,7 +136,7 @@ type ACLRuntimeAddPayloadRuntimeACLHandlerImpl struct { Client client_native.HAProxyClient } -func (h ACLRuntimeAddPayloadRuntimeACLHandlerImpl) Handle(params acl_runtime.AddPayloadRuntimeACLParams, i interface{}) middleware.Responder { +func (h ACLRuntimeAddPayloadRuntimeACLHandlerImpl) Handle(params acl_runtime.AddPayloadRuntimeACLParams, i any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/aws.go b/handlers/aws.go index 4f8604b0..3b12b567 100644 --- a/handlers/aws.go +++ b/handlers/aws.go @@ -33,7 +33,7 @@ type CreateAWSHandlerImpl struct { UseValidation bool } -func (c CreateAWSHandlerImpl) Handle(params service_discovery.CreateAWSRegionParams, i interface{}) middleware.Responder { +func (c CreateAWSHandlerImpl) Handle(params service_discovery.CreateAWSRegionParams, i any) middleware.Responder { var err error handleError := func(err error) *service_discovery.CreateAWSRegionDefault { e := misc.HandleError(err) @@ -73,7 +73,7 @@ type GetAWSRegionHandlerImpl struct { Discovery sc.ServiceDiscoveries } -func (g GetAWSRegionHandlerImpl) Handle(params service_discovery.GetAWSRegionParams, i interface{}) middleware.Responder { +func (g GetAWSRegionHandlerImpl) Handle(params service_discovery.GetAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.GetAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewGetAWSRegionDefault(int(*e.Code)).WithPayload(e) @@ -94,7 +94,7 @@ type GetAWSRegionsHandlerImpl struct { Discovery sc.ServiceDiscoveries } -func (g GetAWSRegionsHandlerImpl) Handle(params service_discovery.GetAWSRegionsParams, i interface{}) middleware.Responder { +func (g GetAWSRegionsHandlerImpl) Handle(params service_discovery.GetAWSRegionsParams, i any) middleware.Responder { regions, err := getAWSRegions(g.Discovery) if err != nil { e := misc.HandleError(err) @@ -109,7 +109,7 @@ type ReplaceAWSRegionHandlerImpl struct { UseValidation bool } -func (r ReplaceAWSRegionHandlerImpl) Handle(params service_discovery.ReplaceAWSRegionParams, i interface{}) middleware.Responder { +func (r ReplaceAWSRegionHandlerImpl) Handle(params service_discovery.ReplaceAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.ReplaceAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewReplaceAWSRegionDefault(int(*e.Code)).WithPayload(e) @@ -137,7 +137,7 @@ type DeleteAWSRegionHandlerImpl struct { PersistCallback func([]*models.AwsRegion) error } -func (d DeleteAWSRegionHandlerImpl) Handle(params service_discovery.DeleteAWSRegionParams, i interface{}) middleware.Responder { +func (d DeleteAWSRegionHandlerImpl) Handle(params service_discovery.DeleteAWSRegionParams, i any) middleware.Responder { handleError := func(err error) *service_discovery.DeleteAWSRegionDefault { e := misc.HandleError(err) return service_discovery.NewDeleteAWSRegionDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/backend.go b/handlers/backend.go index 7444220f..358cc113 100644 --- a/handlers/backend.go +++ b/handlers/backend.go @@ -158,7 +158,7 @@ func handleDeprecatedBackendFields(method string, payload *models.Backend, onDis } // Handle executing the request and returning a response -func (h *CreateBackendHandlerImpl) Handle(params backend.CreateBackendParams, principal interface{}) middleware.Responder { +func (h *CreateBackendHandlerImpl) Handle(params backend.CreateBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -215,7 +215,7 @@ func (h *CreateBackendHandlerImpl) createBackend(params backend.CreateBackendPar } // Handle executing the request and returning a response -func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -262,7 +262,7 @@ func (h *DeleteBackendHandlerImpl) Handle(params backend.DeleteBackendParams, pr } // Handle executing the request and returning a response -func (h *GetBackendHandlerImpl) Handle(params backend.GetBackendParams, principal interface{}) middleware.Responder { +func (h *GetBackendHandlerImpl) Handle(params backend.GetBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -292,7 +292,7 @@ func (h *GetBackendHandlerImpl) getBackend(params backend.GetBackendParams, t st } // Handle executing the request and returning a response -func (h *GetBackendsHandlerImpl) Handle(params backend.GetBackendsParams, principal interface{}) middleware.Responder { +func (h *GetBackendsHandlerImpl) Handle(params backend.GetBackendsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -324,7 +324,7 @@ func (h *GetBackendsHandlerImpl) getBackends(params backend.GetBackendsParams, t } // Handle executing the request and returning a response -func (h *ReplaceBackendHandlerImpl) Handle(params backend.ReplaceBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendHandlerImpl) Handle(params backend.ReplaceBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/backend_switching_rule.go b/handlers/backend_switching_rule.go index b4dd8f87..ee691d7f 100644 --- a/handlers/backend_switching_rule.go +++ b/handlers/backend_switching_rule.go @@ -60,7 +60,7 @@ type ReplaceBackendSwitchingRulesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.CreateBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.CreateBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -105,7 +105,7 @@ func (h *CreateBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_ } // Handle executing the request and returning a response -func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.DeleteBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.DeleteBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -153,7 +153,7 @@ func (h *DeleteBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_ } // Handle executing the request and returning a response -func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -174,7 +174,7 @@ func (h *GetBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rul } // Handle executing the request and returning a response -func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.GetBackendSwitchingRulesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -198,7 +198,7 @@ func (h *GetBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_ru } // Handle executing the request and returning a response -func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -245,7 +245,7 @@ func (h *ReplaceBackendSwitchingRuleHandlerImpl) Handle(params backend_switching } // Handle executing the request and returning a response -func (h *ReplaceBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *ReplaceBackendSwitchingRulesHandlerImpl) Handle(params backend_switching_rule.ReplaceBackendSwitchingRulesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/bind.go b/handlers/bind.go index c6abf765..9fd15de3 100644 --- a/handlers/bind.go +++ b/handlers/bind.go @@ -70,7 +70,7 @@ func bindTypeParams(frontend *string, parentType *string, parentName *string) (p } // Handle executing the request and returning a response -func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.CreateBindFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.CreateBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -122,7 +122,7 @@ func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.DeleteBindFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.DeleteBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -174,7 +174,7 @@ func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetBindFrontendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params } // Handle executing the request and returning a response -func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetAllBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.GetAllBindFrontendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -229,7 +229,7 @@ func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para } // Handle executing the request and returning a response -func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.ReplaceBindFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params bind.ReplaceBindFrontendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/cache.go b/handlers/cache.go index 4e3d0e29..d5aa1afe 100644 --- a/handlers/cache.go +++ b/handlers/cache.go @@ -54,7 +54,7 @@ type ReplaceCacheHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principal interface{}) middleware.Responder { +func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -102,7 +102,7 @@ func (h *CreateCacheHandlerImpl) Handle(params cache.CreateCacheParams, principa } // Handle executing the request and returning a response -func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principal interface{}) middleware.Responder { +func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteCacheHandlerImpl) Handle(params cache.DeleteCacheParams, principa } // Handle executing the request and returning a response -func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal interface{}) middleware.Responder { +func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -170,7 +170,7 @@ func (h *GetCacheHandlerImpl) Handle(params cache.GetCacheParams, principal inte } // Handle executing the request and returning a response -func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal interface{}) middleware.Responder { +func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -191,7 +191,7 @@ func (h *GetCachesHandlerImpl) Handle(params cache.GetCachesParams, principal in } // Handle executing the request and returning a response -func (h *ReplaceCacheHandlerImpl) Handle(params cache.ReplaceCacheParams, principal interface{}) middleware.Responder { +func (h *ReplaceCacheHandlerImpl) Handle(params cache.ReplaceCacheParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/capture.go b/handlers/capture.go index 2fc4a4e7..d2f20f9f 100644 --- a/handlers/capture.go +++ b/handlers/capture.go @@ -53,7 +53,7 @@ type ReplaceDeclareCapturesHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -104,7 +104,7 @@ func (h *CreateDeclareCaptureHandlerImpl) Handle(params capture.CreateDeclareCap return capture.NewCreateDeclareCaptureAccepted().WithPayload(params.Data) } -func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeleteDeclareCaptureHandlerImpl) Handle(params capture.DeleteDeclareCap return capture.NewDeleteDeclareCaptureAccepted() } -func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCaptureParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -175,7 +175,7 @@ func (h *GetDeclareCaptureHandlerImpl) Handle(params capture.GetDeclareCapturePa return capture.NewGetDeclareCaptureOK().WithPayload(data) } -func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCapturesParams, principal interface{}) middleware.Responder { +func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCapturesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -205,7 +205,7 @@ func (h *GetDeclareCapturesHandlerImpl) Handle(params capture.GetDeclareCaptures return capture.NewGetDeclareCapturesOK().WithPayload(data) } -func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareCaptureParams, principal interface{}) middleware.Responder { +func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareCaptureParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -258,7 +258,7 @@ func (h *ReplaceDeclareCaptureHandlerImpl) Handle(params capture.ReplaceDeclareC } // Handle executing the request and returning a response -func (h *ReplaceDeclareCapturesHandlerImpl) Handle(params capture.ReplaceDeclareCapturesParams, principal interface{}) middleware.Responder { +func (h *ReplaceDeclareCapturesHandlerImpl) Handle(params capture.ReplaceDeclareCapturesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/cluster.go b/handlers/cluster.go index df7a2778..9c49cca2 100644 --- a/handlers/cluster.go +++ b/handlers/cluster.go @@ -63,7 +63,7 @@ type EditClusterHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ClusterInitiateCertificateRefreshHandlerImpl) Handle(params cluster.InitiateCertificateRefreshParams, principal interface{}) middleware.Responder { +func (h *ClusterInitiateCertificateRefreshHandlerImpl) Handle(params cluster.InitiateCertificateRefreshParams, principal any) middleware.Responder { if h.Config.Mode.Load() != configuration.ModeCluster { return cluster.NewInitiateCertificateRefreshForbidden() } @@ -118,7 +118,7 @@ func (h *CreateClusterHandlerImpl) err409(err error, transaction *models.Transac }) } -func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, principal interface{}) middleware.Responder { +func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, principal any) middleware.Responder { key := h.Config.Cluster.BootstrapKey.Load() if params.Data.BootstrapKey != "" && key != params.Data.BootstrapKey { // before we switch to cluster mode, check if folder for storage is compatible with dataplane @@ -159,11 +159,11 @@ func (h *CreateClusterHandlerImpl) Handle(params cluster.PostClusterParams, prin } // Handle executing the request and returning a response -func (h *GetClusterHandlerImpl) Handle(params cluster.GetClusterParams, principal interface{}) middleware.Responder { +func (h *GetClusterHandlerImpl) Handle(params cluster.GetClusterParams, principal any) middleware.Responder { return cluster.NewGetClusterOK().WithPayload(getClusterSettings(h.Config)) } -func (h *DeleteClusterHandlerImpl) Handle(params cluster.DeleteClusterParams, principal interface{}) middleware.Responder { +func (h *DeleteClusterHandlerImpl) Handle(params cluster.DeleteClusterParams, principal any) middleware.Responder { log.Warningf("received instructions from %s to switch to standalone mode", params.HTTPRequest.RemoteAddr) // Only do when dataplane is in cluster mode, if not, do nothing and return 204 if h.Config.Mode.Load() == configuration.ModeCluster { @@ -240,7 +240,7 @@ func (h *DeleteClusterHandlerImpl) err500(err error, transaction *models.Transac }) } -func (h *EditClusterHandlerImpl) Handle(params cluster.EditClusterParams, principal interface{}) middleware.Responder { +func (h *EditClusterHandlerImpl) Handle(params cluster.EditClusterParams, principal any) middleware.Responder { // Only do when dataplane is in cluster mode, if not, do nothing and return 204 if h.Config.Mode.Load() == configuration.ModeCluster { // for now change only cluster log targets in PUT method @@ -312,7 +312,7 @@ func clusterLogTargetsChanged(oldCLT []*models.ClusterLogTarget, newCLT []*model } } } - return !(eqCtr == len(oldCLT)) + return eqCtr != len(oldCLT) } return true } diff --git a/handlers/consul.go b/handlers/consul.go index 57710c91..7f759204 100644 --- a/handlers/consul.go +++ b/handlers/consul.go @@ -57,7 +57,7 @@ type ReplaceConsulHandlerImpl struct { } // Handle executing the request and returning a response -func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulParams, principal interface{}) middleware.Responder { +func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulParams, principal any) middleware.Responder { params.Data.ID = sc.NewServiceDiscoveryUUID() if err := sc.ValidateConsulData(params.Data, c.UseValidation); err != nil { e := misc.HandleError(err) @@ -89,7 +89,7 @@ func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulPa } // Handle executing the request and returning a response -func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulParams, principal interface{}) middleware.Responder { +func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulParams, principal any) middleware.Responder { err := c.Discovery.RemoveNode("consul", params.ID) if err != nil { e := misc.HandleError(err) @@ -109,7 +109,7 @@ func (c *DeleteConsulHandlerImpl) Handle(params service_discovery.DeleteConsulPa } // Handle executing the request and returning a response -func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, principal interface{}) middleware.Responder { +func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, principal any) middleware.Responder { nodes, err := c.Discovery.GetNode("consul", params.ID) if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ func (c *GetConsulHandlerImpl) Handle(params service_discovery.GetConsulParams, } // Handle executing the request and returning a response -func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams, principal interface{}) middleware.Responder { +func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams, principal any) middleware.Responder { consuls, err := getConsuls(c.Discovery) if err != nil { e := misc.HandleError(err) @@ -134,7 +134,7 @@ func (c *GetConsulsHandlerImpl) Handle(params service_discovery.GetConsulsParams } // Handle executing the request and returning a response -func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsulParams, principal interface{}) middleware.Responder { +func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsulParams, principal any) middleware.Responder { if err := sc.ValidateConsulData(params.Data, c.UseValidation); err != nil { e := misc.HandleError(err) return service_discovery.NewReplaceConsulDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/crt_load.go b/handlers/crt_load.go index c774fcd3..f52d303c 100644 --- a/handlers/crt_load.go +++ b/handlers/crt_load.go @@ -29,7 +29,7 @@ type GetCrtLoadsHandlerImpl struct { } // Get all loads from crt-stores -func (h *GetCrtLoadsHandlerImpl) Handle(params crt_load.GetCrtLoadsParams, principal interface{}) middleware.Responder { +func (h *GetCrtLoadsHandlerImpl) Handle(params crt_load.GetCrtLoadsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type GetCrtLoadHandlerImpl struct { } // Get one load from a crt-store -func (h *GetCrtLoadHandlerImpl) Handle(params crt_load.GetCrtLoadParams, principal interface{}) middleware.Responder { +func (h *GetCrtLoadHandlerImpl) Handle(params crt_load.GetCrtLoadParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -81,7 +81,7 @@ type CreateCrtLoadHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateCrtLoadHandlerImpl) Handle(params crt_load.CreateCrtLoadParams, principal interface{}) middleware.Responder { +func (h *CreateCrtLoadHandlerImpl) Handle(params crt_load.CreateCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -133,7 +133,7 @@ type ReplaceCrtLoadHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *ReplaceCrtLoadHandler) Handle(params crt_load.ReplaceCrtLoadParams, principal interface{}) middleware.Responder { +func (h *ReplaceCrtLoadHandler) Handle(params crt_load.ReplaceCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -186,7 +186,7 @@ type DeleteCrtLoadHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteCrtLoadHandlerImpl) Handle(params crt_load.DeleteCrtLoadParams, principal interface{}) middleware.Responder { +func (h *DeleteCrtLoadHandlerImpl) Handle(params crt_load.DeleteCrtLoadParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/crt_store.go b/handlers/crt_store.go index 34e0b465..d07e05cc 100644 --- a/handlers/crt_store.go +++ b/handlers/crt_store.go @@ -29,7 +29,7 @@ type GetCrtStoresHandlerImpl struct { } // Get all crt-stores -func (h *GetCrtStoresHandlerImpl) Handle(params crt_store.GetCrtStoresParams, principal interface{}) middleware.Responder { +func (h *GetCrtStoresHandlerImpl) Handle(params crt_store.GetCrtStoresParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -55,7 +55,7 @@ type GetCrtStoreHandlerImpl struct { } // Get one crt-store -func (h *GetCrtStoreHandlerImpl) Handle(params crt_store.GetCrtStoreParams, principal interface{}) middleware.Responder { +func (h *GetCrtStoreHandlerImpl) Handle(params crt_store.GetCrtStoreParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -81,7 +81,7 @@ type CreateCrtStoreHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *CreateCrtStoreHandlerImpl) Handle(params crt_store.CreateCrtStoreParams, principal interface{}) middleware.Responder { +func (h *CreateCrtStoreHandlerImpl) Handle(params crt_store.CreateCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -133,7 +133,7 @@ type EditCrtStoreHandler struct { ReloadAgent haproxy.IReloadAgent } -func (h *EditCrtStoreHandler) Handle(params crt_store.EditCrtStoreParams, principal interface{}) middleware.Responder { +func (h *EditCrtStoreHandler) Handle(params crt_store.EditCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -173,7 +173,7 @@ type DeleteCrtStoreHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *DeleteCrtStoreHandlerImpl) Handle(params crt_store.DeleteCrtStoreParams, principal interface{}) middleware.Responder { +func (h *DeleteCrtStoreHandlerImpl) Handle(params crt_store.DeleteCrtStoreParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/defaults.go b/handlers/defaults.go index dc851928..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,19 +120,13 @@ 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 } - 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 @@ -155,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 @@ -185,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 { @@ -241,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 { @@ -298,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 { @@ -354,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 16f956b6..eea32d87 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -38,7 +38,15 @@ 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), + Message: misc.StringP("No file_upload form param specified"), + } + return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) + } + file, ok := params.FileUpload.(*runtime.File) if !ok { return storage.NewCreateStorageGeneralFileBadRequest() @@ -72,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) @@ -103,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) @@ -131,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) @@ -182,13 +190,21 @@ 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) return storage.NewReplaceStorageGeneralFileDefault(int(*e.Code)).WithPayload(e) } + if params.FileUpload == nil { + e := &models.Error{ + Code: misc.Int64P(400), + Message: misc.StringP("No file_upload form param specified"), + } + return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) + } + data, err := io.ReadAll(params.FileUpload) if err != nil { return storage.NewReplaceStorageGeneralFileBadRequest() diff --git a/handlers/global.go b/handlers/global.go index b4bcaed1..681decd6 100644 --- a/handlers/global.go +++ b/handlers/global.go @@ -37,7 +37,7 @@ type ReplaceGlobalHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetGlobalHandlerImpl) Handle(params global.GetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetGlobalHandlerImpl) Handle(params global.GetGlobalParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -63,7 +63,7 @@ func (h *GetGlobalHandlerImpl) getGlobalConfiguration(params global.GetGlobalPar } // Handle executing the request and returning a response -func (h *ReplaceGlobalHandlerImpl) Handle(params global.ReplaceGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceGlobalHandlerImpl) Handle(params global.ReplaceGlobalParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/group.go b/handlers/group.go index bf4f0ceb..5d150079 100644 --- a/handlers/group.go +++ b/handlers/group.go @@ -54,7 +54,7 @@ type ReplaceGroupHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principal interface{}) middleware.Responder { +func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateGroupHandlerImpl) Handle(params group.CreateGroupParams, principa } // Handle executing the request and returning a response -func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principal interface{}) middleware.Responder { +func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteGroupHandlerImpl) Handle(params group.DeleteGroupParams, principa } // Handle executing the request and returning a response -func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal interface{}) middleware.Responder { +func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -182,7 +182,7 @@ func (h *GetGroupHandlerImpl) Handle(params group.GetGroupParams, principal inte } // Handle executing the request and returning a response -func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal interface{}) middleware.Responder { +func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -214,7 +214,7 @@ func (h *GetGroupsHandlerImpl) Handle(params group.GetGroupsParams, principal in } // Handle executing the request and returning a response -func (h *ReplaceGroupHandlerImpl) Handle(params group.ReplaceGroupParams, principal interface{}) middleware.Responder { +func (h *ReplaceGroupHandlerImpl) Handle(params group.ReplaceGroupParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/health.go b/handlers/health.go index 66a3285a..910a9bd2 100644 --- a/handlers/health.go +++ b/handlers/health.go @@ -12,7 +12,7 @@ type GetHealthHandlerImpl struct { HAProxy haproxy.IReloadAgent } -func (h *GetHealthHandlerImpl) Handle(health.GetHealthParams, interface{}) middleware.Responder { +func (h *GetHealthHandlerImpl) Handle(health.GetHealthParams, any) middleware.Responder { data := models.Health{} status, err := h.HAProxy.Status() if err == nil { diff --git a/handlers/http_after_response_rule.go b/handlers/http_after_response_rule.go index 516ba0dc..9a58c44a 100644 --- a/handlers/http_after_response_rule.go +++ b/handlers/http_after_response_rule.go @@ -16,7 +16,7 @@ type CreateHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -67,7 +67,7 @@ type DeleteHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -117,7 +117,7 @@ type GetHTTPAfterResponseRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (g GetHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -143,7 +143,7 @@ type GetAllHTTPAfterResponseRuleHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (g GetAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -170,7 +170,7 @@ type ReplaceHTTPAfterResponseRuleHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, _ interface{}) middleware.Responder { +func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, _ any) middleware.Responder { t, v := "", int64(0) if params.TransactionID != nil { @@ -222,7 +222,7 @@ type ReplaceAllHTTPAfterResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_check.go b/handlers/http_check.go index 778fcb75..76477ca8 100644 --- a/handlers/http_check.go +++ b/handlers/http_check.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPCheckHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.CreateHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.CreateHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.DeleteHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.DeleteHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetHTTPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.GetAllHTTPCheckBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, } // Handle executing the request and returning a response -func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_check.ReplaceAllHTTPCheckBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_error_rule.go b/handlers/http_error_rule.go index 00ccf250..ffa0015f 100644 --- a/handlers/http_error_rule.go +++ b/handlers/http_error_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPErrorRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.CreateHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.CreateHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType } // Handle executing the request and returning a response -func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -247,7 +247,7 @@ func (h *ReplaceHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParent return http_error_rule.NewReplaceHTTPErrorRuleBackendAccepted().WithPayload(params.Data) } -func (h *ReplaceAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_errors.go b/handlers/http_errors.go index 4316b343..54879cf5 100644 --- a/handlers/http_errors.go +++ b/handlers/http_errors.go @@ -53,7 +53,7 @@ type ReplaceHTTPErrorsSectionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateHTTPErrorsSectionHandlerImpl) Handle(params http_errors.CreateHTT } // Handle executing the request and returning a response -func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteHTTPErrorsSectionHandlerImpl) Handle(params http_errors.DeleteHTT } // Handle executing the request and returning a response -func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -171,7 +171,7 @@ func (h *GetHTTPErrorsSectionHandlerImpl) Handle(params http_errors.GetHTTPError } // Handle executing the request and returning a response -func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErrorsSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -192,7 +192,7 @@ func (h *GetHTTPErrorsSectionsHandlerImpl) Handle(params http_errors.GetHTTPErro return http_errors.NewGetHTTPErrorsSectionsOK().WithPayload(ms) } -func (h *ReplaceHTTPErrorsSectionHandlerImpl) Handle(params http_errors.ReplaceHTTPErrorsSectionParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorsSectionHandlerImpl) Handle(params http_errors.ReplaceHTTPErrorsSectionParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_request_rule.go b/handlers/http_request_rule.go index 8b5732b1..4e378f8e 100644 --- a/handlers/http_request_rule.go +++ b/handlers/http_request_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPRequestRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.CreateHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.CreateHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentTy } // Handle executing the request and returning a response -func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/http_response_rule.go b/handlers/http_response_rule.go index 075f9da7..b244a7bd 100644 --- a/handlers/http_response_rule.go +++ b/handlers/http_response_rule.go @@ -61,7 +61,7 @@ type ReplaceAllHTTPResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.CreateHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.CreateHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -177,7 +177,7 @@ func (h *GetHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentT } // Handle executing the request and returning a response -func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -201,7 +201,7 @@ func (h *GetAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare } // Handle executing the request and returning a response -func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPar } // Handle executing the request and returning a response -func (h *ReplaceAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/information.go b/handlers/information.go index ed8fe241..723fcf5b 100644 --- a/handlers/information.go +++ b/handlers/information.go @@ -42,7 +42,7 @@ type GetHaproxyProcessInfoHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetHaproxyProcessInfoHandlerImpl) Handle(params information.GetHaproxyProcessInfoParams, principal interface{}) middleware.Responder { +func (h *GetHaproxyProcessInfoHandlerImpl) Handle(params information.GetHaproxyProcessInfoParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -70,7 +70,7 @@ type GetInfoHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetInfoHandlerImpl) Handle(params information.GetInfoParams, principal interface{}) middleware.Responder { +func (h *GetInfoHandlerImpl) Handle(params information.GetInfoParams, principal any) middleware.Responder { api := &models.InfoAPI{ Version: h.Version, } diff --git a/handlers/log_forward.go b/handlers/log_forward.go index dd302e80..f66fec4b 100644 --- a/handlers/log_forward.go +++ b/handlers/log_forward.go @@ -54,7 +54,7 @@ type ReplaceLogForwardHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateLogForwardHandlerImpl) Handle(params log_forward.CreateLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateLogForwardHandlerImpl) Handle(params log_forward.CreateLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateLogForwardHandlerImpl) createLogForward(params log_forward.Create } // Handle executing the request and returning a response -func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeleteLogForwardHandlerImpl) Handle(params log_forward.DeleteLogForward } // Handle executing the request and returning a response -func (h *GetLogForwardHandlerImpl) Handle(params log_forward.GetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetLogForwardHandlerImpl) Handle(params log_forward.GetLogForwardParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -180,7 +180,7 @@ func (h *GetLogForwardHandlerImpl) getLogForward(params log_forward.GetLogForwar } // Handle executing the request and returning a response -func (h *GetLogForwardsHandlerImpl) Handle(params log_forward.GetLogForwardsParams, principal interface{}) middleware.Responder { +func (h *GetLogForwardsHandlerImpl) Handle(params log_forward.GetLogForwardsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -206,7 +206,7 @@ func (h *GetLogForwardsHandlerImpl) getLogForwards(params log_forward.GetLogForw } // Handle executing the request and returning a response -func (h *ReplaceLogForwardHandlerImpl) Handle(params log_forward.ReplaceLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogForwardHandlerImpl) Handle(params log_forward.ReplaceLogForwardParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/log_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 9571cc22..dabdad82 100644 --- a/handlers/parent_acl_generated.go +++ b/handlers/parent_acl_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllACLFCGIAppHandlerImpl ReplaceAllACLHandlerImpl ) -func (h *CreateACLBackendHandlerImpl) Handle(params acl.CreateACLBackendParams, principal interface{}) middleware.Responder { +func (h *CreateACLBackendHandlerImpl) Handle(params acl.CreateACLBackendParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateACLFrontendHandlerImpl) Handle(params acl.CreateACLFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateACLFrontendHandlerImpl) Handle(params acl.CreateACLFrontendParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) pg := acl.CreateACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateACLFCGIAppHandlerImpl) Handle(params acl.CreateACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *CreateACLFCGIAppHandlerImpl) Handle(params acl.CreateACLFCGIAppParams, principal any) middleware.Responder { g := CreateACLHandlerImpl(*h) pg := acl.CreateACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *GetACLBackendHandlerImpl) Handle(params acl.GetACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetACLBackendHandlerImpl) Handle(params acl.GetACLBackendParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetACLFrontendHandlerImpl) Handle(params acl.GetACLFrontendParams, principal interface{}) middleware.Responder { +func (h *GetACLFrontendHandlerImpl) Handle(params acl.GetACLFrontendParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) pg := acl.GetACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetACLFCGIAppHandlerImpl) Handle(params acl.GetACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *GetACLFCGIAppHandlerImpl) Handle(params acl.GetACLFCGIAppParams, principal any) middleware.Responder { g := GetACLHandlerImpl(*h) pg := acl.GetACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *GetAllACLBackendHandlerImpl) Handle(params acl.GetAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLBackendHandlerImpl) Handle(params acl.GetAllACLBackendParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllACLFrontendHandlerImpl) Handle(params acl.GetAllACLFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllACLFrontendHandlerImpl) Handle(params acl.GetAllACLFrontendParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) pg := acl.GetAllACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllACLFCGIAppHandlerImpl) Handle(params acl.GetAllACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *GetAllACLFCGIAppHandlerImpl) Handle(params acl.GetAllACLFCGIAppParams, principal any) middleware.Responder { g := GetAllACLHandlerImpl(*h) pg := acl.GetAllACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *DeleteACLBackendHandlerImpl) Handle(params acl.DeleteACLBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLBackendHandlerImpl) Handle(params acl.DeleteACLBackendParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteACLFrontendHandlerImpl) Handle(params acl.DeleteACLFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteACLFrontendHandlerImpl) Handle(params acl.DeleteACLFrontendParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) pg := acl.DeleteACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteACLFCGIAppHandlerImpl) Handle(params acl.DeleteACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *DeleteACLFCGIAppHandlerImpl) Handle(params acl.DeleteACLFCGIAppParams, principal any) middleware.Responder { g := DeleteACLHandlerImpl(*h) pg := acl.DeleteACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *ReplaceACLBackendHandlerImpl) Handle(params acl.ReplaceACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLBackendHandlerImpl) Handle(params acl.ReplaceACLBackendParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceACLFrontendHandlerImpl) Handle(params acl.ReplaceACLFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLFrontendHandlerImpl) Handle(params acl.ReplaceACLFrontendParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) pg := acl.ReplaceACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceACLFCGIAppHandlerImpl) Handle(params acl.ReplaceACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *ReplaceACLFCGIAppHandlerImpl) Handle(params acl.ReplaceACLFCGIAppParams, principal any) middleware.Responder { g := ReplaceACLHandlerImpl(*h) pg := acl.ReplaceACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) } -func (h *ReplaceAllACLBackendHandlerImpl) Handle(params acl.ReplaceAllACLBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLBackendHandlerImpl) Handle(params acl.ReplaceAllACLBackendParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllACLFrontendHandlerImpl) Handle(params acl.ReplaceAllACLFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLFrontendHandlerImpl) Handle(params acl.ReplaceAllACLFrontendParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) pg := acl.ReplaceAllACLBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllACLFCGIAppHandlerImpl) Handle(params acl.ReplaceAllACLFCGIAppParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllACLFCGIAppHandlerImpl) Handle(params acl.ReplaceAllACLFCGIAppParams, principal any) middleware.Responder { g := ReplaceAllACLHandlerImpl(*h) pg := acl.ReplaceAllACLBackendParams(params) return g.Handle(cnconstants.FCGIAppParentType, pg, principal) diff --git a/handlers/parent_bind_generated.go b/handlers/parent_bind_generated.go index 5adcd93f..fe58c618 100644 --- a/handlers/parent_bind_generated.go +++ b/handlers/parent_bind_generated.go @@ -50,86 +50,86 @@ type ( ReplaceBindPeerHandlerImpl ReplaceBindHandlerImpl ) -func (h *CreateBindFrontendHandlerImpl) Handle(params bind.CreateBindFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateBindFrontendHandlerImpl) Handle(params bind.CreateBindFrontendParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *CreateBindLogForwardHandlerImpl) Handle(params bind.CreateBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateBindLogForwardHandlerImpl) Handle(params bind.CreateBindLogForwardParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) pg := bind.CreateBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *CreateBindPeerHandlerImpl) Handle(params bind.CreateBindPeerParams, principal interface{}) middleware.Responder { +func (h *CreateBindPeerHandlerImpl) Handle(params bind.CreateBindPeerParams, principal any) middleware.Responder { g := CreateBindHandlerImpl(*h) pg := bind.CreateBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetBindFrontendHandlerImpl) Handle(params bind.GetBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetBindFrontendHandlerImpl) Handle(params bind.GetBindFrontendParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetBindLogForwardHandlerImpl) Handle(params bind.GetBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetBindLogForwardHandlerImpl) Handle(params bind.GetBindLogForwardParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) pg := bind.GetBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetBindPeerHandlerImpl) Handle(params bind.GetBindPeerParams, principal interface{}) middleware.Responder { +func (h *GetBindPeerHandlerImpl) Handle(params bind.GetBindPeerParams, principal any) middleware.Responder { g := GetBindHandlerImpl(*h) pg := bind.GetBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetAllBindFrontendHandlerImpl) Handle(params bind.GetAllBindFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllBindFrontendHandlerImpl) Handle(params bind.GetAllBindFrontendParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *GetAllBindLogForwardHandlerImpl) Handle(params bind.GetAllBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetAllBindLogForwardHandlerImpl) Handle(params bind.GetAllBindLogForwardParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) pg := bind.GetAllBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetAllBindPeerHandlerImpl) Handle(params bind.GetAllBindPeerParams, principal interface{}) middleware.Responder { +func (h *GetAllBindPeerHandlerImpl) Handle(params bind.GetAllBindPeerParams, principal any) middleware.Responder { g := GetAllBindHandlerImpl(*h) pg := bind.GetAllBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *DeleteBindFrontendHandlerImpl) Handle(params bind.DeleteBindFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteBindFrontendHandlerImpl) Handle(params bind.DeleteBindFrontendParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *DeleteBindLogForwardHandlerImpl) Handle(params bind.DeleteBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteBindLogForwardHandlerImpl) Handle(params bind.DeleteBindLogForwardParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) pg := bind.DeleteBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *DeleteBindPeerHandlerImpl) Handle(params bind.DeleteBindPeerParams, principal interface{}) middleware.Responder { +func (h *DeleteBindPeerHandlerImpl) Handle(params bind.DeleteBindPeerParams, principal any) middleware.Responder { g := DeleteBindHandlerImpl(*h) pg := bind.DeleteBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceBindFrontendHandlerImpl) Handle(params bind.ReplaceBindFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindFrontendHandlerImpl) Handle(params bind.ReplaceBindFrontendParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) return g.Handle(cnconstants.FrontendParentType, params, principal) } -func (h *ReplaceBindLogForwardHandlerImpl) Handle(params bind.ReplaceBindLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindLogForwardHandlerImpl) Handle(params bind.ReplaceBindLogForwardParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) pg := bind.ReplaceBindFrontendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceBindPeerHandlerImpl) Handle(params bind.ReplaceBindPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceBindPeerHandlerImpl) Handle(params bind.ReplaceBindPeerParams, principal any) middleware.Responder { g := ReplaceBindHandlerImpl(*h) pg := bind.ReplaceBindFrontendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) diff --git a/handlers/parent_filter_generated.go b/handlers/parent_filter_generated.go index 6ec3fea1..a9401717 100644 --- a/handlers/parent_filter_generated.go +++ b/handlers/parent_filter_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllFilterFrontendHandlerImpl ReplaceAllFilterHandlerImpl ) -func (h *CreateFilterBackendHandlerImpl) Handle(params filter.CreateFilterBackendParams, principal interface{}) middleware.Responder { +func (h *CreateFilterBackendHandlerImpl) Handle(params filter.CreateFilterBackendParams, principal any) middleware.Responder { g := CreateFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateFilterFrontendHandlerImpl) Handle(params filter.CreateFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateFilterFrontendHandlerImpl) Handle(params filter.CreateFilterFrontendParams, principal any) middleware.Responder { g := CreateFilterHandlerImpl(*h) pg := filter.CreateFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetFilterBackendHandlerImpl) Handle(params filter.GetFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetFilterBackendHandlerImpl) Handle(params filter.GetFilterBackendParams, principal any) middleware.Responder { g := GetFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetFilterFrontendHandlerImpl) Handle(params filter.GetFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *GetFilterFrontendHandlerImpl) Handle(params filter.GetFilterFrontendParams, principal any) middleware.Responder { g := GetFilterHandlerImpl(*h) pg := filter.GetFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllFilterBackendHandlerImpl) Handle(params filter.GetAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllFilterBackendHandlerImpl) Handle(params filter.GetAllFilterBackendParams, principal any) middleware.Responder { g := GetAllFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllFilterFrontendHandlerImpl) Handle(params filter.GetAllFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllFilterFrontendHandlerImpl) Handle(params filter.GetAllFilterFrontendParams, principal any) middleware.Responder { g := GetAllFilterHandlerImpl(*h) pg := filter.GetAllFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteFilterBackendHandlerImpl) Handle(params filter.DeleteFilterBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteFilterBackendHandlerImpl) Handle(params filter.DeleteFilterBackendParams, principal any) middleware.Responder { g := DeleteFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteFilterFrontendHandlerImpl) Handle(params filter.DeleteFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteFilterFrontendHandlerImpl) Handle(params filter.DeleteFilterFrontendParams, principal any) middleware.Responder { g := DeleteFilterHandlerImpl(*h) pg := filter.DeleteFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceFilterBackendHandlerImpl) Handle(params filter.ReplaceFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFilterBackendHandlerImpl) Handle(params filter.ReplaceFilterBackendParams, principal any) middleware.Responder { g := ReplaceFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceFilterFrontendHandlerImpl) Handle(params filter.ReplaceFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceFilterFrontendHandlerImpl) Handle(params filter.ReplaceFilterFrontendParams, principal any) middleware.Responder { g := ReplaceFilterHandlerImpl(*h) pg := filter.ReplaceFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllFilterBackendHandlerImpl) Handle(params filter.ReplaceAllFilterBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllFilterBackendHandlerImpl) Handle(params filter.ReplaceAllFilterBackendParams, principal any) middleware.Responder { g := ReplaceAllFilterHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllFilterFrontendHandlerImpl) Handle(params filter.ReplaceAllFilterFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllFilterFrontendHandlerImpl) Handle(params filter.ReplaceAllFilterFrontendParams, principal any) middleware.Responder { g := ReplaceAllFilterHandlerImpl(*h) pg := filter.ReplaceAllFilterBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_after_response_rule_generated.go b/handlers/parent_http_after_response_rule_generated.go index f93491ff..76109286 100644 --- a/handlers/parent_http_after_response_rule_generated.go +++ b/handlers/parent_http_after_response_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl ReplaceAllHTTPAfterResponseRuleHandlerImpl ) -func (h *CreateHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.CreateHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.CreateHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := GetHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.GetAllHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.GetAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.DeleteHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.DeleteHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleBackendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPAfterResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPAfterResponseRuleFrontendHandlerImpl) Handle(params http_after_response_rule.ReplaceAllHTTPAfterResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPAfterResponseRuleHandlerImpl(*h) pg := http_after_response_rule.ReplaceAllHTTPAfterResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_check_generated.go b/handlers/parent_http_check_generated.go index 67405ba6..5746f4af 100644 --- a/handlers/parent_http_check_generated.go +++ b/handlers/parent_http_check_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPCheckDefaultsHandlerImpl ReplaceAllHTTPCheckHandlerImpl ) -func (h *CreateHTTPCheckBackendHandlerImpl) Handle(params http_check.CreateHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckBackendHandlerImpl) Handle(params http_check.CreateHTTPCheckBackendParams, principal any) middleware.Responder { g := CreateHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPCheckDefaultsHandlerImpl) Handle(params http_check.CreateHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPCheckDefaultsHandlerImpl) Handle(params http_check.CreateHTTPCheckDefaultsParams, principal any) middleware.Responder { g := CreateHTTPCheckHandlerImpl(*h) pg := http_check.CreateHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetHTTPCheckBackendHandlerImpl) Handle(params http_check.GetHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckBackendHandlerImpl) Handle(params http_check.GetHTTPCheckBackendParams, principal any) middleware.Responder { g := GetHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetHTTPCheckDefaultsParams, principal any) middleware.Responder { g := GetHTTPCheckHandlerImpl(*h) pg := http_check.GetHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllHTTPCheckBackendHandlerImpl) Handle(params http_check.GetAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckBackendHandlerImpl) Handle(params http_check.GetAllHTTPCheckBackendParams, principal any) middleware.Responder { g := GetAllHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetAllHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.GetAllHTTPCheckDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPCheckHandlerImpl(*h) pg := http_check.GetAllHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteHTTPCheckBackendHandlerImpl) Handle(params http_check.DeleteHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckBackendHandlerImpl) Handle(params http_check.DeleteHTTPCheckBackendParams, principal any) middleware.Responder { g := DeleteHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPCheckDefaultsHandlerImpl) Handle(params http_check.DeleteHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPCheckDefaultsHandlerImpl) Handle(params http_check.DeleteHTTPCheckDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPCheckHandlerImpl(*h) pg := http_check.DeleteHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceHTTPCheckBackendParams, principal any) middleware.Responder { g := ReplaceHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceHTTPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPCheckHandlerImpl(*h) pg := http_check.ReplaceHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckBackendHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPCheckHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPCheckDefaultsHandlerImpl) Handle(params http_check.ReplaceAllHTTPCheckDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPCheckHandlerImpl(*h) pg := http_check.ReplaceAllHTTPCheckBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_http_error_rule_generated.go b/handlers/parent_http_error_rule_generated.go index 40e21d55..0949d140 100644 --- a/handlers/parent_http_error_rule_generated.go +++ b/handlers/parent_http_error_rule_generated.go @@ -56,103 +56,103 @@ type ( ReplaceAllHTTPErrorRuleDefaultsHandlerImpl ReplaceAllHTTPErrorRuleHandlerImpl ) -func (h *CreateHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.CreateHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.CreateHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := CreateHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.CreateHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := GetHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.GetAllHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := GetAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.GetAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.DeleteHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.DeleteHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := DeleteHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.DeleteHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleBackendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleFrontendHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPErrorRuleDefaultsHandlerImpl) Handle(params http_error_rule.ReplaceAllHTTPErrorRuleDefaultsParams, principal any) middleware.Responder { g := ReplaceAllHTTPErrorRuleHandlerImpl(*h) pg := http_error_rule.ReplaceAllHTTPErrorRuleBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) diff --git a/handlers/parent_http_request_rule_generated.go b/handlers/parent_http_request_rule_generated.go index 97e2f6c6..913bebdb 100644 --- a/handlers/parent_http_request_rule_generated.go +++ b/handlers/parent_http_request_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPRequestRuleFrontendHandlerImpl ReplaceAllHTTPRequestRuleHandlerImpl ) -func (h *CreateHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.CreateHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.CreateHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := GetHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.GetAllHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.GetAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.DeleteHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.DeleteHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleBackendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPRequestRuleFrontendHandlerImpl) Handle(params http_request_rule.ReplaceAllHTTPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPRequestRuleHandlerImpl(*h) pg := http_request_rule.ReplaceAllHTTPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_http_response_rule_generated.go b/handlers/parent_http_response_rule_generated.go index 228af231..2798adb3 100644 --- a/handlers/parent_http_response_rule_generated.go +++ b/handlers/parent_http_response_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllHTTPResponseRuleFrontendHandlerImpl ReplaceAllHTTPResponseRuleHandlerImpl ) -func (h *CreateHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := CreateHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.CreateHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := CreateHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.CreateHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := GetHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := GetHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.GetAllHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := GetAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.GetAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.DeleteHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := DeleteHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.DeleteHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleBackendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllHTTPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllHTTPResponseRuleFrontendHandlerImpl) Handle(params http_response_rule.ReplaceAllHTTPResponseRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllHTTPResponseRuleHandlerImpl(*h) pg := http_response_rule.ReplaceAllHTTPResponseRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_log_target_generated.go b/handlers/parent_log_target_generated.go index 3bcb74d0..b2fb408d 100644 --- a/handlers/parent_log_target_generated.go +++ b/handlers/parent_log_target_generated.go @@ -68,175 +68,175 @@ type ( ReplaceAllLogTargetLogForwardHandlerImpl ReplaceAllLogTargetHandlerImpl ) -func (h *CreateLogTargetBackendHandlerImpl) Handle(params log_target.CreateLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetBackendHandlerImpl) Handle(params log_target.CreateLogTargetBackendParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateLogTargetFrontendHandlerImpl) Handle(params log_target.CreateLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetFrontendHandlerImpl) Handle(params log_target.CreateLogTargetFrontendParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *CreateLogTargetDefaultsHandlerImpl) Handle(params log_target.CreateLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetDefaultsHandlerImpl) Handle(params log_target.CreateLogTargetDefaultsParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *CreateLogTargetPeerHandlerImpl) Handle(params log_target.CreateLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetPeerHandlerImpl) Handle(params log_target.CreateLogTargetPeerParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *CreateLogTargetLogForwardHandlerImpl) Handle(params log_target.CreateLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetLogForwardHandlerImpl) Handle(params log_target.CreateLogTargetLogForwardParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) pg := log_target.CreateLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetLogTargetBackendHandlerImpl) Handle(params log_target.GetLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetBackendHandlerImpl) Handle(params log_target.GetLogTargetBackendParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetLogTargetFrontendHandlerImpl) Handle(params log_target.GetLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetFrontendHandlerImpl) Handle(params log_target.GetLogTargetFrontendParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetLogTargetDefaultsHandlerImpl) Handle(params log_target.GetLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetDefaultsHandlerImpl) Handle(params log_target.GetLogTargetDefaultsParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetLogTargetPeerHandlerImpl) Handle(params log_target.GetLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetPeerHandlerImpl) Handle(params log_target.GetLogTargetPeerParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetLogTargetLogForwardHandlerImpl) Handle(params log_target.GetLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetLogForwardHandlerImpl) Handle(params log_target.GetLogTargetLogForwardParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) pg := log_target.GetLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *GetAllLogTargetBackendHandlerImpl) Handle(params log_target.GetAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetBackendHandlerImpl) Handle(params log_target.GetAllLogTargetBackendParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllLogTargetFrontendHandlerImpl) Handle(params log_target.GetAllLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetFrontendHandlerImpl) Handle(params log_target.GetAllLogTargetFrontendParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllLogTargetDefaultsHandlerImpl) Handle(params log_target.GetAllLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetDefaultsHandlerImpl) Handle(params log_target.GetAllLogTargetDefaultsParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *GetAllLogTargetPeerHandlerImpl) Handle(params log_target.GetAllLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetPeerHandlerImpl) Handle(params log_target.GetAllLogTargetPeerParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *GetAllLogTargetLogForwardHandlerImpl) Handle(params log_target.GetAllLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetLogForwardHandlerImpl) Handle(params log_target.GetAllLogTargetLogForwardParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) pg := log_target.GetAllLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *DeleteLogTargetBackendHandlerImpl) Handle(params log_target.DeleteLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetBackendHandlerImpl) Handle(params log_target.DeleteLogTargetBackendParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteLogTargetFrontendHandlerImpl) Handle(params log_target.DeleteLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetFrontendHandlerImpl) Handle(params log_target.DeleteLogTargetFrontendParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteLogTargetDefaultsHandlerImpl) Handle(params log_target.DeleteLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetDefaultsHandlerImpl) Handle(params log_target.DeleteLogTargetDefaultsParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *DeleteLogTargetPeerHandlerImpl) Handle(params log_target.DeleteLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetPeerHandlerImpl) Handle(params log_target.DeleteLogTargetPeerParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *DeleteLogTargetLogForwardHandlerImpl) Handle(params log_target.DeleteLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetLogForwardHandlerImpl) Handle(params log_target.DeleteLogTargetLogForwardParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) pg := log_target.DeleteLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceLogTargetBackendParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceLogTargetFrontendParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceLogTargetDefaultsParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceLogTargetPeerParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceLogTargetLogForwardParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) pg := log_target.ReplaceLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) } -func (h *ReplaceAllLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetBackendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetBackendParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetFrontendHandlerImpl) Handle(params log_target.ReplaceAllLogTargetFrontendParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceAllLogTargetDefaultsParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetDefaultsHandlerImpl) Handle(params log_target.ReplaceAllLogTargetDefaultsParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.DefaultsParentType, pg, principal) } -func (h *ReplaceAllLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceAllLogTargetPeerParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetPeerHandlerImpl) Handle(params log_target.ReplaceAllLogTargetPeerParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.PeerParentType, pg, principal) } -func (h *ReplaceAllLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceAllLogTargetLogForwardParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetLogForwardHandlerImpl) Handle(params log_target.ReplaceAllLogTargetLogForwardParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) pg := log_target.ReplaceAllLogTargetBackendParams(params) return g.Handle(cnconstants.LogForwardParentType, pg, principal) diff --git a/handlers/parent_log_target_global.go b/handlers/parent_log_target_global.go index f0d4a6ed..7ff87fd2 100644 --- a/handlers/parent_log_target_global.go +++ b/handlers/parent_log_target_global.go @@ -44,7 +44,7 @@ type ( ReplaceAllLogTargetGlobalHandlerImpl ReplaceAllLogTargetHandlerImpl ) -func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTargetGlobalParams, principal any) middleware.Responder { g := CreateLogTargetHandlerImpl(*h) paramsG := log_target.CreateLogTargetBackendParams{ Data: params.Data, @@ -58,7 +58,7 @@ func (h *CreateLogTargetGlobalHandlerImpl) Handle(params log_target.CreateLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlobalParams, principal any) middleware.Responder { g := GetLogTargetHandlerImpl(*h) paramsG := log_target.GetLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -69,7 +69,7 @@ func (h *GetLogTargetGlobalHandlerImpl) Handle(params log_target.GetLogTargetGlo return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTargetGlobalParams, principal any) middleware.Responder { g := GetAllLogTargetHandlerImpl(*h) paramsG := log_target.GetAllLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -79,7 +79,7 @@ func (h *GetAllLogTargetGlobalHandlerImpl) Handle(params log_target.GetAllLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTargetGlobalParams, principal any) middleware.Responder { g := DeleteLogTargetHandlerImpl(*h) paramsG := log_target.DeleteLogTargetBackendParams{ HTTPRequest: params.HTTPRequest, @@ -92,7 +92,7 @@ func (h *DeleteLogTargetGlobalHandlerImpl) Handle(params log_target.DeleteLogTar return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogTargetGlobalParams, principal any) middleware.Responder { g := ReplaceLogTargetHandlerImpl(*h) paramsG := log_target.ReplaceLogTargetBackendParams{ Data: params.Data, @@ -106,7 +106,7 @@ func (h *ReplaceLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceLogT return g.Handle(cnconstants.GlobalParentType, paramsG, principal) } -func (h *ReplaceAllLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceAllLogTargetGlobalParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllLogTargetGlobalHandlerImpl) Handle(params log_target.ReplaceAllLogTargetGlobalParams, principal any) middleware.Responder { g := ReplaceAllLogTargetHandlerImpl(*h) paramsG := log_target.ReplaceAllLogTargetBackendParams{ Data: params.Data, diff --git a/handlers/parent_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 2d205af2..7e4d2622 100644 --- a/handlers/parent_tcp_request_rule_generated.go +++ b/handlers/parent_tcp_request_rule_generated.go @@ -50,67 +50,67 @@ type ( ReplaceAllTCPRequestRuleFrontendHandlerImpl ReplaceAllTCPRequestRuleHandlerImpl ) -func (h *CreateTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleBackendParams, principal any) middleware.Responder { g := CreateTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *CreateTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.CreateTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := CreateTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.CreateTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleBackendParams, principal any) middleware.Responder { g := GetTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *GetAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleBackendParams, principal any) middleware.Responder { g := GetAllTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.GetAllTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := GetAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.GetAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *DeleteTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleBackendParams, principal any) middleware.Responder { g := DeleteTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.DeleteTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := DeleteTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.DeleteTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) } -func (h *ReplaceAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleBackendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllTCPRequestRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleFrontendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPRequestRuleFrontendHandlerImpl) Handle(params tcp_request_rule.ReplaceAllTCPRequestRuleFrontendParams, principal any) middleware.Responder { g := ReplaceAllTCPRequestRuleHandlerImpl(*h) pg := tcp_request_rule.ReplaceAllTCPRequestRuleBackendParams(params) return g.Handle(cnconstants.FrontendParentType, pg, principal) diff --git a/handlers/parent_tcp_response_rule_generated.go b/handlers/parent_tcp_response_rule_generated.go index 5cfeaf5d..ad93f4da 100644 --- a/handlers/parent_tcp_response_rule_generated.go +++ b/handlers/parent_tcp_response_rule_generated.go @@ -44,32 +44,32 @@ type ( ReplaceAllTCPResponseRuleBackendHandlerImpl ReplaceAllTCPResponseRuleHandlerImpl ) -func (h *CreateTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal any) middleware.Responder { g := CreateTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetTCPResponseRuleBackendParams, principal any) middleware.Responder { g := GetTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *GetAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal any) middleware.Responder { g := GetAllTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *DeleteTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal any) middleware.Responder { g := DeleteTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } -func (h *ReplaceAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPResponseRuleBackendHandlerImpl) Handle(params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal any) middleware.Responder { g := ReplaceAllTCPResponseRuleHandlerImpl(*h) return g.Handle(cnconstants.BackendParentType, params, principal) } diff --git a/handlers/peer.go b/handlers/peer.go index ca6322c5..de53734c 100644 --- a/handlers/peer.go +++ b/handlers/peer.go @@ -54,7 +54,7 @@ type ReplacePeerHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreatePeerHandlerImpl) Handle(params peer.CreatePeerParams, principal interface{}) middleware.Responder { +func (h *CreatePeerHandlerImpl) Handle(params peer.CreatePeerParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreatePeerHandlerImpl) createPeerSection(params peer.CreatePeerParams, } // Handle executing the request and returning a response -func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal interface{}) middleware.Responder { +func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -154,7 +154,7 @@ func (h *DeletePeerHandlerImpl) Handle(params peer.DeletePeerParams, principal i } // Handle executing the request and returning a response -func (h *GetPeerHandlerImpl) Handle(params peer.GetPeerSectionParams, principal interface{}) middleware.Responder { +func (h *GetPeerHandlerImpl) Handle(params peer.GetPeerSectionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -180,7 +180,7 @@ func (h *GetPeerHandlerImpl) getPeerSection(params peer.GetPeerSectionParams, t } // Handle executing the request and returning a response -func (h *GetPeersHandlerImpl) Handle(params peer.GetPeerSectionsParams, principal interface{}) middleware.Responder { +func (h *GetPeersHandlerImpl) Handle(params peer.GetPeerSectionsParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/handlers/peer_entry.go b/handlers/peer_entry.go index 245cfaf1..ec00a3c9 100644 --- a/handlers/peer_entry.go +++ b/handlers/peer_entry.go @@ -54,7 +54,7 @@ type ReplacePeerEntryHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryParams, principal interface{}) middleware.Responder { +func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreatePeerEntryHandlerImpl) Handle(params peer_entry.CreatePeerEntryPar } // Handle executing the request and returning a response -func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryParams, principal interface{}) middleware.Responder { +func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeletePeerEntryHandlerImpl) Handle(params peer_entry.DeletePeerEntryPar } // Handle executing the request and returning a response -func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, principal interface{}) middleware.Responder { +func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -169,7 +169,7 @@ func (h *GetPeerEntryHandlerImpl) Handle(params peer_entry.GetPeerEntryParams, p } // Handle executing the request and returning a response -func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParams, principal interface{}) middleware.Responder { +func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -190,7 +190,7 @@ func (h *GetPeerEntriesHandlerImpl) Handle(params peer_entry.GetPeerEntriesParam } // Handle executing the request and returning a response -func (h *ReplacePeerEntryHandlerImpl) Handle(params peer_entry.ReplacePeerEntryParams, principal interface{}) middleware.Responder { +func (h *ReplacePeerEntryHandlerImpl) Handle(params peer_entry.ReplacePeerEntryParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/program.go b/handlers/program.go index f94eb135..915db1a4 100644 --- a/handlers/program.go +++ b/handlers/program.go @@ -28,7 +28,7 @@ type DeleteProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramParams, _ interface{}) middleware.Responder { +func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramParams, _ any) middleware.Responder { var t string var v int64 @@ -83,7 +83,7 @@ type CreateProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramParams, _ interface{}) middleware.Responder { +func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramParams, _ any) middleware.Responder { var t string var v int64 @@ -137,7 +137,7 @@ type GetProgramHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetProgramHandlerImpl) Handle(params process_manager.GetProgramParams, _ interface{}) middleware.Responder { +func (g GetProgramHandlerImpl) Handle(params process_manager.GetProgramParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -165,7 +165,7 @@ type GetProgramsHandlerImpl struct { Client client_native.HAProxyClient } -func (g GetProgramsHandlerImpl) Handle(params process_manager.GetProgramsParams, _ interface{}) middleware.Responder { +func (g GetProgramsHandlerImpl) Handle(params process_manager.GetProgramsParams, _ any) middleware.Responder { var t string if params.TransactionID != nil { @@ -194,7 +194,7 @@ type ReplaceProgramHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramParams, _ interface{}) middleware.Responder { +func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramParams, _ any) middleware.Responder { var t string var v int64 diff --git a/handlers/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 e2a97912..8b8c71f0 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -54,7 +54,7 @@ type DeleteRuntimeServerHandlerImpl struct { } // Handle executing the request and returning a response -func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParams, principal any) middleware.Responder { rn, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -82,7 +82,7 @@ func (h *GetRuntimeServerHandlerImpl) Handle(params server.GetRuntimeServerParam } // Handle executing the request and returning a response -func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -102,7 +102,7 @@ func (h *GetAllRuntimeServerHandlerImpl) Handle(params server.GetAllRuntimeServe } // Handle executing the request and returning a response -func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer // Adds a new server dynamically without modifying the configuration. // Warning: this only works if you have not defined a `default_server` in the defaults // or in the current `backend` section. -func (h *AddRuntimeServerHandlerImpl) Handle(params server.AddRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *AddRuntimeServerHandlerImpl) Handle(params server.AddRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) @@ -194,7 +194,7 @@ func isNotFoundError(err error) bool { } // Deletes a server from a backend immediately, without waiting for connections to drain. -func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServerParams, principal interface{}) middleware.Responder { +func (h *DeleteRuntimeServerHandlerImpl) Handle(params server.DeleteRuntimeServerParams, principal any) middleware.Responder { runtime, err := h.Client.Runtime() if err != nil { e := misc.HandleError(err) diff --git a/handlers/server.go b/handlers/server.go index e38e80c2..cb34ce8f 100644 --- a/handlers/server.go +++ b/handlers/server.go @@ -73,7 +73,7 @@ func serverTypeParams(backend *string, parentType *string, parentName *string) ( } // Handle executing the request and returning a response -func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.CreateServerBackendParams, principal interface{}) middleware.Responder { +func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.CreateServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -160,7 +160,7 @@ func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.DeleteServerBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.DeleteServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -214,7 +214,7 @@ func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetServerBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -241,7 +241,7 @@ func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, param } // Handle executing the request and returning a response -func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetAllServerBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.GetAllServerBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -271,7 +271,7 @@ func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa } // Handle executing the request and returning a response -func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.ReplaceServerBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, params server.ReplaceServerBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/server_switching_rule.go b/handlers/server_switching_rule.go index 5d47a0c6..036ae378 100644 --- a/handlers/server_switching_rule.go +++ b/handlers/server_switching_rule.go @@ -59,7 +59,7 @@ type ReplaceServerSwitchingRulesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.CreateServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.CreateServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -107,7 +107,7 @@ func (h *CreateServerSwitchingRuleHandlerImpl) Handle(params server_switching_ru } // Handle executing the request and returning a response -func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.DeleteServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.DeleteServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -155,7 +155,7 @@ func (h *DeleteServerSwitchingRuleHandlerImpl) Handle(params server_switching_ru } // Handle executing the request and returning a response -func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRuleParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule. } // Handle executing the request and returning a response -func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.GetServerSwitchingRulesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule } // Handle executing the request and returning a response -func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRuleParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRuleParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -248,7 +248,7 @@ func (h *ReplaceServerSwitchingRuleHandlerImpl) Handle(params server_switching_r } // Handle executing the request and returning a response -func (h *ReplaceServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRulesParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerSwitchingRulesHandlerImpl) Handle(params server_switching_rule.ReplaceServerSwitchingRulesParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/server_template.go b/handlers/server_template.go index 0cfd39b4..84f9ec3c 100644 --- a/handlers/server_template.go +++ b/handlers/server_template.go @@ -54,7 +54,7 @@ type ReplaceServerTemplateHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateServerTemplateParams, principal interface{}) middleware.Responder { +func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateSe } // Handle executing the request and returning a response -func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteServerTemplateParams, principal interface{}) middleware.Responder { +func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -149,7 +149,7 @@ func (h *DeleteServerTemplateHandlerImpl) Handle(params server_template.DeleteSe } // Handle executing the request and returning a response -func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTemplateParams, principal interface{}) middleware.Responder { +func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTemplateParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -170,7 +170,7 @@ func (h *GetServerTemplateHandlerImpl) Handle(params server_template.GetServerTe } // Handle executing the request and returning a response -func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerTemplatesParams, principal interface{}) middleware.Responder { +func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerTemplatesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -194,7 +194,7 @@ func (h *GetServerTemplatesHandlerImpl) Handle(params server_template.GetServerT } // Handle executing the request and returning a response -func (h *ReplaceServerTemplateHandlerImpl) Handle(params server_template.ReplaceServerTemplateParams, principal interface{}) middleware.Responder { +func (h *ReplaceServerTemplateHandlerImpl) Handle(params server_template.ReplaceServerTemplateParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/site.go b/handlers/site.go index 44764378..031d1f59 100644 --- a/handlers/site.go +++ b/handlers/site.go @@ -54,7 +54,7 @@ type ReplaceSiteHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal interface{}) middleware.Responder { +func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -101,7 +101,7 @@ func (h *CreateSiteHandlerImpl) Handle(params sites.CreateSiteParams, principal } // Handle executing the request and returning a response -func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal interface{}) middleware.Responder { +func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -148,7 +148,7 @@ func (h *DeleteSiteHandlerImpl) Handle(params sites.DeleteSiteParams, principal } // Handle executing the request and returning a response -func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal interface{}) middleware.Responder { +func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -169,7 +169,7 @@ func (h *GetSiteHandlerImpl) Handle(params sites.GetSiteParams, principal interf } // Handle executing the request and returning a response -func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal interface{}) middleware.Responder { +func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -193,7 +193,7 @@ func (h *GetSitesHandlerImpl) Handle(params sites.GetSitesParams, principal inte } // Handle executing the request and returning a response -func (h *ReplaceSiteHandlerImpl) Handle(params sites.ReplaceSiteParams, principal interface{}) middleware.Responder { +func (h *ReplaceSiteHandlerImpl) Handle(params sites.ReplaceSiteParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/spoe.go b/handlers/spoe.go index cc2fbd03..970d6ad5 100644 --- a/handlers/spoe.go +++ b/handlers/spoe.go @@ -29,7 +29,7 @@ type SpoeCreateSpoeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeHandlerImpl) Handle(params spoe.CreateSpoeParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeHandlerImpl) Handle(params spoe.CreateSpoeParams, principal any) middleware.Responder { file, ok := params.FileUpload.(*runtime.File) if !ok { return spoe.NewCreateSpoeBadRequest() @@ -54,7 +54,7 @@ type SpoeDeleteSpoeFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeFileHandlerImpl) Handle(params spoe.DeleteSpoeFileParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeFileHandlerImpl) Handle(params spoe.DeleteSpoeFileParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -75,7 +75,7 @@ type SpoeGetAllSpoeFilesHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeFilesHandlerImpl) Handle(params spoe.GetAllSpoeFilesParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeFilesHandlerImpl) Handle(params spoe.GetAllSpoeFilesParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetOneSpoeFileHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetOneSpoeFileHandlerImpl) Handle(params spoe.GetOneSpoeFileParams, principal interface{}) middleware.Responder { +func (h *SpoeGetOneSpoeFileHandlerImpl) Handle(params spoe.GetOneSpoeFileParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_agent.go b/handlers/spoe_agent.go index b2c21f2c..1cbe03f4 100644 --- a/handlers/spoe_agent.go +++ b/handlers/spoe_agent.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeAgentHandlerImpl) Handle(params spoe.CreateSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeAgentHandlerImpl) Handle(params spoe.CreateSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeAgentHandlerImpl) Handle(params spoe.DeleteSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeAgentHandlerImpl) Handle(params spoe.DeleteSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -94,7 +94,7 @@ type SpoeGetAllSpoeAgentHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeAgentHandlerImpl) Handle(params spoe.GetAllSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeAgentHandlerImpl) Handle(params spoe.GetAllSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -123,7 +123,7 @@ type SpoeGetSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeAgentHandlerImpl) Handle(params spoe.GetSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeAgentHandlerImpl) Handle(params spoe.GetSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ type SpoeReplaceSpoeAgentHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeAgentHandlerImpl) Handle(params spoe.ReplaceSpoeAgentParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeAgentHandlerImpl) Handle(params spoe.ReplaceSpoeAgentParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_group.go b/handlers/spoe_group.go index 10738ebb..32191a11 100644 --- a/handlers/spoe_group.go +++ b/handlers/spoe_group.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeGroupHandlerImpl) Handle(params spoe.CreateSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeGroupHandlerImpl) Handle(params spoe.CreateSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -60,7 +60,7 @@ type SpoeDeleteSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeGroupHandlerImpl) Handle(params spoe.DeleteSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeGroupHandlerImpl) Handle(params spoe.DeleteSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -94,7 +94,7 @@ type SpoeGetAllSpoeGroupHandlerImpl struct { } // SpoeGetAllSpoeGroupHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeGroupHandlerImpl) Handle(params spoe.GetAllSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeGroupHandlerImpl) Handle(params spoe.GetAllSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -123,7 +123,7 @@ type SpoeGetSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeGroupHandlerImpl) Handle(params spoe.GetSpoeGroupParams, c interface{}) middleware.Responder { +func (h *SpoeGetSpoeGroupHandlerImpl) Handle(params spoe.GetSpoeGroupParams, c any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -155,7 +155,7 @@ type SpoeReplaceSpoeGroupHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeGroupHandlerImpl) Handle(params spoe.ReplaceSpoeGroupParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeGroupHandlerImpl) Handle(params spoe.ReplaceSpoeGroupParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_message.go b/handlers/spoe_message.go index cfd9aa67..3d97c542 100644 --- a/handlers/spoe_message.go +++ b/handlers/spoe_message.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeMessageHandlerImpl) Handle(params spoe.CreateSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeMessageHandlerImpl) Handle(params spoe.CreateSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeMessageHandlerImpl) Handle(params spoe.DeleteSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeMessageHandlerImpl) Handle(params spoe.DeleteSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetAllSpoeMessageHandlerImpl struct { } // SpoeGetAllSpoeMessageHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeMessageHandlerImpl) Handle(params spoe.GetAllSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeMessageHandlerImpl) Handle(params spoe.GetAllSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ type SpoeGetSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeMessageHandlerImpl) Handle(params spoe.GetSpoeMessageParams, c interface{}) middleware.Responder { +func (h *SpoeGetSpoeMessageHandlerImpl) Handle(params spoe.GetSpoeMessageParams, c any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -156,7 +156,7 @@ type SpoeReplaceSpoeMessageHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeReplaceSpoeMessageHandlerImpl) Handle(params spoe.ReplaceSpoeMessageParams, principal interface{}) middleware.Responder { +func (h *SpoeReplaceSpoeMessageHandlerImpl) Handle(params spoe.ReplaceSpoeMessageParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_scope.go b/handlers/spoe_scope.go index caf88b16..0c124ae3 100644 --- a/handlers/spoe_scope.go +++ b/handlers/spoe_scope.go @@ -28,7 +28,7 @@ type SpoeCreateSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeCreateSpoeScopeHandlerImpl) Handle(params spoe.CreateSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeCreateSpoeScopeHandlerImpl) Handle(params spoe.CreateSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -61,7 +61,7 @@ type SpoeDeleteSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeDeleteSpoeScopeHandlerImpl) Handle(params spoe.DeleteSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeDeleteSpoeScopeHandlerImpl) Handle(params spoe.DeleteSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -95,7 +95,7 @@ type SpoeGetAllSpoeScopeHandlerImpl struct { } // SpoeGetAllSpoeFilesHandlerImpl implementation of the SpoeGetAllSpoeFilesHandler -func (h *SpoeGetAllSpoeScopeHandlerImpl) Handle(params spoe.GetAllSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeGetAllSpoeScopeHandlerImpl) Handle(params spoe.GetAllSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -124,7 +124,7 @@ type SpoeGetSpoeScopeHandlerImpl struct { Client client_native.HAProxyClient } -func (h *SpoeGetSpoeScopeHandlerImpl) Handle(params spoe.GetSpoeScopeParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeScopeHandlerImpl) Handle(params spoe.GetSpoeScopeParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_transaction.go b/handlers/spoe_transaction.go index 20385292..d545b7f0 100644 --- a/handlers/spoe_transaction.go +++ b/handlers/spoe_transaction.go @@ -31,7 +31,7 @@ type SpoeTransactionsStartSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsStartSpoeTransactionHandlerImpl) Handle(params spoe_transactions.StartSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsStartSpoeTransactionHandlerImpl) Handle(params spoe_transactions.StartSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -62,7 +62,7 @@ type SpoeTransactionsDeleteSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsDeleteSpoeTransactionHandlerImpl) Handle(params spoe_transactions.DeleteSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsDeleteSpoeTransactionHandlerImpl) Handle(params spoe_transactions.DeleteSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -88,7 +88,7 @@ type SpoeTransactionsGetSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsGetSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsGetSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -119,7 +119,7 @@ type SpoeTransactionsGetAllSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetAllSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_transactions.GetAllSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) @@ -161,7 +161,7 @@ type SpoeTransactionsCommitSpoeTransactionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeTransactionsCommitSpoeTransactionHandlerImpl) Handle(params spoe_transactions.CommitSpoeTransactionParams, principal interface{}) middleware.Responder { +func (h *SpoeTransactionsCommitSpoeTransactionHandlerImpl) Handle(params spoe_transactions.CommitSpoeTransactionParams, principal any) middleware.Responder { spoeStorage, err := h.Client.Spoe() if err != nil { e := misc.HandleError(err) diff --git a/handlers/spoe_version.go b/handlers/spoe_version.go index 7a43858e..8847da2d 100644 --- a/handlers/spoe_version.go +++ b/handlers/spoe_version.go @@ -29,7 +29,7 @@ type SpoeGetSpoeConfigurationVersionHandlerImpl struct { } // Handle executing the request and returning a response -func (h *SpoeGetSpoeConfigurationVersionHandlerImpl) Handle(params spoe.GetSpoeConfigurationVersionParams, principal interface{}) middleware.Responder { +func (h *SpoeGetSpoeConfigurationVersionHandlerImpl) Handle(params spoe.GetSpoeConfigurationVersionParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index 03801a73..f1e8e56d 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -38,7 +38,7 @@ type StorageGetAllStorageSSLCertificatesHandlerImpl struct { } // Handle executing the request and returning a response -func (h *StorageGetAllStorageSSLCertificatesHandlerImpl) Handle(params storage.GetAllStorageSSLCertificatesParams, principal interface{}) middleware.Responder { +func (h *StorageGetAllStorageSSLCertificatesHandlerImpl) Handle(params storage.GetAllStorageSSLCertificatesParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -67,7 +67,7 @@ type StorageGetOneStorageSSLCertificateHandlerImpl struct { Client client_native.HAProxyClient } -func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.GetOneStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.GetOneStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -97,6 +97,8 @@ func (h *StorageGetOneStorageSSLCertificateHandlerImpl) Handle(params storage.Ge Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, } return storage.NewGetOneStorageSSLCertificateOK().WithPayload(retf) } @@ -107,7 +109,7 @@ type StorageDeleteStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageDeleteStorageSSLCertificateHandlerImpl) Handle(params storage.DeleteStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageDeleteStorageSSLCertificateHandlerImpl) Handle(params storage.DeleteStorageSSLCertificateParams, principal any) middleware.Responder { configuration, err := h.Client.Configuration() if err != nil { e := misc.HandleError(err) @@ -181,7 +183,7 @@ type StorageReplaceStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.ReplaceStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.ReplaceStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -208,6 +210,8 @@ func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.R Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, } skipReload := false @@ -242,7 +246,7 @@ type StorageCreateStorageSSLCertificateHandlerImpl struct { ReloadAgent haproxy.IReloadAgent } -func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.CreateStorageSSLCertificateParams, principal interface{}) middleware.Responder { +func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.CreateStorageSSLCertificateParams, principal any) middleware.Responder { sslStorage, err := h.Client.SSLCertStorage() if err != nil { e := misc.HandleError(err) @@ -273,6 +277,13 @@ func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.Cr Issuers: info.Issuers, Domains: info.DNS, IPAddresses: info.IPs, + Subject: info.Subject, + Serial: info.Serial, + } + + skipReload := false + if params.SkipReload != nil { + skipReload = *params.SkipReload } forceReload := false @@ -280,6 +291,10 @@ func (h *StorageCreateStorageSSLCertificateHandlerImpl) Handle(params storage.Cr forceReload = *params.ForceReload } + if skipReload { + return storage.NewCreateStorageSSLCertificateCreated().WithPayload(retf) + } + if forceReload { err := h.ReloadAgent.ForceReload() if err != 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 ce058634..54bcf94e 100644 --- a/handlers/tcp_response_rule.go +++ b/handlers/tcp_response_rule.go @@ -61,7 +61,7 @@ type ReplaceAllTCPResponseRuleHandlerImpl struct { } // Handle executing the request and returning a response -func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.CreateTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -109,7 +109,7 @@ func (h *CreateTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.DeleteTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -156,7 +156,7 @@ func (h *DeleteTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -176,7 +176,7 @@ func (h *GetTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentTy } // Handle executing the request and returning a response -func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.GetAllTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" if params.TransactionID != nil { t = *params.TransactionID @@ -200,7 +200,7 @@ func (h *GetAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParen } // Handle executing the request and returning a response -func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { @@ -247,7 +247,7 @@ func (h *ReplaceTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnPare return tcp_response_rule.NewReplaceTCPResponseRuleBackendAccepted().WithPayload(params.Data) } -func (h *ReplaceAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal interface{}) middleware.Responder { +func (h *ReplaceAllTCPResponseRuleHandlerImpl) Handle(parentType cnconstants.CnParentType, params tcp_response_rule.ReplaceAllTCPResponseRuleBackendParams, principal any) middleware.Responder { t := "" v := int64(0) if params.TransactionID != nil { diff --git a/handlers/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/haproxy/reload_agent_test.go b/haproxy/reload_agent_test.go index 9dfd6c42..d3ac7658 100644 --- a/haproxy/reload_agent_test.go +++ b/haproxy/reload_agent_test.go @@ -26,8 +26,8 @@ import ( ) func TestReloadAgentDoesntMissReloads(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - f, err := os.CreateTemp("", "config.cfg") + ctx, cancel := context.WithCancel(t.Context()) + f, err := os.CreateTemp(t.TempDir(), "config.cfg") require.NoError(t, err) assert.NotNil(t, f) t.Cleanup(func() { 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/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/misc/misc.go b/misc/misc.go index 2b23db0b..d0ff5eab 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -117,17 +117,17 @@ func HandleContainerGetError(err error) *models.Error { // DiscoverChildPaths return children models.Endpoints given path func DiscoverChildPaths(path string, spec json.RawMessage) (models.Endpoints, error) { - var m map[string]interface{} + var m map[string]any json := jsoniter.ConfigCompatibleWithStandardLibrary err := json.Unmarshal(spec, &m) if err != nil { return nil, err } es := make(models.Endpoints, 0, 1) - paths := m["paths"].(map[string]interface{}) + paths := m["paths"].(map[string]any) for key, value := range paths { - v := value.(map[string]interface{}) - if g, ok := v["get"].(map[string]interface{}); ok { + v := value.(map[string]any) + if g, ok := v["get"].(map[string]any); ok { title := "" if titleInterface, ok := g["summary"]; ok && titleInterface != nil { title = titleInterface.(string) diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index e30a11dc..7c68af18 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -81,6 +81,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" @@ -95,7 +96,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 @@ -1021,8 +1021,8 @@ func NewDataPlaneAPI(spec *loads.Document) *DataPlaneAPI { StorageGetOneStorageSSLCertificateHandler: storage.GetOneStorageSSLCertificateHandlerFunc(func(params storage.GetOneStorageSSLCertificateParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation storage.GetOneStorageSSLCertificate has not yet been implemented") }), - Version3GetOpenapiv3SpecificationHandler: version3.GetOpenapiv3SpecificationHandlerFunc(func(params version3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation version3.GetOpenapiv3Specification has not yet been implemented") + SpecificationOpenapiv3GetOpenapiv3SpecificationHandler: specification_openapiv3.GetOpenapiv3SpecificationHandlerFunc(func(params specification_openapiv3.GetOpenapiv3SpecificationParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation specification_openapiv3.GetOpenapiv3Specification has not yet been implemented") }), PeerEntryGetPeerEntriesHandler: peer_entry.GetPeerEntriesHandlerFunc(func(params peer_entry.GetPeerEntriesParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation peer_entry.GetPeerEntries has not yet been implemented") @@ -2191,8 +2191,8 @@ type DataPlaneAPI struct { StorageGetOneStorageMapHandler storage.GetOneStorageMapHandler // StorageGetOneStorageSSLCertificateHandler sets the operation handler for the get one storage s s l certificate operation StorageGetOneStorageSSLCertificateHandler storage.GetOneStorageSSLCertificateHandler - // Version3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation - Version3GetOpenapiv3SpecificationHandler version3.GetOpenapiv3SpecificationHandler + // SpecificationOpenapiv3GetOpenapiv3SpecificationHandler sets the operation handler for the get openapiv3 specification operation + SpecificationOpenapiv3GetOpenapiv3SpecificationHandler specification_openapiv3.GetOpenapiv3SpecificationHandler // PeerEntryGetPeerEntriesHandler sets the operation handler for the get peer entries operation PeerEntryGetPeerEntriesHandler peer_entry.GetPeerEntriesHandler // PeerEntryGetPeerEntryHandler sets the operation handler for the get peer entry operation @@ -3519,8 +3519,8 @@ func (o *DataPlaneAPI) Validate() error { if o.StorageGetOneStorageSSLCertificateHandler == nil { unregistered = append(unregistered, "storage.GetOneStorageSSLCertificateHandler") } - if o.Version3GetOpenapiv3SpecificationHandler == nil { - unregistered = append(unregistered, "version3.GetOpenapiv3SpecificationHandler") + if o.SpecificationOpenapiv3GetOpenapiv3SpecificationHandler == nil { + unregistered = append(unregistered, "specification_openapiv3.GetOpenapiv3SpecificationHandler") } if o.PeerEntryGetPeerEntriesHandler == nil { unregistered = append(unregistered, "peer_entry.GetPeerEntriesHandler") @@ -5329,7 +5329,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/operations/storage/create_storage_s_s_l_certificate_parameters.go b/operations/storage/create_storage_s_s_l_certificate_parameters.go index edb4b7f2..b552602d 100644 --- a/operations/storage/create_storage_s_s_l_certificate_parameters.go +++ b/operations/storage/create_storage_s_s_l_certificate_parameters.go @@ -47,10 +47,13 @@ func NewCreateStorageSSLCertificateParams() CreateStorageSSLCertificateParams { // initialize parameters with default values forceReloadDefault = bool(false) + skipReloadDefault = bool(false) ) return CreateStorageSSLCertificateParams{ ForceReload: &forceReloadDefault, + + SkipReload: &skipReloadDefault, } } @@ -72,6 +75,11 @@ type CreateStorageSSLCertificateParams struct { Default: false */ ForceReload *bool + /*If set, no reload will be initiated after update + In: query + Default: false + */ + SkipReload *bool } // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface @@ -108,6 +116,11 @@ func (o *CreateStorageSSLCertificateParams) BindRequest(r *http.Request, route * if err := o.bindForceReload(qForceReload, qhkForceReload, route.Formats); err != nil { res = append(res, err) } + + qSkipReload, qhkSkipReload, _ := qs.GetOK("skip_reload") + if err := o.bindSkipReload(qSkipReload, qhkSkipReload, route.Formats); err != nil { + res = append(res, err) + } if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -144,3 +157,27 @@ func (o *CreateStorageSSLCertificateParams) bindForceReload(rawData []string, ha return nil } + +// bindSkipReload binds and validates parameter SkipReload from query. +func (o *CreateStorageSSLCertificateParams) bindSkipReload(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewCreateStorageSSLCertificateParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("skip_reload", "query", "bool", raw) + } + o.SkipReload = &value + + return nil +} diff --git a/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go b/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go index 88d3a121..63a14ad2 100644 --- a/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go +++ b/operations/storage/create_storage_s_s_l_certificate_urlbuilder.go @@ -31,6 +31,7 @@ import ( // CreateStorageSSLCertificateURL generates an URL for the create storage s s l certificate operation type CreateStorageSSLCertificateURL struct { ForceReload *bool + SkipReload *bool _basePath string // avoid unkeyed usage @@ -74,6 +75,14 @@ func (o *CreateStorageSSLCertificateURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var skipReloadQ string + if o.SkipReload != nil { + skipReloadQ = swag.FormatBool(*o.SkipReload) + } + if skipReloadQ != "" { + qs.Set("skip_reload", skipReloadQ) + } + _result.RawQuery = qs.Encode() return &_result, nil 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 { 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 }