From 89d271276e701b96f9784cf8e923c29c880eb510 Mon Sep 17 00:00:00 2001 From: nginx-bot <68849795+nginx-bot@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:58:33 -0800 Subject: [PATCH] [cherry-pick] chore(deps): bump the go group across 1 directory with 2 updates (#6988) chore(deps): bump the go group across 1 directory with 2 updates (#6978) Bumps the go group with 2 updates in the / directory: [github.com/gruntwork-io/terratest](https://github.com/gruntwork-io/terratest) and [k8s.io/code-generator](https://github.com/kubernetes/code-generator). Updates `github.com/gruntwork-io/terratest` from 0.47.2 to 0.48.0 - [Release notes](https://github.com/gruntwork-io/terratest/releases) - [Commits](https://github.com/gruntwork-io/terratest/compare/v0.47.2...v0.48.0) Updates `k8s.io/code-generator` from 0.31.3 to 0.32.0 - [Commits](https://github.com/kubernetes/code-generator/compare/v0.31.3...v0.32.0) --- updated-dependencies: - dependency-name: github.com/gruntwork-io/terratest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go - dependency-name: k8s.io/code-generator dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 52 +++++-- go.sum | 116 ++++++++++---- pkg/client/clientset/versioned/clientset.go | 4 +- .../configuration/v1/configuration_client.go | 10 +- .../v1/fake/fake_configuration_client.go | 10 +- .../v1/fake/fake_globalconfiguration.go | 128 +++------------- .../configuration/v1/fake/fake_policy.go | 137 +++-------------- .../v1/fake/fake_transportserver.go | 139 +++-------------- .../v1/fake/fake_virtualserver.go | 139 +++-------------- .../v1/fake/fake_virtualserverroute.go | 141 +++--------------- .../configuration/v1/globalconfiguration.go | 23 +-- .../typed/configuration/v1/policy.go | 25 ++-- .../typed/configuration/v1/transportserver.go | 25 ++-- .../typed/configuration/v1/virtualserver.go | 25 ++-- .../configuration/v1/virtualserverroute.go | 25 ++-- .../versioned/typed/dos/v1beta1/dos_client.go | 10 +- .../typed/dos/v1beta1/dosprotectedresource.go | 23 +-- .../typed/dos/v1beta1/fake/fake_dos_client.go | 2 +- .../v1beta1/fake/fake_dosprotectedresource.go | 128 +++------------- .../typed/externaldns/v1/dnsendpoint.go | 25 ++-- .../externaldns/v1/externaldns_client.go | 10 +- .../externaldns/v1/fake/fake_dnsendpoint.go | 137 +++-------------- .../v1/fake/fake_externaldns_client.go | 2 +- .../configuration/v1/globalconfiguration.go | 16 +- .../configuration/v1/policy.go | 16 +- .../configuration/v1/transportserver.go | 16 +- .../configuration/v1/virtualserver.go | 16 +- .../configuration/v1/virtualserverroute.go | 16 +- .../dos/v1beta1/dosprotectedresource.go | 16 +- .../externaldns/v1/dnsendpoint.go | 16 +- .../informers/externalversions/generic.go | 2 +- .../configuration/v1/globalconfiguration.go | 22 +-- pkg/client/listers/configuration/v1/policy.go | 22 +-- .../configuration/v1/transportserver.go | 22 +-- .../listers/configuration/v1/virtualserver.go | 22 +-- .../configuration/v1/virtualserverroute.go | 22 +-- .../dos/v1beta1/dosprotectedresource.go | 22 +-- .../listers/externaldns/v1/dnsendpoint.go | 22 +-- 38 files changed, 519 insertions(+), 1085 deletions(-) diff --git a/go.mod b/go.mod index 60ef607ba6..3278f26d5a 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/gkampitakis/go-snaps v0.5.7 github.com/golang-jwt/jwt/v4 v4.5.1 github.com/google/go-cmp v0.6.0 - github.com/gruntwork-io/terratest v0.47.2 + github.com/gruntwork-io/terratest v0.48.0 github.com/jinzhu/copier v0.4.0 github.com/nginxinc/nginx-plus-go-client/v2 v2.1.0 github.com/nginxinc/nginx-prometheus-exporter v1.4.0 @@ -25,24 +25,47 @@ require ( k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 - k8s.io/code-generator v0.31.3 + k8s.io/code-generator v0.32.0 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 sigs.k8s.io/controller-tools v0.16.5 ) require ( + filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/aws/aws-sdk-go-v2 v1.32.6 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 // indirect + github.com/aws/aws-sdk-go-v2/service/acm v1.30.6 // indirect + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0 // indirect + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 // indirect + github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0 // indirect + github.com/aws/aws-sdk-go-v2/service/rds v1.91.0 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 // indirect + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sns v1.33.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect @@ -54,7 +77,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/fatih/color v1.18.0 // indirect @@ -73,7 +96,7 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-sql-driver/mysql v1.4.1 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/gobuffalo/flect v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -95,6 +118,10 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/homeport/dyff v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.1 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -119,7 +146,7 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/pquerna/otp v1.2.0 // indirect + github.com/pquerna/otp v1.4.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect @@ -133,7 +160,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/urfave/cli v1.22.2 // indirect + github.com/urfave/cli v1.22.16 // indirect github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/errs v1.3.0 // indirect @@ -151,15 +178,14 @@ require ( go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.31.0 // indirect golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/time v0.8.0 // indirect golang.org/x/tools v0.26.0 // indirect - google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect google.golang.org/grpc v1.67.1 // indirect @@ -171,7 +197,7 @@ require ( k8s.io/apiextensions-apiserver v0.31.2 // indirect k8s.io/apiserver v0.32.0 // indirect k8s.io/component-base v0.32.0 // indirect - k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 // indirect + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect diff --git a/go.sum b/go.sum index 82408ebd64..e3e8079168 100644 --- a/go.sum +++ b/go.sum @@ -1,36 +1,82 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI= github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo= -github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= github.com/aws/aws-sdk-go-v2 v1.32.6/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41 h1:hqcxMc2g/MwwnRMod9n6Bd+t+9Nf7d5qRg7RaXKPd6o= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41/go.mod h1:d1eH0VrttvPmrCraU68LOyNdu26zFxQFjrVSb5vdhog= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 h1:JX70yGKLj25+lMC5Yyh8wBtvB01GDilyRuJvXJ4piD0= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24/go.mod h1:+Ln60j9SUTD0LEwnhEB0Xhg61DHqplBrbZpLgyjoEHg= +github.com/aws/aws-sdk-go-v2/service/acm v1.30.6 h1:fDg0RlN30Xf/yYzEUL/WXqhmgFsjVb/I3230oCfyI5w= +github.com/aws/aws-sdk-go-v2/service/acm v1.30.6/go.mod h1:zRR6jE3v/TcbfO8C2P+H0Z+kShiKKVaVyoIl8NQRjyg= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0 h1:1KzQVZi7OTixxaVJ8fWaJAUBjme+iQ3zBOCZhE4RgxQ= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0/go.mod h1:I1+/2m+IhnK5qEbhS3CrzjeiVloo9sItE/2K+so0fkU= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0 h1:OREVd94+oXW5a+3SSUAo4K0L5ci8cucCLu+PSiek8OU= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0/go.mod h1:Qbr4yfpNqVNl69l/GEDK+8wxLf/vHi0ChoiSDzD7thU= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 h1:vucMirlM6D+RDU8ncKaSZ/5dGrXNajozVwpmWNPn2gQ= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1/go.mod h1:fceORfs010mNxZbQhfqUjUeHlTwANmIT4mvHamuUaUg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0 h1:RhSoBFT5/8tTmIseJUXM6INTXTQDF8+0oyxWBnozIms= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0/go.mod h1:mzj8EEjIHSN2oZRXiw1Dd+uB4HZTl7hC8nBzX9IZMWw= +github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6 h1:zg+3FGHA0PBs0KM25qE/rOf2o5zsjNa1g/Qq83+SDI0= +github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6/go.mod h1:ZSq54Z9SIsOTf1Efwgw1msilSs4XVEfVQiP9nYVnKpM= +github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0 h1:7/vgFWplkusJN/m+3QOa+W9FNRqa8ujMPNmdufRaJpg= +github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0/go.mod h1:dPTOvmjJQ1T7Q+2+Xs2KSPrMvx+p0rpyV+HsQVnUK4o= +github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 h1:hfkzDZHBp9jAT4zcd5mtqckpU4E3Ax0LQaEWWk1VgN8= +github.com/aws/aws-sdk-go-v2/service/iam v1.38.1/go.mod h1:u36ahDtZcQHGmVm/r+0L1sfKX4fzLEMdCqiKRKkUMVM= 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/checksum v1.4.5 h1:gvZOjQKPxFXy1ft3QnEyXmT+IqneM9QAUWlM3r0mfqw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5/go.mod h1:DLWnfvIcm9IET/mmjdxeXbBKmTCm0ZB8p1za9BVteM8= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 h1:3Y457U2eGukmjYjeHG6kanZpDzJADa2m0ADqnuePYVQ= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5/go.mod h1:CfwEHGkTjYZpkQ/5PvcbEtT7AJlG68KkEvmtwU8z3/U= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 h1:50+XsN70RS7dwJ2CkVNXzj7U2L1HKP8nqTd3XWEXBN4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6/go.mod h1:WqgLmwY7so32kG01zD8CPTJWVWM+TzJoOVHwTg4aPug= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 h1:P1doBzv5VEg1ONxnJss1Kh5ZG/ewoIE4MQtKKc6Crgg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5/go.mod h1:NOP+euMW7W3Ukt28tAxPuoWao4rhhqJD3QEBk7oCg7w= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 h1:CZImQdb1QbU9sGgJ9IswhVkxAcjkkD1eQTMA1KHWk+E= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.6/go.mod h1:YJDdlK0zsyxVBxGU48AR/Mi8DMrGdc1E3Yij4fNrONA= +github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0 h1:BXt75frE/FYtAmEDBJRBa2HexOw+oAZWZl6QknZEFgg= +github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0/go.mod h1:guz2K3x4FKSdDaoeB+TPVgJNU9oj2gftbp5cR8ela1A= github.com/aws/aws-sdk-go-v2/service/marketplacemetering v1.25.7 h1:IS6ExfHVexSy6QIWlwcrB1DrhfmPB1pZMniQbJbQcLE= github.com/aws/aws-sdk-go-v2/service/marketplacemetering v1.25.7/go.mod h1:oXwNWcIECL7X5jD/q8o/I1bxg3NoUhni6GY3ghLkngU= +github.com/aws/aws-sdk-go-v2/service/rds v1.91.0 h1:eqHz3Uih+gb0vLE5Cc4Xf733vOxsxDp6GFUUVQU4d7w= +github.com/aws/aws-sdk-go-v2/service/rds v1.91.0/go.mod h1:h2jc7IleH3xHY7y+h8FH7WAZcz3IVLOB6/jXotIQ/qU= +github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 h1:wmt05tPp/CaRZpPV5B4SaJ5TwkHKom07/BzHoLdkY1o= +github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2/go.mod h1:d+K9HESMpGb1EU9/UmmpInbGIUcAkwmcY6ZO/A3zZsw= +github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 h1:Q2ax8S21clKOnHhhr933xm3JxdJebql+R7aNo7p7GBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0/go.mod h1:ralv4XawHjEMaHOWnTFushl0WRqim/gQWesAMF6hTow= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 h1:1KDMKvOKNrpD667ORbZ/+4OgvUoaok1gg/MLzrHF9fw= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6/go.mod h1:DmtyfCfONhOyVAJ6ZMTrDSFIeyCBlEO93Qkfhxwbxu0= +github.com/aws/aws-sdk-go-v2/service/sns v1.33.6 h1:lEUtRHICiXsd7VRwRjXaY7MApT2X4Ue0Mrwe6XbyBro= +github.com/aws/aws-sdk-go-v2/service/sns v1.33.6/go.mod h1:SODr0Lu3lFdT0SGsGX1TzFTapwveBrT5wztVoYtppm8= +github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 h1:39WvSrVq9DD6UHkD+fx5x19P5KpRQfNdtgReDVNbelc= +github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1/go.mod h1:3gwPzC9LER/BTQdQZ3r6dUktb1rSjABF1D3Sr6nS7VU= +github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 h1:mADKqoZaodipGgiZfuAjtlcr4IVBtXPZKVjkzUZCCYM= +github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0/go.mod h1:l9qF25TzH95FhcIak6e4vt79KE4I7M2Nf59eMUVjj6c= github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= @@ -57,8 +103,9 @@ github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03V 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/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -110,8 +157,8 @@ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= 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-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -122,7 +169,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/gonvenience/bunt v1.3.5 h1:wSQquifvwEWtzn27k1ngLfeLaStyt0k1b/K6TrlCNAs= @@ -167,8 +213,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro= github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78= -github.com/gruntwork-io/terratest v0.47.2 h1:t6iWwsqJH7Gx0RwXleU/vjc+2c0JXRMdj3DxYXTBssQ= -github.com/gruntwork-io/terratest v0.47.2/go.mod h1:LnYX8BN5WxUMpDr8rtD39oToSL4CBERWSCusbJ0d/64= +github.com/gruntwork-io/terratest v0.48.0 h1:OoqJYAnBxejInn7TPizFGJNMCFvPHbiWNS3hGFKdHhA= +github.com/gruntwork-io/terratest v0.48.0/go.mod h1:U2EQW4Odlz75XJUH16Kqkr9c93p+ZZtkpVez7GkZFa4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -181,6 +227,14 @@ github.com/homeport/dyff v1.6.0 h1:AN+ikld0Fy+qx34YE7655b/bpWuxS6cL9k852pE2GUc= github.com/homeport/dyff v1.6.0/go.mod h1:FlAOFYzeKvxmU5nTrnG+qrlJVWpsFew7pt8L99p5q8k= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= +github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -195,7 +249,6 @@ github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW34dhU4az1GN0pTPADwNmvoRSeoZ6PItiqnY= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -278,8 +331,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/otp v1.2.0 h1:/A3+Jn+cagqayeR3iHs/L62m5ue7710D35zl1zJ1kok= -github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= +github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= +github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= @@ -312,12 +365,16 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= @@ -334,8 +391,9 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= +github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 h1:JwtAtbp7r/7QSyGz8mKUbYJBg2+6Cd7OjM8o/GNOcVo= github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74/go.mod h1:RmMWU37GKR2s6pgrIEB4ixgpVCt/cf7dnJv3fuH1J1c= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -405,23 +463,21 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -437,7 +493,6 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -457,7 +512,6 @@ golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -465,8 +519,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -479,10 +533,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20241113202542-65e8d215514f h1:zDoHYmMzMacIdjNe+P2XiTmPsLawi/pCbSPfxt6lTfw= +google.golang.org/genproto v0.0.0-20241113202542-65e8d215514f/go.mod h1:Q5m6g8b5KaFFzsQFIGdJkSJDGeJiybVenoYFMMa3ohI= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= @@ -520,12 +572,12 @@ k8s.io/apiserver v0.32.0 h1:VJ89ZvQZ8p1sLeiWdRJpRD6oLozNZD2+qVSLi+ft5Qs= k8s.io/apiserver v0.32.0/go.mod h1:HFh+dM1/BE/Hm4bS4nTXHVfN6Z6tFIZPi649n83b4Ag= k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= -k8s.io/code-generator v0.31.3 h1:Pj0fYOBms+ZrsulLi4DMsCEx1jG8fWKRLy44onHsLBI= -k8s.io/code-generator v0.31.3/go.mod h1:/umCIlT84g1+Yu5ZXtP1KGSRTnGiIzzX5AzUAxsNlts= +k8s.io/code-generator v0.32.0 h1:s0lNN8VSWny8LBz5t5iy7MCdgwdOhdg7vAGVxvS+VWU= +k8s.io/code-generator v0.32.0/go.mod h1:b7Q7KMZkvsYFy72A79QYjiv4aTz3GvW0f1T3UfhFq4s= k8s.io/component-base v0.32.0 h1:d6cWHZkCiiep41ObYQS6IcgzOUQUNpywm39KVYaUqzU= k8s.io/component-base v0.32.0/go.mod h1:JLG2W5TUxUu5uDyKiH2R/7NnxJo1HlPoRIIbVLkK5eM= -k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 h1:cErOOTkQ3JW19o4lo91fFurouhP8NcoBvb7CkvhZZpk= -k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 7992c4f511..866a2003ec 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" k8sv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" appprotectdosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/dos/v1beta1" diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/configuration_client.go b/pkg/client/clientset/versioned/typed/configuration/v1/configuration_client.go index 7e6bbef5de..c7a051c4ea 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/configuration_client.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/configuration_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -89,10 +89,10 @@ func New(c rest.Interface) *K8sV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := configurationv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_configuration_client.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_configuration_client.go index 2c3b958221..cf34677b22 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_configuration_client.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_configuration_client.go @@ -13,23 +13,23 @@ type FakeK8sV1 struct { } func (c *FakeK8sV1) GlobalConfigurations(namespace string) v1.GlobalConfigurationInterface { - return &FakeGlobalConfigurations{c, namespace} + return newFakeGlobalConfigurations(c, namespace) } func (c *FakeK8sV1) Policies(namespace string) v1.PolicyInterface { - return &FakePolicies{c, namespace} + return newFakePolicies(c, namespace) } func (c *FakeK8sV1) TransportServers(namespace string) v1.TransportServerInterface { - return &FakeTransportServers{c, namespace} + return newFakeTransportServers(c, namespace) } func (c *FakeK8sV1) VirtualServers(namespace string) v1.VirtualServerInterface { - return &FakeVirtualServers{c, namespace} + return newFakeVirtualServers(c, namespace) } func (c *FakeK8sV1) VirtualServerRoutes(namespace string) v1.VirtualServerRouteInterface { - return &FakeVirtualServerRoutes{c, namespace} + return newFakeVirtualServerRoutes(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_globalconfiguration.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_globalconfiguration.go index 9af4a4cef4..22988ef7f9 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_globalconfiguration.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_globalconfiguration.go @@ -3,116 +3,34 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeGlobalConfigurations implements GlobalConfigurationInterface -type FakeGlobalConfigurations struct { +// fakeGlobalConfigurations implements GlobalConfigurationInterface +type fakeGlobalConfigurations struct { + *gentype.FakeClientWithList[*v1.GlobalConfiguration, *v1.GlobalConfigurationList] Fake *FakeK8sV1 - ns string -} - -var globalconfigurationsResource = v1.SchemeGroupVersion.WithResource("globalconfigurations") - -var globalconfigurationsKind = v1.SchemeGroupVersion.WithKind("GlobalConfiguration") - -// Get takes name of the globalConfiguration, and returns the corresponding globalConfiguration object, and an error if there is any. -func (c *FakeGlobalConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.GlobalConfiguration, err error) { - emptyResult := &v1.GlobalConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(globalconfigurationsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.GlobalConfiguration), err -} - -// List takes label and field selectors, and returns the list of GlobalConfigurations that match those selectors. -func (c *FakeGlobalConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GlobalConfigurationList, err error) { - emptyResult := &v1.GlobalConfigurationList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(globalconfigurationsResource, globalconfigurationsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.GlobalConfigurationList{ListMeta: obj.(*v1.GlobalConfigurationList).ListMeta} - for _, item := range obj.(*v1.GlobalConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested globalConfigurations. -func (c *FakeGlobalConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(globalconfigurationsResource, c.ns, opts)) - -} - -// Create takes the representation of a globalConfiguration and creates it. Returns the server's representation of the globalConfiguration, and an error, if there is any. -func (c *FakeGlobalConfigurations) Create(ctx context.Context, globalConfiguration *v1.GlobalConfiguration, opts metav1.CreateOptions) (result *v1.GlobalConfiguration, err error) { - emptyResult := &v1.GlobalConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(globalconfigurationsResource, c.ns, globalConfiguration, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.GlobalConfiguration), err -} - -// Update takes the representation of a globalConfiguration and updates it. Returns the server's representation of the globalConfiguration, and an error, if there is any. -func (c *FakeGlobalConfigurations) Update(ctx context.Context, globalConfiguration *v1.GlobalConfiguration, opts metav1.UpdateOptions) (result *v1.GlobalConfiguration, err error) { - emptyResult := &v1.GlobalConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(globalconfigurationsResource, c.ns, globalConfiguration, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.GlobalConfiguration), err -} - -// Delete takes name of the globalConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeGlobalConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(globalconfigurationsResource, c.ns, name, opts), &v1.GlobalConfiguration{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeGlobalConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(globalconfigurationsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.GlobalConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched globalConfiguration. -func (c *FakeGlobalConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GlobalConfiguration, err error) { - emptyResult := &v1.GlobalConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(globalconfigurationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeGlobalConfigurations(fake *FakeK8sV1, namespace string) configurationv1.GlobalConfigurationInterface { + return &fakeGlobalConfigurations{ + gentype.NewFakeClientWithList[*v1.GlobalConfiguration, *v1.GlobalConfigurationList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("globalconfigurations"), + v1.SchemeGroupVersion.WithKind("GlobalConfiguration"), + func() *v1.GlobalConfiguration { return &v1.GlobalConfiguration{} }, + func() *v1.GlobalConfigurationList { return &v1.GlobalConfigurationList{} }, + func(dst, src *v1.GlobalConfigurationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.GlobalConfigurationList) []*v1.GlobalConfiguration { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.GlobalConfigurationList, items []*v1.GlobalConfiguration) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.GlobalConfiguration), err } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_policy.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_policy.go index 760fdfc030..56c7a0fc8e 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_policy.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_policy.go @@ -3,129 +3,30 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakePolicies implements PolicyInterface -type FakePolicies struct { +// fakePolicies implements PolicyInterface +type fakePolicies struct { + *gentype.FakeClientWithList[*v1.Policy, *v1.PolicyList] Fake *FakeK8sV1 - ns string -} - -var policiesResource = v1.SchemeGroupVersion.WithResource("policies") - -var policiesKind = v1.SchemeGroupVersion.WithKind("Policy") - -// Get takes name of the policy, and returns the corresponding policy object, and an error if there is any. -func (c *FakePolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Policy, err error) { - emptyResult := &v1.Policy{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(policiesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Policy), err -} - -// List takes label and field selectors, and returns the list of Policies that match those selectors. -func (c *FakePolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PolicyList, err error) { - emptyResult := &v1.PolicyList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(policiesResource, policiesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.PolicyList{ListMeta: obj.(*v1.PolicyList).ListMeta} - for _, item := range obj.(*v1.PolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested policies. -func (c *FakePolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(policiesResource, c.ns, opts)) - -} - -// Create takes the representation of a policy and creates it. Returns the server's representation of the policy, and an error, if there is any. -func (c *FakePolicies) Create(ctx context.Context, policy *v1.Policy, opts metav1.CreateOptions) (result *v1.Policy, err error) { - emptyResult := &v1.Policy{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(policiesResource, c.ns, policy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Policy), err -} - -// Update takes the representation of a policy and updates it. Returns the server's representation of the policy, and an error, if there is any. -func (c *FakePolicies) Update(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (result *v1.Policy, err error) { - emptyResult := &v1.Policy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(policiesResource, c.ns, policy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Policy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePolicies) UpdateStatus(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (result *v1.Policy, err error) { - emptyResult := &v1.Policy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(policiesResource, "status", c.ns, policy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Policy), err -} - -// Delete takes name of the policy and deletes it. Returns an error if one occurs. -func (c *FakePolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(policiesResource, c.ns, name, opts), &v1.Policy{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakePolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(policiesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.PolicyList{}) - return err -} - -// Patch applies the patch and returns the patched policy. -func (c *FakePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Policy, err error) { - emptyResult := &v1.Policy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(policiesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePolicies(fake *FakeK8sV1, namespace string) configurationv1.PolicyInterface { + return &fakePolicies{ + gentype.NewFakeClientWithList[*v1.Policy, *v1.PolicyList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("policies"), + v1.SchemeGroupVersion.WithKind("Policy"), + func() *v1.Policy { return &v1.Policy{} }, + func() *v1.PolicyList { return &v1.PolicyList{} }, + func(dst, src *v1.PolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1.PolicyList) []*v1.Policy { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.PolicyList, items []*v1.Policy) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Policy), err } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_transportserver.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_transportserver.go index d8abd82d93..acca8d0875 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_transportserver.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_transportserver.go @@ -3,129 +3,32 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeTransportServers implements TransportServerInterface -type FakeTransportServers struct { +// fakeTransportServers implements TransportServerInterface +type fakeTransportServers struct { + *gentype.FakeClientWithList[*v1.TransportServer, *v1.TransportServerList] Fake *FakeK8sV1 - ns string -} - -var transportserversResource = v1.SchemeGroupVersion.WithResource("transportservers") - -var transportserversKind = v1.SchemeGroupVersion.WithKind("TransportServer") - -// Get takes name of the transportServer, and returns the corresponding transportServer object, and an error if there is any. -func (c *FakeTransportServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TransportServer, err error) { - emptyResult := &v1.TransportServer{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(transportserversResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TransportServer), err -} - -// List takes label and field selectors, and returns the list of TransportServers that match those selectors. -func (c *FakeTransportServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TransportServerList, err error) { - emptyResult := &v1.TransportServerList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(transportserversResource, transportserversKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.TransportServerList{ListMeta: obj.(*v1.TransportServerList).ListMeta} - for _, item := range obj.(*v1.TransportServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested transportServers. -func (c *FakeTransportServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(transportserversResource, c.ns, opts)) - -} - -// Create takes the representation of a transportServer and creates it. Returns the server's representation of the transportServer, and an error, if there is any. -func (c *FakeTransportServers) Create(ctx context.Context, transportServer *v1.TransportServer, opts metav1.CreateOptions) (result *v1.TransportServer, err error) { - emptyResult := &v1.TransportServer{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(transportserversResource, c.ns, transportServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TransportServer), err -} - -// Update takes the representation of a transportServer and updates it. Returns the server's representation of the transportServer, and an error, if there is any. -func (c *FakeTransportServers) Update(ctx context.Context, transportServer *v1.TransportServer, opts metav1.UpdateOptions) (result *v1.TransportServer, err error) { - emptyResult := &v1.TransportServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(transportserversResource, c.ns, transportServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TransportServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTransportServers) UpdateStatus(ctx context.Context, transportServer *v1.TransportServer, opts metav1.UpdateOptions) (result *v1.TransportServer, err error) { - emptyResult := &v1.TransportServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(transportserversResource, "status", c.ns, transportServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TransportServer), err -} - -// Delete takes name of the transportServer and deletes it. Returns an error if one occurs. -func (c *FakeTransportServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(transportserversResource, c.ns, name, opts), &v1.TransportServer{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeTransportServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(transportserversResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.TransportServerList{}) - return err -} - -// Patch applies the patch and returns the patched transportServer. -func (c *FakeTransportServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TransportServer, err error) { - emptyResult := &v1.TransportServer{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(transportserversResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeTransportServers(fake *FakeK8sV1, namespace string) configurationv1.TransportServerInterface { + return &fakeTransportServers{ + gentype.NewFakeClientWithList[*v1.TransportServer, *v1.TransportServerList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("transportservers"), + v1.SchemeGroupVersion.WithKind("TransportServer"), + func() *v1.TransportServer { return &v1.TransportServer{} }, + func() *v1.TransportServerList { return &v1.TransportServerList{} }, + func(dst, src *v1.TransportServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.TransportServerList) []*v1.TransportServer { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.TransportServerList, items []*v1.TransportServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.TransportServer), err } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserver.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserver.go index 63bc61e4d5..4af83f84ea 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserver.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserver.go @@ -3,129 +3,32 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeVirtualServers implements VirtualServerInterface -type FakeVirtualServers struct { +// fakeVirtualServers implements VirtualServerInterface +type fakeVirtualServers struct { + *gentype.FakeClientWithList[*v1.VirtualServer, *v1.VirtualServerList] Fake *FakeK8sV1 - ns string -} - -var virtualserversResource = v1.SchemeGroupVersion.WithResource("virtualservers") - -var virtualserversKind = v1.SchemeGroupVersion.WithKind("VirtualServer") - -// Get takes name of the virtualServer, and returns the corresponding virtualServer object, and an error if there is any. -func (c *FakeVirtualServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualServer, err error) { - emptyResult := &v1.VirtualServer{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(virtualserversResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServer), err -} - -// List takes label and field selectors, and returns the list of VirtualServers that match those selectors. -func (c *FakeVirtualServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualServerList, err error) { - emptyResult := &v1.VirtualServerList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(virtualserversResource, virtualserversKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.VirtualServerList{ListMeta: obj.(*v1.VirtualServerList).ListMeta} - for _, item := range obj.(*v1.VirtualServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested virtualServers. -func (c *FakeVirtualServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(virtualserversResource, c.ns, opts)) - -} - -// Create takes the representation of a virtualServer and creates it. Returns the server's representation of the virtualServer, and an error, if there is any. -func (c *FakeVirtualServers) Create(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.CreateOptions) (result *v1.VirtualServer, err error) { - emptyResult := &v1.VirtualServer{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(virtualserversResource, c.ns, virtualServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServer), err -} - -// Update takes the representation of a virtualServer and updates it. Returns the server's representation of the virtualServer, and an error, if there is any. -func (c *FakeVirtualServers) Update(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.UpdateOptions) (result *v1.VirtualServer, err error) { - emptyResult := &v1.VirtualServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(virtualserversResource, c.ns, virtualServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVirtualServers) UpdateStatus(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.UpdateOptions) (result *v1.VirtualServer, err error) { - emptyResult := &v1.VirtualServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualserversResource, "status", c.ns, virtualServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServer), err -} - -// Delete takes name of the virtualServer and deletes it. Returns an error if one occurs. -func (c *FakeVirtualServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(virtualserversResource, c.ns, name, opts), &v1.VirtualServer{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeVirtualServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(virtualserversResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.VirtualServerList{}) - return err -} - -// Patch applies the patch and returns the patched virtualServer. -func (c *FakeVirtualServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualServer, err error) { - emptyResult := &v1.VirtualServer{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(virtualserversResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeVirtualServers(fake *FakeK8sV1, namespace string) configurationv1.VirtualServerInterface { + return &fakeVirtualServers{ + gentype.NewFakeClientWithList[*v1.VirtualServer, *v1.VirtualServerList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("virtualservers"), + v1.SchemeGroupVersion.WithKind("VirtualServer"), + func() *v1.VirtualServer { return &v1.VirtualServer{} }, + func() *v1.VirtualServerList { return &v1.VirtualServerList{} }, + func(dst, src *v1.VirtualServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.VirtualServerList) []*v1.VirtualServer { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.VirtualServerList, items []*v1.VirtualServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.VirtualServer), err } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserverroute.go b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserverroute.go index 3f6cbead38..9a26af1b58 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserverroute.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/fake/fake_virtualserverroute.go @@ -3,129 +3,34 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/configuration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeVirtualServerRoutes implements VirtualServerRouteInterface -type FakeVirtualServerRoutes struct { +// fakeVirtualServerRoutes implements VirtualServerRouteInterface +type fakeVirtualServerRoutes struct { + *gentype.FakeClientWithList[*v1.VirtualServerRoute, *v1.VirtualServerRouteList] Fake *FakeK8sV1 - ns string -} - -var virtualserverroutesResource = v1.SchemeGroupVersion.WithResource("virtualserverroutes") - -var virtualserverroutesKind = v1.SchemeGroupVersion.WithKind("VirtualServerRoute") - -// Get takes name of the virtualServerRoute, and returns the corresponding virtualServerRoute object, and an error if there is any. -func (c *FakeVirtualServerRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualServerRoute, err error) { - emptyResult := &v1.VirtualServerRoute{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(virtualserverroutesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServerRoute), err -} - -// List takes label and field selectors, and returns the list of VirtualServerRoutes that match those selectors. -func (c *FakeVirtualServerRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualServerRouteList, err error) { - emptyResult := &v1.VirtualServerRouteList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(virtualserverroutesResource, virtualserverroutesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.VirtualServerRouteList{ListMeta: obj.(*v1.VirtualServerRouteList).ListMeta} - for _, item := range obj.(*v1.VirtualServerRouteList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested virtualServerRoutes. -func (c *FakeVirtualServerRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(virtualserverroutesResource, c.ns, opts)) - -} - -// Create takes the representation of a virtualServerRoute and creates it. Returns the server's representation of the virtualServerRoute, and an error, if there is any. -func (c *FakeVirtualServerRoutes) Create(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.CreateOptions) (result *v1.VirtualServerRoute, err error) { - emptyResult := &v1.VirtualServerRoute{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(virtualserverroutesResource, c.ns, virtualServerRoute, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServerRoute), err -} - -// Update takes the representation of a virtualServerRoute and updates it. Returns the server's representation of the virtualServerRoute, and an error, if there is any. -func (c *FakeVirtualServerRoutes) Update(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.UpdateOptions) (result *v1.VirtualServerRoute, err error) { - emptyResult := &v1.VirtualServerRoute{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(virtualserverroutesResource, c.ns, virtualServerRoute, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServerRoute), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVirtualServerRoutes) UpdateStatus(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.UpdateOptions) (result *v1.VirtualServerRoute, err error) { - emptyResult := &v1.VirtualServerRoute{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualserverroutesResource, "status", c.ns, virtualServerRoute, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.VirtualServerRoute), err -} - -// Delete takes name of the virtualServerRoute and deletes it. Returns an error if one occurs. -func (c *FakeVirtualServerRoutes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(virtualserverroutesResource, c.ns, name, opts), &v1.VirtualServerRoute{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeVirtualServerRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(virtualserverroutesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.VirtualServerRouteList{}) - return err -} - -// Patch applies the patch and returns the patched virtualServerRoute. -func (c *FakeVirtualServerRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualServerRoute, err error) { - emptyResult := &v1.VirtualServerRoute{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(virtualserverroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeVirtualServerRoutes(fake *FakeK8sV1, namespace string) configurationv1.VirtualServerRouteInterface { + return &fakeVirtualServerRoutes{ + gentype.NewFakeClientWithList[*v1.VirtualServerRoute, *v1.VirtualServerRouteList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("virtualserverroutes"), + v1.SchemeGroupVersion.WithKind("VirtualServerRoute"), + func() *v1.VirtualServerRoute { return &v1.VirtualServerRoute{} }, + func() *v1.VirtualServerRouteList { return &v1.VirtualServerRouteList{} }, + func(dst, src *v1.VirtualServerRouteList) { dst.ListMeta = src.ListMeta }, + func(list *v1.VirtualServerRouteList) []*v1.VirtualServerRoute { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.VirtualServerRouteList, items []*v1.VirtualServerRoute) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.VirtualServerRoute), err } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/globalconfiguration.go b/pkg/client/clientset/versioned/typed/configuration/v1/globalconfiguration.go index 545dc537c3..4688374fd5 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/globalconfiguration.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/globalconfiguration.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,31 +21,32 @@ type GlobalConfigurationsGetter interface { // GlobalConfigurationInterface has methods to work with GlobalConfiguration resources. type GlobalConfigurationInterface interface { - Create(ctx context.Context, globalConfiguration *v1.GlobalConfiguration, opts metav1.CreateOptions) (*v1.GlobalConfiguration, error) - Update(ctx context.Context, globalConfiguration *v1.GlobalConfiguration, opts metav1.UpdateOptions) (*v1.GlobalConfiguration, error) + Create(ctx context.Context, globalConfiguration *configurationv1.GlobalConfiguration, opts metav1.CreateOptions) (*configurationv1.GlobalConfiguration, error) + Update(ctx context.Context, globalConfiguration *configurationv1.GlobalConfiguration, opts metav1.UpdateOptions) (*configurationv1.GlobalConfiguration, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.GlobalConfiguration, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.GlobalConfigurationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configurationv1.GlobalConfiguration, error) + List(ctx context.Context, opts metav1.ListOptions) (*configurationv1.GlobalConfigurationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GlobalConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configurationv1.GlobalConfiguration, err error) GlobalConfigurationExpansion } // globalConfigurations implements GlobalConfigurationInterface type globalConfigurations struct { - *gentype.ClientWithList[*v1.GlobalConfiguration, *v1.GlobalConfigurationList] + *gentype.ClientWithList[*configurationv1.GlobalConfiguration, *configurationv1.GlobalConfigurationList] } // newGlobalConfigurations returns a GlobalConfigurations func newGlobalConfigurations(c *K8sV1Client, namespace string) *globalConfigurations { return &globalConfigurations{ - gentype.NewClientWithList[*v1.GlobalConfiguration, *v1.GlobalConfigurationList]( + gentype.NewClientWithList[*configurationv1.GlobalConfiguration, *configurationv1.GlobalConfigurationList]( "globalconfigurations", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.GlobalConfiguration { return &v1.GlobalConfiguration{} }, - func() *v1.GlobalConfigurationList { return &v1.GlobalConfigurationList{} }), + func() *configurationv1.GlobalConfiguration { return &configurationv1.GlobalConfiguration{} }, + func() *configurationv1.GlobalConfigurationList { return &configurationv1.GlobalConfigurationList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/policy.go b/pkg/client/clientset/versioned/typed/configuration/v1/policy.go index c8cdf41d84..85753d8075 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/policy.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/policy.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,33 +21,34 @@ type PoliciesGetter interface { // PolicyInterface has methods to work with Policy resources. type PolicyInterface interface { - Create(ctx context.Context, policy *v1.Policy, opts metav1.CreateOptions) (*v1.Policy, error) - Update(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (*v1.Policy, error) + Create(ctx context.Context, policy *configurationv1.Policy, opts metav1.CreateOptions) (*configurationv1.Policy, error) + Update(ctx context.Context, policy *configurationv1.Policy, opts metav1.UpdateOptions) (*configurationv1.Policy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) (*v1.Policy, error) + UpdateStatus(ctx context.Context, policy *configurationv1.Policy, opts metav1.UpdateOptions) (*configurationv1.Policy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Policy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.PolicyList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configurationv1.Policy, error) + List(ctx context.Context, opts metav1.ListOptions) (*configurationv1.PolicyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Policy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configurationv1.Policy, err error) PolicyExpansion } // policies implements PolicyInterface type policies struct { - *gentype.ClientWithList[*v1.Policy, *v1.PolicyList] + *gentype.ClientWithList[*configurationv1.Policy, *configurationv1.PolicyList] } // newPolicies returns a Policies func newPolicies(c *K8sV1Client, namespace string) *policies { return &policies{ - gentype.NewClientWithList[*v1.Policy, *v1.PolicyList]( + gentype.NewClientWithList[*configurationv1.Policy, *configurationv1.PolicyList]( "policies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Policy { return &v1.Policy{} }, - func() *v1.PolicyList { return &v1.PolicyList{} }), + func() *configurationv1.Policy { return &configurationv1.Policy{} }, + func() *configurationv1.PolicyList { return &configurationv1.PolicyList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/transportserver.go b/pkg/client/clientset/versioned/typed/configuration/v1/transportserver.go index e9dbb35cc9..3b2eb81f3a 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/transportserver.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/transportserver.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,33 +21,34 @@ type TransportServersGetter interface { // TransportServerInterface has methods to work with TransportServer resources. type TransportServerInterface interface { - Create(ctx context.Context, transportServer *v1.TransportServer, opts metav1.CreateOptions) (*v1.TransportServer, error) - Update(ctx context.Context, transportServer *v1.TransportServer, opts metav1.UpdateOptions) (*v1.TransportServer, error) + Create(ctx context.Context, transportServer *configurationv1.TransportServer, opts metav1.CreateOptions) (*configurationv1.TransportServer, error) + Update(ctx context.Context, transportServer *configurationv1.TransportServer, opts metav1.UpdateOptions) (*configurationv1.TransportServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, transportServer *v1.TransportServer, opts metav1.UpdateOptions) (*v1.TransportServer, error) + UpdateStatus(ctx context.Context, transportServer *configurationv1.TransportServer, opts metav1.UpdateOptions) (*configurationv1.TransportServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.TransportServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.TransportServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configurationv1.TransportServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*configurationv1.TransportServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TransportServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configurationv1.TransportServer, err error) TransportServerExpansion } // transportServers implements TransportServerInterface type transportServers struct { - *gentype.ClientWithList[*v1.TransportServer, *v1.TransportServerList] + *gentype.ClientWithList[*configurationv1.TransportServer, *configurationv1.TransportServerList] } // newTransportServers returns a TransportServers func newTransportServers(c *K8sV1Client, namespace string) *transportServers { return &transportServers{ - gentype.NewClientWithList[*v1.TransportServer, *v1.TransportServerList]( + gentype.NewClientWithList[*configurationv1.TransportServer, *configurationv1.TransportServerList]( "transportservers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.TransportServer { return &v1.TransportServer{} }, - func() *v1.TransportServerList { return &v1.TransportServerList{} }), + func() *configurationv1.TransportServer { return &configurationv1.TransportServer{} }, + func() *configurationv1.TransportServerList { return &configurationv1.TransportServerList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/virtualserver.go b/pkg/client/clientset/versioned/typed/configuration/v1/virtualserver.go index 1ba396faf6..6935c84a98 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/virtualserver.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/virtualserver.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,33 +21,34 @@ type VirtualServersGetter interface { // VirtualServerInterface has methods to work with VirtualServer resources. type VirtualServerInterface interface { - Create(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.CreateOptions) (*v1.VirtualServer, error) - Update(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.UpdateOptions) (*v1.VirtualServer, error) + Create(ctx context.Context, virtualServer *configurationv1.VirtualServer, opts metav1.CreateOptions) (*configurationv1.VirtualServer, error) + Update(ctx context.Context, virtualServer *configurationv1.VirtualServer, opts metav1.UpdateOptions) (*configurationv1.VirtualServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, virtualServer *v1.VirtualServer, opts metav1.UpdateOptions) (*v1.VirtualServer, error) + UpdateStatus(ctx context.Context, virtualServer *configurationv1.VirtualServer, opts metav1.UpdateOptions) (*configurationv1.VirtualServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configurationv1.VirtualServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*configurationv1.VirtualServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configurationv1.VirtualServer, err error) VirtualServerExpansion } // virtualServers implements VirtualServerInterface type virtualServers struct { - *gentype.ClientWithList[*v1.VirtualServer, *v1.VirtualServerList] + *gentype.ClientWithList[*configurationv1.VirtualServer, *configurationv1.VirtualServerList] } // newVirtualServers returns a VirtualServers func newVirtualServers(c *K8sV1Client, namespace string) *virtualServers { return &virtualServers{ - gentype.NewClientWithList[*v1.VirtualServer, *v1.VirtualServerList]( + gentype.NewClientWithList[*configurationv1.VirtualServer, *configurationv1.VirtualServerList]( "virtualservers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.VirtualServer { return &v1.VirtualServer{} }, - func() *v1.VirtualServerList { return &v1.VirtualServerList{} }), + func() *configurationv1.VirtualServer { return &configurationv1.VirtualServer{} }, + func() *configurationv1.VirtualServerList { return &configurationv1.VirtualServerList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/configuration/v1/virtualserverroute.go b/pkg/client/clientset/versioned/typed/configuration/v1/virtualserverroute.go index eedc95d825..cdd8471960 100644 --- a/pkg/client/clientset/versioned/typed/configuration/v1/virtualserverroute.go +++ b/pkg/client/clientset/versioned/typed/configuration/v1/virtualserverroute.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,33 +21,34 @@ type VirtualServerRoutesGetter interface { // VirtualServerRouteInterface has methods to work with VirtualServerRoute resources. type VirtualServerRouteInterface interface { - Create(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.CreateOptions) (*v1.VirtualServerRoute, error) - Update(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.UpdateOptions) (*v1.VirtualServerRoute, error) + Create(ctx context.Context, virtualServerRoute *configurationv1.VirtualServerRoute, opts metav1.CreateOptions) (*configurationv1.VirtualServerRoute, error) + Update(ctx context.Context, virtualServerRoute *configurationv1.VirtualServerRoute, opts metav1.UpdateOptions) (*configurationv1.VirtualServerRoute, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, virtualServerRoute *v1.VirtualServerRoute, opts metav1.UpdateOptions) (*v1.VirtualServerRoute, error) + UpdateStatus(ctx context.Context, virtualServerRoute *configurationv1.VirtualServerRoute, opts metav1.UpdateOptions) (*configurationv1.VirtualServerRoute, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualServerRoute, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualServerRouteList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configurationv1.VirtualServerRoute, error) + List(ctx context.Context, opts metav1.ListOptions) (*configurationv1.VirtualServerRouteList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualServerRoute, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configurationv1.VirtualServerRoute, err error) VirtualServerRouteExpansion } // virtualServerRoutes implements VirtualServerRouteInterface type virtualServerRoutes struct { - *gentype.ClientWithList[*v1.VirtualServerRoute, *v1.VirtualServerRouteList] + *gentype.ClientWithList[*configurationv1.VirtualServerRoute, *configurationv1.VirtualServerRouteList] } // newVirtualServerRoutes returns a VirtualServerRoutes func newVirtualServerRoutes(c *K8sV1Client, namespace string) *virtualServerRoutes { return &virtualServerRoutes{ - gentype.NewClientWithList[*v1.VirtualServerRoute, *v1.VirtualServerRouteList]( + gentype.NewClientWithList[*configurationv1.VirtualServerRoute, *configurationv1.VirtualServerRouteList]( "virtualserverroutes", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.VirtualServerRoute { return &v1.VirtualServerRoute{} }, - func() *v1.VirtualServerRouteList { return &v1.VirtualServerRouteList{} }), + func() *configurationv1.VirtualServerRoute { return &configurationv1.VirtualServerRoute{} }, + func() *configurationv1.VirtualServerRouteList { return &configurationv1.VirtualServerRouteList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/dos/v1beta1/dos_client.go b/pkg/client/clientset/versioned/typed/dos/v1beta1/dos_client.go index 186caac0ee..f1ebd8bc6a 100644 --- a/pkg/client/clientset/versioned/typed/dos/v1beta1/dos_client.go +++ b/pkg/client/clientset/versioned/typed/dos/v1beta1/dos_client.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "net/http" + http "net/http" - v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" - "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" + dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" + scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *AppprotectdosV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := dosv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/dos/v1beta1/dosprotectedresource.go b/pkg/client/clientset/versioned/typed/dos/v1beta1/dosprotectedresource.go index d802d9ad05..eca3ac7028 100644 --- a/pkg/client/clientset/versioned/typed/dos/v1beta1/dosprotectedresource.go +++ b/pkg/client/clientset/versioned/typed/dos/v1beta1/dosprotectedresource.go @@ -3,9 +3,9 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" + dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,31 +21,32 @@ type DosProtectedResourcesGetter interface { // DosProtectedResourceInterface has methods to work with DosProtectedResource resources. type DosProtectedResourceInterface interface { - Create(ctx context.Context, dosProtectedResource *v1beta1.DosProtectedResource, opts v1.CreateOptions) (*v1beta1.DosProtectedResource, error) - Update(ctx context.Context, dosProtectedResource *v1beta1.DosProtectedResource, opts v1.UpdateOptions) (*v1beta1.DosProtectedResource, error) + Create(ctx context.Context, dosProtectedResource *dosv1beta1.DosProtectedResource, opts v1.CreateOptions) (*dosv1beta1.DosProtectedResource, error) + Update(ctx context.Context, dosProtectedResource *dosv1beta1.DosProtectedResource, opts v1.UpdateOptions) (*dosv1beta1.DosProtectedResource, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DosProtectedResource, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DosProtectedResourceList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*dosv1beta1.DosProtectedResource, error) + List(ctx context.Context, opts v1.ListOptions) (*dosv1beta1.DosProtectedResourceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DosProtectedResource, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *dosv1beta1.DosProtectedResource, err error) DosProtectedResourceExpansion } // dosProtectedResources implements DosProtectedResourceInterface type dosProtectedResources struct { - *gentype.ClientWithList[*v1beta1.DosProtectedResource, *v1beta1.DosProtectedResourceList] + *gentype.ClientWithList[*dosv1beta1.DosProtectedResource, *dosv1beta1.DosProtectedResourceList] } // newDosProtectedResources returns a DosProtectedResources func newDosProtectedResources(c *AppprotectdosV1beta1Client, namespace string) *dosProtectedResources { return &dosProtectedResources{ - gentype.NewClientWithList[*v1beta1.DosProtectedResource, *v1beta1.DosProtectedResourceList]( + gentype.NewClientWithList[*dosv1beta1.DosProtectedResource, *dosv1beta1.DosProtectedResourceList]( "dosprotectedresources", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.DosProtectedResource { return &v1beta1.DosProtectedResource{} }, - func() *v1beta1.DosProtectedResourceList { return &v1beta1.DosProtectedResourceList{} }), + func() *dosv1beta1.DosProtectedResource { return &dosv1beta1.DosProtectedResource{} }, + func() *dosv1beta1.DosProtectedResourceList { return &dosv1beta1.DosProtectedResourceList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dos_client.go b/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dos_client.go index 2a59aff231..8bdcd39ea7 100644 --- a/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dos_client.go +++ b/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dos_client.go @@ -13,7 +13,7 @@ type FakeAppprotectdosV1beta1 struct { } func (c *FakeAppprotectdosV1beta1) DosProtectedResources(namespace string) v1beta1.DosProtectedResourceInterface { - return &FakeDosProtectedResources{c, namespace} + return newFakeDosProtectedResources(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dosprotectedresource.go b/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dosprotectedresource.go index 94e6709c0c..d48eb044cf 100644 --- a/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dosprotectedresource.go +++ b/pkg/client/clientset/versioned/typed/dos/v1beta1/fake/fake_dosprotectedresource.go @@ -3,116 +3,34 @@ package fake import ( - "context" - v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/dos/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeDosProtectedResources implements DosProtectedResourceInterface -type FakeDosProtectedResources struct { +// fakeDosProtectedResources implements DosProtectedResourceInterface +type fakeDosProtectedResources struct { + *gentype.FakeClientWithList[*v1beta1.DosProtectedResource, *v1beta1.DosProtectedResourceList] Fake *FakeAppprotectdosV1beta1 - ns string -} - -var dosprotectedresourcesResource = v1beta1.SchemeGroupVersion.WithResource("dosprotectedresources") - -var dosprotectedresourcesKind = v1beta1.SchemeGroupVersion.WithKind("DosProtectedResource") - -// Get takes name of the dosProtectedResource, and returns the corresponding dosProtectedResource object, and an error if there is any. -func (c *FakeDosProtectedResources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DosProtectedResource, err error) { - emptyResult := &v1beta1.DosProtectedResource{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(dosprotectedresourcesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.DosProtectedResource), err -} - -// List takes label and field selectors, and returns the list of DosProtectedResources that match those selectors. -func (c *FakeDosProtectedResources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DosProtectedResourceList, err error) { - emptyResult := &v1beta1.DosProtectedResourceList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(dosprotectedresourcesResource, dosprotectedresourcesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.DosProtectedResourceList{ListMeta: obj.(*v1beta1.DosProtectedResourceList).ListMeta} - for _, item := range obj.(*v1beta1.DosProtectedResourceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dosProtectedResources. -func (c *FakeDosProtectedResources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(dosprotectedresourcesResource, c.ns, opts)) - -} - -// Create takes the representation of a dosProtectedResource and creates it. Returns the server's representation of the dosProtectedResource, and an error, if there is any. -func (c *FakeDosProtectedResources) Create(ctx context.Context, dosProtectedResource *v1beta1.DosProtectedResource, opts v1.CreateOptions) (result *v1beta1.DosProtectedResource, err error) { - emptyResult := &v1beta1.DosProtectedResource{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(dosprotectedresourcesResource, c.ns, dosProtectedResource, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.DosProtectedResource), err -} - -// Update takes the representation of a dosProtectedResource and updates it. Returns the server's representation of the dosProtectedResource, and an error, if there is any. -func (c *FakeDosProtectedResources) Update(ctx context.Context, dosProtectedResource *v1beta1.DosProtectedResource, opts v1.UpdateOptions) (result *v1beta1.DosProtectedResource, err error) { - emptyResult := &v1beta1.DosProtectedResource{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(dosprotectedresourcesResource, c.ns, dosProtectedResource, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.DosProtectedResource), err -} - -// Delete takes name of the dosProtectedResource and deletes it. Returns an error if one occurs. -func (c *FakeDosProtectedResources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(dosprotectedresourcesResource, c.ns, name, opts), &v1beta1.DosProtectedResource{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeDosProtectedResources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(dosprotectedresourcesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.DosProtectedResourceList{}) - return err -} - -// Patch applies the patch and returns the patched dosProtectedResource. -func (c *FakeDosProtectedResources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DosProtectedResource, err error) { - emptyResult := &v1beta1.DosProtectedResource{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(dosprotectedresourcesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeDosProtectedResources(fake *FakeAppprotectdosV1beta1, namespace string) dosv1beta1.DosProtectedResourceInterface { + return &fakeDosProtectedResources{ + gentype.NewFakeClientWithList[*v1beta1.DosProtectedResource, *v1beta1.DosProtectedResourceList]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("dosprotectedresources"), + v1beta1.SchemeGroupVersion.WithKind("DosProtectedResource"), + func() *v1beta1.DosProtectedResource { return &v1beta1.DosProtectedResource{} }, + func() *v1beta1.DosProtectedResourceList { return &v1beta1.DosProtectedResourceList{} }, + func(dst, src *v1beta1.DosProtectedResourceList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.DosProtectedResourceList) []*v1beta1.DosProtectedResource { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta1.DosProtectedResourceList, items []*v1beta1.DosProtectedResource) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.DosProtectedResource), err } diff --git a/pkg/client/clientset/versioned/typed/externaldns/v1/dnsendpoint.go b/pkg/client/clientset/versioned/typed/externaldns/v1/dnsendpoint.go index 35dee754f7..09b716c0e9 100644 --- a/pkg/client/clientset/versioned/typed/externaldns/v1/dnsendpoint.go +++ b/pkg/client/clientset/versioned/typed/externaldns/v1/dnsendpoint.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" + externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -21,33 +21,34 @@ type DNSEndpointsGetter interface { // DNSEndpointInterface has methods to work with DNSEndpoint resources. type DNSEndpointInterface interface { - Create(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.CreateOptions) (*v1.DNSEndpoint, error) - Update(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.UpdateOptions) (*v1.DNSEndpoint, error) + Create(ctx context.Context, dNSEndpoint *externaldnsv1.DNSEndpoint, opts metav1.CreateOptions) (*externaldnsv1.DNSEndpoint, error) + Update(ctx context.Context, dNSEndpoint *externaldnsv1.DNSEndpoint, opts metav1.UpdateOptions) (*externaldnsv1.DNSEndpoint, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.UpdateOptions) (*v1.DNSEndpoint, error) + UpdateStatus(ctx context.Context, dNSEndpoint *externaldnsv1.DNSEndpoint, opts metav1.UpdateOptions) (*externaldnsv1.DNSEndpoint, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DNSEndpoint, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.DNSEndpointList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*externaldnsv1.DNSEndpoint, error) + List(ctx context.Context, opts metav1.ListOptions) (*externaldnsv1.DNSEndpointList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNSEndpoint, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *externaldnsv1.DNSEndpoint, err error) DNSEndpointExpansion } // dNSEndpoints implements DNSEndpointInterface type dNSEndpoints struct { - *gentype.ClientWithList[*v1.DNSEndpoint, *v1.DNSEndpointList] + *gentype.ClientWithList[*externaldnsv1.DNSEndpoint, *externaldnsv1.DNSEndpointList] } // newDNSEndpoints returns a DNSEndpoints func newDNSEndpoints(c *ExternaldnsV1Client, namespace string) *dNSEndpoints { return &dNSEndpoints{ - gentype.NewClientWithList[*v1.DNSEndpoint, *v1.DNSEndpointList]( + gentype.NewClientWithList[*externaldnsv1.DNSEndpoint, *externaldnsv1.DNSEndpointList]( "dnsendpoints", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.DNSEndpoint { return &v1.DNSEndpoint{} }, - func() *v1.DNSEndpointList { return &v1.DNSEndpointList{} }), + func() *externaldnsv1.DNSEndpoint { return &externaldnsv1.DNSEndpoint{} }, + func() *externaldnsv1.DNSEndpointList { return &externaldnsv1.DNSEndpointList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/externaldns/v1/externaldns_client.go b/pkg/client/clientset/versioned/typed/externaldns/v1/externaldns_client.go index 2e9b1232e9..3598bb3e5e 100644 --- a/pkg/client/clientset/versioned/typed/externaldns/v1/externaldns_client.go +++ b/pkg/client/clientset/versioned/typed/externaldns/v1/externaldns_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" - "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" + externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" + scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *ExternaldnsV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := externaldnsv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_dnsendpoint.go b/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_dnsendpoint.go index ea34889a0f..d52922255c 100644 --- a/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_dnsendpoint.go +++ b/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_dnsendpoint.go @@ -3,129 +3,30 @@ package fake import ( - "context" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/typed/externaldns/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeDNSEndpoints implements DNSEndpointInterface -type FakeDNSEndpoints struct { +// fakeDNSEndpoints implements DNSEndpointInterface +type fakeDNSEndpoints struct { + *gentype.FakeClientWithList[*v1.DNSEndpoint, *v1.DNSEndpointList] Fake *FakeExternaldnsV1 - ns string -} - -var dnsendpointsResource = v1.SchemeGroupVersion.WithResource("dnsendpoints") - -var dnsendpointsKind = v1.SchemeGroupVersion.WithKind("DNSEndpoint") - -// Get takes name of the dNSEndpoint, and returns the corresponding dNSEndpoint object, and an error if there is any. -func (c *FakeDNSEndpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DNSEndpoint, err error) { - emptyResult := &v1.DNSEndpoint{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(dnsendpointsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNSEndpoint), err -} - -// List takes label and field selectors, and returns the list of DNSEndpoints that match those selectors. -func (c *FakeDNSEndpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DNSEndpointList, err error) { - emptyResult := &v1.DNSEndpointList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(dnsendpointsResource, dnsendpointsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.DNSEndpointList{ListMeta: obj.(*v1.DNSEndpointList).ListMeta} - for _, item := range obj.(*v1.DNSEndpointList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dNSEndpoints. -func (c *FakeDNSEndpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(dnsendpointsResource, c.ns, opts)) - -} - -// Create takes the representation of a dNSEndpoint and creates it. Returns the server's representation of the dNSEndpoint, and an error, if there is any. -func (c *FakeDNSEndpoints) Create(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.CreateOptions) (result *v1.DNSEndpoint, err error) { - emptyResult := &v1.DNSEndpoint{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(dnsendpointsResource, c.ns, dNSEndpoint, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNSEndpoint), err -} - -// Update takes the representation of a dNSEndpoint and updates it. Returns the server's representation of the dNSEndpoint, and an error, if there is any. -func (c *FakeDNSEndpoints) Update(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.UpdateOptions) (result *v1.DNSEndpoint, err error) { - emptyResult := &v1.DNSEndpoint{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(dnsendpointsResource, c.ns, dNSEndpoint, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNSEndpoint), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSEndpoints) UpdateStatus(ctx context.Context, dNSEndpoint *v1.DNSEndpoint, opts metav1.UpdateOptions) (result *v1.DNSEndpoint, err error) { - emptyResult := &v1.DNSEndpoint{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(dnsendpointsResource, "status", c.ns, dNSEndpoint, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNSEndpoint), err -} - -// Delete takes name of the dNSEndpoint and deletes it. Returns an error if one occurs. -func (c *FakeDNSEndpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(dnsendpointsResource, c.ns, name, opts), &v1.DNSEndpoint{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeDNSEndpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(dnsendpointsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.DNSEndpointList{}) - return err -} - -// Patch applies the patch and returns the patched dNSEndpoint. -func (c *FakeDNSEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNSEndpoint, err error) { - emptyResult := &v1.DNSEndpoint{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(dnsendpointsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeDNSEndpoints(fake *FakeExternaldnsV1, namespace string) externaldnsv1.DNSEndpointInterface { + return &fakeDNSEndpoints{ + gentype.NewFakeClientWithList[*v1.DNSEndpoint, *v1.DNSEndpointList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("dnsendpoints"), + v1.SchemeGroupVersion.WithKind("DNSEndpoint"), + func() *v1.DNSEndpoint { return &v1.DNSEndpoint{} }, + func() *v1.DNSEndpointList { return &v1.DNSEndpointList{} }, + func(dst, src *v1.DNSEndpointList) { dst.ListMeta = src.ListMeta }, + func(list *v1.DNSEndpointList) []*v1.DNSEndpoint { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.DNSEndpointList, items []*v1.DNSEndpoint) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.DNSEndpoint), err } diff --git a/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_externaldns_client.go b/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_externaldns_client.go index ccc09f3e04..cdd0115c2a 100644 --- a/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_externaldns_client.go +++ b/pkg/client/clientset/versioned/typed/externaldns/v1/fake/fake_externaldns_client.go @@ -13,7 +13,7 @@ type FakeExternaldnsV1 struct { } func (c *FakeExternaldnsV1) DNSEndpoints(namespace string) v1.DNSEndpointInterface { - return &FakeDNSEndpoints{c, namespace} + return newFakeDNSEndpoints(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/informers/externalversions/configuration/v1/globalconfiguration.go b/pkg/client/informers/externalversions/configuration/v1/globalconfiguration.go index ae598e8dae..18800e0397 100644 --- a/pkg/client/informers/externalversions/configuration/v1/globalconfiguration.go +++ b/pkg/client/informers/externalversions/configuration/v1/globalconfiguration.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + apisconfigurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // GlobalConfigurations. type GlobalConfigurationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.GlobalConfigurationLister + Lister() configurationv1.GlobalConfigurationLister } type globalConfigurationInformer struct { @@ -55,7 +55,7 @@ func NewFilteredGlobalConfigurationInformer(client versioned.Interface, namespac return client.K8sV1().GlobalConfigurations(namespace).Watch(context.TODO(), options) }, }, - &configurationv1.GlobalConfiguration{}, + &apisconfigurationv1.GlobalConfiguration{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *globalConfigurationInformer) defaultInformer(client versioned.Interface } func (f *globalConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configurationv1.GlobalConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigurationv1.GlobalConfiguration{}, f.defaultInformer) } -func (f *globalConfigurationInformer) Lister() v1.GlobalConfigurationLister { - return v1.NewGlobalConfigurationLister(f.Informer().GetIndexer()) +func (f *globalConfigurationInformer) Lister() configurationv1.GlobalConfigurationLister { + return configurationv1.NewGlobalConfigurationLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/configuration/v1/policy.go b/pkg/client/informers/externalversions/configuration/v1/policy.go index 4f9a412588..35fbea6622 100644 --- a/pkg/client/informers/externalversions/configuration/v1/policy.go +++ b/pkg/client/informers/externalversions/configuration/v1/policy.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + apisconfigurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Policies. type PolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.PolicyLister + Lister() configurationv1.PolicyLister } type policyInformer struct { @@ -55,7 +55,7 @@ func NewFilteredPolicyInformer(client versioned.Interface, namespace string, res return client.K8sV1().Policies(namespace).Watch(context.TODO(), options) }, }, - &configurationv1.Policy{}, + &apisconfigurationv1.Policy{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *policyInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *policyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configurationv1.Policy{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigurationv1.Policy{}, f.defaultInformer) } -func (f *policyInformer) Lister() v1.PolicyLister { - return v1.NewPolicyLister(f.Informer().GetIndexer()) +func (f *policyInformer) Lister() configurationv1.PolicyLister { + return configurationv1.NewPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/configuration/v1/transportserver.go b/pkg/client/informers/externalversions/configuration/v1/transportserver.go index 3e668ff571..016932c39c 100644 --- a/pkg/client/informers/externalversions/configuration/v1/transportserver.go +++ b/pkg/client/informers/externalversions/configuration/v1/transportserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + apisconfigurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // TransportServers. type TransportServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.TransportServerLister + Lister() configurationv1.TransportServerLister } type transportServerInformer struct { @@ -55,7 +55,7 @@ func NewFilteredTransportServerInformer(client versioned.Interface, namespace st return client.K8sV1().TransportServers(namespace).Watch(context.TODO(), options) }, }, - &configurationv1.TransportServer{}, + &apisconfigurationv1.TransportServer{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *transportServerInformer) defaultInformer(client versioned.Interface, re } func (f *transportServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configurationv1.TransportServer{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigurationv1.TransportServer{}, f.defaultInformer) } -func (f *transportServerInformer) Lister() v1.TransportServerLister { - return v1.NewTransportServerLister(f.Informer().GetIndexer()) +func (f *transportServerInformer) Lister() configurationv1.TransportServerLister { + return configurationv1.NewTransportServerLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/configuration/v1/virtualserver.go b/pkg/client/informers/externalversions/configuration/v1/virtualserver.go index 8fe544dd6a..a6da4ebfe3 100644 --- a/pkg/client/informers/externalversions/configuration/v1/virtualserver.go +++ b/pkg/client/informers/externalversions/configuration/v1/virtualserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + apisconfigurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // VirtualServers. type VirtualServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.VirtualServerLister + Lister() configurationv1.VirtualServerLister } type virtualServerInformer struct { @@ -55,7 +55,7 @@ func NewFilteredVirtualServerInformer(client versioned.Interface, namespace stri return client.K8sV1().VirtualServers(namespace).Watch(context.TODO(), options) }, }, - &configurationv1.VirtualServer{}, + &apisconfigurationv1.VirtualServer{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *virtualServerInformer) defaultInformer(client versioned.Interface, resy } func (f *virtualServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configurationv1.VirtualServer{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigurationv1.VirtualServer{}, f.defaultInformer) } -func (f *virtualServerInformer) Lister() v1.VirtualServerLister { - return v1.NewVirtualServerLister(f.Informer().GetIndexer()) +func (f *virtualServerInformer) Lister() configurationv1.VirtualServerLister { + return configurationv1.NewVirtualServerLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/configuration/v1/virtualserverroute.go b/pkg/client/informers/externalversions/configuration/v1/virtualserverroute.go index b681a1acb8..7222fca76f 100644 --- a/pkg/client/informers/externalversions/configuration/v1/virtualserverroute.go +++ b/pkg/client/informers/externalversions/configuration/v1/virtualserverroute.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + apisconfigurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/configuration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // VirtualServerRoutes. type VirtualServerRouteInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.VirtualServerRouteLister + Lister() configurationv1.VirtualServerRouteLister } type virtualServerRouteInformer struct { @@ -55,7 +55,7 @@ func NewFilteredVirtualServerRouteInformer(client versioned.Interface, namespace return client.K8sV1().VirtualServerRoutes(namespace).Watch(context.TODO(), options) }, }, - &configurationv1.VirtualServerRoute{}, + &apisconfigurationv1.VirtualServerRoute{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *virtualServerRouteInformer) defaultInformer(client versioned.Interface, } func (f *virtualServerRouteInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configurationv1.VirtualServerRoute{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigurationv1.VirtualServerRoute{}, f.defaultInformer) } -func (f *virtualServerRouteInformer) Lister() v1.VirtualServerRouteLister { - return v1.NewVirtualServerRouteLister(f.Informer().GetIndexer()) +func (f *virtualServerRouteInformer) Lister() configurationv1.VirtualServerRouteLister { + return configurationv1.NewVirtualServerRouteLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/dos/v1beta1/dosprotectedresource.go b/pkg/client/informers/externalversions/dos/v1beta1/dosprotectedresource.go index e6a03fb143..3253677b48 100644 --- a/pkg/client/informers/externalversions/dos/v1beta1/dosprotectedresource.go +++ b/pkg/client/informers/externalversions/dos/v1beta1/dosprotectedresource.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" + apisdosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/dos/v1beta1" + dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/dos/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DosProtectedResources. type DosProtectedResourceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.DosProtectedResourceLister + Lister() dosv1beta1.DosProtectedResourceLister } type dosProtectedResourceInformer struct { @@ -55,7 +55,7 @@ func NewFilteredDosProtectedResourceInformer(client versioned.Interface, namespa return client.AppprotectdosV1beta1().DosProtectedResources(namespace).Watch(context.TODO(), options) }, }, - &dosv1beta1.DosProtectedResource{}, + &apisdosv1beta1.DosProtectedResource{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *dosProtectedResourceInformer) defaultInformer(client versioned.Interfac } func (f *dosProtectedResourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&dosv1beta1.DosProtectedResource{}, f.defaultInformer) + return f.factory.InformerFor(&apisdosv1beta1.DosProtectedResource{}, f.defaultInformer) } -func (f *dosProtectedResourceInformer) Lister() v1beta1.DosProtectedResourceLister { - return v1beta1.NewDosProtectedResourceLister(f.Informer().GetIndexer()) +func (f *dosProtectedResourceInformer) Lister() dosv1beta1.DosProtectedResourceLister { + return dosv1beta1.NewDosProtectedResourceLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/externaldns/v1/dnsendpoint.go b/pkg/client/informers/externalversions/externaldns/v1/dnsendpoint.go index 331f9057df..cca2ebe98f 100644 --- a/pkg/client/informers/externalversions/externaldns/v1/dnsendpoint.go +++ b/pkg/client/informers/externalversions/externaldns/v1/dnsendpoint.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" + apisexternaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" versioned "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned" internalinterfaces "github.com/nginxinc/kubernetes-ingress/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/externaldns/v1" + externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/client/listers/externaldns/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DNSEndpoints. type DNSEndpointInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.DNSEndpointLister + Lister() externaldnsv1.DNSEndpointLister } type dNSEndpointInformer struct { @@ -55,7 +55,7 @@ func NewFilteredDNSEndpointInformer(client versioned.Interface, namespace string return client.ExternaldnsV1().DNSEndpoints(namespace).Watch(context.TODO(), options) }, }, - &externaldnsv1.DNSEndpoint{}, + &apisexternaldnsv1.DNSEndpoint{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *dNSEndpointInformer) defaultInformer(client versioned.Interface, resync } func (f *dNSEndpointInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&externaldnsv1.DNSEndpoint{}, f.defaultInformer) + return f.factory.InformerFor(&apisexternaldnsv1.DNSEndpoint{}, f.defaultInformer) } -func (f *dNSEndpointInformer) Lister() v1.DNSEndpointLister { - return v1.NewDNSEndpointLister(f.Informer().GetIndexer()) +func (f *dNSEndpointInformer) Lister() externaldnsv1.DNSEndpointLister { + return externaldnsv1.NewDNSEndpointLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index a9603456b3..0662c7bd8d 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" diff --git a/pkg/client/listers/configuration/v1/globalconfiguration.go b/pkg/client/listers/configuration/v1/globalconfiguration.go index 6506de74a8..678db5657f 100644 --- a/pkg/client/listers/configuration/v1/globalconfiguration.go +++ b/pkg/client/listers/configuration/v1/globalconfiguration.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // GlobalConfigurationLister helps list GlobalConfigurations. @@ -14,7 +14,7 @@ import ( type GlobalConfigurationLister interface { // List lists all GlobalConfigurations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.GlobalConfiguration, err error) + List(selector labels.Selector) (ret []*configurationv1.GlobalConfiguration, err error) // GlobalConfigurations returns an object that can list and get GlobalConfigurations. GlobalConfigurations(namespace string) GlobalConfigurationNamespaceLister GlobalConfigurationListerExpansion @@ -22,17 +22,17 @@ type GlobalConfigurationLister interface { // globalConfigurationLister implements the GlobalConfigurationLister interface. type globalConfigurationLister struct { - listers.ResourceIndexer[*v1.GlobalConfiguration] + listers.ResourceIndexer[*configurationv1.GlobalConfiguration] } // NewGlobalConfigurationLister returns a new GlobalConfigurationLister. func NewGlobalConfigurationLister(indexer cache.Indexer) GlobalConfigurationLister { - return &globalConfigurationLister{listers.New[*v1.GlobalConfiguration](indexer, v1.Resource("globalconfiguration"))} + return &globalConfigurationLister{listers.New[*configurationv1.GlobalConfiguration](indexer, configurationv1.Resource("globalconfiguration"))} } // GlobalConfigurations returns an object that can list and get GlobalConfigurations. func (s *globalConfigurationLister) GlobalConfigurations(namespace string) GlobalConfigurationNamespaceLister { - return globalConfigurationNamespaceLister{listers.NewNamespaced[*v1.GlobalConfiguration](s.ResourceIndexer, namespace)} + return globalConfigurationNamespaceLister{listers.NewNamespaced[*configurationv1.GlobalConfiguration](s.ResourceIndexer, namespace)} } // GlobalConfigurationNamespaceLister helps list and get GlobalConfigurations. @@ -40,15 +40,15 @@ func (s *globalConfigurationLister) GlobalConfigurations(namespace string) Globa type GlobalConfigurationNamespaceLister interface { // List lists all GlobalConfigurations in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.GlobalConfiguration, err error) + List(selector labels.Selector) (ret []*configurationv1.GlobalConfiguration, err error) // Get retrieves the GlobalConfiguration from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.GlobalConfiguration, error) + Get(name string) (*configurationv1.GlobalConfiguration, error) GlobalConfigurationNamespaceListerExpansion } // globalConfigurationNamespaceLister implements the GlobalConfigurationNamespaceLister // interface. type globalConfigurationNamespaceLister struct { - listers.ResourceIndexer[*v1.GlobalConfiguration] + listers.ResourceIndexer[*configurationv1.GlobalConfiguration] } diff --git a/pkg/client/listers/configuration/v1/policy.go b/pkg/client/listers/configuration/v1/policy.go index ff08fb90ce..5d783ee837 100644 --- a/pkg/client/listers/configuration/v1/policy.go +++ b/pkg/client/listers/configuration/v1/policy.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // PolicyLister helps list Policies. @@ -14,7 +14,7 @@ import ( type PolicyLister interface { // List lists all Policies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Policy, err error) + List(selector labels.Selector) (ret []*configurationv1.Policy, err error) // Policies returns an object that can list and get Policies. Policies(namespace string) PolicyNamespaceLister PolicyListerExpansion @@ -22,17 +22,17 @@ type PolicyLister interface { // policyLister implements the PolicyLister interface. type policyLister struct { - listers.ResourceIndexer[*v1.Policy] + listers.ResourceIndexer[*configurationv1.Policy] } // NewPolicyLister returns a new PolicyLister. func NewPolicyLister(indexer cache.Indexer) PolicyLister { - return &policyLister{listers.New[*v1.Policy](indexer, v1.Resource("policy"))} + return &policyLister{listers.New[*configurationv1.Policy](indexer, configurationv1.Resource("policy"))} } // Policies returns an object that can list and get Policies. func (s *policyLister) Policies(namespace string) PolicyNamespaceLister { - return policyNamespaceLister{listers.NewNamespaced[*v1.Policy](s.ResourceIndexer, namespace)} + return policyNamespaceLister{listers.NewNamespaced[*configurationv1.Policy](s.ResourceIndexer, namespace)} } // PolicyNamespaceLister helps list and get Policies. @@ -40,15 +40,15 @@ func (s *policyLister) Policies(namespace string) PolicyNamespaceLister { type PolicyNamespaceLister interface { // List lists all Policies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Policy, err error) + List(selector labels.Selector) (ret []*configurationv1.Policy, err error) // Get retrieves the Policy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Policy, error) + Get(name string) (*configurationv1.Policy, error) PolicyNamespaceListerExpansion } // policyNamespaceLister implements the PolicyNamespaceLister // interface. type policyNamespaceLister struct { - listers.ResourceIndexer[*v1.Policy] + listers.ResourceIndexer[*configurationv1.Policy] } diff --git a/pkg/client/listers/configuration/v1/transportserver.go b/pkg/client/listers/configuration/v1/transportserver.go index fff2207c95..de18b04de9 100644 --- a/pkg/client/listers/configuration/v1/transportserver.go +++ b/pkg/client/listers/configuration/v1/transportserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // TransportServerLister helps list TransportServers. @@ -14,7 +14,7 @@ import ( type TransportServerLister interface { // List lists all TransportServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.TransportServer, err error) + List(selector labels.Selector) (ret []*configurationv1.TransportServer, err error) // TransportServers returns an object that can list and get TransportServers. TransportServers(namespace string) TransportServerNamespaceLister TransportServerListerExpansion @@ -22,17 +22,17 @@ type TransportServerLister interface { // transportServerLister implements the TransportServerLister interface. type transportServerLister struct { - listers.ResourceIndexer[*v1.TransportServer] + listers.ResourceIndexer[*configurationv1.TransportServer] } // NewTransportServerLister returns a new TransportServerLister. func NewTransportServerLister(indexer cache.Indexer) TransportServerLister { - return &transportServerLister{listers.New[*v1.TransportServer](indexer, v1.Resource("transportserver"))} + return &transportServerLister{listers.New[*configurationv1.TransportServer](indexer, configurationv1.Resource("transportserver"))} } // TransportServers returns an object that can list and get TransportServers. func (s *transportServerLister) TransportServers(namespace string) TransportServerNamespaceLister { - return transportServerNamespaceLister{listers.NewNamespaced[*v1.TransportServer](s.ResourceIndexer, namespace)} + return transportServerNamespaceLister{listers.NewNamespaced[*configurationv1.TransportServer](s.ResourceIndexer, namespace)} } // TransportServerNamespaceLister helps list and get TransportServers. @@ -40,15 +40,15 @@ func (s *transportServerLister) TransportServers(namespace string) TransportServ type TransportServerNamespaceLister interface { // List lists all TransportServers in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.TransportServer, err error) + List(selector labels.Selector) (ret []*configurationv1.TransportServer, err error) // Get retrieves the TransportServer from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.TransportServer, error) + Get(name string) (*configurationv1.TransportServer, error) TransportServerNamespaceListerExpansion } // transportServerNamespaceLister implements the TransportServerNamespaceLister // interface. type transportServerNamespaceLister struct { - listers.ResourceIndexer[*v1.TransportServer] + listers.ResourceIndexer[*configurationv1.TransportServer] } diff --git a/pkg/client/listers/configuration/v1/virtualserver.go b/pkg/client/listers/configuration/v1/virtualserver.go index e50307e91d..6dc289db52 100644 --- a/pkg/client/listers/configuration/v1/virtualserver.go +++ b/pkg/client/listers/configuration/v1/virtualserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // VirtualServerLister helps list VirtualServers. @@ -14,7 +14,7 @@ import ( type VirtualServerLister interface { // List lists all VirtualServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.VirtualServer, err error) + List(selector labels.Selector) (ret []*configurationv1.VirtualServer, err error) // VirtualServers returns an object that can list and get VirtualServers. VirtualServers(namespace string) VirtualServerNamespaceLister VirtualServerListerExpansion @@ -22,17 +22,17 @@ type VirtualServerLister interface { // virtualServerLister implements the VirtualServerLister interface. type virtualServerLister struct { - listers.ResourceIndexer[*v1.VirtualServer] + listers.ResourceIndexer[*configurationv1.VirtualServer] } // NewVirtualServerLister returns a new VirtualServerLister. func NewVirtualServerLister(indexer cache.Indexer) VirtualServerLister { - return &virtualServerLister{listers.New[*v1.VirtualServer](indexer, v1.Resource("virtualserver"))} + return &virtualServerLister{listers.New[*configurationv1.VirtualServer](indexer, configurationv1.Resource("virtualserver"))} } // VirtualServers returns an object that can list and get VirtualServers. func (s *virtualServerLister) VirtualServers(namespace string) VirtualServerNamespaceLister { - return virtualServerNamespaceLister{listers.NewNamespaced[*v1.VirtualServer](s.ResourceIndexer, namespace)} + return virtualServerNamespaceLister{listers.NewNamespaced[*configurationv1.VirtualServer](s.ResourceIndexer, namespace)} } // VirtualServerNamespaceLister helps list and get VirtualServers. @@ -40,15 +40,15 @@ func (s *virtualServerLister) VirtualServers(namespace string) VirtualServerName type VirtualServerNamespaceLister interface { // List lists all VirtualServers in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.VirtualServer, err error) + List(selector labels.Selector) (ret []*configurationv1.VirtualServer, err error) // Get retrieves the VirtualServer from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.VirtualServer, error) + Get(name string) (*configurationv1.VirtualServer, error) VirtualServerNamespaceListerExpansion } // virtualServerNamespaceLister implements the VirtualServerNamespaceLister // interface. type virtualServerNamespaceLister struct { - listers.ResourceIndexer[*v1.VirtualServer] + listers.ResourceIndexer[*configurationv1.VirtualServer] } diff --git a/pkg/client/listers/configuration/v1/virtualserverroute.go b/pkg/client/listers/configuration/v1/virtualserverroute.go index edf8663957..675593a7f9 100644 --- a/pkg/client/listers/configuration/v1/virtualserverroute.go +++ b/pkg/client/listers/configuration/v1/virtualserverroute.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configurationv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // VirtualServerRouteLister helps list VirtualServerRoutes. @@ -14,7 +14,7 @@ import ( type VirtualServerRouteLister interface { // List lists all VirtualServerRoutes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.VirtualServerRoute, err error) + List(selector labels.Selector) (ret []*configurationv1.VirtualServerRoute, err error) // VirtualServerRoutes returns an object that can list and get VirtualServerRoutes. VirtualServerRoutes(namespace string) VirtualServerRouteNamespaceLister VirtualServerRouteListerExpansion @@ -22,17 +22,17 @@ type VirtualServerRouteLister interface { // virtualServerRouteLister implements the VirtualServerRouteLister interface. type virtualServerRouteLister struct { - listers.ResourceIndexer[*v1.VirtualServerRoute] + listers.ResourceIndexer[*configurationv1.VirtualServerRoute] } // NewVirtualServerRouteLister returns a new VirtualServerRouteLister. func NewVirtualServerRouteLister(indexer cache.Indexer) VirtualServerRouteLister { - return &virtualServerRouteLister{listers.New[*v1.VirtualServerRoute](indexer, v1.Resource("virtualserverroute"))} + return &virtualServerRouteLister{listers.New[*configurationv1.VirtualServerRoute](indexer, configurationv1.Resource("virtualserverroute"))} } // VirtualServerRoutes returns an object that can list and get VirtualServerRoutes. func (s *virtualServerRouteLister) VirtualServerRoutes(namespace string) VirtualServerRouteNamespaceLister { - return virtualServerRouteNamespaceLister{listers.NewNamespaced[*v1.VirtualServerRoute](s.ResourceIndexer, namespace)} + return virtualServerRouteNamespaceLister{listers.NewNamespaced[*configurationv1.VirtualServerRoute](s.ResourceIndexer, namespace)} } // VirtualServerRouteNamespaceLister helps list and get VirtualServerRoutes. @@ -40,15 +40,15 @@ func (s *virtualServerRouteLister) VirtualServerRoutes(namespace string) Virtual type VirtualServerRouteNamespaceLister interface { // List lists all VirtualServerRoutes in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.VirtualServerRoute, err error) + List(selector labels.Selector) (ret []*configurationv1.VirtualServerRoute, err error) // Get retrieves the VirtualServerRoute from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.VirtualServerRoute, error) + Get(name string) (*configurationv1.VirtualServerRoute, error) VirtualServerRouteNamespaceListerExpansion } // virtualServerRouteNamespaceLister implements the VirtualServerRouteNamespaceLister // interface. type virtualServerRouteNamespaceLister struct { - listers.ResourceIndexer[*v1.VirtualServerRoute] + listers.ResourceIndexer[*configurationv1.VirtualServerRoute] } diff --git a/pkg/client/listers/dos/v1beta1/dosprotectedresource.go b/pkg/client/listers/dos/v1beta1/dosprotectedresource.go index 5fcdef53d2..94a113f5a7 100644 --- a/pkg/client/listers/dos/v1beta1/dosprotectedresource.go +++ b/pkg/client/listers/dos/v1beta1/dosprotectedresource.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + dosv1beta1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/dos/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DosProtectedResourceLister helps list DosProtectedResources. @@ -14,7 +14,7 @@ import ( type DosProtectedResourceLister interface { // List lists all DosProtectedResources in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.DosProtectedResource, err error) + List(selector labels.Selector) (ret []*dosv1beta1.DosProtectedResource, err error) // DosProtectedResources returns an object that can list and get DosProtectedResources. DosProtectedResources(namespace string) DosProtectedResourceNamespaceLister DosProtectedResourceListerExpansion @@ -22,17 +22,17 @@ type DosProtectedResourceLister interface { // dosProtectedResourceLister implements the DosProtectedResourceLister interface. type dosProtectedResourceLister struct { - listers.ResourceIndexer[*v1beta1.DosProtectedResource] + listers.ResourceIndexer[*dosv1beta1.DosProtectedResource] } // NewDosProtectedResourceLister returns a new DosProtectedResourceLister. func NewDosProtectedResourceLister(indexer cache.Indexer) DosProtectedResourceLister { - return &dosProtectedResourceLister{listers.New[*v1beta1.DosProtectedResource](indexer, v1beta1.Resource("dosprotectedresource"))} + return &dosProtectedResourceLister{listers.New[*dosv1beta1.DosProtectedResource](indexer, dosv1beta1.Resource("dosprotectedresource"))} } // DosProtectedResources returns an object that can list and get DosProtectedResources. func (s *dosProtectedResourceLister) DosProtectedResources(namespace string) DosProtectedResourceNamespaceLister { - return dosProtectedResourceNamespaceLister{listers.NewNamespaced[*v1beta1.DosProtectedResource](s.ResourceIndexer, namespace)} + return dosProtectedResourceNamespaceLister{listers.NewNamespaced[*dosv1beta1.DosProtectedResource](s.ResourceIndexer, namespace)} } // DosProtectedResourceNamespaceLister helps list and get DosProtectedResources. @@ -40,15 +40,15 @@ func (s *dosProtectedResourceLister) DosProtectedResources(namespace string) Dos type DosProtectedResourceNamespaceLister interface { // List lists all DosProtectedResources in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.DosProtectedResource, err error) + List(selector labels.Selector) (ret []*dosv1beta1.DosProtectedResource, err error) // Get retrieves the DosProtectedResource from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.DosProtectedResource, error) + Get(name string) (*dosv1beta1.DosProtectedResource, error) DosProtectedResourceNamespaceListerExpansion } // dosProtectedResourceNamespaceLister implements the DosProtectedResourceNamespaceLister // interface. type dosProtectedResourceNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.DosProtectedResource] + listers.ResourceIndexer[*dosv1beta1.DosProtectedResource] } diff --git a/pkg/client/listers/externaldns/v1/dnsendpoint.go b/pkg/client/listers/externaldns/v1/dnsendpoint.go index 1b6899895a..7c71cf930a 100644 --- a/pkg/client/listers/externaldns/v1/dnsendpoint.go +++ b/pkg/client/listers/externaldns/v1/dnsendpoint.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + externaldnsv1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DNSEndpointLister helps list DNSEndpoints. @@ -14,7 +14,7 @@ import ( type DNSEndpointLister interface { // List lists all DNSEndpoints in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DNSEndpoint, err error) + List(selector labels.Selector) (ret []*externaldnsv1.DNSEndpoint, err error) // DNSEndpoints returns an object that can list and get DNSEndpoints. DNSEndpoints(namespace string) DNSEndpointNamespaceLister DNSEndpointListerExpansion @@ -22,17 +22,17 @@ type DNSEndpointLister interface { // dNSEndpointLister implements the DNSEndpointLister interface. type dNSEndpointLister struct { - listers.ResourceIndexer[*v1.DNSEndpoint] + listers.ResourceIndexer[*externaldnsv1.DNSEndpoint] } // NewDNSEndpointLister returns a new DNSEndpointLister. func NewDNSEndpointLister(indexer cache.Indexer) DNSEndpointLister { - return &dNSEndpointLister{listers.New[*v1.DNSEndpoint](indexer, v1.Resource("dnsendpoint"))} + return &dNSEndpointLister{listers.New[*externaldnsv1.DNSEndpoint](indexer, externaldnsv1.Resource("dnsendpoint"))} } // DNSEndpoints returns an object that can list and get DNSEndpoints. func (s *dNSEndpointLister) DNSEndpoints(namespace string) DNSEndpointNamespaceLister { - return dNSEndpointNamespaceLister{listers.NewNamespaced[*v1.DNSEndpoint](s.ResourceIndexer, namespace)} + return dNSEndpointNamespaceLister{listers.NewNamespaced[*externaldnsv1.DNSEndpoint](s.ResourceIndexer, namespace)} } // DNSEndpointNamespaceLister helps list and get DNSEndpoints. @@ -40,15 +40,15 @@ func (s *dNSEndpointLister) DNSEndpoints(namespace string) DNSEndpointNamespaceL type DNSEndpointNamespaceLister interface { // List lists all DNSEndpoints in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DNSEndpoint, err error) + List(selector labels.Selector) (ret []*externaldnsv1.DNSEndpoint, err error) // Get retrieves the DNSEndpoint from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.DNSEndpoint, error) + Get(name string) (*externaldnsv1.DNSEndpoint, error) DNSEndpointNamespaceListerExpansion } // dNSEndpointNamespaceLister implements the DNSEndpointNamespaceLister // interface. type dNSEndpointNamespaceLister struct { - listers.ResourceIndexer[*v1.DNSEndpoint] + listers.ResourceIndexer[*externaldnsv1.DNSEndpoint] }