diff --git a/go.mod b/go.mod index 78e59ca9a..d32a7f01a 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/harvester/harvester-load-balancer go 1.24.5 replace ( - github.com/openshift/api => github.com/openshift/api v0.0.0-20250106182855-361e35fd82e5 - github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20250106104058-89709a455e2a + github.com/openshift/api => github.com/openshift/api v0.0.0-20250910195410-e515d9c65abd + github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379 github.com/rancher/lasso => github.com/rancher/lasso v0.0.0-20241202185148-04649f379358 github.com/rancher/rancher => github.com/rancher/rancher v0.0.0-20241119020906-df45e368c82d - github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20240919204204-3da2ae0cabd1 + github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20250910194406-58abf492671b github.com/rancher/steve => github.com/rancher/steve v0.5.6 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 k8s.io/api => k8s.io/api v0.31.5 @@ -17,9 +17,9 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.31.5 k8s.io/code-generator => k8s.io/code-generator v0.31.5 k8s.io/component-base => k8s.io/component-base v0.31.5 - k8s.io/gengo/v2 => k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 + k8s.io/gengo/v2 => k8s.io/gengo/v2 v2.0.0-20250903151518-081d64401ab4 k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.31.5 - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 kubevirt.io/client-go => kubevirt.io/client-go v1.5.1 sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.4 ) @@ -29,13 +29,13 @@ require ( github.com/containernetworking/plugins v1.5.0 github.com/harvester/harvester v1.5.1 github.com/harvester/webhook v0.1.5 - github.com/rancher/lasso v0.2.3 + github.com/rancher/lasso v0.2.4 github.com/rancher/rancher v0.0.0-20241119020906-df45e368c82d github.com/rancher/rancher/pkg/apis v0.0.0 - github.com/rancher/wrangler/v3 v3.2.2 + github.com/rancher/wrangler/v3 v3.2.4 github.com/sirupsen/logrus v1.9.3 - github.com/tevino/tcp-shaker v0.0.0-20191112104505-00eab0aefc80 - github.com/urfave/cli v1.22.16 + github.com/tevino/tcp-shaker v0.0.0-20250909043154-0d2151ffed43 + github.com/urfave/cli v1.22.17 k8s.io/api v0.33.2 k8s.io/apimachinery v0.33.2 k8s.io/client-go v12.0.0+incompatible @@ -43,7 +43,7 @@ require ( ) require ( - cel.dev/expr v0.23.0 // indirect + cel.dev/expr v0.24.0 // indirect emperror.dev/errors v0.8.1 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect @@ -75,19 +75,19 @@ require ( github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/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/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.4 // indirect + github.com/golang/glog v1.2.5 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/cel-go v0.23.2 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -128,7 +128,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/ncruces/go-strftime v0.1.9 // indirect - github.com/onsi/gomega v1.37.0 // indirect + github.com/onsi/gomega v1.38.0 // indirect github.com/openshift/api v0.0.0 // indirect github.com/openshift/client-go v0.0.0 // indirect github.com/openshift/custom-resource-status v1.1.2 // indirect @@ -141,12 +141,13 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/rancher/aks-operator v1.12.0 // indirect + github.com/rancher/aks-operator v1.12.1 // indirect + github.com/rancher/ali-operator v0.0.0-20250820165811-6163f9930e10 // indirect github.com/rancher/apiserver v0.6.3 // indirect github.com/rancher/dynamiclistener v0.7.0 // indirect - github.com/rancher/eks-operator v1.12.0 // indirect + github.com/rancher/eks-operator v1.12.1 // indirect github.com/rancher/fleet/pkg/apis v0.13.0 // indirect - github.com/rancher/gke-operator v1.12.0 // indirect + github.com/rancher/gke-operator v1.12.1 // indirect github.com/rancher/kubernetes-provider-detector v0.1.5 // indirect github.com/rancher/norman v0.7.0 // indirect github.com/rancher/remotedialer v0.5.0 // indirect @@ -185,21 +186,22 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/crypto v0.40.0 // indirect + go.yaml.in/yaml/v3 v3.0.3 // indirect + golang.org/x/crypto v0.41.0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect - golang.org/x/mod v0.25.0 // indirect - golang.org/x/net v0.42.0 // indirect + golang.org/x/mod v0.27.0 // indirect + golang.org/x/net v0.43.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/term v0.33.0 // indirect - golang.org/x/text v0.27.0 // indirect + golang.org/x/sys v0.36.0 // indirect + golang.org/x/term v0.34.0 // indirect + golang.org/x/text v0.28.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.34.0 // indirect + golang.org/x/tools v0.36.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/grpc v1.73.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 // indirect + google.golang.org/grpc v1.74.2 // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -212,7 +214,7 @@ require ( k8s.io/code-generator v0.33.2 // indirect k8s.io/component-base v0.33.2 // indirect k8s.io/gengo v0.0.0-20250130153323-76c5745d3511 // indirect - k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 // indirect + k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect k8s.io/helm v2.17.0+incompatible // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect @@ -235,6 +237,8 @@ require ( sigs.k8s.io/cluster-api v1.10.2 // indirect sigs.k8s.io/controller-runtime v0.21.0 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.2.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 92d5d58a0..5f3846b55 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,12 @@ -cel.dev/expr v0.23.0 h1:wUb94w6OYQS4uXraxo9U+wUAs9jT47Xvl4iPgAwM2ss= -cel.dev/expr v0.23.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= emperror.dev/errors v0.8.1 h1:UavXZ5cSX/4u9iyvH6aDcuGkVjeexUGJ7Ij7G4VfQT0= emperror.dev/errors v0.8.1/go.mod h1:YcRvLPh626Ubn2xqtoprejnA5nFha+TJ+2vew48kWuE= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -19,7 +18,6 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= @@ -56,7 +54,6 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= 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.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -68,7 +65,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= @@ -105,8 +101,9 @@ github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -143,8 +140,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= -github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= @@ -167,8 +164,8 @@ github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76 github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -185,10 +182,10 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= @@ -298,7 +295,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= @@ -356,12 +352,12 @@ github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3ev github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= -github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= -github.com/openshift/api v0.0.0-20250106182855-361e35fd82e5 h1:sCuu1GPr/NFMrQt95plJ455BnssYfxycOSEl1oYOexs= -github.com/openshift/api v0.0.0-20250106182855-361e35fd82e5/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= -github.com/openshift/client-go v0.0.0-20250106104058-89709a455e2a h1:8lwO4lGTwHuVXsIeFoW3t7AEBROW5quMj5YjH9jF+98= -github.com/openshift/client-go v0.0.0-20250106104058-89709a455e2a/go.mod h1:34qRf2MsrJKXKAL8qxIkxZ3O5G+YhOB7foCR04H26JE= +github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= +github.com/openshift/api v0.0.0-20250910195410-e515d9c65abd h1:quMzDCsSBlGVy2mIrhRrHtPe19ahBnCqQykZxtW0btk= +github.com/openshift/api v0.0.0-20250910195410-e515d9c65abd/go.mod h1:SPLf21TYPipzCO67BURkCfK6dcIIxx0oNRVWaOyRcXM= +github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379 h1:Xr47DBqFVjpLdU4BTtCS5l2XojbRYap2FIPdSj8YYzU= +github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379/go.mod h1:HouQRy4JgvTBpxcyw1YSD/Lp+wjOaUrxjWFHlMtZsk8= github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= @@ -392,18 +388,20 @@ github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkq github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rancher/aks-operator v1.12.0 h1:ua3jHCX1AtF2eFx7XBmqeGFEVFwbd9WckRMkR9Gc018= -github.com/rancher/aks-operator v1.12.0/go.mod h1:tgoEZKKWIwgydqoqAyTKv4jw7nrp4uVgjtSQjbtPH4Q= +github.com/rancher/aks-operator v1.12.1 h1:xh6zog+7+kQLwoaRDqz/LMf9/SD3L3G4tNsgY8wQmh8= +github.com/rancher/aks-operator v1.12.1/go.mod h1:egCt7JaCf4SqBtF+PbHS6mJ06pbXvkWfjF1o3VhHqVs= +github.com/rancher/ali-operator v0.0.0-20250820165811-6163f9930e10 h1:ZEhSdJtDK9B7sTAdwWvOxn3lY4azKcvmw3sAuSrfrUo= +github.com/rancher/ali-operator v0.0.0-20250820165811-6163f9930e10/go.mod h1:Mk4SQsBu51Kye0kIf3QVUMqiOUzGqJMnhloUHSkHctQ= github.com/rancher/apiserver v0.6.3 h1:O77xSHtDNNq8j9+FjyoMoJNaNomnA/doYK9ON8bDeEA= github.com/rancher/apiserver v0.6.3/go.mod h1:hCNwZwGitxLDIFrhkN+8smoRXKYOJ9zqOCwIAX+sHcQ= github.com/rancher/dynamiclistener v0.7.0 h1:+jyfZ4lVamc1UbKWo8V8dhSPtCgRZYaY8nm7wiHeko4= github.com/rancher/dynamiclistener v0.7.0/go.mod h1:Q2YA42xp7Xc69JiSlJ8GpvLvze261T0iQ/TP4RdMCYk= -github.com/rancher/eks-operator v1.12.0 h1:aCtmb3+mNQXLGYc+bdzPqmLWtcVDNYZVJotsmvRWe7E= -github.com/rancher/eks-operator v1.12.0/go.mod h1:SH6kmwuor3zG3CWfyLCYb60gpEF1YmZYvFPaWLH5PdY= +github.com/rancher/eks-operator v1.12.1 h1:ZsaDyQa1Ykrf9b1Ux11DICIV4JXRy14kWKqE0JfAZg0= +github.com/rancher/eks-operator v1.12.1/go.mod h1:3hz8e7XqekMw/76TShanMS/iMBcQoom2j7/B9nyKbVQ= github.com/rancher/fleet/pkg/apis v0.13.0 h1:soXF3cKWD9sMRcX5OlVnOY8aoPr+/FF8DP/zZtLLe3g= github.com/rancher/fleet/pkg/apis v0.13.0/go.mod h1:LpFIRtWNJe6Tf4EGJ/brPtutyTUlFj2hJDso1/5CO7Y= -github.com/rancher/gke-operator v1.12.0 h1:xFSYu2hMDqNuJ10QXVzYsKB4ibLzYMfYXZ5vFC4bdA0= -github.com/rancher/gke-operator v1.12.0/go.mod h1:MQhzSNINfT3dpFz8OE0a3DvGd4y4Q0VifHIv19b3vIk= +github.com/rancher/gke-operator v1.12.1 h1:zH2DEQsea+kG61cN0+1NWDQp0FyN28o2XIm5ieRLCKU= +github.com/rancher/gke-operator v1.12.1/go.mod h1:TbOTInXvdC1fPAxj2BHlRIh2j7ezTVQ7eIJW+udz5Xg= github.com/rancher/kubernetes-provider-detector v0.1.5 h1:hWRAsWuJOemzGjz/XrbTlM7QmfO4OedvFE3QwXiH60I= github.com/rancher/kubernetes-provider-detector v0.1.5/go.mod h1:ypuJS7kP7rUiAn330xG46mj+Nhvym05GM8NqMVekpH0= github.com/rancher/lasso v0.0.0-20241202185148-04649f379358 h1:pJwgJXPt4fi0ysXsJcl28rvxhx/Z/9SNCDwFOEyeGu0= @@ -412,8 +410,8 @@ github.com/rancher/norman v0.7.0 h1:duBZxekBj13k/2RTyWKZgV/ntXkIXm0sRKqwFO8ui+I= github.com/rancher/norman v0.7.0/go.mod h1:IOQn3CNCms6UK72QHujesLKedqZh4+SP8/FDEFc+7Ns= github.com/rancher/rancher v0.0.0-20241119020906-df45e368c82d h1:lF/PobfIj+0heLOOZhS3j46tiHKJTOddf6VIKOXOOc8= github.com/rancher/rancher v0.0.0-20241119020906-df45e368c82d/go.mod h1:iwW9bODi2UHH4Ugn7mV0KXMA5IPadejiz3Szl+zRJQg= -github.com/rancher/rancher/pkg/apis v0.0.0-20240919204204-3da2ae0cabd1 h1:2WvEEhTGpeuDQDfbeC0pHZBGrDJpo7kHmp8udxgIwDc= -github.com/rancher/rancher/pkg/apis v0.0.0-20240919204204-3da2ae0cabd1/go.mod h1:npd+q1ySuNMlQ8B1+2Pt917wNDytCJKkNZQG+QcevuI= +github.com/rancher/rancher/pkg/apis v0.0.0-20250910194406-58abf492671b h1:Bw+5FjbupXWQ493HHwsJAv+IsSOxzIagUQb1qtSKmXU= +github.com/rancher/rancher/pkg/apis v0.0.0-20250910194406-58abf492671b/go.mod h1:XxUUX9lqdYCKK2Jr1Bix/eRntSY1qRw72uKMkFI05Z8= github.com/rancher/remotedialer v0.5.0 h1:4H1o9ZBdA1nboaMPBvy03EQlFWXXzwcdMAXLmafop54= github.com/rancher/remotedialer v0.5.0/go.mod h1:hpx8oaoxXyy8yHMWH5Iv8GcdVlYEYYzgVNjeXZrhv8E= github.com/rancher/rke v1.8.0-rc.4 h1:jowVyaF3LsJonC7vNsAwWf3MONHAtEFUD/j3UzNSE5U= @@ -424,8 +422,8 @@ github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250710162344-185f github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250710162344-185ff9f785cd/go.mod h1:VfRrgue4yl6O0GYakMGYgyByu7ySooPQWWRxTt2MIEI= github.com/rancher/wrangler v1.1.2 h1:oXbXo9k7y/H4drUpb4RM1c++vT9O3rpoNEfyusGykiU= github.com/rancher/wrangler v1.1.2/go.mod h1:2k9MyhlBdjcutcBGoOJSUAz0HgDAXnMjv81d3n/AaQc= -github.com/rancher/wrangler/v3 v3.2.2 h1:IK1/v8n8gaZSB4izmJhGFXJt38Z8gkbwzl3Lo/e2jQc= -github.com/rancher/wrangler/v3 v3.2.2/go.mod h1:TA1QuuQxrtn/kmJbBLW/l24IcfHBmSXBa9an3IRlqQQ= +github.com/rancher/wrangler/v3 v3.2.4 h1:pgpLwsmgQvTSSknxddJDq+ObIiOXFggCWdDyB0z7YcA= +github.com/rancher/wrangler/v3 v3.2.4/go.mod h1:TA1QuuQxrtn/kmJbBLW/l24IcfHBmSXBa9an3IRlqQQ= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= @@ -478,12 +476,12 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl 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/tevino/tcp-shaker v0.0.0-20191112104505-00eab0aefc80 h1:sb31WKdNlj2prwQwgjHHkayI3cKUlS+V4mmImc1GGpw= -github.com/tevino/tcp-shaker v0.0.0-20191112104505-00eab0aefc80/go.mod h1:2F2ToSBehSmJcaQPE0lNhfH3xv+9Z2vH1a/d9fFw1nE= +github.com/tevino/tcp-shaker v0.0.0-20250909043154-0d2151ffed43 h1:Ia03R5RbdWZnkXlAHOWaC3vLUoqTt/YJdilzhPcGoOk= +github.com/tevino/tcp-shaker v0.0.0-20250909043154-0d2151ffed43/go.mod h1:gVVEyp+X4ftT5m+9O8xbaEY76A4k4fxajiG6Hw/j3h4= 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.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= -github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= +github.com/urfave/cli v1.22.17 h1:SYzXoiPfQjHBbkYxbew5prZHS1TOLT3ierW8SYLqtVQ= +github.com/urfave/cli v1.22.17/go.mod h1:b0ht0aqgH/6pBYzzxURyrM4xXNgsoT/n2ZzwQiEhNVo= github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa h1:iAhToRwOrdk+pKzclvLM7nKZhsg8f7dVrgkFccDUbUw= github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= @@ -569,8 +567,11 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -588,8 +589,11 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -627,8 +631,11 @@ golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= @@ -647,6 +654,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -655,7 +664,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -696,10 +704,15 @@ golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= +golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b/go.mod h1:4ZwOYna0/zsOKwuR5X/m0QFOJpSZvAxFfkQT+Erd9D4= +golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -720,8 +733,10 @@ golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= -golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -738,8 +753,11 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= @@ -764,28 +782,34 @@ golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.34.1-0.20250613162507-3f93fece84c7/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= -google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 h1:vPV0tzlsK6EzEDHNNH5sa7Hs9bd7iXR7B1tSiPepkV0= -google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:pKLAc5OolXC3ViWGI62vvC0n10CpwAtRcTNCFwTKBEw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= -google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 h1:MAKi5q709QWfnkkpNQ0M12hYJ1+e8qYVDyowc4U1XZM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -798,6 +822,7 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -845,8 +870,8 @@ k8s.io/component-base v0.31.5/go.mod h1:OiiusrmcLz42i9VvcAd94yQIN7UzQHJxN/hXxwYz k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20250130153323-76c5745d3511 h1:4eL6zr5VCj71nu2nOuQ6j6m/kqh5WueXBN8daZkNe90= k8s.io/gengo v0.0.0-20250130153323-76c5745d3511/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/gengo/v2 v2.0.0-20250903151518-081d64401ab4 h1:I8k0vOOD2ZQWs3PtYXC0mjJdlIMriS0O/N+RjSkWB48= +k8s.io/gengo/v2 v2.0.0-20250903151518-081d64401ab4/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao= k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= @@ -854,20 +879,18 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kms v0.32.2 h1:7Ff23ht7W40gTcDwUC8G5WjX5W/nxD8WxbNhIYYNZCI= k8s.io/kms v0.32.2/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= k8s.io/kube-aggregator v0.31.5 h1:ibCqykJwv7Ht4tgwd1793N6h444gf5m7ZH2dpJ0r4yI= k8s.io/kube-aggregator v0.31.5/go.mod h1:bWajrGqcljoq5w1zWwj1qU34VoKfZeMZSCbK/vp127s= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/kubernetes v1.33.1 h1:86+VVY/f11taZdpEZrNciLw1MIQhu6BFXf/OMFn5EUg= k8s.io/kubernetes v1.33.1/go.mod h1:2nWuPk0seE4+6sd0x60wQ6rYEXcV7SoeMbU0YbFm/5k= k8s.io/mount-utils v0.32.2 h1:aDwp+ucWiVnDr/LpRg88/dsXf/vm6gI1VZkYH3+3+Vw= k8s.io/mount-utils v0.32.2/go.mod h1:Kun5c2svjAPx0nnvJKYQWhfeNW+O0EpzHgRhDcYoSY0= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= @@ -919,12 +942,13 @@ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= +sigs.k8s.io/structured-merge-diff/v6 v6.2.0 h1:msyqjP8Nyd5sF3QSmJouFSzcBIdwq4ct8d1/7VSBHIQ= +sigs.k8s.io/structured-merge-diff/v6 v6.2.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/vendor/cel.dev/expr/eval.pb.go b/vendor/cel.dev/expr/eval.pb.go index 8f651f9cc..a7aae0900 100644 --- a/vendor/cel.dev/expr/eval.pb.go +++ b/vendor/cel.dev/expr/eval.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 +// protoc-gen-go v1.36.3 +// protoc v5.27.1 // source: cel/expr/eval.proto package expr import ( - status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" ) @@ -22,21 +22,18 @@ const ( ) type EvalState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []*ExprValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + Results []*EvalState_Result `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"` unknownFields protoimpl.UnknownFields - - Values []*ExprValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - Results []*EvalState_Result `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EvalState) Reset() { *x = EvalState{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cel_expr_eval_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalState) String() string { @@ -47,7 +44,7 @@ func (*EvalState) ProtoMessage() {} func (x *EvalState) ProtoReflect() protoreflect.Message { mi := &file_cel_expr_eval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77,25 +74,22 @@ func (x *EvalState) GetResults() []*EvalState_Result { } type ExprValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *ExprValue_Value // *ExprValue_Error // *ExprValue_Unknown - Kind isExprValue_Kind `protobuf_oneof:"kind"` + Kind isExprValue_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExprValue) Reset() { *x = ExprValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cel_expr_eval_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExprValue) String() string { @@ -106,7 +100,7 @@ func (*ExprValue) ProtoMessage() {} func (x *ExprValue) ProtoReflect() protoreflect.Message { mi := &file_cel_expr_eval_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,30 +115,36 @@ func (*ExprValue) Descriptor() ([]byte, []int) { return file_cel_expr_eval_proto_rawDescGZIP(), []int{1} } -func (m *ExprValue) GetKind() isExprValue_Kind { - if m != nil { - return m.Kind +func (x *ExprValue) GetKind() isExprValue_Kind { + if x != nil { + return x.Kind } return nil } func (x *ExprValue) GetValue() *Value { - if x, ok := x.GetKind().(*ExprValue_Value); ok { - return x.Value + if x != nil { + if x, ok := x.Kind.(*ExprValue_Value); ok { + return x.Value + } } return nil } func (x *ExprValue) GetError() *ErrorSet { - if x, ok := x.GetKind().(*ExprValue_Error); ok { - return x.Error + if x != nil { + if x, ok := x.Kind.(*ExprValue_Error); ok { + return x.Error + } } return nil } func (x *ExprValue) GetUnknown() *UnknownSet { - if x, ok := x.GetKind().(*ExprValue_Unknown); ok { - return x.Unknown + if x != nil { + if x, ok := x.Kind.(*ExprValue_Unknown); ok { + return x.Unknown + } } return nil } @@ -172,20 +172,17 @@ func (*ExprValue_Error) isExprValue_Kind() {} func (*ExprValue_Unknown) isExprValue_Kind() {} type ErrorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Errors []*Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` unknownFields protoimpl.UnknownFields - - Errors []*status.Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ErrorSet) Reset() { *x = ErrorSet{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cel_expr_eval_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorSet) String() string { @@ -196,7 +193,7 @@ func (*ErrorSet) ProtoMessage() {} func (x *ErrorSet) ProtoReflect() protoreflect.Message { mi := &file_cel_expr_eval_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,28 +208,85 @@ func (*ErrorSet) Descriptor() ([]byte, []int) { return file_cel_expr_eval_proto_rawDescGZIP(), []int{2} } -func (x *ErrorSet) GetErrors() []*status.Status { +func (x *ErrorSet) GetErrors() []*Status { if x != nil { return x.Errors } return nil } -type UnknownSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - Exprs []int64 `protobuf:"varint,1,rep,packed,name=exprs,proto3" json:"exprs,omitempty"` +func (x *Status) Reset() { + *x = Status{} + mi := &file_cel_expr_eval_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *UnknownSet) Reset() { - *x = UnknownSet{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[3] +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_eval_proto_msgTypes[3] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_cel_expr_eval_proto_rawDescGZIP(), []int{3} +} + +func (x *Status) GetCode() int32 { + if x != nil { + return x.Code } + return 0 +} + +func (x *Status) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Status) GetDetails() []*anypb.Any { + if x != nil { + return x.Details + } + return nil +} + +type UnknownSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + Exprs []int64 `protobuf:"varint,1,rep,packed,name=exprs,proto3" json:"exprs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnknownSet) Reset() { + *x = UnknownSet{} + mi := &file_cel_expr_eval_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnknownSet) String() string { @@ -242,8 +296,8 @@ func (x *UnknownSet) String() string { func (*UnknownSet) ProtoMessage() {} func (x *UnknownSet) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_cel_expr_eval_proto_msgTypes[4] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,7 +309,7 @@ func (x *UnknownSet) ProtoReflect() protoreflect.Message { // Deprecated: Use UnknownSet.ProtoReflect.Descriptor instead. func (*UnknownSet) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{3} + return file_cel_expr_eval_proto_rawDescGZIP(), []int{4} } func (x *UnknownSet) GetExprs() []int64 { @@ -266,21 +320,18 @@ func (x *UnknownSet) GetExprs() []int64 { } type EvalState_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Expr int64 `protobuf:"varint,1,opt,name=expr,proto3" json:"expr,omitempty"` + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Expr int64 `protobuf:"varint,1,opt,name=expr,proto3" json:"expr,omitempty"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EvalState_Result) Reset() { *x = EvalState_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cel_expr_eval_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalState_Result) String() string { @@ -290,8 +341,8 @@ func (x *EvalState_Result) String() string { func (*EvalState_Result) ProtoMessage() {} func (x *EvalState_Result) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_cel_expr_eval_proto_msgTypes[5] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,39 +376,45 @@ var File_cel_expr_eval_proto protoreflect.FileDescriptor var file_cel_expr_eval_proto_rawDesc = []byte{ 0x0a, 0x13, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x1a, - 0x14, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, - 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, - 0x01, 0x0a, 0x09, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, - 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, - 0x32, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x22, 0x36, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x06, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x42, 0x2c, 0x0a, 0x0c, - 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x09, 0x45, 0x76, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, - 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x63, 0x65, 0x6c, 0x2f, + 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa2, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, + 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x1a, 0x32, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, + 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, + 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, + 0x65, 0x78, 0x70, 0x72, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x48, + 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x28, + 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x22, 0x22, 0x0a, 0x0a, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x65, + 0x78, 0x70, 0x72, 0x73, 0x42, 0x2c, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, + 0x65, 0x78, 0x70, 0x72, 0x42, 0x09, 0x45, 0x76, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, + 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -372,28 +429,30 @@ func file_cel_expr_eval_proto_rawDescGZIP() []byte { return file_cel_expr_eval_proto_rawDescData } -var file_cel_expr_eval_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cel_expr_eval_proto_goTypes = []interface{}{ +var file_cel_expr_eval_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cel_expr_eval_proto_goTypes = []any{ (*EvalState)(nil), // 0: cel.expr.EvalState (*ExprValue)(nil), // 1: cel.expr.ExprValue (*ErrorSet)(nil), // 2: cel.expr.ErrorSet - (*UnknownSet)(nil), // 3: cel.expr.UnknownSet - (*EvalState_Result)(nil), // 4: cel.expr.EvalState.Result - (*Value)(nil), // 5: cel.expr.Value - (*status.Status)(nil), // 6: google.rpc.Status + (*Status)(nil), // 3: cel.expr.Status + (*UnknownSet)(nil), // 4: cel.expr.UnknownSet + (*EvalState_Result)(nil), // 5: cel.expr.EvalState.Result + (*Value)(nil), // 6: cel.expr.Value + (*anypb.Any)(nil), // 7: google.protobuf.Any } var file_cel_expr_eval_proto_depIdxs = []int32{ 1, // 0: cel.expr.EvalState.values:type_name -> cel.expr.ExprValue - 4, // 1: cel.expr.EvalState.results:type_name -> cel.expr.EvalState.Result - 5, // 2: cel.expr.ExprValue.value:type_name -> cel.expr.Value + 5, // 1: cel.expr.EvalState.results:type_name -> cel.expr.EvalState.Result + 6, // 2: cel.expr.ExprValue.value:type_name -> cel.expr.Value 2, // 3: cel.expr.ExprValue.error:type_name -> cel.expr.ErrorSet - 3, // 4: cel.expr.ExprValue.unknown:type_name -> cel.expr.UnknownSet - 6, // 5: cel.expr.ErrorSet.errors:type_name -> google.rpc.Status - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 4, // 4: cel.expr.ExprValue.unknown:type_name -> cel.expr.UnknownSet + 3, // 5: cel.expr.ErrorSet.errors:type_name -> cel.expr.Status + 7, // 6: cel.expr.Status.details:type_name -> google.protobuf.Any + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cel_expr_eval_proto_init() } @@ -402,69 +461,7 @@ func file_cel_expr_eval_proto_init() { return } file_cel_expr_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_cel_expr_eval_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExprValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnknownSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalState_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cel_expr_eval_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_cel_expr_eval_proto_msgTypes[1].OneofWrappers = []any{ (*ExprValue_Value)(nil), (*ExprValue_Error)(nil), (*ExprValue_Unknown)(nil), @@ -475,7 +472,7 @@ func file_cel_expr_eval_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cel_expr_eval_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/github.com/go-logr/logr/.golangci.yaml b/vendor/github.com/go-logr/logr/.golangci.yaml index 0cffafa7b..0ed62c1a1 100644 --- a/vendor/github.com/go-logr/logr/.golangci.yaml +++ b/vendor/github.com/go-logr/logr/.golangci.yaml @@ -1,26 +1,28 @@ +version: "2" + run: timeout: 1m tests: true linters: - disable-all: true - enable: + default: none + enable: # please keep this alphabetized + - asasalint - asciicheck + - copyloopvar + - dupl - errcheck - forcetypeassert + - goconst - gocritic - - gofmt - - goimports - - gosimple - govet - ineffassign - misspell + - musttag - revive - staticcheck - - typecheck - unused issues: - exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 10 diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go index 30568e768..b22c57d71 100644 --- a/vendor/github.com/go-logr/logr/funcr/funcr.go +++ b/vendor/github.com/go-logr/logr/funcr/funcr.go @@ -77,7 +77,7 @@ func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { write: fn, } // For skipping fnlogger.Info and fnlogger.Error. - l.Formatter.AddCallDepth(1) + l.AddCallDepth(1) // via Formatter return l } @@ -164,17 +164,17 @@ type fnlogger struct { } func (l fnlogger) WithName(name string) logr.LogSink { - l.Formatter.AddName(name) + l.AddName(name) // via Formatter return &l } func (l fnlogger) WithValues(kvList ...any) logr.LogSink { - l.Formatter.AddValues(kvList) + l.AddValues(kvList) // via Formatter return &l } func (l fnlogger) WithCallDepth(depth int) logr.LogSink { - l.Formatter.AddCallDepth(depth) + l.AddCallDepth(depth) // via Formatter return &l } diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go index 1b632e077..c8bebc3be 100644 --- a/vendor/github.com/golang/glog/glog.go +++ b/vendor/github.com/golang/glog/glog.go @@ -238,6 +238,8 @@ func ctxlogf(ctx context.Context, depth int, severity logsink.Severity, verbose metaPool.Put(metai) } +var sinkErrOnce sync.Once + func sinkf(meta *logsink.Meta, format string, args ...any) { meta.Depth++ n, err := logsink.Printf(meta, format, args...) @@ -247,9 +249,20 @@ func sinkf(meta *logsink.Meta, format string, args ...any) { } if err != nil { - logsink.Printf(meta, "glog: exiting because of error: %s", err) - sinks.file.Flush() - os.Exit(2) + // Best-effort to generate a reasonable Fatalf-like + // error message in all sinks that are still here for + // the first goroutine that comes here and terminate + // the process. + sinkErrOnce.Do(func() { + m := &logsink.Meta{} + m.Time = timeNow() + m.Severity = logsink.Fatal + m.Thread = int64(pid) + _, m.File, m.Line, _ = runtime.Caller(0) + format, args := appendBacktrace(1, "log: exiting because of error writing previous log to sinks: %v", []any{err}) + logsink.Printf(m, format, args...) + flushAndAbort() + }) } } @@ -642,6 +655,10 @@ func ErrorContextDepthf(ctx context.Context, depth int, format string, args ...a func ctxfatalf(ctx context.Context, depth int, format string, args ...any) { ctxlogf(ctx, depth+1, logsink.Fatal, false, withStack, format, args...) + flushAndAbort() +} + +func flushAndAbort() { sinks.file.Flush() err := abortProcess() // Should not return. diff --git a/vendor/github.com/google/gnostic-models/compiler/context.go b/vendor/github.com/google/gnostic-models/compiler/context.go index 1bfe96121..26b31e51e 100644 --- a/vendor/github.com/google/gnostic-models/compiler/context.go +++ b/vendor/github.com/google/gnostic-models/compiler/context.go @@ -15,7 +15,7 @@ package compiler import ( - yaml "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" ) // Context contains state of the compiler as it traverses a document. diff --git a/vendor/github.com/google/gnostic-models/compiler/extensions.go b/vendor/github.com/google/gnostic-models/compiler/extensions.go index 16ae66faa..efa07f2a9 100644 --- a/vendor/github.com/google/gnostic-models/compiler/extensions.go +++ b/vendor/github.com/google/gnostic-models/compiler/extensions.go @@ -20,9 +20,9 @@ import ( "os/exec" "strings" + yaml "go.yaml.in/yaml/v3" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" - yaml "gopkg.in/yaml.v3" extensions "github.com/google/gnostic-models/extensions" ) diff --git a/vendor/github.com/google/gnostic-models/compiler/helpers.go b/vendor/github.com/google/gnostic-models/compiler/helpers.go index 975d65e8f..a83261eb6 100644 --- a/vendor/github.com/google/gnostic-models/compiler/helpers.go +++ b/vendor/github.com/google/gnostic-models/compiler/helpers.go @@ -20,7 +20,7 @@ import ( "sort" "strconv" - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" "github.com/google/gnostic-models/jsonschema" ) diff --git a/vendor/github.com/google/gnostic-models/compiler/reader.go b/vendor/github.com/google/gnostic-models/compiler/reader.go index be0e8b40c..da409d6b3 100644 --- a/vendor/github.com/google/gnostic-models/compiler/reader.go +++ b/vendor/github.com/google/gnostic-models/compiler/reader.go @@ -24,7 +24,7 @@ import ( "strings" "sync" - yaml "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" ) var verboseReader = false diff --git a/vendor/github.com/google/gnostic-models/jsonschema/models.go b/vendor/github.com/google/gnostic-models/jsonschema/models.go index 4781bdc5f..a42b8e003 100644 --- a/vendor/github.com/google/gnostic-models/jsonschema/models.go +++ b/vendor/github.com/google/gnostic-models/jsonschema/models.go @@ -16,7 +16,7 @@ // of JSON Schemas. package jsonschema -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v3" // The Schema struct models a JSON Schema and, because schemas are // defined hierarchically, contains many references to itself. diff --git a/vendor/github.com/google/gnostic-models/jsonschema/reader.go b/vendor/github.com/google/gnostic-models/jsonschema/reader.go index b8583d466..4f1fe0c08 100644 --- a/vendor/github.com/google/gnostic-models/jsonschema/reader.go +++ b/vendor/github.com/google/gnostic-models/jsonschema/reader.go @@ -21,7 +21,7 @@ import ( "io/ioutil" "strconv" - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" ) // This is a global map of all known Schemas. diff --git a/vendor/github.com/google/gnostic-models/jsonschema/writer.go b/vendor/github.com/google/gnostic-models/jsonschema/writer.go index 340dc5f93..19f5ddeae 100644 --- a/vendor/github.com/google/gnostic-models/jsonschema/writer.go +++ b/vendor/github.com/google/gnostic-models/jsonschema/writer.go @@ -17,7 +17,7 @@ package jsonschema import ( "fmt" - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" ) const indentation = " " diff --git a/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.go b/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.go index d71fe6d54..de337d80c 100644 --- a/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.go +++ b/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.go @@ -21,7 +21,7 @@ import ( "regexp" "strings" - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" "github.com/google/gnostic-models/compiler" ) @@ -60,7 +60,7 @@ func NewAdditionalPropertiesItem(in *yaml.Node, context *compiler.Context) (*Add // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid AdditionalPropertiesItem") + message := "contains an invalid AdditionalPropertiesItem" err := compiler.NewError(context, message) errors = []error{err} } @@ -2543,7 +2543,7 @@ func NewNonBodyParameter(in *yaml.Node, context *compiler.Context) (*NonBodyPara // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid NonBodyParameter") + message := "contains an invalid NonBodyParameter" err := compiler.NewError(context, message) errors = []error{err} } @@ -3271,7 +3271,7 @@ func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error) // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid Parameter") + message := "contains an invalid Parameter" err := compiler.NewError(context, message) errors = []error{err} } @@ -3345,7 +3345,7 @@ func NewParametersItem(in *yaml.Node, context *compiler.Context) (*ParametersIte // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid ParametersItem") + message := "contains an invalid ParametersItem" err := compiler.NewError(context, message) errors = []error{err} } @@ -4561,7 +4561,7 @@ func NewResponseValue(in *yaml.Node, context *compiler.Context) (*ResponseValue, // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid ResponseValue") + message := "contains an invalid ResponseValue" err := compiler.NewError(context, message) errors = []error{err} } @@ -5030,7 +5030,7 @@ func NewSchemaItem(in *yaml.Node, context *compiler.Context) (*SchemaItem, error // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid SchemaItem") + message := "contains an invalid SchemaItem" err := compiler.NewError(context, message) errors = []error{err} } @@ -5160,7 +5160,7 @@ func NewSecurityDefinitionsItem(in *yaml.Node, context *compiler.Context) (*Secu // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid SecurityDefinitionsItem") + message := "contains an invalid SecurityDefinitionsItem" err := compiler.NewError(context, message) errors = []error{err} } @@ -6930,7 +6930,7 @@ func (m *BodyParameter) ToRawInfo() *yaml.Node { // always include this required field. info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) - if m.Required != false { + if m.Required { info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } @@ -7149,7 +7149,7 @@ func (m *FileSchema) ToRawInfo() *yaml.Node { // always include this required field. info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) - if m.ReadOnly != false { + if m.ReadOnly { info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly)) } @@ -7176,7 +7176,7 @@ func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { if m == nil { return info } - if m.Required != false { + if m.Required { info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } @@ -7192,7 +7192,7 @@ func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } - if m.AllowEmptyValue != false { + if m.AllowEmptyValue { info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue)) } @@ -7220,7 +7220,7 @@ func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -7228,7 +7228,7 @@ func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -7252,7 +7252,7 @@ func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -7306,7 +7306,7 @@ func (m *Header) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -7314,7 +7314,7 @@ func (m *Header) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -7338,7 +7338,7 @@ func (m *Header) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -7373,7 +7373,7 @@ func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node { if m == nil { return info } - if m.Required != false { + if m.Required { info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } @@ -7413,7 +7413,7 @@ func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -7421,7 +7421,7 @@ func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -7445,7 +7445,7 @@ func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -7940,7 +7940,7 @@ func (m *Operation) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("schemes")) info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Schemes)) } - if m.Deprecated != false { + if m.Deprecated { info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated)) } @@ -8110,7 +8110,7 @@ func (m *PathParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -8118,7 +8118,7 @@ func (m *PathParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -8142,7 +8142,7 @@ func (m *PathParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -8218,7 +8218,7 @@ func (m *PrimitivesItems) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -8226,7 +8226,7 @@ func (m *PrimitivesItems) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -8250,7 +8250,7 @@ func (m *PrimitivesItems) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -8296,7 +8296,7 @@ func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { if m == nil { return info } - if m.Required != false { + if m.Required { info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } @@ -8312,7 +8312,7 @@ func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } - if m.AllowEmptyValue != false { + if m.AllowEmptyValue { info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue)) } @@ -8340,7 +8340,7 @@ func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -8348,7 +8348,7 @@ func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -8372,7 +8372,7 @@ func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -8514,7 +8514,7 @@ func (m *Schema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } - if m.ExclusiveMaximum != false { + if m.ExclusiveMaximum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } @@ -8522,7 +8522,7 @@ func (m *Schema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } - if m.ExclusiveMinimum != false { + if m.ExclusiveMinimum { info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } @@ -8546,7 +8546,7 @@ func (m *Schema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } - if m.UniqueItems != false { + if m.UniqueItems { info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } @@ -8610,7 +8610,7 @@ func (m *Schema) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("discriminator")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Discriminator)) } - if m.ReadOnly != false { + if m.ReadOnly { info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly)) } @@ -8796,11 +8796,11 @@ func (m *Xml) ToRawInfo() *yaml.Node { info.Content = append(info.Content, compiler.NewScalarNodeForString("prefix")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Prefix)) } - if m.Attribute != false { + if m.Attribute { info.Content = append(info.Content, compiler.NewScalarNodeForString("attribute")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Attribute)) } - if m.Wrapped != false { + if m.Wrapped { info.Content = append(info.Content, compiler.NewScalarNodeForString("wrapped")) info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Wrapped)) } diff --git a/vendor/github.com/google/gnostic-models/openapiv2/document.go b/vendor/github.com/google/gnostic-models/openapiv2/document.go index e96ac0d6d..89469a13e 100644 --- a/vendor/github.com/google/gnostic-models/openapiv2/document.go +++ b/vendor/github.com/google/gnostic-models/openapiv2/document.go @@ -15,7 +15,7 @@ package openapi_v2 import ( - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" "github.com/google/gnostic-models/compiler" ) diff --git a/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.go b/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.go index 4b1131ce1..662772dd9 100644 --- a/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.go +++ b/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.go @@ -21,7 +21,7 @@ import ( "regexp" "strings" - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" "github.com/google/gnostic-models/compiler" ) @@ -60,7 +60,7 @@ func NewAdditionalPropertiesItem(in *yaml.Node, context *compiler.Context) (*Add // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid AdditionalPropertiesItem") + message := "contains an invalid AdditionalPropertiesItem" err := compiler.NewError(context, message) errors = []error{err} } @@ -113,7 +113,7 @@ func NewAnyOrExpression(in *yaml.Node, context *compiler.Context) (*AnyOrExpress // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid AnyOrExpression") + message := "contains an invalid AnyOrExpression" err := compiler.NewError(context, message) errors = []error{err} } @@ -227,7 +227,7 @@ func NewCallbackOrReference(in *yaml.Node, context *compiler.Context) (*Callback // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid CallbackOrReference") + message := "contains an invalid CallbackOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -979,7 +979,7 @@ func NewExampleOrReference(in *yaml.Node, context *compiler.Context) (*ExampleOr // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid ExampleOrReference") + message := "contains an invalid ExampleOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -1320,7 +1320,7 @@ func NewHeaderOrReference(in *yaml.Node, context *compiler.Context) (*HeaderOrRe // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid HeaderOrReference") + message := "contains an invalid HeaderOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -1713,7 +1713,7 @@ func NewLinkOrReference(in *yaml.Node, context *compiler.Context) (*LinkOrRefere // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid LinkOrReference") + message := "contains an invalid LinkOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -3090,7 +3090,7 @@ func NewParameterOrReference(in *yaml.Node, context *compiler.Context) (*Paramet // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid ParameterOrReference") + message := "contains an invalid ParameterOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -3606,7 +3606,7 @@ func NewRequestBodyOrReference(in *yaml.Node, context *compiler.Context) (*Reque // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid RequestBodyOrReference") + message := "contains an invalid RequestBodyOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -3743,7 +3743,7 @@ func NewResponseOrReference(in *yaml.Node, context *compiler.Context) (*Response // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid ResponseOrReference") + message := "contains an invalid ResponseOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -4310,7 +4310,7 @@ func NewSchemaOrReference(in *yaml.Node, context *compiler.Context) (*SchemaOrRe // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid SchemaOrReference") + message := "contains an invalid SchemaOrReference" err := compiler.NewError(context, message) errors = []error{err} } @@ -4543,7 +4543,7 @@ func NewSecuritySchemeOrReference(in *yaml.Node, context *compiler.Context) (*Se // since the oneof matched one of its possibilities, discard any matching errors errors = make([]error, 0) } else { - message := fmt.Sprintf("contains an invalid SecuritySchemeOrReference") + message := "contains an invalid SecuritySchemeOrReference" err := compiler.NewError(context, message) errors = []error{err} } diff --git a/vendor/github.com/google/gnostic-models/openapiv3/document.go b/vendor/github.com/google/gnostic-models/openapiv3/document.go index 1cee46773..499ff883c 100644 --- a/vendor/github.com/google/gnostic-models/openapiv3/document.go +++ b/vendor/github.com/google/gnostic-models/openapiv3/document.go @@ -15,7 +15,7 @@ package openapi_v3 import ( - "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v3" "github.com/google/gnostic-models/compiler" ) diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index 890d89222..de9c957cc 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,22 @@ +## 1.38.0 + +### Features +- gstruct handles extra unexported fields [4ee7ed0] + +### Fixes +- support [] in IgnoringTopFunction function signatures (#851) [36bbf72] + +### Maintenance +- Bump golang.org/x/net from 0.40.0 to 0.41.0 (#846) [529d408] +- Fix typo [acd1f55] +- Bump google.golang.org/protobuf from 1.36.5 to 1.36.6 (#835) [bae65a0] +- Bump nokogiri from 1.18.4 to 1.18.8 in /docs (#842) [8dda91f] +- Bump golang.org/x/net from 0.39.0 to 0.40.0 (#843) [212d812] +- Bump github.com/onsi/ginkgo/v2 from 2.23.3 to 2.23.4 (#839) [59bd7f9] +- Bump nokogiri from 1.18.1 to 1.18.4 in /docs (#834) [328c729] +- Bump uri from 1.0.2 to 1.0.3 in /docs (#826) [9a798a1] +- Bump golang.org/x/net from 0.37.0 to 0.39.0 (#841) [04a72c6] + ## 1.37.0 ### Features diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index a491a64be..1f03e1f22 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.37.0" +const GOMEGA_VERSION = "1.38.0" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). @@ -178,7 +178,7 @@ func ensureDefaultGomegaIsConfigured() { // All subsequent arguments will be required to be nil/zero. // // This is convenient if you want to make an assertion on a method/function that returns -// a value and an error - a common patter in Go. +// a value and an error - a common pattern in Go. // // For example, given a function with signature: // diff --git a/vendor/github.com/openshift/api/route/v1/generated.proto b/vendor/github.com/openshift/api/route/v1/generated.proto index d6e1845b4..e055eb0d2 100644 --- a/vendor/github.com/openshift/api/route/v1/generated.proto +++ b/vendor/github.com/openshift/api/route/v1/generated.proto @@ -366,6 +366,7 @@ message RouteStatus { // ingress points may contain duplicate Host or RouterName values. Routes // are considered live once they are `Ready` // +listType=atomic + // +optional repeated RouteIngress ingress = 1; } @@ -458,6 +459,8 @@ message TLSConfig { // chain. Do not include a CA certificate. The secret referenced should // be present in the same namespace as that of the Route. // Forbidden when `certificate` is set. + // The router service account needs to be granted with read-only access to this secret, + // please refer to openshift docs for additional details. // // +openshift:enable:FeatureGate=RouteExternalCertificate // +optional diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go index 8fc250877..5a61f477e 100644 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ b/vendor/github.com/openshift/api/route/v1/types.go @@ -354,6 +354,7 @@ type RouteStatus struct { // ingress points may contain duplicate Host or RouterName values. Routes // are considered live once they are `Ready` // +listType=atomic + // +optional Ingress []RouteIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -469,6 +470,8 @@ type TLSConfig struct { // chain. Do not include a CA certificate. The secret referenced should // be present in the same namespace as that of the Route. // Forbidden when `certificate` is set. + // The router service account needs to be granted with read-only access to this secret, + // please refer to openshift docs for additional details. // // +openshift:enable:FeatureGate=RouteExternalCertificate // +optional diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go index 23a2edd42..155348d36 100644 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by codegen. DO NOT EDIT. package v1 diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go index 1d59f1033..e6c44a6b0 100644 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go @@ -179,7 +179,7 @@ var map_TLSConfig = map[string]string{ "caCertificate": "caCertificate provides the cert authority certificate contents", "destinationCACertificate": "destinationCACertificate provides the contents of the ca certificate of the final destination. When using reencrypt termination this file should be provided in order to have routers use it for health checks on the secure connection. If this field is not specified, the router may provide its own destination CA and perform hostname validation using the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically verify.", "insecureEdgeTerminationPolicy": "insecureEdgeTerminationPolicy indicates the desired behavior for insecure connections to a route. While each router may make its own decisions on which ports to expose, this is normally port 80.\n\nIf a route does not specify insecureEdgeTerminationPolicy, then the default behavior is \"None\".\n\n* Allow - traffic is sent to the server on the insecure port (edge/reencrypt terminations only).\n\n* None - no traffic is allowed on the insecure port (default).\n\n* Redirect - clients are redirected to the secure port.", - "externalCertificate": "externalCertificate provides certificate contents as a secret reference. This should be a single serving certificate, not a certificate chain. Do not include a CA certificate. The secret referenced should be present in the same namespace as that of the Route. Forbidden when `certificate` is set.", + "externalCertificate": "externalCertificate provides certificate contents as a secret reference. This should be a single serving certificate, not a certificate chain. Do not include a CA certificate. The secret referenced should be present in the same namespace as that of the Route. Forbidden when `certificate` is set. The router service account needs to be granted with read-only access to this secret, please refer to openshift docs for additional details.", } func (TLSConfig) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/security/v1/consts.go b/vendor/github.com/openshift/api/security/v1/consts.go index 7e8adf6e6..92147d3c5 100644 --- a/vendor/github.com/openshift/api/security/v1/consts.go +++ b/vendor/github.com/openshift/api/security/v1/consts.go @@ -13,4 +13,9 @@ const ( // MinimallySufficientPodSecurityStandard indicates the PodSecurityStandard that matched the SCCs available to the users of the namespace. MinimallySufficientPodSecurityStandard = "security.openshift.io/MinimallySufficientPodSecurityStandard" + + // ValidatedSCCSubjectTypeAnnotation indicates the subject type that allowed the + // SCC admission. This can be used by controllers to detect potential issues + // between user-driven SCC usage and the ServiceAccount-driven SCC usage. + ValidatedSCCSubjectTypeAnnotation = "security.openshift.io/validated-scc-subject-type" ) diff --git a/vendor/github.com/openshift/api/security/v1/generated.proto b/vendor/github.com/openshift/api/security/v1/generated.proto index 0e6bb094f..933de5450 100644 --- a/vendor/github.com/openshift/api/security/v1/generated.proto +++ b/vendor/github.com/openshift/api/security/v1/generated.proto @@ -73,6 +73,7 @@ message PodSecurityPolicyReviewSpec { // PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview. message PodSecurityPolicyReviewStatus { // allowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec. + // +optional repeated ServiceAccountPodSecurityPolicyReviewStatus allowedServiceAccounts = 1; } @@ -134,14 +135,17 @@ message PodSecurityPolicySubjectReviewStatus { // allowedBy is a reference to the rule that allows the PodTemplateSpec. // A rule can be a SecurityContextConstraint or a PodSecurityPolicy // A `nil`, indicates that it was denied. + // +optional optional .k8s.io.api.core.v1.ObjectReference allowedBy = 1; // A machine-readable description of why this operation is in the // "Failure" status. If this value is empty there // is no information available. + // +optional optional string reason = 2; // template is the PodTemplateSpec after the defaulting is applied. + // +optional optional .k8s.io.api.core.v1.PodTemplateSpec template = 3; } diff --git a/vendor/github.com/openshift/api/security/v1/types.go b/vendor/github.com/openshift/api/security/v1/types.go index 18585e97c..fb491480d 100644 --- a/vendor/github.com/openshift/api/security/v1/types.go +++ b/vendor/github.com/openshift/api/security/v1/types.go @@ -386,14 +386,17 @@ type PodSecurityPolicySubjectReviewStatus struct { // allowedBy is a reference to the rule that allows the PodTemplateSpec. // A rule can be a SecurityContextConstraint or a PodSecurityPolicy // A `nil`, indicates that it was denied. + // +optional AllowedBy *corev1.ObjectReference `json:"allowedBy,omitempty" protobuf:"bytes,1,opt,name=allowedBy"` // A machine-readable description of why this operation is in the // "Failure" status. If this value is empty there // is no information available. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` // template is the PodTemplateSpec after the defaulting is applied. + // +optional Template corev1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } @@ -465,6 +468,7 @@ type PodSecurityPolicyReviewSpec struct { // PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview. type PodSecurityPolicyReviewStatus struct { // allowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec. + // +optional AllowedServiceAccounts []ServiceAccountPodSecurityPolicyReviewStatus `json:"allowedServiceAccounts" protobuf:"bytes,1,rep,name=allowedServiceAccounts"` } diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go index 66e8b5a21..d6263fc02 100644 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -// Code generated by deepcopy-gen. DO NOT EDIT. +// Code generated by codegen. DO NOT EDIT. package v1 diff --git a/vendor/github.com/openshift/client-go/route/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/route/applyconfigurations/internal/internal.go index 3775c9b7a..028bb32f0 100644 --- a/vendor/github.com/openshift/client-go/route/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/route/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/route.go b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/route.go index c08d46b9b..b962647b8 100644 --- a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/route.go +++ b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/route.go @@ -3,21 +3,21 @@ package v1 import ( - apiroutev1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" internal "github.com/openshift/client-go/route/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RouteApplyConfiguration represents a declarative configuration of the Route type for use // with apply. type RouteApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *RouteSpecApplyConfiguration `json:"spec,omitempty"` - Status *RouteStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *RouteSpecApplyConfiguration `json:"spec,omitempty"` + Status *RouteStatusApplyConfiguration `json:"status,omitempty"` } // Route constructs a declarative configuration of the Route type for use with @@ -42,18 +42,18 @@ func Route(name, namespace string) *RouteApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractRoute(route *apiroutev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { +func ExtractRoute(route *routev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { return extractRoute(route, fieldManager, "") } // ExtractRouteStatus is the same as ExtractRoute except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractRouteStatus(route *apiroutev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { +func ExtractRouteStatus(route *routev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { return extractRoute(route, fieldManager, "status") } -func extractRoute(route *apiroutev1.Route, fieldManager string, subresource string) (*RouteApplyConfiguration, error) { +func extractRoute(route *routev1.Route, fieldManager string, subresource string) (*RouteApplyConfiguration, error) { b := &RouteApplyConfiguration{} err := managedfields.ExtractInto(route, internal.Parser().Type("com.github.openshift.api.route.v1.Route"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractRoute(route *apiroutev1.Route, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RouteApplyConfiguration) WithKind(value string) *RouteApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *RouteApplyConfiguration) WithKind(value string) *RouteApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RouteApplyConfiguration) WithAPIVersion(value string) *RouteApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *RouteApplyConfiguration) WithAPIVersion(value string) *RouteApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *RouteApplyConfiguration) WithName(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *RouteApplyConfiguration) WithName(value string) *RouteApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RouteApplyConfiguration) WithGenerateName(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *RouteApplyConfiguration) WithGenerateName(value string) *RouteApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *RouteApplyConfiguration) WithNamespace(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *RouteApplyConfiguration) WithNamespace(value string) *RouteApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *RouteApplyConfiguration) WithUID(value types.UID) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *RouteApplyConfiguration) WithUID(value types.UID) *RouteApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RouteApplyConfiguration) WithResourceVersion(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *RouteApplyConfiguration) WithResourceVersion(value string) *RouteApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *RouteApplyConfiguration) WithGeneration(value int64) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RouteApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RouteApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *RouteApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Rout // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RouteApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *RouteApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *R // overwriting an existing map entries in Labels field with the same key. func (b *RouteApplyConfiguration) WithLabels(entries map[string]string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *RouteApplyConfiguration) WithLabels(entries map[string]string) *RouteAp // overwriting an existing map entries in Annotations field with the same key. func (b *RouteApplyConfiguration) WithAnnotations(entries map[string]string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *RouteApplyConfiguration) WithAnnotations(entries map[string]string) *Ro // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *RouteApplyConfiguration) WithFinalizers(values ...string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RouteApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *RouteApplyConfiguration) WithStatus(value *RouteStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *RouteApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routehttpheaderactionunion.go b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routehttpheaderactionunion.go index 6dfe8916b..a54a0913c 100644 --- a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routehttpheaderactionunion.go +++ b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routehttpheaderactionunion.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" ) // RouteHTTPHeaderActionUnionApplyConfiguration represents a declarative configuration of the RouteHTTPHeaderActionUnion type for use // with apply. type RouteHTTPHeaderActionUnionApplyConfiguration struct { - Type *v1.RouteHTTPHeaderActionType `json:"type,omitempty"` + Type *routev1.RouteHTTPHeaderActionType `json:"type,omitempty"` Set *RouteSetHTTPHeaderApplyConfiguration `json:"set,omitempty"` } @@ -22,7 +22,7 @@ func RouteHTTPHeaderActionUnion() *RouteHTTPHeaderActionUnionApplyConfiguration // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RouteHTTPHeaderActionUnionApplyConfiguration) WithType(value v1.RouteHTTPHeaderActionType) *RouteHTTPHeaderActionUnionApplyConfiguration { +func (b *RouteHTTPHeaderActionUnionApplyConfiguration) WithType(value routev1.RouteHTTPHeaderActionType) *RouteHTTPHeaderActionUnionApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routeingresscondition.go b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routeingresscondition.go index 191ce5575..1ddebe528 100644 --- a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routeingresscondition.go +++ b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/routeingresscondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // RouteIngressConditionApplyConfiguration represents a declarative configuration of the RouteIngressCondition type for use // with apply. type RouteIngressConditionApplyConfiguration struct { - Type *v1.RouteIngressConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Type *routev1.RouteIngressConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` } // RouteIngressConditionApplyConfiguration constructs a declarative configuration of the RouteIngressCondition type for use with @@ -27,7 +27,7 @@ func RouteIngressCondition() *RouteIngressConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RouteIngressConditionApplyConfiguration) WithType(value v1.RouteIngressConditionType) *RouteIngressConditionApplyConfiguration { +func (b *RouteIngressConditionApplyConfiguration) WithType(value routev1.RouteIngressConditionType) *RouteIngressConditionApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/tlsconfig.go b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/tlsconfig.go index e76edd2b8..296c4efc9 100644 --- a/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/tlsconfig.go +++ b/vendor/github.com/openshift/client-go/route/applyconfigurations/route/v1/tlsconfig.go @@ -3,19 +3,19 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" ) // TLSConfigApplyConfiguration represents a declarative configuration of the TLSConfig type for use // with apply. type TLSConfigApplyConfiguration struct { - Termination *v1.TLSTerminationType `json:"termination,omitempty"` - Certificate *string `json:"certificate,omitempty"` - Key *string `json:"key,omitempty"` - CACertificate *string `json:"caCertificate,omitempty"` - DestinationCACertificate *string `json:"destinationCACertificate,omitempty"` - InsecureEdgeTerminationPolicy *v1.InsecureEdgeTerminationPolicyType `json:"insecureEdgeTerminationPolicy,omitempty"` - ExternalCertificate *LocalObjectReferenceApplyConfiguration `json:"externalCertificate,omitempty"` + Termination *routev1.TLSTerminationType `json:"termination,omitempty"` + Certificate *string `json:"certificate,omitempty"` + Key *string `json:"key,omitempty"` + CACertificate *string `json:"caCertificate,omitempty"` + DestinationCACertificate *string `json:"destinationCACertificate,omitempty"` + InsecureEdgeTerminationPolicy *routev1.InsecureEdgeTerminationPolicyType `json:"insecureEdgeTerminationPolicy,omitempty"` + ExternalCertificate *LocalObjectReferenceApplyConfiguration `json:"externalCertificate,omitempty"` } // TLSConfigApplyConfiguration constructs a declarative configuration of the TLSConfig type for use with @@ -27,7 +27,7 @@ func TLSConfig() *TLSConfigApplyConfiguration { // WithTermination sets the Termination field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Termination field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithTermination(value v1.TLSTerminationType) *TLSConfigApplyConfiguration { +func (b *TLSConfigApplyConfiguration) WithTermination(value routev1.TLSTerminationType) *TLSConfigApplyConfiguration { b.Termination = &value return b } @@ -67,7 +67,7 @@ func (b *TLSConfigApplyConfiguration) WithDestinationCACertificate(value string) // WithInsecureEdgeTerminationPolicy sets the InsecureEdgeTerminationPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the InsecureEdgeTerminationPolicy field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithInsecureEdgeTerminationPolicy(value v1.InsecureEdgeTerminationPolicyType) *TLSConfigApplyConfiguration { +func (b *TLSConfigApplyConfiguration) WithInsecureEdgeTerminationPolicy(value routev1.InsecureEdgeTerminationPolicyType) *TLSConfigApplyConfiguration { b.InsecureEdgeTerminationPolicy = &value return b } diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go index c37f331af..fa11e4aa1 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/route/v1" - routev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1" + routev1 "github.com/openshift/api/route/v1" + applyconfigurationsroutev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1" scheme "github.com/openshift/client-go/route/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type RoutesGetter interface { // RouteInterface has methods to work with Route resources. type RouteInterface interface { - Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (*v1.Route, error) - Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + Create(ctx context.Context, route *routev1.Route, opts metav1.CreateOptions) (*routev1.Route, error) + Update(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + UpdateStatus(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, 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.Route, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RouteList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*routev1.Route, error) + List(ctx context.Context, opts metav1.ListOptions) (*routev1.RouteList, 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.Route, err error) - Apply(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *routev1.Route, err error) + Apply(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) + ApplyStatus(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error) RouteExpansion } // routes implements RouteInterface type routes struct { - *gentype.ClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration] + *gentype.ClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration] } // newRoutes returns a Routes func newRoutes(c *RouteV1Client, namespace string) *routes { return &routes{ - gentype.NewClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration]( + gentype.NewClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration]( "routes", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Route { return &v1.Route{} }, - func() *v1.RouteList { return &v1.RouteList{} }), + func() *routev1.Route { return &routev1.Route{} }, + func() *routev1.RouteList { return &routev1.RouteList{} }, + ), } } diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go index e71d826c9..716f6ec20 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/route/v1" - "github.com/openshift/client-go/route/clientset/versioned/scheme" + routev1 "github.com/openshift/api/route/v1" + scheme "github.com/openshift/client-go/route/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -29,9 +29,7 @@ func (c *RouteV1Client) Routes(namespace string) RouteInterface { // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*RouteV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err @@ -43,9 +41,7 @@ func NewForConfig(c *rest.Config) (*RouteV1Client, error) { // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*RouteV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err @@ -68,17 +64,15 @@ func New(c rest.Interface) *RouteV1Client { return &RouteV1Client{c} } -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion +func setConfigDefaults(config *rest.Config) { + gv := routev1.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() } - - return nil } // RESTClient returns a RESTClient that is used to communicate diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/internal/internal.go index b6dcc1548..995779a57 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go index d85d2a62f..d9c1dd1a6 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // FSGroupStrategyOptionsApplyConfiguration represents a declarative configuration of the FSGroupStrategyOptions type for use // with apply. type FSGroupStrategyOptionsApplyConfiguration struct { - Type *v1.FSGroupStrategyType `json:"type,omitempty"` - Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` + Type *securityv1.FSGroupStrategyType `json:"type,omitempty"` + Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` } // FSGroupStrategyOptionsApplyConfiguration constructs a declarative configuration of the FSGroupStrategyOptions type for use with @@ -22,7 +22,7 @@ func FSGroupStrategyOptions() *FSGroupStrategyOptionsApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *FSGroupStrategyOptionsApplyConfiguration) WithType(value v1.FSGroupStrategyType) *FSGroupStrategyOptionsApplyConfiguration { +func (b *FSGroupStrategyOptionsApplyConfiguration) WithType(value securityv1.FSGroupStrategyType) *FSGroupStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/rangeallocation.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/rangeallocation.go index ecba8c6ac..1993bd8d7 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/rangeallocation.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/rangeallocation.go @@ -5,19 +5,19 @@ package v1 import ( securityv1 "github.com/openshift/api/security/v1" internal "github.com/openshift/client-go/security/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RangeAllocationApplyConfiguration represents a declarative configuration of the RangeAllocation type for use // with apply. type RangeAllocationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Range *string `json:"range,omitempty"` - Data []byte `json:"data,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Range *string `json:"range,omitempty"` + Data []byte `json:"data,omitempty"` } // RangeAllocation constructs a declarative configuration of the RangeAllocation type for use with @@ -69,7 +69,7 @@ func extractRangeAllocation(rangeAllocation *securityv1.RangeAllocation, fieldMa // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeAllocationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeA // If called multiple times, the Name field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *Rang // If called multiple times, the Namespace field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAl // If called multiple times, the UID field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAlloc // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *R // If called multiple times, the Generation field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGeneration(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *RangeAllocationApplyConfiguration) WithFinalizers(values ...string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RangeAllocationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *RangeAllocationApplyConfiguration) WithData(values ...byte) *RangeAlloc // GetName retrieves the value of the Name field in the declarative configuration. func (b *RangeAllocationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/runasuserstrategyoptions.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/runasuserstrategyoptions.go index ed671136e..e93f8d643 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/runasuserstrategyoptions.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/runasuserstrategyoptions.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // RunAsUserStrategyOptionsApplyConfiguration represents a declarative configuration of the RunAsUserStrategyOptions type for use // with apply. type RunAsUserStrategyOptionsApplyConfiguration struct { - Type *v1.RunAsUserStrategyType `json:"type,omitempty"` - UID *int64 `json:"uid,omitempty"` - UIDRangeMin *int64 `json:"uidRangeMin,omitempty"` - UIDRangeMax *int64 `json:"uidRangeMax,omitempty"` + Type *securityv1.RunAsUserStrategyType `json:"type,omitempty"` + UID *int64 `json:"uid,omitempty"` + UIDRangeMin *int64 `json:"uidRangeMin,omitempty"` + UIDRangeMax *int64 `json:"uidRangeMax,omitempty"` } // RunAsUserStrategyOptionsApplyConfiguration constructs a declarative configuration of the RunAsUserStrategyOptions type for use with @@ -24,7 +24,7 @@ func RunAsUserStrategyOptions() *RunAsUserStrategyOptionsApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RunAsUserStrategyOptionsApplyConfiguration) WithType(value v1.RunAsUserStrategyType) *RunAsUserStrategyOptionsApplyConfiguration { +func (b *RunAsUserStrategyOptionsApplyConfiguration) WithType(value securityv1.RunAsUserStrategyType) *RunAsUserStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/securitycontextconstraints.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/securitycontextconstraints.go index d7026978e..ecd908713 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/securitycontextconstraints.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/securitycontextconstraints.go @@ -6,42 +6,42 @@ import ( securityv1 "github.com/openshift/api/security/v1" internal "github.com/openshift/client-go/security/applyconfigurations/internal" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // SecurityContextConstraintsApplyConfiguration represents a declarative configuration of the SecurityContextConstraints type for use // with apply. type SecurityContextConstraintsApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Priority *int32 `json:"priority,omitempty"` - AllowPrivilegedContainer *bool `json:"allowPrivilegedContainer,omitempty"` - DefaultAddCapabilities []corev1.Capability `json:"defaultAddCapabilities,omitempty"` - RequiredDropCapabilities []corev1.Capability `json:"requiredDropCapabilities,omitempty"` - AllowedCapabilities []corev1.Capability `json:"allowedCapabilities,omitempty"` - AllowHostDirVolumePlugin *bool `json:"allowHostDirVolumePlugin,omitempty"` - Volumes []securityv1.FSType `json:"volumes,omitempty"` - AllowedFlexVolumes []AllowedFlexVolumeApplyConfiguration `json:"allowedFlexVolumes,omitempty"` - AllowHostNetwork *bool `json:"allowHostNetwork,omitempty"` - AllowHostPorts *bool `json:"allowHostPorts,omitempty"` - AllowHostPID *bool `json:"allowHostPID,omitempty"` - AllowHostIPC *bool `json:"allowHostIPC,omitempty"` - UserNamespaceLevel *securityv1.NamespaceLevelType `json:"userNamespaceLevel,omitempty"` - DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty"` - AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` - SELinuxContext *SELinuxContextStrategyOptionsApplyConfiguration `json:"seLinuxContext,omitempty"` - RunAsUser *RunAsUserStrategyOptionsApplyConfiguration `json:"runAsUser,omitempty"` - SupplementalGroups *SupplementalGroupsStrategyOptionsApplyConfiguration `json:"supplementalGroups,omitempty"` - FSGroup *FSGroupStrategyOptionsApplyConfiguration `json:"fsGroup,omitempty"` - ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` - Users []string `json:"users,omitempty"` - Groups []string `json:"groups,omitempty"` - SeccompProfiles []string `json:"seccompProfiles,omitempty"` - AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` - ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Priority *int32 `json:"priority,omitempty"` + AllowPrivilegedContainer *bool `json:"allowPrivilegedContainer,omitempty"` + DefaultAddCapabilities []corev1.Capability `json:"defaultAddCapabilities,omitempty"` + RequiredDropCapabilities []corev1.Capability `json:"requiredDropCapabilities,omitempty"` + AllowedCapabilities []corev1.Capability `json:"allowedCapabilities,omitempty"` + AllowHostDirVolumePlugin *bool `json:"allowHostDirVolumePlugin,omitempty"` + Volumes []securityv1.FSType `json:"volumes,omitempty"` + AllowedFlexVolumes []AllowedFlexVolumeApplyConfiguration `json:"allowedFlexVolumes,omitempty"` + AllowHostNetwork *bool `json:"allowHostNetwork,omitempty"` + AllowHostPorts *bool `json:"allowHostPorts,omitempty"` + AllowHostPID *bool `json:"allowHostPID,omitempty"` + AllowHostIPC *bool `json:"allowHostIPC,omitempty"` + UserNamespaceLevel *securityv1.NamespaceLevelType `json:"userNamespaceLevel,omitempty"` + DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty"` + AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` + SELinuxContext *SELinuxContextStrategyOptionsApplyConfiguration `json:"seLinuxContext,omitempty"` + RunAsUser *RunAsUserStrategyOptionsApplyConfiguration `json:"runAsUser,omitempty"` + SupplementalGroups *SupplementalGroupsStrategyOptionsApplyConfiguration `json:"supplementalGroups,omitempty"` + FSGroup *FSGroupStrategyOptionsApplyConfiguration `json:"fsGroup,omitempty"` + ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` + Users []string `json:"users,omitempty"` + Groups []string `json:"groups,omitempty"` + SeccompProfiles []string `json:"seccompProfiles,omitempty"` + AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` + ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty"` } // SecurityContextConstraints constructs a declarative configuration of the SecurityContextConstraints type for use with @@ -93,7 +93,7 @@ func extractSecurityContextConstraints(securityContextConstraints *securityv1.Se // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithKind(value string) *SecurityContextConstraintsApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -101,7 +101,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithKind(value string) *S // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithAPIVersion(value string) *SecurityContextConstraintsApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -110,7 +110,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithAPIVersion(value stri // If called multiple times, the Name field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithName(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -119,7 +119,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithName(value string) *S // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithGenerateName(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -128,7 +128,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithGenerateName(value st // If called multiple times, the Namespace field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithNamespace(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -137,7 +137,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithNamespace(value strin // If called multiple times, the UID field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithUID(value types.UID) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -146,7 +146,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithResourceVersion(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -155,25 +155,25 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithResourceVersion(value // If called multiple times, the Generation field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithGeneration(value int64) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *SecurityContextConstraintsApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -182,7 +182,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(val // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -192,11 +192,11 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionGracePeriodSe // overwriting an existing map entries in Labels field with the same key. func (b *SecurityContextConstraintsApplyConfiguration) WithLabels(entries map[string]string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -207,11 +207,11 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithLabels(entries map[st // overwriting an existing map entries in Annotations field with the same key. func (b *SecurityContextConstraintsApplyConfiguration) WithAnnotations(entries map[string]string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -219,13 +219,13 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithAnnotations(entries m // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -236,14 +236,14 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(value func (b *SecurityContextConstraintsApplyConfiguration) WithFinalizers(values ...string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *SecurityContextConstraintsApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -473,5 +473,5 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithForbiddenSysctls(valu // GetName retrieves the value of the Name field in the declarative configuration. func (b *SecurityContextConstraintsApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go index 580c596b0..985472fea 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" corev1 "k8s.io/api/core/v1" ) // SELinuxContextStrategyOptionsApplyConfiguration represents a declarative configuration of the SELinuxContextStrategyOptions type for use // with apply. type SELinuxContextStrategyOptionsApplyConfiguration struct { - Type *v1.SELinuxContextStrategyType `json:"type,omitempty"` - SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` + Type *securityv1.SELinuxContextStrategyType `json:"type,omitempty"` + SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` } // SELinuxContextStrategyOptionsApplyConfiguration constructs a declarative configuration of the SELinuxContextStrategyOptions type for use with @@ -23,7 +23,7 @@ func SELinuxContextStrategyOptions() *SELinuxContextStrategyOptionsApplyConfigur // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SELinuxContextStrategyOptionsApplyConfiguration) WithType(value v1.SELinuxContextStrategyType) *SELinuxContextStrategyOptionsApplyConfiguration { +func (b *SELinuxContextStrategyOptionsApplyConfiguration) WithType(value securityv1.SELinuxContextStrategyType) *SELinuxContextStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go index 563e9d285..e1f1db621 100644 --- a/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go +++ b/vendor/github.com/openshift/client-go/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // SupplementalGroupsStrategyOptionsApplyConfiguration represents a declarative configuration of the SupplementalGroupsStrategyOptions type for use // with apply. type SupplementalGroupsStrategyOptionsApplyConfiguration struct { - Type *v1.SupplementalGroupsStrategyType `json:"type,omitempty"` - Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` + Type *securityv1.SupplementalGroupsStrategyType `json:"type,omitempty"` + Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` } // SupplementalGroupsStrategyOptionsApplyConfiguration constructs a declarative configuration of the SupplementalGroupsStrategyOptions type for use with @@ -22,7 +22,7 @@ func SupplementalGroupsStrategyOptions() *SupplementalGroupsStrategyOptionsApply // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithType(value v1.SupplementalGroupsStrategyType) *SupplementalGroupsStrategyOptionsApplyConfiguration { +func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithType(value securityv1.SupplementalGroupsStrategyType) *SupplementalGroupsStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go index 9ccf473a7..f92ff7f4f 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type PodSecurityPolicyReviewsGetter interface { // PodSecurityPolicyReviewInterface has methods to work with PodSecurityPolicyReview resources. type PodSecurityPolicyReviewInterface interface { - Create(ctx context.Context, podSecurityPolicyReview *v1.PodSecurityPolicyReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicyReview, error) + Create(ctx context.Context, podSecurityPolicyReview *securityv1.PodSecurityPolicyReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicyReview, error) PodSecurityPolicyReviewExpansion } // podSecurityPolicyReviews implements PodSecurityPolicyReviewInterface type podSecurityPolicyReviews struct { - *gentype.Client[*v1.PodSecurityPolicyReview] + *gentype.Client[*securityv1.PodSecurityPolicyReview] } // newPodSecurityPolicyReviews returns a PodSecurityPolicyReviews func newPodSecurityPolicyReviews(c *SecurityV1Client, namespace string) *podSecurityPolicyReviews { return &podSecurityPolicyReviews{ - gentype.NewClient[*v1.PodSecurityPolicyReview]( + gentype.NewClient[*securityv1.PodSecurityPolicyReview]( "podsecuritypolicyreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicyReview { return &v1.PodSecurityPolicyReview{} }), + func() *securityv1.PodSecurityPolicyReview { return &securityv1.PodSecurityPolicyReview{} }, + ), } } diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go index 794322ea9..47afca097 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,26 @@ type PodSecurityPolicySelfSubjectReviewsGetter interface { // PodSecurityPolicySelfSubjectReviewInterface has methods to work with PodSecurityPolicySelfSubjectReview resources. type PodSecurityPolicySelfSubjectReviewInterface interface { - Create(ctx context.Context, podSecurityPolicySelfSubjectReview *v1.PodSecurityPolicySelfSubjectReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicySelfSubjectReview, error) + Create(ctx context.Context, podSecurityPolicySelfSubjectReview *securityv1.PodSecurityPolicySelfSubjectReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicySelfSubjectReview, error) PodSecurityPolicySelfSubjectReviewExpansion } // podSecurityPolicySelfSubjectReviews implements PodSecurityPolicySelfSubjectReviewInterface type podSecurityPolicySelfSubjectReviews struct { - *gentype.Client[*v1.PodSecurityPolicySelfSubjectReview] + *gentype.Client[*securityv1.PodSecurityPolicySelfSubjectReview] } // newPodSecurityPolicySelfSubjectReviews returns a PodSecurityPolicySelfSubjectReviews func newPodSecurityPolicySelfSubjectReviews(c *SecurityV1Client, namespace string) *podSecurityPolicySelfSubjectReviews { return &podSecurityPolicySelfSubjectReviews{ - gentype.NewClient[*v1.PodSecurityPolicySelfSubjectReview]( + gentype.NewClient[*securityv1.PodSecurityPolicySelfSubjectReview]( "podsecuritypolicyselfsubjectreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicySelfSubjectReview { return &v1.PodSecurityPolicySelfSubjectReview{} }), + func() *securityv1.PodSecurityPolicySelfSubjectReview { + return &securityv1.PodSecurityPolicySelfSubjectReview{} + }, + ), } } diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go index 88bf62095..ebbcd8cb6 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type PodSecurityPolicySubjectReviewsGetter interface { // PodSecurityPolicySubjectReviewInterface has methods to work with PodSecurityPolicySubjectReview resources. type PodSecurityPolicySubjectReviewInterface interface { - Create(ctx context.Context, podSecurityPolicySubjectReview *v1.PodSecurityPolicySubjectReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicySubjectReview, error) + Create(ctx context.Context, podSecurityPolicySubjectReview *securityv1.PodSecurityPolicySubjectReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicySubjectReview, error) PodSecurityPolicySubjectReviewExpansion } // podSecurityPolicySubjectReviews implements PodSecurityPolicySubjectReviewInterface type podSecurityPolicySubjectReviews struct { - *gentype.Client[*v1.PodSecurityPolicySubjectReview] + *gentype.Client[*securityv1.PodSecurityPolicySubjectReview] } // newPodSecurityPolicySubjectReviews returns a PodSecurityPolicySubjectReviews func newPodSecurityPolicySubjectReviews(c *SecurityV1Client, namespace string) *podSecurityPolicySubjectReviews { return &podSecurityPolicySubjectReviews{ - gentype.NewClient[*v1.PodSecurityPolicySubjectReview]( + gentype.NewClient[*securityv1.PodSecurityPolicySubjectReview]( "podsecuritypolicysubjectreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicySubjectReview { return &v1.PodSecurityPolicySubjectReview{} }), + func() *securityv1.PodSecurityPolicySubjectReview { return &securityv1.PodSecurityPolicySubjectReview{} }, + ), } } diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/rangeallocation.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/rangeallocation.go index 8980a4d60..b4469ddff 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/rangeallocation.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/rangeallocation.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" - securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" + securityv1 "github.com/openshift/api/security/v1" + applyconfigurationssecurityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type RangeAllocationsGetter interface { // RangeAllocationInterface has methods to work with RangeAllocation resources. type RangeAllocationInterface interface { - Create(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.CreateOptions) (*v1.RangeAllocation, error) - Update(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.UpdateOptions) (*v1.RangeAllocation, error) + Create(ctx context.Context, rangeAllocation *securityv1.RangeAllocation, opts metav1.CreateOptions) (*securityv1.RangeAllocation, error) + Update(ctx context.Context, rangeAllocation *securityv1.RangeAllocation, opts metav1.UpdateOptions) (*securityv1.RangeAllocation, 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.RangeAllocation, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RangeAllocationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*securityv1.RangeAllocation, error) + List(ctx context.Context, opts metav1.ListOptions) (*securityv1.RangeAllocationList, 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.RangeAllocation, err error) - Apply(ctx context.Context, rangeAllocation *securityv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RangeAllocation, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *securityv1.RangeAllocation, err error) + Apply(ctx context.Context, rangeAllocation *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *securityv1.RangeAllocation, err error) RangeAllocationExpansion } // rangeAllocations implements RangeAllocationInterface type rangeAllocations struct { - *gentype.ClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration] + *gentype.ClientWithListAndApply[*securityv1.RangeAllocation, *securityv1.RangeAllocationList, *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration] } // newRangeAllocations returns a RangeAllocations func newRangeAllocations(c *SecurityV1Client) *rangeAllocations { return &rangeAllocations{ - gentype.NewClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration]( + gentype.NewClientWithListAndApply[*securityv1.RangeAllocation, *securityv1.RangeAllocationList, *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration]( "rangeallocations", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.RangeAllocation { return &v1.RangeAllocation{} }, - func() *v1.RangeAllocationList { return &v1.RangeAllocationList{} }), + func() *securityv1.RangeAllocation { return &securityv1.RangeAllocation{} }, + func() *securityv1.RangeAllocationList { return &securityv1.RangeAllocationList{} }, + ), } } diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/security_client.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/security_client.go index 8b87437ed..4989e2d30 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/security_client.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/security_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/security/v1" - "github.com/openshift/client-go/security/clientset/versioned/scheme" + securityv1 "github.com/openshift/api/security/v1" + scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -49,9 +49,7 @@ func (c *SecurityV1Client) SecurityContextConstraints() SecurityContextConstrain // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*SecurityV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err @@ -63,9 +61,7 @@ func NewForConfig(c *rest.Config) (*SecurityV1Client, error) { // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SecurityV1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err @@ -88,17 +84,15 @@ func New(c rest.Interface) *SecurityV1Client { return &SecurityV1Client{c} } -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion +func setConfigDefaults(config *rest.Config) { + gv := securityv1.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() } - - return nil } // RESTClient returns a RESTClient that is used to communicate diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go index f4b52587f..82eda438d 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go +++ b/vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" - securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" + securityv1 "github.com/openshift/api/security/v1" + applyconfigurationssecurityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type SecurityContextConstraintsGetter interface { // SecurityContextConstraintsInterface has methods to work with SecurityContextConstraints resources. type SecurityContextConstraintsInterface interface { - Create(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.CreateOptions) (*v1.SecurityContextConstraints, error) - Update(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.UpdateOptions) (*v1.SecurityContextConstraints, error) + Create(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraints, opts metav1.CreateOptions) (*securityv1.SecurityContextConstraints, error) + Update(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraints, opts metav1.UpdateOptions) (*securityv1.SecurityContextConstraints, 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.SecurityContextConstraints, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SecurityContextConstraintsList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*securityv1.SecurityContextConstraints, error) + List(ctx context.Context, opts metav1.ListOptions) (*securityv1.SecurityContextConstraintsList, 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.SecurityContextConstraints, err error) - Apply(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraintsApplyConfiguration, opts metav1.ApplyOptions) (result *v1.SecurityContextConstraints, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *securityv1.SecurityContextConstraints, err error) + Apply(ctx context.Context, securityContextConstraints *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration, opts metav1.ApplyOptions) (result *securityv1.SecurityContextConstraints, err error) SecurityContextConstraintsExpansion } // securityContextConstraints implements SecurityContextConstraintsInterface type securityContextConstraints struct { - *gentype.ClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration] + *gentype.ClientWithListAndApply[*securityv1.SecurityContextConstraints, *securityv1.SecurityContextConstraintsList, *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration] } // newSecurityContextConstraints returns a SecurityContextConstraints func newSecurityContextConstraints(c *SecurityV1Client) *securityContextConstraints { return &securityContextConstraints{ - gentype.NewClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration]( + gentype.NewClientWithListAndApply[*securityv1.SecurityContextConstraints, *securityv1.SecurityContextConstraintsList, *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration]( "securitycontextconstraints", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.SecurityContextConstraints { return &v1.SecurityContextConstraints{} }, - func() *v1.SecurityContextConstraintsList { return &v1.SecurityContextConstraintsList{} }), + func() *securityv1.SecurityContextConstraints { return &securityv1.SecurityContextConstraints{} }, + func() *securityv1.SecurityContextConstraintsList { return &securityv1.SecurityContextConstraintsList{} }, + ), } } diff --git a/vendor/github.com/rancher/ali-operator/LICENSE b/vendor/github.com/rancher/ali-operator/LICENSE new file mode 100644 index 000000000..6b96f7149 --- /dev/null +++ b/vendor/github.com/rancher/ali-operator/LICENSE @@ -0,0 +1,150 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + END OF TERMS AND CONDITIONSn diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/doc.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/doc.go similarity index 87% rename from vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/doc.go rename to vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/doc.go index fd1257f93..ff6a75c2a 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/doc.go +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Wrangler Sample Controller Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,5 +17,5 @@ limitations under the License. // Code generated by main. DO NOT EDIT. // +k8s:deepcopy-gen=package -// +groupName=project.cattle.io -package v3 +// +groupName=ali.cattle.io +package v1 diff --git a/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/types.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/types.go new file mode 100644 index 000000000..9dd388860 --- /dev/null +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/types.go @@ -0,0 +1,173 @@ +/* +Copyright 2025 The Ali Operator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AliClusterConfig is the Schema for the aliclusterconfigs API. +type AliClusterConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AliClusterConfigSpec `json:"spec,omitempty"` + Status AliClusterConfigStatus `json:"status,omitempty"` +} + +// AliClusterConfigSpec defines the desired state of AliClusterConfig. +type AliClusterConfigSpec struct { + // ClusterName allows you to specify the name of the ACK cluster in Alibaba Cloud. + ClusterName string `json:"clusterName,omitempty"` + // ClusterID is the id of the created ACK cluster which is used to add nodepools to the cluster. + ClusterID string `json:"clusterId,omitempty" norman:"noupdate"` + // AlibabaCredentialSecret is the name of the secret containing the Alibaba credentials. + AlibabaCredentialSecret string `json:"alibabaCredentialSecret,omitempty"` + // ClusterType is the type of Alibaba cluster + ClusterType string `json:"clusterType,omitempty" norman:"noupdate"` + // ClusterSpec is spec for the cluster. Relevant in case ClusterType is ManagedKubernetes + ClusterSpec string `json:"clusterSpec,omitempty" norman:"noupdate"` + // KubernetesVersion defines the desired Kubernetes version. + KubernetesVersion string `json:"kubernetesVersion,omitempty"` + // RegionID is the id of the region in which the cluster is deployed. + RegionID string `json:"regionId,omitempty" norman:"noupdate"` + // VpcID is the id of the vpc in which the cluster is deployed. + VpcID string `json:"vpcId,omitempty" norman:"noupdate"` + // ContainerCIDR is the pod CIDR block. + // The pod CIDR block cannot overlap with the CIDR block of the VPC + ContainerCIDR string `json:"containerCidr,omitempty" norman:"noupdate"` + // ServiceCIDR is the Service CIDR block for the cluster. + // It cannot overlap with the VPC CIDR block or the CIDR blocks of existing clusters in the VPC. + ServiceCIDR string `json:"serviceCidr,omitempty" norman:"noupdate"` + // NodeCIDRMask is the maximum number of IP addresses that can be assigned to each node. + // This number is determined by the subnet mask of the specified CIDR block + // only applicable for flannel network plugin + NodeCIDRMask int64 `json:"nodeCidrMask,omitempty" norman:"noupdate"` + // VSwitchIDs is the vSwitches for nodes in the cluster. + VSwitchIDs []string `json:"vswitchIds,omitempty" norman:"noupdate"` + // PodVswitchIDs is the vSwitches for pods. + // For Terway network plug-in, you must allocate vSwitches to pods. + PodVswitchIDs []string `json:"podVswitchIds,omitempty" norman:"noupdate"` + // SNATEntry specifies whether to configure SNAT rules for the VPC in which your cluster is deployed. + // if false nodes and applications in the cluster cannot access the Internet. + SNATEntry bool `json:"snatEntry"` + // ProxyMode the kube-proxy mode + ProxyMode string `json:"proxyMode,omitempty"` + // EndpointPublicAccess specifies whether to enable Internet access for the cluster. + EndpointPublicAccess bool `json:"endpointPublicAccess"` + // SecurityGroupID specifies security group for cluster nodes. + SecurityGroupID string `json:"securityGroupId,omitempty" norman:"noupdate"` + // SSHFlags specifies whether to enable SSH login. + // This parameter does not take effect for ACK managed clusters. + SSHFlags bool `json:"sshFlags"` + // ResourceGroupID the Id of the resource group to which the cluster belongs. + ResourceGroupID string `json:"resourceGroupId,omitempty" norman:"noupdate"` + // Importer indicates that the cluster was imported. + // +optional + // +kubebuilder:default=false + Imported bool `json:"imported" norman:"noupdate"` + // Nodepools is a list of node pools associated with the ACK cluster. + NodePools []NodePool `json:"nodePools,omitempty"` + Addons []Addon `json:"addons,omitempty" norman:"noupdate"` + // PauseClusterUpgrade is used to check if the current cluster upgrade failed + // in case true then further updates are not done till the latest task on the cluster + // result in success + PauseClusterUpgrade bool `json:"pauseClusterUpgrade"` + // ClusterIsUpgrading is used to check if the current cluster has some updates running. + ClusterIsUpgrading bool `json:"clusterIsUpgrading"` + // TaskID is the id of the latest task performed on the cluster. + TaskID string `json:"taskId"` +} + +type NodePool struct { + // nodepool info + // NodepoolID is the id of the node pool created. received from Alibaba Cloud. + NodePoolID string `json:"nodePoolId,omitempty"` + // Name is the name of the node pool + Name string `json:"name,omitempty"` + + // auto_scaling + // InstancesNum is used to set the MaxInstances and MinInstances fields in autoscaling config of node pool. + // and also as DesiredSize in nodepool scaling group configuration. + InstancesNum int64 `json:"instancesNum,omitempty"` + // ScalingType is nodepool auto scaling type. + ScalingType string `json:"scalingType,omitempty"` + + // scaling_group + // AutoRenew specifies whether to enable auto-renewal for nodes in the node pool. + // This parameter takes effect only when you set InstanceChargeType to PrePaid + AutoRenew bool `json:"autoRenew,omitempty" norman:"noupdate"` + // AutoRenewPeriod is the auto-renewal period in Month. + AutoRenewPeriod int64 `json:"autoRenewPeriod,omitempty" norman:"noupdate"` + // DataDisks is the configurations of the data disks that are attached to nodes in the node pool. + DataDisks []Disk `json:"dataDisks,omitempty"` + // InstanceChargeType is the billing method of nodes in the node pool. Valid values: PrePaid, PostPaid + InstanceChargeType string `json:"instanceChargeType,omitempty" norman:"noupdate"` + // InstanceTypes the instance types of nodes in the node pool. + // When the system adds a node to the node pool the system selects the most appropriate one from the specified instance types + // for the node. + InstanceTypes []string `json:"instanceTypes,omitempty"` + // KeyPair is the name of the key pair used to log in to nodes in the nodepool. + KeyPair string `json:"keyPair,omitempty"` + // Period is the subscription duration of nodes in the node pool. + // This parameter takes effect and is required if InstanceChargeType is set to PrePaid. + Period int64 `json:"period,omitempty" norman:"noupdate"` + // PeriodUnit the billing cycle of nodes in the node pool. + PeriodUnit string `json:"periodUnit,omitempty" norman:"noupdate"` + // ImageID is the id of the image for nodes. + ImageID string `json:"imageId,omitempty"` + // ImageType is the type of the OS image + ImageType string `json:"imageType,omitempty"` + // VSwitchIDs are the VSwitchIds for the nodes. + VSwitchIDs []string `json:"vSwitchIds,omitempty"` + // SystemDiskCategory is the category of the system disk. + SystemDiskCategory string `json:"systemDiskCategory,omitempty"` + // SystemDiskSize is the size of the system disk + SystemDiskSize int64 `json:"systemDiskSize,omitempty"` + + // Runtime is the name of the container runtime. + Runtime string `json:"runtime,omitempty"` + // RuntimeVersion is the version of the container runtime. + RuntimeVersion string `json:"runtimeVersion,omitempty"` +} + +type Disk struct { + // Category is the category of data disk + Category string `json:"category"` + // Size is the size of data disks. Unit: GiB + Size int64 `json:"size"` + // Encrypted specifies whether to encrypt the data disk. Valid values: + Encrypted string `json:"encrypted"` + // AutoSnapshotPolicyID is the Id of the automatic snapshot policy + AutoSnapshotPolicyID string `json:"autoSnapshotPolicyId"` +} + +type Addon struct { + // Name is the Addon Component name + Name string `json:"name" norman:"noupdate"` + // Config is the configuration of the component. usually a JSON string. + Config string `json:"config" norman:"noupdate"` +} + +// AliClusterConfigStatus defines the observed state of AliClusterConfig. +type AliClusterConfigStatus struct { + Phase string `json:"phase"` + FailureMessage string `json:"failureMessage"` +} diff --git a/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_deepcopy.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_deepcopy.go new file mode 100644 index 000000000..ea5dd87ae --- /dev/null +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_deepcopy.go @@ -0,0 +1,204 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2025 Wrangler Sample Controller Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by main. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Addon) DeepCopyInto(out *Addon) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Addon. +func (in *Addon) DeepCopy() *Addon { + if in == nil { + return nil + } + out := new(Addon) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliClusterConfig) DeepCopyInto(out *AliClusterConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliClusterConfig. +func (in *AliClusterConfig) DeepCopy() *AliClusterConfig { + if in == nil { + return nil + } + out := new(AliClusterConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AliClusterConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliClusterConfigList) DeepCopyInto(out *AliClusterConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AliClusterConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliClusterConfigList. +func (in *AliClusterConfigList) DeepCopy() *AliClusterConfigList { + if in == nil { + return nil + } + out := new(AliClusterConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AliClusterConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliClusterConfigSpec) DeepCopyInto(out *AliClusterConfigSpec) { + *out = *in + if in.VSwitchIDs != nil { + in, out := &in.VSwitchIDs, &out.VSwitchIDs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PodVswitchIDs != nil { + in, out := &in.PodVswitchIDs, &out.PodVswitchIDs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NodePools != nil { + in, out := &in.NodePools, &out.NodePools + *out = make([]NodePool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = make([]Addon, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliClusterConfigSpec. +func (in *AliClusterConfigSpec) DeepCopy() *AliClusterConfigSpec { + if in == nil { + return nil + } + out := new(AliClusterConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliClusterConfigStatus) DeepCopyInto(out *AliClusterConfigStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliClusterConfigStatus. +func (in *AliClusterConfigStatus) DeepCopy() *AliClusterConfigStatus { + if in == nil { + return nil + } + out := new(AliClusterConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Disk) DeepCopyInto(out *Disk) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Disk. +func (in *Disk) DeepCopy() *Disk { + if in == nil { + return nil + } + out := new(Disk) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodePool) DeepCopyInto(out *NodePool) { + *out = *in + if in.DataDisks != nil { + in, out := &in.DataDisks, &out.DataDisks + *out = make([]Disk, len(*in)) + copy(*out, *in) + } + if in.InstanceTypes != nil { + in, out := &in.InstanceTypes, &out.InstanceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.VSwitchIDs != nil { + in, out := &in.VSwitchIDs, &out.VSwitchIDs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool. +func (in *NodePool) DeepCopy() *NodePool { + if in == nil { + return nil + } + out := new(NodePool) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_list_types.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_list_types.go new file mode 100644 index 000000000..dbcd63d11 --- /dev/null +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_list_types.go @@ -0,0 +1,42 @@ +/* +Copyright 2025 Wrangler Sample Controller Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by main. DO NOT EDIT. + +// +k8s:deepcopy-gen=package +// +groupName=ali.cattle.io +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AliClusterConfigList is a list of AliClusterConfig resources +type AliClusterConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []AliClusterConfig `json:"items"` +} + +func NewAliClusterConfig(namespace, name string, obj AliClusterConfig) *AliClusterConfig { + obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("AliClusterConfig").ToAPIVersionAndKind() + obj.Name = name + obj.Namespace = namespace + return &obj +} diff --git a/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_register.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_register.go new file mode 100644 index 000000000..3a2ea7c42 --- /dev/null +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1/zz_generated_register.go @@ -0,0 +1,60 @@ +/* +Copyright 2025 Wrangler Sample Controller Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by main. DO NOT EDIT. + +// +k8s:deepcopy-gen=package +// +groupName=ali.cattle.io +package v1 + +import ( + ali "github.com/rancher/ali-operator/pkg/apis/ali.cattle.io" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + AliClusterConfigResourceName = "aliclusterconfigs" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: ali.GroupName, Version: "v1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &AliClusterConfig{}, + &AliClusterConfigList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/zz_generated_register.go b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/zz_generated_register.go similarity index 87% rename from vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/zz_generated_register.go rename to vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/zz_generated_register.go index c320eca9d..9ed556edd 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/zz_generated_register.go +++ b/vendor/github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Wrangler Sample Controller Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ limitations under the License. // Code generated by main. DO NOT EDIT. -package project +package ali const ( // Package-wide consts from generator "zz_generated_register". - GroupName = "project.cattle.io" + GroupName = "ali.cattle.io" ) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/doc.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/doc.go index 7fd6c376e..b40d76963 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/doc.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/plugin.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/plugin.go index 9f7dc35ae..61a35385f 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/plugin.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/plugin.go @@ -34,6 +34,8 @@ type UIPluginEntry struct { Version string `json:"version,omitempty"` // Endpoint from where to fetch the contents of the plugin. Endpoint string `json:"endpoint,omitempty"` + // CompressedEndpoint link to a targz file that contains the content of the plugin. + CompressedEndpoint string `json:"compressedEndpoint,omitempty"` // NoCache a flag that tells if the plugin should be cached or not. // Defaults to false. // +kubebuilder:default:=false @@ -47,7 +49,19 @@ type UIPluginEntry struct { } type UIPluginStatus struct { + // ObservedGeneration is used by Rancher controller to track the latest generation of the resource that it triggered on. + ObservedGeneration int64 `json:"observedGeneration"` // CacheState is the cache status of the plugin. // +nullable CacheState string `json:"cacheState,omitempty"` + // Error is the error message if any. + Error string `json:"error,omitempty"` + // Ready is the readiness of the plugin. + // Defaults to false. + // +kubebuilder:default:=false + Ready bool `json:"ready,omitempty"` + // RetryNumber is the number of times the plugin has been retried. + RetryNumber int `json:"retryNumber,omitempty"` + // RetryAt is the time at which the plugin should be retried. + RetryAt metav1.Time `json:"retryAt,omitempty"` } diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/types.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/types.go index b777eb76d..906c3f957 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/types.go @@ -2,26 +2,46 @@ package v1 import ( "github.com/rancher/wrangler/v3/pkg/genericcondition" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var ClusterRepoNameLabel = "catalog.cattle.io/cluster-repo-name" // +genclient -// +kubebuilder:skipversion // +genclient:nonNamespaced +// +kubebuilder:resource:scope=Cluster,path=clusterrepos +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="HTTP URL",type=string,JSONPath=`.spec.url` +// +kubebuilder:printcolumn:name="Enabled",type=string,JSONPath=`.spec.enabled` +// +kubebuilder:printcolumn:name="Git Repo",type=string,JSONPath=`.spec.gitRepo` +// +kubebuilder:printcolumn:name="Git Branch",type=string,JSONPath=`.spec.gitBranch` +// +kubebuilder:printcolumn:name="Download Time",type=string,JSONPath=`.status.downloadTime` // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// ClusterRepo represents a particular Helm repository. It contains details +// about the chart location and the credentials needed for fetching charts +// hosted in that particular Helm repository. type ClusterRepo struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RepoSpec `json:"spec"` - Status RepoStatus `json:"status"` + + // RepoSec contains details about the Helm repository that needs to be used. + // More info: kubectl explain clusterrepo.spec + Spec RepoSpec `json:"spec"` + + // RepoStatus contains details of the Helm repository that is currently being used in the cluster. + // More info: kubectl explain clusterrepo.status + // +optional + Status RepoStatus `json:"status,omitempty"` } -// SecretReference a reference to a secret object +// SecretReference references a Secret object which contains the credentials. type SecretReference struct { - Name string `json:"name,omitempty"` + // Name is the name of the secret. + Name string `json:"name,omitempty"` + + // Namespace is the namespace where the secret resides. Namespace string `json:"namespace,omitempty"` } @@ -32,19 +52,23 @@ type ExponentialBackOffValues struct { MaxRetries int `json:"maxRetries,omitempty"` } +// RepoSpec contains details about the helm repository that needs to be used. type RepoSpec struct { - // URL can be a HTTP URL i.e https://charts.rancher.io or an OCI URL i.e oci://dp.apps.rancher.io/charts/etcd. + // URL is the HTTP or OCI URL of the helm repository to connect to. URL string `json:"url,omitempty"` // InsecurePlainHTTP is only valid for OCI URL's and allows insecure connections to registries without enforcing TLS checks. InsecurePlainHTTP bool `json:"insecurePlainHttp,omitempty"` - // GitRepo a git repo to clone and index as the helm repo + // GitRepo is the git repo to clone which contains the helm repository. GitRepo string `json:"gitRepo,omitempty"` - // GitBranch The git branch to follow + // GitBranch is the git branch where the helm repository is hosted. GitBranch string `json:"gitBranch,omitempty"` + // RefreshInterval is the interval at which the Helm repository should be refreshed. + RefreshInterval int `json:"refreshInterval,omitempty"` + // ExponentialBackOffValues are values given to the Rancher manager to handle // 429 TOOMANYREQUESTS response code from the OCI registry. ExponentialBackOffValues *ExponentialBackOffValues `json:"exponentialBackOffValues,omitempty"` @@ -53,34 +77,38 @@ type RepoSpec struct { // If unspecified, system trust roots will be used. CABundle []byte `json:"caBundle,omitempty"` - // InsecureSkipTLSverify will use insecure HTTPS to download the repo's index. + // InsecureSkipTLSverify will disable the TLS verification when downloading the Helm repository's index file. + // Defaults is false. Enabling this is not recommended for production due to the security implications. InsecureSkipTLSverify bool `json:"insecureSkipTLSVerify,omitempty"` - // ClientSecretName is the client secret to be used to connect to the repo - // It is expected the secret be of type "kubernetes.io/basic-auth" or "kubernetes.io/tls" for Helm repos - // and "kubernetes.io/basic-auth" or "kubernetes.io/ssh-auth" for git repos. - // For a repo the Namespace file will be ignored + // ClientSecret is the client secret to be used when connecting to a Helm repository. + // The expected secret type is "kubernetes.io/basic-auth" or "kubernetes.io/tls" for HTTP Helm repositories, + // only "kubernetes.io/basic-auth" for OCI Helm repostories and "kubernetes.io/basic-auth" + // or "kubernetes.io/ssh-auth" for Github Helm repositories. ClientSecret *SecretReference `json:"clientSecret,omitempty"` - // BasicAuthSecretName is the client secret to be used to connect to the repo + // BasicAuthSecretName is the client secret to be used to connect to the Helm repository. BasicAuthSecretName string `json:"basicAuthSecretName,omitempty"` - // ForceUpdate will cause the repo index to be downloaded if it was last download before the specified time - // If ForceUpdate is greater than time.Now() it will not trigger an update + // ForceUpdate will cause the Helm repository index file stored in Rancher + // to be updated from the Helm repository URL. This means if there are changes + // in the Helm repository they will be pulled into Rancher manager. ForceUpdate *metav1.Time `json:"forceUpdate,omitempty"` - // ServiceAccount this service account will be used to deploy charts instead of the end users credentials + // ServiceAccount when specified will be used in creating Helm operation pods which in turn + // run the Helm install or uninstall commands for a chart. ServiceAccount string `json:"serviceAccount,omitempty"` - // ServiceAccountNamespace namespace of the service account to use. This value is used only on - // ClusterRepo and will be ignored on Repo + // ServiceAccountNamespace is the namespace of the service account to use. ServiceAccountNamespace string `json:"serviceAccountNamespace,omitempty"` - // If disabled the repo clone will not be updated or allowed to be installed from + // If disabled the repo will not be updated and won't pick up new changes. Enabled *bool `json:"enabled,omitempty"` - // DisableSameOriginCheck attaches the Basic Auth Header to all helm client API calls, regardless of whether the destination of the API call matches the origin of the repository's URL - // This field is not supported for OCI based URLs + // DisableSameOriginCheck if true attaches the Basic Auth Header to all Helm client API calls + // regardless of whether the destination of the API call matches the origin of the repository's URL. + // Defaults to false, which keeps the SameOrigin check enabled. Setting this to true is not recommended + // in production environments due to the security implications. DisableSameOriginCheck bool `json:"disableSameOriginCheck,omitempty"` } @@ -92,26 +120,34 @@ const ( OCIDownloaded RepoCondition = "OCIDownloaded" ) +// RepoStatus contains details of the Helm repository that is currently being used in the cluster. type RepoStatus struct { + // ObservedGeneration is used by Rancher controller to track the latest generation of the resource that it triggered on. ObservedGeneration int64 `json:"observedGeneration"` - // IndexConfigMapName is the configmap with the store index in it - IndexConfigMapName string `json:"indexConfigMapName,omitempty"` - IndexConfigMapNamespace string `json:"indexConfigMapNamespace,omitempty"` + // IndexConfigMapName is the name of the configmap which stores the Helm repository index. + IndexConfigMapName string `json:"indexConfigMapName,omitempty"` + + // IndexConfigMapNamespace is the namespace of the Helm repository index configmap in which it resides. + IndexConfigMapNamespace string `json:"indexConfigMapNamespace,omitempty"` + + // IndexConfigMapResourceVersion is the resourceversion of the Helm repository index configmap. IndexConfigMapResourceVersion string `json:"indexConfigMapResourceVersion,omitempty"` - // DownloadTime the time when the index was last downloaded + // DownloadTime is the time when the index was last downloaded. DownloadTime metav1.Time `json:"downloadTime,omitempty"` - // The URL used for the last successful index + // URL used for fetching the Helm repository index file. URL string `json:"url,omitempty"` - // The branch used for the last successful index + // Branch is the Git branch in the git repository used to fetch the Helm repository. Branch string `json:"branch,omitempty"` - // The git commit used to generate the index + // Commit is the latest commit in the cloned git repository by Rancher. Commit string `json:"commit,omitempty"` + // Conditions contain information about when the status conditions were updated and + // to what. Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` // Number of times the handler will retry if it gets a 429 error @@ -134,18 +170,21 @@ type Operation struct { Status OperationStatus `json:"status"` } +// OperationStatus represents the status of a helm operation that's going to be created type OperationStatus struct { - ObservedGeneration int64 `json:"observedGeneration"` - Action string `json:"action,omitempty"` - Chart string `json:"chart,omitempty"` - Version string `json:"version,omitempty"` - Release string `json:"releaseName,omitempty"` - Namespace string `json:"namespace,omitempty"` - ProjectID string `json:"projectId,omitempty"` - Token string `json:"token,omitempty"` - Command []string `json:"command,omitempty"` - PodName string `json:"podName,omitempty"` - PodNamespace string `json:"podNamespace,omitempty"` - PodCreated bool `json:"podCreated,omitempty"` - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + ObservedGeneration int64 `json:"observedGeneration"` + Action string `json:"action,omitempty"` + Chart string `json:"chart,omitempty"` + Version string `json:"version,omitempty"` + Release string `json:"releaseName,omitempty"` + Namespace string `json:"namespace,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Token string `json:"token,omitempty"` + Command []string `json:"command,omitempty"` + PodName string `json:"podName,omitempty"` + PodNamespace string `json:"podNamespace,omitempty"` + PodCreated bool `json:"podCreated,omitempty"` + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + AutomaticCPTolerations bool `json:"automaticCPTolerations,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_deepcopy.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_deepcopy.go index 1ff7b2892..02162048a 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package v1 import ( genericcondition "github.com/rancher/wrangler/v3/pkg/genericcondition" + corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -341,6 +342,13 @@ func (in *OperationStatus) DeepCopyInto(out *OperationStatus) { *out = make([]genericcondition.GenericCondition, len(*in)) copy(*out, *in) } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]corev1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -520,7 +528,7 @@ func (in *UIPlugin) DeepCopyInto(out *UIPlugin) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -618,6 +626,7 @@ func (in *UIPluginSpec) DeepCopy() *UIPluginSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UIPluginStatus) DeepCopyInto(out *UIPluginStatus) { *out = *in + in.RetryAt.DeepCopyInto(&out.RetryAt) return } diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_list_types.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_list_types.go index 8a26a8bc4..b57f900df 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_list_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_list_types.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_register.go index c6ce98284..e675a34de 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/zz_generated_register.go index aeac9b79d..e0503c0d9 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/catalog.cattle.io/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authn_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authn_types.go index 5cec9d5cb..33d8ea95f 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authn_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authn_types.go @@ -27,30 +27,76 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type Token struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Token string `json:"token" norman:"writeOnly,noupdate"` + UserPrincipal Principal `json:"userPrincipal" norman:"type=reference[principal]"` + GroupPrincipals []Principal `json:"groupPrincipals,omitempty" norman:"type=array[reference[principal]]"` + ProviderInfo map[string]string `json:"providerInfo,omitempty"` + UserID string `json:"userId" norman:"type=reference[user]"` + AuthProvider string `json:"authProvider"` + TTLMillis int64 `json:"ttl"` + LastUsedAt *metav1.Time `json:"lastUsedAt,omitempty"` + ActivityLastSeenAt *metav1.Time `json:"activityLastSeenAt,omitempty"` + IsDerived bool `json:"isDerived"` + Description string `json:"description"` + Expired bool `json:"expired"` + ExpiresAt string `json:"expiresAt"` + Current bool `json:"current"` + ClusterName string `json:"clusterName,omitempty" norman:"noupdate,type=reference[cluster]"` + Enabled *bool `json:"enabled,omitempty" norman:"default=true"` +} + +// Implement the TokenAccessor interface + +func (t *Token) GetName() string { + return t.ObjectMeta.Name +} + +func (t *Token) GetIsEnabled() bool { + return t.Enabled == nil || *t.Enabled +} + +func (t *Token) GetIsDerived() bool { + return t.IsDerived +} - Token string `json:"token" norman:"writeOnly,noupdate"` - UserPrincipal Principal `json:"userPrincipal" norman:"type=reference[principal]"` - GroupPrincipals []Principal `json:"groupPrincipals,omitempty" norman:"type=array[reference[principal]]"` - ProviderInfo map[string]string `json:"providerInfo,omitempty"` - UserID string `json:"userId" norman:"type=reference[user]"` - AuthProvider string `json:"authProvider"` - TTLMillis int64 `json:"ttl"` - LastUpdateTime string `json:"lastUpdateTime"` - IsDerived bool `json:"isDerived"` - Description string `json:"description"` - Expired bool `json:"expired"` - ExpiresAt string `json:"expiresAt"` - Current bool `json:"current"` - ClusterName string `json:"clusterName,omitempty" norman:"noupdate,type=reference[cluster]"` - Enabled *bool `json:"enabled,omitempty" norman:"default=true"` +func (t *Token) GetAuthProvider() string { + return t.AuthProvider +} + +func (t *Token) GetUserID() string { + return t.UserID } func (t *Token) ObjClusterName() string { return t.ClusterName } +func (t *Token) GetUserPrincipal() Principal { + return t.UserPrincipal +} + +func (t *Token) GetGroupPrincipals() []Principal { + return t.GroupPrincipals +} + +func (t *Token) GetProviderInfo() map[string]string { + return t.ProviderInfo +} + +func (t *Token) GetLastUsedAt() *metav1.Time { + return t.LastUsedAt +} + +func (t *Token) GetLastActivitySeen() *metav1.Time { + return t.ActivityLastSeenAt +} + +func (t *Token) GetCreationTime() metav1.Time { + return t.CreationTimestamp +} + // +genclient // +kubebuilder:skipversion // +genclient:nonNamespaced @@ -60,16 +106,18 @@ type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - DisplayName string `json:"displayName,omitempty"` - Description string `json:"description"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty" norman:"writeOnly,noupdate"` - MustChangePassword bool `json:"mustChangePassword,omitempty"` - PrincipalIDs []string `json:"principalIds,omitempty" norman:"type=array[reference[principal]]"` - Me bool `json:"me,omitempty" norman:"nocreate,noupdate"` - Enabled *bool `json:"enabled,omitempty" norman:"default=true"` - Spec UserSpec `json:"spec,omitempty"` - Status UserStatus `json:"status"` + DisplayName string `json:"displayName,omitempty"` + Description string `json:"description"` + Username string `json:"username,omitempty"` + // Deprecated. Password are stored in secrets in the cattle-local-user-passwords namespace. + Password string `json:"password,omitempty" norman:"writeOnly,noupdate"` + MustChangePassword bool `json:"mustChangePassword,omitempty"` + PrincipalIDs []string `json:"principalIds,omitempty" norman:"type=array[reference[principal]]"` + // Deprecated. Me is an old field only used in the norman API. + Me bool `json:"me,omitempty" norman:"nocreate,noupdate"` + Enabled *bool `json:"enabled,omitempty" norman:"default=true"` + Spec UserSpec `json:"spec,omitempty"` + Status UserStatus `json:"status"` } // IsSystem returns true if the user is a system user. @@ -201,11 +249,16 @@ type AuthConfig struct { metav1.TypeMeta `json:",inline" mapstructure:",squash"` metav1.ObjectMeta `json:"metadata,omitempty" mapstructure:"metadata"` - Type string `json:"type" norman:"noupdate"` - Enabled bool `json:"enabled,omitempty"` - AccessMode string `json:"accessMode,omitempty" norman:"required,notnullable,type=enum,options=required|restricted|unrestricted"` - AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" norman:"type=array[reference[principal]]"` - Status AuthConfigStatus `json:"status"` + Type string `json:"type" norman:"noupdate"` + Enabled bool `json:"enabled,omitempty"` + AccessMode string `json:"accessMode,omitempty" norman:"required,notnullable,type=enum,options=required|restricted|unrestricted"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" norman:"type=array[reference[principal]]"` + + // Flag. True when the auth provider supports a `Logout All` operation. + // Currently only the SAML providers do, with their `Single Log Out` flow. + LogoutAllSupported bool `json:"logoutAllSupported,omitempty"` + + Status AuthConfigStatus `json:"status"` } type AuthConfigStatus struct { @@ -350,6 +403,7 @@ type ActiveDirectoryConfig struct { UserObjectClass string `json:"userObjectClass,omitempty" norman:"default=person,required"` UserNameAttribute string `json:"userNameAttribute,omitempty" norman:"default=name,required"` UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" norman:"default=userAccountControl,required"` + UserLoginFilter string `json:"userLoginFilter,omitempty"` GroupSearchBase string `json:"groupSearchBase,omitempty"` GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" norman:"default=sAMAccountName,required"` GroupSearchFilter string `json:"groupSearchFilter,omitempty"` @@ -406,6 +460,7 @@ type LdapFields struct { UserNameAttribute string `json:"userNameAttribute,omitempty" norman:"default=cn,notnullable,required"` UserMemberAttribute string `json:"userMemberAttribute,omitempty" norman:"default=memberOf,notnullable,required"` UserEnabledAttribute string `json:"userEnabledAttribute,omitempty"` + UserLoginFilter string `json:"userLoginFilter,omitempty"` GroupSearchBase string `json:"groupSearchBase,omitempty"` GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" norman:"default=cn,notnullable,required"` GroupSearchFilter string `json:"groupSearchFilter,omitempty"` @@ -416,6 +471,7 @@ type LdapFields struct { GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" norman:"default=member,notnullable,required"` ConnectionTimeout int64 `json:"connectionTimeout,omitempty" norman:"default=5000,notnullable,required"` NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled" norman:"default=false"` + SearchUsingServiceAccount bool `json:"searchUsingServiceAccount" norman:"default=false"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -475,6 +531,16 @@ type FreeIpaTestAndApplyInput struct { type SamlConfig struct { AuthConfig `json:",inline" mapstructure:",squash"` + // Flag. True when the auth provider is configured to accept a `Logout All` + // operation. Can be set if and only if the provider supports `Logout All` + // (see AuthConfig.LogoutAllSupported). + LogoutAllEnabled bool `json:"logoutAllEnabled,omitempty"` + + // Flag. Can be set if and only if `LogoutAllEnabled` (above) is set. + // When set `Logout All` is the only kind of logout accepted. A regular + // logout request will be rejected. + LogoutAllForced bool `json:"logoutAllForced,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent" norman:"required"` SpCert string `json:"spCert" norman:"required"` SpKey string `json:"spKey" norman:"required,type=password"` @@ -494,6 +560,14 @@ type SamlConfigTestOutput struct { IdpRedirectURL string `json:"idpRedirectUrl"` } +type SamlConfigLogoutInput struct { + FinalRedirectURL string `json:"finalRedirectUrl"` +} + +type SamlConfigLogoutOutput struct { + IdpRedirectURL string `json:"idpRedirectUrl"` +} + type PingConfig struct { SamlConfig `json:",inline" mapstructure:",squash"` } @@ -587,3 +661,8 @@ type GenericOIDCTestOutput struct { type GenericOIDCApplyInput struct { OIDCApplyInput `json:",inline" mapstructure:",squash"` } + +// GenericOIDCConfig is a wrapper for the AWS Cognito provider holding the OIDC Configuration +type CognitoConfig struct { + OIDCConfig `json:",inline" mapstructure:",squash"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authz_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authz_types.go index 70438a37b..8d0b3949a 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authz_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/authz_types.go @@ -21,6 +21,8 @@ var ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:printcolumn:name="BACKINGNAMESPACE",type="string",JSONPath=".status.backingNamespace" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // Project is a group of namespaces. // Projects are used to create a multi-tenant environment within a Kubernetes cluster by managing namespace operations, @@ -46,11 +48,23 @@ func (p *Project) ObjClusterName() string { return p.Spec.ObjClusterName() } +// GetProjectBackingNamespace returns the namespace a project uses in the local cluster to store PRTBs and Project Scoped Secrets. +func (p *Project) GetProjectBackingNamespace() string { + if p.Status.BackingNamespace != "" { + return p.Status.BackingNamespace + } + return p.Name +} + // ProjectStatus represents the most recently observed status of the project. type ProjectStatus struct { // Conditions are a set of indicators about aspects of the project. // +optional Conditions []ProjectCondition `json:"conditions,omitempty"` + + // BackingNamespace is the name of the namespace that contains resources associated with the project. + // +optional + BackingNamespace string `json:"backingNamespace,omitempty"` } // ProjectCondition is the status of an aspect of the project. @@ -209,6 +223,9 @@ type GlobalRoleStatus struct { // +genclient:nonNamespaced // +kubebuilder:resource:scope=Cluster // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.summary" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // GlobalRoleBinding binds a given subject user or group to a GlobalRole. type GlobalRoleBinding struct { @@ -226,9 +243,54 @@ type GlobalRoleBinding struct { // +optional GroupPrincipalName string `json:"groupPrincipalName,omitempty" norman:"noupdate,type=reference[principal]"` + // UserPrincipalName is the name of the user principal subject to be bound. Immutable. + // +optional + UserPrincipalName string `json:"userPrincipalName,omitempty" norman:"noupdate,type=reference[principal]"` + // GlobalRoleName is the name of the Global Role that the subject will be bound to. Immutable. // +kubebuilder:validation:Required GlobalRoleName string `json:"globalRoleName" norman:"required,noupdate,type=reference[globalRole]"` + + // Status is the most recently observed status of the GlobalRoleBinding. Note, that this is read from and written to by __two__ controllers. + // +optional + Status GlobalRoleBindingStatus `json:"status,omitempty"` +} + +// GlobalRoleBindingStatus represents the most recently observed status of the GlobalRoleBinding +type GlobalRoleBindingStatus struct { + // ObservedGenerationLocal is the most recent generation (metadata.generation in GRB) + // observed by the local controller operating on this status. Populated by the system. + // +optional + ObservedGenerationLocal int64 `json:"observedGenerationLocal,omitempty"` + + // ObservedGenerationRemote is the most recent generation (metadata.generation in GRB) + // observed by the remote controller operating on this status. Populated by the system. + // +optional + ObservedGenerationRemote int64 `json:"observedGenerationRemote,omitempty"` + + // LastUpdateTime is a k8s timestamp of the last time the status was updated by any of the two controllers operating on it. + // +optional + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + + // Summary represents the summary of all resources. One of "Complete" or "Error". + // +optional + Summary string `json:"summary,omitempty"` + + // SummaryLocal represents the summary of the resources created in the local cluster. One of "Complete" or "Error". + // +optional + SummaryLocal string `json:"summaryLocal,omitempty"` + + // SummaryRemote represents the summary of the resources created in the downstream cluster. One of "Complete" or "Error". + // +optional + SummaryRemote string `json:"summaryRemote,omitempty"` + + // LocalConditions is a slice of Condition, indicating the status of backing RBAC objects created in the local cluster. + // +optional + LocalConditions []metav1.Condition `json:"localConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + + // RemoteConditions is a slice of Condition, indicating the status of backing RBAC objects created in the downstream cluster. + // +optional + RemoteConditions []metav1.Condition `json:"remoteConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` } // +genclient @@ -304,8 +366,7 @@ type RoleTemplate struct { // +optional RoleTemplateNames []string `json:"roleTemplateNames,omitempty" norman:"type=array[reference[roleTemplate]]"` - // Administrative if false, and context is set to cluster this RoleTemplate will not grant access to "CatalogTemplates" and "CatalogTemplateVersions" for any project in the cluster. - // Default is false. + // Administrative field is deprecated and no longer used. // +optional Administrative bool `json:"administrative,omitempty"` } @@ -359,6 +420,9 @@ func (p *ProjectRoleTemplateBinding) ObjClusterName() string { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.summary" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // ClusterRoleTemplateBinding is the object representing membership of a subject in a cluster with permissions // specified by a given role template. @@ -394,6 +458,47 @@ type ClusterRoleTemplateBinding struct { // RoleTemplateName is the name of the role template that defines permissions to perform actions on resources in the cluster. Immutable. // +kubebuilder:validation:Required RoleTemplateName string `json:"roleTemplateName" norman:"required,noupdate,type=reference[roleTemplate]"` + + // Status is the most recently observed status of the ClusterRoleTemplateBinding. BEWARE. This is read from and written to by __two__ controllers. + // +optional + Status ClusterRoleTemplateBindingStatus `json:"status,omitempty"` +} + +// ClusterRoleTemplateBindingStatus represents the most recently observed status of the ClusterRoleTemplateBinding +type ClusterRoleTemplateBindingStatus struct { + // ObservedGenerationLocal is the most recent generation (metadata.generation in CRTB) + // observed by the local controller operating on this status. Populated by the system. + // +optional + ObservedGenerationLocal int64 `json:"observedGenerationLocal,omitempty"` + + // ObservedGenerationRemote is the most recent generation (metadata.generation in CRTB) + // observed by the remote controller operating on this status. Populated by the system. + // +optional + ObservedGenerationRemote int64 `json:"observedGenerationRemote,omitempty"` + + // LastUpdateTime is a k8s timestamp of the last time the status was updated by any of the two controllers operating on it. + // +optional + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + + // Summary represents the summary of all resources. One of "Complete" or "Error". + // +optional + Summary string `json:"summary,omitempty"` + + // SummaryLocal represents the summary of the resources created in the local cluster. One of "Complete" or "Error". + // +optional + SummaryLocal string `json:"summaryLocal,omitempty"` + + // SummaryRemote represents the summary of the resources created in the downstream cluster. One of "Complete" or "Error". + // +optional + SummaryRemote string `json:"summaryRemote,omitempty"` + + // LocalConditions is a slice of Condition, indicating the status of backing RBAC objects created in the local cluster. + // +optional + LocalConditions []metav1.Condition `json:"localConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + + // RemoteConditions is a slice of Condition, indicating the status of backing RBAC objects created in the downstream cluster. + // +optional + RemoteConditions []metav1.Condition `json:"remoteConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` } func (c *ClusterRoleTemplateBinding) ObjClusterName() string { diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/catalog_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/catalog_types.go deleted file mode 100644 index 3c42dc357..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/catalog_types.go +++ /dev/null @@ -1,312 +0,0 @@ -package v3 - -import ( - "strings" - - "github.com/rancher/norman/condition" - "github.com/rancher/norman/types" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Catalog struct { - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec CatalogSpec `json:"spec"` - Status CatalogStatus `json:"status"` -} - -type CatalogSpec struct { - Description string `json:"description"` - URL string `json:"url,omitempty" norman:"required"` - Branch string `json:"branch,omitempty"` - CatalogKind string `json:"catalogKind,omitempty"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty" norman:"type=password"` - HelmVersion string `json:"helmVersion,omitempty" norman:"noupdate"` - CatalogSecrets CatalogSecrets `json:"catalogSecrets" norman:"nocreate,noupdate"` -} - -type CatalogStatus struct { - LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty"` - Commit string `json:"commit,omitempty"` - Conditions []CatalogCondition `json:"conditions,omitempty"` - - // Deprecated: should no longer be in use. If a Catalog CR is encountered with this field - // populated, it will be set to nil. - HelmVersionCommits map[string]VersionCommits `json:"helmVersionCommits,omitempty"` - CredentialSecret string `json:"credentialSecret,omitempty" norman:"nocreate,noupdate"` // Deprecated: use CatalogSpec.CatalogSecrets.CredentialSecret instead -} - -var ( - CatalogConditionRefreshed condition.Cond = "Refreshed" - CatalogConditionUpgraded condition.Cond = "Upgraded" - CatalogConditionDiskCached condition.Cond = "DiskCached" - CatalogConditionProcessed condition.Cond = "Processed" - CatalogConditionSecretsMigrated condition.Cond = "SecretsMigrated" -) - -type CatalogCondition struct { - // Type of cluster condition. - Type ClusterConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime string `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime string `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // Human-readable message indicating details about last transition - Message string `json:"message,omitempty"` -} - -// Deprecated: CatalogStatus.HelmVersionCommits has been deprecated, which is the only consumer of this type. -type VersionCommits struct { - Value map[string]string `json:"Value,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Template struct { - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec TemplateSpec `json:"spec"` - Status TemplateStatus `json:"status"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CatalogTemplate struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec TemplateSpec `json:"spec"` - Status TemplateStatus `json:"status"` -} - -type TemplateSpec struct { - DisplayName string `json:"displayName"` - CatalogID string `json:"catalogId,omitempty" norman:"type=reference[catalog]"` - ProjectCatalogID string `json:"projectCatalogId,omitempty" norman:"type=reference[projectCatalog]"` - ClusterCatalogID string `json:"clusterCatalogId,omitempty" norman:"type=reference[clusterCatalog]"` - DefaultTemplateVersionID string `json:"defaultTemplateVersionId,omitempty" norman:"type=reference[templateVersion]"` - ProjectID string `json:"projectId,omitempty" norman:"required,type=reference[project]"` - ClusterID string `json:"clusterId,omitempty" norman:"required,type=reference[cluster]"` - - Description string `json:"description,omitempty"` - DefaultVersion string `json:"defaultVersion,omitempty" yaml:"default_version,omitempty"` - Path string `json:"path,omitempty"` - Maintainer string `json:"maintainer,omitempty"` - ProjectURL string `json:"projectURL,omitempty" yaml:"project_url,omitempty"` - UpgradeFrom string `json:"upgradeFrom,omitempty"` - FolderName string `json:"folderName,omitempty"` - Icon string `json:"icon,omitempty"` - IconFilename string `json:"iconFilename,omitempty"` - - // Deprecated: Do not use - Readme string `json:"readme,omitempty" norman:"nocreate,noupdate"` - - Categories []string `json:"categories,omitempty"` - Versions []TemplateVersionSpec `json:"versions,omitempty"` - - Category string `json:"category,omitempty"` -} - -type TemplateStatus struct { - HelmVersion string `json:"helmVersion,omitempty" norman:"noupdate,nocreate"` -} - -// +genclient -// +kubebuilder:skipversion -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type TemplateVersion struct { - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec TemplateVersionSpec `json:"spec"` - Status TemplateVersionStatus `json:"status"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CatalogTemplateVersion struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec TemplateVersionSpec `json:"spec"` - Status TemplateVersionStatus `json:"status"` -} - -type TemplateVersionSpec struct { - ExternalID string `json:"externalId,omitempty"` - Version string `json:"version,omitempty"` - RancherVersion string `json:"rancherVersion,omitempty"` - RequiredNamespace string `json:"requiredNamespace,omitempty"` - KubeVersion string `json:"kubeVersion,omitempty"` - UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty"` - Digest string `json:"digest,omitempty"` - RancherMinVersion string `json:"rancherMinVersion,omitempty"` - RancherMaxVersion string `json:"rancherMaxVersion,omitempty"` - - // Deprecated: Do not use - Files map[string]string `json:"files,omitempty" norman:"nocreate,noupdate"` - // Deprecated: Do not use - Questions []Question `json:"questions,omitempty" norman:"nocreate,noupdate"` - // Deprecated: Do not use - Readme string `json:"readme,omitempty" norman:"nocreate,noupdate"` - // Deprecated: Do not use - AppReadme string `json:"appReadme,omitempty" norman:"nocreate,noupdate"` - - // for local cache rebuilt - VersionName string `json:"versionName,omitempty"` - VersionDir string `json:"versionDir,omitempty"` - VersionURLs []string `json:"versionUrls,omitempty"` -} - -type TemplateVersionStatus struct { - HelmVersion string `json:"helmVersion,omitempty" norman:"noupdate,nocreate"` -} - -type File struct { - Name string `json:"name,omitempty"` - Contents string `json:"contents,omitempty"` -} - -type Question struct { - Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` - Label string `json:"label,omitempty" yaml:"label,omitempty"` - Description string `json:"description,omitempty" yaml:"description,omitempty"` - Type string `json:"type,omitempty" yaml:"type,omitempty"` - Required bool `json:"required,omitempty" yaml:"required,omitempty"` - Default string `json:"default,omitempty" yaml:"default,omitempty"` - Group string `json:"group,omitempty" yaml:"group,omitempty"` - MinLength int `json:"minLength,omitempty" yaml:"min_length,omitempty"` - MaxLength int `json:"maxLength,omitempty" yaml:"max_length,omitempty"` - Min int `json:"min,omitempty" yaml:"min,omitempty"` - Max int `json:"max,omitempty" yaml:"max,omitempty"` - Options []string `json:"options,omitempty" yaml:"options,omitempty"` - ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` - InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` - Subquestions []SubQuestion `json:"subquestions,omitempty" yaml:"subquestions,omitempty"` - ShowIf string `json:"showIf,omitempty" yaml:"show_if,omitempty"` - ShowSubquestionIf string `json:"showSubquestionIf,omitempty" yaml:"show_subquestion_if,omitempty"` - Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` -} - -type SubQuestion struct { - Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` - Label string `json:"label,omitempty" yaml:"label,omitempty"` - Description string `json:"description,omitempty" yaml:"description,omitempty"` - Type string `json:"type,omitempty" yaml:"type,omitempty"` - Required bool `json:"required,omitempty" yaml:"required,omitempty"` - Default string `json:"default,omitempty" yaml:"default,omitempty"` - Group string `json:"group,omitempty" yaml:"group,omitempty"` - MinLength int `json:"minLength,omitempty" yaml:"min_length,omitempty"` - MaxLength int `json:"maxLength,omitempty" yaml:"max_length,omitempty"` - Min int `json:"min,omitempty" yaml:"min,omitempty"` - Max int `json:"max,omitempty" yaml:"max,omitempty"` - Options []string `json:"options,omitempty" yaml:"options,omitempty"` - ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` - InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` - ShowIf string `json:"showIf,omitempty" yaml:"show_if,omitempty"` - Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateContent is deprecated -// -// Deprecated: Do not use -type TemplateContent struct { - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Data string `json:"data,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ProjectCatalog struct { - types.Namespaced - - Catalog `json:",inline" mapstructure:",squash"` - ProjectName string `json:"projectName,omitempty" norman:"type=reference[project]"` -} - -func (p *ProjectCatalog) ObjClusterName() string { - if parts := strings.SplitN(p.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ClusterCatalog struct { - types.Namespaced - - Catalog `json:",inline" mapstructure:",squash"` - ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"` -} - -type CatalogRefresh struct { - Catalogs []string `json:"catalogs"` -} - -type CatalogSecrets struct { - CredentialSecret string `json:"credentialSecret,omitempty" norman:"nocreate,noupdate"` -} - -// GetSecret gets a reference to the private catalog secret, either from the CatalogSecrets field or the Status field. -// Spec.CatalogSecrets.CredentialSecret is preferred because Status.CredentialSecret is deprecated. -func (c *Catalog) GetSecret() string { - if c.Spec.CatalogSecrets.CredentialSecret != "" { - return c.Spec.CatalogSecrets.CredentialSecret - } - return c.Status.CredentialSecret -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_template_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_template_types.go index c7c2e5171..95087fbb0 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_template_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_template_types.go @@ -53,6 +53,14 @@ type ClusterTemplateSpec struct { Members []Member `json:"members,omitempty"` } +type Member struct { + UserName string `json:"userName,omitempty" norman:"type=reference[user]"` + UserPrincipalName string `json:"userPrincipalName,omitempty" norman:"type=reference[principal]"` + DisplayName string `json:"displayName,omitempty"` + GroupPrincipalName string `json:"groupPrincipalName,omitempty" norman:"type=reference[principal]"` + AccessType string `json:"accessType,omitempty" norman:"type=enum,options=owner|member|read-only"` +} + // +genclient // +kubebuilder:skipversion // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -79,6 +87,46 @@ type ClusterTemplateRevisionSpec struct { ClusterConfig *ClusterSpecBase `json:"clusterConfig" norman:"required"` } +type Question struct { + Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` + Label string `json:"label,omitempty" yaml:"label,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Default string `json:"default,omitempty" yaml:"default,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + MinLength int `json:"minLength,omitempty" yaml:"min_length,omitempty"` + MaxLength int `json:"maxLength,omitempty" yaml:"max_length,omitempty"` + Min int `json:"min,omitempty" yaml:"min,omitempty"` + Max int `json:"max,omitempty" yaml:"max,omitempty"` + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` + Subquestions []SubQuestion `json:"subquestions,omitempty" yaml:"subquestions,omitempty"` + ShowIf string `json:"showIf,omitempty" yaml:"show_if,omitempty"` + ShowSubquestionIf string `json:"showSubquestionIf,omitempty" yaml:"show_subquestion_if,omitempty"` + Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` +} + +type SubQuestion struct { + Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` + Label string `json:"label,omitempty" yaml:"label,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Default string `json:"default,omitempty" yaml:"default,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + MinLength int `json:"minLength,omitempty" yaml:"min_length,omitempty"` + MaxLength int `json:"maxLength,omitempty" yaml:"max_length,omitempty"` + Min int `json:"min,omitempty" yaml:"min,omitempty"` + Max int `json:"max,omitempty" yaml:"max,omitempty"` + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` + ShowIf string `json:"showIf,omitempty" yaml:"show_if,omitempty"` + Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` +} + type ClusterTemplateRevisionStatus struct { PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" norman:"nocreate,noupdate"` S3CredentialSecret string `json:"s3CredentialSecret,omitempty" norman:"nocreate,noupdate"` diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_types.go index 29cb5e6f0..24decdf05 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/cluster_types.go @@ -7,6 +7,7 @@ import ( "strings" aksv1 "github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1" + aliv1 "github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1" eksv1 "github.com/rancher/eks-operator/pkg/apis/eks.cattle.io/v1" gkev1 "github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1" "github.com/rancher/norman/condition" @@ -36,15 +37,16 @@ const ( ClusterActionSaveAsTemplate = "saveAsTemplate" // ClusterConditionReady Cluster ready to serve API (healthy when true, unhealthy when false) - ClusterConditionReady condition.Cond = "Ready" - ClusterConditionPending condition.Cond = "Pending" - ClusterConditionCertsGenerated condition.Cond = "CertsGenerated" - ClusterConditionEtcd condition.Cond = "etcd" - ClusterConditionProvisioned condition.Cond = "Provisioned" - ClusterConditionUpdated condition.Cond = "Updated" - ClusterConditionUpgraded condition.Cond = "Upgraded" - ClusterConditionWaiting condition.Cond = "Waiting" - ClusterConditionRemoved condition.Cond = "Removed" + ClusterConditionReady condition.Cond = "Ready" + ClusterConditionPending condition.Cond = "Pending" + ClusterConditionCertsGenerated condition.Cond = "CertsGenerated" + ClusterConditionEtcd condition.Cond = "etcd" + ClusterConditionPreBootstrapped condition.Cond = "PreBootstrapped" + ClusterConditionProvisioned condition.Cond = "Provisioned" + ClusterConditionUpdated condition.Cond = "Updated" + ClusterConditionUpgraded condition.Cond = "Upgraded" + ClusterConditionWaiting condition.Cond = "Waiting" + ClusterConditionRemoved condition.Cond = "Removed" // ClusterConditionNoDiskPressure true when all cluster nodes have sufficient disk ClusterConditionNoDiskPressure condition.Cond = "NoDiskPressure" // ClusterConditionNoMemoryPressure true when all cluster nodes have sufficient memory @@ -73,13 +75,14 @@ const ( ClusterDriverImported = "imported" ClusterDriverLocal = "local" - ClusterDriverRKE = "rancherKubernetesEngine" + ClusterDriverRKE = "rancherKubernetesEngine" // Deprecated: RKE clusters are deprecated ClusterDriverK3s = "k3s" ClusterDriverK3os = "k3os" ClusterDriverRke2 = "rke2" ClusterDriverAKS = "AKS" ClusterDriverEKS = "EKS" ClusterDriverGKE = "GKE" + ClusterDriverAlibaba = "AlibabaCloud" ClusterDriverRancherD = "rancherd" ClusterPrivateRegistrySecret = "PrivateRegistrySecret" @@ -122,9 +125,25 @@ type ClusterSpecBase struct { } type AgentDeploymentCustomization struct { - AppendTolerations []v1.Toleration `json:"appendTolerations,omitempty"` - OverrideAffinity *v1.Affinity `json:"overrideAffinity,omitempty"` - OverrideResourceRequirements *v1.ResourceRequirements `json:"overrideResourceRequirements,omitempty"` + AppendTolerations []v1.Toleration `json:"appendTolerations,omitempty"` + OverrideAffinity *v1.Affinity `json:"overrideAffinity,omitempty"` + OverrideResourceRequirements *v1.ResourceRequirements `json:"overrideResourceRequirements,omitempty"` + SchedulingCustomization *AgentSchedulingCustomization `json:"schedulingCustomization,omitempty"` +} + +type AgentSchedulingCustomization struct { + PriorityClass *PriorityClassSpec `json:"priorityClass,omitempty"` + PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` +} + +type PriorityClassSpec struct { + Value int `json:"value,omitempty"` + PreemptionPolicy *v1.PreemptionPolicy `json:"preemptionPolicy,omitempty"` +} + +type PodDisruptionBudgetSpec struct { + MinAvailable string `json:"minAvailable,omitempty"` + MaxUnavailable string `json:"maxUnavailable,omitempty"` } type ClusterSpec struct { @@ -134,7 +153,7 @@ type ClusterSpec struct { Internal bool `json:"internal" norman:"nocreate,noupdate"` K3sConfig *K3sConfig `json:"k3sConfig,omitempty"` Rke2Config *Rke2Config `json:"rke2Config,omitempty"` - ImportedConfig *ImportedConfig `json:"importedConfig,omitempty" norman:"nocreate,noupdate"` + ImportedConfig *ImportedConfig `json:"importedConfig,omitempty"` GoogleKubernetesEngineConfig *MapStringInterface `json:"googleKubernetesEngineConfig,omitempty"` AzureKubernetesServiceConfig *MapStringInterface `json:"azureKubernetesServiceConfig,omitempty"` AmazonElasticContainerServiceConfig *MapStringInterface `json:"amazonElasticContainerServiceConfig,omitempty"` @@ -142,6 +161,7 @@ type ClusterSpec struct { AKSConfig *aksv1.AKSClusterConfigSpec `json:"aksConfig,omitempty"` EKSConfig *eksv1.EKSClusterConfigSpec `json:"eksConfig,omitempty"` GKEConfig *gkev1.GKEClusterConfigSpec `json:"gkeConfig,omitempty"` + AliConfig *aliv1.AliClusterConfigSpec `json:"aliConfig,omitempty"` ClusterTemplateName string `json:"clusterTemplateName,omitempty" norman:"type=reference[clusterTemplate],nocreate,noupdate"` ClusterTemplateRevisionName string `json:"clusterTemplateRevisionName,omitempty" norman:"type=reference[clusterTemplateRevision]"` ClusterTemplateAnswers Answer `json:"answers,omitempty"` @@ -149,8 +169,20 @@ type ClusterSpec struct { FleetWorkspaceName string `json:"fleetWorkspaceName,omitempty"` } +type Answer struct { + ProjectName string `json:"projectName,omitempty" norman:"type=reference[project]"` + ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster]"` + Values map[string]string `json:"values,omitempty"` + ValuesSetString map[string]string `json:"valuesSetString,omitempty"` +} + +func (a *Answer) ObjClusterName() string { + return a.ClusterName +} + type ImportedConfig struct { - KubeConfig string `json:"kubeConfig" norman:"type=password"` + KubeConfig string `json:"kubeConfig" norman:"type=password"` + PrivateRegistryURL string `json:"privateRegistryURL,omitempty"` } type ClusterStatus struct { @@ -189,6 +221,7 @@ type ClusterStatus struct { AKSStatus AKSStatus `json:"aksStatus,omitempty" norman:"nocreate,noupdate"` EKSStatus EKSStatus `json:"eksStatus,omitempty" norman:"nocreate,noupdate"` GKEStatus GKEStatus `json:"gkeStatus,omitempty" norman:"nocreate,noupdate"` + AliStatus AliStatus `json:"aliStatus,omitempty" norman:"nocreate,noupdate"` PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" norman:"nocreate,noupdate"` // Deprecated: use ClusterSpec.ClusterSecrets.PrivateRegistrySecret instead S3CredentialSecret string `json:"s3CredentialSecret,omitempty" norman:"nocreate,noupdate"` // Deprecated: use ClusterSpec.ClusterSecrets.S3CredentialSecret instead WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" norman:"nocreate,noupdate"` // Deprecated: use ClusterSpec.ClusterSecrets.WeavePasswordSecret instead @@ -391,6 +424,11 @@ type GKEStatus struct { PrivateRequiresTunnel *bool `json:"privateRequiresTunnel"` } +type AliStatus struct { + UpstreamSpec *aliv1.AliClusterConfigSpec `json:"upstreamSpec"` + PrivateRequiresTunnel *bool `json:"privateRequiresTunnel"` +} + type ClusterSecrets struct { PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" norman:"nocreate,noupdate"` PrivateRegistryURL string `json:"privateRegistryURL,omitempty" norman:"nocreate,noupdate"` diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/condition.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/condition.go new file mode 100644 index 000000000..4fb32681e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/condition.go @@ -0,0 +1,59 @@ +package v3 + +import ( + v1 "k8s.io/api/core/v1" +) + +// Note: This struct is largely a mirror of the upstream 'metav1.Condition' type, with one key difference: The LastUpdateTime field. +// The 'condition' packages within both norman and wrangler attempt to set this field when updating the condition, +// and will panic if they are unable to do so (due to their use of reflection). Due to this, as well as the absence of other +// utility packages for working with conditions in Rancher, simply swapping out this Condition struct with the +// upstream 'metav1.Condition' struct is not a trivial change and likely needs to be evaluated on a per CRD basis. + +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like + // Available, but because arbitrary conditions can be useful + // (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + // status of the condition, one of True, False, Unknown. + // +kubebuilder:validation:Enum=True;False;Unknown + Status v1.ConditionStatus `json:"status"` + // lastUpdateTime of this condition. This is incremented if the resource + // is updated for any reason. This could be when the underlying condition + // changed, but may also be updated if other fields are modified + // (Message, Reason, etc.). + // +optional + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + // lastTransitionTime is the last time the condition transitioned from + // one status to another. This should be when the underlying condition + // changed. If that is not known, then using the time when the API field + // changed is acceptable. + // +optional + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime string `json:"lastTransitionTime,omitempty"` + // reason contains a programmatic identifier indicating the reason for + // the condition's last transition. Producers of specific condition types + // may define expected values and meanings for this field, and whether + // the values are considered a guaranteed API. The value should be + // a CamelCase string. + // +optional + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason,omitempty"` + // message is a human readable message indicating details + // about the transition. + // This may be an empty string. + // +optional + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/doc.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/doc.go index 85f76e274..26d5a2c78 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/doc.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/global_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/global_types.go index 21805d14b..ab7dafc20 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/global_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/global_types.go @@ -47,3 +47,9 @@ const ( ExperimentalFeatureKey = "feature.cattle.io/experimental" ExperimentalFeatureValue = "true" ) + +func (f *Feature) SetValue(value bool) { + if f.Spec.Value == nil || *f.Spec.Value != value { + f.Spec.Value = &[]bool{value}[0] + } +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/globaldns_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/globaldns_types.go deleted file mode 100644 index 2ca6d818e..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/globaldns_types.go +++ /dev/null @@ -1,87 +0,0 @@ -package v3 - -import ( - "github.com/rancher/norman/types" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type GlobalDns struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec GlobalDNSSpec `json:"spec,omitempty"` - Status GlobalDNSStatus `json:"status,omitempty"` -} - -type GlobalDNSSpec struct { - FQDN string `json:"fqdn,omitempty" norman:"type=hostname,required"` - TTL int64 `json:"ttl,omitempty" norman:"default=300"` - ProjectNames []string `json:"projectNames" norman:"type=array[reference[project]],noupdate"` - MultiClusterAppName string `json:"multiClusterAppName,omitempty" norman:"type=reference[multiClusterApp]"` - ProviderName string `json:"providerName,omitempty" norman:"type=reference[globalDnsProvider],required"` - Members []Member `json:"members,omitempty"` -} - -type GlobalDNSStatus struct { - Endpoints []string `json:"endpoints,omitempty"` - ClusterEndpoints map[string][]string `json:"clusterEndpoints,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type GlobalDnsProvider struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - //ObjectMeta.Name = GlobalDNSProviderID - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec GlobalDNSProviderSpec `json:"spec,omitempty"` -} - -type GlobalDNSProviderSpec struct { - Route53ProviderConfig *Route53ProviderConfig `json:"route53ProviderConfig,omitempty"` - CloudflareProviderConfig *CloudflareProviderConfig `json:"cloudflareProviderConfig,omitempty"` - AlidnsProviderConfig *AlidnsProviderConfig `json:"alidnsProviderConfig,omitempty"` - Members []Member `json:"members,omitempty"` - RootDomain string `json:"rootDomain"` -} - -type Route53ProviderConfig struct { - AccessKey string `json:"accessKey" norman:"notnullable,required,minLength=1"` - SecretKey string `json:"secretKey" norman:"notnullable,required,minLength=1,type=password"` - CredentialsPath string `json:"credentialsPath" norman:"default=/.aws"` - RoleArn string `json:"roleArn,omitempty"` - Region string `json:"region" norman:"default=us-east-1"` - ZoneType string `json:"zoneType" norman:"default=public"` - AdditionalOptions map[string]string `json:"additionalOptions,omitempty"` -} - -type CloudflareProviderConfig struct { - APIKey string `json:"apiKey" norman:"notnullable,required,minLength=1,type=password"` - APIEmail string `json:"apiEmail" norman:"notnullable,required,minLength=1"` - ProxySetting *bool `json:"proxySetting" norman:"default=true"` - AdditionalOptions map[string]string `json:"additionalOptions,omitempty"` -} - -type UpdateGlobalDNSTargetsInput struct { - ProjectNames []string `json:"projectNames" norman:"type=array[reference[project]]"` -} - -type AlidnsProviderConfig struct { - AccessKey string `json:"accessKey" norman:"notnullable,required,minLength=1"` - SecretKey string `json:"secretKey" norman:"notnullable,required,minLength=1,type=password"` - AdditionalOptions map[string]string `json:"additionalOptions,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/logging_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/logging_types.go deleted file mode 100644 index 855b927dc..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/logging_types.go +++ /dev/null @@ -1,230 +0,0 @@ -package v3 - -import ( - "strings" - - "github.com/rancher/norman/condition" - "github.com/rancher/norman/types" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ClusterLogging struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec ClusterLoggingSpec `json:"spec"` - // Most recent observed status of the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Status ClusterLoggingStatus `json:"status"` -} - -func (c *ClusterLogging) ObjClusterName() string { - return c.Spec.ObjClusterName() -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ProjectLogging struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Spec ProjectLoggingSpec `json:"spec"` - // Most recent observed status of the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Status ProjectLoggingStatus `json:"status"` -} - -func (p *ProjectLogging) ObjClusterName() string { - return p.Spec.ObjClusterName() -} - -type LoggingCommonField struct { - DisplayName string `json:"displayName,omitempty"` - OutputFlushInterval int `json:"outputFlushInterval,omitempty" norman:"default=60"` - OutputTags map[string]string `json:"outputTags,omitempty"` - EnableJSONParsing bool `json:"enableJSONParsing,omitempty"` -} - -type LoggingTargets struct { - ElasticsearchConfig *ElasticsearchConfig `json:"elasticsearchConfig,omitempty"` - SplunkConfig *SplunkConfig `json:"splunkConfig,omitempty"` - KafkaConfig *KafkaConfig `json:"kafkaConfig,omitempty"` - SyslogConfig *SyslogConfig `json:"syslogConfig,omitempty"` - FluentForwarderConfig *FluentForwarderConfig `json:"fluentForwarderConfig,omitempty"` - CustomTargetConfig *CustomTargetConfig `json:"customTargetConfig,omitempty"` -} - -type ClusterLoggingSpec struct { - LoggingTargets - LoggingCommonField - ClusterName string `json:"clusterName" norman:"type=reference[cluster]"` - IncludeSystemComponent *bool `json:"includeSystemComponent,omitempty" norman:"default=true"` -} - -func (c *ClusterLoggingSpec) ObjClusterName() string { - return c.ClusterName -} - -type ProjectLoggingSpec struct { - LoggingTargets - LoggingCommonField - ProjectName string `json:"projectName" norman:"type=reference[project]"` -} - -func (p *ProjectLoggingSpec) ObjClusterName() string { - if parts := strings.SplitN(p.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -type ClusterLoggingStatus struct { - Conditions []LoggingCondition `json:"conditions,omitempty"` - AppliedSpec ClusterLoggingSpec `json:"appliedSpec,omitempty"` - FailedSpec *ClusterLoggingSpec `json:"failedSpec,omitempty"` -} - -type ProjectLoggingStatus struct { - Conditions []LoggingCondition `json:"conditions,omitempty"` - AppliedSpec ProjectLoggingSpec `json:"appliedSpec,omitempty"` -} - -var ( - LoggingConditionProvisioned condition.Cond = "Provisioned" - LoggingConditionUpdated condition.Cond = "Updated" -) - -type LoggingCondition struct { - // Type of cluster condition. - Type condition.Cond `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime string `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime string `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // Human-readable message indicating details about last transition - Message string `json:"message,omitempty"` -} - -type ElasticsearchConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - IndexPrefix string `json:"indexPrefix,omitempty" norman:"required"` - DateFormat string `json:"dateFormat,omitempty" norman:"required,type=enum,options=YYYY-MM-DD|YYYY-MM|YYYY,default=YYYY-MM-DD"` - AuthUserName string `json:"authUsername,omitempty"` - AuthPassword string `json:"authPassword,omitempty" norman:"type=password"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` - ClientKeyPass string `json:"clientKeyPass,omitempty"` - SSLVerify bool `json:"sslVerify,omitempty"` - SSLVersion string `json:"sslVersion,omitempty" norman:"type=enum,options=SSLv23|TLSv1|TLSv1_1|TLSv1_2,default=TLSv1_2"` -} - -type SplunkConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - Source string `json:"source,omitempty"` - Token string `json:"token,omitempty" norman:"required,type=password"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` - ClientKeyPass string `json:"clientKeyPass,omitempty"` - SSLVerify bool `json:"sslVerify,omitempty"` - Index string `json:"index,omitempty"` -} - -type KafkaConfig struct { - ZookeeperEndpoint string `json:"zookeeperEndpoint,omitempty"` - BrokerEndpoints []string `json:"brokerEndpoints,omitempty"` - Topic string `json:"topic,omitempty" norman:"required"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` - SaslUsername string `json:"saslUsername,omitempty"` - SaslPassword string `json:"saslPassword,omitempty" norman:"type=password"` - SaslScramMechanism string `json:"saslScramMechanism,omitempty" norman:"type=enum,options=sha256|sha512"` - SaslType string `json:"saslType,omitempty" norman:"type=enum,options=plain|scram"` -} - -type SyslogConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - Severity string `json:"severity,omitempty" norman:"default=notice,type=enum,options=emerg|alert|crit|err|warning|notice|info|debug"` - Program string `json:"program,omitempty"` - Protocol string `json:"protocol,omitempty" norman:"default=udp,type=enum,options=udp|tcp"` - Token string `json:"token,omitempty" norman:"type=password"` - EnableTLS bool `json:"enableTls,omitempty" norman:"default=false"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` - SSLVerify bool `json:"sslVerify,omitempty"` -} - -type FluentForwarderConfig struct { - EnableTLS bool `json:"enableTls,omitempty" norman:"default=false"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` - ClientKeyPass string `json:"clientKeyPass,omitempty"` - SSLVerify bool `json:"sslVerify,omitempty"` - Compress *bool `json:"compress,omitempty" norman:"default=true"` - FluentServers []FluentServer `json:"fluentServers,omitempty" norman:"required"` -} - -type FluentServer struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - Hostname string `json:"hostname,omitempty"` - Weight int `json:"weight,omitempty" norman:"default=100"` - Standby bool `json:"standby,omitempty" norman:"default=false"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty" norman:"type=password"` - SharedKey string `json:"sharedKey,omitempty" norman:"type=password"` -} - -type CustomTargetConfig struct { - Content string `json:"content,omitempty"` - Certificate string `json:"certificate,omitempty"` - ClientCert string `json:"clientCert,omitempty"` - ClientKey string `json:"clientKey,omitempty"` -} - -type ClusterTestInput struct { - ClusterName string `json:"clusterId" norman:"required,type=reference[cluster]"` - LoggingTargets - OutputTags map[string]string `json:"outputTags,omitempty"` -} - -func (c *ClusterTestInput) ObjClusterName() string { - return c.ClusterName -} - -type ProjectTestInput struct { - ProjectName string `json:"projectId" norman:"required,type=reference[project]"` - LoggingTargets - OutputTags map[string]string `json:"outputTags,omitempty"` -} - -func (p *ProjectTestInput) ObjClusterName() string { - if parts := strings.SplitN(p.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/machine_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/machine_types.go index 6208d2e4a..a7a25e0b2 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/machine_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/machine_types.go @@ -269,28 +269,51 @@ type NodeCommonParams struct { } // +genclient -// +kubebuilder:skipversion // +genclient:nonNamespaced +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:printcolumn:name="Activated",type=string,JSONPath=".spec.active" +// +kubebuilder:printcolumn:name="Binary URL",type=string,JSONPath=".spec.url" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// NodeDriver represents a Rancher node driver for a specific cloud provider used to provision cluster nodes. type NodeDriver struct { metav1.TypeMeta `json:",inline"` // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status + // Specification of the desired behavior of the Node Driver. More info: + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +kubebuilder:validation:XValidation:rule="!has(self.checksum) || (self.checksum.size() in [0, 32, 40, 64, 128])",message="Checksum must be an md5, sha1, sha256, or sha512 digest." Spec NodeDriverSpec `json:"spec"` - // Most recent observed status of the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - Status NodeDriverStatus `json:"status"` + // Most recent observed status of the Node Driver. More info: + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Status NodeDriverStatus `json:"status,omitempty"` } type NodeDriverStatus struct { - Conditions []Condition `json:"conditions"` - AppliedURL string `json:"appliedURL"` - AppliedChecksum string `json:"appliedChecksum"` - AppliedDockerMachineVersion string `json:"appliedDockerMachineVersion"` + // Conditions is a representation of the current state of the driver, + // this includes its installation status (Downloaded, Installed), as well + // as its current state (Active, Inactive). Information related to + // errors encountered while transitioning to one of these states will be + // populated in the Message and Reason fields. + // +optional + Conditions []Condition `json:"conditions,omitempty"` + // AppliedURL is the url last used to download the driver. + // +optional + AppliedURL string `json:"appliedURL,omitempty"` + // AppliedChecksum is the last known checksum of the driver. This is used + // to determine when a Driver needs to be redownloaded from its URL. + // +optional + AppliedChecksum string `json:"appliedChecksum,omitempty"` + // AppliedDockerMachineVersion specifies the last docker machine version + // (a.k.a rancher-machine) which provides this driver. When this version + // is incremented, Rancher will query the rancher-machine driver to + // obtain its arguments and update the automatically generated schema + // and associated machine config object. This field is only specified for + // drivers bundled within Rancher via rancher-machine. + // +optional + AppliedDockerMachineVersion string `json:"appliedDockerMachineVersion,omitempty"` } var ( @@ -300,34 +323,47 @@ var ( NodeDriverConditionInactive condition.Cond = "Inactive" ) -type Condition struct { - // Type of cluster condition. - Type string `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime string `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime string `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // Human-readable message indicating details about last transition - Message string `json:"message,omitempty"` -} - type NodeDriverSpec struct { - DisplayName string `json:"displayName"` - Description string `json:"description"` - URL string `json:"url" norman:"required"` - ExternalID string `json:"externalId"` - Builtin bool `json:"builtin"` - Active bool `json:"active"` - // If AddCloudCredential is true, then the cloud credential schema is created - // regardless of whether the node driver is active. - AddCloudCredential bool `json:"addCloudCredential"` - Checksum string `json:"checksum"` - UIURL string `json:"uiUrl"` - WhitelistDomains []string `json:"whitelistDomains,omitempty"` + // DisplayName specifies the publicly visible name of the driver shown in the Rancher UI. + // +kubebuilder:validation:MaxLength=57 + // +optional + DisplayName string `json:"displayName,omitempty"` + // Description provides a short explanation of what the driver does. + // +optional + Description string `json:"description,omitempty"` + // URL defines the location of the driver binary that will + // be downloaded when the driver is enabled. This can either be + // an absolute url to a remote resource, or a reference to localhost. + // +required + URL string `json:"url" norman:"required"` + // ExternalID is not currently used. + // +optional + ExternalID string `json:"externalId,omitempty"` + // Builtin specifies if a driver is built into Rancher via rancher-machine. + // +optional + Builtin bool `json:"builtin,omitempty"` + // Active specifies if the driver can be used to provision clusters. + // +required + Active bool `json:"active"` + // AddCloudCredential determines if an associated cloud credential + // dynamic schema should be created for this driver even if it is not + // enabled. + // +optional + AddCloudCredential bool `json:"addCloudCredential,omitempty"` + // Checksum is used to represent the expected content of the driver + // binary. When this value changes, the driver binary will be + // redownloaded from its URL. + // +kubebuilder:validation:Pattern="^$|^[a-fA-F0-9]{32,128}$" + // +kubebuilder:validation:MaxLength=128 + // +optional + Checksum string `json:"checksum,omitempty"` + // UIURL is the url to load for a customized Add Nodes screen for this driver. + // +optional + UIURL string `json:"uiUrl,omitempty"` + // WhitelistDomains is a list of domains which will be automatically + // white-listed by Rancher to allow for the driver to be downloaded. + // +optional + WhitelistDomains []string `json:"whitelistDomains,omitempty"` } type PublicEndpoint struct { diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/multi_cluster_app.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/multi_cluster_app.go deleted file mode 100644 index 169c97569..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/multi_cluster_app.go +++ /dev/null @@ -1,114 +0,0 @@ -package v3 - -import ( - "strings" - - "github.com/rancher/norman/condition" - "github.com/rancher/norman/types" - v3 "github.com/rancher/rancher/pkg/apis/project.cattle.io/v3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -var ( - MultiClusterAppConditionInstalled condition.Cond = "Installed" - MultiClusterAppConditionDeployed condition.Cond = "Deployed" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type MultiClusterApp struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - - Spec MultiClusterAppSpec `json:"spec"` - Status MultiClusterAppStatus `json:"status"` -} - -type MultiClusterAppSpec struct { - TemplateVersionName string `json:"templateVersionName,omitempty" norman:"type=reference[templateVersion],required"` - Answers []Answer `json:"answers,omitempty"` - Wait bool `json:"wait,omitempty"` - Timeout int `json:"timeout,omitempty" norman:"min=1,default=300"` - Targets []Target `json:"targets,omitempty" norman:"required,noupdate"` - Members []Member `json:"members,omitempty"` - Roles []string `json:"roles,omitempty" norman:"type=array[reference[roleTemplate]],required"` - RevisionHistoryLimit int `json:"revisionHistoryLimit,omitempty" norman:"default=10"` - UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy,omitempty"` -} - -type MultiClusterAppStatus struct { - Conditions []v3.AppCondition `json:"conditions,omitempty"` - RevisionName string `json:"revisionName,omitempty" norman:"type=reference[multiClusterAppRevision],required"` - HelmVersion string `json:"helmVersion,omitempty" norman:"nocreate,noupdate"` -} - -type Target struct { - ProjectName string `json:"projectName,omitempty" norman:"type=reference[project],required"` - AppName string `json:"appName,omitempty" norman:"type=reference[v3/projects/schemas/app]"` - State string `json:"state,omitempty"` - Healthstate string `json:"healthState,omitempty"` -} - -func (t *Target) ObjClusterName() string { - if parts := strings.SplitN(t.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -type Answer struct { - ProjectName string `json:"projectName,omitempty" norman:"type=reference[project]"` - ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster]"` - Values map[string]string `json:"values,omitempty"` - ValuesSetString map[string]string `json:"valuesSetString,omitempty"` -} - -func (a *Answer) ObjClusterName() string { - return a.ClusterName -} - -type Member struct { - UserName string `json:"userName,omitempty" norman:"type=reference[user]"` - UserPrincipalName string `json:"userPrincipalName,omitempty" norman:"type=reference[principal]"` - DisplayName string `json:"displayName,omitempty"` - GroupPrincipalName string `json:"groupPrincipalName,omitempty" norman:"type=reference[principal]"` - AccessType string `json:"accessType,omitempty" norman:"type=enum,options=owner|member|read-only"` -} - -type UpgradeStrategy struct { - RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"` -} - -type RollingUpdate struct { - BatchSize int `json:"batchSize,omitempty"` - Interval int `json:"interval,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type MultiClusterAppRevision struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - TemplateVersionName string `json:"templateVersionName,omitempty" norman:"type=reference[templateVersion]"` - Answers []Answer `json:"answers,omitempty"` -} - -type MultiClusterAppRollbackInput struct { - RevisionName string `json:"revisionName,omitempty" norman:"type=reference[multiClusterAppRevision]"` -} - -type UpdateMultiClusterAppTargetsInput struct { - Projects []string `json:"projects" norman:"type=array[reference[project]],required"` - Answers []Answer `json:"answers"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/oidc_provider_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/oidc_provider_types.go new file mode 100644 index 000000000..e41d46bfa --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/oidc_provider_types.go @@ -0,0 +1,69 @@ +// +k8s:deepcopy-gen=package +// +groupName=management.cattle.io +package v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Client ID",type="string",JSONPath=".status.clientID" +// +kubebuilder:printcolumn:name="Token Expiration",type="integer",JSONPath=".spec.tokenExpirationSeconds" +// +kubebuilder:printcolumn:name="RefreshToken Expiration",type="integer",JSONPath=".spec.refreshTokenExpirationSeconds" +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Cluster + +type OIDCClient struct { + metav1.TypeMeta `json:",inline"` + + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the specification of the desired configuration for the oidc client. + // +optional + Spec OIDCClientSpec `json:"spec,omitempty"` + + // Status is the most recently observed status of the oidc client. + // +optional + Status OIDCClientStatus `json:"status,omitempty"` +} + +// OIDCClientSecretStatus represent the observed status of a client secret. +type OIDCClientSecretStatus struct { + // LastUsedAt represent when this client secret was used. + LastUsedAt string `json:"lastUsedAt,omitempty"` + // CreatedAt represents when this client secret was created. + CreatedAt string `json:"createdAt,omitempty"` + // LastFiveCharacters are the 5 last characters of the client secret + LastFiveCharacters string `json:"lastFiveCharacters,omitempty"` +} + +// OIDCClientStatus represents the most recently observed status of the oidc client. +type OIDCClientStatus struct { + // ClientID represents the ID of the client + ClientID string `json:"clientID,omitempty"` + // ClientSecrets represents the observed status of the client secrets + ClientSecrets map[string]OIDCClientSecretStatus `json:"clientSecrets,omitempty"` +} + +// OIDCClient is a description of the oidc client. +type OIDCClientSpec struct { + // Description provides additional context about the OIDC client. + // +optional + Description string `json:"description,omitempty"` + // RedirectURIs defines the allowed redirect URIs for the OIDC client. + // These URIs must be registered and used during the authentication flow. + // +optional + RedirectURIs []string `json:"redirectURIs"` + // TokenExpirationSeconds specifies the duration (in seconds) before + // an access token and ID token expire. + // +kubebuilder:validation:Minimum=1 + TokenExpirationSeconds int64 `json:"tokenExpirationSeconds"` + // RefreshTokenExpirationSeconds defines how long (in seconds) + // a refresh token remains valid before expiration. + // +kubebuilder:validation:Minimum=1 + RefreshTokenExpirationSeconds int64 `json:"refreshTokenExpirationSeconds"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/public_authn_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/public_authn_types.go index 6b402c9d6..d13c0307f 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/public_authn_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/public_authn_types.go @@ -13,7 +13,10 @@ type AuthProvider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Type string `json:"type"` + Type string `json:"type"` + LogoutAllSupported bool `json:"logoutAllSupported"` + LogoutAllEnabled bool `json:"logoutAllEnabled"` + LogoutAllForced bool `json:"logoutAllForced"` } func (a *AuthProvider) GetType() string { @@ -248,3 +251,17 @@ type GenericOIDCLogin struct { GenericLogin `json:",inline"` Code string `json:"code" norman:"type=string,required"` } + +// +genclient +// +kubebuilder:skipversion +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type CognitoProvider struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + AuthProvider `json:",inline"` + + RedirectURL string `json:"redirectUrl"` + Scopes string `json:"scopes"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/schema_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/schema_types.go index b796dc834..dc3dd500c 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/schema_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/schema_types.go @@ -5,75 +5,325 @@ import ( ) // +genclient -// +kubebuilder:skipversion // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Cluster +// DynamicSchema is the definition of a schema. Dynamic schemas are +// created and used internally by Rancher to generate CRDs and Norman +// API endpoints, and should not be created manually. +// +// Functionality for generating Rancher dynamic Norman API endpoints +// is limited. These endpoints are not backed by any Norman +// stores. Related fields will affect the definition of the Norman +// schema in Rancher but without stores these will have no useful +// effect. The schema definitions themselves will still be available +// in the Norman API. +// --- +// DynamicSchema is used by Rancher for generating dynamic +// provisioning and CAPI CRDs for Rancher node drivers: the machine +// pool configuration CRD, the InfrastructureMachineTemplate CRD, and +// the InfrastructureMachine CRD. Dynamic schemas are generated by +// Rancher from node and cluster drivers. +// +// It is also used by Rancher to generate meta-schemas that list node +// driver, kontainer driver, and credential config schemas as fields +// in the schema (see the "nodeconfig", "nodetemplateconfig", +// "cluster" and "credentialconfig" schemas). Some of these are used +// by the UI. type DynamicSchema struct { - metav1.TypeMeta `json:",inline"` - // Standard object’s metadata. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata + metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status + + // Specification of the desired behavior of the the dynamic schema. More info: + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Spec DynamicSchemaSpec `json:"spec"` - // Most recent observed status of the cluster. More info: - // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status + // Most recent observed status of the dynamic schema. More info: + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional Status DynamicSchemaStatus `json:"status"` } type DynamicSchemaSpec struct { - SchemaName string `json:"schemaName,omitempty"` - Embed bool `json:"embed,omitempty"` - EmbedType string `json:"embedType,omitempty"` - PluralName string `json:"pluralName,omitempty"` - ResourceMethods []string `json:"resourceMethods,omitempty"` - ResourceFields map[string]Field `json:"resourceFields,omitempty"` - ResourceActions map[string]Action `json:"resourceActions,omitempty"` - CollectionMethods []string `json:"collectionMethods,omitempty"` - CollectionFields map[string]Field `json:"collectionFields,omitempty"` - CollectionActions map[string]Action `json:"collectionActions,omitempty"` - CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` - IncludeableLinks []string `json:"includeableLinks,omitempty"` - DynamicSchemaVersion string `json:"dynamicSchemaVersion,omitempty"` + // SchemaName is the id under which the schema will be registered in the + // Norman API collection of schemas. If unset, the dynamic schema + // resource name will be used. + // +optional + SchemaName string `json:"schemaName,omitempty"` + + // Embed determines whether the ResourceFields of this schema should be + // embedded into another Norman schema (EmbedType). When Embed is true, + // updates after creation to this object don't affect its corresponding + // Norman schema and will only change the fields of the EmbedType + // schema. + // +optional + Embed bool `json:"embed,omitempty"` + + // EmbedType identifies the Norman schema into which the ResourceFields + // of this object should be embedded in, when Embed is true. + // +optional + EmbedType string `json:"embedType,omitempty"` + + // PluralName is an alternate name used to reference collections of + // resources of this schema in the Norman API. + // + // No Norman stores are defined for dynamic schemas, so no collections + // can be retrieved through this name. + // +optional + PluralName string `json:"pluralName,omitempty"` + + // ResourceMethods is a list of http methods available for resources of + // this Norman schema in the Norman API. + // + // No Norman stores are defined for dynamic schemas, so these methods + // will always return an error. + // +optional + ResourceMethods []string `json:"resourceMethods,omitempty"` + + // ResourceFields defines the schema fields and their types. + // +optional + // --- + // These are populated by Rancher to define which fields are supported + // by a given node or kontainer driver. They are also used for + // listing other schemas (see the "cluster", "nodeconfig", + // "nodetemplateconfig" and "credentialconfig" generated schemas). + ResourceFields map[string]Field `json:"resourceFields,omitempty"` + + // ResourceActions is the list of custom actions for this resource in + // the Norman API. + // + // No API action handlers can be defined for dynamic schemas, so the + // behavior of these actions cannot be defined. + // +optional + ResourceActions map[string]Action `json:"resourceActions,omitempty"` + + // CollectionMethods is a list of http methods available for collections + // of resources of this schema in the Norman API. + // + // No Norman stores are defined for dynamic schemas, so these methods + // will always return an error. + // +optional + CollectionMethods []string `json:"collectionMethods,omitempty"` + + // CollectionFields has no effect. + // +optional + CollectionFields map[string]Field `json:"collectionFields,omitempty"` + + // CollectionActions is the list of custom actions for collections of + // resources of this schema in the Norman API. + // + // No action handlers can be defined for dynamic schemas, so the + // behavior of these actions cannot be defined. + // +optional + CollectionActions map[string]Action `json:"collectionActions,omitempty"` + + // CollectionFilters are filters for listing collections of resources of + // this schema. Each map key is a field that can be used as a filter. + // + // No Norman stores are defined for dynamic schemas, so no collections + // can be retrieved to be filtered. + // +optional + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` + + // IncludeableLinks has no effect. + // +optional + IncludeableLinks []string `json:"includeableLinks,omitempty"` + + // DynamicSchemaVersion is used to determine whether the Norman schema + // should be updated when this object is updated. The schema is only + // updated if the previous version differs. Rancher overwrites this + // field. + // +optional + DynamicSchemaVersion string `json:"dynamicSchemaVersion,omitempty"` } type DynamicSchemaStatus struct { + // Fake has no effect. + // +optional Fake string `json:"fake,omitempty"` } type Field struct { - Type string `json:"type,omitempty"` - Default Values `json:"default,omitempty"` - Unique bool `json:"unique,omitempty"` - Nullable bool `json:"nullable,omitempty"` - Create bool `json:"create,omitempty"` - Required bool `json:"required,omitempty"` - Update bool `json:"update,omitempty"` - MinLength int64 `json:"minLength,omitempty"` - MaxLength int64 `json:"maxLength,omitempty"` - Min int64 `json:"min,omitempty"` - Max int64 `json:"max,omitempty"` - Options []string `json:"options,omitempty"` - ValidChars string `json:"validChars,omitempty"` - InvalidChars string `json:"invalidChars,omitempty"` - Description string `json:"description,omitempty"` - DynamicField bool `json:"dynamicField,omitempty"` + // Type is the type of the field. Possible types are "string", + // "password", "boolean", "int", "array[string]" or another schema name. + // +optional + Type string `json:"type,omitempty"` + + // Default is the default value for the field. + // +optional + Default Values `json:"default,omitempty"` + + // Unique has no effect. + // +optional + Unique bool `json:"unique,omitempty"` + + // Nullable indicates that a field in a CRD derived from this schema + // will be nullable. + // + // It also indicates whether the field can take a null value in a valid + // object of this schema in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Nullable bool `json:"nullable,omitempty"` + + // Create indicates that this field should be excluded when creating a + // new object of this schema through the Norman API. If a value is + // provided for this field in a create request, it will be filtered out + // and ignored. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Create bool `json:"create,omitempty"` + + // Required indicates that a field in a CRD derived from this schema + // will be required. + // + // It also indicates that this field is required when creating a new + // object of this schema through the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Required bool `json:"required,omitempty"` + + // Update indicates that this field should remain unchanged when + // updating an object of this schema through the Norman API. If a value + // is provided for this field in an update request, it will be filtered + // out and ignored. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be updated in the Norman API. + // +optional + Update bool `json:"update,omitempty"` + + // MinLength defines the "minLength" attribute for this field in a CRD + // derived from this schema. + // + // It is also used to validate the length of the string representation + // of this field in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + MinLength int64 `json:"minLength,omitempty"` + + // MaxLength defines the "maxLength" attribute for this field in a CRD + // derived from this schema. + // + // It is also used to validate the length of the string representation + // of this field in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + MaxLength int64 `json:"maxLength,omitempty"` + + // Min defines the "minimum" attribute for this field in a CRD derived + // from this schema. + // + // It is also used to validate minimum value of this field in the Norman + // API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Min int64 `json:"min,omitempty"` + + // Max defines the "maximum" attribute for this field in a CRD derived + // from this schema. + // + // It is also used to validate maximum value of this field in the Norman + // API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Max int64 `json:"max,omitempty"` + + // Options defines the "enum" attribute with valid values for this field + // in a CRD derived from this schema. + // + // It is also used to validate the value of the string representation of + // this field in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + Options []string `json:"options,omitempty"` + + // ValidChars defines a value for the "pattern" attribute with the + // allowed characters for this field in a CRD derived from this schema. + // + // It is also used to validate the value of the string representation of + // this field in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + ValidChars string `json:"validChars,omitempty"` + + // InvalidChars defines a value for the "pattern" attribute with the + // disallowed characters for this field in a CRD derived from this + // schema. + // + // It is also used to validate the value of the string representation of + // this field in the Norman API. + // + // No Norman stores are defined for DynamicSchemas, so no resources of + // this schema can be created in the Norman API. + // +optional + InvalidChars string `json:"invalidChars,omitempty"` + + // Description is the description of this field. + // +optional + // --- + // This is used to generate descriptions for CRDs derived from the + // schema. + Description string `json:"description,omitempty"` + + // DynamicField indicates this field should be removed from a schema + // when embedding another schema into it. + // +optional + DynamicField bool `json:"dynamicField,omitempty"` } +// Values defines a default value for a Field. The value field will +// be selected according to the Type of the Field. type Values struct { - StringValue string `json:"stringValue"` - IntValue int `json:"intValue"` - BoolValue bool `json:"boolValue"` + // StringValue is the default value for a Field of "string" or + // "password" type. + // +optional + StringValue string `json:"stringValue"` + // IntValue is the default value for a Field of "int" type. + // +optional + IntValue int `json:"intValue"` + // BoolValue is the default value for a Field of "bool" type. + // +optional + BoolValue bool `json:"boolValue"` + // StringSliceValue is the default value for a Field of "array[string]" + // type. + // +optional + // +nullable StringSliceValue []string `json:"stringSliceValue"` } type Action struct { - Input string `json:"input,omitempty"` + // Input is the input for a custom Norman API action. + // +optional + Input string `json:"input,omitempty"` + + // Output is the output for a custom Norman API action. + // +optional Output string `json:"output,omitempty"` } type Filter struct { + // Modifiers are the operators that can be used when filtering a + // collection of resources in the Norman API. + // +optional Modifiers []string `json:"modifiers,omitempty"` } diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/tools_system_images.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/tools_system_images.go index abee3ab14..d3b167b4d 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/tools_system_images.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/tools_system_images.go @@ -5,7 +5,7 @@ var ( AuthSystemImages AuthSystemImages }{ AuthSystemImages: AuthSystemImages{ - KubeAPIAuth: "rancher/kube-api-auth:v0.2.2", + KubeAPIAuth: "rancher/kube-api-auth:v0.2.5-rc.1", }, } ) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_deepcopy.go index be7f53914..7a76ca5e0 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,10 +23,10 @@ package v3 import ( v1 "github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1" + alicattleiov1 "github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1" ekscattleiov1 "github.com/rancher/eks-operator/pkg/apis/eks.cattle.io/v1" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" gkecattleiov1 "github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1" - projectcattleiov3 "github.com/rancher/rancher/pkg/apis/project.cattle.io/v3" types "github.com/rancher/rke/types" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" @@ -384,6 +384,11 @@ func (in *AgentDeploymentCustomization) DeepCopyInto(out *AgentDeploymentCustomi *out = new(corev1.ResourceRequirements) (*in).DeepCopyInto(*out) } + if in.SchedulingCustomization != nil { + in, out := &in.SchedulingCustomization, &out.SchedulingCustomization + *out = new(AgentSchedulingCustomization) + (*in).DeepCopyInto(*out) + } return } @@ -398,24 +403,53 @@ func (in *AgentDeploymentCustomization) DeepCopy() *AgentDeploymentCustomization } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlidnsProviderConfig) DeepCopyInto(out *AlidnsProviderConfig) { +func (in *AgentSchedulingCustomization) DeepCopyInto(out *AgentSchedulingCustomization) { *out = *in - if in.AdditionalOptions != nil { - in, out := &in.AdditionalOptions, &out.AdditionalOptions - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + if in.PriorityClass != nil { + in, out := &in.PriorityClass, &out.PriorityClass + *out = new(PriorityClassSpec) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(PodDisruptionBudgetSpec) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSchedulingCustomization. +func (in *AgentSchedulingCustomization) DeepCopy() *AgentSchedulingCustomization { + if in == nil { + return nil + } + out := new(AgentSchedulingCustomization) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliStatus) DeepCopyInto(out *AliStatus) { + *out = *in + if in.UpstreamSpec != nil { + in, out := &in.UpstreamSpec, &out.UpstreamSpec + *out = new(alicattleiov1.AliClusterConfigSpec) + (*in).DeepCopyInto(*out) + } + if in.PrivateRequiresTunnel != nil { + in, out := &in.PrivateRequiresTunnel, &out.PrivateRequiresTunnel + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlidnsProviderConfig. -func (in *AlidnsProviderConfig) DeepCopy() *AlidnsProviderConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliStatus. +func (in *AliStatus) DeepCopy() *AliStatus { if in == nil { return nil } - out := new(AlidnsProviderConfig) + out := new(AliStatus) in.DeepCopyInto(out) return out } @@ -869,57 +903,73 @@ func (in *Capabilities) DeepCopy() *Capabilities { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Catalog) DeepCopyInto(out *Catalog) { +func (in *CertExpiration) DeepCopyInto(out *CertExpiration) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Catalog. -func (in *Catalog) DeepCopy() *Catalog { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertExpiration. +func (in *CertExpiration) DeepCopy() *CertExpiration { if in == nil { return nil } - out := new(Catalog) + out := new(CertExpiration) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Catalog) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangePasswordInput) DeepCopyInto(out *ChangePasswordInput) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangePasswordInput. +func (in *ChangePasswordInput) DeepCopy() *ChangePasswordInput { + if in == nil { + return nil } - return nil + out := new(ChangePasswordInput) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogCondition) DeepCopyInto(out *CatalogCondition) { +func (in *CloudCredential) DeepCopyInto(out *CloudCredential) { *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogCondition. -func (in *CatalogCondition) DeepCopy() *CatalogCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredential. +func (in *CloudCredential) DeepCopy() *CloudCredential { if in == nil { return nil } - out := new(CatalogCondition) + out := new(CloudCredential) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CloudCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogList) DeepCopyInto(out *CatalogList) { +func (in *CloudCredentialList) DeepCopyInto(out *CloudCredentialList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Catalog, len(*in)) + *out = make([]CloudCredential, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -927,18 +977,18 @@ func (in *CatalogList) DeepCopyInto(out *CatalogList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogList. -func (in *CatalogList) DeepCopy() *CatalogList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialList. +func (in *CloudCredentialList) DeepCopy() *CloudCredentialList { if in == nil { return nil } - out := new(CatalogList) + out := new(CloudCredentialList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CatalogList) DeepCopyObject() runtime.Object { +func (in *CloudCredentialList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -946,110 +996,145 @@ func (in *CatalogList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogRefresh) DeepCopyInto(out *CatalogRefresh) { +func (in *CloudCredentialSpec) DeepCopyInto(out *CloudCredentialSpec) { *out = *in - if in.Catalogs != nil { - in, out := &in.Catalogs, &out.Catalogs - *out = make([]string, len(*in)) - copy(*out, *in) + if in.S3CredentialConfig != nil { + in, out := &in.S3CredentialConfig, &out.S3CredentialConfig + *out = new(S3CredentialConfig) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogRefresh. -func (in *CatalogRefresh) DeepCopy() *CatalogRefresh { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialSpec. +func (in *CloudCredentialSpec) DeepCopy() *CloudCredentialSpec { if in == nil { return nil } - out := new(CatalogRefresh) + out := new(CloudCredentialSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogSecrets) DeepCopyInto(out *CatalogSecrets) { +func (in *Cluster) DeepCopyInto(out *Cluster) { *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogSecrets. -func (in *CatalogSecrets) DeepCopy() *CatalogSecrets { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { if in == nil { return nil } - out := new(CatalogSecrets) + out := new(Cluster) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogSpec) DeepCopyInto(out *CatalogSpec) { +func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus) { *out = *in - out.CatalogSecrets = in.CatalogSecrets + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]corev1.ComponentCondition, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogSpec. -func (in *CatalogSpec) DeepCopy() *CatalogSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentStatus. +func (in *ClusterComponentStatus) DeepCopy() *ClusterComponentStatus { if in == nil { return nil } - out := new(CatalogSpec) + out := new(ClusterComponentStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogStatus) DeepCopyInto(out *CatalogStatus) { +func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CatalogCondition, len(*in)) - copy(*out, *in) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition. +func (in *ClusterCondition) DeepCopy() *ClusterCondition { + if in == nil { + return nil } - if in.HelmVersionCommits != nil { - in, out := &in.HelmVersionCommits, &out.HelmVersionCommits - *out = make(map[string]VersionCommits, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() + out := new(ClusterCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogStatus. -func (in *CatalogStatus) DeepCopy() *CatalogStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { if in == nil { return nil } - out := new(CatalogStatus) + out := new(ClusterList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogTemplate) DeepCopyInto(out *CatalogTemplate) { +func (in *ClusterProxyConfig) DeepCopyInto(out *ClusterProxyConfig) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogTemplate. -func (in *CatalogTemplate) DeepCopy() *CatalogTemplate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProxyConfig. +func (in *ClusterProxyConfig) DeepCopy() *ClusterProxyConfig { if in == nil { return nil } - out := new(CatalogTemplate) + out := new(ClusterProxyConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CatalogTemplate) DeepCopyObject() runtime.Object { +func (in *ClusterProxyConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1057,13 +1142,13 @@ func (in *CatalogTemplate) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogTemplateList) DeepCopyInto(out *CatalogTemplateList) { +func (in *ClusterProxyConfigList) DeepCopyInto(out *ClusterProxyConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]CatalogTemplate, len(*in)) + *out = make([]ClusterProxyConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1071,18 +1156,18 @@ func (in *CatalogTemplateList) DeepCopyInto(out *CatalogTemplateList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogTemplateList. -func (in *CatalogTemplateList) DeepCopy() *CatalogTemplateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProxyConfigList. +func (in *ClusterProxyConfigList) DeepCopy() *ClusterProxyConfigList { if in == nil { return nil } - out := new(CatalogTemplateList) + out := new(ClusterProxyConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CatalogTemplateList) DeepCopyObject() runtime.Object { +func (in *ClusterProxyConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1090,28 +1175,28 @@ func (in *CatalogTemplateList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogTemplateVersion) DeepCopyInto(out *CatalogTemplateVersion) { +func (in *ClusterRegistrationToken) DeepCopyInto(out *ClusterRegistrationToken) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) + out.Spec = in.Spec out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogTemplateVersion. -func (in *CatalogTemplateVersion) DeepCopy() *CatalogTemplateVersion { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationToken. +func (in *ClusterRegistrationToken) DeepCopy() *ClusterRegistrationToken { if in == nil { return nil } - out := new(CatalogTemplateVersion) + out := new(ClusterRegistrationToken) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CatalogTemplateVersion) DeepCopyObject() runtime.Object { +func (in *ClusterRegistrationToken) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1119,13 +1204,13 @@ func (in *CatalogTemplateVersion) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CatalogTemplateVersionList) DeepCopyInto(out *CatalogTemplateVersionList) { +func (in *ClusterRegistrationTokenList) DeepCopyInto(out *ClusterRegistrationTokenList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]CatalogTemplateVersion, len(*in)) + *out = make([]ClusterRegistrationToken, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1133,18 +1218,18 @@ func (in *CatalogTemplateVersionList) DeepCopyInto(out *CatalogTemplateVersionLi return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogTemplateVersionList. -func (in *CatalogTemplateVersionList) DeepCopy() *CatalogTemplateVersionList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenList. +func (in *ClusterRegistrationTokenList) DeepCopy() *ClusterRegistrationTokenList { if in == nil { return nil } - out := new(CatalogTemplateVersionList) + out := new(ClusterRegistrationTokenList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CatalogTemplateVersionList) DeepCopyObject() runtime.Object { +func (in *ClusterRegistrationTokenList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1152,59 +1237,59 @@ func (in *CatalogTemplateVersionList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertExpiration) DeepCopyInto(out *CertExpiration) { +func (in *ClusterRegistrationTokenSpec) DeepCopyInto(out *ClusterRegistrationTokenSpec) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertExpiration. -func (in *CertExpiration) DeepCopy() *CertExpiration { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenSpec. +func (in *ClusterRegistrationTokenSpec) DeepCopy() *ClusterRegistrationTokenSpec { if in == nil { return nil } - out := new(CertExpiration) + out := new(ClusterRegistrationTokenSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChangePasswordInput) DeepCopyInto(out *ChangePasswordInput) { +func (in *ClusterRegistrationTokenStatus) DeepCopyInto(out *ClusterRegistrationTokenStatus) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangePasswordInput. -func (in *ChangePasswordInput) DeepCopy() *ChangePasswordInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenStatus. +func (in *ClusterRegistrationTokenStatus) DeepCopy() *ClusterRegistrationTokenStatus { if in == nil { return nil } - out := new(ChangePasswordInput) + out := new(ClusterRegistrationTokenStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredential) DeepCopyInto(out *CloudCredential) { +func (in *ClusterRoleTemplateBinding) DeepCopyInto(out *ClusterRoleTemplateBinding) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredential. -func (in *CloudCredential) DeepCopy() *CloudCredential { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBinding. +func (in *ClusterRoleTemplateBinding) DeepCopy() *ClusterRoleTemplateBinding { if in == nil { return nil } - out := new(CloudCredential) + out := new(ClusterRoleTemplateBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudCredential) DeepCopyObject() runtime.Object { +func (in *ClusterRoleTemplateBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1212,13 +1297,13 @@ func (in *CloudCredential) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredentialList) DeepCopyInto(out *CloudCredentialList) { +func (in *ClusterRoleTemplateBindingList) DeepCopyInto(out *ClusterRoleTemplateBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]CloudCredential, len(*in)) + *out = make([]ClusterRoleTemplateBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1226,18 +1311,18 @@ func (in *CloudCredentialList) DeepCopyInto(out *CloudCredentialList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialList. -func (in *CloudCredentialList) DeepCopy() *CloudCredentialList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBindingList. +func (in *ClusterRoleTemplateBindingList) DeepCopy() *ClusterRoleTemplateBindingList { if in == nil { return nil } - out := new(CloudCredentialList) + out := new(ClusterRoleTemplateBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudCredentialList) DeepCopyObject() runtime.Object { +func (in *ClusterRoleTemplateBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1245,1722 +1330,292 @@ func (in *CloudCredentialList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredentialSpec) DeepCopyInto(out *CloudCredentialSpec) { +func (in *ClusterRoleTemplateBindingStatus) DeepCopyInto(out *ClusterRoleTemplateBindingStatus) { *out = *in - if in.S3CredentialConfig != nil { - in, out := &in.S3CredentialConfig, &out.S3CredentialConfig - *out = new(S3CredentialConfig) - **out = **in + if in.LocalConditions != nil { + in, out := &in.LocalConditions, &out.LocalConditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RemoteConditions != nil { + in, out := &in.RemoteConditions, &out.RemoteConditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialSpec. -func (in *CloudCredentialSpec) DeepCopy() *CloudCredentialSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBindingStatus. +func (in *ClusterRoleTemplateBindingStatus) DeepCopy() *ClusterRoleTemplateBindingStatus { if in == nil { return nil } - out := new(CloudCredentialSpec) + out := new(ClusterRoleTemplateBindingStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudflareProviderConfig) DeepCopyInto(out *CloudflareProviderConfig) { +func (in *ClusterSecrets) DeepCopyInto(out *ClusterSecrets) { *out = *in - if in.ProxySetting != nil { - in, out := &in.ProxySetting, &out.ProxySetting - *out = new(bool) - **out = **in - } - if in.AdditionalOptions != nil { - in, out := &in.AdditionalOptions, &out.AdditionalOptions - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudflareProviderConfig. -func (in *CloudflareProviderConfig) DeepCopy() *CloudflareProviderConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSecrets. +func (in *ClusterSecrets) DeepCopy() *ClusterSecrets { if in == nil { return nil } - out := new(CloudflareProviderConfig) + out := new(ClusterSecrets) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Cluster) DeepCopyInto(out *Cluster) { +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. -func (in *Cluster) DeepCopy() *Cluster { - if in == nil { - return nil + in.ClusterSpecBase.DeepCopyInto(&out.ClusterSpecBase) + if in.K3sConfig != nil { + in, out := &in.K3sConfig, &out.K3sConfig + *out = new(K3sConfig) + **out = **in } - out := new(Cluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Cluster) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.Rke2Config != nil { + in, out := &in.Rke2Config, &out.Rke2Config + *out = new(Rke2Config) + **out = **in + } + if in.ImportedConfig != nil { + in, out := &in.ImportedConfig, &out.ImportedConfig + *out = new(ImportedConfig) + **out = **in + } + if in.GoogleKubernetesEngineConfig != nil { + in, out := &in.GoogleKubernetesEngineConfig, &out.GoogleKubernetesEngineConfig + *out = (*in).DeepCopy() + } + if in.AzureKubernetesServiceConfig != nil { + in, out := &in.AzureKubernetesServiceConfig, &out.AzureKubernetesServiceConfig + *out = (*in).DeepCopy() + } + if in.AmazonElasticContainerServiceConfig != nil { + in, out := &in.AmazonElasticContainerServiceConfig, &out.AmazonElasticContainerServiceConfig + *out = (*in).DeepCopy() + } + if in.GenericEngineConfig != nil { + in, out := &in.GenericEngineConfig, &out.GenericEngineConfig + *out = (*in).DeepCopy() + } + if in.AKSConfig != nil { + in, out := &in.AKSConfig, &out.AKSConfig + *out = new(v1.AKSClusterConfigSpec) + (*in).DeepCopyInto(*out) + } + if in.EKSConfig != nil { + in, out := &in.EKSConfig, &out.EKSConfig + *out = new(ekscattleiov1.EKSClusterConfigSpec) + (*in).DeepCopyInto(*out) + } + if in.GKEConfig != nil { + in, out := &in.GKEConfig, &out.GKEConfig + *out = new(gkecattleiov1.GKEClusterConfigSpec) + (*in).DeepCopyInto(*out) + } + if in.AliConfig != nil { + in, out := &in.AliConfig, &out.AliConfig + *out = new(alicattleiov1.AliClusterConfigSpec) + (*in).DeepCopyInto(*out) + } + in.ClusterTemplateAnswers.DeepCopyInto(&out.ClusterTemplateAnswers) + if in.ClusterTemplateQuestions != nil { + in, out := &in.ClusterTemplateQuestions, &out.ClusterTemplateQuestions + *out = make([]Question, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCatalog) DeepCopyInto(out *ClusterCatalog) { - *out = *in - out.Namespaced = in.Namespaced - in.Catalog.DeepCopyInto(&out.Catalog) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCatalog. -func (in *ClusterCatalog) DeepCopy() *ClusterCatalog { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { if in == nil { return nil } - out := new(ClusterCatalog) + out := new(ClusterSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterCatalog) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCatalogList) DeepCopyInto(out *ClusterCatalogList) { +func (in *ClusterSpecBase) DeepCopyInto(out *ClusterSpecBase) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterCatalog, len(*in)) + if in.AgentEnvVars != nil { + in, out := &in.AgentEnvVars, &out.AgentEnvVars + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.RancherKubernetesEngineConfig != nil { + in, out := &in.RancherKubernetesEngineConfig, &out.RancherKubernetesEngineConfig + *out = new(types.RancherKubernetesEngineConfig) + (*in).DeepCopyInto(*out) + } + if in.EnableNetworkPolicy != nil { + in, out := &in.EnableNetworkPolicy, &out.EnableNetworkPolicy + *out = new(bool) + **out = **in + } + out.LocalClusterAuthEndpoint = in.LocalClusterAuthEndpoint + out.ClusterSecrets = in.ClusterSecrets + if in.ClusterAgentDeploymentCustomization != nil { + in, out := &in.ClusterAgentDeploymentCustomization, &out.ClusterAgentDeploymentCustomization + *out = new(AgentDeploymentCustomization) + (*in).DeepCopyInto(*out) + } + if in.FleetAgentDeploymentCustomization != nil { + in, out := &in.FleetAgentDeploymentCustomization, &out.FleetAgentDeploymentCustomization + *out = new(AgentDeploymentCustomization) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCatalogList. -func (in *ClusterCatalogList) DeepCopy() *ClusterCatalogList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpecBase. +func (in *ClusterSpecBase) DeepCopy() *ClusterSpecBase { if in == nil { return nil } - out := new(ClusterCatalogList) + out := new(ClusterSpecBase) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterCatalogList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus) { +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]corev1.ComponentCondition, len(*in)) + *out = make([]ClusterCondition, len(*in)) copy(*out, *in) } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentStatus. -func (in *ClusterComponentStatus) DeepCopy() *ClusterComponentStatus { - if in == nil { - return nil + if in.AppliedAgentEnvVars != nil { + in, out := &in.AppliedAgentEnvVars, &out.AppliedAgentEnvVars + *out = make([]corev1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - out := new(ClusterComponentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition. -func (in *ClusterCondition) DeepCopy() *ClusterCondition { - if in == nil { - return nil + if in.AgentFeatures != nil { + in, out := &in.AgentFeatures, &out.AgentFeatures + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } - out := new(ClusterCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterList) DeepCopyInto(out *ClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Cluster, len(*in)) + if in.ComponentStatuses != nil { + in, out := &in.ComponentStatuses, &out.ComponentStatuses + *out = make([]ClusterComponentStatus, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Allocatable != nil { + in, out := &in.Allocatable, &out.Allocatable + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + in.AppliedSpec.DeepCopyInto(&out.AppliedSpec) + if in.FailedSpec != nil { + in, out := &in.FailedSpec, &out.FailedSpec + *out = new(ClusterSpec) + (*in).DeepCopyInto(*out) + } + if in.Requested != nil { + in, out := &in.Requested, &out.Requested + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(version.Info) + **out = **in + } + in.Capabilities.DeepCopyInto(&out.Capabilities) + if in.CertificatesExpiration != nil { + in, out := &in.CertificatesExpiration, &out.CertificatesExpiration + *out = make(map[string]CertExpiration, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.AKSStatus.DeepCopyInto(&out.AKSStatus) + in.EKSStatus.DeepCopyInto(&out.EKSStatus) + in.GKEStatus.DeepCopyInto(&out.GKEStatus) + in.AliStatus.DeepCopyInto(&out.AliStatus) + if in.AppliedClusterAgentDeploymentCustomization != nil { + in, out := &in.AppliedClusterAgentDeploymentCustomization, &out.AppliedClusterAgentDeploymentCustomization + *out = new(AgentDeploymentCustomization) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. -func (in *ClusterList) DeepCopy() *ClusterList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { if in == nil { return nil } - out := new(ClusterList) + out := new(ClusterStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterLogging) DeepCopyInto(out *ClusterLogging) { +func (in *ClusterTemplate) DeepCopyInto(out *ClusterTemplate) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterLogging. -func (in *ClusterLogging) DeepCopy() *ClusterLogging { - if in == nil { - return nil - } - out := new(ClusterLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterLogging) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterLoggingList) DeepCopyInto(out *ClusterLoggingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterLogging, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterLoggingList. -func (in *ClusterLoggingList) DeepCopy() *ClusterLoggingList { - if in == nil { - return nil - } - out := new(ClusterLoggingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterLoggingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterLoggingSpec) DeepCopyInto(out *ClusterLoggingSpec) { - *out = *in - in.LoggingTargets.DeepCopyInto(&out.LoggingTargets) - in.LoggingCommonField.DeepCopyInto(&out.LoggingCommonField) - if in.IncludeSystemComponent != nil { - in, out := &in.IncludeSystemComponent, &out.IncludeSystemComponent - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterLoggingSpec. -func (in *ClusterLoggingSpec) DeepCopy() *ClusterLoggingSpec { - if in == nil { - return nil - } - out := new(ClusterLoggingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterLoggingStatus) DeepCopyInto(out *ClusterLoggingStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]LoggingCondition, len(*in)) - copy(*out, *in) - } - in.AppliedSpec.DeepCopyInto(&out.AppliedSpec) - if in.FailedSpec != nil { - in, out := &in.FailedSpec, &out.FailedSpec - *out = new(ClusterLoggingSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterLoggingStatus. -func (in *ClusterLoggingStatus) DeepCopy() *ClusterLoggingStatus { - if in == nil { - return nil - } - out := new(ClusterLoggingStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterProxyConfig) DeepCopyInto(out *ClusterProxyConfig) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProxyConfig. -func (in *ClusterProxyConfig) DeepCopy() *ClusterProxyConfig { - if in == nil { - return nil - } - out := new(ClusterProxyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterProxyConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterProxyConfigList) DeepCopyInto(out *ClusterProxyConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterProxyConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProxyConfigList. -func (in *ClusterProxyConfigList) DeepCopy() *ClusterProxyConfigList { - if in == nil { - return nil - } - out := new(ClusterProxyConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterProxyConfigList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRegistrationToken) DeepCopyInto(out *ClusterRegistrationToken) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationToken. -func (in *ClusterRegistrationToken) DeepCopy() *ClusterRegistrationToken { - if in == nil { - return nil - } - out := new(ClusterRegistrationToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRegistrationToken) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRegistrationTokenList) DeepCopyInto(out *ClusterRegistrationTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRegistrationToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenList. -func (in *ClusterRegistrationTokenList) DeepCopy() *ClusterRegistrationTokenList { - if in == nil { - return nil - } - out := new(ClusterRegistrationTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRegistrationTokenList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRegistrationTokenSpec) DeepCopyInto(out *ClusterRegistrationTokenSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenSpec. -func (in *ClusterRegistrationTokenSpec) DeepCopy() *ClusterRegistrationTokenSpec { - if in == nil { - return nil - } - out := new(ClusterRegistrationTokenSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRegistrationTokenStatus) DeepCopyInto(out *ClusterRegistrationTokenStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRegistrationTokenStatus. -func (in *ClusterRegistrationTokenStatus) DeepCopy() *ClusterRegistrationTokenStatus { - if in == nil { - return nil - } - out := new(ClusterRegistrationTokenStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleTemplateBinding) DeepCopyInto(out *ClusterRoleTemplateBinding) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBinding. -func (in *ClusterRoleTemplateBinding) DeepCopy() *ClusterRoleTemplateBinding { - if in == nil { - return nil - } - out := new(ClusterRoleTemplateBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleTemplateBinding) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleTemplateBindingList) DeepCopyInto(out *ClusterRoleTemplateBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRoleTemplateBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBindingList. -func (in *ClusterRoleTemplateBindingList) DeepCopy() *ClusterRoleTemplateBindingList { - if in == nil { - return nil - } - out := new(ClusterRoleTemplateBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleTemplateBindingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSecrets) DeepCopyInto(out *ClusterSecrets) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSecrets. -func (in *ClusterSecrets) DeepCopy() *ClusterSecrets { - if in == nil { - return nil - } - out := new(ClusterSecrets) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { - *out = *in - in.ClusterSpecBase.DeepCopyInto(&out.ClusterSpecBase) - if in.K3sConfig != nil { - in, out := &in.K3sConfig, &out.K3sConfig - *out = new(K3sConfig) - **out = **in - } - if in.Rke2Config != nil { - in, out := &in.Rke2Config, &out.Rke2Config - *out = new(Rke2Config) - **out = **in - } - if in.ImportedConfig != nil { - in, out := &in.ImportedConfig, &out.ImportedConfig - *out = new(ImportedConfig) - **out = **in - } - if in.GoogleKubernetesEngineConfig != nil { - in, out := &in.GoogleKubernetesEngineConfig, &out.GoogleKubernetesEngineConfig - *out = (*in).DeepCopy() - } - if in.AzureKubernetesServiceConfig != nil { - in, out := &in.AzureKubernetesServiceConfig, &out.AzureKubernetesServiceConfig - *out = (*in).DeepCopy() - } - if in.AmazonElasticContainerServiceConfig != nil { - in, out := &in.AmazonElasticContainerServiceConfig, &out.AmazonElasticContainerServiceConfig - *out = (*in).DeepCopy() - } - if in.GenericEngineConfig != nil { - in, out := &in.GenericEngineConfig, &out.GenericEngineConfig - *out = (*in).DeepCopy() - } - if in.AKSConfig != nil { - in, out := &in.AKSConfig, &out.AKSConfig - *out = new(v1.AKSClusterConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.EKSConfig != nil { - in, out := &in.EKSConfig, &out.EKSConfig - *out = new(ekscattleiov1.EKSClusterConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.GKEConfig != nil { - in, out := &in.GKEConfig, &out.GKEConfig - *out = new(gkecattleiov1.GKEClusterConfigSpec) - (*in).DeepCopyInto(*out) - } - in.ClusterTemplateAnswers.DeepCopyInto(&out.ClusterTemplateAnswers) - if in.ClusterTemplateQuestions != nil { - in, out := &in.ClusterTemplateQuestions, &out.ClusterTemplateQuestions - *out = make([]Question, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. -func (in *ClusterSpec) DeepCopy() *ClusterSpec { - if in == nil { - return nil - } - out := new(ClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterSpecBase) DeepCopyInto(out *ClusterSpecBase) { - *out = *in - if in.AgentEnvVars != nil { - in, out := &in.AgentEnvVars, &out.AgentEnvVars - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.RancherKubernetesEngineConfig != nil { - in, out := &in.RancherKubernetesEngineConfig, &out.RancherKubernetesEngineConfig - *out = new(types.RancherKubernetesEngineConfig) - (*in).DeepCopyInto(*out) - } - if in.EnableNetworkPolicy != nil { - in, out := &in.EnableNetworkPolicy, &out.EnableNetworkPolicy - *out = new(bool) - **out = **in - } - out.LocalClusterAuthEndpoint = in.LocalClusterAuthEndpoint - out.ClusterSecrets = in.ClusterSecrets - if in.ClusterAgentDeploymentCustomization != nil { - in, out := &in.ClusterAgentDeploymentCustomization, &out.ClusterAgentDeploymentCustomization - *out = new(AgentDeploymentCustomization) - (*in).DeepCopyInto(*out) - } - if in.FleetAgentDeploymentCustomization != nil { - in, out := &in.FleetAgentDeploymentCustomization, &out.FleetAgentDeploymentCustomization - *out = new(AgentDeploymentCustomization) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpecBase. -func (in *ClusterSpecBase) DeepCopy() *ClusterSpecBase { - if in == nil { - return nil - } - out := new(ClusterSpecBase) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ClusterCondition, len(*in)) - copy(*out, *in) - } - if in.AppliedAgentEnvVars != nil { - in, out := &in.AppliedAgentEnvVars, &out.AppliedAgentEnvVars - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AgentFeatures != nil { - in, out := &in.AgentFeatures, &out.AgentFeatures - *out = make(map[string]bool, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ComponentStatuses != nil { - in, out := &in.ComponentStatuses, &out.ComponentStatuses - *out = make([]ClusterComponentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(corev1.ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Allocatable != nil { - in, out := &in.Allocatable, &out.Allocatable - *out = make(corev1.ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - in.AppliedSpec.DeepCopyInto(&out.AppliedSpec) - if in.FailedSpec != nil { - in, out := &in.FailedSpec, &out.FailedSpec - *out = new(ClusterSpec) - (*in).DeepCopyInto(*out) - } - if in.Requested != nil { - in, out := &in.Requested, &out.Requested - *out = make(corev1.ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Limits != nil { - in, out := &in.Limits, &out.Limits - *out = make(corev1.ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(version.Info) - **out = **in - } - in.Capabilities.DeepCopyInto(&out.Capabilities) - if in.CertificatesExpiration != nil { - in, out := &in.CertificatesExpiration, &out.CertificatesExpiration - *out = make(map[string]CertExpiration, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.AKSStatus.DeepCopyInto(&out.AKSStatus) - in.EKSStatus.DeepCopyInto(&out.EKSStatus) - in.GKEStatus.DeepCopyInto(&out.GKEStatus) - if in.AppliedClusterAgentDeploymentCustomization != nil { - in, out := &in.AppliedClusterAgentDeploymentCustomization, &out.AppliedClusterAgentDeploymentCustomization - *out = new(AgentDeploymentCustomization) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. -func (in *ClusterStatus) DeepCopy() *ClusterStatus { - if in == nil { - return nil - } - out := new(ClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplate) DeepCopyInto(out *ClusterTemplate) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplate. -func (in *ClusterTemplate) DeepCopy() *ClusterTemplate { - if in == nil { - return nil - } - out := new(ClusterTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateList) DeepCopyInto(out *ClusterTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateList. -func (in *ClusterTemplateList) DeepCopy() *ClusterTemplateList { - if in == nil { - return nil - } - out := new(ClusterTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateQuestionsOutput) DeepCopyInto(out *ClusterTemplateQuestionsOutput) { - *out = *in - if in.Questions != nil { - in, out := &in.Questions, &out.Questions - *out = make([]Question, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateQuestionsOutput. -func (in *ClusterTemplateQuestionsOutput) DeepCopy() *ClusterTemplateQuestionsOutput { - if in == nil { - return nil - } - out := new(ClusterTemplateQuestionsOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateRevision) DeepCopyInto(out *ClusterTemplateRevision) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevision. -func (in *ClusterTemplateRevision) DeepCopy() *ClusterTemplateRevision { - if in == nil { - return nil - } - out := new(ClusterTemplateRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTemplateRevision) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateRevisionCondition) DeepCopyInto(out *ClusterTemplateRevisionCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionCondition. -func (in *ClusterTemplateRevisionCondition) DeepCopy() *ClusterTemplateRevisionCondition { - if in == nil { - return nil - } - out := new(ClusterTemplateRevisionCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateRevisionList) DeepCopyInto(out *ClusterTemplateRevisionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterTemplateRevision, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionList. -func (in *ClusterTemplateRevisionList) DeepCopy() *ClusterTemplateRevisionList { - if in == nil { - return nil - } - out := new(ClusterTemplateRevisionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTemplateRevisionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateRevisionSpec) DeepCopyInto(out *ClusterTemplateRevisionSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Questions != nil { - in, out := &in.Questions, &out.Questions - *out = make([]Question, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ClusterConfig != nil { - in, out := &in.ClusterConfig, &out.ClusterConfig - *out = new(ClusterSpecBase) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionSpec. -func (in *ClusterTemplateRevisionSpec) DeepCopy() *ClusterTemplateRevisionSpec { - if in == nil { - return nil - } - out := new(ClusterTemplateRevisionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateRevisionStatus) DeepCopyInto(out *ClusterTemplateRevisionStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ClusterTemplateRevisionCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionStatus. -func (in *ClusterTemplateRevisionStatus) DeepCopy() *ClusterTemplateRevisionStatus { - if in == nil { - return nil - } - out := new(ClusterTemplateRevisionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTemplateSpec) DeepCopyInto(out *ClusterTemplateSpec) { - *out = *in - if in.Members != nil { - in, out := &in.Members, &out.Members - *out = make([]Member, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateSpec. -func (in *ClusterTemplateSpec) DeepCopy() *ClusterTemplateSpec { - if in == nil { - return nil - } - out := new(ClusterTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTestInput) DeepCopyInto(out *ClusterTestInput) { - *out = *in - in.LoggingTargets.DeepCopyInto(&out.LoggingTargets) - if in.OutputTags != nil { - in, out := &in.OutputTags, &out.OutputTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestInput. -func (in *ClusterTestInput) DeepCopy() *ClusterTestInput { - if in == nil { - return nil - } - out := new(ClusterTestInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterUpgradeStrategy) DeepCopyInto(out *ClusterUpgradeStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUpgradeStrategy. -func (in *ClusterUpgradeStrategy) DeepCopy() *ClusterUpgradeStrategy { - if in == nil { - return nil - } - out := new(ClusterUpgradeStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComposeCondition) DeepCopyInto(out *ComposeCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeCondition. -func (in *ComposeCondition) DeepCopy() *ComposeCondition { - if in == nil { - return nil - } - out := new(ComposeCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComposeConfig) DeepCopyInto(out *ComposeConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeConfig. -func (in *ComposeConfig) DeepCopy() *ComposeConfig { - if in == nil { - return nil - } - out := new(ComposeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComposeConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComposeConfigList) DeepCopyInto(out *ComposeConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ComposeConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeConfigList. -func (in *ComposeConfigList) DeepCopy() *ComposeConfigList { - if in == nil { - return nil - } - out := new(ComposeConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComposeConfigList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComposeSpec) DeepCopyInto(out *ComposeSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeSpec. -func (in *ComposeSpec) DeepCopy() *ComposeSpec { - if in == nil { - return nil - } - out := new(ComposeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComposeStatus) DeepCopyInto(out *ComposeStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ComposeCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeStatus. -func (in *ComposeStatus) DeepCopy() *ComposeStatus { - if in == nil { - return nil - } - out := new(ComposeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Condition) DeepCopyInto(out *Condition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. -func (in *Condition) DeepCopy() *Condition { - if in == nil { - return nil - } - out := new(Condition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerResourceLimit) DeepCopyInto(out *ContainerResourceLimit) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerResourceLimit. -func (in *ContainerResourceLimit) DeepCopy() *ContainerResourceLimit { - if in == nil { - return nil - } - out := new(ContainerResourceLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomConfig) DeepCopyInto(out *CustomConfig) { - *out = *in - if in.Label != nil { - in, out := &in.Label, &out.Label - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Taints != nil { - in, out := &in.Taints, &out.Taints - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomConfig. -func (in *CustomConfig) DeepCopy() *CustomConfig { - if in == nil { - return nil - } - out := new(CustomConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomTargetConfig) DeepCopyInto(out *CustomTargetConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTargetConfig. -func (in *CustomTargetConfig) DeepCopy() *CustomTargetConfig { - if in == nil { - return nil - } - out := new(CustomTargetConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerInfo) DeepCopyInto(out *DockerInfo) { - *out = *in - if in.SecurityOptions != nil { - in, out := &in.SecurityOptions, &out.SecurityOptions - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerInfo. -func (in *DockerInfo) DeepCopy() *DockerInfo { - if in == nil { - return nil - } - out := new(DockerInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicSchema) DeepCopyInto(out *DynamicSchema) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchema. -func (in *DynamicSchema) DeepCopy() *DynamicSchema { - if in == nil { - return nil - } - out := new(DynamicSchema) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DynamicSchema) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicSchemaList) DeepCopyInto(out *DynamicSchemaList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DynamicSchema, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaList. -func (in *DynamicSchemaList) DeepCopy() *DynamicSchemaList { - if in == nil { - return nil - } - out := new(DynamicSchemaList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DynamicSchemaList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicSchemaSpec) DeepCopyInto(out *DynamicSchemaSpec) { - *out = *in - if in.ResourceMethods != nil { - in, out := &in.ResourceMethods, &out.ResourceMethods - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ResourceFields != nil { - in, out := &in.ResourceFields, &out.ResourceFields - *out = make(map[string]Field, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.ResourceActions != nil { - in, out := &in.ResourceActions, &out.ResourceActions - *out = make(map[string]Action, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.CollectionMethods != nil { - in, out := &in.CollectionMethods, &out.CollectionMethods - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.CollectionFields != nil { - in, out := &in.CollectionFields, &out.CollectionFields - *out = make(map[string]Field, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.CollectionActions != nil { - in, out := &in.CollectionActions, &out.CollectionActions - *out = make(map[string]Action, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.CollectionFilters != nil { - in, out := &in.CollectionFilters, &out.CollectionFilters - *out = make(map[string]Filter, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.IncludeableLinks != nil { - in, out := &in.IncludeableLinks, &out.IncludeableLinks - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaSpec. -func (in *DynamicSchemaSpec) DeepCopy() *DynamicSchemaSpec { - if in == nil { - return nil - } - out := new(DynamicSchemaSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicSchemaStatus) DeepCopyInto(out *DynamicSchemaStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaStatus. -func (in *DynamicSchemaStatus) DeepCopy() *DynamicSchemaStatus { - if in == nil { - return nil - } - out := new(DynamicSchemaStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EKSStatus) DeepCopyInto(out *EKSStatus) { - *out = *in - if in.UpstreamSpec != nil { - in, out := &in.UpstreamSpec, &out.UpstreamSpec - *out = new(ekscattleiov1.EKSClusterConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PrivateRequiresTunnel != nil { - in, out := &in.PrivateRequiresTunnel, &out.PrivateRequiresTunnel - *out = new(bool) - **out = **in - } - if in.ManagedLaunchTemplateVersions != nil { - in, out := &in.ManagedLaunchTemplateVersions, &out.ManagedLaunchTemplateVersions - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSStatus. -func (in *EKSStatus) DeepCopy() *EKSStatus { - if in == nil { - return nil - } - out := new(EKSStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ElasticsearchConfig) DeepCopyInto(out *ElasticsearchConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticsearchConfig. -func (in *ElasticsearchConfig) DeepCopy() *ElasticsearchConfig { - if in == nil { - return nil - } - out := new(ElasticsearchConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdBackup) DeepCopyInto(out *EtcdBackup) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackup. -func (in *EtcdBackup) DeepCopy() *EtcdBackup { - if in == nil { - return nil - } - out := new(EtcdBackup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EtcdBackup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdBackupList) DeepCopyInto(out *EtcdBackupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EtcdBackup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupList. -func (in *EtcdBackupList) DeepCopy() *EtcdBackupList { - if in == nil { - return nil - } - out := new(EtcdBackupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EtcdBackupList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExportOutput) DeepCopyInto(out *ExportOutput) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportOutput. -func (in *ExportOutput) DeepCopy() *ExportOutput { - if in == nil { - return nil - } - out := new(ExportOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Feature) DeepCopyInto(out *Feature) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. -func (in *Feature) DeepCopy() *Feature { - if in == nil { - return nil - } - out := new(Feature) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Feature) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureList) DeepCopyInto(out *FeatureList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Feature, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. -func (in *FeatureList) DeepCopy() *FeatureList { - if in == nil { - return nil - } - out := new(FeatureList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. -func (in *FeatureSpec) DeepCopy() *FeatureSpec { - if in == nil { - return nil - } - out := new(FeatureSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { - *out = *in - if in.LockedValue != nil { - in, out := &in.LockedValue, &out.LockedValue - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. -func (in *FeatureStatus) DeepCopy() *FeatureStatus { - if in == nil { - return nil - } - out := new(FeatureStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Field) DeepCopyInto(out *Field) { - *out = *in - in.Default.DeepCopyInto(&out.Default) - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Field. -func (in *Field) DeepCopy() *Field { - if in == nil { - return nil - } - out := new(Field) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *File) DeepCopyInto(out *File) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File. -func (in *File) DeepCopy() *File { - if in == nil { - return nil - } - out := new(File) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Filter) DeepCopyInto(out *Filter) { - *out = *in - if in.Modifiers != nil { - in, out := &in.Modifiers, &out.Modifiers - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter. -func (in *Filter) DeepCopy() *Filter { - if in == nil { - return nil - } - out := new(Filter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FleetWorkspace) DeepCopyInto(out *FleetWorkspace) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspace. -func (in *FleetWorkspace) DeepCopy() *FleetWorkspace { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplate. +func (in *ClusterTemplate) DeepCopy() *ClusterTemplate { if in == nil { return nil } - out := new(FleetWorkspace) + out := new(ClusterTemplate) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FleetWorkspace) DeepCopyObject() runtime.Object { +func (in *ClusterTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -2968,13 +1623,13 @@ func (in *FleetWorkspace) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FleetWorkspaceList) DeepCopyInto(out *FleetWorkspaceList) { +func (in *ClusterTemplateList) DeepCopyInto(out *ClusterTemplateList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]FleetWorkspace, len(*in)) + *out = make([]ClusterTemplate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -2982,18 +1637,18 @@ func (in *FleetWorkspaceList) DeepCopyInto(out *FleetWorkspaceList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspaceList. -func (in *FleetWorkspaceList) DeepCopy() *FleetWorkspaceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateList. +func (in *ClusterTemplateList) DeepCopy() *ClusterTemplateList { if in == nil { return nil } - out := new(FleetWorkspaceList) + out := new(ClusterTemplateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FleetWorkspaceList) DeepCopyObject() runtime.Object { +func (in *ClusterTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3001,129 +1656,100 @@ func (in *FleetWorkspaceList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FleetWorkspacePermission) DeepCopyInto(out *FleetWorkspacePermission) { +func (in *ClusterTemplateQuestionsOutput) DeepCopyInto(out *ClusterTemplateQuestionsOutput) { *out = *in - if in.ResourceRules != nil { - in, out := &in.ResourceRules, &out.ResourceRules - *out = make([]rbacv1.PolicyRule, len(*in)) + if in.Questions != nil { + in, out := &in.Questions, &out.Questions + *out = make([]Question, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.WorkspaceVerbs != nil { - in, out := &in.WorkspaceVerbs, &out.WorkspaceVerbs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspacePermission. -func (in *FleetWorkspacePermission) DeepCopy() *FleetWorkspacePermission { - if in == nil { - return nil - } - out := new(FleetWorkspacePermission) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FleetWorkspaceStatus) DeepCopyInto(out *FleetWorkspaceStatus) { - *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspaceStatus. -func (in *FleetWorkspaceStatus) DeepCopy() *FleetWorkspaceStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateQuestionsOutput. +func (in *ClusterTemplateQuestionsOutput) DeepCopy() *ClusterTemplateQuestionsOutput { if in == nil { return nil } - out := new(FleetWorkspaceStatus) + out := new(ClusterTemplateQuestionsOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FluentForwarderConfig) DeepCopyInto(out *FluentForwarderConfig) { +func (in *ClusterTemplateRevision) DeepCopyInto(out *ClusterTemplateRevision) { *out = *in - if in.Compress != nil { - in, out := &in.Compress, &out.Compress - *out = new(bool) - **out = **in - } - if in.FluentServers != nil { - in, out := &in.FluentServers, &out.FluentServers - *out = make([]FluentServer, len(*in)) - copy(*out, *in) - } + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluentForwarderConfig. -func (in *FluentForwarderConfig) DeepCopy() *FluentForwarderConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevision. +func (in *ClusterTemplateRevision) DeepCopy() *ClusterTemplateRevision { if in == nil { return nil } - out := new(FluentForwarderConfig) + out := new(ClusterTemplateRevision) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FluentServer) DeepCopyInto(out *FluentServer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluentServer. -func (in *FluentServer) DeepCopy() *FluentServer { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterTemplateRevision) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(FluentServer) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FreeIpaConfig) DeepCopyInto(out *FreeIpaConfig) { +func (in *ClusterTemplateRevisionCondition) DeepCopyInto(out *ClusterTemplateRevisionCondition) { *out = *in - in.LdapConfig.DeepCopyInto(&out.LdapConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaConfig. -func (in *FreeIpaConfig) DeepCopy() *FreeIpaConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionCondition. +func (in *ClusterTemplateRevisionCondition) DeepCopy() *ClusterTemplateRevisionCondition { if in == nil { return nil } - out := new(FreeIpaConfig) + out := new(ClusterTemplateRevisionCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FreeIpaProvider) DeepCopyInto(out *FreeIpaProvider) { +func (in *ClusterTemplateRevisionList) DeepCopyInto(out *ClusterTemplateRevisionList) { *out = *in out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterTemplateRevision, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaProvider. -func (in *FreeIpaProvider) DeepCopy() *FreeIpaProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionList. +func (in *ClusterTemplateRevisionList) DeepCopy() *ClusterTemplateRevisionList { if in == nil { return nil } - out := new(FreeIpaProvider) + out := new(ClusterTemplateRevisionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FreeIpaProvider) DeepCopyObject() runtime.Object { +func (in *ClusterTemplateRevisionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3131,185 +1757,211 @@ func (in *FreeIpaProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FreeIpaProviderList) DeepCopyInto(out *FreeIpaProviderList) { +func (in *ClusterTemplateRevisionSpec) DeepCopyInto(out *ClusterTemplateRevisionSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]FreeIpaProvider, len(*in)) + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Questions != nil { + in, out := &in.Questions, &out.Questions + *out = make([]Question, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ClusterConfig != nil { + in, out := &in.ClusterConfig, &out.ClusterConfig + *out = new(ClusterSpecBase) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaProviderList. -func (in *FreeIpaProviderList) DeepCopy() *FreeIpaProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionSpec. +func (in *ClusterTemplateRevisionSpec) DeepCopy() *ClusterTemplateRevisionSpec { if in == nil { return nil } - out := new(FreeIpaProviderList) + out := new(ClusterTemplateRevisionSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FreeIpaProviderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FreeIpaTestAndApplyInput) DeepCopyInto(out *FreeIpaTestAndApplyInput) { +func (in *ClusterTemplateRevisionStatus) DeepCopyInto(out *ClusterTemplateRevisionStatus) { *out = *in - in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ClusterTemplateRevisionCondition, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaTestAndApplyInput. -func (in *FreeIpaTestAndApplyInput) DeepCopy() *FreeIpaTestAndApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateRevisionStatus. +func (in *ClusterTemplateRevisionStatus) DeepCopy() *ClusterTemplateRevisionStatus { if in == nil { return nil } - out := new(FreeIpaTestAndApplyInput) + out := new(ClusterTemplateRevisionStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GKEStatus) DeepCopyInto(out *GKEStatus) { +func (in *ClusterTemplateSpec) DeepCopyInto(out *ClusterTemplateSpec) { *out = *in - if in.UpstreamSpec != nil { - in, out := &in.UpstreamSpec, &out.UpstreamSpec - *out = new(gkecattleiov1.GKEClusterConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.PrivateRequiresTunnel != nil { - in, out := &in.PrivateRequiresTunnel, &out.PrivateRequiresTunnel - *out = new(bool) - **out = **in + if in.Members != nil { + in, out := &in.Members, &out.Members + *out = make([]Member, len(*in)) + copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKEStatus. -func (in *GKEStatus) DeepCopy() *GKEStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateSpec. +func (in *ClusterTemplateSpec) DeepCopy() *ClusterTemplateSpec { if in == nil { return nil } - out := new(GKEStatus) + out := new(ClusterTemplateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenerateKubeConfigOutput) DeepCopyInto(out *GenerateKubeConfigOutput) { +func (in *ClusterUpgradeStrategy) DeepCopyInto(out *ClusterUpgradeStrategy) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerateKubeConfigOutput. -func (in *GenerateKubeConfigOutput) DeepCopy() *GenerateKubeConfigOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUpgradeStrategy. +func (in *ClusterUpgradeStrategy) DeepCopy() *ClusterUpgradeStrategy { if in == nil { return nil } - out := new(GenerateKubeConfigOutput) + out := new(ClusterUpgradeStrategy) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericLogin) DeepCopyInto(out *GenericLogin) { +func (in *CognitoConfig) DeepCopyInto(out *CognitoConfig) { *out = *in + in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericLogin. -func (in *GenericLogin) DeepCopy() *GenericLogin { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CognitoConfig. +func (in *CognitoConfig) DeepCopy() *CognitoConfig { if in == nil { return nil } - out := new(GenericLogin) + out := new(CognitoConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCApplyInput) DeepCopyInto(out *GenericOIDCApplyInput) { +func (in *CognitoProvider) DeepCopyInto(out *CognitoProvider) { *out = *in - in.OIDCApplyInput.DeepCopyInto(&out.OIDCApplyInput) + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCApplyInput. -func (in *GenericOIDCApplyInput) DeepCopy() *GenericOIDCApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CognitoProvider. +func (in *CognitoProvider) DeepCopy() *CognitoProvider { if in == nil { return nil } - out := new(GenericOIDCApplyInput) + out := new(CognitoProvider) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CognitoProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCConfig) DeepCopyInto(out *GenericOIDCConfig) { +func (in *CognitoProviderList) DeepCopyInto(out *CognitoProviderList) { *out = *in - in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CognitoProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCConfig. -func (in *GenericOIDCConfig) DeepCopy() *GenericOIDCConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CognitoProviderList. +func (in *CognitoProviderList) DeepCopy() *CognitoProviderList { if in == nil { return nil } - out := new(GenericOIDCConfig) + out := new(CognitoProviderList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CognitoProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCLogin) DeepCopyInto(out *GenericOIDCLogin) { +func (in *ComposeCondition) DeepCopyInto(out *ComposeCondition) { *out = *in - out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCLogin. -func (in *GenericOIDCLogin) DeepCopy() *GenericOIDCLogin { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeCondition. +func (in *ComposeCondition) DeepCopy() *ComposeCondition { if in == nil { return nil } - out := new(GenericOIDCLogin) + out := new(ComposeCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCProvider) DeepCopyInto(out *GenericOIDCProvider) { +func (in *ComposeConfig) DeepCopyInto(out *ComposeConfig) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCProvider. -func (in *GenericOIDCProvider) DeepCopy() *GenericOIDCProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeConfig. +func (in *ComposeConfig) DeepCopy() *ComposeConfig { if in == nil { return nil } - out := new(GenericOIDCProvider) + out := new(ComposeConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GenericOIDCProvider) DeepCopyObject() runtime.Object { +func (in *ComposeConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3317,13 +1969,13 @@ func (in *GenericOIDCProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCProviderList) DeepCopyInto(out *GenericOIDCProviderList) { +func (in *ComposeConfigList) DeepCopyInto(out *ComposeConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]GenericOIDCProvider, len(*in)) + *out = make([]ComposeConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3331,18 +1983,18 @@ func (in *GenericOIDCProviderList) DeepCopyInto(out *GenericOIDCProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCProviderList. -func (in *GenericOIDCProviderList) DeepCopy() *GenericOIDCProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeConfigList. +func (in *ComposeConfigList) DeepCopy() *ComposeConfigList { if in == nil { return nil } - out := new(GenericOIDCProviderList) + out := new(ComposeConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GenericOIDCProviderList) DeepCopyObject() runtime.Object { +func (in *ComposeConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3350,165 +2002,150 @@ func (in *GenericOIDCProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOIDCTestOutput) DeepCopyInto(out *GenericOIDCTestOutput) { +func (in *ComposeSpec) DeepCopyInto(out *ComposeSpec) { *out = *in - out.OIDCTestOutput = in.OIDCTestOutput return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCTestOutput. -func (in *GenericOIDCTestOutput) DeepCopy() *GenericOIDCTestOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeSpec. +func (in *ComposeSpec) DeepCopy() *ComposeSpec { if in == nil { return nil } - out := new(GenericOIDCTestOutput) + out := new(ComposeSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubConfig) DeepCopyInto(out *GithubConfig) { +func (in *ComposeStatus) DeepCopyInto(out *ComposeStatus) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) - if in.AdditionalClientIDs != nil { - in, out := &in.AdditionalClientIDs, &out.AdditionalClientIDs - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.HostnameToClientID != nil { - in, out := &in.HostnameToClientID, &out.HostnameToClientID - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ComposeCondition, len(*in)) + copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfig. -func (in *GithubConfig) DeepCopy() *GithubConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposeStatus. +func (in *ComposeStatus) DeepCopy() *ComposeStatus { if in == nil { return nil } - out := new(GithubConfig) + out := new(ComposeStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GithubConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubConfigApplyInput) DeepCopyInto(out *GithubConfigApplyInput) { +func (in *Condition) DeepCopyInto(out *Condition) { *out = *in - in.GithubConfig.DeepCopyInto(&out.GithubConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigApplyInput. -func (in *GithubConfigApplyInput) DeepCopy() *GithubConfigApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { if in == nil { return nil } - out := new(GithubConfigApplyInput) + out := new(Condition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubConfigList) DeepCopyInto(out *GithubConfigList) { +func (in *ContainerResourceLimit) DeepCopyInto(out *ContainerResourceLimit) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GithubConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigList. -func (in *GithubConfigList) DeepCopy() *GithubConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerResourceLimit. +func (in *ContainerResourceLimit) DeepCopy() *ContainerResourceLimit { if in == nil { return nil } - out := new(GithubConfigList) + out := new(ContainerResourceLimit) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GithubConfigList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubConfigTestOutput) DeepCopyInto(out *GithubConfigTestOutput) { +func (in *CustomConfig) DeepCopyInto(out *CustomConfig) { *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigTestOutput. -func (in *GithubConfigTestOutput) DeepCopy() *GithubConfigTestOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomConfig. +func (in *CustomConfig) DeepCopy() *CustomConfig { if in == nil { return nil } - out := new(GithubConfigTestOutput) + out := new(CustomConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubLogin) DeepCopyInto(out *GithubLogin) { +func (in *DockerInfo) DeepCopyInto(out *DockerInfo) { *out = *in - out.GenericLogin = in.GenericLogin + if in.SecurityOptions != nil { + in, out := &in.SecurityOptions, &out.SecurityOptions + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubLogin. -func (in *GithubLogin) DeepCopy() *GithubLogin { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerInfo. +func (in *DockerInfo) DeepCopy() *DockerInfo { if in == nil { return nil } - out := new(GithubLogin) + out := new(DockerInfo) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubProvider) DeepCopyInto(out *GithubProvider) { +func (in *DynamicSchema) DeepCopyInto(out *DynamicSchema) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubProvider. -func (in *GithubProvider) DeepCopy() *GithubProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchema. +func (in *DynamicSchema) DeepCopy() *DynamicSchema { if in == nil { return nil } - out := new(GithubProvider) + out := new(DynamicSchema) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GithubProvider) DeepCopyObject() runtime.Object { +func (in *DynamicSchema) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3516,13 +2153,13 @@ func (in *GithubProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GithubProviderList) DeepCopyInto(out *GithubProviderList) { +func (in *DynamicSchemaList) DeepCopyInto(out *DynamicSchemaList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]GithubProvider, len(*in)) + *out = make([]DynamicSchema, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3530,18 +2167,18 @@ func (in *GithubProviderList) DeepCopyInto(out *GithubProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubProviderList. -func (in *GithubProviderList) DeepCopy() *GithubProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaList. +func (in *DynamicSchemaList) DeepCopy() *DynamicSchemaList { if in == nil { return nil } - out := new(GithubProviderList) + out := new(DynamicSchemaList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GithubProviderList) DeepCopyObject() runtime.Object { +func (in *DynamicSchemaList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3549,187 +2186,153 @@ func (in *GithubProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNSProviderSpec) DeepCopyInto(out *GlobalDNSProviderSpec) { +func (in *DynamicSchemaSpec) DeepCopyInto(out *DynamicSchemaSpec) { *out = *in - if in.Route53ProviderConfig != nil { - in, out := &in.Route53ProviderConfig, &out.Route53ProviderConfig - *out = new(Route53ProviderConfig) - (*in).DeepCopyInto(*out) + if in.ResourceMethods != nil { + in, out := &in.ResourceMethods, &out.ResourceMethods + *out = make([]string, len(*in)) + copy(*out, *in) } - if in.CloudflareProviderConfig != nil { - in, out := &in.CloudflareProviderConfig, &out.CloudflareProviderConfig - *out = new(CloudflareProviderConfig) - (*in).DeepCopyInto(*out) + if in.ResourceFields != nil { + in, out := &in.ResourceFields, &out.ResourceFields + *out = make(map[string]Field, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } } - if in.AlidnsProviderConfig != nil { - in, out := &in.AlidnsProviderConfig, &out.AlidnsProviderConfig - *out = new(AlidnsProviderConfig) - (*in).DeepCopyInto(*out) + if in.ResourceActions != nil { + in, out := &in.ResourceActions, &out.ResourceActions + *out = make(map[string]Action, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } - if in.Members != nil { - in, out := &in.Members, &out.Members - *out = make([]Member, len(*in)) + if in.CollectionMethods != nil { + in, out := &in.CollectionMethods, &out.CollectionMethods + *out = make([]string, len(*in)) copy(*out, *in) } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNSProviderSpec. -func (in *GlobalDNSProviderSpec) DeepCopy() *GlobalDNSProviderSpec { - if in == nil { - return nil + if in.CollectionFields != nil { + in, out := &in.CollectionFields, &out.CollectionFields + *out = make(map[string]Field, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } } - out := new(GlobalDNSProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNSSpec) DeepCopyInto(out *GlobalDNSSpec) { - *out = *in - if in.ProjectNames != nil { - in, out := &in.ProjectNames, &out.ProjectNames - *out = make([]string, len(*in)) - copy(*out, *in) + if in.CollectionActions != nil { + in, out := &in.CollectionActions, &out.CollectionActions + *out = make(map[string]Action, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } - if in.Members != nil { - in, out := &in.Members, &out.Members - *out = make([]Member, len(*in)) + if in.CollectionFilters != nil { + in, out := &in.CollectionFilters, &out.CollectionFilters + *out = make(map[string]Filter, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.IncludeableLinks != nil { + in, out := &in.IncludeableLinks, &out.IncludeableLinks + *out = make([]string, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNSSpec. -func (in *GlobalDNSSpec) DeepCopy() *GlobalDNSSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaSpec. +func (in *DynamicSchemaSpec) DeepCopy() *DynamicSchemaSpec { if in == nil { return nil } - out := new(GlobalDNSSpec) + out := new(DynamicSchemaSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNSStatus) DeepCopyInto(out *GlobalDNSStatus) { +func (in *DynamicSchemaStatus) DeepCopyInto(out *DynamicSchemaStatus) { *out = *in - if in.Endpoints != nil { - in, out := &in.Endpoints, &out.Endpoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ClusterEndpoints != nil { - in, out := &in.ClusterEndpoints, &out.ClusterEndpoints - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNSStatus. -func (in *GlobalDNSStatus) DeepCopy() *GlobalDNSStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicSchemaStatus. +func (in *DynamicSchemaStatus) DeepCopy() *DynamicSchemaStatus { if in == nil { return nil } - out := new(GlobalDNSStatus) + out := new(DynamicSchemaStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDns) DeepCopyInto(out *GlobalDns) { +func (in *EKSStatus) DeepCopyInto(out *EKSStatus) { *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDns. -func (in *GlobalDns) DeepCopy() *GlobalDns { - if in == nil { - return nil + if in.UpstreamSpec != nil { + in, out := &in.UpstreamSpec, &out.UpstreamSpec + *out = new(ekscattleiov1.EKSClusterConfigSpec) + (*in).DeepCopyInto(*out) } - out := new(GlobalDns) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDns) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]string, len(*in)) + copy(*out, *in) } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDnsList) DeepCopyInto(out *GlobalDnsList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GlobalDns, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if in.PrivateRequiresTunnel != nil { + in, out := &in.PrivateRequiresTunnel, &out.PrivateRequiresTunnel + *out = new(bool) + **out = **in + } + if in.ManagedLaunchTemplateVersions != nil { + in, out := &in.ManagedLaunchTemplateVersions, &out.ManagedLaunchTemplateVersions + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDnsList. -func (in *GlobalDnsList) DeepCopy() *GlobalDnsList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSStatus. +func (in *EKSStatus) DeepCopy() *EKSStatus { if in == nil { return nil } - out := new(GlobalDnsList) + out := new(EKSStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDnsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDnsProvider) DeepCopyInto(out *GlobalDnsProvider) { +func (in *EtcdBackup) DeepCopyInto(out *EtcdBackup) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDnsProvider. -func (in *GlobalDnsProvider) DeepCopy() *GlobalDnsProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackup. +func (in *EtcdBackup) DeepCopy() *EtcdBackup { if in == nil { return nil } - out := new(GlobalDnsProvider) + out := new(EtcdBackup) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDnsProvider) DeepCopyObject() runtime.Object { +func (in *EtcdBackup) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3737,13 +2340,13 @@ func (in *GlobalDnsProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDnsProviderList) DeepCopyInto(out *GlobalDnsProviderList) { +func (in *EtcdBackupList) DeepCopyInto(out *EtcdBackupList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]GlobalDnsProvider, len(*in)) + *out = make([]EtcdBackup, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3751,18 +2354,18 @@ func (in *GlobalDnsProviderList) DeepCopyInto(out *GlobalDnsProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDnsProviderList. -func (in *GlobalDnsProviderList) DeepCopy() *GlobalDnsProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupList. +func (in *EtcdBackupList) DeepCopy() *EtcdBackupList { if in == nil { return nil } - out := new(GlobalDnsProviderList) + out := new(EtcdBackupList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDnsProviderList) DeepCopyObject() runtime.Object { +func (in *EtcdBackupList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3770,86 +2373,43 @@ func (in *GlobalDnsProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRole) DeepCopyInto(out *GlobalRole) { +func (in *ExportOutput) DeepCopyInto(out *ExportOutput) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbacv1.PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.InheritedClusterRoles != nil { - in, out := &in.InheritedClusterRoles, &out.InheritedClusterRoles - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespacedRules != nil { - in, out := &in.NamespacedRules, &out.NamespacedRules - *out = make(map[string][]rbacv1.PolicyRule, len(*in)) - for key, val := range *in { - var outVal []rbacv1.PolicyRule - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]rbacv1.PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - (*out)[key] = outVal - } - } - if in.InheritedFleetWorkspacePermissions != nil { - in, out := &in.InheritedFleetWorkspacePermissions, &out.InheritedFleetWorkspacePermissions - *out = new(FleetWorkspacePermission) - (*in).DeepCopyInto(*out) - } - in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRole. -func (in *GlobalRole) DeepCopy() *GlobalRole { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportOutput. +func (in *ExportOutput) DeepCopy() *ExportOutput { if in == nil { return nil } - out := new(GlobalRole) + out := new(ExportOutput) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalRole) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRoleBinding) DeepCopyInto(out *GlobalRoleBinding) { +func (in *Feature) DeepCopyInto(out *Feature) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBinding. -func (in *GlobalRoleBinding) DeepCopy() *GlobalRoleBinding { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. +func (in *Feature) DeepCopy() *Feature { if in == nil { return nil } - out := new(GlobalRoleBinding) + out := new(Feature) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalRoleBinding) DeepCopyObject() runtime.Object { +func (in *Feature) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3857,13 +2417,13 @@ func (in *GlobalRoleBinding) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRoleBindingList) DeepCopyInto(out *GlobalRoleBindingList) { +func (in *FeatureList) DeepCopyInto(out *FeatureList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]GlobalRoleBinding, len(*in)) + *out = make([]Feature, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -3871,18 +2431,18 @@ func (in *GlobalRoleBindingList) DeepCopyInto(out *GlobalRoleBindingList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBindingList. -func (in *GlobalRoleBindingList) DeepCopy() *GlobalRoleBindingList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. +func (in *FeatureList) DeepCopy() *FeatureList { if in == nil { return nil } - out := new(GlobalRoleBindingList) + out := new(FeatureList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalRoleBindingList) DeepCopyObject() runtime.Object { +func (in *FeatureList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -3890,140 +2450,111 @@ func (in *GlobalRoleBindingList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRoleList) DeepCopyInto(out *GlobalRoleList) { +func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GlobalRole, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleList. -func (in *GlobalRoleList) DeepCopy() *GlobalRoleList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. +func (in *FeatureSpec) DeepCopy() *FeatureSpec { if in == nil { return nil } - out := new(GlobalRoleList) + out := new(FeatureSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalRoleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRoleStatus) DeepCopyInto(out *GlobalRoleStatus) { +func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.LockedValue != nil { + in, out := &in.LockedValue, &out.LockedValue + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleStatus. -func (in *GlobalRoleStatus) DeepCopy() *GlobalRoleStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. +func (in *FeatureStatus) DeepCopy() *FeatureStatus { if in == nil { return nil } - out := new(GlobalRoleStatus) + out := new(FeatureStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOAuthProvider) DeepCopyInto(out *GoogleOAuthProvider) { +func (in *Field) DeepCopyInto(out *Field) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + in.Default.DeepCopyInto(&out.Default) + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOAuthProvider. -func (in *GoogleOAuthProvider) DeepCopy() *GoogleOAuthProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Field. +func (in *Field) DeepCopy() *Field { if in == nil { return nil } - out := new(GoogleOAuthProvider) + out := new(Field) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleOAuthProvider) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOAuthProviderList) DeepCopyInto(out *GoogleOAuthProviderList) { +func (in *Filter) DeepCopyInto(out *Filter) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GoogleOAuthProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Modifiers != nil { + in, out := &in.Modifiers, &out.Modifiers + *out = make([]string, len(*in)) + copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOAuthProviderList. -func (in *GoogleOAuthProviderList) DeepCopy() *GoogleOAuthProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter. +func (in *Filter) DeepCopy() *Filter { if in == nil { return nil } - out := new(GoogleOAuthProviderList) + out := new(Filter) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleOAuthProviderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOauthConfig) DeepCopyInto(out *GoogleOauthConfig) { +func (in *FleetWorkspace) DeepCopyInto(out *FleetWorkspace) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfig. -func (in *GoogleOauthConfig) DeepCopy() *GoogleOauthConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspace. +func (in *FleetWorkspace) DeepCopy() *FleetWorkspace { if in == nil { return nil } - out := new(GoogleOauthConfig) + out := new(FleetWorkspace) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleOauthConfig) DeepCopyObject() runtime.Object { +func (in *FleetWorkspace) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4031,30 +2562,13 @@ func (in *GoogleOauthConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOauthConfigApplyInput) DeepCopyInto(out *GoogleOauthConfigApplyInput) { - *out = *in - in.GoogleOauthConfig.DeepCopyInto(&out.GoogleOauthConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigApplyInput. -func (in *GoogleOauthConfigApplyInput) DeepCopy() *GoogleOauthConfigApplyInput { - if in == nil { - return nil - } - out := new(GoogleOauthConfigApplyInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOauthConfigList) DeepCopyInto(out *GoogleOauthConfigList) { +func (in *FleetWorkspaceList) DeepCopyInto(out *FleetWorkspaceList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]GoogleOauthConfig, len(*in)) + *out = make([]FleetWorkspace, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4062,18 +2576,18 @@ func (in *GoogleOauthConfigList) DeepCopyInto(out *GoogleOauthConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigList. -func (in *GoogleOauthConfigList) DeepCopy() *GoogleOauthConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspaceList. +func (in *FleetWorkspaceList) DeepCopy() *FleetWorkspaceList { if in == nil { return nil } - out := new(GoogleOauthConfigList) + out := new(FleetWorkspaceList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleOauthConfigList) DeepCopyObject() runtime.Object { +func (in *FleetWorkspaceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4081,58 +2595,87 @@ func (in *GoogleOauthConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOauthConfigTestOutput) DeepCopyInto(out *GoogleOauthConfigTestOutput) { +func (in *FleetWorkspacePermission) DeepCopyInto(out *FleetWorkspacePermission) { *out = *in + if in.ResourceRules != nil { + in, out := &in.ResourceRules, &out.ResourceRules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.WorkspaceVerbs != nil { + in, out := &in.WorkspaceVerbs, &out.WorkspaceVerbs + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigTestOutput. -func (in *GoogleOauthConfigTestOutput) DeepCopy() *GoogleOauthConfigTestOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspacePermission. +func (in *FleetWorkspacePermission) DeepCopy() *FleetWorkspacePermission { if in == nil { return nil } - out := new(GoogleOauthConfigTestOutput) + out := new(FleetWorkspacePermission) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleOauthLogin) DeepCopyInto(out *GoogleOauthLogin) { +func (in *FleetWorkspaceStatus) DeepCopyInto(out *FleetWorkspaceStatus) { *out = *in - out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthLogin. -func (in *GoogleOauthLogin) DeepCopy() *GoogleOauthLogin { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FleetWorkspaceStatus. +func (in *FleetWorkspaceStatus) DeepCopy() *FleetWorkspaceStatus { if in == nil { return nil } - out := new(GoogleOauthLogin) + out := new(FleetWorkspaceStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Group) DeepCopyInto(out *Group) { +func (in *FreeIpaConfig) DeepCopyInto(out *FreeIpaConfig) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaConfig. +func (in *FreeIpaConfig) DeepCopy() *FreeIpaConfig { + if in == nil { + return nil + } + out := new(FreeIpaConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FreeIpaProvider) DeepCopyInto(out *FreeIpaProvider) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. -func (in *Group) DeepCopy() *Group { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaProvider. +func (in *FreeIpaProvider) DeepCopy() *FreeIpaProvider { if in == nil { return nil } - out := new(Group) + out := new(FreeIpaProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Group) DeepCopyObject() runtime.Object { +func (in *FreeIpaProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4140,13 +2683,13 @@ func (in *Group) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupList) DeepCopyInto(out *GroupList) { +func (in *FreeIpaProviderList) DeepCopyInto(out *FreeIpaProviderList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Group, len(*in)) + *out = make([]FreeIpaProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4154,18 +2697,18 @@ func (in *GroupList) DeepCopyInto(out *GroupList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList. -func (in *GroupList) DeepCopy() *GroupList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaProviderList. +func (in *FreeIpaProviderList) DeepCopy() *FreeIpaProviderList { if in == nil { return nil } - out := new(GroupList) + out := new(FreeIpaProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupList) DeepCopyObject() runtime.Object { +func (in *FreeIpaProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4173,213 +2716,272 @@ func (in *GroupList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupMember) DeepCopyInto(out *GroupMember) { +func (in *FreeIpaTestAndApplyInput) DeepCopyInto(out *FreeIpaTestAndApplyInput) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMember. -func (in *GroupMember) DeepCopy() *GroupMember { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaTestAndApplyInput. +func (in *FreeIpaTestAndApplyInput) DeepCopy() *FreeIpaTestAndApplyInput { if in == nil { return nil } - out := new(GroupMember) + out := new(FreeIpaTestAndApplyInput) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupMember) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GKEStatus) DeepCopyInto(out *GKEStatus) { + *out = *in + if in.UpstreamSpec != nil { + in, out := &in.UpstreamSpec, &out.UpstreamSpec + *out = new(gkecattleiov1.GKEClusterConfigSpec) + (*in).DeepCopyInto(*out) } - return nil + if in.PrivateRequiresTunnel != nil { + in, out := &in.PrivateRequiresTunnel, &out.PrivateRequiresTunnel + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKEStatus. +func (in *GKEStatus) DeepCopy() *GKEStatus { + if in == nil { + return nil + } + out := new(GKEStatus) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupMemberList) DeepCopyInto(out *GroupMemberList) { +func (in *GenerateKubeConfigOutput) DeepCopyInto(out *GenerateKubeConfigOutput) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GroupMember, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMemberList. -func (in *GroupMemberList) DeepCopy() *GroupMemberList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerateKubeConfigOutput. +func (in *GenerateKubeConfigOutput) DeepCopy() *GenerateKubeConfigOutput { if in == nil { return nil } - out := new(GroupMemberList) + out := new(GenerateKubeConfigOutput) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupMemberList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GenericLogin) DeepCopyInto(out *GenericLogin) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericLogin. +func (in *GenericLogin) DeepCopy() *GenericLogin { + if in == nil { + return nil } - return nil + out := new(GenericLogin) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImportClusterYamlInput) DeepCopyInto(out *ImportClusterYamlInput) { +func (in *GenericOIDCApplyInput) DeepCopyInto(out *GenericOIDCApplyInput) { *out = *in + in.OIDCApplyInput.DeepCopyInto(&out.OIDCApplyInput) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportClusterYamlInput. -func (in *ImportClusterYamlInput) DeepCopy() *ImportClusterYamlInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCApplyInput. +func (in *GenericOIDCApplyInput) DeepCopy() *GenericOIDCApplyInput { if in == nil { return nil } - out := new(ImportClusterYamlInput) + out := new(GenericOIDCApplyInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImportYamlOutput) DeepCopyInto(out *ImportYamlOutput) { +func (in *GenericOIDCConfig) DeepCopyInto(out *GenericOIDCConfig) { *out = *in + in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportYamlOutput. -func (in *ImportYamlOutput) DeepCopy() *ImportYamlOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCConfig. +func (in *GenericOIDCConfig) DeepCopy() *GenericOIDCConfig { if in == nil { return nil } - out := new(ImportYamlOutput) + out := new(GenericOIDCConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImportedConfig) DeepCopyInto(out *ImportedConfig) { +func (in *GenericOIDCLogin) DeepCopyInto(out *GenericOIDCLogin) { *out = *in + out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportedConfig. -func (in *ImportedConfig) DeepCopy() *ImportedConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCLogin. +func (in *GenericOIDCLogin) DeepCopy() *GenericOIDCLogin { if in == nil { return nil } - out := new(ImportedConfig) + out := new(GenericOIDCLogin) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressCapabilities) DeepCopyInto(out *IngressCapabilities) { +func (in *GenericOIDCProvider) DeepCopyInto(out *GenericOIDCProvider) { *out = *in - if in.CustomDefaultBackend != nil { - in, out := &in.CustomDefaultBackend, &out.CustomDefaultBackend - *out = new(bool) - **out = **in - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressCapabilities. -func (in *IngressCapabilities) DeepCopy() *IngressCapabilities { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCProvider. +func (in *GenericOIDCProvider) DeepCopy() *GenericOIDCProvider { if in == nil { return nil } - out := new(IngressCapabilities) + out := new(GenericOIDCProvider) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GenericOIDCProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *K3sConfig) DeepCopyInto(out *K3sConfig) { +func (in *GenericOIDCProviderList) DeepCopyInto(out *GenericOIDCProviderList) { *out = *in - out.ClusterUpgradeStrategy = in.ClusterUpgradeStrategy + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GenericOIDCProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K3sConfig. -func (in *K3sConfig) DeepCopy() *K3sConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCProviderList. +func (in *GenericOIDCProviderList) DeepCopy() *GenericOIDCProviderList { if in == nil { return nil } - out := new(K3sConfig) + out := new(GenericOIDCProviderList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GenericOIDCProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KafkaConfig) DeepCopyInto(out *KafkaConfig) { +func (in *GenericOIDCTestOutput) DeepCopyInto(out *GenericOIDCTestOutput) { *out = *in - if in.BrokerEndpoints != nil { - in, out := &in.BrokerEndpoints, &out.BrokerEndpoints - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.OIDCTestOutput = in.OIDCTestOutput return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaConfig. -func (in *KafkaConfig) DeepCopy() *KafkaConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOIDCTestOutput. +func (in *GenericOIDCTestOutput) DeepCopy() *GenericOIDCTestOutput { if in == nil { return nil } - out := new(KafkaConfig) + out := new(GenericOIDCTestOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyCloakConfig) DeepCopyInto(out *KeyCloakConfig) { +func (in *GithubConfig) DeepCopyInto(out *GithubConfig) { *out = *in - in.SamlConfig.DeepCopyInto(&out.SamlConfig) + in.AuthConfig.DeepCopyInto(&out.AuthConfig) + if in.AdditionalClientIDs != nil { + in, out := &in.AdditionalClientIDs, &out.AdditionalClientIDs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.HostnameToClientID != nil { + in, out := &in.HostnameToClientID, &out.HostnameToClientID + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakConfig. -func (in *KeyCloakConfig) DeepCopy() *KeyCloakConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfig. +func (in *GithubConfig) DeepCopy() *GithubConfig { if in == nil { return nil } - out := new(KeyCloakConfig) + out := new(GithubConfig) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GithubConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyCloakOIDCConfig) DeepCopyInto(out *KeyCloakOIDCConfig) { +func (in *GithubConfigApplyInput) DeepCopyInto(out *GithubConfigApplyInput) { *out = *in - in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) + in.GithubConfig.DeepCopyInto(&out.GithubConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCConfig. -func (in *KeyCloakOIDCConfig) DeepCopy() *KeyCloakOIDCConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigApplyInput. +func (in *GithubConfigApplyInput) DeepCopy() *GithubConfigApplyInput { if in == nil { return nil } - out := new(KeyCloakOIDCConfig) + out := new(GithubConfigApplyInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyCloakOIDCConfigList) DeepCopyInto(out *KeyCloakOIDCConfigList) { +func (in *GithubConfigList) DeepCopyInto(out *GithubConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]KeyCloakOIDCConfig, len(*in)) + *out = make([]GithubConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4387,18 +2989,18 @@ func (in *KeyCloakOIDCConfigList) DeepCopyInto(out *KeyCloakOIDCConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCConfigList. -func (in *KeyCloakOIDCConfigList) DeepCopy() *KeyCloakOIDCConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigList. +func (in *GithubConfigList) DeepCopy() *GithubConfigList { if in == nil { return nil } - out := new(KeyCloakOIDCConfigList) + out := new(GithubConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KeyCloakOIDCConfigList) DeepCopyObject() runtime.Object { +func (in *GithubConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4406,61 +3008,59 @@ func (in *KeyCloakOIDCConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyCloakOIDCProvider) DeepCopyInto(out *KeyCloakOIDCProvider) { +func (in *GithubConfigTestOutput) DeepCopyInto(out *GithubConfigTestOutput) { *out = *in - in.OIDCProvider.DeepCopyInto(&out.OIDCProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCProvider. -func (in *KeyCloakOIDCProvider) DeepCopy() *KeyCloakOIDCProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigTestOutput. +func (in *GithubConfigTestOutput) DeepCopy() *GithubConfigTestOutput { if in == nil { return nil } - out := new(KeyCloakOIDCProvider) + out := new(GithubConfigTestOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyCloakProvider) DeepCopyInto(out *KeyCloakProvider) { +func (in *GithubLogin) DeepCopyInto(out *GithubLogin) { *out = *in - in.SamlProvider.DeepCopyInto(&out.SamlProvider) + out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakProvider. -func (in *KeyCloakProvider) DeepCopy() *KeyCloakProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubLogin. +func (in *GithubLogin) DeepCopy() *GithubLogin { if in == nil { return nil } - out := new(KeyCloakProvider) + out := new(GithubLogin) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KontainerDriver) DeepCopyInto(out *KontainerDriver) { +func (in *GithubProvider) DeepCopyInto(out *GithubProvider) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriver. -func (in *KontainerDriver) DeepCopy() *KontainerDriver { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubProvider. +func (in *GithubProvider) DeepCopy() *GithubProvider { if in == nil { return nil } - out := new(KontainerDriver) + out := new(GithubProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KontainerDriver) DeepCopyObject() runtime.Object { +func (in *GithubProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4468,13 +3068,13 @@ func (in *KontainerDriver) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KontainerDriverList) DeepCopyInto(out *KontainerDriverList) { +func (in *GithubProviderList) DeepCopyInto(out *GithubProviderList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]KontainerDriver, len(*in)) + *out = make([]GithubProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4482,18 +3082,18 @@ func (in *KontainerDriverList) DeepCopyInto(out *KontainerDriverList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverList. -func (in *KontainerDriverList) DeepCopy() *KontainerDriverList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubProviderList. +func (in *GithubProviderList) DeepCopy() *GithubProviderList { if in == nil { return nil } - out := new(KontainerDriverList) + out := new(GithubProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KontainerDriverList) DeepCopyObject() runtime.Object { +func (in *GithubProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4501,67 +3101,87 @@ func (in *KontainerDriverList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KontainerDriverSpec) DeepCopyInto(out *KontainerDriverSpec) { +func (in *GlobalRole) DeepCopyInto(out *GlobalRole) { *out = *in - if in.WhitelistDomains != nil { - in, out := &in.WhitelistDomains, &out.WhitelistDomains + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InheritedClusterRoles != nil { + in, out := &in.InheritedClusterRoles, &out.InheritedClusterRoles *out = make([]string, len(*in)) copy(*out, *in) } + if in.NamespacedRules != nil { + in, out := &in.NamespacedRules, &out.NamespacedRules + *out = make(map[string][]rbacv1.PolicyRule, len(*in)) + for key, val := range *in { + var outVal []rbacv1.PolicyRule + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + (*out)[key] = outVal + } + } + if in.InheritedFleetWorkspacePermissions != nil { + in, out := &in.InheritedFleetWorkspacePermissions, &out.InheritedFleetWorkspacePermissions + *out = new(FleetWorkspacePermission) + (*in).DeepCopyInto(*out) + } + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverSpec. -func (in *KontainerDriverSpec) DeepCopy() *KontainerDriverSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRole. +func (in *GlobalRole) DeepCopy() *GlobalRole { if in == nil { return nil } - out := new(KontainerDriverSpec) + out := new(GlobalRole) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KontainerDriverStatus) DeepCopyInto(out *KontainerDriverStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverStatus. -func (in *KontainerDriverStatus) DeepCopy() *KontainerDriverStatus { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalRole) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(KontainerDriverStatus) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LdapConfig) DeepCopyInto(out *LdapConfig) { +func (in *GlobalRoleBinding) DeepCopyInto(out *GlobalRoleBinding) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) - in.LdapFields.DeepCopyInto(&out.LdapFields) + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfig. -func (in *LdapConfig) DeepCopy() *LdapConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBinding. +func (in *GlobalRoleBinding) DeepCopy() *GlobalRoleBinding { if in == nil { return nil } - out := new(LdapConfig) + out := new(GlobalRoleBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LdapConfig) DeepCopyObject() runtime.Object { +func (in *GlobalRoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4569,13 +3189,13 @@ func (in *LdapConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LdapConfigList) DeepCopyInto(out *LdapConfigList) { +func (in *GlobalRoleBindingList) DeepCopyInto(out *GlobalRoleBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]LdapConfig, len(*in)) + *out = make([]GlobalRoleBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4583,18 +3203,18 @@ func (in *LdapConfigList) DeepCopyInto(out *LdapConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfigList. -func (in *LdapConfigList) DeepCopy() *LdapConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBindingList. +func (in *GlobalRoleBindingList) DeepCopy() *GlobalRoleBindingList { if in == nil { return nil } - out := new(LdapConfigList) + out := new(GlobalRoleBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LdapConfigList) DeepCopyObject() runtime.Object { +func (in *GlobalRoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4602,127 +3222,112 @@ func (in *LdapConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LdapFields) DeepCopyInto(out *LdapFields) { +func (in *GlobalRoleBindingStatus) DeepCopyInto(out *GlobalRoleBindingStatus) { *out = *in - if in.Servers != nil { - in, out := &in.Servers, &out.Servers - *out = make([]string, len(*in)) - copy(*out, *in) + if in.LocalConditions != nil { + in, out := &in.LocalConditions, &out.LocalConditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapFields. -func (in *LdapFields) DeepCopy() *LdapFields { - if in == nil { - return nil + if in.RemoteConditions != nil { + in, out := &in.RemoteConditions, &out.RemoteConditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - out := new(LdapFields) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LdapTestAndApplyInput) DeepCopyInto(out *LdapTestAndApplyInput) { - *out = *in - in.LdapConfig.DeepCopyInto(&out.LdapConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapTestAndApplyInput. -func (in *LdapTestAndApplyInput) DeepCopy() *LdapTestAndApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBindingStatus. +func (in *GlobalRoleBindingStatus) DeepCopy() *GlobalRoleBindingStatus { if in == nil { return nil } - out := new(LdapTestAndApplyInput) + out := new(GlobalRoleBindingStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ListOpts) DeepCopyInto(out *ListOpts) { +func (in *GlobalRoleList) DeepCopyInto(out *GlobalRoleList) { *out = *in - if in.Filters != nil { - in, out := &in.Filters, &out.Filters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalRole, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOpts. -func (in *ListOpts) DeepCopy() *ListOpts { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleList. +func (in *GlobalRoleList) DeepCopy() *GlobalRoleList { if in == nil { return nil } - out := new(ListOpts) + out := new(GlobalRoleList) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerCapabilities) DeepCopyInto(out *LoadBalancerCapabilities) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.ProtocolsSupported != nil { - in, out := &in.ProtocolsSupported, &out.ProtocolsSupported - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerCapabilities. -func (in *LoadBalancerCapabilities) DeepCopy() *LoadBalancerCapabilities { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalRoleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(LoadBalancerCapabilities) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalClusterAuthEndpoint) DeepCopyInto(out *LocalClusterAuthEndpoint) { +func (in *GlobalRoleStatus) DeepCopyInto(out *GlobalRoleStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAuthEndpoint. -func (in *LocalClusterAuthEndpoint) DeepCopy() *LocalClusterAuthEndpoint { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleStatus. +func (in *GlobalRoleStatus) DeepCopy() *GlobalRoleStatus { if in == nil { return nil } - out := new(LocalClusterAuthEndpoint) + out := new(GlobalRoleStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalConfig) DeepCopyInto(out *LocalConfig) { +func (in *GoogleOAuthProvider) DeepCopyInto(out *GoogleOAuthProvider) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalConfig. -func (in *LocalConfig) DeepCopy() *LocalConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOAuthProvider. +func (in *GoogleOAuthProvider) DeepCopy() *GoogleOAuthProvider { if in == nil { return nil } - out := new(LocalConfig) + out := new(GoogleOAuthProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalConfig) DeepCopyObject() runtime.Object { +func (in *GoogleOAuthProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4730,13 +3335,13 @@ func (in *LocalConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalConfigList) DeepCopyInto(out *LocalConfigList) { +func (in *GoogleOAuthProviderList) DeepCopyInto(out *GoogleOAuthProviderList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]LocalConfig, len(*in)) + *out = make([]GoogleOAuthProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4744,18 +3349,18 @@ func (in *LocalConfigList) DeepCopyInto(out *LocalConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalConfigList. -func (in *LocalConfigList) DeepCopy() *LocalConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOAuthProviderList. +func (in *GoogleOAuthProviderList) DeepCopy() *GoogleOAuthProviderList { if in == nil { return nil } - out := new(LocalConfigList) + out := new(GoogleOAuthProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalConfigList) DeepCopyObject() runtime.Object { +func (in *GoogleOAuthProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4763,26 +3368,24 @@ func (in *LocalConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalProvider) DeepCopyInto(out *LocalProvider) { +func (in *GoogleOauthConfig) DeepCopyInto(out *GoogleOauthConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + in.AuthConfig.DeepCopyInto(&out.AuthConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalProvider. -func (in *LocalProvider) DeepCopy() *LocalProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfig. +func (in *GoogleOauthConfig) DeepCopy() *GoogleOauthConfig { if in == nil { return nil } - out := new(LocalProvider) + out := new(GoogleOauthConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalProvider) DeepCopyObject() runtime.Object { +func (in *GoogleOauthConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4790,13 +3393,30 @@ func (in *LocalProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalProviderList) DeepCopyInto(out *LocalProviderList) { +func (in *GoogleOauthConfigApplyInput) DeepCopyInto(out *GoogleOauthConfigApplyInput) { + *out = *in + in.GoogleOauthConfig.DeepCopyInto(&out.GoogleOauthConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigApplyInput. +func (in *GoogleOauthConfigApplyInput) DeepCopy() *GoogleOauthConfigApplyInput { + if in == nil { + return nil + } + out := new(GoogleOauthConfigApplyInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GoogleOauthConfigList) DeepCopyInto(out *GoogleOauthConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]LocalProvider, len(*in)) + *out = make([]GoogleOauthConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4804,18 +3424,18 @@ func (in *LocalProviderList) DeepCopyInto(out *LocalProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalProviderList. -func (in *LocalProviderList) DeepCopy() *LocalProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigList. +func (in *GoogleOauthConfigList) DeepCopy() *GoogleOauthConfigList { if in == nil { return nil } - out := new(LocalProviderList) + out := new(GoogleOauthConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalProviderList) DeepCopyObject() runtime.Object { +func (in *GoogleOauthConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4823,112 +3443,117 @@ func (in *LocalProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoggingCommonField) DeepCopyInto(out *LoggingCommonField) { +func (in *GoogleOauthConfigTestOutput) DeepCopyInto(out *GoogleOauthConfigTestOutput) { *out = *in - if in.OutputTags != nil { - in, out := &in.OutputTags, &out.OutputTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingCommonField. -func (in *LoggingCommonField) DeepCopy() *LoggingCommonField { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthConfigTestOutput. +func (in *GoogleOauthConfigTestOutput) DeepCopy() *GoogleOauthConfigTestOutput { if in == nil { return nil } - out := new(LoggingCommonField) + out := new(GoogleOauthConfigTestOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoggingCondition) DeepCopyInto(out *LoggingCondition) { +func (in *GoogleOauthLogin) DeepCopyInto(out *GoogleOauthLogin) { *out = *in + out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingCondition. -func (in *LoggingCondition) DeepCopy() *LoggingCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleOauthLogin. +func (in *GoogleOauthLogin) DeepCopy() *GoogleOauthLogin { if in == nil { return nil } - out := new(LoggingCondition) + out := new(GoogleOauthLogin) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoggingTargets) DeepCopyInto(out *LoggingTargets) { +func (in *Group) DeepCopyInto(out *Group) { *out = *in - if in.ElasticsearchConfig != nil { - in, out := &in.ElasticsearchConfig, &out.ElasticsearchConfig - *out = new(ElasticsearchConfig) - **out = **in - } - if in.SplunkConfig != nil { - in, out := &in.SplunkConfig, &out.SplunkConfig - *out = new(SplunkConfig) - **out = **in - } - if in.KafkaConfig != nil { - in, out := &in.KafkaConfig, &out.KafkaConfig - *out = new(KafkaConfig) - (*in).DeepCopyInto(*out) - } - if in.SyslogConfig != nil { - in, out := &in.SyslogConfig, &out.SyslogConfig - *out = new(SyslogConfig) - **out = **in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. +func (in *Group) DeepCopy() *Group { + if in == nil { + return nil } - if in.FluentForwarderConfig != nil { - in, out := &in.FluentForwarderConfig, &out.FluentForwarderConfig - *out = new(FluentForwarderConfig) - (*in).DeepCopyInto(*out) + out := new(Group) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Group) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - if in.CustomTargetConfig != nil { - in, out := &in.CustomTargetConfig, &out.CustomTargetConfig - *out = new(CustomTargetConfig) - **out = **in + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupList) DeepCopyInto(out *GroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Group, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingTargets. -func (in *LoggingTargets) DeepCopy() *LoggingTargets { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList. +func (in *GroupList) DeepCopy() *GroupList { if in == nil { return nil } - out := new(LoggingTargets) + out := new(GroupList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedChart) DeepCopyInto(out *ManagedChart) { +func (in *GroupMember) DeepCopyInto(out *GroupMember) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChart. -func (in *ManagedChart) DeepCopy() *ManagedChart { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMember. +func (in *GroupMember) DeepCopy() *GroupMember { if in == nil { return nil } - out := new(ManagedChart) + out := new(GroupMember) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ManagedChart) DeepCopyObject() runtime.Object { +func (in *GroupMember) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4936,13 +3561,13 @@ func (in *ManagedChart) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedChartList) DeepCopyInto(out *ManagedChartList) { +func (in *GroupMemberList) DeepCopyInto(out *GroupMemberList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ManagedChart, len(*in)) + *out = make([]GroupMember, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -4950,18 +3575,18 @@ func (in *ManagedChartList) DeepCopyInto(out *ManagedChartList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartList. -func (in *ManagedChartList) DeepCopy() *ManagedChartList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMemberList. +func (in *GroupMemberList) DeepCopy() *GroupMemberList { if in == nil { return nil } - out := new(ManagedChartList) + out := new(GroupMemberList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ManagedChartList) DeepCopyObject() runtime.Object { +func (in *GroupMemberList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -4969,156 +3594,152 @@ func (in *ManagedChartList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedChartSpec) DeepCopyInto(out *ManagedChartSpec) { +func (in *ImportClusterYamlInput) DeepCopyInto(out *ImportClusterYamlInput) { *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = (*in).DeepCopy() - } - if in.Diff != nil { - in, out := &in.Diff, &out.Diff - *out = new(v1alpha1.DiffOptions) - (*in).DeepCopyInto(*out) - } - if in.RolloutStrategy != nil { - in, out := &in.RolloutStrategy, &out.RolloutStrategy - *out = new(v1alpha1.RolloutStrategy) - (*in).DeepCopyInto(*out) - } - if in.Targets != nil { - in, out := &in.Targets, &out.Targets - *out = make([]v1alpha1.BundleTarget, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportClusterYamlInput. +func (in *ImportClusterYamlInput) DeepCopy() *ImportClusterYamlInput { + if in == nil { + return nil } + out := new(ImportClusterYamlInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImportYamlOutput) DeepCopyInto(out *ImportYamlOutput) { + *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartSpec. -func (in *ManagedChartSpec) DeepCopy() *ManagedChartSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportYamlOutput. +func (in *ImportYamlOutput) DeepCopy() *ImportYamlOutput { if in == nil { return nil } - out := new(ManagedChartSpec) + out := new(ImportYamlOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedChartStatus) DeepCopyInto(out *ManagedChartStatus) { +func (in *ImportedConfig) DeepCopyInto(out *ImportedConfig) { *out = *in - in.BundleStatus.DeepCopyInto(&out.BundleStatus) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartStatus. -func (in *ManagedChartStatus) DeepCopy() *ManagedChartStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportedConfig. +func (in *ImportedConfig) DeepCopy() *ImportedConfig { if in == nil { return nil } - out := new(ManagedChartStatus) + out := new(ImportedConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MapDelta) DeepCopyInto(out *MapDelta) { +func (in *IngressCapabilities) DeepCopyInto(out *IngressCapabilities) { *out = *in - if in.Add != nil { - in, out := &in.Add, &out.Add - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + if in.CustomDefaultBackend != nil { + in, out := &in.CustomDefaultBackend, &out.CustomDefaultBackend + *out = new(bool) + **out = **in } - if in.Delete != nil { - in, out := &in.Delete, &out.Delete - *out = make(map[string]bool, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressCapabilities. +func (in *IngressCapabilities) DeepCopy() *IngressCapabilities { + if in == nil { + return nil } + out := new(IngressCapabilities) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *K3sConfig) DeepCopyInto(out *K3sConfig) { + *out = *in + out.ClusterUpgradeStrategy = in.ClusterUpgradeStrategy return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MapDelta. -func (in *MapDelta) DeepCopy() *MapDelta { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K3sConfig. +func (in *K3sConfig) DeepCopy() *K3sConfig { if in == nil { return nil } - out := new(MapDelta) + out := new(K3sConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in MapStringInterface) DeepCopyInto(out *MapStringInterface) { - { - in := &in - clone := in.DeepCopy() - *out = *clone - return - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Member) DeepCopyInto(out *Member) { +func (in *KeyCloakConfig) DeepCopyInto(out *KeyCloakConfig) { *out = *in + in.SamlConfig.DeepCopyInto(&out.SamlConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Member. -func (in *Member) DeepCopy() *Member { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakConfig. +func (in *KeyCloakConfig) DeepCopy() *KeyCloakConfig { if in == nil { return nil } - out := new(Member) + out := new(KeyCloakConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetadataUpdate) DeepCopyInto(out *MetadataUpdate) { +func (in *KeyCloakOIDCConfig) DeepCopyInto(out *KeyCloakOIDCConfig) { *out = *in - in.Labels.DeepCopyInto(&out.Labels) - in.Annotations.DeepCopyInto(&out.Annotations) + in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataUpdate. -func (in *MetadataUpdate) DeepCopy() *MetadataUpdate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCConfig. +func (in *KeyCloakOIDCConfig) DeepCopy() *KeyCloakOIDCConfig { if in == nil { return nil } - out := new(MetadataUpdate) + out := new(KeyCloakOIDCConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterApp) DeepCopyInto(out *MultiClusterApp) { +func (in *KeyCloakOIDCConfigList) DeepCopyInto(out *KeyCloakOIDCConfigList) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyCloakOIDCConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterApp. -func (in *MultiClusterApp) DeepCopy() *MultiClusterApp { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCConfigList. +func (in *KeyCloakOIDCConfigList) DeepCopy() *KeyCloakOIDCConfigList { if in == nil { return nil } - out := new(MultiClusterApp) + out := new(KeyCloakOIDCConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterApp) DeepCopyObject() runtime.Object { +func (in *KeyCloakOIDCConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5126,66 +3747,61 @@ func (in *MultiClusterApp) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppList) DeepCopyInto(out *MultiClusterAppList) { +func (in *KeyCloakOIDCProvider) DeepCopyInto(out *KeyCloakOIDCProvider) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MultiClusterApp, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.OIDCProvider.DeepCopyInto(&out.OIDCProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppList. -func (in *MultiClusterAppList) DeepCopy() *MultiClusterAppList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakOIDCProvider. +func (in *KeyCloakOIDCProvider) DeepCopy() *KeyCloakOIDCProvider { if in == nil { return nil } - out := new(MultiClusterAppList) + out := new(KeyCloakOIDCProvider) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterAppList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyCloakProvider) DeepCopyInto(out *KeyCloakProvider) { + *out = *in + in.SamlProvider.DeepCopyInto(&out.SamlProvider) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyCloakProvider. +func (in *KeyCloakProvider) DeepCopy() *KeyCloakProvider { + if in == nil { + return nil } - return nil + out := new(KeyCloakProvider) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppRevision) DeepCopyInto(out *MultiClusterAppRevision) { +func (in *KontainerDriver) DeepCopyInto(out *KontainerDriver) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make([]Answer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppRevision. -func (in *MultiClusterAppRevision) DeepCopy() *MultiClusterAppRevision { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriver. +func (in *KontainerDriver) DeepCopy() *KontainerDriver { if in == nil { return nil } - out := new(MultiClusterAppRevision) + out := new(KontainerDriver) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterAppRevision) DeepCopyObject() runtime.Object { +func (in *KontainerDriver) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5193,13 +3809,13 @@ func (in *MultiClusterAppRevision) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppRevisionList) DeepCopyInto(out *MultiClusterAppRevisionList) { +func (in *KontainerDriverList) DeepCopyInto(out *KontainerDriverList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]MultiClusterAppRevision, len(*in)) + *out = make([]KontainerDriver, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -5207,18 +3823,18 @@ func (in *MultiClusterAppRevisionList) DeepCopyInto(out *MultiClusterAppRevision return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppRevisionList. -func (in *MultiClusterAppRevisionList) DeepCopy() *MultiClusterAppRevisionList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverList. +func (in *KontainerDriverList) DeepCopy() *KontainerDriverList { if in == nil { return nil } - out := new(MultiClusterAppRevisionList) + out := new(KontainerDriverList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterAppRevisionList) DeepCopyObject() runtime.Object { +func (in *KontainerDriverList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5226,121 +3842,100 @@ func (in *MultiClusterAppRevisionList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppRollbackInput) DeepCopyInto(out *MultiClusterAppRollbackInput) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppRollbackInput. -func (in *MultiClusterAppRollbackInput) DeepCopy() *MultiClusterAppRollbackInput { - if in == nil { - return nil - } - out := new(MultiClusterAppRollbackInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppSpec) DeepCopyInto(out *MultiClusterAppSpec) { +func (in *KontainerDriverSpec) DeepCopyInto(out *KontainerDriverSpec) { *out = *in - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make([]Answer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Targets != nil { - in, out := &in.Targets, &out.Targets - *out = make([]Target, len(*in)) - copy(*out, *in) - } - if in.Members != nil { - in, out := &in.Members, &out.Members - *out = make([]Member, len(*in)) - copy(*out, *in) - } - if in.Roles != nil { - in, out := &in.Roles, &out.Roles + if in.WhitelistDomains != nil { + in, out := &in.WhitelistDomains, &out.WhitelistDomains *out = make([]string, len(*in)) copy(*out, *in) } - in.UpgradeStrategy.DeepCopyInto(&out.UpgradeStrategy) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppSpec. -func (in *MultiClusterAppSpec) DeepCopy() *MultiClusterAppSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverSpec. +func (in *KontainerDriverSpec) DeepCopy() *KontainerDriverSpec { if in == nil { return nil } - out := new(MultiClusterAppSpec) + out := new(KontainerDriverSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterAppStatus) DeepCopyInto(out *MultiClusterAppStatus) { +func (in *KontainerDriverStatus) DeepCopyInto(out *KontainerDriverStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]projectcattleiov3.AppCondition, len(*in)) + *out = make([]Condition, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterAppStatus. -func (in *MultiClusterAppStatus) DeepCopy() *MultiClusterAppStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KontainerDriverStatus. +func (in *KontainerDriverStatus) DeepCopy() *KontainerDriverStatus { if in == nil { return nil } - out := new(MultiClusterAppStatus) + out := new(KontainerDriverStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceResourceQuota) DeepCopyInto(out *NamespaceResourceQuota) { +func (in *LdapConfig) DeepCopyInto(out *LdapConfig) { *out = *in - out.Limit = in.Limit + in.AuthConfig.DeepCopyInto(&out.AuthConfig) + in.LdapFields.DeepCopyInto(&out.LdapFields) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceResourceQuota. -func (in *NamespaceResourceQuota) DeepCopy() *NamespaceResourceQuota { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfig. +func (in *LdapConfig) DeepCopy() *LdapConfig { if in == nil { return nil } - out := new(NamespaceResourceQuota) + out := new(LdapConfig) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LdapConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Node) DeepCopyInto(out *Node) { +func (in *LdapConfigList) DeepCopyInto(out *LdapConfigList) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LdapConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node. -func (in *Node) DeepCopy() *Node { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfigList. +func (in *LdapConfigList) DeepCopy() *LdapConfigList { if in == nil { return nil } - out := new(Node) + out := new(LdapConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Node) DeepCopyObject() runtime.Object { +func (in *LdapConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5348,109 +3943,127 @@ func (in *Node) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeCommonParams) DeepCopyInto(out *NodeCommonParams) { +func (in *LdapFields) DeepCopyInto(out *LdapFields) { *out = *in - if in.EngineOpt != nil { - in, out := &in.EngineOpt, &out.EngineOpt - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.StorageOpt != nil { - in, out := &in.StorageOpt, &out.StorageOpt - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.LogOpt != nil { - in, out := &in.LogOpt, &out.LogOpt - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.EngineInsecureRegistry != nil { - in, out := &in.EngineInsecureRegistry, &out.EngineInsecureRegistry + if in.Servers != nil { + in, out := &in.Servers, &out.Servers *out = make([]string, len(*in)) copy(*out, *in) } - if in.EngineRegistryMirror != nil { - in, out := &in.EngineRegistryMirror, &out.EngineRegistryMirror - *out = make([]string, len(*in)) - copy(*out, *in) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapFields. +func (in *LdapFields) DeepCopy() *LdapFields { + if in == nil { + return nil } - if in.EngineLabel != nil { - in, out := &in.EngineLabel, &out.EngineLabel - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + out := new(LdapFields) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LdapTestAndApplyInput) DeepCopyInto(out *LdapTestAndApplyInput) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapTestAndApplyInput. +func (in *LdapTestAndApplyInput) DeepCopy() *LdapTestAndApplyInput { + if in == nil { + return nil } - if in.EngineEnv != nil { - in, out := &in.EngineEnv, &out.EngineEnv + out := new(LdapTestAndApplyInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ListOpts) DeepCopyInto(out *ListOpts) { + *out = *in + if in.Filters != nil { + in, out := &in.Filters, &out.Filters *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } - if in.UseInternalIPAddress != nil { - in, out := &in.UseInternalIPAddress, &out.UseInternalIPAddress + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOpts. +func (in *ListOpts) DeepCopy() *ListOpts { + if in == nil { + return nil + } + out := new(ListOpts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoadBalancerCapabilities) DeepCopyInto(out *LoadBalancerCapabilities) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled *out = new(bool) **out = **in } + if in.ProtocolsSupported != nil { + in, out := &in.ProtocolsSupported, &out.ProtocolsSupported + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCommonParams. -func (in *NodeCommonParams) DeepCopy() *NodeCommonParams { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerCapabilities. +func (in *LoadBalancerCapabilities) DeepCopy() *LoadBalancerCapabilities { if in == nil { return nil } - out := new(NodeCommonParams) + out := new(LoadBalancerCapabilities) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeCondition) DeepCopyInto(out *NodeCondition) { +func (in *LocalClusterAuthEndpoint) DeepCopyInto(out *LocalClusterAuthEndpoint) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition. -func (in *NodeCondition) DeepCopy() *NodeCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalClusterAuthEndpoint. +func (in *LocalClusterAuthEndpoint) DeepCopy() *LocalClusterAuthEndpoint { if in == nil { return nil } - out := new(NodeCondition) + out := new(LocalClusterAuthEndpoint) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDriver) DeepCopyInto(out *NodeDriver) { +func (in *LocalConfig) DeepCopyInto(out *LocalConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.AuthConfig.DeepCopyInto(&out.AuthConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriver. -func (in *NodeDriver) DeepCopy() *NodeDriver { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalConfig. +func (in *LocalConfig) DeepCopy() *LocalConfig { if in == nil { return nil } - out := new(NodeDriver) + out := new(LocalConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeDriver) DeepCopyObject() runtime.Object { +func (in *LocalConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5458,13 +4071,13 @@ func (in *NodeDriver) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDriverList) DeepCopyInto(out *NodeDriverList) { +func (in *LocalConfigList) DeepCopyInto(out *LocalConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]NodeDriver, len(*in)) + *out = make([]LocalConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -5472,18 +4085,18 @@ func (in *NodeDriverList) DeepCopyInto(out *NodeDriverList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverList. -func (in *NodeDriverList) DeepCopy() *NodeDriverList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalConfigList. +func (in *LocalConfigList) DeepCopy() *LocalConfigList { if in == nil { return nil } - out := new(NodeDriverList) + out := new(LocalConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeDriverList) DeepCopyObject() runtime.Object { +func (in *LocalConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5491,55 +4104,101 @@ func (in *NodeDriverList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDriverSpec) DeepCopyInto(out *NodeDriverSpec) { +func (in *LocalProvider) DeepCopyInto(out *LocalProvider) { *out = *in - if in.WhitelistDomains != nil { - in, out := &in.WhitelistDomains, &out.WhitelistDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverSpec. -func (in *NodeDriverSpec) DeepCopy() *NodeDriverSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalProvider. +func (in *LocalProvider) DeepCopy() *LocalProvider { if in == nil { return nil } - out := new(NodeDriverSpec) + out := new(LocalProvider) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDriverStatus) DeepCopyInto(out *NodeDriverStatus) { +func (in *LocalProviderList) DeepCopyInto(out *LocalProviderList) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - copy(*out, *in) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LocalProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverStatus. -func (in *NodeDriverStatus) DeepCopy() *NodeDriverStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalProviderList. +func (in *LocalProviderList) DeepCopy() *LocalProviderList { if in == nil { return nil } - out := new(NodeDriverStatus) + out := new(LocalProviderList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LocalProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeList) DeepCopyInto(out *NodeList) { +func (in *ManagedChart) DeepCopyInto(out *ManagedChart) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChart. +func (in *ManagedChart) DeepCopy() *ManagedChart { + if in == nil { + return nil + } + out := new(ManagedChart) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedChart) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedChartList) DeepCopyInto(out *ManagedChartList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Node, len(*in)) + *out = make([]ManagedChart, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -5547,18 +4206,18 @@ func (in *NodeList) DeepCopyInto(out *NodeList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartList. +func (in *ManagedChartList) DeepCopy() *ManagedChartList { if in == nil { return nil } - out := new(NodeList) + out := new(ManagedChartList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) DeepCopyObject() runtime.Object { +func (in *ManagedChartList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5566,316 +4225,297 @@ func (in *NodeList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePlan) DeepCopyInto(out *NodePlan) { +func (in *ManagedChartSpec) DeepCopyInto(out *ManagedChartSpec) { *out = *in - if in.Plan != nil { - in, out := &in.Plan, &out.Plan - *out = new(types.RKEConfigNodePlan) + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = (*in).DeepCopy() + } + if in.Diff != nil { + in, out := &in.Diff, &out.Diff + *out = new(v1alpha1.DiffOptions) + (*in).DeepCopyInto(*out) + } + if in.RolloutStrategy != nil { + in, out := &in.RolloutStrategy, &out.RolloutStrategy + *out = new(v1alpha1.RolloutStrategy) (*in).DeepCopyInto(*out) } + if in.Targets != nil { + in, out := &in.Targets, &out.Targets + *out = make([]v1alpha1.BundleTarget, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePlan. -func (in *NodePlan) DeepCopy() *NodePlan { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartSpec. +func (in *ManagedChartSpec) DeepCopy() *ManagedChartSpec { if in == nil { return nil } - out := new(NodePlan) + out := new(ManagedChartSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePool) DeepCopyInto(out *NodePool) { +func (in *ManagedChartStatus) DeepCopyInto(out *ManagedChartStatus) { *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.BundleStatus.DeepCopyInto(&out.BundleStatus) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool. -func (in *NodePool) DeepCopy() *NodePool { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedChartStatus. +func (in *ManagedChartStatus) DeepCopy() *ManagedChartStatus { if in == nil { return nil } - out := new(NodePool) + out := new(ManagedChartStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodePool) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePoolList) DeepCopyInto(out *NodePoolList) { +func (in *MapDelta) DeepCopyInto(out *MapDelta) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NodePool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if in.Add != nil { + in, out := &in.Add, &out.Add + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Delete != nil { + in, out := &in.Delete, &out.Delete + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolList. -func (in *NodePoolList) DeepCopy() *NodePoolList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MapDelta. +func (in *MapDelta) DeepCopy() *MapDelta { if in == nil { return nil } - out := new(NodePoolList) + out := new(MapDelta) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodePoolList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in MapStringInterface) DeepCopyInto(out *MapStringInterface) { + { + in := &in + clone := in.DeepCopy() + *out = *clone + return + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Member) DeepCopyInto(out *Member) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Member. +func (in *Member) DeepCopy() *Member { + if in == nil { + return nil } - return nil + out := new(Member) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec) { +func (in *MetadataUpdate) DeepCopyInto(out *MetadataUpdate) { *out = *in - if in.NodeLabels != nil { - in, out := &in.NodeLabels, &out.NodeLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodeAnnotations != nil { - in, out := &in.NodeAnnotations, &out.NodeAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodeTaints != nil { - in, out := &in.NodeTaints, &out.NodeTaints - *out = make([]corev1.Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.Labels.DeepCopyInto(&out.Labels) + in.Annotations.DeepCopyInto(&out.Annotations) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolSpec. -func (in *NodePoolSpec) DeepCopy() *NodePoolSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataUpdate. +func (in *MetadataUpdate) DeepCopy() *MetadataUpdate { if in == nil { return nil } - out := new(NodePoolSpec) + out := new(MetadataUpdate) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus) { +func (in *NamespaceResourceQuota) DeepCopyInto(out *NamespaceResourceQuota) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - copy(*out, *in) - } + out.Limit = in.Limit return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolStatus. -func (in *NodePoolStatus) DeepCopy() *NodePoolStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceResourceQuota. +func (in *NamespaceResourceQuota) DeepCopy() *NamespaceResourceQuota { if in == nil { return nil } - out := new(NodePoolStatus) + out := new(NamespaceResourceQuota) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { +func (in *Node) DeepCopyInto(out *Node) { *out = *in - if in.CustomConfig != nil { - in, out := &in.CustomConfig, &out.CustomConfig - *out = new(CustomConfig) - (*in).DeepCopyInto(*out) - } - in.InternalNodeSpec.DeepCopyInto(&out.InternalNodeSpec) - if in.DesiredNodeTaints != nil { - in, out := &in.DesiredNodeTaints, &out.DesiredNodeTaints - *out = make([]corev1.Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.UpdateTaintsFromAPI != nil { - in, out := &in.UpdateTaintsFromAPI, &out.UpdateTaintsFromAPI - *out = new(bool) - **out = **in - } - if in.NodeDrainInput != nil { - in, out := &in.NodeDrainInput, &out.NodeDrainInput - *out = new(types.NodeDrainInput) - (*in).DeepCopyInto(*out) - } - in.MetadataUpdate.DeepCopyInto(&out.MetadataUpdate) + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node. +func (in *Node) DeepCopy() *Node { if in == nil { return nil } - out := new(NodeSpec) + out := new(Node) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Node) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { +func (in *NodeCommonParams) DeepCopyInto(out *NodeCommonParams) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]NodeCondition, len(*in)) - copy(*out, *in) + if in.EngineOpt != nil { + in, out := &in.EngineOpt, &out.EngineOpt + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } - in.InternalNodeStatus.DeepCopyInto(&out.InternalNodeStatus) - if in.Requested != nil { - in, out := &in.Requested, &out.Requested - *out = make(corev1.ResourceList, len(*in)) + if in.StorageOpt != nil { + in, out := &in.StorageOpt, &out.StorageOpt + *out = make(map[string]string, len(*in)) for key, val := range *in { - (*out)[key] = val.DeepCopy() + (*out)[key] = val } } - if in.Limits != nil { - in, out := &in.Limits, &out.Limits - *out = make(corev1.ResourceList, len(*in)) + if in.LogOpt != nil { + in, out := &in.LogOpt, &out.LogOpt + *out = make(map[string]string, len(*in)) for key, val := range *in { - (*out)[key] = val.DeepCopy() + (*out)[key] = val } } - if in.NodeTemplateSpec != nil { - in, out := &in.NodeTemplateSpec, &out.NodeTemplateSpec - *out = new(NodeTemplateSpec) - (*in).DeepCopyInto(*out) + if in.EngineInsecureRegistry != nil { + in, out := &in.EngineInsecureRegistry, &out.EngineInsecureRegistry + *out = make([]string, len(*in)) + copy(*out, *in) } - if in.NodeConfig != nil { - in, out := &in.NodeConfig, &out.NodeConfig - *out = new(types.RKEConfigNode) - (*in).DeepCopyInto(*out) + if in.EngineRegistryMirror != nil { + in, out := &in.EngineRegistryMirror, &out.EngineRegistryMirror + *out = make([]string, len(*in)) + copy(*out, *in) } - if in.NodeAnnotations != nil { - in, out := &in.NodeAnnotations, &out.NodeAnnotations + if in.EngineLabel != nil { + in, out := &in.EngineLabel, &out.EngineLabel *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } - if in.NodeLabels != nil { - in, out := &in.NodeLabels, &out.NodeLabels + if in.EngineEnv != nil { + in, out := &in.EngineEnv, &out.EngineEnv *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } - if in.NodeTaints != nil { - in, out := &in.NodeTaints, &out.NodeTaints - *out = make([]corev1.Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DockerInfo != nil { - in, out := &in.DockerInfo, &out.DockerInfo - *out = new(DockerInfo) - (*in).DeepCopyInto(*out) - } - if in.NodePlan != nil { - in, out := &in.NodePlan, &out.NodePlan - *out = new(NodePlan) - (*in).DeepCopyInto(*out) + if in.UseInternalIPAddress != nil { + in, out := &in.UseInternalIPAddress, &out.UseInternalIPAddress + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCommonParams. +func (in *NodeCommonParams) DeepCopy() *NodeCommonParams { if in == nil { return nil } - out := new(NodeStatus) + out := new(NodeCommonParams) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate) { +func (in *NodeCondition) DeepCopyInto(out *NodeCondition) { *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplate. -func (in *NodeTemplate) DeepCopy() *NodeTemplate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition. +func (in *NodeCondition) DeepCopy() *NodeCondition { if in == nil { return nil } - out := new(NodeTemplate) + out := new(NodeCondition) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeTemplateCondition) DeepCopyInto(out *NodeTemplateCondition) { +func (in *NodeDriver) DeepCopyInto(out *NodeDriver) { *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateCondition. -func (in *NodeTemplateCondition) DeepCopy() *NodeTemplateCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriver. +func (in *NodeDriver) DeepCopy() *NodeDriver { if in == nil { return nil } - out := new(NodeTemplateCondition) + out := new(NodeDriver) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeDriver) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeTemplateList) DeepCopyInto(out *NodeTemplateList) { +func (in *NodeDriverList) DeepCopyInto(out *NodeDriverList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]NodeTemplate, len(*in)) + *out = make([]NodeDriver, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -5883,18 +4523,18 @@ func (in *NodeTemplateList) DeepCopyInto(out *NodeTemplateList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateList. -func (in *NodeTemplateList) DeepCopy() *NodeTemplateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverList. +func (in *NodeDriverList) DeepCopy() *NodeDriverList { if in == nil { return nil } - out := new(NodeTemplateList) + out := new(NodeDriverList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeTemplateList) DeepCopyObject() runtime.Object { +func (in *NodeDriverList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -5902,129 +4542,124 @@ func (in *NodeTemplateList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeTemplateSpec) DeepCopyInto(out *NodeTemplateSpec) { - *out = *in - if in.NodeTaints != nil { - in, out := &in.NodeTaints, &out.NodeTaints - *out = make([]corev1.Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.NodeCommonParams.DeepCopyInto(&out.NodeCommonParams) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateSpec. -func (in *NodeTemplateSpec) DeepCopy() *NodeTemplateSpec { - if in == nil { - return nil - } - out := new(NodeTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeTemplateStatus) DeepCopyInto(out *NodeTemplateStatus) { +func (in *NodeDriverSpec) DeepCopyInto(out *NodeDriverSpec) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]NodeTemplateCondition, len(*in)) + if in.WhitelistDomains != nil { + in, out := &in.WhitelistDomains, &out.WhitelistDomains + *out = make([]string, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateStatus. -func (in *NodeTemplateStatus) DeepCopy() *NodeTemplateStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverSpec. +func (in *NodeDriverSpec) DeepCopy() *NodeDriverSpec { if in == nil { return nil } - out := new(NodeTemplateStatus) + out := new(NodeDriverSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthEndpoint) DeepCopyInto(out *OAuthEndpoint) { +func (in *NodeDriverStatus) DeepCopyInto(out *NodeDriverStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthEndpoint. -func (in *OAuthEndpoint) DeepCopy() *OAuthEndpoint { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDriverStatus. +func (in *NodeDriverStatus) DeepCopy() *NodeDriverStatus { if in == nil { return nil } - out := new(OAuthEndpoint) + out := new(NodeDriverStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthProvider) DeepCopyInto(out *OAuthProvider) { +func (in *NodeList) DeepCopyInto(out *NodeList) { *out = *in - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Node, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - out.OAuthEndpoint = in.OAuthEndpoint return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthProvider. -func (in *OAuthProvider) DeepCopy() *OAuthProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. +func (in *NodeList) DeepCopy() *NodeList { if in == nil { return nil } - out := new(OAuthProvider) + out := new(NodeList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCApplyInput) DeepCopyInto(out *OIDCApplyInput) { +func (in *NodePlan) DeepCopyInto(out *NodePlan) { *out = *in - in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) + if in.Plan != nil { + in, out := &in.Plan, &out.Plan + *out = new(types.RKEConfigNodePlan) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCApplyInput. -func (in *OIDCApplyInput) DeepCopy() *OIDCApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePlan. +func (in *NodePlan) DeepCopy() *NodePlan { if in == nil { return nil } - out := new(OIDCApplyInput) + out := new(NodePlan) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCConfig) DeepCopyInto(out *OIDCConfig) { +func (in *NodePool) DeepCopyInto(out *NodePool) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) - if in.GroupSearchEnabled != nil { - in, out := &in.GroupSearchEnabled, &out.GroupSearchEnabled - *out = new(bool) - **out = **in - } + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfig. -func (in *OIDCConfig) DeepCopy() *OIDCConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool. +func (in *NodePool) DeepCopy() *NodePool { if in == nil { return nil } - out := new(OIDCConfig) + out := new(NodePool) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCConfig) DeepCopyObject() runtime.Object { +func (in *NodePool) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6032,13 +4667,13 @@ func (in *OIDCConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCConfigList) DeepCopyInto(out *OIDCConfigList) { +func (in *NodePoolList) DeepCopyInto(out *NodePoolList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]OIDCConfig, len(*in)) + *out = make([]NodePool, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6046,18 +4681,18 @@ func (in *OIDCConfigList) DeepCopyInto(out *OIDCConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfigList. -func (in *OIDCConfigList) DeepCopy() *OIDCConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolList. +func (in *NodePoolList) DeepCopy() *NodePoolList { if in == nil { return nil } - out := new(OIDCConfigList) + out := new(NodePoolList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCConfigList) DeepCopyObject() runtime.Object { +func (in *NodePoolList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6065,185 +4700,233 @@ func (in *OIDCConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCLogin) DeepCopyInto(out *OIDCLogin) { +func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec) { *out = *in - out.GenericLogin = in.GenericLogin + if in.NodeLabels != nil { + in, out := &in.NodeLabels, &out.NodeLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.NodeAnnotations != nil { + in, out := &in.NodeAnnotations, &out.NodeAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.NodeTaints != nil { + in, out := &in.NodeTaints, &out.NodeTaints + *out = make([]corev1.Taint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCLogin. -func (in *OIDCLogin) DeepCopy() *OIDCLogin { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolSpec. +func (in *NodePoolSpec) DeepCopy() *NodePoolSpec { if in == nil { return nil } - out := new(OIDCLogin) + out := new(NodePoolSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) { +func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProvider. -func (in *OIDCProvider) DeepCopy() *OIDCProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolStatus. +func (in *NodePoolStatus) DeepCopy() *NodePoolStatus { if in == nil { return nil } - out := new(OIDCProvider) + out := new(NodePoolStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCProvider) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) { +func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCProvider, len(*in)) + if in.CustomConfig != nil { + in, out := &in.CustomConfig, &out.CustomConfig + *out = new(CustomConfig) + (*in).DeepCopyInto(*out) + } + in.InternalNodeSpec.DeepCopyInto(&out.InternalNodeSpec) + if in.DesiredNodeTaints != nil { + in, out := &in.DesiredNodeTaints, &out.DesiredNodeTaints + *out = make([]corev1.Taint, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UpdateTaintsFromAPI != nil { + in, out := &in.UpdateTaintsFromAPI, &out.UpdateTaintsFromAPI + *out = new(bool) + **out = **in + } + if in.NodeDrainInput != nil { + in, out := &in.NodeDrainInput, &out.NodeDrainInput + *out = new(types.NodeDrainInput) + (*in).DeepCopyInto(*out) + } + in.MetadataUpdate.DeepCopyInto(&out.MetadataUpdate) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderList. -func (in *OIDCProviderList) DeepCopy() *OIDCProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. +func (in *NodeSpec) DeepCopy() *NodeSpec { if in == nil { return nil } - out := new(OIDCProviderList) + out := new(NodeSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCProviderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCTestOutput) DeepCopyInto(out *OIDCTestOutput) { +func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCTestOutput. -func (in *OIDCTestOutput) DeepCopy() *OIDCTestOutput { - if in == nil { - return nil + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]NodeCondition, len(*in)) + copy(*out, *in) + } + in.InternalNodeStatus.DeepCopyInto(&out.InternalNodeStatus) + if in.Requested != nil { + in, out := &in.Requested, &out.Requested + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.NodeTemplateSpec != nil { + in, out := &in.NodeTemplateSpec, &out.NodeTemplateSpec + *out = new(NodeTemplateSpec) + (*in).DeepCopyInto(*out) + } + if in.NodeConfig != nil { + in, out := &in.NodeConfig, &out.NodeConfig + *out = new(types.RKEConfigNode) + (*in).DeepCopyInto(*out) + } + if in.NodeAnnotations != nil { + in, out := &in.NodeAnnotations, &out.NodeAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.NodeLabels != nil { + in, out := &in.NodeLabels, &out.NodeLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.NodeTaints != nil { + in, out := &in.NodeTaints, &out.NodeTaints + *out = make([]corev1.Taint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DockerInfo != nil { + in, out := &in.DockerInfo, &out.DockerInfo + *out = new(DockerInfo) + (*in).DeepCopyInto(*out) + } + if in.NodePlan != nil { + in, out := &in.NodePlan, &out.NodePlan + *out = new(NodePlan) + (*in).DeepCopyInto(*out) } - out := new(OIDCTestOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OKTAConfig) DeepCopyInto(out *OKTAConfig) { - *out = *in - in.SamlConfig.DeepCopyInto(&out.SamlConfig) - in.OpenLdapConfig.DeepCopyInto(&out.OpenLdapConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OKTAConfig. -func (in *OKTAConfig) DeepCopy() *OKTAConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. +func (in *NodeStatus) DeepCopy() *NodeStatus { if in == nil { return nil } - out := new(OKTAConfig) + out := new(NodeStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OKTAProvider) DeepCopyInto(out *OKTAProvider) { +func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate) { *out = *in - in.SamlProvider.DeepCopyInto(&out.SamlProvider) + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OKTAProvider. -func (in *OKTAProvider) DeepCopy() *OKTAProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplate. +func (in *NodeTemplate) DeepCopy() *NodeTemplate { if in == nil { return nil } - out := new(OKTAProvider) + out := new(NodeTemplate) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenLdapConfig) DeepCopyInto(out *OpenLdapConfig) { - *out = *in - in.LdapConfig.DeepCopyInto(&out.LdapConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapConfig. -func (in *OpenLdapConfig) DeepCopy() *OpenLdapConfig { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(OpenLdapConfig) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenLdapProvider) DeepCopyInto(out *OpenLdapProvider) { +func (in *NodeTemplateCondition) DeepCopyInto(out *NodeTemplateCondition) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapProvider. -func (in *OpenLdapProvider) DeepCopy() *OpenLdapProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateCondition. +func (in *NodeTemplateCondition) DeepCopy() *NodeTemplateCondition { if in == nil { return nil } - out := new(OpenLdapProvider) + out := new(NodeTemplateCondition) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenLdapProvider) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenLdapProviderList) DeepCopyInto(out *OpenLdapProviderList) { +func (in *NodeTemplateList) DeepCopyInto(out *NodeTemplateList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]OpenLdapProvider, len(*in)) + *out = make([]NodeTemplate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6251,18 +4934,18 @@ func (in *OpenLdapProviderList) DeepCopyInto(out *OpenLdapProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapProviderList. -func (in *OpenLdapProviderList) DeepCopy() *OpenLdapProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateList. +func (in *NodeTemplateList) DeepCopy() *NodeTemplateList { if in == nil { return nil } - out := new(OpenLdapProviderList) + out := new(NodeTemplateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenLdapProviderList) DeepCopyObject() runtime.Object { +func (in *NodeTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6270,138 +4953,141 @@ func (in *OpenLdapProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenLdapTestAndApplyInput) DeepCopyInto(out *OpenLdapTestAndApplyInput) { +func (in *NodeTemplateSpec) DeepCopyInto(out *NodeTemplateSpec) { *out = *in - in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) + if in.NodeTaints != nil { + in, out := &in.NodeTaints, &out.NodeTaints + *out = make([]corev1.Taint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.NodeCommonParams.DeepCopyInto(&out.NodeCommonParams) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapTestAndApplyInput. -func (in *OpenLdapTestAndApplyInput) DeepCopy() *OpenLdapTestAndApplyInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateSpec. +func (in *NodeTemplateSpec) DeepCopy() *NodeTemplateSpec { if in == nil { return nil } - out := new(OpenLdapTestAndApplyInput) + out := new(NodeTemplateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PingConfig) DeepCopyInto(out *PingConfig) { +func (in *NodeTemplateStatus) DeepCopyInto(out *NodeTemplateStatus) { *out = *in - in.SamlConfig.DeepCopyInto(&out.SamlConfig) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]NodeTemplateCondition, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingConfig. -func (in *PingConfig) DeepCopy() *PingConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplateStatus. +func (in *NodeTemplateStatus) DeepCopy() *NodeTemplateStatus { if in == nil { return nil } - out := new(PingConfig) + out := new(NodeTemplateStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PingProvider) DeepCopyInto(out *PingProvider) { +func (in *OAuthEndpoint) DeepCopyInto(out *OAuthEndpoint) { *out = *in - in.SamlProvider.DeepCopyInto(&out.SamlProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingProvider. -func (in *PingProvider) DeepCopy() *PingProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthEndpoint. +func (in *OAuthEndpoint) DeepCopy() *OAuthEndpoint { if in == nil { return nil } - out := new(PingProvider) + out := new(OAuthEndpoint) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplate) { +func (in *OAuthProvider) DeepCopyInto(out *OAuthProvider) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Configuration.DeepCopyInto(&out.Configuration) + if in.Scopes != nil { + in, out := &in.Scopes, &out.Scopes + *out = make([]string, len(*in)) + copy(*out, *in) + } + out.OAuthEndpoint = in.OAuthEndpoint return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplate. -func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopy() *PodSecurityAdmissionConfigurationTemplate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthProvider. +func (in *OAuthProvider) DeepCopy() *OAuthProvider { if in == nil { return nil } - out := new(PodSecurityAdmissionConfigurationTemplate) + out := new(OAuthProvider) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityAdmissionConfigurationTemplateDefaults) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateDefaults) { +func (in *OIDCApplyInput) DeepCopyInto(out *OIDCApplyInput) { *out = *in + in.OIDCConfig.DeepCopyInto(&out.OIDCConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateDefaults. -func (in *PodSecurityAdmissionConfigurationTemplateDefaults) DeepCopy() *PodSecurityAdmissionConfigurationTemplateDefaults { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCApplyInput. +func (in *OIDCApplyInput) DeepCopy() *OIDCApplyInput { if in == nil { return nil } - out := new(PodSecurityAdmissionConfigurationTemplateDefaults) + out := new(OIDCApplyInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityAdmissionConfigurationTemplateExemptions) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateExemptions) { +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { *out = *in - if in.Usernames != nil { - in, out := &in.Usernames, &out.Usernames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.RuntimeClasses != nil { - in, out := &in.RuntimeClasses, &out.RuntimeClasses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateExemptions. -func (in *PodSecurityAdmissionConfigurationTemplateExemptions) DeepCopy() *PodSecurityAdmissionConfigurationTemplateExemptions { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { if in == nil { return nil } - out := new(PodSecurityAdmissionConfigurationTemplateExemptions) + out := new(OIDCClient) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateList) { +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]PodSecurityAdmissionConfigurationTemplate, len(*in)) + *out = make([]OIDCClient, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6409,18 +5095,18 @@ func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyInto(out *PodSe return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateList. -func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopy() *PodSecurityAdmissionConfigurationTemplateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { if in == nil { return nil } - out := new(PodSecurityAdmissionConfigurationTemplateList) + out := new(OIDCClientList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyObject() runtime.Object { +func (in *OIDCClientList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6428,110 +5114,89 @@ func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyObject() runtim } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityAdmissionConfigurationTemplateSpec) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateSpec) { +func (in *OIDCClientSecretStatus) DeepCopyInto(out *OIDCClientSecretStatus) { *out = *in - out.Defaults = in.Defaults - in.Exemptions.DeepCopyInto(&out.Exemptions) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateSpec. -func (in *PodSecurityAdmissionConfigurationTemplateSpec) DeepCopy() *PodSecurityAdmissionConfigurationTemplateSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretStatus. +func (in *OIDCClientSecretStatus) DeepCopy() *OIDCClientSecretStatus { if in == nil { return nil } - out := new(PodSecurityAdmissionConfigurationTemplateSpec) + out := new(OIDCClientSecretStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Preference) DeepCopyInto(out *Preference) { +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.RedirectURIs != nil { + in, out := &in.RedirectURIs, &out.RedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preference. -func (in *Preference) DeepCopy() *Preference { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { if in == nil { return nil } - out := new(Preference) + out := new(OIDCClientSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Preference) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PreferenceList) DeepCopyInto(out *PreferenceList) { +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Preference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if in.ClientSecrets != nil { + in, out := &in.ClientSecrets, &out.ClientSecrets + *out = make(map[string]OIDCClientSecretStatus, len(*in)) + for key, val := range *in { + (*out)[key] = val } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreferenceList. -func (in *PreferenceList) DeepCopy() *PreferenceList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { if in == nil { return nil } - out := new(PreferenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PreferenceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Principal) DeepCopyInto(out *Principal) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ExtraInfo != nil { - in, out := &in.ExtraInfo, &out.ExtraInfo - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCConfig) DeepCopyInto(out *OIDCConfig) { + *out = *in + in.AuthConfig.DeepCopyInto(&out.AuthConfig) + if in.GroupSearchEnabled != nil { + in, out := &in.GroupSearchEnabled, &out.GroupSearchEnabled + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principal. -func (in *Principal) DeepCopy() *Principal { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfig. +func (in *OIDCConfig) DeepCopy() *OIDCConfig { if in == nil { return nil } - out := new(Principal) + out := new(OIDCConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Principal) DeepCopyObject() runtime.Object { +func (in *OIDCConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6539,13 +5204,13 @@ func (in *Principal) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrincipalList) DeepCopyInto(out *PrincipalList) { +func (in *OIDCConfigList) DeepCopyInto(out *OIDCConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Principal, len(*in)) + *out = make([]OIDCConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6553,18 +5218,18 @@ func (in *PrincipalList) DeepCopyInto(out *PrincipalList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrincipalList. -func (in *PrincipalList) DeepCopy() *PrincipalList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfigList. +func (in *OIDCConfigList) DeepCopy() *OIDCConfigList { if in == nil { return nil } - out := new(PrincipalList) + out := new(OIDCConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PrincipalList) DeepCopyObject() runtime.Object { +func (in *OIDCConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6572,51 +5237,43 @@ func (in *PrincipalList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Principals) DeepCopyInto(out *Principals) { +func (in *OIDCLogin) DeepCopyInto(out *OIDCLogin) { *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Principal, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + out.GenericLogin = in.GenericLogin return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principals. -func (in *Principals) DeepCopy() *Principals { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCLogin. +func (in *OIDCLogin) DeepCopy() *OIDCLogin { if in == nil { return nil } - out := new(Principals) + out := new(OIDCLogin) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Project) DeepCopyInto(out *Project) { +func (in *OIDCProvider) DeepCopyInto(out *OIDCProvider) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. -func (in *Project) DeepCopy() *Project { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProvider. +func (in *OIDCProvider) DeepCopy() *OIDCProvider { if in == nil { return nil } - out := new(Project) + out := new(OIDCProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Project) DeepCopyObject() runtime.Object { +func (in *OIDCProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6624,25 +5281,32 @@ func (in *Project) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectCatalog) DeepCopyInto(out *ProjectCatalog) { +func (in *OIDCProviderList) DeepCopyInto(out *OIDCProviderList) { *out = *in - out.Namespaced = in.Namespaced - in.Catalog.DeepCopyInto(&out.Catalog) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCatalog. -func (in *ProjectCatalog) DeepCopy() *ProjectCatalog { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCProviderList. +func (in *OIDCProviderList) DeepCopy() *OIDCProviderList { if in == nil { return nil } - out := new(ProjectCatalog) + out := new(OIDCProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectCatalog) DeepCopyObject() runtime.Object { +func (in *OIDCProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6650,110 +5314,94 @@ func (in *ProjectCatalog) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectCatalogList) DeepCopyInto(out *ProjectCatalogList) { +func (in *OIDCTestOutput) DeepCopyInto(out *OIDCTestOutput) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ProjectCatalog, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCatalogList. -func (in *ProjectCatalogList) DeepCopy() *ProjectCatalogList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCTestOutput. +func (in *OIDCTestOutput) DeepCopy() *OIDCTestOutput { if in == nil { return nil } - out := new(ProjectCatalogList) + out := new(OIDCTestOutput) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectCatalogList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectCondition) DeepCopyInto(out *ProjectCondition) { +func (in *OKTAConfig) DeepCopyInto(out *OKTAConfig) { *out = *in + in.SamlConfig.DeepCopyInto(&out.SamlConfig) + in.OpenLdapConfig.DeepCopyInto(&out.OpenLdapConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCondition. -func (in *ProjectCondition) DeepCopy() *ProjectCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OKTAConfig. +func (in *OKTAConfig) DeepCopy() *OKTAConfig { if in == nil { return nil } - out := new(ProjectCondition) + out := new(OKTAConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectList) DeepCopyInto(out *ProjectList) { +func (in *OKTAProvider) DeepCopyInto(out *OKTAProvider) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Project, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.SamlProvider.DeepCopyInto(&out.SamlProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. -func (in *ProjectList) DeepCopy() *ProjectList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OKTAProvider. +func (in *OKTAProvider) DeepCopy() *OKTAProvider { if in == nil { return nil } - out := new(ProjectList) + out := new(OKTAProvider) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenLdapConfig) DeepCopyInto(out *OpenLdapConfig) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapConfig. +func (in *OpenLdapConfig) DeepCopy() *OpenLdapConfig { + if in == nil { + return nil } - return nil + out := new(OpenLdapConfig) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectLogging) DeepCopyInto(out *ProjectLogging) { +func (in *OpenLdapProvider) DeepCopyInto(out *OpenLdapProvider) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectLogging. -func (in *ProjectLogging) DeepCopy() *ProjectLogging { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapProvider. +func (in *OpenLdapProvider) DeepCopy() *OpenLdapProvider { if in == nil { return nil } - out := new(ProjectLogging) + out := new(OpenLdapProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectLogging) DeepCopyObject() runtime.Object { +func (in *OpenLdapProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6761,13 +5409,13 @@ func (in *ProjectLogging) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectLoggingList) DeepCopyInto(out *ProjectLoggingList) { +func (in *OpenLdapProviderList) DeepCopyInto(out *OpenLdapProviderList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ProjectLogging, len(*in)) + *out = make([]OpenLdapProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6775,18 +5423,18 @@ func (in *ProjectLoggingList) DeepCopyInto(out *ProjectLoggingList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectLoggingList. -func (in *ProjectLoggingList) DeepCopy() *ProjectLoggingList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapProviderList. +func (in *OpenLdapProviderList) DeepCopy() *OpenLdapProviderList { if in == nil { return nil } - out := new(ProjectLoggingList) + out := new(OpenLdapProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectLoggingList) DeepCopyObject() runtime.Object { +func (in *OpenLdapProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6794,72 +5442,93 @@ func (in *ProjectLoggingList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectLoggingSpec) DeepCopyInto(out *ProjectLoggingSpec) { +func (in *OpenLdapTestAndApplyInput) DeepCopyInto(out *OpenLdapTestAndApplyInput) { *out = *in - in.LoggingTargets.DeepCopyInto(&out.LoggingTargets) - in.LoggingCommonField.DeepCopyInto(&out.LoggingCommonField) + in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectLoggingSpec. -func (in *ProjectLoggingSpec) DeepCopy() *ProjectLoggingSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapTestAndApplyInput. +func (in *OpenLdapTestAndApplyInput) DeepCopy() *OpenLdapTestAndApplyInput { if in == nil { return nil } - out := new(ProjectLoggingSpec) + out := new(OpenLdapTestAndApplyInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectLoggingStatus) DeepCopyInto(out *ProjectLoggingStatus) { +func (in *PingConfig) DeepCopyInto(out *PingConfig) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]LoggingCondition, len(*in)) - copy(*out, *in) + in.SamlConfig.DeepCopyInto(&out.SamlConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingConfig. +func (in *PingConfig) DeepCopy() *PingConfig { + if in == nil { + return nil } - in.AppliedSpec.DeepCopyInto(&out.AppliedSpec) + out := new(PingConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PingProvider) DeepCopyInto(out *PingProvider) { + *out = *in + in.SamlProvider.DeepCopyInto(&out.SamlProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectLoggingStatus. -func (in *ProjectLoggingStatus) DeepCopy() *ProjectLoggingStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PingProvider. +func (in *PingProvider) DeepCopy() *PingProvider { if in == nil { return nil } - out := new(ProjectLoggingStatus) + out := new(PingProvider) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectNetworkPolicy) DeepCopyInto(out *ProjectNetworkPolicy) { +func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec. +func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec { + if in == nil { + return nil + } + out := new(PodDisruptionBudgetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplate) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(ProjectNetworkPolicyStatus) - **out = **in - } + in.Configuration.DeepCopyInto(&out.Configuration) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicy. -func (in *ProjectNetworkPolicy) DeepCopy() *ProjectNetworkPolicy { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplate. +func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopy() *PodSecurityAdmissionConfigurationTemplate { if in == nil { return nil } - out := new(ProjectNetworkPolicy) + out := new(PodSecurityAdmissionConfigurationTemplate) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectNetworkPolicy) DeepCopyObject() runtime.Object { +func (in *PodSecurityAdmissionConfigurationTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6867,90 +5536,105 @@ func (in *ProjectNetworkPolicy) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectNetworkPolicyList) DeepCopyInto(out *ProjectNetworkPolicyList) { +func (in *PodSecurityAdmissionConfigurationTemplateDefaults) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateDefaults) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ProjectNetworkPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicyList. -func (in *ProjectNetworkPolicyList) DeepCopy() *ProjectNetworkPolicyList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateDefaults. +func (in *PodSecurityAdmissionConfigurationTemplateDefaults) DeepCopy() *PodSecurityAdmissionConfigurationTemplateDefaults { if in == nil { return nil } - out := new(ProjectNetworkPolicyList) + out := new(PodSecurityAdmissionConfigurationTemplateDefaults) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectNetworkPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSecurityAdmissionConfigurationTemplateExemptions) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateExemptions) { + *out = *in + if in.Usernames != nil { + in, out := &in.Usernames, &out.Usernames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RuntimeClasses != nil { + in, out := &in.RuntimeClasses, &out.RuntimeClasses + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectNetworkPolicySpec) DeepCopyInto(out *ProjectNetworkPolicySpec) { - *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicySpec. -func (in *ProjectNetworkPolicySpec) DeepCopy() *ProjectNetworkPolicySpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateExemptions. +func (in *PodSecurityAdmissionConfigurationTemplateExemptions) DeepCopy() *PodSecurityAdmissionConfigurationTemplateExemptions { if in == nil { return nil } - out := new(ProjectNetworkPolicySpec) + out := new(PodSecurityAdmissionConfigurationTemplateExemptions) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectNetworkPolicyStatus) DeepCopyInto(out *ProjectNetworkPolicyStatus) { +func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateList) { *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodSecurityAdmissionConfigurationTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicyStatus. -func (in *ProjectNetworkPolicyStatus) DeepCopy() *ProjectNetworkPolicyStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateList. +func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopy() *PodSecurityAdmissionConfigurationTemplateList { if in == nil { return nil } - out := new(ProjectNetworkPolicyStatus) + out := new(PodSecurityAdmissionConfigurationTemplateList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodSecurityAdmissionConfigurationTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectResourceQuota) DeepCopyInto(out *ProjectResourceQuota) { +func (in *PodSecurityAdmissionConfigurationTemplateSpec) DeepCopyInto(out *PodSecurityAdmissionConfigurationTemplateSpec) { *out = *in - out.Limit = in.Limit - out.UsedLimit = in.UsedLimit + out.Defaults = in.Defaults + in.Exemptions.DeepCopyInto(&out.Exemptions) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectResourceQuota. -func (in *ProjectResourceQuota) DeepCopy() *ProjectResourceQuota { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityAdmissionConfigurationTemplateSpec. +func (in *PodSecurityAdmissionConfigurationTemplateSpec) DeepCopy() *PodSecurityAdmissionConfigurationTemplateSpec { if in == nil { return nil } - out := new(ProjectResourceQuota) + out := new(PodSecurityAdmissionConfigurationTemplateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectRoleTemplateBinding) DeepCopyInto(out *ProjectRoleTemplateBinding) { +func (in *Preference) DeepCopyInto(out *Preference) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta @@ -6958,18 +5642,18 @@ func (in *ProjectRoleTemplateBinding) DeepCopyInto(out *ProjectRoleTemplateBindi return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBinding. -func (in *ProjectRoleTemplateBinding) DeepCopy() *ProjectRoleTemplateBinding { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preference. +func (in *Preference) DeepCopy() *Preference { if in == nil { return nil } - out := new(ProjectRoleTemplateBinding) + out := new(Preference) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectRoleTemplateBinding) DeepCopyObject() runtime.Object { +func (in *Preference) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -6977,13 +5661,13 @@ func (in *ProjectRoleTemplateBinding) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectRoleTemplateBindingList) DeepCopyInto(out *ProjectRoleTemplateBindingList) { +func (in *PreferenceList) DeepCopyInto(out *PreferenceList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ProjectRoleTemplateBinding, len(*in)) + *out = make([]Preference, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -6991,18 +5675,18 @@ func (in *ProjectRoleTemplateBindingList) DeepCopyInto(out *ProjectRoleTemplateB return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBindingList. -func (in *ProjectRoleTemplateBindingList) DeepCopy() *ProjectRoleTemplateBindingList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreferenceList. +func (in *PreferenceList) DeepCopy() *PreferenceList { if in == nil { return nil } - out := new(ProjectRoleTemplateBindingList) + out := new(PreferenceList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectRoleTemplateBindingList) DeepCopyObject() runtime.Object { +func (in *PreferenceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7010,113 +5694,77 @@ func (in *ProjectRoleTemplateBindingList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { +func (in *Principal) DeepCopyInto(out *Principal) { *out = *in - if in.ResourceQuota != nil { - in, out := &in.ResourceQuota, &out.ResourceQuota - *out = new(ProjectResourceQuota) - **out = **in - } - if in.NamespaceDefaultResourceQuota != nil { - in, out := &in.NamespaceDefaultResourceQuota, &out.NamespaceDefaultResourceQuota - *out = new(NamespaceResourceQuota) - **out = **in - } - if in.ContainerDefaultResourceLimit != nil { - in, out := &in.ContainerDefaultResourceLimit, &out.ContainerDefaultResourceLimit - *out = new(ContainerResourceLimit) - **out = **in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.ExtraInfo != nil { + in, out := &in.ExtraInfo, &out.ExtraInfo + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. -func (in *ProjectSpec) DeepCopy() *ProjectSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principal. +func (in *Principal) DeepCopy() *Principal { if in == nil { return nil } - out := new(ProjectSpec) + out := new(Principal) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ProjectCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. -func (in *ProjectStatus) DeepCopy() *ProjectStatus { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Principal) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(ProjectStatus) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectTestInput) DeepCopyInto(out *ProjectTestInput) { +func (in *PrincipalList) DeepCopyInto(out *PrincipalList) { *out = *in - in.LoggingTargets.DeepCopyInto(&out.LoggingTargets) - if in.OutputTags != nil { - in, out := &in.OutputTags, &out.OutputTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Principal, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTestInput. -func (in *ProjectTestInput) DeepCopy() *ProjectTestInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrincipalList. +func (in *PrincipalList) DeepCopy() *PrincipalList { if in == nil { return nil } - out := new(ProjectTestInput) + out := new(PrincipalList) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PublicEndpoint) DeepCopyInto(out *PublicEndpoint) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicEndpoint. -func (in *PublicEndpoint) DeepCopy() *PublicEndpoint { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PrincipalList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(PublicEndpoint) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Question) DeepCopyInto(out *Question) { +func (in *Principals) DeepCopyInto(out *Principals) { *out = *in - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Subquestions != nil { - in, out := &in.Subquestions, &out.Subquestions - *out = make([]SubQuestion, len(*in)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Principal, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7124,69 +5772,60 @@ func (in *Question) DeepCopyInto(out *Question) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Question. -func (in *Question) DeepCopy() *Question { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principals. +func (in *Principals) DeepCopy() *Principals { if in == nil { return nil } - out := new(Question) + out := new(Principals) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RancherUserNotification) DeepCopyInto(out *RancherUserNotification) { +func (in *PriorityClassSpec) DeepCopyInto(out *PriorityClassSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.PreemptionPolicy != nil { + in, out := &in.PreemptionPolicy, &out.PreemptionPolicy + *out = new(corev1.PreemptionPolicy) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RancherUserNotification. -func (in *RancherUserNotification) DeepCopy() *RancherUserNotification { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassSpec. +func (in *PriorityClassSpec) DeepCopy() *PriorityClassSpec { if in == nil { return nil } - out := new(RancherUserNotification) + out := new(PriorityClassSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RancherUserNotification) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RancherUserNotificationList) DeepCopyInto(out *RancherUserNotificationList) { +func (in *Project) DeepCopyInto(out *Project) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RancherUserNotification, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RancherUserNotificationList. -func (in *RancherUserNotificationList) DeepCopy() *RancherUserNotificationList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { if in == nil { return nil } - out := new(RancherUserNotificationList) + out := new(Project) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RancherUserNotificationList) DeepCopyObject() runtime.Object { +func (in *Project) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7194,75 +5833,81 @@ func (in *RancherUserNotificationList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaLimit) DeepCopyInto(out *ResourceQuotaLimit) { +func (in *ProjectCondition) DeepCopyInto(out *ProjectCondition) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaLimit. -func (in *ResourceQuotaLimit) DeepCopy() *ResourceQuotaLimit { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectCondition. +func (in *ProjectCondition) DeepCopy() *ProjectCondition { if in == nil { return nil } - out := new(ResourceQuotaLimit) + out := new(ProjectCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RestoreFromEtcdBackupInput) DeepCopyInto(out *RestoreFromEtcdBackupInput) { +func (in *ProjectList) DeepCopyInto(out *ProjectList) { *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreFromEtcdBackupInput. -func (in *RestoreFromEtcdBackupInput) DeepCopy() *RestoreFromEtcdBackupInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { if in == nil { return nil } - out := new(RestoreFromEtcdBackupInput) + out := new(ProjectList) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Rke2Config) DeepCopyInto(out *Rke2Config) { - *out = *in - out.ClusterUpgradeStrategy = in.ClusterUpgradeStrategy - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rke2Config. -func (in *Rke2Config) DeepCopy() *Rke2Config { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(Rke2Config) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeAddon) DeepCopyInto(out *RkeAddon) { +func (in *ProjectNetworkPolicy) DeepCopyInto(out *ProjectNetworkPolicy) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ProjectNetworkPolicyStatus) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddon. -func (in *RkeAddon) DeepCopy() *RkeAddon { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicy. +func (in *ProjectNetworkPolicy) DeepCopy() *ProjectNetworkPolicy { if in == nil { return nil } - out := new(RkeAddon) + out := new(ProjectNetworkPolicy) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeAddon) DeepCopyObject() runtime.Object { +func (in *ProjectNetworkPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7270,13 +5915,13 @@ func (in *RkeAddon) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeAddonList) DeepCopyInto(out *RkeAddonList) { +func (in *ProjectNetworkPolicyList) DeepCopyInto(out *ProjectNetworkPolicyList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]RkeAddon, len(*in)) + *out = make([]ProjectNetworkPolicy, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7284,18 +5929,18 @@ func (in *RkeAddonList) DeepCopyInto(out *RkeAddonList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddonList. -func (in *RkeAddonList) DeepCopy() *RkeAddonList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicyList. +func (in *ProjectNetworkPolicyList) DeepCopy() *ProjectNetworkPolicyList { if in == nil { return nil } - out := new(RkeAddonList) + out := new(ProjectNetworkPolicyList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeAddonList) DeepCopyObject() runtime.Object { +func (in *ProjectNetworkPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7303,88 +5948,76 @@ func (in *RkeAddonList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeK8sServiceOption) DeepCopyInto(out *RkeK8sServiceOption) { +func (in *ProjectNetworkPolicySpec) DeepCopyInto(out *ProjectNetworkPolicySpec) { *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOption. -func (in *RkeK8sServiceOption) DeepCopy() *RkeK8sServiceOption { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicySpec. +func (in *ProjectNetworkPolicySpec) DeepCopy() *ProjectNetworkPolicySpec { if in == nil { return nil } - out := new(RkeK8sServiceOption) + out := new(ProjectNetworkPolicySpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeK8sServiceOption) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeK8sServiceOptionList) DeepCopyInto(out *RkeK8sServiceOptionList) { +func (in *ProjectNetworkPolicyStatus) DeepCopyInto(out *ProjectNetworkPolicyStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RkeK8sServiceOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOptionList. -func (in *RkeK8sServiceOptionList) DeepCopy() *RkeK8sServiceOptionList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectNetworkPolicyStatus. +func (in *ProjectNetworkPolicyStatus) DeepCopy() *ProjectNetworkPolicyStatus { if in == nil { return nil } - out := new(RkeK8sServiceOptionList) + out := new(ProjectNetworkPolicyStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeK8sServiceOptionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectResourceQuota) DeepCopyInto(out *ProjectResourceQuota) { + *out = *in + out.Limit = in.Limit + out.UsedLimit = in.UsedLimit + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectResourceQuota. +func (in *ProjectResourceQuota) DeepCopy() *ProjectResourceQuota { + if in == nil { + return nil } - return nil + out := new(ProjectResourceQuota) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeK8sSystemImage) DeepCopyInto(out *RkeK8sSystemImage) { +func (in *ProjectRoleTemplateBinding) DeepCopyInto(out *ProjectRoleTemplateBinding) { *out = *in out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SystemImages = in.SystemImages return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImage. -func (in *RkeK8sSystemImage) DeepCopy() *RkeK8sSystemImage { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBinding. +func (in *ProjectRoleTemplateBinding) DeepCopy() *ProjectRoleTemplateBinding { if in == nil { return nil } - out := new(RkeK8sSystemImage) + out := new(ProjectRoleTemplateBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeK8sSystemImage) DeepCopyObject() runtime.Object { +func (in *ProjectRoleTemplateBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7392,13 +6025,13 @@ func (in *RkeK8sSystemImage) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RkeK8sSystemImageList) DeepCopyInto(out *RkeK8sSystemImageList) { +func (in *ProjectRoleTemplateBindingList) DeepCopyInto(out *ProjectRoleTemplateBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]RkeK8sSystemImage, len(*in)) + *out = make([]ProjectRoleTemplateBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7406,18 +6039,18 @@ func (in *RkeK8sSystemImageList) DeepCopyInto(out *RkeK8sSystemImageList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImageList. -func (in *RkeK8sSystemImageList) DeepCopy() *RkeK8sSystemImageList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBindingList. +func (in *ProjectRoleTemplateBindingList) DeepCopy() *ProjectRoleTemplateBindingList { if in == nil { return nil } - out := new(RkeK8sSystemImageList) + out := new(ProjectRoleTemplateBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RkeK8sSystemImageList) DeepCopyObject() runtime.Object { +func (in *ProjectRoleTemplateBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7425,210 +6058,235 @@ func (in *RkeK8sSystemImageList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbacv1.PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.ResourceQuota != nil { + in, out := &in.ResourceQuota, &out.ResourceQuota + *out = new(ProjectResourceQuota) + **out = **in } - if in.ExternalRules != nil { - in, out := &in.ExternalRules, &out.ExternalRules - *out = make([]rbacv1.PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.NamespaceDefaultResourceQuota != nil { + in, out := &in.NamespaceDefaultResourceQuota, &out.NamespaceDefaultResourceQuota + *out = new(NamespaceResourceQuota) + **out = **in } - if in.RoleTemplateNames != nil { - in, out := &in.RoleTemplateNames, &out.RoleTemplateNames - *out = make([]string, len(*in)) - copy(*out, *in) + if in.ContainerDefaultResourceLimit != nil { + in, out := &in.ContainerDefaultResourceLimit, &out.ContainerDefaultResourceLimit + *out = new(ContainerResourceLimit) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplate. -func (in *RoleTemplate) DeepCopy() *RoleTemplate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { if in == nil { return nil } - out := new(RoleTemplate) + out := new(ProjectSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleTemplateList) DeepCopyInto(out *RoleTemplateList) { +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RoleTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ProjectCondition, len(*in)) + copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplateList. -func (in *RoleTemplateList) DeepCopy() *RoleTemplateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { if in == nil { return nil } - out := new(RoleTemplateList) + out := new(ProjectStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RollingUpdate) DeepCopyInto(out *RollingUpdate) { +func (in *PublicEndpoint) DeepCopyInto(out *PublicEndpoint) { *out = *in + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdate. -func (in *RollingUpdate) DeepCopy() *RollingUpdate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicEndpoint. +func (in *PublicEndpoint) DeepCopy() *PublicEndpoint { if in == nil { return nil } - out := new(RollingUpdate) + out := new(PublicEndpoint) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RotateCertificateInput) DeepCopyInto(out *RotateCertificateInput) { +func (in *Question) DeepCopyInto(out *Question) { *out = *in - if in.Services != nil { - in, out := &in.Services, &out.Services + if in.Options != nil { + in, out := &in.Options, &out.Options *out = make([]string, len(*in)) copy(*out, *in) } + if in.Subquestions != nil { + in, out := &in.Subquestions, &out.Subquestions + *out = make([]SubQuestion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateCertificateInput. -func (in *RotateCertificateInput) DeepCopy() *RotateCertificateInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Question. +func (in *Question) DeepCopy() *Question { if in == nil { return nil } - out := new(RotateCertificateInput) + out := new(Question) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RotateCertificateOutput) DeepCopyInto(out *RotateCertificateOutput) { +func (in *RancherUserNotification) DeepCopyInto(out *RancherUserNotification) { *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateCertificateOutput. -func (in *RotateCertificateOutput) DeepCopy() *RotateCertificateOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RancherUserNotification. +func (in *RancherUserNotification) DeepCopy() *RancherUserNotification { + if in == nil { + return nil + } + out := new(RancherUserNotification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RancherUserNotification) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RancherUserNotificationList) DeepCopyInto(out *RancherUserNotificationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RancherUserNotification, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RancherUserNotificationList. +func (in *RancherUserNotificationList) DeepCopy() *RancherUserNotificationList { if in == nil { return nil } - out := new(RotateCertificateOutput) + out := new(RancherUserNotificationList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RancherUserNotificationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RotateEncryptionKeyOutput) DeepCopyInto(out *RotateEncryptionKeyOutput) { +func (in *ResourceQuotaLimit) DeepCopyInto(out *ResourceQuotaLimit) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateEncryptionKeyOutput. -func (in *RotateEncryptionKeyOutput) DeepCopy() *RotateEncryptionKeyOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaLimit. +func (in *ResourceQuotaLimit) DeepCopy() *ResourceQuotaLimit { if in == nil { return nil } - out := new(RotateEncryptionKeyOutput) + out := new(ResourceQuotaLimit) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route53ProviderConfig) DeepCopyInto(out *Route53ProviderConfig) { +func (in *RestoreFromEtcdBackupInput) DeepCopyInto(out *RestoreFromEtcdBackupInput) { *out = *in - if in.AdditionalOptions != nil { - in, out := &in.AdditionalOptions, &out.AdditionalOptions - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route53ProviderConfig. -func (in *Route53ProviderConfig) DeepCopy() *Route53ProviderConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreFromEtcdBackupInput. +func (in *RestoreFromEtcdBackupInput) DeepCopy() *RestoreFromEtcdBackupInput { if in == nil { return nil } - out := new(Route53ProviderConfig) + out := new(RestoreFromEtcdBackupInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *S3CredentialConfig) DeepCopyInto(out *S3CredentialConfig) { +func (in *Rke2Config) DeepCopyInto(out *Rke2Config) { *out = *in + out.ClusterUpgradeStrategy = in.ClusterUpgradeStrategy return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3CredentialConfig. -func (in *S3CredentialConfig) DeepCopy() *S3CredentialConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rke2Config. +func (in *Rke2Config) DeepCopy() *Rke2Config { if in == nil { return nil } - out := new(S3CredentialConfig) + out := new(Rke2Config) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlConfig) DeepCopyInto(out *SamlConfig) { +func (in *RkeAddon) DeepCopyInto(out *RkeAddon) { *out = *in - in.AuthConfig.DeepCopyInto(&out.AuthConfig) + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfig. -func (in *SamlConfig) DeepCopy() *SamlConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddon. +func (in *RkeAddon) DeepCopy() *RkeAddon { if in == nil { return nil } - out := new(SamlConfig) + out := new(RkeAddon) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlConfig) DeepCopyObject() runtime.Object { +func (in *RkeAddon) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7636,13 +6294,13 @@ func (in *SamlConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlConfigList) DeepCopyInto(out *SamlConfigList) { +func (in *RkeAddonList) DeepCopyInto(out *RkeAddonList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]SamlConfig, len(*in)) + *out = make([]RkeAddon, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7650,18 +6308,18 @@ func (in *SamlConfigList) DeepCopyInto(out *SamlConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigList. -func (in *SamlConfigList) DeepCopy() *SamlConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddonList. +func (in *RkeAddonList) DeepCopy() *RkeAddonList { if in == nil { return nil } - out := new(SamlConfigList) + out := new(RkeAddonList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlConfigList) DeepCopyObject() runtime.Object { +func (in *RkeAddonList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7669,90 +6327,88 @@ func (in *SamlConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlConfigTestInput) DeepCopyInto(out *SamlConfigTestInput) { +func (in *RkeK8sServiceOption) DeepCopyInto(out *RkeK8sServiceOption) { *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigTestInput. -func (in *SamlConfigTestInput) DeepCopy() *SamlConfigTestInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOption. +func (in *RkeK8sServiceOption) DeepCopy() *RkeK8sServiceOption { if in == nil { return nil } - out := new(SamlConfigTestInput) + out := new(RkeK8sServiceOption) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlConfigTestOutput) DeepCopyInto(out *SamlConfigTestOutput) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigTestOutput. -func (in *SamlConfigTestOutput) DeepCopy() *SamlConfigTestOutput { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOption) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(SamlConfigTestOutput) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlLoginInput) DeepCopyInto(out *SamlLoginInput) { +func (in *RkeK8sServiceOptionList) DeepCopyInto(out *RkeK8sServiceOptionList) { *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeK8sServiceOption, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlLoginInput. -func (in *SamlLoginInput) DeepCopy() *SamlLoginInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOptionList. +func (in *RkeK8sServiceOptionList) DeepCopy() *RkeK8sServiceOptionList { if in == nil { return nil } - out := new(SamlLoginInput) + out := new(RkeK8sServiceOptionList) in.DeepCopyInto(out) return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlLoginOutput) DeepCopyInto(out *SamlLoginOutput) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlLoginOutput. -func (in *SamlLoginOutput) DeepCopy() *SamlLoginOutput { - if in == nil { - return nil +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOptionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c } - out := new(SamlLoginOutput) - in.DeepCopyInto(out) - return out + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlProvider) DeepCopyInto(out *SamlProvider) { +func (in *RkeK8sSystemImage) DeepCopyInto(out *RkeK8sSystemImage) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AuthProvider.DeepCopyInto(&out.AuthProvider) + out.SystemImages = in.SystemImages return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlProvider. -func (in *SamlProvider) DeepCopy() *SamlProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImage. +func (in *RkeK8sSystemImage) DeepCopy() *RkeK8sSystemImage { if in == nil { return nil } - out := new(SamlProvider) + out := new(RkeK8sSystemImage) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlProvider) DeepCopyObject() runtime.Object { +func (in *RkeK8sSystemImage) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7760,13 +6416,13 @@ func (in *SamlProvider) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlProviderList) DeepCopyInto(out *SamlProviderList) { +func (in *RkeK8sSystemImageList) DeepCopyInto(out *RkeK8sSystemImageList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]SamlProvider, len(*in)) + *out = make([]RkeK8sSystemImage, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7774,18 +6430,18 @@ func (in *SamlProviderList) DeepCopyInto(out *SamlProviderList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlProviderList. -func (in *SamlProviderList) DeepCopy() *SamlProviderList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImageList. +func (in *RkeK8sSystemImageList) DeepCopy() *RkeK8sSystemImageList { if in == nil { return nil } - out := new(SamlProviderList) + out := new(RkeK8sSystemImageList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlProviderList) DeepCopyObject() runtime.Object { +func (in *RkeK8sSystemImageList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7793,26 +6449,44 @@ func (in *SamlProviderList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlToken) DeepCopyInto(out *SamlToken) { +func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { *out = *in - out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExternalRules != nil { + in, out := &in.ExternalRules, &out.ExternalRules + *out = make([]rbacv1.PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RoleTemplateNames != nil { + in, out := &in.RoleTemplateNames, &out.RoleTemplateNames + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlToken. -func (in *SamlToken) DeepCopy() *SamlToken { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplate. +func (in *RoleTemplate) DeepCopy() *RoleTemplate { if in == nil { return nil } - out := new(SamlToken) + out := new(RoleTemplate) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlToken) DeepCopyObject() runtime.Object { +func (in *RoleTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7820,13 +6494,13 @@ func (in *SamlToken) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SamlTokenList) DeepCopyInto(out *SamlTokenList) { +func (in *RoleTemplateList) DeepCopyInto(out *RoleTemplateList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]SamlToken, len(*in)) + *out = make([]RoleTemplate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7834,18 +6508,18 @@ func (in *SamlTokenList) DeepCopyInto(out *SamlTokenList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlTokenList. -func (in *SamlTokenList) DeepCopy() *SamlTokenList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplateList. +func (in *RoleTemplateList) DeepCopy() *RoleTemplateList { if in == nil { return nil } - out := new(SamlTokenList) + out := new(RoleTemplateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SamlTokenList) DeepCopyObject() runtime.Object { +func (in *RoleTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7853,89 +6527,93 @@ func (in *SamlTokenList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SaveAsTemplateInput) DeepCopyInto(out *SaveAsTemplateInput) { +func (in *RotateCertificateInput) DeepCopyInto(out *RotateCertificateInput) { *out = *in + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SaveAsTemplateInput. -func (in *SaveAsTemplateInput) DeepCopy() *SaveAsTemplateInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateCertificateInput. +func (in *RotateCertificateInput) DeepCopy() *RotateCertificateInput { if in == nil { return nil } - out := new(SaveAsTemplateInput) + out := new(RotateCertificateInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SaveAsTemplateOutput) DeepCopyInto(out *SaveAsTemplateOutput) { +func (in *RotateCertificateOutput) DeepCopyInto(out *RotateCertificateOutput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SaveAsTemplateOutput. -func (in *SaveAsTemplateOutput) DeepCopy() *SaveAsTemplateOutput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateCertificateOutput. +func (in *RotateCertificateOutput) DeepCopy() *RotateCertificateOutput { if in == nil { return nil } - out := new(SaveAsTemplateOutput) + out := new(RotateCertificateOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SearchPrincipalsInput) DeepCopyInto(out *SearchPrincipalsInput) { +func (in *RotateEncryptionKeyOutput) DeepCopyInto(out *RotateEncryptionKeyOutput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchPrincipalsInput. -func (in *SearchPrincipalsInput) DeepCopy() *SearchPrincipalsInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RotateEncryptionKeyOutput. +func (in *RotateEncryptionKeyOutput) DeepCopy() *RotateEncryptionKeyOutput { if in == nil { return nil } - out := new(SearchPrincipalsInput) + out := new(RotateEncryptionKeyOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SetPasswordInput) DeepCopyInto(out *SetPasswordInput) { +func (in *S3CredentialConfig) DeepCopyInto(out *S3CredentialConfig) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SetPasswordInput. -func (in *SetPasswordInput) DeepCopy() *SetPasswordInput { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3CredentialConfig. +func (in *S3CredentialConfig) DeepCopy() *S3CredentialConfig { if in == nil { return nil } - out := new(SetPasswordInput) + out := new(S3CredentialConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Setting) DeepCopyInto(out *Setting) { +func (in *SamlConfig) DeepCopyInto(out *SamlConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthConfig.DeepCopyInto(&out.AuthConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Setting. -func (in *Setting) DeepCopy() *Setting { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfig. +func (in *SamlConfig) DeepCopy() *SamlConfig { if in == nil { return nil } - out := new(Setting) + out := new(SamlConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Setting) DeepCopyObject() runtime.Object { +func (in *SamlConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7943,13 +6621,13 @@ func (in *Setting) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SettingList) DeepCopyInto(out *SettingList) { +func (in *SamlConfigList) DeepCopyInto(out *SamlConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Setting, len(*in)) + *out = make([]SamlConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -7957,18 +6635,18 @@ func (in *SettingList) DeepCopyInto(out *SettingList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SettingList. -func (in *SettingList) DeepCopy() *SettingList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigList. +func (in *SamlConfigList) DeepCopy() *SamlConfigList { if in == nil { return nil } - out := new(SettingList) + out := new(SamlConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SettingList) DeepCopyObject() runtime.Object { +func (in *SamlConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -7976,131 +6654,122 @@ func (in *SettingList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ShibbolethConfig) DeepCopyInto(out *ShibbolethConfig) { +func (in *SamlConfigLogoutInput) DeepCopyInto(out *SamlConfigLogoutInput) { *out = *in - in.SamlConfig.DeepCopyInto(&out.SamlConfig) - in.OpenLdapConfig.DeepCopyInto(&out.OpenLdapConfig) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShibbolethConfig. -func (in *ShibbolethConfig) DeepCopy() *ShibbolethConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigLogoutInput. +func (in *SamlConfigLogoutInput) DeepCopy() *SamlConfigLogoutInput { if in == nil { return nil } - out := new(ShibbolethConfig) + out := new(SamlConfigLogoutInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ShibbolethProvider) DeepCopyInto(out *ShibbolethProvider) { +func (in *SamlConfigLogoutOutput) DeepCopyInto(out *SamlConfigLogoutOutput) { *out = *in - in.SamlProvider.DeepCopyInto(&out.SamlProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShibbolethProvider. -func (in *ShibbolethProvider) DeepCopy() *ShibbolethProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigLogoutOutput. +func (in *SamlConfigLogoutOutput) DeepCopy() *SamlConfigLogoutOutput { if in == nil { return nil } - out := new(ShibbolethProvider) + out := new(SamlConfigLogoutOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SplunkConfig) DeepCopyInto(out *SplunkConfig) { +func (in *SamlConfigTestInput) DeepCopyInto(out *SamlConfigTestInput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SplunkConfig. -func (in *SplunkConfig) DeepCopy() *SplunkConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigTestInput. +func (in *SamlConfigTestInput) DeepCopy() *SamlConfigTestInput { if in == nil { return nil } - out := new(SplunkConfig) + out := new(SamlConfigTestInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubQuestion) DeepCopyInto(out *SubQuestion) { +func (in *SamlConfigTestOutput) DeepCopyInto(out *SamlConfigTestOutput) { *out = *in - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]string, len(*in)) - copy(*out, *in) - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubQuestion. -func (in *SubQuestion) DeepCopy() *SubQuestion { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlConfigTestOutput. +func (in *SamlConfigTestOutput) DeepCopy() *SamlConfigTestOutput { if in == nil { return nil } - out := new(SubQuestion) + out := new(SamlConfigTestOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SyslogConfig) DeepCopyInto(out *SyslogConfig) { +func (in *SamlLoginInput) DeepCopyInto(out *SamlLoginInput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyslogConfig. -func (in *SyslogConfig) DeepCopy() *SyslogConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlLoginInput. +func (in *SamlLoginInput) DeepCopy() *SamlLoginInput { if in == nil { return nil } - out := new(SyslogConfig) + out := new(SamlLoginInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Target) DeepCopyInto(out *Target) { +func (in *SamlLoginOutput) DeepCopyInto(out *SamlLoginOutput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target. -func (in *Target) DeepCopy() *Target { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlLoginOutput. +func (in *SamlLoginOutput) DeepCopy() *SamlLoginOutput { if in == nil { return nil } - out := new(Target) + out := new(SamlLoginOutput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Template) DeepCopyInto(out *Template) { +func (in *SamlProvider) DeepCopyInto(out *SamlProvider) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.AuthProvider.DeepCopyInto(&out.AuthProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template. -func (in *Template) DeepCopy() *Template { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlProvider. +func (in *SamlProvider) DeepCopy() *SamlProvider { if in == nil { return nil } - out := new(Template) + out := new(SamlProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Template) DeepCopyObject() runtime.Object { +func (in *SamlProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8108,25 +6777,32 @@ func (in *Template) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateContent) DeepCopyInto(out *TemplateContent) { +func (in *SamlProviderList) DeepCopyInto(out *SamlProviderList) { *out = *in out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SamlProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateContent. -func (in *TemplateContent) DeepCopy() *TemplateContent { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlProviderList. +func (in *SamlProviderList) DeepCopy() *SamlProviderList { if in == nil { return nil } - out := new(TemplateContent) + out := new(SamlProviderList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateContent) DeepCopyObject() runtime.Object { +func (in *SamlProviderList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8134,32 +6810,26 @@ func (in *TemplateContent) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateContentList) DeepCopyInto(out *TemplateContentList) { +func (in *SamlToken) DeepCopyInto(out *SamlToken) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]TemplateContent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateContentList. -func (in *TemplateContentList) DeepCopy() *TemplateContentList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlToken. +func (in *SamlToken) DeepCopy() *SamlToken { if in == nil { return nil } - out := new(TemplateContentList) + out := new(SamlToken) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateContentList) DeepCopyObject() runtime.Object { +func (in *SamlToken) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8167,13 +6837,13 @@ func (in *TemplateContentList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateList) DeepCopyInto(out *TemplateList) { +func (in *SamlTokenList) DeepCopyInto(out *SamlTokenList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Template, len(*in)) + *out = make([]SamlToken, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -8181,18 +6851,18 @@ func (in *TemplateList) DeepCopyInto(out *TemplateList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList. -func (in *TemplateList) DeepCopy() *TemplateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamlTokenList. +func (in *SamlTokenList) DeepCopy() *SamlTokenList { if in == nil { return nil } - out := new(TemplateList) + out := new(SamlTokenList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateList) DeepCopyObject() runtime.Object { +func (in *SamlTokenList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8200,71 +6870,89 @@ func (in *TemplateList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec) { +func (in *SaveAsTemplateInput) DeepCopyInto(out *SaveAsTemplateInput) { *out = *in - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]string, len(*in)) - copy(*out, *in) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SaveAsTemplateInput. +func (in *SaveAsTemplateInput) DeepCopy() *SaveAsTemplateInput { + if in == nil { + return nil } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]TemplateVersionSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + out := new(SaveAsTemplateInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SaveAsTemplateOutput) DeepCopyInto(out *SaveAsTemplateOutput) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SaveAsTemplateOutput. +func (in *SaveAsTemplateOutput) DeepCopy() *SaveAsTemplateOutput { + if in == nil { + return nil } + out := new(SaveAsTemplateOutput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SearchPrincipalsInput) DeepCopyInto(out *SearchPrincipalsInput) { + *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec. -func (in *TemplateSpec) DeepCopy() *TemplateSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchPrincipalsInput. +func (in *SearchPrincipalsInput) DeepCopy() *SearchPrincipalsInput { if in == nil { return nil } - out := new(TemplateSpec) + out := new(SearchPrincipalsInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateStatus) DeepCopyInto(out *TemplateStatus) { +func (in *SetPasswordInput) DeepCopyInto(out *SetPasswordInput) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateStatus. -func (in *TemplateStatus) DeepCopy() *TemplateStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SetPasswordInput. +func (in *SetPasswordInput) DeepCopy() *SetPasswordInput { if in == nil { return nil } - out := new(TemplateStatus) + out := new(SetPasswordInput) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateVersion) DeepCopyInto(out *TemplateVersion) { +func (in *Setting) DeepCopyInto(out *Setting) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateVersion. -func (in *TemplateVersion) DeepCopy() *TemplateVersion { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Setting. +func (in *Setting) DeepCopy() *Setting { if in == nil { return nil } - out := new(TemplateVersion) + out := new(Setting) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateVersion) DeepCopyObject() runtime.Object { +func (in *Setting) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8272,13 +6960,13 @@ func (in *TemplateVersion) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateVersionList) DeepCopyInto(out *TemplateVersionList) { +func (in *SettingList) DeepCopyInto(out *SettingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]TemplateVersion, len(*in)) + *out = make([]Setting, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -8286,18 +6974,18 @@ func (in *TemplateVersionList) DeepCopyInto(out *TemplateVersionList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateVersionList. -func (in *TemplateVersionList) DeepCopy() *TemplateVersionList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SettingList. +func (in *SettingList) DeepCopy() *SettingList { if in == nil { return nil } - out := new(TemplateVersionList) + out := new(SettingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateVersionList) DeepCopyObject() runtime.Object { +func (in *SettingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -8305,59 +6993,57 @@ func (in *TemplateVersionList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateVersionSpec) DeepCopyInto(out *TemplateVersionSpec) { +func (in *ShibbolethConfig) DeepCopyInto(out *ShibbolethConfig) { *out = *in - if in.UpgradeVersionLinks != nil { - in, out := &in.UpgradeVersionLinks, &out.UpgradeVersionLinks - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Questions != nil { - in, out := &in.Questions, &out.Questions - *out = make([]Question, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VersionURLs != nil { - in, out := &in.VersionURLs, &out.VersionURLs - *out = make([]string, len(*in)) - copy(*out, *in) + in.SamlConfig.DeepCopyInto(&out.SamlConfig) + in.OpenLdapConfig.DeepCopyInto(&out.OpenLdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShibbolethConfig. +func (in *ShibbolethConfig) DeepCopy() *ShibbolethConfig { + if in == nil { + return nil } + out := new(ShibbolethConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShibbolethProvider) DeepCopyInto(out *ShibbolethProvider) { + *out = *in + in.SamlProvider.DeepCopyInto(&out.SamlProvider) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateVersionSpec. -func (in *TemplateVersionSpec) DeepCopy() *TemplateVersionSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShibbolethProvider. +func (in *ShibbolethProvider) DeepCopy() *ShibbolethProvider { if in == nil { return nil } - out := new(TemplateVersionSpec) + out := new(ShibbolethProvider) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateVersionStatus) DeepCopyInto(out *TemplateVersionStatus) { +func (in *SubQuestion) DeepCopyInto(out *SubQuestion) { *out = *in + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateVersionStatus. -func (in *TemplateVersionStatus) DeepCopy() *TemplateVersionStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubQuestion. +func (in *SubQuestion) DeepCopy() *SubQuestion { if in == nil { return nil } - out := new(TemplateVersionStatus) + out := new(SubQuestion) in.DeepCopyInto(out) return out } @@ -8382,6 +7068,14 @@ func (in *Token) DeepCopyInto(out *Token) { (*out)[key] = val } } + if in.LastUsedAt != nil { + in, out := &in.LastUsedAt, &out.LastUsedAt + *out = (*in).DeepCopy() + } + if in.ActivityLastSeenAt != nil { + in, out := &in.ActivityLastSeenAt, &out.ActivityLastSeenAt + *out = (*in).DeepCopy() + } if in.Enabled != nil { in, out := &in.Enabled, &out.Enabled *out = new(bool) @@ -8441,76 +7135,6 @@ func (in *TokenList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpdateGlobalDNSTargetsInput) DeepCopyInto(out *UpdateGlobalDNSTargetsInput) { - *out = *in - if in.ProjectNames != nil { - in, out := &in.ProjectNames, &out.ProjectNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateGlobalDNSTargetsInput. -func (in *UpdateGlobalDNSTargetsInput) DeepCopy() *UpdateGlobalDNSTargetsInput { - if in == nil { - return nil - } - out := new(UpdateGlobalDNSTargetsInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpdateMultiClusterAppTargetsInput) DeepCopyInto(out *UpdateMultiClusterAppTargetsInput) { - *out = *in - if in.Projects != nil { - in, out := &in.Projects, &out.Projects - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make([]Answer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateMultiClusterAppTargetsInput. -func (in *UpdateMultiClusterAppTargetsInput) DeepCopy() *UpdateMultiClusterAppTargetsInput { - if in == nil { - return nil - } - out := new(UpdateMultiClusterAppTargetsInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpgradeStrategy) DeepCopyInto(out *UpgradeStrategy) { - *out = *in - if in.RollingUpdate != nil { - in, out := &in.RollingUpdate, &out.RollingUpdate - *out = new(RollingUpdate) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeStrategy. -func (in *UpgradeStrategy) DeepCopy() *UpgradeStrategy { - if in == nil { - return nil - } - out := new(UpgradeStrategy) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *User) DeepCopyInto(out *User) { *out = *in @@ -8761,29 +7385,6 @@ func (in *Values) DeepCopy() *Values { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VersionCommits) DeepCopyInto(out *VersionCommits) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionCommits. -func (in *VersionCommits) DeepCopy() *VersionCommits { - if in == nil { - return nil - } - out := new(VersionCommits) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WindowsSystemImages) DeepCopyInto(out *WindowsSystemImages) { *out = *in diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_list_types.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_list_types.go index a15888e25..1fd61ee1a 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_list_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_list_types.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -128,57 +128,6 @@ func NewAzureADProvider(namespace, name string, obj AzureADProvider) *AzureADPro // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// CatalogList is a list of Catalog resources -type CatalogList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Catalog `json:"items"` -} - -func NewCatalog(namespace, name string, obj Catalog) *Catalog { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Catalog").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CatalogTemplateList is a list of CatalogTemplate resources -type CatalogTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []CatalogTemplate `json:"items"` -} - -func NewCatalogTemplate(namespace, name string, obj CatalogTemplate) *CatalogTemplate { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("CatalogTemplate").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CatalogTemplateVersionList is a list of CatalogTemplateVersion resources -type CatalogTemplateVersionList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []CatalogTemplateVersion `json:"items"` -} - -func NewCatalogTemplateVersion(namespace, name string, obj CatalogTemplateVersion) *CatalogTemplateVersion { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("CatalogTemplateVersion").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // CloudCredentialList is a list of CloudCredential resources type CloudCredentialList struct { metav1.TypeMeta `json:",inline"` @@ -213,23 +162,6 @@ func NewCluster(namespace, name string, obj Cluster) *Cluster { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ClusterLoggingList is a list of ClusterLogging resources -type ClusterLoggingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterLogging `json:"items"` -} - -func NewClusterLogging(namespace, name string, obj ClusterLogging) *ClusterLogging { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ClusterLogging").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // ClusterProxyConfigList is a list of ClusterProxyConfig resources type ClusterProxyConfigList struct { metav1.TypeMeta `json:",inline"` @@ -315,6 +247,23 @@ func NewClusterTemplateRevision(namespace, name string, obj ClusterTemplateRevis // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// CognitoProviderList is a list of CognitoProvider resources +type CognitoProviderList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []CognitoProvider `json:"items"` +} + +func NewCognitoProvider(namespace, name string, obj CognitoProvider) *CognitoProvider { + obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("CognitoProvider").ToAPIVersionAndKind() + obj.Name = name + obj.Namespace = namespace + return &obj +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + // ComposeConfigList is a list of ComposeConfig resources type ComposeConfigList struct { metav1.TypeMeta `json:",inline"` @@ -451,40 +400,6 @@ func NewGithubProvider(namespace, name string, obj GithubProvider) *GithubProvid // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// GlobalDnsList is a list of GlobalDns resources -type GlobalDnsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []GlobalDns `json:"items"` -} - -func NewGlobalDns(namespace, name string, obj GlobalDns) *GlobalDns { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("GlobalDns").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GlobalDnsProviderList is a list of GlobalDnsProvider resources -type GlobalDnsProviderList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []GlobalDnsProvider `json:"items"` -} - -func NewGlobalDnsProvider(namespace, name string, obj GlobalDnsProvider) *GlobalDnsProvider { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("GlobalDnsProvider").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // GlobalRoleList is a list of GlobalRole resources type GlobalRoleList struct { metav1.TypeMeta `json:",inline"` @@ -621,40 +536,6 @@ func NewManagedChart(namespace, name string, obj ManagedChart) *ManagedChart { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// MultiClusterAppList is a list of MultiClusterApp resources -type MultiClusterAppList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []MultiClusterApp `json:"items"` -} - -func NewMultiClusterApp(namespace, name string, obj MultiClusterApp) *MultiClusterApp { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("MultiClusterApp").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MultiClusterAppRevisionList is a list of MultiClusterAppRevision resources -type MultiClusterAppRevisionList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []MultiClusterAppRevision `json:"items"` -} - -func NewMultiClusterAppRevision(namespace, name string, obj MultiClusterAppRevision) *MultiClusterAppRevision { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("MultiClusterAppRevision").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // NodeList is a list of Node resources type NodeList struct { metav1.TypeMeta `json:",inline"` @@ -723,6 +604,23 @@ func NewNodeTemplate(namespace, name string, obj NodeTemplate) *NodeTemplate { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// OIDCClientList is a list of OIDCClient resources +type OIDCClientList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []OIDCClient `json:"items"` +} + +func NewOIDCClient(namespace, name string, obj OIDCClient) *OIDCClient { + obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("OIDCClient").ToAPIVersionAndKind() + obj.Name = name + obj.Namespace = namespace + return &obj +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + // OIDCProviderList is a list of OIDCProvider resources type OIDCProviderList struct { metav1.TypeMeta `json:",inline"` @@ -825,23 +723,6 @@ func NewProject(namespace, name string, obj Project) *Project { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ProjectLoggingList is a list of ProjectLogging resources -type ProjectLoggingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ProjectLogging `json:"items"` -} - -func NewProjectLogging(namespace, name string, obj ProjectLogging) *ProjectLogging { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ProjectLogging").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // ProjectNetworkPolicyList is a list of ProjectNetworkPolicy resources type ProjectNetworkPolicyList struct { metav1.TypeMeta `json:",inline"` @@ -1012,57 +893,6 @@ func NewSetting(namespace, name string, obj Setting) *Setting { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// TemplateList is a list of Template resources -type TemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Template `json:"items"` -} - -func NewTemplate(namespace, name string, obj Template) *Template { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Template").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateContentList is a list of TemplateContent resources -type TemplateContentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []TemplateContent `json:"items"` -} - -func NewTemplateContent(namespace, name string, obj TemplateContent) *TemplateContent { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("TemplateContent").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateVersionList is a list of TemplateVersion resources -type TemplateVersionList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []TemplateVersion `json:"items"` -} - -func NewTemplateVersion(namespace, name string, obj TemplateVersion) *TemplateVersion { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("TemplateVersion").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // TokenList is a list of Token resources type TokenList struct { metav1.TypeMeta `json:",inline"` @@ -1111,37 +941,3 @@ func NewUserAttribute(namespace, name string, obj UserAttribute) *UserAttribute obj.Namespace = namespace return &obj } - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ProjectCatalogList is a list of ProjectCatalog resources -type ProjectCatalogList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ProjectCatalog `json:"items"` -} - -func NewProjectCatalog(namespace, name string, obj ProjectCatalog) *ProjectCatalog { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ProjectCatalog").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterCatalogList is a list of ClusterCatalog resources -type ClusterCatalogList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ClusterCatalog `json:"items"` -} - -func NewClusterCatalog(namespace, name string, obj ClusterCatalog) *ClusterCatalog { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ClusterCatalog").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_register.go index 9e1b1682b..efae36495 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/v3/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -34,18 +34,14 @@ var ( AuthProviderResourceName = "authproviders" AuthTokenResourceName = "authtokens" AzureADProviderResourceName = "azureadproviders" - CatalogResourceName = "catalogs" - CatalogTemplateResourceName = "catalogtemplates" - CatalogTemplateVersionResourceName = "catalogtemplateversions" CloudCredentialResourceName = "cloudcredentials" ClusterResourceName = "clusters" - ClusterCatalogResourceName = "clustercatalogs" - ClusterLoggingResourceName = "clusterloggings" ClusterProxyConfigResourceName = "clusterproxyconfigs" ClusterRegistrationTokenResourceName = "clusterregistrationtokens" ClusterRoleTemplateBindingResourceName = "clusterroletemplatebindings" ClusterTemplateResourceName = "clustertemplates" ClusterTemplateRevisionResourceName = "clustertemplaterevisions" + CognitoProviderResourceName = "cognitoproviders" ComposeConfigResourceName = "composeconfigs" DynamicSchemaResourceName = "dynamicschemas" EtcdBackupResourceName = "etcdbackups" @@ -54,8 +50,6 @@ var ( FreeIpaProviderResourceName = "freeipaproviders" GenericOIDCProviderResourceName = "genericoidcproviders" GithubProviderResourceName = "githubproviders" - GlobalDnsResourceName = "globaldnses" - GlobalDnsProviderResourceName = "globaldnsproviders" GlobalRoleResourceName = "globalroles" GlobalRoleBindingResourceName = "globalrolebindings" GoogleOAuthProviderResourceName = "googleoauthproviders" @@ -64,20 +58,17 @@ var ( KontainerDriverResourceName = "kontainerdrivers" LocalProviderResourceName = "localproviders" ManagedChartResourceName = "managedcharts" - MultiClusterAppResourceName = "multiclusterapps" - MultiClusterAppRevisionResourceName = "multiclusterapprevisions" NodeResourceName = "nodes" NodeDriverResourceName = "nodedrivers" NodePoolResourceName = "nodepools" NodeTemplateResourceName = "nodetemplates" + OIDCClientResourceName = "oidcclients" OIDCProviderResourceName = "oidcproviders" OpenLdapProviderResourceName = "openldapproviders" PodSecurityAdmissionConfigurationTemplateResourceName = "podsecurityadmissionconfigurationtemplates" PreferenceResourceName = "preferences" PrincipalResourceName = "principals" ProjectResourceName = "projects" - ProjectCatalogResourceName = "projectcatalogs" - ProjectLoggingResourceName = "projectloggings" ProjectNetworkPolicyResourceName = "projectnetworkpolicies" ProjectRoleTemplateBindingResourceName = "projectroletemplatebindings" RancherUserNotificationResourceName = "rancherusernotifications" @@ -88,9 +79,6 @@ var ( SamlProviderResourceName = "samlproviders" SamlTokenResourceName = "samltokens" SettingResourceName = "settings" - TemplateResourceName = "templates" - TemplateContentResourceName = "templatecontents" - TemplateVersionResourceName = "templateversions" TokenResourceName = "tokens" UserResourceName = "users" UserAttributeResourceName = "userattributes" @@ -129,20 +117,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &AuthTokenList{}, &AzureADProvider{}, &AzureADProviderList{}, - &Catalog{}, - &CatalogList{}, - &CatalogTemplate{}, - &CatalogTemplateList{}, - &CatalogTemplateVersion{}, - &CatalogTemplateVersionList{}, &CloudCredential{}, &CloudCredentialList{}, &Cluster{}, &ClusterList{}, - &ClusterCatalog{}, - &ClusterCatalogList{}, - &ClusterLogging{}, - &ClusterLoggingList{}, &ClusterProxyConfig{}, &ClusterProxyConfigList{}, &ClusterRegistrationToken{}, @@ -153,6 +131,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterTemplateList{}, &ClusterTemplateRevision{}, &ClusterTemplateRevisionList{}, + &CognitoProvider{}, + &CognitoProviderList{}, &ComposeConfig{}, &ComposeConfigList{}, &DynamicSchema{}, @@ -169,10 +149,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &GenericOIDCProviderList{}, &GithubProvider{}, &GithubProviderList{}, - &GlobalDns{}, - &GlobalDnsList{}, - &GlobalDnsProvider{}, - &GlobalDnsProviderList{}, &GlobalRole{}, &GlobalRoleList{}, &GlobalRoleBinding{}, @@ -189,10 +165,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &LocalProviderList{}, &ManagedChart{}, &ManagedChartList{}, - &MultiClusterApp{}, - &MultiClusterAppList{}, - &MultiClusterAppRevision{}, - &MultiClusterAppRevisionList{}, &Node{}, &NodeList{}, &NodeDriver{}, @@ -201,6 +173,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &NodePoolList{}, &NodeTemplate{}, &NodeTemplateList{}, + &OIDCClient{}, + &OIDCClientList{}, &OIDCProvider{}, &OIDCProviderList{}, &OpenLdapProvider{}, @@ -213,10 +187,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PrincipalList{}, &Project{}, &ProjectList{}, - &ProjectCatalog{}, - &ProjectCatalogList{}, - &ProjectLogging{}, - &ProjectLoggingList{}, &ProjectNetworkPolicy{}, &ProjectNetworkPolicyList{}, &ProjectRoleTemplateBinding{}, @@ -237,12 +207,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &SamlTokenList{}, &Setting{}, &SettingList{}, - &Template{}, - &TemplateList{}, - &TemplateContent{}, - &TemplateContentList{}, - &TemplateVersion{}, - &TemplateVersionList{}, &Token{}, &TokenList{}, &User{}, diff --git a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/zz_generated_register.go index 9e6f8915e..da91662c1 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/management.cattle.io/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/app_types.go b/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/app_types.go deleted file mode 100644 index c6f870367..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/app_types.go +++ /dev/null @@ -1,137 +0,0 @@ -package v3 - -import ( - "strings" - - "github.com/rancher/norman/condition" - "github.com/rancher/norman/types" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type App struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AppSpec `json:"spec,omitempty"` - Status AppStatus `json:"status,omitempty"` -} - -func (a *App) ObjClusterName() string { - return a.Spec.ObjClusterName() -} - -type AppSpec struct { - ProjectName string `json:"projectName,omitempty" norman:"type=reference[/v3/schemas/project]"` - Description string `json:"description,omitempty"` - TargetNamespace string `json:"targetNamespace,omitempty"` - ExternalID string `json:"externalId,omitempty"` - Files map[string]string `json:"files,omitempty"` - Answers map[string]string `json:"answers,omitempty"` - AnswersSetString map[string]string `json:"answersSetString,omitempty"` - Wait bool `json:"wait,omitempty"` - Timeout int `json:"timeout,omitempty" norman:"min=1,default=300"` - AppRevisionName string `json:"appRevisionName,omitempty" norman:"type=reference[/v3/project/schemas/apprevision]"` - Prune bool `json:"prune,omitempty"` - MultiClusterAppName string `json:"multiClusterAppName,omitempty" norman:"type=reference[/v3/schemas/multiclusterapp]"` - ValuesYaml string `json:"valuesYaml,omitempty"` - MaxRevisionCount int `json:"maxRevisionCount,omitempty"` -} - -func (a *AppSpec) ObjClusterName() string { - if parts := strings.SplitN(a.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -var ( - AppConditionInstalled condition.Cond = "Installed" - AppConditionMigrated condition.Cond = "Migrated" - AppConditionDeployed condition.Cond = "Deployed" - AppConditionForceUpgrade condition.Cond = "ForceUpgrade" - AppConditionUserTriggeredAction condition.Cond = "UserTriggeredAction" -) - -type AppStatus struct { - AppliedFiles map[string]string `json:"appliedFiles,omitempty"` - Notes string `json:"notes,omitempty"` - Conditions []AppCondition `json:"conditions,omitempty"` - LastAppliedTemplates string `json:"lastAppliedTemplate,omitempty"` - HelmVersion string `json:"helmVersion,omitempty" norman:"noupdate,nocreate"` -} - -type AppCondition struct { - // Type of cluster condition. - Type condition.Cond `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status"` - // The last time this condition was updated. - LastUpdateTime string `json:"lastUpdateTime,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime string `json:"lastTransitionTime,omitempty"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - // Human-readable message indicating details about last transition - Message string `json:"message,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type AppRevision struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AppRevisionSpec `json:"spec,omitempty"` - Status AppRevisionStatus `json:"status,omitempty"` -} - -type AppRevisionSpec struct { - ProjectName string `json:"projectName,omitempty" norman:"type=reference[/v3/schemas/project]"` -} - -func (a *AppRevisionSpec) ObjClusterName() string { - if parts := strings.SplitN(a.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -type AppRevisionStatus struct { - ProjectName string `json:"projectName,omitempty" norman:"type=reference[/v3/schemas/project]"` - ExternalID string `json:"externalId"` - Answers map[string]string `json:"answers"` - AnswersSetString map[string]string `json:"answersSetString"` - Digest string `json:"digest"` - ValuesYaml string `json:"valuesYaml,omitempty"` - Files map[string]string `json:"files,omitempty"` -} - -func (a *AppRevisionStatus) ObjClusterName() string { - if parts := strings.SplitN(a.ProjectName, ":", 2); len(parts) == 2 { - return parts[0] - } - return "" -} - -type AppUpgradeConfig struct { - ExternalID string `json:"externalId,omitempty"` - Answers map[string]string `json:"answers,omitempty"` - AnswersSetString map[string]string `json:"answersSetString,omitempty"` - ForceUpgrade bool `json:"forceUpgrade,omitempty"` - Files map[string]string `json:"files,omitempty"` - ValuesYaml string `json:"valuesYaml,omitempty"` -} - -type RollbackRevision struct { - RevisionName string `json:"revisionName,omitempty" norman:"type=reference[/v3/project/schemas/apprevision]"` - ForceUpgrade bool `json:"forceUpgrade,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/types.go b/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/types.go deleted file mode 100644 index 5cc518e2b..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/types.go +++ /dev/null @@ -1,169 +0,0 @@ -package v3 - -import ( - "github.com/rancher/norman/types" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ServiceAccountToken struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - AccountName string `json:"accountName"` - AccountUID string `json:"accountUid"` - Description string `json:"description"` - Token string `json:"token" norman:"writeOnly"` - CACRT string `json:"caCrt"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type NamespacedServiceAccountToken ServiceAccountToken - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type DockerCredential struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Description string `json:"description"` - Registries map[string]RegistryCredential `json:"registries"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type NamespacedDockerCredential DockerCredential - -type RegistryCredential struct { - Description string `json:"description"` - Username string `json:"username"` - Password string `json:"password" norman:"writeOnly"` - Auth string `json:"auth" norman:"writeOnly"` - Email string `json:"email"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Certificate struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Description string `json:"description"` - Certs string `json:"certs"` - Key string `json:"key" norman:"writeOnly"` - - CertFingerprint string `json:"certFingerprint" norman:"nocreate,noupdate"` - CN string `json:"cn" norman:"nocreate,noupdate"` - Version string `json:"version" norman:"nocreate,noupdate"` - ExpiresAt string `json:"expiresAt" norman:"nocreate,noupdate"` - Issuer string `json:"issuer" norman:"nocreate,noupdate"` - IssuedAt string `json:"issuedAt" norman:"nocreate,noupdate"` - Algorithm string `json:"algorithm" norman:"nocreate,noupdate"` - SerialNumber string `json:"serialNumber" norman:"nocreate,noupdate"` - KeySize string `json:"keySize" norman:"nocreate,noupdate"` - SubjectAlternativeNames []string `json:"subjectAlternativeNames" norman:"nocreate,noupdate"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type NamespacedCertificate Certificate - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type BasicAuth struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Description string `json:"description"` - Username string `json:"username"` - Password string `json:"password" norman:"writeOnly"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type NamespacedBasicAuth BasicAuth - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type SSHAuth struct { - types.Namespaced - - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Description string `json:"description"` - PrivateKey string `json:"privateKey" norman:"writeOnly"` - Fingerprint string `json:"certFingerprint" norman:"nocreate,noupdate"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type NamespacedSSHAuth SSHAuth - -type PublicEndpoint struct { - NodeName string `json:"nodeName,omitempty" norman:"type=reference[/v3/schemas/node],nocreate,noupdate"` - Addresses []string `json:"addresses,omitempty" norman:"nocreate,noupdate"` - Port int32 `json:"port,omitempty" norman:"nocreate,noupdate"` - Protocol string `json:"protocol,omitempty" norman:"nocreate,noupdate"` - // for node port service endpoint - ServiceName string `json:"serviceName,omitempty" norman:"type=reference[service],nocreate,noupdate"` - // for host port endpoint - PodName string `json:"podName,omitempty" norman:"type=reference[pod],nocreate,noupdate"` - // for ingress endpoint. ServiceName, podName, ingressName are mutually exclusive - IngressName string `json:"ingressName,omitempty" norman:"type=reference[ingress],nocreate,noupdate"` - // Hostname/path are set for Ingress endpoints - Hostname string `json:"hostname,omitempty" norman:"nocreate,noupdate"` - Path string `json:"path,omitempty" norman:"nocreate,noupdate"` - // True when endpoint is exposed on every node - AllNodes bool `json:"allNodes" norman:"nocreate,noupdate"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Workload struct { - types.Namespaced - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` -} - -type DeploymentRollbackInput struct { - ReplicaSetID string `json:"replicaSetId" norman:"type=reference[replicaSet]"` -} - -type WorkloadMetric struct { - Port int32 `json:"port,omitempty"` - Path string `json:"path,omitempty"` - Schema string `json:"schema,omitempty" norman:"type=enum,options=HTTP|HTTPS"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_deepcopy.go b/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_deepcopy.go deleted file mode 100644 index 6eed441a6..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_deepcopy.go +++ /dev/null @@ -1,1090 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 2024 Rancher Labs, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -package v3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *App) DeepCopyInto(out *App) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App. -func (in *App) DeepCopy() *App { - if in == nil { - return nil - } - out := new(App) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *App) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppCondition) DeepCopyInto(out *AppCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppCondition. -func (in *AppCondition) DeepCopy() *AppCondition { - if in == nil { - return nil - } - out := new(AppCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppList) DeepCopyInto(out *AppList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]App, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList. -func (in *AppList) DeepCopy() *AppList { - if in == nil { - return nil - } - out := new(AppList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AppList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppRevision) DeepCopyInto(out *AppRevision) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRevision. -func (in *AppRevision) DeepCopy() *AppRevision { - if in == nil { - return nil - } - out := new(AppRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AppRevision) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppRevisionList) DeepCopyInto(out *AppRevisionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AppRevision, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRevisionList. -func (in *AppRevisionList) DeepCopy() *AppRevisionList { - if in == nil { - return nil - } - out := new(AppRevisionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AppRevisionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppRevisionSpec) DeepCopyInto(out *AppRevisionSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRevisionSpec. -func (in *AppRevisionSpec) DeepCopy() *AppRevisionSpec { - if in == nil { - return nil - } - out := new(AppRevisionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppRevisionStatus) DeepCopyInto(out *AppRevisionStatus) { - *out = *in - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AnswersSetString != nil { - in, out := &in.AnswersSetString, &out.AnswersSetString - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRevisionStatus. -func (in *AppRevisionStatus) DeepCopy() *AppRevisionStatus { - if in == nil { - return nil - } - out := new(AppRevisionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppSpec) DeepCopyInto(out *AppSpec) { - *out = *in - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AnswersSetString != nil { - in, out := &in.AnswersSetString, &out.AnswersSetString - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec. -func (in *AppSpec) DeepCopy() *AppSpec { - if in == nil { - return nil - } - out := new(AppSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppStatus) DeepCopyInto(out *AppStatus) { - *out = *in - if in.AppliedFiles != nil { - in, out := &in.AppliedFiles, &out.AppliedFiles - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]AppCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus. -func (in *AppStatus) DeepCopy() *AppStatus { - if in == nil { - return nil - } - out := new(AppStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AppUpgradeConfig) DeepCopyInto(out *AppUpgradeConfig) { - *out = *in - if in.Answers != nil { - in, out := &in.Answers, &out.Answers - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AnswersSetString != nil { - in, out := &in.AnswersSetString, &out.AnswersSetString - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppUpgradeConfig. -func (in *AppUpgradeConfig) DeepCopy() *AppUpgradeConfig { - if in == nil { - return nil - } - out := new(AppUpgradeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuth) DeepCopyInto(out *BasicAuth) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth. -func (in *BasicAuth) DeepCopy() *BasicAuth { - if in == nil { - return nil - } - out := new(BasicAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BasicAuth) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuthList) DeepCopyInto(out *BasicAuthList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]BasicAuth, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthList. -func (in *BasicAuthList) DeepCopy() *BasicAuthList { - if in == nil { - return nil - } - out := new(BasicAuthList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BasicAuthList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Certificate) DeepCopyInto(out *Certificate) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.SubjectAlternativeNames != nil { - in, out := &in.SubjectAlternativeNames, &out.SubjectAlternativeNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (in *Certificate) DeepCopy() *Certificate { - if in == nil { - return nil - } - out := new(Certificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Certificate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateList) DeepCopyInto(out *CertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (in *CertificateList) DeepCopy() *CertificateList { - if in == nil { - return nil - } - out := new(CertificateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CertificateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentRollbackInput) DeepCopyInto(out *DeploymentRollbackInput) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRollbackInput. -func (in *DeploymentRollbackInput) DeepCopy() *DeploymentRollbackInput { - if in == nil { - return nil - } - out := new(DeploymentRollbackInput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerCredential) DeepCopyInto(out *DockerCredential) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Registries != nil { - in, out := &in.Registries, &out.Registries - *out = make(map[string]RegistryCredential, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerCredential. -func (in *DockerCredential) DeepCopy() *DockerCredential { - if in == nil { - return nil - } - out := new(DockerCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DockerCredential) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerCredentialList) DeepCopyInto(out *DockerCredentialList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DockerCredential, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerCredentialList. -func (in *DockerCredentialList) DeepCopy() *DockerCredentialList { - if in == nil { - return nil - } - out := new(DockerCredentialList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DockerCredentialList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedBasicAuth) DeepCopyInto(out *NamespacedBasicAuth) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedBasicAuth. -func (in *NamespacedBasicAuth) DeepCopy() *NamespacedBasicAuth { - if in == nil { - return nil - } - out := new(NamespacedBasicAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedBasicAuth) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedBasicAuthList) DeepCopyInto(out *NamespacedBasicAuthList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NamespacedBasicAuth, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedBasicAuthList. -func (in *NamespacedBasicAuthList) DeepCopy() *NamespacedBasicAuthList { - if in == nil { - return nil - } - out := new(NamespacedBasicAuthList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedBasicAuthList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedCertificate) DeepCopyInto(out *NamespacedCertificate) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.SubjectAlternativeNames != nil { - in, out := &in.SubjectAlternativeNames, &out.SubjectAlternativeNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedCertificate. -func (in *NamespacedCertificate) DeepCopy() *NamespacedCertificate { - if in == nil { - return nil - } - out := new(NamespacedCertificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedCertificate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedCertificateList) DeepCopyInto(out *NamespacedCertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NamespacedCertificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedCertificateList. -func (in *NamespacedCertificateList) DeepCopy() *NamespacedCertificateList { - if in == nil { - return nil - } - out := new(NamespacedCertificateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedCertificateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedDockerCredential) DeepCopyInto(out *NamespacedDockerCredential) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Registries != nil { - in, out := &in.Registries, &out.Registries - *out = make(map[string]RegistryCredential, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedDockerCredential. -func (in *NamespacedDockerCredential) DeepCopy() *NamespacedDockerCredential { - if in == nil { - return nil - } - out := new(NamespacedDockerCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedDockerCredential) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedDockerCredentialList) DeepCopyInto(out *NamespacedDockerCredentialList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NamespacedDockerCredential, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedDockerCredentialList. -func (in *NamespacedDockerCredentialList) DeepCopy() *NamespacedDockerCredentialList { - if in == nil { - return nil - } - out := new(NamespacedDockerCredentialList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedDockerCredentialList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedSSHAuth) DeepCopyInto(out *NamespacedSSHAuth) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedSSHAuth. -func (in *NamespacedSSHAuth) DeepCopy() *NamespacedSSHAuth { - if in == nil { - return nil - } - out := new(NamespacedSSHAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedSSHAuth) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedSSHAuthList) DeepCopyInto(out *NamespacedSSHAuthList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NamespacedSSHAuth, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedSSHAuthList. -func (in *NamespacedSSHAuthList) DeepCopy() *NamespacedSSHAuthList { - if in == nil { - return nil - } - out := new(NamespacedSSHAuthList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedSSHAuthList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedServiceAccountToken) DeepCopyInto(out *NamespacedServiceAccountToken) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedServiceAccountToken. -func (in *NamespacedServiceAccountToken) DeepCopy() *NamespacedServiceAccountToken { - if in == nil { - return nil - } - out := new(NamespacedServiceAccountToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedServiceAccountToken) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespacedServiceAccountTokenList) DeepCopyInto(out *NamespacedServiceAccountTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NamespacedServiceAccountToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedServiceAccountTokenList. -func (in *NamespacedServiceAccountTokenList) DeepCopy() *NamespacedServiceAccountTokenList { - if in == nil { - return nil - } - out := new(NamespacedServiceAccountTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespacedServiceAccountTokenList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PublicEndpoint) DeepCopyInto(out *PublicEndpoint) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicEndpoint. -func (in *PublicEndpoint) DeepCopy() *PublicEndpoint { - if in == nil { - return nil - } - out := new(PublicEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryCredential) DeepCopyInto(out *RegistryCredential) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryCredential. -func (in *RegistryCredential) DeepCopy() *RegistryCredential { - if in == nil { - return nil - } - out := new(RegistryCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RollbackRevision) DeepCopyInto(out *RollbackRevision) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollbackRevision. -func (in *RollbackRevision) DeepCopy() *RollbackRevision { - if in == nil { - return nil - } - out := new(RollbackRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SSHAuth) DeepCopyInto(out *SSHAuth) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSHAuth. -func (in *SSHAuth) DeepCopy() *SSHAuth { - if in == nil { - return nil - } - out := new(SSHAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SSHAuth) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SSHAuthList) DeepCopyInto(out *SSHAuthList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SSHAuth, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSHAuthList. -func (in *SSHAuthList) DeepCopy() *SSHAuthList { - if in == nil { - return nil - } - out := new(SSHAuthList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SSHAuthList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountToken) DeepCopyInto(out *ServiceAccountToken) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountToken. -func (in *ServiceAccountToken) DeepCopy() *ServiceAccountToken { - if in == nil { - return nil - } - out := new(ServiceAccountToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceAccountToken) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountTokenList) DeepCopyInto(out *ServiceAccountTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceAccountToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountTokenList. -func (in *ServiceAccountTokenList) DeepCopy() *ServiceAccountTokenList { - if in == nil { - return nil - } - out := new(ServiceAccountTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceAccountTokenList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Workload) DeepCopyInto(out *Workload) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload. -func (in *Workload) DeepCopy() *Workload { - if in == nil { - return nil - } - out := new(Workload) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Workload) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkloadList) DeepCopyInto(out *WorkloadList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Workload, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList. -func (in *WorkloadList) DeepCopy() *WorkloadList { - if in == nil { - return nil - } - out := new(WorkloadList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *WorkloadList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkloadMetric) DeepCopyInto(out *WorkloadMetric) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMetric. -func (in *WorkloadMetric) DeepCopy() *WorkloadMetric { - if in == nil { - return nil - } - out := new(WorkloadMetric) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_list_types.go b/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_list_types.go deleted file mode 100644 index d88fbaf3a..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_list_types.go +++ /dev/null @@ -1,246 +0,0 @@ -/* -Copyright 2024 Rancher Labs, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -// +k8s:deepcopy-gen=package -// +groupName=project.cattle.io -package v3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AppList is a list of App resources -type AppList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []App `json:"items"` -} - -func NewApp(namespace, name string, obj App) *App { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("App").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AppRevisionList is a list of AppRevision resources -type AppRevisionList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []AppRevision `json:"items"` -} - -func NewAppRevision(namespace, name string, obj AppRevision) *AppRevision { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("AppRevision").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BasicAuthList is a list of BasicAuth resources -type BasicAuthList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []BasicAuth `json:"items"` -} - -func NewBasicAuth(namespace, name string, obj BasicAuth) *BasicAuth { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("BasicAuth").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateList is a list of Certificate resources -type CertificateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Certificate `json:"items"` -} - -func NewCertificate(namespace, name string, obj Certificate) *Certificate { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Certificate").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DockerCredentialList is a list of DockerCredential resources -type DockerCredentialList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []DockerCredential `json:"items"` -} - -func NewDockerCredential(namespace, name string, obj DockerCredential) *DockerCredential { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("DockerCredential").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespacedBasicAuthList is a list of NamespacedBasicAuth resources -type NamespacedBasicAuthList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []NamespacedBasicAuth `json:"items"` -} - -func NewNamespacedBasicAuth(namespace, name string, obj NamespacedBasicAuth) *NamespacedBasicAuth { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("NamespacedBasicAuth").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespacedCertificateList is a list of NamespacedCertificate resources -type NamespacedCertificateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []NamespacedCertificate `json:"items"` -} - -func NewNamespacedCertificate(namespace, name string, obj NamespacedCertificate) *NamespacedCertificate { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("NamespacedCertificate").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespacedDockerCredentialList is a list of NamespacedDockerCredential resources -type NamespacedDockerCredentialList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []NamespacedDockerCredential `json:"items"` -} - -func NewNamespacedDockerCredential(namespace, name string, obj NamespacedDockerCredential) *NamespacedDockerCredential { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("NamespacedDockerCredential").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespacedSSHAuthList is a list of NamespacedSSHAuth resources -type NamespacedSSHAuthList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []NamespacedSSHAuth `json:"items"` -} - -func NewNamespacedSSHAuth(namespace, name string, obj NamespacedSSHAuth) *NamespacedSSHAuth { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("NamespacedSSHAuth").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespacedServiceAccountTokenList is a list of NamespacedServiceAccountToken resources -type NamespacedServiceAccountTokenList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []NamespacedServiceAccountToken `json:"items"` -} - -func NewNamespacedServiceAccountToken(namespace, name string, obj NamespacedServiceAccountToken) *NamespacedServiceAccountToken { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("NamespacedServiceAccountToken").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SSHAuthList is a list of SSHAuth resources -type SSHAuthList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []SSHAuth `json:"items"` -} - -func NewSSHAuth(namespace, name string, obj SSHAuth) *SSHAuth { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("SSHAuth").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceAccountTokenList is a list of ServiceAccountToken resources -type ServiceAccountTokenList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ServiceAccountToken `json:"items"` -} - -func NewServiceAccountToken(namespace, name string, obj ServiceAccountToken) *ServiceAccountToken { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("ServiceAccountToken").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// WorkloadList is a list of Workload resources -type WorkloadList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Workload `json:"items"` -} - -func NewWorkload(namespace, name string, obj Workload) *Workload { - obj.APIVersion, obj.Kind = SchemeGroupVersion.WithKind("Workload").ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_register.go deleted file mode 100644 index f67bffcd0..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/project.cattle.io/v3/zz_generated_register.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2024 Rancher Labs, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by main. DO NOT EDIT. - -// +k8s:deepcopy-gen=package -// +groupName=project.cattle.io -package v3 - -import ( - project "github.com/rancher/rancher/pkg/apis/project.cattle.io" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - AppResourceName = "apps" - AppRevisionResourceName = "apprevisions" - BasicAuthResourceName = "basicauths" - CertificateResourceName = "certificates" - DockerCredentialResourceName = "dockercredentials" - NamespacedBasicAuthResourceName = "namespacedbasicauths" - NamespacedCertificateResourceName = "namespacedcertificates" - NamespacedDockerCredentialResourceName = "namespaceddockercredentials" - NamespacedSSHAuthResourceName = "namespacedsshauths" - NamespacedServiceAccountTokenResourceName = "namespacedserviceaccounttokens" - SSHAuthResourceName = "sshauths" - ServiceAccountTokenResourceName = "serviceaccounttokens" - WorkloadResourceName = "workloads" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: project.GroupName, Version: "v3"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &App{}, - &AppList{}, - &AppRevision{}, - &AppRevisionList{}, - &BasicAuth{}, - &BasicAuthList{}, - &Certificate{}, - &CertificateList{}, - &DockerCredential{}, - &DockerCredentialList{}, - &NamespacedBasicAuth{}, - &NamespacedBasicAuthList{}, - &NamespacedCertificate{}, - &NamespacedCertificateList{}, - &NamespacedDockerCredential{}, - &NamespacedDockerCredentialList{}, - &NamespacedSSHAuth{}, - &NamespacedSSHAuthList{}, - &NamespacedServiceAccountToken{}, - &NamespacedServiceAccountTokenList{}, - &SSHAuth{}, - &SSHAuthList{}, - &ServiceAccountToken{}, - &ServiceAccountTokenList{}, - &Workload{}, - &WorkloadList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster.go deleted file mode 100644 index 9a6adb73c..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster.go +++ /dev/null @@ -1,61 +0,0 @@ -package v1 - -import ( - rkev1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1" - "github.com/rancher/wrangler/v3/pkg/genericcondition" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Cluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ClusterSpec `json:"spec"` - Status ClusterStatus `json:"status,omitempty"` -} - -type ClusterSpec struct { - CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` - KubernetesVersion string `json:"kubernetesVersion,omitempty"` - - ClusterAPIConfig *ClusterAPIConfig `json:"clusterAPIConfig,omitempty"` - RKEConfig *RKEConfig `json:"rkeConfig,omitempty"` - LocalClusterAuthEndpoint rkev1.LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty"` - - AgentEnvVars []rkev1.EnvVar `json:"agentEnvVars,omitempty"` - ClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"clusterAgentDeploymentCustomization,omitempty"` - DefaultPodSecurityAdmissionConfigurationTemplateName string `json:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty"` - DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" norman:"type=reference[roleTemplate]"` - EnableNetworkPolicy *bool `json:"enableNetworkPolicy,omitempty" norman:"default=false"` - FleetAgentDeploymentCustomization *AgentDeploymentCustomization `json:"fleetAgentDeploymentCustomization,omitempty"` - - RedeploySystemAgentGeneration int64 `json:"redeploySystemAgentGeneration,omitempty"` -} - -type AgentDeploymentCustomization struct { - AppendTolerations []v1.Toleration `json:"appendTolerations,omitempty"` - OverrideAffinity *v1.Affinity `json:"overrideAffinity,omitempty"` - OverrideResourceRequirements *v1.ResourceRequirements `json:"overrideResourceRequirements,omitempty"` -} - -type ClusterStatus struct { - Ready bool `json:"ready,omitempty"` - ClusterName string `json:"clusterName,omitempty"` - FleetWorkspaceName string `json:"fleetWorkspaceName,omitempty"` - ClientSecretName string `json:"clientSecretName,omitempty"` - AgentDeployed bool `json:"agentDeployed,omitempty"` - ObservedGeneration int64 `json:"observedGeneration"` - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` -} - -type ImportedConfig struct { - KubeConfigSecretName string `json:"kubeConfigSecretName,omitempty"` -} - -type ClusterAPIConfig struct { - ClusterName string `json:"clusterName,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster_types.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster_types.go new file mode 100644 index 000000000..58b23b881 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/cluster_types.go @@ -0,0 +1,522 @@ +package v1 + +import ( + rkev1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1" + "github.com/rancher/wrangler/v3/pkg/genericcondition" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +type ClusterSpec struct { + // CloudCredentialSecretName is the id of the secret used to provision + // the cluster. + // This field must be in the format of "namespace:name". + // +kubebuilder:validation:MaxLength=317 + // +nullable + // +optional + CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` + + // KubernetesVersion is the desired version of RKE2/K3s for the cluster. + // This field is only populated for provisioned and custom clusters. + // +nullable + // +optional + KubernetesVersion string `json:"kubernetesVersion,omitempty"` + + // ClusterAPIConfig is unused. + // Deprecated: this field is unused and will be removed in a future + // version. + // +nullable + // +optional + ClusterAPIConfig *ClusterAPIConfig `json:"clusterAPIConfig,omitempty"` + + // RKEConfig represents the desired state for machine configuration and + // day 2 operations. + // NOTE: This is only populated for provisioned and custom clusters. + // +nullable + // +optional + RKEConfig *RKEConfig `json:"rkeConfig,omitempty"` + + // LocalClusterAuthEndpoint is the configuration for the local cluster + // auth endpoint. + // +optional + LocalClusterAuthEndpoint rkev1.LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty"` + + // AgentEnvVars is a list of environment variables that will be set on + // the cluster agent deployment and system agent service. + // +nullable + // +optional + AgentEnvVars []rkev1.EnvVar `json:"agentEnvVars,omitempty"` + + // ClusterAgentDeploymentCustomization is the customization configuration + // to apply to the cluster agent deployment. + // +nullable + // +optional + ClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"clusterAgentDeploymentCustomization,omitempty"` + + // DefaultPodSecurityAdmissionConfigurationTemplateName is the name of + // the default psact to use when generating a pod security admissions + // config file for the cluster. + // The rancher-webhook will generate a secret containing the rendered + // AdmissionConfiguration resource as yaml, and create a + // machineSelectorFile at /etc/rancher/k3s/config/rancher-psact.yaml or + // /etc/rancher/rke2/config/rancher-psact.yaml for K3s and RKE2 + // respectively. + // +nullable + // +optional + DefaultPodSecurityAdmissionConfigurationTemplateName string `json:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty"` + + // DefaultClusterRoleForProjectMembers is unused. + // Deprecated: this field is unused and will be removed in a future + // version. + // +nullable + // +optional + DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" norman:"type=reference[roleTemplate]"` + + // EnableNetworkPolicy defines whether project network isolation is + // enabled, preventing inter-project communication. + // It can be used with any network plugin that supports Kubernetes + // NetworkPolicy enforcement (e.g. canal, calico, cilium). + // Host network policies are only configured for RKE2 clusters using + // Calico; other CNIs apply host network policies using pod CIDRs. + // +nullable + // +optional + EnableNetworkPolicy *bool `json:"enableNetworkPolicy,omitempty" norman:"default=false"` + + // FleetAgentDeploymentCustomization is the customization configuration + // to apply to the fleet agent deployment. + // +nullable + // +optional + FleetAgentDeploymentCustomization *AgentDeploymentCustomization `json:"fleetAgentDeploymentCustomization,omitempty"` + + // RedeploySystemAgentGeneration is used to force the redeployment of the + // system agent via the system-upgrade controller's system-agent-upgrader + // plan. + // NOTE: The cluster-agent must be connected to the Rancher server so the + // Rancher server can update the system-upgrade-controller plan. + // +optional + RedeploySystemAgentGeneration int64 `json:"redeploySystemAgentGeneration,omitempty"` +} + +type ClusterAPIConfig struct { + // ClusterName is unused. + // Deprecated: this field is unused and will be removed in a future + // version. + // +nullable + // +optional + ClusterName string `json:"clusterName,omitempty"` +} + +// Note: if you add new fields to the RKEConfig, please ensure that you check +// `pkg/controllers/provisioningv2/rke2/provisioningcluster/template.go` file and +// drop the fields when saving a copy of the cluster spec on etcd snapshots, otherwise, +// operations using the new fields will cause unnecessary plan thrashing. + +type RKEConfig struct { + rkev1.ClusterConfiguration `json:",inline"` + + // ETCDSnapshotCreate is the configuration for the etcd snapshot creation + // operation. + // +nullable + // +optional + ETCDSnapshotCreate *rkev1.ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` + + // ETCDSnapshotRestore is the configuration for the etcd snapshot restore + // operation. + // +nullable + // +optional + ETCDSnapshotRestore *rkev1.ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` + + // RotateCertificates is the configuration for the certificate rotation + // operation. + // +nullable + // +optional + RotateCertificates *rkev1.RotateCertificates `json:"rotateCertificates,omitempty"` + + // RotateEncryptionKeys is the configuration for the encryption key + // rotation operation. + // +nullable + // +optional + RotateEncryptionKeys *rkev1.RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` + + // MachinePools is a list of machine pools to be created in the + // provisioning cluster. + // +nullable + // +optional + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=1000 + MachinePools []RKEMachinePool `json:"machinePools,omitempty"` + + // MachinePoolDefaults is the default configuration for machine pools. + // This configuration will be applied to all machine pools unless + // overridden by the machine pool configuration. + // +optional + MachinePoolDefaults RKEMachinePoolDefaults `json:"machinePoolDefaults,omitempty"` + + // InfrastructureRef is a reference to the infrastructure cluster object + // that is required when provisioning a CAPI cluster. + // NOTE: in practice this will always be a rkecluster.rke.cattle.io. + // +nullable + // +optional + InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` +} + +// RKEMachinePool is the configuration for a RKE2/K3s machine pool within a provisioning cluster. +type RKEMachinePool struct { + rkev1.RKECommonNodeConfig `json:",inline"` + + // Paused indicates that the machine pool is paused, preventing CAPI + // controllers from reconciling it. + // NOTE: this only applies to the corresponding generated machine + // deployment object, not the generated machines + // themselves. + // +optional + Paused bool `json:"paused,omitempty"` + + // EtcdRole defines whether the machines provisioned by this pool should + // be etcd nodes. + // +optional + EtcdRole bool `json:"etcdRole,omitempty"` + + // ControlPlaneRole defines whether the machines provisioned by this pool + // should be controlplane nodes. + // +optional + ControlPlaneRole bool `json:"controlPlaneRole,omitempty"` + + // WorkerRole defines whether the machines provisioned by this pool + // should be worker nodes. + // +optional + WorkerRole bool `json:"workerRole,omitempty"` + + // DrainBeforeDelete defines whether the machines provisioned by this + // pool should be drained prior to deletion. + // +optional + DrainBeforeDelete bool `json:"drainBeforeDelete,omitempty"` + + // DrainBeforeDeleteTimeout defines the timeout for draining the machines + // provisioned by this pool before deletion. + // +nullable + // +optional + DrainBeforeDeleteTimeout *metav1.Duration `json:"drainBeforeDeleteTimeout,omitempty"` + + // NodeConfig is a reference to a MachineConfig object that will be used + // to configure the machines provisioned by this pool. + // The NodeConfig object will, in turn, be used to create a corresponding + // MachineTemplate object for the generated machine deployment. + // +nullable + // +required + NodeConfig *corev1.ObjectReference `json:"machineConfigRef,omitempty"` + + // Name is the internal name of the machine pool. + // The generated CAPI machine deployment will be a concatenation of the + // cluster name and the machine pool name which, if over 63 characters is + // truncated to 54 with a sha256sum appended. + // +kubebuilder:validation:MinLength=1 + // +required + Name string `json:"name,omitempty"` + + // DisplayName is the display name for the generated CAPI + // machinedeployment object. + // Deprecated: this field is currently unused and will be removed in a + // future version. + // +nullable + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Quantity is the desired number of machines in the machine pool. + // +kubebuilder:validation:Minimum=0 + // +nullable + // +optional + Quantity *int32 `json:"quantity,omitempty"` + + // RollingUpdate is the configuration for the rolling update of the + // generated machine deployment. + // +nullable + // +optional + RollingUpdate *RKEMachinePoolRollingUpdate `json:"rollingUpdate,omitempty"` + + // MachineDeploymentLabels are the labels to add to the generated + // machine deployment. + // +nullable + // +optional + MachineDeploymentLabels map[string]string `json:"machineDeploymentLabels,omitempty"` + + // MachineDeploymentAnnotations are the annotations to add to the + // generated machine deployment. + // +nullable + // +optional + MachineDeploymentAnnotations map[string]string `json:"machineDeploymentAnnotations,omitempty"` + + // NodeStartupTimeout allows setting the maximum time for + // MachineHealthCheck to consider a Machine unhealthy if a corresponding + // Node isn't associated through a `Spec.ProviderID` field. + // + // The duration set in this field is compared to the greatest of: + // - Cluster's infrastructure ready condition timestamp (if available) + // - Control Plane's initialized condition timestamp (if available) + // - Machine's infrastructure ready condition timestamp (if available) + // - Machine's metadata creation timestamp + // + // Defaults to 10 minutes. + // If you wish to disable this feature, set the value explicitly to 0. + // +nullable + // +optional + NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` + + // UnhealthyNodeTimeout specifies the maximum duration a generated + // MachineHealthCheck should wait before marking a not ready machine as + // unhealthy. + // +nullable + // +optional + UnhealthyNodeTimeout *metav1.Duration `json:"unhealthyNodeTimeout,omitempty"` + + // MaxUnhealthy specifies the minimum number of unhealthy machines that a + // MachineHealthCheck can tolerate before remediating unhealthy machines. + // +nullable + // +optional + MaxUnhealthy *string `json:"maxUnhealthy,omitempty"` + + // UnhealthyRange specifies the number of unhealthy machines in which a + // MachineHealthCheck is allowed to remediate. + // +nullable + // +optional + UnhealthyRange *string `json:"unhealthyRange,omitempty"` + + // MachineOS is the operating system of the machines provisioned by this + // pool. + // This is only used to designate linux versus windows nodes. + // +nullable + // +optional + MachineOS string `json:"machineOS,omitempty"` + + // DynamicSchemaSpec is a copy of the dynamic schema object's spec field + // at the time the machine pool was created. + // Since rancher-machine based MachineTemplates are not api-versioned, + // this field is used to drop new fields added to the driver if it has + // been upgraded since initial provisioning. + // This allows node drivers to be upgraded without triggering a + // reconciliation of the provisioning cluster. + // NOTE: This field can only be removed if the + // "provisioning.cattle.io/allow-dynamic-schema-drop" annotation is + // present on the provisioning cluster object, otherwise it will be + // reinserted. + // +nullable + // +optional + DynamicSchemaSpec string `json:"dynamicSchemaSpec,omitempty"` + + // HostnameLengthLimit defines the maximum length of the hostname for + // machines in this pool. + // For Windows nodes utilizing NETBIOS authentication, a maximum of 15 + // should be set to ensure all nodes adhere to the protocol's naming + // requirements. + // +kubebuilder:validation:Minimum=10 + // +kubebuilder:validation:Maximum=63 + // +optional + HostnameLengthLimit int `json:"hostnameLengthLimit,omitempty"` +} + +type RKEMachinePoolRollingUpdate struct { + // MaxUnavailable is the maximum number of machines that can be + // unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired + // machines (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 0. + // Example: when this is set to 30%, the old MachineSet can be scaled + // down to 70% of desired machines immediately when the rolling update + // starts. Once new machines are ready, old MachineSet can be scaled + // down further, followed by scaling up the new MachineSet, ensuring + // that the total number of machines available at all times + // during the update is at least 70% of desired machines. + // +nullable + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + + // MaxSurge is the maximum number of machines that can be scheduled above + // the desired number of machines. + // Value can be an absolute number (ex: 5) or a percentage of desired + // machines (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 1. + // Example: when this is set to 30%, the new MachineSet can be scaled + // up immediately when the rolling update starts, such that the total + // number of old and new machines do not exceed 130% of desired + // machines. Once old machines have been killed, new MachineSet can + // be scaled up further, ensuring that total number of machines running + // at any time during the update is at most 130% of desired machines. + // +nullable + // +optional + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` +} + +// RKEMachinePoolDefaults defines the values to set for all machine pools. +// If a value has not been explicitly defined for a machine pool but a default has been set here, then this will be used as a fallback value. +// If a value has been explicitly defined for a machine pool, that value will be used instead. +// NOTE: There is no difference between a zero value and a default value when determining precedence. +type RKEMachinePoolDefaults struct { + // HostnameLengthLimit defines the maximum length of the hostname for + // machines in this pool. + // For Windows nodes utilizing NETBIOS authentication, a maximum of 15 + // should be set to ensure all nodes adhere to the protocol's naming + // requirements. + // +kubebuilder:validation:Minimum=10 + // +kubebuilder:validation:Maximum=63 + // +optional + HostnameLengthLimit int `json:"hostnameLengthLimit,omitempty"` +} + +// AgentDeploymentCustomization represents the customization options for various agent deployments. +type AgentDeploymentCustomization struct { + // AppendTolerations is a list of tolerations that will be appended to + // the agent deployment. + // +nullable + // +optional + AppendTolerations []corev1.Toleration `json:"appendTolerations,omitempty"` + + // OverrideAffinity is an affinity that will be used to override the + // agent deployment's affinity. + // +nullable + // +optional + OverrideAffinity *corev1.Affinity `json:"overrideAffinity,omitempty"` + + // OverrideResourceRequirements defines the limits, requests, and + // claims of compute resources for a given container. + // +nullable + // +optional + OverrideResourceRequirements *corev1.ResourceRequirements `json:"overrideResourceRequirements,omitempty"` + + // SchedulingCustomization is an optional configuration that will be + // used to override the agent deployment's scheduling customization. + // +nullable + // +optional + SchedulingCustomization *AgentSchedulingCustomization `json:"schedulingCustomization,omitempty"` +} + +type AgentSchedulingCustomization struct { + // PriorityClass is the configuration for the priority class associated + // with the agent deployment. + // +nullable + // +optional + PriorityClass *PriorityClassSpec `json:"priorityClass,omitempty"` + + // PodDisruptionBudget is the configuration for the pod disruption budget + // associated with the agent deployment. + // +nullable + // +optional + PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` +} + +type PriorityClassSpec struct { + // Value represents the integer value of this priority class. + // This is the actual priority value that pods receive when their + // associated deployment specifies the name of this class in the spec. + // +kubebuilder:validation:Maximum=1000000000 + // +kubebuilder:validation:Minimum=-1000000000 + // +optional + Value int `json:"value,omitempty"` + + // PreemptionPolicy describes a policy for if/when to preempt a pod. + // +nullable + // +optional + PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty"` +} + +// PodDisruptionBudgetSpec is the spec for the desired pod disruption budget for the corresponding agent deployment. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at least "minAvailable" will still be + // available after the eviction, i.e. even in the absence of the evicted + // pod. + // One can prevent all voluntary evictions by specifying "100%". + // +kubebuilder:validation:Pattern="^((([1-9]|[1-9][0-9]|100)%)|([1-9][0-9]*|0)|)$" + // +kubebuilder:validation:MaxLength=10 + // +nullable + // +optional + MinAvailable string `json:"minAvailable,omitempty"` + + // An eviction is allowed if at most "maxUnavailable" pods are + // unavailable after the eviction, i.e. even in the absence of the + // evicted pod. + // One can prevent all voluntary evictions by specifying 0. + // This is a mutually exclusive setting with "minAvailable". + // +kubebuilder:validation:Pattern="^((([1-9]|[1-9][0-9]|100)%)|([1-9][0-9]*|0)|)$" + // +kubebuilder:validation:MaxLength=10 + // +nullable + // +optional + MaxUnavailable string `json:"maxUnavailable,omitempty"` +} + +type ClusterStatus struct { + // Ready reflects whether the cluster's ready state has previously been + // reported as true. + // +optional + Ready bool `json:"ready,omitempty"` + + // Name of the cluster.management.cattle.io object that relates to this + // cluster. + // +optional + ClusterName string `json:"clusterName,omitempty"` + + // FleetWorkspaceName is the name of the fleet workspace that the cluster + // belongs to. + // Defaults to the namespace of the cluster object, which is usually + // "fleet-default". + // If the provisioningv2-fleet-workspace-back-population feature is + // enabled and the cluster has the + // "provisioning.cattle.io/fleet-workspace-name" annotation, this will be + // set to the value of the annotation. + // +kubebuilder:validation:MaxLength=63 + // +optional + FleetWorkspaceName string `json:"fleetWorkspaceName,omitempty"` + + // ClientSecretName is the name of the kubeconfig secret that is used to + // connect to the cluster. + // This secret is typically named "-kubeconfig" and lives + // in the namespace of the cluster object. + // +kubebuilder:validation:MaxLength=253 + // +optional + ClientSecretName string `json:"clientSecretName,omitempty"` + + // AgentDeployed reflects whether the cluster agent has been deployed + // successfully. + // +optional + AgentDeployed bool `json:"agentDeployed,omitempty"` + + // ObservedGeneration is the most recent generation for which the + // management cluster object was generated for the corresponding + // provisioning cluster spec. + // +optional + ObservedGeneration int64 `json:"observedGeneration"` + + // Conditions is a representation of the Cluster's current state. + // +optional + // +listType=map + // +listMapKey=type + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` +} + +// +genclient +// +kubebuilder:resource:path=clusters,scope=Namespaced,categories=provisioning +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels={"auth.cattle.io/cluster-indexed=true"} +// +kubebuilder:printcolumn:name="Version",type=string,JSONPath=".spec.kubernetesVersion" +// +kubebuilder:printcolumn:name="Cluster Name",type=string,JSONPath=".status.clusterName" +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Kubeconfig",type=date,JSONPath=".status.clientSecretName" +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.ready" +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Cluster is the Schema for the provisioning API. +type Cluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the desired state of the cluster. + // +optional + Spec ClusterSpec `json:"spec,omitempty"` + // Status is the observed state of the cluster. + // +optional + Status ClusterStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/doc.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/doc.go index 85ef2f007..c7b5a12d7 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/doc.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/rke.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/rke.go deleted file mode 100644 index f76e95dcb..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/rke.go +++ /dev/null @@ -1,88 +0,0 @@ -package v1 - -import ( - rkev1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -type RKEMachinePool struct { - rkev1.RKECommonNodeConfig - - Paused bool `json:"paused,omitempty"` - EtcdRole bool `json:"etcdRole,omitempty"` - ControlPlaneRole bool `json:"controlPlaneRole,omitempty"` - WorkerRole bool `json:"workerRole,omitempty"` - DrainBeforeDelete bool `json:"drainBeforeDelete,omitempty"` - DrainBeforeDeleteTimeout *metav1.Duration `json:"drainBeforeDeleteTimeout,omitempty"` - NodeConfig *corev1.ObjectReference `json:"machineConfigRef,omitempty" wrangler:"required"` - Name string `json:"name,omitempty" wrangler:"required"` - DisplayName string `json:"displayName,omitempty"` - Quantity *int32 `json:"quantity,omitempty"` - RollingUpdate *RKEMachinePoolRollingUpdate `json:"rollingUpdate,omitempty"` - MachineDeploymentLabels map[string]string `json:"machineDeploymentLabels,omitempty"` - MachineDeploymentAnnotations map[string]string `json:"machineDeploymentAnnotations,omitempty"` - NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - UnhealthyNodeTimeout *metav1.Duration `json:"unhealthyNodeTimeout,omitempty"` - MaxUnhealthy *string `json:"maxUnhealthy,omitempty"` - UnhealthyRange *string `json:"unhealthyRange,omitempty"` - MachineOS string `json:"machineOS,omitempty"` - DynamicSchemaSpec string `json:"dynamicSchemaSpec,omitempty"` - HostnameLengthLimit int `json:"hostnameLengthLimit,omitempty"` -} - -type RKEMachinePoolRollingUpdate struct { - // The maximum number of machines that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired - // machines (ex: 10%). - // Absolute number is calculated from percentage by rounding down. - // This can not be 0 if MaxSurge is 0. - // Defaults to 0. - // Example: when this is set to 30%, the old MachineSet can be scaled - // down to 70% of desired machines immediately when the rolling update - // starts. Once new machines are ready, old MachineSet can be scaled - // down further, followed by scaling up the new MachineSet, ensuring - // that the total number of machines available at all times - // during the update is at least 70% of desired machines. - // +optional - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - - // The maximum number of machines that can be scheduled above the - // desired number of machines. - // Value can be an absolute number (ex: 5) or a percentage of - // desired machines (ex: 10%). - // This can not be 0 if MaxUnavailable is 0. - // Absolute number is calculated from percentage by rounding up. - // Defaults to 1. - // Example: when this is set to 30%, the new MachineSet can be scaled - // up immediately when the rolling update starts, such that the total - // number of old and new machines do not exceed 130% of desired - // machines. Once old machines have been killed, new MachineSet can - // be scaled up further, ensuring that total number of machines running - // at any time during the update is at most 130% of desired machines. - // +optional - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` -} - -// Note: if you add new fields to the RKEConfig, please ensure that you check -// `pkg/controllers/provisioningv2/rke2/provisioningcluster/template.go` file and -// drop the fields when saving a copy of the cluster spec on etcd snapshots, otherwise, -// operations using the new fields will cause unnecessary plan thrashing. - -type RKEConfig struct { - rkev1.RKEClusterSpecCommon - - ETCDSnapshotCreate *rkev1.ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` - ETCDSnapshotRestore *rkev1.ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` - RotateCertificates *rkev1.RotateCertificates `json:"rotateCertificates,omitempty"` - RotateEncryptionKeys *rkev1.RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` - - MachinePools []RKEMachinePool `json:"machinePools,omitempty"` - MachinePoolDefaults RKEMachinePoolDefaults `json:"machinePoolDefaults,omitempty"` - InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` -} - -type RKEMachinePoolDefaults struct { - HostnameLengthLimit int `json:"hostnameLengthLimit,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_deepcopy.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_deepcopy.go index 235c3e6f5..f82e774ad 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -50,6 +50,11 @@ func (in *AgentDeploymentCustomization) DeepCopyInto(out *AgentDeploymentCustomi *out = new(corev1.ResourceRequirements) (*in).DeepCopyInto(*out) } + if in.SchedulingCustomization != nil { + in, out := &in.SchedulingCustomization, &out.SchedulingCustomization + *out = new(AgentSchedulingCustomization) + (*in).DeepCopyInto(*out) + } return } @@ -63,6 +68,32 @@ func (in *AgentDeploymentCustomization) DeepCopy() *AgentDeploymentCustomization return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AgentSchedulingCustomization) DeepCopyInto(out *AgentSchedulingCustomization) { + *out = *in + if in.PriorityClass != nil { + in, out := &in.PriorityClass, &out.PriorityClass + *out = new(PriorityClassSpec) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(PodDisruptionBudgetSpec) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSchedulingCustomization. +func (in *AgentSchedulingCustomization) DeepCopy() *AgentSchedulingCustomization { + if in == nil { + return nil + } + out := new(AgentSchedulingCustomization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Cluster) DeepCopyInto(out *Cluster) { *out = *in @@ -209,17 +240,38 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImportedConfig) DeepCopyInto(out *ImportedConfig) { +func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec. +func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec { + if in == nil { + return nil + } + out := new(PodDisruptionBudgetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PriorityClassSpec) DeepCopyInto(out *PriorityClassSpec) { *out = *in + if in.PreemptionPolicy != nil { + in, out := &in.PreemptionPolicy, &out.PreemptionPolicy + *out = new(corev1.PreemptionPolicy) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportedConfig. -func (in *ImportedConfig) DeepCopy() *ImportedConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassSpec. +func (in *PriorityClassSpec) DeepCopy() *PriorityClassSpec { if in == nil { return nil } - out := new(ImportedConfig) + out := new(PriorityClassSpec) in.DeepCopyInto(out) return out } @@ -227,7 +279,7 @@ func (in *ImportedConfig) DeepCopy() *ImportedConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEConfig) DeepCopyInto(out *RKEConfig) { *out = *in - in.RKEClusterSpecCommon.DeepCopyInto(&out.RKEClusterSpecCommon) + in.ClusterConfiguration.DeepCopyInto(&out.ClusterConfiguration) if in.ETCDSnapshotCreate != nil { in, out := &in.ETCDSnapshotCreate, &out.ETCDSnapshotCreate *out = new(rkecattleiov1.ETCDSnapshotCreate) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_list_types.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_list_types.go index bbc84979c..50fd99eaa 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_list_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_list_types.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_register.go index 8a4e09bc3..89901532c 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/zz_generated_register.go index 13b532b40..738f309e9 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/bootstrap.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/bootstrap.go deleted file mode 100644 index 105e507cd..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/bootstrap.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type RKEBootstrap struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RKEBootstrapSpec `json:"spec"` - Status RKEBootstrapStatus `json:"status,omitempty"` -} - -type RKEBootstrapSpec struct { - ClusterName string `json:"clusterName,omitempty"` -} - -type RKEBootstrapStatus struct { - // Ready indicates the BootstrapData field is ready to be consumed - Ready bool `json:"ready,omitempty"` - - // DataSecretName is the name of the secret that stores the bootstrap data script. - // +optional - DataSecretName *string `json:"dataSecretName,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type RKEBootstrapTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RKEBootstrapTemplateSpec `json:"spec" wrangler:"required"` -} - -type RKEBootstrapTemplateSpec struct { - ClusterName string `json:"clusterName,omitempty"` - Template RKEBootstrap `json:"template,omitempty" wrangler:"required"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/certificaterotation.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/certificaterotation.go deleted file mode 100644 index 0a1f79b20..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/certificaterotation.go +++ /dev/null @@ -1,6 +0,0 @@ -package v1 - -type RotateCertificates struct { - Generation int64 `json:"generation,omitempty"` - Services []string `json:"services,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster.go deleted file mode 100644 index 237d00f2e..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster.go +++ /dev/null @@ -1,171 +0,0 @@ -package v1 - -import ( - "github.com/rancher/wrangler/v3/pkg/genericcondition" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type RKECluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RKEClusterSpec `json:"spec"` - Status RKEClusterStatus `json:"status,omitempty"` -} - -type RKEClusterStatus struct { - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` - Ready bool `json:"ready,omitempty"` -} - -type NetworkingStackPreference string - -const ( - // DualStackPreference signifies a dual stack networking strategy, defaulting "localhost" for communication on the - // loopback interface - DualStackPreference = NetworkingStackPreference("dual") - - // SingleStackIPv4Preference signifies a single stack IPv4 networking strategy, defaulting "127.0.0.1" for - // communication on the loopback interface - SingleStackIPv4Preference = NetworkingStackPreference("ipv4") - - // SingleStackIPv6Preference signifies a single stack IPv6 networking strategy, defaulting "::1" for - // communication on the loopback interface - SingleStackIPv6Preference = NetworkingStackPreference("ipv6") - - // DefaultStackPreference is the stack preference used when no preference is defined, or is invalid. Defaults to - // "127.0.0.1" to support existing behavior. - DefaultStackPreference = SingleStackIPv4Preference -) - -// Networking contains information regarding the desired and actual networking stack of the cluster. -type Networking struct { - // Specifies which networking stack to prefer for external cluster communication. In practice, this is used by the - // planner to render the various probes to force IPv4, IPv6, or default to localhost. There is currently no - // sanitization or validation as cluster configuration can be specified with machineGlobalConfig and - // machineSelectorConfig, which although easy to instrument to determine a potential interface, user defined - // configuration can be specified in the `/etc/rancher//config.yaml.d` directory either manually or via - // cloud-init, and there is currently no mechanism to extract the completely rendered configuration via the planner - // nor various engines themselves. - StackPreference NetworkingStackPreference `json:"stackPreference,omitempty"` -} - -type DataDirectories struct { - // Data directory for the system-agent connection info and plans - SystemAgent string `json:"systemAgent,omitempty"` - // Data directory for provisioning related files (idempotency) - Provisioning string `json:"provisioning,omitempty"` - // Data directory for the k8s distro - K8sDistro string `json:"k8sDistro,omitempty"` -} - -type RKEClusterSpecCommon struct { - UpgradeStrategy ClusterUpgradeStrategy `json:"upgradeStrategy,omitempty"` - ChartValues GenericMap `json:"chartValues,omitempty" wrangler:"nullable"` - MachineGlobalConfig GenericMap `json:"machineGlobalConfig,omitempty" wrangler:"nullable"` - MachineSelectorConfig []RKESystemConfig `json:"machineSelectorConfig,omitempty"` - MachineSelectorFiles []RKEProvisioningFiles `json:"machineSelectorFiles,omitempty"` - AdditionalManifest string `json:"additionalManifest,omitempty"` - Registries *Registry `json:"registries,omitempty"` - ETCD *ETCD `json:"etcd,omitempty"` - - // Networking contains information regarding the desired and actual networking stack of the cluster. - Networking *Networking `json:"networking,omitempty"` - - // DataDirectories contains the configuration for the data directories typically stored within /var/lib/rancher. - DataDirectories DataDirectories `json:"dataDirectories,omitempty"` - - // Increment to force all nodes to re-provision - ProvisionGeneration int `json:"provisionGeneration,omitempty"` -} - -type LocalClusterAuthEndpoint struct { - Enabled bool `json:"enabled,omitempty"` - FQDN string `json:"fqdn,omitempty"` - CACerts string `json:"caCerts,omitempty"` -} - -type RKESystemConfig struct { - MachineLabelSelector *metav1.LabelSelector `json:"machineLabelSelector,omitempty"` - Config GenericMap `json:"config,omitempty" wrangler:"nullable"` -} - -type RKEProvisioningFiles struct { - MachineLabelSelector *metav1.LabelSelector `json:"machineLabelSelector,omitempty"` - FileSources []ProvisioningFileSource `json:"fileSources,omitempty"` -} - -type RKEClusterSpec struct { - // Not used in anyway, just here to make cluster-api happy - ControlPlaneEndpoint *capi.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` -} - -type ClusterUpgradeStrategy struct { - // How many controlplane nodes should be upgrade at time, defaults to 1, 0 is infinite. Percentages are - // accepted too. - ControlPlaneConcurrency string `json:"controlPlaneConcurrency,omitempty"` - ControlPlaneDrainOptions DrainOptions `json:"controlPlaneDrainOptions,omitempty"` - - // How many workers should be upgraded at a time - WorkerConcurrency string `json:"workerConcurrency,omitempty"` - WorkerDrainOptions DrainOptions `json:"workerDrainOptions,omitempty"` -} - -type DrainOptions struct { - // Enable will require nodes be drained before upgrade - Enabled bool `json:"enabled"` - // Drain node even if there are pods not managed by a ReplicationController, Job, or DaemonSet - // Drain will not proceed without Force set to true if there are such pods - Force bool `json:"force"` - // If there are DaemonSet-managed pods, drain will not proceed without IgnoreDaemonSets set to true - // (even when set to true, kubectl won't delete pods - so setting default to true) - IgnoreDaemonSets *bool `json:"ignoreDaemonSets"` - // IgnoreErrors Ignore errors occurred between drain nodes in group - IgnoreErrors bool `json:"ignoreErrors"` - // Continue even if there are pods using emptyDir - DeleteEmptyDirData bool `json:"deleteEmptyDirData"` - // DisableEviction forces drain to use delete rather than evict - DisableEviction bool `json:"disableEviction"` - // Period of time in seconds given to each pod to terminate gracefully. - // If negative, the default value specified in the pod will be used - GracePeriod int `json:"gracePeriod"` - // Time to wait (in seconds) before giving up for one try - Timeout int `json:"timeout"` - // SkipWaitForDeleteTimeoutSeconds If pod DeletionTimestamp older than N seconds, skip waiting for the pod. Seconds must be greater than 0 to skip. - SkipWaitForDeleteTimeoutSeconds int `json:"skipWaitForDeleteTimeoutSeconds"` - - // PreDrainHooks A list of hooks to run prior to draining a node - PreDrainHooks []DrainHook `json:"preDrainHooks"` - // PostDrainHook A list of hooks to run after draining AND UPDATING a node - PostDrainHooks []DrainHook `json:"postDrainHooks"` -} - -type DrainHook struct { - // Annotation This annotation will need to be populated on the machine-plan secret with the value from the annotation - // "rke.cattle.io/pre-drain" before the planner will continue with drain the specific node. The annotation - // "rke.cattle.io/pre-drain" is used for pre-drain and "rke.cattle.io/post-drain" is used for post drain. - Annotation string `json:"annotation,omitempty"` -} - -type ProvisioningFileSource struct { - Secret K8sObjectFileSource `json:"secret,omitempty"` - ConfigMap K8sObjectFileSource `json:"configMap,omitempty"` -} - -type K8sObjectFileSource struct { - Name string `json:"name"` - Items []KeyToPath `json:"items,omitempty"` - DefaultPermissions string `json:"defaultPermissions,omitempty"` -} - -type KeyToPath struct { - Key string `json:"key"` - Path string `json:"path"` - Dynamic bool `json:"dynamic,omitempty"` - Permissions string `json:"permissions,omitempty"` - Hash string `json:"hash,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster_configuration_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster_configuration_types.go new file mode 100644 index 000000000..0f5dd9463 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/cluster_configuration_types.go @@ -0,0 +1,411 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type ClusterConfiguration struct { + // UpgradeStrategy contains the concurrency and drain configuration to be + // used when upgrading machine pools of servers and agents. + // +optional + UpgradeStrategy ClusterUpgradeStrategy `json:"upgradeStrategy,omitempty"` + + // ChartValues is a map whose keys correspond to charts to be installed + // by the distro, with values corresponding to the helm values + // configurable in the chart. + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + // +optional + ChartValues GenericMap `json:"chartValues,omitempty"` + + // MachineGlobalConfig is a list of distro arguments which will be copied + // to /etc/rancher//config.yaml.d/50-rancher.yaml for all + // machines. + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + // +optional + MachineGlobalConfig GenericMap `json:"machineGlobalConfig,omitempty"` + + // MachineSelectorConfig is a list of distro arguments which will be + // copied to /etc/rancher//config.yaml.d/50-rancher.yaml if the + // machine matches the label selector. + // +nullable + // +optional + MachineSelectorConfig []RKESystemConfig `json:"machineSelectorConfig,omitempty"` + + // MachineSelectorFiles is a list of files which will be copied to the + // machine if the machine matches the label selector. + // +nullable + // +optional + MachineSelectorFiles []RKEProvisioningFiles `json:"machineSelectorFiles,omitempty"` + + // AdditionalManifest is a string containing a yaml blob to insert in the + // /var/lib/rancher//server/manifests/rancher/addons.yaml file. + // The distro will automatically create these resources. + // Resources created as additional manifests will be deleted if removed + // from additional manifests. + // +nullable + // +optional + AdditionalManifest string `json:"additionalManifest,omitempty"` + + // Registries is the list of mirrors and configurations for the cluster's + // container registries. + // +nullable + // +optional + Registries *Registry `json:"registries,omitempty"` + + // ETCD contains the etcd snapshot configuration for the cluster. + // +nullable + // +optional + ETCD *ETCD `json:"etcd,omitempty"` + + // Networking contains information regarding the desired networking stack + // of the cluster. + // +nullable + // +optional + Networking *Networking `json:"networking,omitempty"` + + // DataDirectories contains the configuration for the data directories + // typically stored within /var/lib/rancher. The data directories must be + // configured via the provisioning cluster object and are immutable once + // set. + // +optional + DataDirectories DataDirectories `json:"dataDirectories,omitempty"` + + // ProvisionGeneration is used to force the planner to reconcile the + // cluster, regardless of whether a reconciliation is required. + // +optional + ProvisionGeneration int `json:"provisionGeneration,omitempty"` +} + +type ClusterUpgradeStrategy struct { + // ControlPlaneConcurrency is the number of server nodes that should be + // upgraded at a time. + // The default value is 1, a 0 value is infinite. + // Percentages are also accepted. + // +kubebuilder:validation:Pattern="^((([1-9]|[1-9][0-9]|100)%)|([1-9][0-9]*|0)|)$" + // +kubebuilder:validation:MaxLength=10 + // +nullable + // +optional + ControlPlaneConcurrency string `json:"controlPlaneConcurrency,omitempty"` + + // ControlPlaneDrainOptions is the drain configuration to be used when + // draining controlplane nodes, during both upgrades and machine + // rollouts. + // +optional + ControlPlaneDrainOptions DrainOptions `json:"controlPlaneDrainOptions,omitempty"` + + // WorkerConcurrency is the number of worker nodes that should be + // upgraded at a time. + // The default value is 1, a 0 value is infinite. + // Percentages are also accepted. + // +kubebuilder:validation:Pattern="^((([1-9]|[1-9][0-9]|100)%)|([1-9][0-9]*|0)|)$" + // +kubebuilder:validation:MaxLength=10 + // +nullable + // +optional + WorkerConcurrency string `json:"workerConcurrency,omitempty"` + + // WorkerDrainOptions is the drain configuration to be used when draining + // worker nodes, during both upgrades and machine rollouts. + // +optional + WorkerDrainOptions DrainOptions `json:"workerDrainOptions,omitempty"` +} + +// DrainOptions contains the drain configuration for a machine pool. +type DrainOptions struct { + // Enabled specifies whether draining is required for the machine pool + // before upgrading. + // +optional + Enabled bool `json:"enabled"` + + // Force specifies whether to drain the node even if there are pods not + // managed by a ReplicationController, Job, or DaemonSet. + // Drain will not proceed without Force set to true if there are such + // pods. + // +optional + Force bool `json:"force"` + + // IgnoreDaemonSets specifies whether to ignore DaemonSet-managed pods. + // If there are DaemonSet-managed pods, drain will not proceed without + // IgnoreDaemonSets set to true (even when set to true, kubectl won't + // delete pods - so an unset value will default to true). + // +nullable + // +optional + IgnoreDaemonSets *bool `json:"ignoreDaemonSets,omitempty"` + + // IgnoreErrors Ignore errors occurred between drain nodes in group + // NOTE: currently unimplemented + // +optional + IgnoreErrors bool `json:"ignoreErrors,omitempty"` + + // DeleteEmptyDirData instructs the drain operation to proceed even if + // there are pods using emptyDir. + // +optional + DeleteEmptyDirData bool `json:"deleteEmptyDirData"` + + // DisableEviction forces drain to use delete rather than evict. + // +optional + DisableEviction bool `json:"disableEviction"` + + // GracePeriod is the period of time in seconds given to each pod to + // terminate gracefully. + // If negative, the default value specified in the pod will be used. + // +optional + GracePeriod int `json:"gracePeriod"` + + // Timeout is the time to wait (in seconds) before giving up for one try. + // +optional + Timeout int `json:"timeout"` + + // SkipWaitForDeleteTimeoutSeconds defines how long the draining + // operation should wait for a given to be removed after deletion. + // If the pod's DeletionTimestamp is older than N seconds, the drain + // operation will move on. + // Seconds must be greater than 0 to skip. + // +optional + SkipWaitForDeleteTimeoutSeconds int `json:"skipWaitForDeleteTimeoutSeconds"` + + // PreDrainHooks is a list of hooks to run before draining a node. + // +nullable + // +optional + PreDrainHooks []DrainHook `json:"preDrainHooks,omitempty"` + + // PostDrainHooks is a list of hooks to run after draining and updating + // a node. + // +nullable + // +optional + PostDrainHooks []DrainHook `json:"postDrainHooks,omitempty"` +} + +type DrainHook struct { + // Annotation that will need to be populated on the machine-plan secret + // with the value from the annotation "rke.cattle.io/pre-drain" before + // the planner will continue to drain the specific node. + // The annotation "rke.cattle.io/pre-drain" is used for pre-drain and + // "rke.cattle.io/post-drain" is used for post-drain. + // +kubebuilder:validation:MaxLength=317 + // +nullable + // +optional + Annotation string `json:"annotation,omitempty"` +} + +type RKESystemConfig struct { + // MachineLabelSelector is a label selector used to match machines. + // An empty/null label selector matches all machines. + // +nullable + // +optional + MachineLabelSelector *metav1.LabelSelector `json:"machineLabelSelector,omitempty"` + + // Config is a map of distro arguments which will be copied to + // /etc/rancher//config.yaml.d/50-rancher.yaml if the machine + // matches the label selector. + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + // +optional + Config GenericMap `json:"config,omitempty"` +} + +type RKEProvisioningFiles struct { + // MachineLabelSelector is a label selector used to match machines. + // An empty/null label selector matches all machines. + // +nullable + // +optional + MachineLabelSelector *metav1.LabelSelector `json:"machineLabelSelector,omitempty"` + + // FileSources is a list of file sources that will be copied to the + // machine if the machine matches the label selector. + // +nullable + // +optional + FileSources []ProvisioningFileSource `json:"fileSources,omitempty"` +} + +type ProvisioningFileSource struct { + // Secret is the configuration for mapping a secret containing arbitrary + // data to a series of files on the system-agent host. + // +optional + Secret K8sObjectFileSource `json:"secret,omitempty"` + + // ConfigMap is the configuration for mapping a configmap containing + // arbitrary data to a series of files on the system-agent host. + // +optional + ConfigMap K8sObjectFileSource `json:"configMap,omitempty"` +} + +type K8sObjectFileSource struct { + // Name is the name of the resource. + // The namespace is required to be the same as the related + // RKEControlPlane object. + // +kubebuilder:validation:MaxLength=253 + // +nullable + // +required + Name string `json:"name"` + + // Items is a list of mappings from the keys within the resource to the + // files to create on the downstream machine. + // +nullable + // +optional + Items []KeyToPath `json:"items,omitempty"` + + // DefaultPermissions provides a fallback value for all files within the + // configmap/secret. + // +nullable + // +optional + DefaultPermissions string `json:"defaultPermissions,omitempty"` +} + +type KeyToPath struct { + // Key is the key used to index the associated configmap or secret. + // +nullable + Key string `json:"key"` + + // Path is the absolute path the data within the configmap or secret + // should be written to by the system-agent. + // +nullable + // +required + Path string `json:"path"` + + // Dynamic indicates whether the rendered file should be included when + // calculating the restart stamp i.e. whether changes to this resource + // should trigger draining when reconciling. + // +optional + Dynamic bool `json:"dynamic,omitempty"` + + // Permissions specifies the desired permissions for this file on the + // machine's filesystem. + // +nullable + // +optional + Permissions string `json:"permissions,omitempty"` + + // Hash is used to ensure that the data within the configmap or secret + // matches the expected sha256sum of the value at the provided key. + // +nullable + // +optional + Hash string `json:"hash,omitempty"` +} + +type Registry struct { + // Mirrors are namespace to mirror mapping for all namespaces. + // +nullable + // +optional + Mirrors map[string]Mirror `json:"mirrors,omitempty"` + + // Configs are configs for each registry. + // The key is the FDQN or IP of the registry. + // +nullable + // +optional + Configs map[string]RegistryConfig `json:"configs,omitempty"` +} + +// Mirror contains the config related to the registry mirror +type Mirror struct { + // Endpoints are endpoints for a namespace. CRI plugin will try the + // endpoints one by one until a working one is found. + // The endpoint must be a valid url with host specified. + // The scheme, host, and path from the endpoint URL will be used. + // +nullable + // +optional + Endpoints []string `json:"endpoint,omitempty"` + + // Rewrites are repository rewrite rules for a Mirror. + // When fetching image resources from a registry, a regular expression + // can be used to match the image name and modify it using + // the corresponding value from the map in the resource request. + // +nullable + // +optional + Rewrites map[string]string `json:"rewrite,omitempty"` +} + +// RegistryConfig contains configuration used to communicate with the registry. +type RegistryConfig struct { + // AuthConfigSecretName contains information to authenticate to the + // registry. + // The accepted keys are as follows: + // - username + // - password + // - auth + // - identityToken + // +kubebuilder:validation:MaxLength=253 + // +nullable + // +optional + AuthConfigSecretName string `json:"authConfigSecretName,omitempty"` + + // TLSSecretName is the name of the secret residing within the same + // namespace as the RKEControlPlane object that contains the keys "Cert" + // and "Key" which are used when creating the transport that communicates + // with the registry. + // +kubebuilder:validation:MaxLength=253 + // +nullable + // +optional + TLSSecretName string `json:"tlsSecretName,omitempty"` + + // CABundle is the CA chain used when communicating with the image + // registry. + // +nullable + // +optional + CABundle []byte `json:"caBundle,omitempty"` + + // InsecureSkipVerify indicates whether validation of the server's + // certificate should be skipped. + // +optional + InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` +} + +type ETCD struct { + // DisableSnapshots disables the creation of snapshots for the cluster. + // +optional + DisableSnapshots bool `json:"disableSnapshots,omitempty"` + + // SnapshotScheduleCron is the cron schedule for the snapshot creation. + // +nullable + // +optional + SnapshotScheduleCron string `json:"snapshotScheduleCron,omitempty"` + + // SnapshotRetention is the number of snapshots the downstream cluster + // should retain per snapshot generation. + // +optional + SnapshotRetention int `json:"snapshotRetention,omitempty"` + + // S3 defines the S3 configuration for the cluster if enabled. + // +nullable + // +optional + S3 *ETCDSnapshotS3 `json:"s3,omitempty"` +} + +// Networking contains information regarding the desired and actual networking stack of the cluster. +type Networking struct { + // StackPreference specifies which networking stack to prefer for + // external cluster communication. + // In practice, this is used by the planner to render the various probes + // to force IPv4, IPv6, or default to localhost. + // There is currently no sanitization or validation as cluster + // configuration can be specified with machineGlobalConfig and + // machineSelectorConfig, which although easy to instrument to determine + // a potential interface, user defined configuration can be specified in + // the `/etc/rancher//config.yaml.d` directory either manually + // or via cloud-init, and there is currently no mechanism to extract the + // completely rendered configuration via the planner nor various engines + // themselves. + // +nullable + // +optional + StackPreference NetworkingStackPreference `json:"stackPreference,omitempty"` +} + +type DataDirectories struct { + // SystemAgent is the data directory for the system-agent connection info + // and plans. + // +nullable + // +optional + SystemAgent string `json:"systemAgent,omitempty"` + + // Provisioning is the data directory for provisioning related files + // (e.g. idempotency). + // +nullable + // +optional + Provisioning string `json:"provisioning,omitempty"` + + // K8sDistro is the data directory for the k8s distro, i.e. the data-dir + // arg. + // +nullable + // +optional + K8sDistro string `json:"k8sDistro,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/common_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/common_types.go new file mode 100644 index 000000000..36e8528e6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/common_types.go @@ -0,0 +1,117 @@ +package v1 + +import ( + "encoding/json" + + "github.com/rancher/wrangler/v3/pkg/data/convert" +) + +const ( + AuthConfigSecretType = "rke.cattle.io/auth-config" + + UsernameAuthConfigSecretKey = "username" + PasswordAuthConfigSecretKey = "password" + AuthAuthConfigSecretKey = "auth" + IdentityTokenAuthConfigSecretKey = "identityToken" +) + +type GenericMap struct { + Data map[string]any `json:"-"` +} + +func (in GenericMap) MarshalJSON() ([]byte, error) { + return json.Marshal(in.Data) +} + +func (in *GenericMap) UnmarshalJSON(data []byte) error { + in.Data = map[string]any{} + return json.Unmarshal(data, &in.Data) +} + +func (in *GenericMap) DeepCopyInto(out *GenericMap) { + out.Data = map[string]any{} + if err := convert.ToObj(in.Data, &out.Data); err != nil { + panic(err) + } +} + +type LocalClusterAuthEndpoint struct { + // Enabled indicates whether the local cluster auth endpoint should be + // enabled. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // FQDN is the fully qualified domain name of the local cluster auth + // endpoint. + // +nullable + // +optional + FQDN string `json:"fqdn,omitempty"` + + // CACerts is the CA certificate for the local cluster auth endpoint. + // +nullable + // +optional + CACerts string `json:"caCerts,omitempty"` +} + +// EnvVar represents a key value pair for an environment variable. +type EnvVar struct { + // Name is the name of the environment variable. + Name string `json:"name,omitempty"` + + // Value is the value of the environment variable. + // +nullable + // +optional + Value string `json:"value,omitempty"` +} + +type ETCDSnapshotCreate struct { + // Generation is the current generation for which an etcd snapshot + // creation operation has been requested. + // Changing the Generation is the only thing required to create a + // snapshot. + // +optional + Generation int `json:"generation,omitempty"` +} + +type ETCDSnapshotRestore struct { + // Name refers to the name of the associated etcdsnapshot object. + // +nullable + // +optional + Name string `json:"name,omitempty"` + + // Generation is the current generation for which an etcd snapshot + // restore operation has been requested. + // Changing the Generation is the only thing required to initiate a + // snapshot restore. + // +optional + Generation int `json:"generation,omitempty"` + + // Set to either none (or empty string), all, or kubernetesVersion + // +nullable + // +optional + RestoreRKEConfig string `json:"restoreRKEConfig,omitempty"` +} + +type RotateCertificates struct { + // Generation is the current generation for which a certificate rotation + // operation has been requested. + // Changing the Generation is the only thing required to initiate a + // certificate rotation. + // +optional + Generation int64 `json:"generation,omitempty"` + + // Services is a list of services to rotate certificates for. + // If the list is empty, all services will be rotated. + // +nullable + // +optional + Services []string `json:"services,omitempty"` +} + +type RotateEncryptionKeys struct { + // Generation is the current generation for which an encryption key + // rotation operation has been requested. + // Changing the Generation is the only thing required to rotate + // encryption keys. + // +optional + Generation int64 `json:"generation,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/controlplane.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/controlplane.go deleted file mode 100644 index 7748e4c2f..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/controlplane.go +++ /dev/null @@ -1,55 +0,0 @@ -package v1 - -import ( - "github.com/rancher/wrangler/v3/pkg/genericcondition" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type RKEControlPlane struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RKEControlPlaneSpec `json:"spec"` - Status RKEControlPlaneStatus `json:"status,omitempty"` -} - -type EnvVar struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` -} - -type RKEControlPlaneSpec struct { - RKEClusterSpecCommon - - AgentEnvVars []EnvVar `json:"agentEnvVars,omitempty"` - LocalClusterAuthEndpoint LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint"` - ETCDSnapshotCreate *ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` - ETCDSnapshotRestore *ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` - RotateCertificates *RotateCertificates `json:"rotateCertificates,omitempty"` - RotateEncryptionKeys *RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` - KubernetesVersion string `json:"kubernetesVersion,omitempty"` - ClusterName string `json:"clusterName,omitempty" wrangler:"required"` - ManagementClusterName string `json:"managementClusterName,omitempty" wrangler:"required"` - UnmanagedConfig bool `json:"unmanagedConfig,omitempty"` -} - -type RKEControlPlaneStatus struct { - AppliedSpec *RKEControlPlaneSpec `json:"appliedSpec,omitempty"` - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` - Ready bool `json:"ready,omitempty"` - ObservedGeneration int64 `json:"observedGeneration"` - CertificateRotationGeneration int64 `json:"certificateRotationGeneration"` - RotateEncryptionKeys *RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` - RotateEncryptionKeysPhase RotateEncryptionKeysPhase `json:"rotateEncryptionKeysPhase,omitempty"` - RotateEncryptionKeysLeader string `json:"rotateEncryptionKeysLeader,omitempty"` - ETCDSnapshotRestore *ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` - ETCDSnapshotRestorePhase ETCDSnapshotPhase `json:"etcdSnapshotRestorePhase,omitempty"` - ETCDSnapshotCreate *ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` - ETCDSnapshotCreatePhase ETCDSnapshotPhase `json:"etcdSnapshotCreatePhase,omitempty"` - ConfigGeneration int64 `json:"configGeneration,omitempty"` - Initialized bool `json:"initialized,omitempty"` - AgentConnected bool `json:"agentConnected,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/doc.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/doc.go index e7bb6649e..23d570682 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/doc.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/encryptionkeyrotation.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/encryptionkeyrotation.go deleted file mode 100644 index d0168af05..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/encryptionkeyrotation.go +++ /dev/null @@ -1,18 +0,0 @@ -package v1 - -type RotateEncryptionKeysPhase string - -const ( - RotateEncryptionKeysPhasePrepare RotateEncryptionKeysPhase = "Prepare" - RotateEncryptionKeysPhasePostPrepareRestart RotateEncryptionKeysPhase = "PostPrepareRestart" - RotateEncryptionKeysPhaseRotate RotateEncryptionKeysPhase = "Rotate" - RotateEncryptionKeysPhasePostRotateRestart RotateEncryptionKeysPhase = "PostRotateRestart" - RotateEncryptionKeysPhaseReencrypt RotateEncryptionKeysPhase = "Reencrypt" - RotateEncryptionKeysPhasePostReencryptRestart RotateEncryptionKeysPhase = "PostReencryptRestart" - RotateEncryptionKeysPhaseDone RotateEncryptionKeysPhase = "Done" - RotateEncryptionKeysPhaseFailed RotateEncryptionKeysPhase = "Failed" -) - -type RotateEncryptionKeys struct { - Generation int64 `json:"generation,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd.go deleted file mode 100644 index 8b4226082..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd.go +++ /dev/null @@ -1,81 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type ETCDSnapshotPhase string - -const ( - ETCDSnapshotPhaseStarted ETCDSnapshotPhase = "Started" - ETCDSnapshotPhaseShutdown ETCDSnapshotPhase = "Shutdown" - ETCDSnapshotPhaseRestore ETCDSnapshotPhase = "Restore" - ETCDSnapshotPhasePostRestorePodCleanup ETCDSnapshotPhase = "PostRestorePodCleanup" - ETCDSnapshotPhaseInitialRestartCluster ETCDSnapshotPhase = "InitialRestartCluster" - ETCDSnapshotPhasePostRestoreNodeCleanup ETCDSnapshotPhase = "PostRestoreNodeCleanup" - ETCDSnapshotPhaseRestartCluster ETCDSnapshotPhase = "RestartCluster" - ETCDSnapshotPhaseFinished ETCDSnapshotPhase = "Finished" - ETCDSnapshotPhaseFailed ETCDSnapshotPhase = "Failed" -) - -type ETCDSnapshotS3 struct { - Endpoint string `json:"endpoint,omitempty"` - EndpointCA string `json:"endpointCA,omitempty"` - SkipSSLVerify bool `json:"skipSSLVerify,omitempty"` - Bucket string `json:"bucket,omitempty"` - Region string `json:"region,omitempty"` - CloudCredentialName string `json:"cloudCredentialName,omitempty"` - Folder string `json:"folder,omitempty"` -} - -type ETCDSnapshotCreate struct { - // Changing the Generation is the only thing required to initiate a snapshot creation. - Generation int `json:"generation,omitempty"` -} - -type ETCDSnapshotRestore struct { - // Name refers to the name of the associated etcdsnapshot object - Name string `json:"name,omitempty"` - - // Changing the Generation is the only thing required to initiate a snapshot restore. - Generation int `json:"generation,omitempty"` - // Set to either none (or empty string), all, or kubernetesVersion - RestoreRKEConfig string `json:"restoreRKEConfig,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ETCDSnapshot struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ETCDSnapshotSpec `json:"spec,omitempty"` - SnapshotFile ETCDSnapshotFile `json:"snapshotFile,omitempty"` - Status ETCDSnapshotStatus `json:"status"` -} - -type ETCDSnapshotSpec struct { - ClusterName string `json:"clusterName,omitempty"` -} - -type ETCDSnapshotFile struct { - Name string `json:"name,omitempty"` - NodeName string `json:"nodeName,omitempty"` - Location string `json:"location,omitempty"` - Metadata string `json:"metadata,omitempty"` - CreatedAt *metav1.Time `json:"createdAt,omitempty"` - Size int64 `json:"size,omitempty"` - S3 *ETCDSnapshotS3 `json:"s3,omitempty"` - Status string `json:"status,omitempty"` - Message string `json:"message,omitempty"` -} - -type ETCDSnapshotStatus struct { - Missing bool `json:"missing"` -} - -type ETCD struct { - DisableSnapshots bool `json:"disableSnapshots,omitempty"` - SnapshotScheduleCron string `json:"snapshotScheduleCron,omitempty"` - SnapshotRetention int `json:"snapshotRetention,omitempty"` - S3 *ETCDSnapshotS3 `json:"s3,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd_snapshot_phase_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd_snapshot_phase_types.go new file mode 100644 index 000000000..d09b01620 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcd_snapshot_phase_types.go @@ -0,0 +1,33 @@ +package v1 + +// ETCDSnapshotPhase is a representation of the current phase of an etcd snapshot create or restore operation. +type ETCDSnapshotPhase string + +const ( + // ETCDSnapshotPhaseStarted is the first state the RKEControlPlane is assigned when beginning an etcd snapshot or restore operation. + ETCDSnapshotPhaseStarted = ETCDSnapshotPhase("Started") + + // ETCDSnapshotPhaseShutdown is the state assigned to the RKEControlPlane when the etcd restore operation is performing the shutdown of the cluster in order to perform a restore. + ETCDSnapshotPhaseShutdown = ETCDSnapshotPhase("Shutdown") + + // ETCDSnapshotPhaseRestore is the state assigned to the RKEControlPlane when the etcd restore operation is restoring etcd. + ETCDSnapshotPhaseRestore = ETCDSnapshotPhase("Restore") + + // ETCDSnapshotPhasePostRestorePodCleanup is the state assigned to the RKEControlPlane when the etcd restore operation is removing old pods post-restore. + ETCDSnapshotPhasePostRestorePodCleanup = ETCDSnapshotPhase("PostRestorePodCleanup") + + // ETCDSnapshotPhaseInitialRestartCluster is the state assigned to the RKEControlPlane when the etcd restore operation is performing the initial restart of the cluster. + ETCDSnapshotPhaseInitialRestartCluster = ETCDSnapshotPhase("InitialRestartCluster") + + // ETCDSnapshotPhasePostRestoreNodeCleanup is the state assigned to the RKEControlPlane when the etcd restore operation is cleaning up resources on the downstream node post-restore operation. + ETCDSnapshotPhasePostRestoreNodeCleanup = ETCDSnapshotPhase("PostRestoreNodeCleanup") + + // ETCDSnapshotPhaseRestartCluster is the state assigned to the RKEControlPlane when the etcd snapshot create/restore operation is restarting the cluster. + ETCDSnapshotPhaseRestartCluster = ETCDSnapshotPhase("RestartCluster") + + // ETCDSnapshotPhaseFinished is the state assigned to the RKEControlPlane upon successful completion of the snapshot create/restore operation. + ETCDSnapshotPhaseFinished = ETCDSnapshotPhase("Finished") + + // ETCDSnapshotPhaseFailed is the state assigned to the RKEControlPlane upon failure of the etcd snapshot create/restore operation. + ETCDSnapshotPhaseFailed = ETCDSnapshotPhase("Failed") +) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcdsnapshot_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcdsnapshot_types.go new file mode 100644 index 000000000..26a10f0d1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/etcdsnapshot_types.go @@ -0,0 +1,144 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ETCDSnapshotS3 defines S3 snapshot configuration for ETCD backups. +type ETCDSnapshotS3 struct { + // Endpoint is the S3 endpoint used for snapshot operations. + // If this field is not explicitly set, the 'defaultEndpoint' value from the referenced CloudCredential will be used. + // +nullable + // +optional + Endpoint string `json:"endpoint,omitempty"` + + // EndpointCA is the CA certificate for validating the S3 endpoint. + // This can be either a file path (e.g., "/etc/ssl/certs/my-ca.crt") + // or the CA certificate content, in base64-encoded or plain PEM format. + // If this field is not explicitly set, the 'defaultEndpointCA' value from the referenced CloudCredential will be used. + // +nullable + // +optional + EndpointCA string `json:"endpointCA,omitempty"` + + // SkipSSLVerify defines whether TLS certificate verification is disabled. + // If this field is not explicitly set, the 'defaultSkipSSLVerify' value + // from the referenced CloudCredential will be used. + // +optional + SkipSSLVerify bool `json:"skipSSLVerify,omitempty"` + + // Bucket is the name of the S3 bucket used for snapshot operations. + // If this field is not explicitly set, the 'defaultBucket' value from the referenced CloudCredential will be used. + // An empty bucket name will cause a 'failed to initialize S3 client: s3 bucket name was not set' error. + // +kubebuilder:validation:MaxLength=63 + // +nullable + // +optional + Bucket string `json:"bucket,omitempty"` + + // Region is the S3 region used for snapshot operations. (e.g., "us-east-1"). + // If this field is not explicitly set, the 'defaultRegion' value from the referenced CloudCredential will be used. + // +nullable + // +optional + Region string `json:"region,omitempty"` + + // CloudCredentialName is the name of the secret containing the + // credentials used to access the S3 bucket. + // The secret is expected to have the following keys: + // - accessKey [required] + // - secretKey [required] + // - defaultRegion + // - defaultEndpoint + // - defaultEndpointCA + // - defaultSkipSSLVerify + // - defaultBucket + // - defaultFolder + // Fields set directly in this spec (`ETCDSnapshotS3`) take precedence over the corresponding + // values from the CloudCredential secret. This field must be in the format of "namespace:name". + // +nullable + // +optional + CloudCredentialName string `json:"cloudCredentialName,omitempty"` + + // Folder is the name of the S3 folder used for snapshot operations. + // If this field is not explicitly set, the folder from the referenced CloudCredential will be used. + // +nullable + // +optional + Folder string `json:"folder,omitempty"` +} + +// +genclient +// +kubebuilder:resource:path=etcdsnapshots,scope=Namespaced +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ETCDSnapshot is the top-level resource representing a snapshot operation. +type ETCDSnapshot struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the desired state of the ETCDSnapshot. + // +optional + Spec ETCDSnapshotSpec `json:"spec,omitempty"` + + // SnapshotFile holds metadata about the snapshot file produced by this snapshot operation. + // +optional + SnapshotFile ETCDSnapshotFile `json:"snapshotFile,omitempty"` + + // Status contains information about the current state of the snapshot operation. + // +optional + Status ETCDSnapshotStatus `json:"status,omitempty"` +} + +// ETCDSnapshotSpec defines the desired state of a snapshot. +type ETCDSnapshotSpec struct { + // ClusterName is the name of the cluster (cluster.provisioning.cattle.io) for which this snapshot was taken. + // +optional + ClusterName string `json:"clusterName,omitempty"` +} + +// ETCDSnapshotFile holds metadata about a snapshot file. +type ETCDSnapshotFile struct { + // Name is the full snapshot name. It consists of the cluster name prefix, + // followed by the base snapshot identifier and ends with an optional storage suffix (e.g. "s3"). + // The typical format is: + // -etcd-snapshot----[-] + // The base snapshot identifier follows: + // etcd-snapshot---- + // +optional + Name string `json:"name,omitempty"` + + // NodeName is the name of the downstream node where the snapshot was created. + // +optional + NodeName string `json:"nodeName,omitempty"` + + // Location is the absolute file:// or s3:// URI address of the snapshot. + // +optional + Location string `json:"location,omitempty"` + + // Metadata contains a base64-encoded, gzipped snapshot of the cluster spec at the time the snapshot was taken. + // +optional + Metadata string `json:"metadata,omitempty"` + + // CreatedAt is the timestamp when the snapshot was created. + // +optional + CreatedAt *metav1.Time `json:"createdAt,omitempty"` + + // Size is the size of the snapshot file in bytes. + // +optional + Size int64 `json:"size,omitempty"` + + // S3 holds metadata about the S3 destination if the snapshot is stored remotely. If nil, the snapshot + // is assumed to be stored locally and associated with the owning CAPI machine. + // +optional + S3 *ETCDSnapshotS3 `json:"s3,omitempty"` + + // Status represents the current state of the snapshot, such as "successful" or "failed". + // +optional + Status string `json:"status,omitempty"` + + // Message is a string detailing the encountered error during snapshot creation if specified. + // +optional + Message string `json:"message,omitempty"` +} + +// ETCDSnapshotStatus describes the observed state of the snapshot. +type ETCDSnapshotStatus struct { + // This field is currently unused but retained for backward compatibility or future use. + Missing bool `json:"missing"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/machine.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/machine.go deleted file mode 100644 index 839b58288..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/machine.go +++ /dev/null @@ -1,48 +0,0 @@ -package v1 - -import ( - "github.com/rancher/wrangler/v3/pkg/genericcondition" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capi "sigs.k8s.io/cluster-api/api/v1beta1" -) - -type RKECommonNodeConfig struct { - Labels map[string]string `json:"labels,omitempty"` - Taints []corev1.Taint `json:"taints,omitempty"` - CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` -} - -type RKEMachineStatus struct { - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` - JobName string `json:"jobName,omitempty"` - Ready bool `json:"ready,omitempty"` - DriverHash string `json:"driverHash,omitempty"` - DriverURL string `json:"driverUrl,omitempty"` - CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` - FailureReason string `json:"failureReason,omitempty"` - FailureMessage string `json:"failureMessage,omitempty"` - Addresses []capi.MachineAddress `json:"addresses,omitempty"` -} - -// +genclient -// +kubebuilder:skipversion -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type CustomMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CustomMachineSpec `json:"spec,omitempty"` - Status CustomMachineStatus `json:"status,omitempty"` -} - -type CustomMachineSpec struct { - ProviderID string `json:"providerID,omitempty"` -} - -type CustomMachineStatus struct { - Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` - Ready bool `json:"ready,omitempty"` - Addresses []capi.MachineAddress `json:"addresses,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/map.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/map.go deleted file mode 100644 index 4ada1ba47..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/map.go +++ /dev/null @@ -1,27 +0,0 @@ -package v1 - -import ( - "encoding/json" - - "github.com/rancher/wrangler/v3/pkg/data/convert" -) - -type GenericMap struct { - Data map[string]interface{} `json:"-"` -} - -func (in GenericMap) MarshalJSON() ([]byte, error) { - return json.Marshal(in.Data) -} - -func (in *GenericMap) UnmarshalJSON(data []byte) error { - in.Data = map[string]interface{}{} - return json.Unmarshal(data, &in.Data) -} - -func (in *GenericMap) DeepCopyInto(out *GenericMap) { - out.Data = map[string]interface{}{} - if err := convert.ToObj(in.Data, &out.Data); err != nil { - panic(err) - } -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/networking_stack_preference_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/networking_stack_preference_types.go new file mode 100644 index 000000000..2c6927729 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/networking_stack_preference_types.go @@ -0,0 +1,23 @@ +package v1 + +// NetworkingStackPreference is the desired interface for networking calls. +// This is used when rendering probes, allowing the user to decide whether "127.0.0.1", "::1", or "localhost" is appropriate for determining probe status. +type NetworkingStackPreference = string + +const ( + // DualStackPreference signifies a dual stack networking strategy, defaulting "localhost" for communication on the + // loopback interface + DualStackPreference = NetworkingStackPreference("dual") + + // SingleStackIPv4Preference signifies a single stack IPv4 networking strategy, defaulting "127.0.0.1" for + // communication on the loopback interface + SingleStackIPv4Preference = NetworkingStackPreference("ipv4") + + // SingleStackIPv6Preference signifies a single stack IPv6 networking strategy, defaulting "::1" for + // communication on the loopback interface + SingleStackIPv6Preference = NetworkingStackPreference("ipv6") + + // DefaultStackPreference is the stack preference used when no preference is defined, or is invalid. Defaults to + // "127.0.0.1" to support existing behavior. + DefaultStackPreference = SingleStackIPv4Preference +) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/registries.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/registries.go deleted file mode 100644 index 2ba4a54ed..000000000 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/registries.go +++ /dev/null @@ -1,59 +0,0 @@ -package v1 - -// Mirror contains the config related to the registry mirror -type Mirror struct { - // Endpoints are endpoints for a namespace. CRI plugin will try the endpoints - // one by one until a working one is found. The endpoint must be a valid url - // with host specified. - // The scheme, host and path from the endpoint URL will be used. - Endpoints []string `json:"endpoint,omitempty"` - - // Rewrites are repository rewrite rules for a namespace. When fetching image resources - // from an endpoint and a key matches the repository via regular expression matching - // it will be replaced with the corresponding value from the map in the resource request. - Rewrites map[string]string `json:"rewrite,omitempty"` -} - -const ( - AuthConfigSecretType = "rke.cattle.io/auth-config" - - UsernameAuthConfigSecretKey = "username" - PasswordAuthConfigSecretKey = "password" - AuthAuthConfigSecretKey = "auth" - IdentityTokenAuthConfigSecretKey = "identityToken" -) - -// AuthConfig contains the config related to authentication to a specific registry -type AuthConfig struct { - // Username is the username to login the registry. - Username string `json:"username,omitempty"` - // Password is the password to login the registry. - Password string `json:"password,omitempty"` - // Auth is a base64 encoded string from the concatenation of the username, - // a colon, and the password. - Auth string `json:"auth,omitempty"` - // IdentityToken is used to authenticate the user and get - // an access token for the registry. - IdentityToken string `json:"identityToken,omitempty"` -} - -// Registry is registry settings configured -type Registry struct { - // Mirrors are namespace to mirror mapping for all namespaces. - Mirrors map[string]Mirror `json:"mirrors,omitempty"` - // Configs are configs for each registry. - // The key is the FDQN or IP of the registry. - Configs map[string]RegistryConfig `json:"configs,omitempty"` -} - -// RegistryConfig contains configuration used to communicate with the registry. -type RegistryConfig struct { - // Auth contains information to authenticate to the registry. - AuthConfigSecretName string `json:"authConfigSecretName,omitempty"` - // TLS is a pair of Cert/Key which then are used when creating the transport - // that communicates with the registry. - TLSSecretName string `json:"tlsSecretName,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` - - InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` -} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstrap_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstrap_types.go new file mode 100644 index 000000000..d78b06222 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstrap_types.go @@ -0,0 +1,52 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// RKEBootstrapSpec defines the desired state of RKEBootstrap. +type RKEBootstrapSpec struct { + // ClusterName refers to the name of the CAPI Cluster associated with this RKEBootstrap. + // +optional + ClusterName string `json:"clusterName,omitempty"` +} + +// RKEBootstrapStatus defines the observed state of RKEBootstrap. +type RKEBootstrapStatus struct { + // Ready indicates the BootstrapData field is ready to be consumed. + // +optional + Ready bool `json:"ready,omitempty"` + + // DataSecretName is the name of the secret that stores the bootstrap data script. + // +optional + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + DataSecretName *string `json:"dataSecretName,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=rkebootstraps,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels={"cluster.x-k8s.io/v1beta1=v1","auth.cattle.io/cluster-indexed=true"} + +// RKEBootstrap defines the BootstrapConfig resource required by Cluster API +// to supply the bootstrap data necessary for initializing a Kubernetes node. +// It is referenced by one of the core Cluster API resources, Machine. +// More info: https://cluster-api.sigs.k8s.io/developer/providers/contracts/bootstrap-config +type RKEBootstrap struct { + metav1.TypeMeta `json:",inline"` + + // Metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the desired state of RKEBootstrap. + Spec RKEBootstrapSpec `json:"spec"` + + // Status is the observed state of RKEBootstrap. + // +optional + Status RKEBootstrapStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstraptemplate_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstraptemplate_types.go new file mode 100644 index 000000000..d7ee01562 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkebootstraptemplate_types.go @@ -0,0 +1,36 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// RKEBootstrapTemplateSpec defines the desired state of RKEBootstrapTemplate. +type RKEBootstrapTemplateSpec struct { + // ClusterName refers to the name of the CAPI Cluster associated with this RKEBootstrap. + // +optional + ClusterName string `json:"clusterName,omitempty"` + + // Template defines the desired state of RKEBootstrapTemplateSpec. + // +required + Template RKEBootstrap `json:"template"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=rkebootstraptemplates,scope=Namespaced,categories=cluster-api +// +kubebuilder:metadata:labels={"cluster.x-k8s.io/v1beta1=v1","auth.cattle.io/cluster-indexed=true"} + +// RKEBootstrapTemplate is the schema for the rkebootstraptemplates API. +type RKEBootstrapTemplate struct { + metav1.TypeMeta `json:",inline"` + + // Metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the desired state of RKEBootstrapTemplate. + // +required + Spec RKEBootstrapTemplateSpec `json:"spec"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecluster_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecluster_types.go new file mode 100644 index 000000000..789bfb2d6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecluster_types.go @@ -0,0 +1,55 @@ +package v1 + +import ( + "github.com/rancher/wrangler/v3/pkg/genericcondition" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + capi "sigs.k8s.io/cluster-api/api/v1beta1" +) + +type RKEClusterSpec struct { + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // +optional + ControlPlaneEndpoint *capi.APIEndpoint `json:"controlPlaneEndpoint,omitempty"` +} + +type RKEClusterStatus struct { + // Conditions is a representation of the current state of the RKE cluster. + // +optional + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + + // Ready denotes that the RKE cluster infrastructure is fully provisioned. + // NOTE: + // This field is part of the Cluster API contract, and it is used to + // orchestrate provisioning. + // The value of this field is never updated after provisioning is completed. + // Please use conditions to check the operational state of the cluster. + // +optional + Ready bool `json:"ready,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=rkeclusters,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels={"cluster.x-k8s.io/v1beta1=v1","auth.cattle.io/cluster-indexed=true"} + +// RKECluster represents the InfraCluster resource required by Cluster API +// to provide the necessary infrastructure prerequisites for running machines. +// It is referenced by the core Cluster API resource, Cluster. +// More info: https://cluster-api.sigs.k8s.io/developer/providers/contracts/infra-cluster +type RKECluster struct { + metav1.TypeMeta `json:",inline"` + + // Metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the desired state of the RKECluster. + Spec RKEClusterSpec `json:"spec"` + + // Status is the observed state of the RKECluster. + // +optional + Status RKEClusterStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecontrolplane_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecontrolplane_types.go new file mode 100644 index 000000000..3702136d9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkecontrolplane_types.go @@ -0,0 +1,177 @@ +package v1 + +import ( + "github.com/rancher/wrangler/v3/pkg/genericcondition" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type RKEControlPlaneSpec struct { + ClusterConfiguration `json:",inline"` + + // AgentEnvVars is a list of environment variables that will be set on + // the cluster agent deployment and system agent service. + // +nullable + // +optional + AgentEnvVars []EnvVar `json:"agentEnvVars,omitempty"` + + // LocalClusterAuthEndpoint is the configuration for the local cluster + // auth endpoint. + // +optional + LocalClusterAuthEndpoint LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty"` + + // ETCDSnapshotCreate is the configuration for the etcd snapshot creation + // operation. + // +nullable + // +optional + ETCDSnapshotCreate *ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` + + // ETCDSnapshotRestore is the configuration for the etcd snapshot restore + // operation. + // +nullable + // +optional + ETCDSnapshotRestore *ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` + + // RotateCertificates is the configuration for the certificate rotation + // operation. + // +nullable + // +optional + RotateCertificates *RotateCertificates `json:"rotateCertificates,omitempty"` + + // RotateEncryptionKeys is the configuration for the encryption key + // rotation operation. + // +nullable + // +optional + RotateEncryptionKeys *RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` + + // KubernetesVersion is the desired version of RKE2/K3s for the cluster. + // This field is only populated for provisioned and custom clusters. + // +nullable + // +optional + KubernetesVersion string `json:"kubernetesVersion,omitempty"` + + // ClusterName is the name of the provisioning cluster object. + // +kubebuilder:validation:MaxLength=63 + // +required + ClusterName string `json:"clusterName,omitempty"` + + // ManagementClusterName is the name of the management cluster object + // that relates to this cluster. + // +required + ManagementClusterName string `json:"managementClusterName,omitempty"` + + // UnmanagedConfig indicates whether the configuration files for this + // cluster are managed by Rancher or externally. + UnmanagedConfig bool `json:"unmanagedConfig,omitempty"` +} + +type RKEControlPlaneStatus struct { + // AppliedSpec is the state for which the last reconciliation loop for + // the controlplane was completed. + // +optional + AppliedSpec *RKEControlPlaneSpec `json:"appliedSpec,omitempty"` + + // Conditions is a representation of the current state of the + // RKEControlPlane object. + // This includes its machine reconciliation status + // (Bootstrapped, Provisioned, Stable, Reconciled), the status of the + // system-upgrade-controller (SystemUpgradeControllerReady), and CAPI + // required conditions (ScalingUp, ScalingDown, RollingOut). + // Information related to errors encountered while transitioning to one + // of these states will be populated in the Message and Reason fields. + // +optional + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + + // Ready denotes that the API server has been initialized and is ready to + // receive requests. + // +optional + Ready bool `json:"ready,omitempty"` + + // ObservedGeneration is the generation for which the RKEControlPlane has + // started processing. + ObservedGeneration int64 `json:"observedGeneration"` + + // CertificateRotationGeneration is the last observed state for which the + // certificate rotation operation was successful. + // +optional + CertificateRotationGeneration int64 `json:"certificateRotationGeneration,omitempty"` + + // RotateEncryptionKeys is the state for which the last encryption key + // rotation operation was successful. + // +optional + RotateEncryptionKeys *RotateEncryptionKeys `json:"rotateEncryptionKeys,omitempty"` + + // RotateEncryptionKeysPhase is the phase the encryption key + // rotation operation is currently executing. + // +optional + RotateEncryptionKeysPhase RotateEncryptionKeysPhase `json:"rotateEncryptionKeysPhase,omitempty"` + + // RotateEncryptionKeysLeader is the name of the CAPI machine object + // which has been elected leader of the controlplane nodes for + // encryption key rotation purposes. + // +optional + RotateEncryptionKeysLeader string `json:"rotateEncryptionKeysLeader,omitempty"` + + // ETCDSnapshotRestore is the state for which the last etcd snapshot + // restore operation was successful. + // +optional + ETCDSnapshotRestore *ETCDSnapshotRestore `json:"etcdSnapshotRestore,omitempty"` + + // ETCDSnapshotRestorePhase is the phase the etcd snapshot + // restore operation is currently executing. + // +kubebuilder:validation:Enum=Started;Shutdown;Restore;PostRestorePodCleanup;InitialRestartCluster;PostRestoreNodeCleanup;RestartCluster;Finished;Failed + // +optional + ETCDSnapshotRestorePhase ETCDSnapshotPhase `json:"etcdSnapshotRestorePhase,omitempty"` + + // ETCDSnapshotCreate is the state for which the last etcd snapshot + // create operation was successful. + // +optional + ETCDSnapshotCreate *ETCDSnapshotCreate `json:"etcdSnapshotCreate,omitempty"` + + // ETCDSnapshotCreatePhase is the phase the etcd snapshot create + // operation is currently executing. + // +kubebuilder:validation:Enum=Started;RestartCluster;Finished;Failed + // +optional + ETCDSnapshotCreatePhase ETCDSnapshotPhase `json:"etcdSnapshotCreatePhase,omitempty"` + + // ConfigGeneration is the current generation of the configuration for a + // given cluster. + // Changing this value (which is done automatically during an etcd restore) will trigger a reconciliation loop + // which will invoke draining (if enabled). + // +optional + ConfigGeneration int64 `json:"configGeneration,omitempty"` + + // Initialized denotes that the API server is initialized and worker + // nodes can be joined to the cluster. + // +optional + Initialized bool `json:"initialized,omitempty"` + + // AgentConnected denotes that the cluster-agent connection is currently + // established for the cluster. + // +optional + AgentConnected bool `json:"agentConnected,omitempty"` +} + +// +genclient +// +kubebuilder:resource:path=rkecontrolplanes,shortName=rcp,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels={"cluster.x-k8s.io/v1beta1=v1","auth.cattle.io/cluster-indexed=true"} +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels['cluster\\.x-k8s\\.io/cluster-name']",description="Cluster" +// +kubebuilder:printcolumn:name="Initialized",type=string,JSONPath=".status.initialized",description="This denotes whether or not the control plane is initialized" +// +kubebuilder:printcolumn:name="API Server Available",type=boolean,JSONPath=".status.ready",description="RKEControlPlane API Server is ready to receive requests" +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=".metadata.creationTimestamp",description="Time duration since creation of RKEControlPlane" +// +kubebuilder:printcolumn:name="Version",type=string,JSONPath=".spec.kubernetesVersion",description="Kubernetes version associated with this control plane" +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RKEControlPlane is the Schema for the controlplane. +type RKEControlPlane struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec is the desired state of the controlplane. + // +optional + Spec RKEControlPlaneSpec `json:"spec,omitempty"` + + // Status is the observed state of the controlplane. + // +optional + Status RKEControlPlaneStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkemachine_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkemachine_types.go new file mode 100644 index 000000000..8fdefe766 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rkemachine_types.go @@ -0,0 +1,111 @@ +package v1 + +import ( + "github.com/rancher/wrangler/v3/pkg/genericcondition" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + capi "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// RKECommonNodeConfig is a common configuration shared between node driver and custom machines. +type RKECommonNodeConfig struct { + // Labels is a list of labels to apply to the machines created by the CAPI machine deployment. + // +optional + // +nullable + Labels map[string]string `json:"labels,omitempty"` + // Taints is a list of taints to apply to the machines created by the CAPI machine deployment. + // +optional + // +nullable + Taints []corev1.Taint `json:"taints,omitempty"` + // CloudCredentialSecretName is the id of the secret used to provision + // the cluster. + // This field must be in the format of "namespace:name". + // NOTE: this field overrides the field of the same name on the cluster + // spec, allowing individual machine pools to use separate credentials. + // +kubebuilder:validation:MaxLength=317 + // +optional + // +nullable + CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` +} + +type RKEMachineStatus struct { + // Conditions is a representation of the machine's current state. + // +optional + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + + // JobName is the name of the provisioning job of the machine. + // +optional + JobName string `json:"jobName,omitempty"` + + // Ready indicates whether the provider ID has been set in this machine's spec. + // +optional + Ready bool `json:"ready,omitempty"` + + // DriverHash is the expected hash of the node driver binary used for provisioning the machine. + // +optional + DriverHash string `json:"driverHash,omitempty"` + + // DriverURL is the url used to download the node driver binary for provisioning the machine. + // +optional + DriverURL string `json:"driverUrl,omitempty"` + + // CloudCredentialSecretName is the secret name that was used as a credential to provision the machine. + // +optional + CloudCredentialSecretName string `json:"cloudCredentialSecretName,omitempty"` + + // FailureReason indicates whether the provisioning job failed on creation or on removal of the machine. + // +optional + FailureReason string `json:"failureReason,omitempty"` + + // FailureMessage is the container termination message for a provisioning job that failed. + // +optional + FailureMessage string `json:"failureMessage,omitempty"` + + // Addresses are the machine network addresses. Assigned by the CAPI controller. + // +optional + Addresses []capi.MachineAddress `json:"addresses,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels={"cluster.x-k8s.io/v1beta1=v1","auth.cattle.io/cluster-indexed=true"} + +// CustomMachine represents an unmanaged CAPI +// machine registered to a Rancher custom cluster. +type CustomMachine struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec represents the desired configuration of the machine. + Spec CustomMachineSpec `json:"spec,omitempty"` + + // Status represents the most recently observed status of the machine. + // +optional + Status CustomMachineStatus `json:"status,omitempty"` +} + +type CustomMachineSpec struct { + // ProviderID is a reference to the CAPI Node object corresponding to + // this machine. This field is automatically set by CAPI during the + // machine provisioning process. + // +optional + // +nullable + ProviderID string `json:"providerID,omitempty"` +} + +type CustomMachineStatus struct { + // Conditions is a representation of the current state of the machine. + // +optional + Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` + // Ready indicates that the machine infrastructure is fully provisioned, + // and is a requirement of the Cluster API contract. The value of this + // field is never updated after provisioning has completed. + // Please use Conditions to determine the current state of the machine. + // +optional + Ready bool `json:"ready,omitempty"` + // Addresses contains the associated addresses for the machine. + // +optional + Addresses []capi.MachineAddress `json:"addresses,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rotate_encryption_keys_phase.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rotate_encryption_keys_phase.go new file mode 100644 index 000000000..c3c98ad4e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/rotate_encryption_keys_phase.go @@ -0,0 +1,32 @@ +package v1 + +type RotateEncryptionKeysPhase string + +const ( + // RotateEncryptionKeysPhasePrepare is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Prepare phase. + // During this phase, the "secrets-encrypt prepare" subcommand is executed on the elected controlplane leader. + RotateEncryptionKeysPhasePrepare = RotateEncryptionKeysPhase("Prepare") + + // RotateEncryptionKeysPhasePostPrepareRestart is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Restart phase post executing the prepare command. + RotateEncryptionKeysPhasePostPrepareRestart = RotateEncryptionKeysPhase("PostPrepareRestart") + + // RotateEncryptionKeysPhaseRotate is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Rotate phase. + //During this phase, the "secrets-encrypt rotate" subcommand is executed on the elected controlplane leader. + RotateEncryptionKeysPhaseRotate = RotateEncryptionKeysPhase("Rotate") + + // RotateEncryptionKeysPhasePostRotateRestart is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Restart phase post executing the rotate command. + RotateEncryptionKeysPhasePostRotateRestart = RotateEncryptionKeysPhase("PostRotateRestart") + + // RotateEncryptionKeysPhaseReencrypt is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Reencrypt phase. + // During this phase, the "secrets-encrypt reencrypt" subcommand is executed on the elected controlplane leader. + RotateEncryptionKeysPhaseReencrypt = RotateEncryptionKeysPhase("Reencrypt") + + // RotateEncryptionKeysPhasePostReencryptRestart is the state assigned to the RKEControlPlane when the encryption key rotation operation is in the Restart phase post executing the reencrypt command. + RotateEncryptionKeysPhasePostReencryptRestart = RotateEncryptionKeysPhase("PostReencryptRestart") + + // RotateEncryptionKeysPhaseDone is the state assigned to the RKEControlPlane upon successful completion of the encryption key rotation operation. + RotateEncryptionKeysPhaseDone = RotateEncryptionKeysPhase("Done") + + // RotateEncryptionKeysPhaseFailed is the state assigned to the RKEControlPlane upon failure of the encryption key rotation operation. + RotateEncryptionKeysPhaseFailed = RotateEncryptionKeysPhase("Failed") +) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_deepcopy.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_deepcopy.go index 26a207f2f..80357dbc1 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -30,17 +30,50 @@ import ( ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthConfig) DeepCopyInto(out *AuthConfig) { +func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { *out = *in + in.UpgradeStrategy.DeepCopyInto(&out.UpgradeStrategy) + in.ChartValues.DeepCopyInto(&out.ChartValues) + in.MachineGlobalConfig.DeepCopyInto(&out.MachineGlobalConfig) + if in.MachineSelectorConfig != nil { + in, out := &in.MachineSelectorConfig, &out.MachineSelectorConfig + *out = make([]RKESystemConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MachineSelectorFiles != nil { + in, out := &in.MachineSelectorFiles, &out.MachineSelectorFiles + *out = make([]RKEProvisioningFiles, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Registries != nil { + in, out := &in.Registries, &out.Registries + *out = new(Registry) + (*in).DeepCopyInto(*out) + } + if in.ETCD != nil { + in, out := &in.ETCD, &out.ETCD + *out = new(ETCD) + (*in).DeepCopyInto(*out) + } + if in.Networking != nil { + in, out := &in.Networking, &out.Networking + *out = new(Networking) + **out = **in + } + out.DataDirectories = in.DataDirectories return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthConfig. -func (in *AuthConfig) DeepCopy() *AuthConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +func (in *ClusterConfiguration) DeepCopy() *ClusterConfiguration { if in == nil { return nil } - out := new(AuthConfig) + out := new(ClusterConfiguration) in.DeepCopyInto(out) return out } @@ -815,55 +848,6 @@ func (in *RKEClusterSpec) DeepCopy() *RKEClusterSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEClusterSpecCommon) DeepCopyInto(out *RKEClusterSpecCommon) { - *out = *in - in.UpgradeStrategy.DeepCopyInto(&out.UpgradeStrategy) - in.ChartValues.DeepCopyInto(&out.ChartValues) - in.MachineGlobalConfig.DeepCopyInto(&out.MachineGlobalConfig) - if in.MachineSelectorConfig != nil { - in, out := &in.MachineSelectorConfig, &out.MachineSelectorConfig - *out = make([]RKESystemConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.MachineSelectorFiles != nil { - in, out := &in.MachineSelectorFiles, &out.MachineSelectorFiles - *out = make([]RKEProvisioningFiles, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Registries != nil { - in, out := &in.Registries, &out.Registries - *out = new(Registry) - (*in).DeepCopyInto(*out) - } - if in.ETCD != nil { - in, out := &in.ETCD, &out.ETCD - *out = new(ETCD) - (*in).DeepCopyInto(*out) - } - if in.Networking != nil { - in, out := &in.Networking, &out.Networking - *out = new(Networking) - **out = **in - } - out.DataDirectories = in.DataDirectories - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEClusterSpecCommon. -func (in *RKEClusterSpecCommon) DeepCopy() *RKEClusterSpecCommon { - if in == nil { - return nil - } - out := new(RKEClusterSpecCommon) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEClusterStatus) DeepCopyInto(out *RKEClusterStatus) { *out = *in @@ -979,7 +963,7 @@ func (in *RKEControlPlaneList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEControlPlaneSpec) DeepCopyInto(out *RKEControlPlaneSpec) { *out = *in - in.RKEClusterSpecCommon.DeepCopyInto(&out.RKEClusterSpecCommon) + in.ClusterConfiguration.DeepCopyInto(&out.ClusterConfiguration) if in.AgentEnvVars != nil { in, out := &in.AgentEnvVars, &out.AgentEnvVars *out = make([]EnvVar, len(*in)) diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_list_types.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_list_types.go index 5f76eeef1..309c10529 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_list_types.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_list_types.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_register.go index c37421327..0a9c82310 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/zz_generated_register.go b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/zz_generated_register.go index 5ebb97e7a..f85f46b7e 100644 --- a/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/zz_generated_register.go +++ b/vendor/github.com/rancher/rancher/pkg/apis/rke.cattle.io/zz_generated_register.go @@ -1,5 +1,5 @@ /* -Copyright 2024 Rancher Labs, Inc. +Copyright 2025 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/leader/manager.go b/vendor/github.com/rancher/wrangler/v3/pkg/leader/manager.go index 5bb2fdd4d..8fefa1ee4 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/leader/manager.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/leader/manager.go @@ -43,6 +43,18 @@ func (m *Manager) Start(ctx context.Context) { }) } +// OnLeaderOrDie this function will be called when leadership is acquired or die if failed +func (m *Manager) OnLeaderOrDie(name string, f func(ctx context.Context) error) { + go func() { + <-m.leaderChan + if err := f(m.leaderCTX); err != nil { + logrus.Fatalf("%s leader func failed be executed: %v", name, err) + } else { + logrus.Infof("%s leader func executed successfully", name) + } + }() +} + // OnLeader this function will be called when leadership is acquired. func (m *Manager) OnLeader(f func(ctx context.Context) error) { go func() { diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/schemas/types.go b/vendor/github.com/rancher/wrangler/v3/pkg/schemas/types.go index c0a4419ca..ac2a55e8a 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/schemas/types.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/schemas/types.go @@ -1,5 +1,9 @@ package schemas +import ( + "github.com/rancher/wrangler/v3/pkg/data/convert" +) + type Schema struct { ID string `json:"-"` Description string `json:"description,omitempty"` @@ -76,6 +80,23 @@ func (s *Schema) DeepCopy() *Schema { return &r } +func SetHasObservedGeneration(s *Schema, value bool) { + if s == nil { + return + } + if s.Attributes == nil { + s.Attributes = map[string]interface{}{} + } + s.Attributes["hasObservedGeneration"] = value +} + +func HasObservedGeneration(s *Schema) bool { + if s == nil || s.Attributes == nil { + return false + } + return convert.ToBool(s.Attributes["hasObservedGeneration"]) +} + type Field struct { Type string `json:"type,omitempty"` Default interface{} `json:"default,omitempty"` diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/cattletypes.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/cattletypes.go index 0208d1da7..180e0ed78 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/cattletypes.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/cattletypes.go @@ -34,6 +34,7 @@ func checkRelease(obj data.Object, _ []Condition, summary Summary) Summary { for _, resources := range obj.Slice("spec", "resources") { summary.Relationships = append(summary.Relationships, Relationship{ Name: resources.String("name"), + Namespace: resources.String("namespace"), Kind: resources.String("kind"), APIVersion: resources.String("apiVersion"), Type: "helmresource", diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/interface.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/interface.go index 200277b05..098cf18cd 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/interface.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/interface.go @@ -13,6 +13,11 @@ type Interface interface { Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface } +type ExtendedInterface interface { + Interface + ResourceWithOptions(resource schema.GroupVersionResource, opts *Options) NamespaceableResourceInterface +} + type ResourceInterface interface { List(ctx context.Context, opts metav1.ListOptions) (*summary.SummarizedObjectList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/options.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/options.go new file mode 100644 index 000000000..31cf8a618 --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/options.go @@ -0,0 +1,9 @@ +package client + +import ( + "github.com/rancher/wrangler/v3/pkg/schemas" +) + +type Options struct { + Schema *schemas.Schema +} diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/simple.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/simple.go index 3273ff0a7..504e8e60d 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/simple.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/client/simple.go @@ -3,6 +3,7 @@ package client import ( "context" + "github.com/rancher/wrangler/v3/pkg/schemas" "github.com/rancher/wrangler/v3/pkg/summary" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -21,14 +22,30 @@ func NewForDynamicClient(client dynamic.Interface) Interface { return &summaryClient{client: client} } +func NewForExtendedDynamicClient(client dynamic.Interface) ExtendedInterface { + return &summaryClient{client: client} +} + type summaryResourceClient struct { client dynamic.Interface namespace string resource schema.GroupVersionResource + options Options } func (c *summaryClient) Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface { - return &summaryResourceClient{client: c.client, resource: resource} + return c.ResourceWithOptions(resource, nil) +} + +func (c *summaryClient) ResourceWithOptions(resource schema.GroupVersionResource, opts *Options) NamespaceableResourceInterface { + if opts == nil { + opts = &Options{} + } + return &summaryResourceClient{ + client: c.client, + resource: resource, + options: *opts, + } } func (c *summaryResourceClient) Namespace(ns string) ResourceInterface { @@ -65,7 +82,7 @@ func (c *summaryResourceClient) List(ctx context.Context, opts metav1.ListOption } for _, obj := range u.Items { - list.Items = append(list.Items, *summary.Summarized(&obj)) + list.Items = append(list.Items, *summary.SummarizedWithOptions(&obj, generateSummarizeOpts(c.options.Schema))) } return list, nil @@ -93,7 +110,7 @@ func (c *summaryResourceClient) Watch(ctx context.Context, opts metav1.ListOptio for event := range resp.ResultChan() { // don't encode status objects if _, ok := event.Object.(*metav1.Status); !ok { - event.Object = summary.Summarized(event.Object) + event.Object = summary.SummarizedWithOptions(event.Object, generateSummarizeOpts(c.options.Schema)) } eventChan <- event } @@ -113,3 +130,19 @@ type watcher struct { func (w watcher) ResultChan() <-chan watch.Event { return w.eventChan } + +func generateSummarizeOpts(schema *schemas.Schema) *summary.SummarizeOptions { + hasObservedGeneration := false + if schema != nil && schema.Attributes != nil { + if v, ok := schema.Attributes["hasObservedGeneration"]; ok { + if b, ok := v.(bool); ok { + hasObservedGeneration = b + } + } + } + summaryOpts := &summary.SummarizeOptions{ + HasObservedGeneration: hasObservedGeneration, + } + + return summaryOpts +} diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/informer/informer.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/informer/informer.go index be26f2dc9..ae4c68803 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/informer/informer.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/informer/informer.go @@ -116,6 +116,39 @@ func (f *summarySharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) return res } +func NewFilteredSummaryInformerWithOptions( + client client.ExtendedInterface, + gvr schema.GroupVersionResource, + opts *client.Options, + namespace string, + resyncPeriod time.Duration, + indexers cache.Indexers, + tweakListOptions TweakListOptionsFunc, +) informers.GenericInformer { + return &summaryInformer{ + gvr: gvr, + informer: cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceWithOptions(gvr, opts).Namespace(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceWithOptions(gvr, opts).Namespace(namespace).Watch(context.TODO(), options) + }, + }, + &summary.SummarizedObject{}, + resyncPeriod, + indexers, + ), + } +} + // NewFilteredSummaryInformer constructs a new informer for a summary type. func NewFilteredSummaryInformer(client client.Interface, gvr schema.GroupVersionResource, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions TweakListOptionsFunc) informers.GenericInformer { return &summaryInformer{ diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarized.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarized.go index 7526dde7b..e24a661e9 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarized.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarized.go @@ -18,12 +18,16 @@ type SummarizedObjectList struct { } func Summarized(u runtime.Object) *SummarizedObject { + return SummarizedWithOptions(u, nil) +} + +func SummarizedWithOptions(u runtime.Object, opts *SummarizeOptions) *SummarizedObject { if s, ok := u.(*SummarizedObject); ok { return s } s := &SummarizedObject{ - Summary: Summarize(u), + Summary: SummarizeWithOptions(u, opts), } s.APIVersion, s.Kind = u.GetObjectKind().GroupVersionKind().ToAPIVersionAndKind() diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarizers.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarizers.go index 5084c9d1a..385d24e85 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarizers.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summarizers.go @@ -150,6 +150,7 @@ func init() { checkOwner, checkApplyOwned, checkCattleTypes, + checkGeneration, } initializeCheckErrors() @@ -204,6 +205,34 @@ func initializeCheckErrors() { logrus.Debugf("GVK Error Mapping not provided, using predefined values") } +func checkGeneration(obj data.Object, _ []Condition, summary Summary) Summary { + if summary.State != "" { + return summary + } + + if summary.HasObservedGeneration { + metadataGeneration, metadataFound, errMetadata := unstructured.NestedInt64(obj, "metadata", "generation") + if errMetadata != nil { + return summary + } + if !metadataFound { + return summary + } + + observedGeneration, _, errObserved := unstructured.NestedInt64(obj, "status", "observedGeneration") + if errObserved != nil { + return summary + } + + if observedGeneration != metadataGeneration { + summary.State = "in-progress" + summary.Transitioning = true + } + } + + return summary +} + func checkOwner(obj data.Object, conditions []Condition, summary Summary) Summary { ustr := &unstructured.Unstructured{ Object: obj, diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summary.go b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summary.go index 85721c8ac..9ac369895 100644 --- a/vendor/github.com/rancher/wrangler/v3/pkg/summary/summary.go +++ b/vendor/github.com/rancher/wrangler/v3/pkg/summary/summary.go @@ -11,12 +11,17 @@ import ( ) type Summary struct { - State string `json:"state,omitempty"` - Error bool `json:"error,omitempty"` - Transitioning bool `json:"transitioning,omitempty"` - Message []string `json:"message,omitempty"` - Attributes map[string]interface{} `json:"-"` - Relationships []Relationship `json:"-"` + State string `json:"state,omitempty"` + Error bool `json:"error,omitempty"` + Transitioning bool `json:"transitioning,omitempty"` + Message []string `json:"message,omitempty"` + Attributes map[string]interface{} `json:"-"` + Relationships []Relationship `json:"-"` + HasObservedGeneration bool `json:"-"` +} + +type SummarizeOptions struct { + HasObservedGeneration bool } type Relationship struct { @@ -86,6 +91,10 @@ func dedupMessage(messages []string) []string { } func Summarize(runtimeObj runtime.Object) Summary { + return SummarizeWithOptions(runtimeObj, nil) +} + +func SummarizeWithOptions(runtimeObj runtime.Object, opts *SummarizeOptions) Summary { var ( obj data.Object err error @@ -109,6 +118,9 @@ func Summarize(runtimeObj runtime.Object) Summary { } conditions := getConditions(obj) + if opts != nil { + summary.HasObservedGeneration = opts.HasObservedGeneration + } for _, summarizer := range Summarizers { summary = summarizer(obj, conditions, summary) diff --git a/vendor/github.com/tevino/tcp-shaker/.travis.yml b/vendor/github.com/tevino/tcp-shaker/.travis.yml index 070449e14..8d7e590c0 100644 --- a/vendor/github.com/tevino/tcp-shaker/.travis.yml +++ b/vendor/github.com/tevino/tcp-shaker/.travis.yml @@ -6,7 +6,6 @@ go: - "master" - "1.11.x" install: - - go get "github.com/pkg/errors" - go get "golang.org/x/sys/unix" script: go test -v -bench=. -benchmem ./... diff --git a/vendor/github.com/tevino/tcp-shaker/CONTRIBUTING.md b/vendor/github.com/tevino/tcp-shaker/CONTRIBUTING.md index 26ad8c56b..acda0082a 100644 --- a/vendor/github.com/tevino/tcp-shaker/CONTRIBUTING.md +++ b/vendor/github.com/tevino/tcp-shaker/CONTRIBUTING.md @@ -1,12 +1,9 @@ # Contributing to TCP Shaker -## Styleguide -### Git commit message +- Open an issue for alignment before submitting a pull request. +- Write unit tests for all new functionality. +- Capitalize the first letter in git commit messages ("Add feature" not "add feature"). -- Capitalize the first letter ("Add feature" not "add feature") -- Limit the first line to 50 characters or less -- Details below the first line should be wrapped to 72 characters -- Use the present tense ("Add feature" not "Added feature") -- Use the imperative mood ("Move cursor to..." not "Moves cursor to...") +Feel free to tag anyone you think should review your PR, so they will receive a notification. -Please squash your commits into a single commit when appropriate. This simplifies future cherry picks and keeps the git log clean. +Thank you for contributing to TCP Shaker! diff --git a/vendor/github.com/tevino/tcp-shaker/README.md b/vendor/github.com/tevino/tcp-shaker/README.md index 9c7a2e589..37a031f1d 100644 --- a/vendor/github.com/tevino/tcp-shaker/README.md +++ b/vendor/github.com/tevino/tcp-shaker/README.md @@ -53,42 +53,88 @@ conn, err := net.DialTimeout("tcp", addr, timeout) conn.Close() ``` +The reason for a fake implementation is that there is currently no way to perform an equivalent operation on certain platforms, specifically macOS. A fake implementation is a degradation on those platforms and ensures a successful compilation. + + ## Usage +### Quick start (recommended) + ```go -import "github.com/tevino/tcp-shaker" +import ( + tcpshaker "github.com/tevino/tcp-shaker" +) + +// Get the global singleton Checker instance +checker := tcpshaker.DefaultChecker() + + +// Checking example.com +err := checker.CheckAddr("example.com:80", time.Second) +switch err { +case ErrTimeout: + fmt.Println("Connect timed out after 1s") +case nil: + fmt.Println("Connect succeeded") +default: + fmt.Println("Error occurred while connecting: ", err) +} +``` + +### Manual initialization -c := NewChecker() +For fine-grained control of the lifecycle of the `Checker`. + +``` +// Initializing the checker +// Only a single instance is needed and it's safe to use among goroutines. +checker := NewChecker() ctx, stopChecker := context.WithCancel(context.Background()) defer stopChecker() go func() { - if err := c.CheckingLoop(ctx); err != nil { + if err := checker.CheckingLoop(ctx); err != nil { fmt.Println("checking loop stopped due to fatal error: ", err) } }() -<-c.WaitReady() +<-checker.WaitReady() -timeout := time.Second * 1 -err := c.CheckAddr("google.com:80", timeout) -switch err { -case ErrTimeout: - fmt.Println("Connect to Google timed out") -case nil: - fmt.Println("Connect to Google succeeded") -default: - fmt.Println("Error occurred while connecting: ", err) -} +// now the checker could be used as shown in the previous example. +``` + +### Command-line tool + +A `tcp-checker` command-line tool is also available. It can be built with: + +```bash +go build -o tcp-checker ./cmd/tcp-checker +``` + +Or installed directly using `go install`: + +```bash +go install github.com/tevino/tcp-shaker/cmd/tcp-checker +``` + +Example usage: +```bash +# Check example.com:443 with a 2 seconds timeout +tcp-checker -a example.com:443 -t 2000 ``` +## Development & Contributing +See [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to contribute to the project. + ## TODO -- [ ] IPv6 support (Test environment needed, PRs are welcome) +- [x] IPv6 support (Test environment needed, PRs are welcome) ## Special thanks to contributors - @lujjjh Added zero linger support for non-Linux platform - @jakubgs Fixed compatibility on Android +- @kirk91 Added support for IPv6 +- @eos175 Added a global singleton for `Checker` [tcp-handshake]: https://en.wikipedia.org/wiki/Handshaking#TCP_three-way_handshake diff --git a/vendor/github.com/tevino/tcp-shaker/checker_linux.go b/vendor/github.com/tevino/tcp-shaker/checker_linux.go index 69c07be89..636b39a53 100644 --- a/vendor/github.com/tevino/tcp-shaker/checker_linux.go +++ b/vendor/github.com/tevino/tcp-shaker/checker_linux.go @@ -2,22 +2,24 @@ package tcp import ( "context" + "fmt" "sync" "sync/atomic" "time" - "github.com/pkg/errors" + "github.com/tevino/tcp-shaker/internal" "golang.org/x/sys/unix" ) -// Checker contains an epoll instance for TCP handshake checking +// Checker contains an epoll instance for TCP handshake checking. +// NOTE: Ideally only one instance of Checker should be created within a process. type Checker struct { - pipePool - resultPipes - pollerLock sync.Mutex - _pollerFd int32 - zeroLinger bool - isReady chan struct{} + pipePool internal.PipePool + resultPipes internal.ResultPipes + pollerLock sync.Mutex + _pollerFd int32 + zeroLinger bool + isReady chan struct{} } // NewChecker creates a Checker with linger set to zero. @@ -28,8 +30,8 @@ func NewChecker() *Checker { // NewCheckerZeroLinger creates a Checker with zeroLinger set to given value. func NewCheckerZeroLinger(zeroLinger bool) *Checker { return &Checker{ - pipePool: newPipePoolSyncPool(), - resultPipes: newResultPipesSyncMap(), + pipePool: internal.NewPipePoolSyncPool(), + resultPipes: internal.NewResultPipesSyncMap(), _pollerFd: -1, zeroLinger: zeroLinger, isReady: make(chan struct{}), @@ -41,9 +43,11 @@ func NewCheckerZeroLinger(zeroLinger bool) *Checker { func (c *Checker) CheckingLoop(ctx context.Context) error { pollerFd, err := c.createPoller() if err != nil { - return errors.Wrap(err, "error creating poller") + return fmt.Errorf("error creating poller: %w", err) } - defer c.closePoller() + defer func() { + _ = c.closePoller() + }() c.setReady() defer c.resetReady() @@ -99,7 +103,7 @@ func (c *Checker) pollingLoop(ctx context.Context, pollerFd int) error { evts, err := pollEvents(pollerFd, pollerTimeout) if err != nil { // fatal error - return errors.Wrap(err, "error during polling loop") + return fmt.Errorf("error during polling loop: %w", err) } c.handlePollerEvents(evts) @@ -107,9 +111,9 @@ func (c *Checker) pollingLoop(ctx context.Context, pollerFd int) error { } } -func (c *Checker) handlePollerEvents(evts []event) { +func (c *Checker) handlePollerEvents(evts []internal.Event) { for _, e := range evts { - if pipe, exists := c.resultPipes.popResultPipe(e.Fd); exists { + if pipe, exists := c.resultPipes.PopResultPipe(e.Fd); exists { pipe <- e.Err } // error pipe not found @@ -141,12 +145,12 @@ func (c *Checker) CheckAddrZeroLinger(addr string, timeout time.Duration, zeroLi deadline := time.Now().Add(timeout) // Parse address - rAddr, err := parseSockAddr(addr) + rAddr, family, err := parseSockAddr(addr) if err != nil { return err } // Create socket with options set - fd, err := createSocketZeroLinger(zeroLinger) + fd, err := createSocketZeroLinger(family, zeroLinger) if err != nil { return err } @@ -162,19 +166,20 @@ func (c *Checker) CheckAddrZeroLinger(addr string, timeout time.Duration, zeroLi return nil } // Otherwise wait for the result of connect. - return c.waitConnectResult(fd, deadline.Sub(time.Now())) + + return c.waitConnectResult(fd, time.Until((deadline))) } func (c *Checker) waitConnectResult(fd int, timeout time.Duration) error { // get a pipe of connect result - resultPipe := c.getPipe() + resultPipe := c.pipePool.GetPipe() defer func() { - c.resultPipes.deregisterResultPipe(fd) - c.putBackPipe(resultPipe) + c.resultPipes.DeRegisterResultPipe(fd) + c.pipePool.PutBackPipe(resultPipe) }() // this must be done before registerEvents - c.resultPipes.registerResultPipe(fd, resultPipe) + c.resultPipes.RegisterResultPipe(fd, resultPipe) // Register to epoll for later error checking if err := registerEvents(c.pollerFD(), fd); err != nil { return err diff --git a/vendor/github.com/tevino/tcp-shaker/checker_nonlinux.go b/vendor/github.com/tevino/tcp-shaker/checker_nonlinux.go index 36843c360..a02b546ee 100644 --- a/vendor/github.com/tevino/tcp-shaker/checker_nonlinux.go +++ b/vendor/github.com/tevino/tcp-shaker/checker_nonlinux.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package tcp @@ -45,9 +46,9 @@ func (c *Checker) CheckAddrZeroLinger(addr string, timeout time.Duration, zeroLi if conn != nil { if zeroLinger { // Simply ignore the error since this is a fake implementation. - conn.(*net.TCPConn).SetLinger(0) + _ = conn.(*net.TCPConn).SetLinger(0) } - conn.Close() + _ = conn.Close() } if opErr, ok := err.(*net.OpError); ok { if opErr.Timeout() { diff --git a/vendor/github.com/tevino/tcp-shaker/default_checker.go b/vendor/github.com/tevino/tcp-shaker/default_checker.go new file mode 100644 index 000000000..c0c4cfc47 --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/default_checker.go @@ -0,0 +1,43 @@ +package tcp + +import ( + "context" + "log" + "os" + "os/signal" + "sync" + "syscall" +) + +var ( + defaultChecker *Checker + once sync.Once +) + +// DefaultChecker returns a shared singleton instance of the Checker. +// +// It starts the Checker's CheckingLoop in a goroutine with a context that +// listens for system signals (SIGINT, SIGTERM) to stop gracefully. This function +// blocks until the Checker is ready for use. +func DefaultChecker() *Checker { + once.Do(func() { + defaultChecker = NewChecker() + + go func() { + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) + defer stop() + + // If the checking loop stops with an error, we log it. + // We use the standard log package to avoid external dependencies. + if err := defaultChecker.CheckingLoop(ctx); err != nil { + log.Printf("tcpshaker: TCP checking loop stopped with an error: %v", err) + } + }() + + // Wait for the checker to be ready to ensure initialization is complete + // before returning the instance. + <-defaultChecker.WaitReady() + }) + + return defaultChecker +} diff --git a/vendor/github.com/tevino/tcp-shaker/doc.go b/vendor/github.com/tevino/tcp-shaker/doc.go index c008485cd..53683d9a2 100644 --- a/vendor/github.com/tevino/tcp-shaker/doc.go +++ b/vendor/github.com/tevino/tcp-shaker/doc.go @@ -2,17 +2,17 @@ Package tcp is used to perform TCP handshake without ACK, which useful for TCP health checking. HAProxy does this exactly the same, which is: - 1. SYN - 2. SYN-ACK - 3. RST + 1. SYN + 2. SYN-ACK + 3. RST -Why do I have to do this +# Why do I have to do this In most cases when you establish a TCP connection(e.g. via net.Dial), these are the first three packets between the client and server(TCP three-way handshake): - 1. Client -> Server: SYN - 2. Server -> Client: SYN-ACK - 3. Client -> Server: ACK + 1. Client -> Server: SYN + 2. Server -> Client: SYN-ACK + 3. Client -> Server: ACK This package tries to avoid the last ACK when doing handshakes. @@ -20,12 +20,12 @@ By sending the last ACK, the connection is considered established. However, as for TCP health checking the server could be considered alive right after it sends back SYN-ACK, that renders the last ACK unnecessary or even harmful in some cases. -Benefits +# Benefits By avoiding the last ACK - 1. Less packets better efficiency - 2. The health checking is less obvious + 1. Less packets better efficiency + 2. The health checking is less obvious The second one is essential because it bothers the server less. diff --git a/vendor/github.com/tevino/tcp-shaker/err.go b/vendor/github.com/tevino/tcp-shaker/err.go index b83e19015..a097374f0 100644 --- a/vendor/github.com/tevino/tcp-shaker/err.go +++ b/vendor/github.com/tevino/tcp-shaker/err.go @@ -2,8 +2,6 @@ package tcp import ( "errors" - - "golang.org/x/sys/unix" ) // ErrTimeout indicates I/O timeout @@ -21,10 +19,5 @@ type ErrConnect struct { error } -// newErrConnect returns a ErrConnect with given error code -func newErrConnect(errCode int) *ErrConnect { - return &ErrConnect{unix.Errno(errCode)} -} - // ErrCheckerAlreadyStarted indicates there is another instance of CheckingLoop running. var ErrCheckerAlreadyStarted = errors.New("Checker was already started") diff --git a/vendor/github.com/tevino/tcp-shaker/err_linux.go b/vendor/github.com/tevino/tcp-shaker/err_linux.go new file mode 100644 index 000000000..7d47e7d6b --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/err_linux.go @@ -0,0 +1,10 @@ +package tcp + +import ( + "golang.org/x/sys/unix" +) + +// newErrConnect returns a ErrConnect with given error code +func newErrConnect(errCode int) *ErrConnect { + return &ErrConnect{unix.Errno(errCode)} +} diff --git a/vendor/github.com/tevino/tcp-shaker/event.go b/vendor/github.com/tevino/tcp-shaker/event.go deleted file mode 100644 index 37a2a3cf7..000000000 --- a/vendor/github.com/tevino/tcp-shaker/event.go +++ /dev/null @@ -1,6 +0,0 @@ -package tcp - -type event struct { - Fd int - Err error -} diff --git a/vendor/github.com/tevino/tcp-shaker/internal/event.go b/vendor/github.com/tevino/tcp-shaker/internal/event.go new file mode 100644 index 000000000..89b7487f2 --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/internal/event.go @@ -0,0 +1,6 @@ +package internal + +type Event struct { + Fd int + Err error +} diff --git a/vendor/github.com/tevino/tcp-shaker/internal/pipe_pool.go b/vendor/github.com/tevino/tcp-shaker/internal/pipe_pool.go new file mode 100644 index 000000000..862d1eeb3 --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/internal/pipe_pool.go @@ -0,0 +1,6 @@ +package internal + +type PipePool interface { + GetPipe() chan error + PutBackPipe(chan error) +} diff --git a/vendor/github.com/tevino/tcp-shaker/pipe_pool_sync_pool.go b/vendor/github.com/tevino/tcp-shaker/internal/pipe_pool_sync_pool.go similarity index 66% rename from vendor/github.com/tevino/tcp-shaker/pipe_pool_sync_pool.go rename to vendor/github.com/tevino/tcp-shaker/internal/pipe_pool_sync_pool.go index 010b6002e..e09b965f4 100644 --- a/vendor/github.com/tevino/tcp-shaker/pipe_pool_sync_pool.go +++ b/vendor/github.com/tevino/tcp-shaker/internal/pipe_pool_sync_pool.go @@ -1,4 +1,4 @@ -package tcp +package internal import "sync" @@ -6,7 +6,7 @@ type pipePoolSyncPool struct { pool sync.Pool } -func newPipePoolSyncPool() *pipePoolSyncPool { +func NewPipePoolSyncPool() *pipePoolSyncPool { return &pipePoolSyncPool{sync.Pool{ New: func() interface{} { return make(chan error, 1) @@ -14,11 +14,11 @@ func newPipePoolSyncPool() *pipePoolSyncPool { } } -func (p *pipePoolSyncPool) getPipe() chan error { +func (p *pipePoolSyncPool) GetPipe() chan error { return p.pool.Get().(chan error) } -func (p *pipePoolSyncPool) putBackPipe(pipe chan error) { +func (p *pipePoolSyncPool) PutBackPipe(pipe chan error) { p.cleanPipe(pipe) p.pool.Put(pipe) } diff --git a/vendor/github.com/tevino/tcp-shaker/internal/result_pipes.go b/vendor/github.com/tevino/tcp-shaker/internal/result_pipes.go new file mode 100644 index 000000000..85dacf11f --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/internal/result_pipes.go @@ -0,0 +1,7 @@ +package internal + +type ResultPipes interface { + PopResultPipe(int) (chan error, bool) + DeRegisterResultPipe(int) + RegisterResultPipe(int, chan error) +} diff --git a/vendor/github.com/tevino/tcp-shaker/result_pipes_sync_map.go b/vendor/github.com/tevino/tcp-shaker/internal/result_pipes_sync_map.go similarity index 57% rename from vendor/github.com/tevino/tcp-shaker/result_pipes_sync_map.go rename to vendor/github.com/tevino/tcp-shaker/internal/result_pipes_sync_map.go index cbac10286..a5679c0b2 100644 --- a/vendor/github.com/tevino/tcp-shaker/result_pipes_sync_map.go +++ b/vendor/github.com/tevino/tcp-shaker/internal/result_pipes_sync_map.go @@ -1,4 +1,4 @@ -package tcp +package internal import "sync" @@ -6,11 +6,11 @@ type resultPipesSyncMap struct { sync.Map } -func newResultPipesSyncMap() *resultPipesSyncMap { +func NewResultPipesSyncMap() *resultPipesSyncMap { return &resultPipesSyncMap{} } -func (r *resultPipesSyncMap) popResultPipe(fd int) (chan error, bool) { +func (r *resultPipesSyncMap) PopResultPipe(fd int) (chan error, bool) { p, exist := r.Load(fd) if exist { r.Delete(fd) @@ -21,11 +21,11 @@ func (r *resultPipesSyncMap) popResultPipe(fd int) (chan error, bool) { return nil, exist } -func (r *resultPipesSyncMap) deregisterResultPipe(fd int) { +func (r *resultPipesSyncMap) DeRegisterResultPipe(fd int) { r.Delete(fd) } -func (r *resultPipesSyncMap) registerResultPipe(fd int, pipe chan error) { +func (r *resultPipesSyncMap) RegisterResultPipe(fd int, pipe chan error) { // NOTE: the pipe should have been put back if c.fdResultPipes[fd] exists. r.Store(fd, pipe) } diff --git a/vendor/github.com/tevino/tcp-shaker/pipe_pool.go b/vendor/github.com/tevino/tcp-shaker/pipe_pool.go deleted file mode 100644 index e025a5c68..000000000 --- a/vendor/github.com/tevino/tcp-shaker/pipe_pool.go +++ /dev/null @@ -1,6 +0,0 @@ -package tcp - -type pipePool interface { - getPipe() chan error - putBackPipe(chan error) -} diff --git a/vendor/github.com/tevino/tcp-shaker/pipe_pool_dummy.go b/vendor/github.com/tevino/tcp-shaker/pipe_pool_dummy.go deleted file mode 100644 index 8114cfcb0..000000000 --- a/vendor/github.com/tevino/tcp-shaker/pipe_pool_dummy.go +++ /dev/null @@ -1,13 +0,0 @@ -package tcp - -type pipePoolDummy struct{} - -func newPipePoolDummy() *pipePoolDummy { - return &pipePoolDummy{} -} - -func (*pipePoolDummy) getPipe() chan error { - return make(chan error, 1) -} - -func (*pipePoolDummy) putBackPipe(pipe chan error) {} diff --git a/vendor/github.com/tevino/tcp-shaker/result_pipes.go b/vendor/github.com/tevino/tcp-shaker/result_pipes.go deleted file mode 100644 index a5489b991..000000000 --- a/vendor/github.com/tevino/tcp-shaker/result_pipes.go +++ /dev/null @@ -1,7 +0,0 @@ -package tcp - -type resultPipes interface { - popResultPipe(int) (chan error, bool) - deregisterResultPipe(int) - registerResultPipe(int, chan error) -} diff --git a/vendor/github.com/tevino/tcp-shaker/result_pipes_mu.go b/vendor/github.com/tevino/tcp-shaker/result_pipes_mu.go deleted file mode 100644 index a1cd1a8e8..000000000 --- a/vendor/github.com/tevino/tcp-shaker/result_pipes_mu.go +++ /dev/null @@ -1,35 +0,0 @@ -package tcp - -import "sync" - -type resultPipesMU struct { - l sync.Mutex - fdResultPipes map[int]chan error -} - -func newResultPipesMU() *resultPipesMU { - return &resultPipesMU{fdResultPipes: make(map[int]chan error)} -} - -func (r *resultPipesMU) popResultPipe(fd int) (chan error, bool) { - r.l.Lock() - p, exists := r.fdResultPipes[fd] - if exists { - delete(r.fdResultPipes, fd) - } - r.l.Unlock() - return p, exists -} - -func (r *resultPipesMU) deregisterResultPipe(fd int) { - r.l.Lock() - delete(r.fdResultPipes, fd) - r.l.Unlock() -} - -func (r *resultPipesMU) registerResultPipe(fd int, pipe chan error) { - // NOTE: the pipe should have been put back if c.fdResultPipes[fd] exists. - r.l.Lock() - r.fdResultPipes[fd] = pipe - r.l.Unlock() -} diff --git a/vendor/github.com/tevino/tcp-shaker/socket.go b/vendor/github.com/tevino/tcp-shaker/socket.go deleted file mode 100644 index 6c9237ad7..000000000 --- a/vendor/github.com/tevino/tcp-shaker/socket.go +++ /dev/null @@ -1,54 +0,0 @@ -package tcp - -import ( - "net" - "runtime" - - "golang.org/x/sys/unix" -) - -// parseSockAddr resolves given addr to unix.Sockaddr -func parseSockAddr(addr string) (unix.Sockaddr, error) { - tAddr, err := net.ResolveTCPAddr("tcp", addr) - if err != nil { - return nil, err - } - var addr4 [4]byte - if tAddr.IP != nil { - copy(addr4[:], tAddr.IP.To4()) // copy last 4 bytes of slice to array - } - return &unix.SockaddrInet4{Port: tAddr.Port, Addr: addr4}, nil -} - -// connect calls the connect syscall with error handled. -func connect(fd int, addr unix.Sockaddr) (success bool, err error) { - switch serr := unix.Connect(fd, addr); serr { - case unix.EALREADY, unix.EINPROGRESS, unix.EINTR: - // Connection could not be made immediately but asynchronously. - success = false - err = nil - case nil, unix.EISCONN: - // The specified socket is already connected. - success = true - err = nil - case unix.EINVAL: - // On Solaris we can see EINVAL if the socket has - // already been accepted and closed by the server. - // Treat this as a successful connection--writes to - // the socket will see EOF. For details and a test - // case in C see https://golang.org/issue/6828. - if runtime.GOOS == "solaris" { - success = true - err = nil - } else { - // error must be reported - success = false - err = serr - } - default: - // Connect error. - success = false - err = serr - } - return success, err -} diff --git a/vendor/github.com/tevino/tcp-shaker/socket_linux.go b/vendor/github.com/tevino/tcp-shaker/socket_linux.go index 21627e094..5f0dd5fda 100644 --- a/vendor/github.com/tevino/tcp-shaker/socket_linux.go +++ b/vendor/github.com/tevino/tcp-shaker/socket_linux.go @@ -3,17 +3,19 @@ package tcp import ( "fmt" "os" + "runtime" "time" + "github.com/tevino/tcp-shaker/internal" "golang.org/x/sys/unix" ) const maxEpollEvents = 32 // createSocket creates a socket with necessary options set. -func createSocketZeroLinger(zeroLinger bool) (fd int, err error) { +func createSocketZeroLinger(family int, zeroLinger bool) (fd int, err error) { // Create socket - fd, err = _createNonBlockingSocket() + fd, err = _createNonBlockingSocket(family) if err == nil { if zeroLinger { err = _setZeroLinger(fd) @@ -23,9 +25,9 @@ func createSocketZeroLinger(zeroLinger bool) (fd int, err error) { } // createNonBlockingSocket creates a non-blocking socket with necessary options all set. -func _createNonBlockingSocket() (int, error) { +func _createNonBlockingSocket(family int) (int, error) { // Create socket - fd, err := _createSocket() + fd, err := _createSocket(family) if err != nil { return 0, err } @@ -38,8 +40,8 @@ func _createNonBlockingSocket() (int, error) { } // createSocket creates a socket with CloseOnExec set -func _createSocket() (int, error) { - fd, err := unix.Socket(unix.AF_INET, unix.SOCK_STREAM, 0) +func _createSocket(family int) (int, error) { + fd, err := unix.Socket(family, unix.SOCK_STREAM, 0) unix.CloseOnExec(fd) return fd, err } @@ -79,7 +81,7 @@ func registerEvents(pollerFd int, fd int) error { return nil } -func pollEvents(pollerFd int, timeout time.Duration) ([]event, error) { +func pollEvents(pollerFd int, timeout time.Duration) ([]internal.Event, error) { var timeoutMS = int(timeout.Nanoseconds() / 1000000) var epollEvents [maxEpollEvents]unix.EpollEvent nEvents, err := unix.EpollWait(pollerFd, epollEvents[:], timeoutMS) @@ -90,11 +92,11 @@ func pollEvents(pollerFd int, timeout time.Duration) ([]event, error) { return nil, os.NewSyscallError("epoll_wait", err) } - var events = make([]event, 0, nEvents) + var events = make([]internal.Event, 0, nEvents) for i := 0; i < nEvents; i++ { var fd = int(epollEvents[i].Fd) - var evt = event{Fd: fd, Err: nil} + var evt = internal.Event{Fd: fd, Err: nil} errCode, err := unix.GetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_ERROR) if err != nil { @@ -107,3 +109,36 @@ func pollEvents(pollerFd int, timeout time.Duration) ([]event, error) { } return events, nil } + +// connect calls the connect syscall with error handled. +func connect(fd int, addr unix.Sockaddr) (success bool, err error) { + switch serr := unix.Connect(fd, addr); serr { + case unix.EALREADY, unix.EINPROGRESS, unix.EINTR: + // Connection could not be made immediately but asynchronously. + success = false + err = nil + case nil, unix.EISCONN: + // The specified socket is already connected. + success = true + err = nil + case unix.EINVAL: + // On Solaris we can see EINVAL if the socket has + // already been accepted and closed by the server. + // Treat this as a successful connection--writes to + // the socket will see EOF. For details and a test + // case in C see https://golang.org/issue/6828. + if runtime.GOOS == "solaris" { //nolint:staticcheck + success = true + err = nil + } else { + // error must be reported + success = false + err = serr + } + default: + // Connect error. + success = false + err = serr + } + return success, err +} diff --git a/vendor/github.com/tevino/tcp-shaker/socket_unix.go b/vendor/github.com/tevino/tcp-shaker/socket_unix.go new file mode 100644 index 000000000..783c40cea --- /dev/null +++ b/vendor/github.com/tevino/tcp-shaker/socket_unix.go @@ -0,0 +1,39 @@ +//go:build unix + +package tcp + +import ( + "net" + + "golang.org/x/sys/unix" +) + +// parseSockAddr resolves given addr to unix.Sockaddr +func parseSockAddr(addr string) (sAddr unix.Sockaddr, family int, err error) { + tAddr, err := net.ResolveTCPAddr("tcp", addr) + if err != nil { + return + } + + if ip := tAddr.IP.To4(); ip != nil { + var addr4 [net.IPv4len]byte + copy(addr4[:], ip) + sAddr = &unix.SockaddrInet4{Port: tAddr.Port, Addr: addr4} + family = unix.AF_INET + return + } + + if ip := tAddr.IP.To16(); ip != nil { + var addr16 [net.IPv6len]byte + copy(addr16[:], ip) + sAddr = &unix.SockaddrInet6{Port: tAddr.Port, Addr: addr16} + family = unix.AF_INET6 + return + } + + err = &net.AddrError{ + Err: "unsupported address family", + Addr: tAddr.IP.String(), + } + return +} diff --git a/vendor/go.yaml.in/yaml/v3/LICENSE b/vendor/go.yaml.in/yaml/v3/LICENSE new file mode 100644 index 000000000..2683e4bb1 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/LICENSE @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/go.yaml.in/yaml/v3/NOTICE b/vendor/go.yaml.in/yaml/v3/NOTICE new file mode 100644 index 000000000..866d74a7a --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/NOTICE @@ -0,0 +1,13 @@ +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/go.yaml.in/yaml/v3/README.md b/vendor/go.yaml.in/yaml/v3/README.md new file mode 100644 index 000000000..15a85a635 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/README.md @@ -0,0 +1,171 @@ +go.yaml.in/yaml +=============== + +YAML Support for the Go Language + + +## Introduction + +The `yaml` package enables [Go](https://go.dev/) programs to comfortably encode +and decode [YAML](https://yaml.org/) values. + +It was originally developed within [Canonical](https://www.canonical.com) as +part of the [juju](https://juju.ubuntu.com) project, and is based on a pure Go +port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) C library to +parse and generate YAML data quickly and reliably. + + +## Project Status + +This project started as a fork of the extremely popular [go-yaml]( +https://github.com/go-yaml/yaml/) +project, and is being maintained by the official [YAML organization]( +https://github.com/yaml/). + +The YAML team took over ongoing maintenance and development of the project after +discussion with go-yaml's author, @niemeyer, following his decision to +[label the project repository as "unmaintained"]( +https://github.com/go-yaml/yaml/blob/944c86a7d2/README.md) in April 2025. + +We have put together a team of dedicated maintainers including representatives +of go-yaml's most important downstream projects. + +We will strive to earn the trust of the various go-yaml forks to switch back to +this repository as their upstream. + +Please [contact us](https://cloud-native.slack.com/archives/C08PPAT8PS7) if you +would like to contribute or be involved. + + +## Compatibility + +The `yaml` package supports most of YAML 1.2, but preserves some behavior from +1.1 for backwards compatibility. + +Specifically, v3 of the `yaml` package: + +* Supports YAML 1.1 bools (`yes`/`no`, `on`/`off`) as long as they are being + decoded into a typed bool value. + Otherwise they behave as a string. + Booleans in YAML 1.2 are `true`/`false` only. +* Supports octals encoded and decoded as `0777` per YAML 1.1, rather than + `0o777` as specified in YAML 1.2, because most parsers still use the old + format. + Octals in the `0o777` format are supported though, so new files work. +* Does not support base-60 floats. + These are gone from YAML 1.2, and were actually never supported by this + package as it's clearly a poor choice. + + +## Installation and Usage + +The import path for the package is *go.yaml.in/yaml/v3*. + +To install it, run: + +```bash +go get go.yaml.in/yaml/v3 +``` + + +## API Documentation + +See: + + +## API Stability + +The package API for yaml v3 will remain stable as described in [gopkg.in]( +https://gopkg.in). + + +## Example + +```go +package main + +import ( + "fmt" + "log" + + "go.yaml.in/yaml/v3" +) + +var data = ` +a: Easy! +b: + c: 2 + d: [3, 4] +` + +// Note: struct fields must be public in order for unmarshal to +// correctly populate the data. +type T struct { + A string + B struct { + RenamedC int `yaml:"c"` + D []int `yaml:",flow"` + } +} + +func main() { + t := T{} + + err := yaml.Unmarshal([]byte(data), &t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t:\n%v\n\n", t) + + d, err := yaml.Marshal(&t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t dump:\n%s\n\n", string(d)) + + m := make(map[interface{}]interface{}) + + err = yaml.Unmarshal([]byte(data), &m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m:\n%v\n\n", m) + + d, err = yaml.Marshal(&m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m dump:\n%s\n\n", string(d)) +} +``` + +This example will generate the following output: + +``` +--- t: +{Easy! {2 [3 4]}} + +--- t dump: +a: Easy! +b: + c: 2 + d: [3, 4] + + +--- m: +map[a:Easy! b:map[c:2 d:[3 4]]] + +--- m dump: +a: Easy! +b: + c: 2 + d: + - 3 + - 4 +``` + + +## License + +The yaml package is licensed under the MIT and Apache License 2.0 licenses. +Please see the LICENSE file for details. diff --git a/vendor/go.yaml.in/yaml/v3/apic.go b/vendor/go.yaml.in/yaml/v3/apic.go new file mode 100644 index 000000000..05fd305da --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/apic.go @@ -0,0 +1,747 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "io" +) + +func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { + //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) + + // Check if we can move the queue at the beginning of the buffer. + if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { + if parser.tokens_head != len(parser.tokens) { + copy(parser.tokens, parser.tokens[parser.tokens_head:]) + } + parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] + parser.tokens_head = 0 + } + parser.tokens = append(parser.tokens, *token) + if pos < 0 { + return + } + copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) + parser.tokens[parser.tokens_head+pos] = *token +} + +// Create a new parser object. +func yaml_parser_initialize(parser *yaml_parser_t) bool { + *parser = yaml_parser_t{ + raw_buffer: make([]byte, 0, input_raw_buffer_size), + buffer: make([]byte, 0, input_buffer_size), + } + return true +} + +// Destroy a parser object. +func yaml_parser_delete(parser *yaml_parser_t) { + *parser = yaml_parser_t{} +} + +// String read handler. +func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + if parser.input_pos == len(parser.input) { + return 0, io.EOF + } + n = copy(buffer, parser.input[parser.input_pos:]) + parser.input_pos += n + return n, nil +} + +// Reader read handler. +func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + return parser.input_reader.Read(buffer) +} + +// Set a string input. +func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_string_read_handler + parser.input = input + parser.input_pos = 0 +} + +// Set a file input. +func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_reader_read_handler + parser.input_reader = r +} + +// Set the source encoding. +func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { + if parser.encoding != yaml_ANY_ENCODING { + panic("must set the encoding only once") + } + parser.encoding = encoding +} + +// Create a new emitter object. +func yaml_emitter_initialize(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{ + buffer: make([]byte, output_buffer_size), + raw_buffer: make([]byte, 0, output_raw_buffer_size), + states: make([]yaml_emitter_state_t, 0, initial_stack_size), + events: make([]yaml_event_t, 0, initial_queue_size), + best_width: -1, + } +} + +// Destroy an emitter object. +func yaml_emitter_delete(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{} +} + +// String write handler. +func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + *emitter.output_buffer = append(*emitter.output_buffer, buffer...) + return nil +} + +// yaml_writer_write_handler uses emitter.output_writer to write the +// emitted text. +func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + _, err := emitter.output_writer.Write(buffer) + return err +} + +// Set a string output. +func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_string_write_handler + emitter.output_buffer = output_buffer +} + +// Set a file output. +func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_writer_write_handler + emitter.output_writer = w +} + +// Set the output encoding. +func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { + if emitter.encoding != yaml_ANY_ENCODING { + panic("must set the output encoding only once") + } + emitter.encoding = encoding +} + +// Set the canonical output style. +func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { + emitter.canonical = canonical +} + +// Set the indentation increment. +func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { + if indent < 2 || indent > 9 { + indent = 2 + } + emitter.best_indent = indent +} + +// Set the preferred line width. +func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { + if width < 0 { + width = -1 + } + emitter.best_width = width +} + +// Set if unescaped non-ASCII characters are allowed. +func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { + emitter.unicode = unicode +} + +// Set the preferred line break character. +func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { + emitter.line_break = line_break +} + +///* +// * Destroy a token object. +// */ +// +//YAML_DECLARE(void) +//yaml_token_delete(yaml_token_t *token) +//{ +// assert(token); // Non-NULL token object expected. +// +// switch (token.type) +// { +// case YAML_TAG_DIRECTIVE_TOKEN: +// yaml_free(token.data.tag_directive.handle); +// yaml_free(token.data.tag_directive.prefix); +// break; +// +// case YAML_ALIAS_TOKEN: +// yaml_free(token.data.alias.value); +// break; +// +// case YAML_ANCHOR_TOKEN: +// yaml_free(token.data.anchor.value); +// break; +// +// case YAML_TAG_TOKEN: +// yaml_free(token.data.tag.handle); +// yaml_free(token.data.tag.suffix); +// break; +// +// case YAML_SCALAR_TOKEN: +// yaml_free(token.data.scalar.value); +// break; +// +// default: +// break; +// } +// +// memset(token, 0, sizeof(yaml_token_t)); +//} +// +///* +// * Check if a string is a valid UTF-8 sequence. +// * +// * Check 'reader.c' for more details on UTF-8 encoding. +// */ +// +//static int +//yaml_check_utf8(yaml_char_t *start, size_t length) +//{ +// yaml_char_t *end = start+length; +// yaml_char_t *pointer = start; +// +// while (pointer < end) { +// unsigned char octet; +// unsigned int width; +// unsigned int value; +// size_t k; +// +// octet = pointer[0]; +// width = (octet & 0x80) == 0x00 ? 1 : +// (octet & 0xE0) == 0xC0 ? 2 : +// (octet & 0xF0) == 0xE0 ? 3 : +// (octet & 0xF8) == 0xF0 ? 4 : 0; +// value = (octet & 0x80) == 0x00 ? octet & 0x7F : +// (octet & 0xE0) == 0xC0 ? octet & 0x1F : +// (octet & 0xF0) == 0xE0 ? octet & 0x0F : +// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; +// if (!width) return 0; +// if (pointer+width > end) return 0; +// for (k = 1; k < width; k ++) { +// octet = pointer[k]; +// if ((octet & 0xC0) != 0x80) return 0; +// value = (value << 6) + (octet & 0x3F); +// } +// if (!((width == 1) || +// (width == 2 && value >= 0x80) || +// (width == 3 && value >= 0x800) || +// (width == 4 && value >= 0x10000))) return 0; +// +// pointer += width; +// } +// +// return 1; +//} +// + +// Create STREAM-START. +func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + encoding: encoding, + } +} + +// Create STREAM-END. +func yaml_stream_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + } +} + +// Create DOCUMENT-START. +func yaml_document_start_event_initialize( + event *yaml_event_t, + version_directive *yaml_version_directive_t, + tag_directives []yaml_tag_directive_t, + implicit bool, +) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: implicit, + } +} + +// Create DOCUMENT-END. +func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + implicit: implicit, + } +} + +// Create ALIAS. +func yaml_alias_event_initialize(event *yaml_event_t, anchor []byte) bool { + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + anchor: anchor, + } + return true +} + +// Create SCALAR. +func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + anchor: anchor, + tag: tag, + value: value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-START. +func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-END. +func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + } + return true +} + +// Create MAPPING-START. +func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } +} + +// Create MAPPING-END. +func yaml_mapping_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + } +} + +// Destroy an event object. +func yaml_event_delete(event *yaml_event_t) { + *event = yaml_event_t{} +} + +///* +// * Create a document object. +// */ +// +//YAML_DECLARE(int) +//yaml_document_initialize(document *yaml_document_t, +// version_directive *yaml_version_directive_t, +// tag_directives_start *yaml_tag_directive_t, +// tag_directives_end *yaml_tag_directive_t, +// start_implicit int, end_implicit int) +//{ +// struct { +// error yaml_error_type_t +// } context +// struct { +// start *yaml_node_t +// end *yaml_node_t +// top *yaml_node_t +// } nodes = { NULL, NULL, NULL } +// version_directive_copy *yaml_version_directive_t = NULL +// struct { +// start *yaml_tag_directive_t +// end *yaml_tag_directive_t +// top *yaml_tag_directive_t +// } tag_directives_copy = { NULL, NULL, NULL } +// value yaml_tag_directive_t = { NULL, NULL } +// mark yaml_mark_t = { 0, 0, 0 } +// +// assert(document) // Non-NULL document object is expected. +// assert((tag_directives_start && tag_directives_end) || +// (tag_directives_start == tag_directives_end)) +// // Valid tag directives are expected. +// +// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error +// +// if (version_directive) { +// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) +// if (!version_directive_copy) goto error +// version_directive_copy.major = version_directive.major +// version_directive_copy.minor = version_directive.minor +// } +// +// if (tag_directives_start != tag_directives_end) { +// tag_directive *yaml_tag_directive_t +// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) +// goto error +// for (tag_directive = tag_directives_start +// tag_directive != tag_directives_end; tag_directive ++) { +// assert(tag_directive.handle) +// assert(tag_directive.prefix) +// if (!yaml_check_utf8(tag_directive.handle, +// strlen((char *)tag_directive.handle))) +// goto error +// if (!yaml_check_utf8(tag_directive.prefix, +// strlen((char *)tag_directive.prefix))) +// goto error +// value.handle = yaml_strdup(tag_directive.handle) +// value.prefix = yaml_strdup(tag_directive.prefix) +// if (!value.handle || !value.prefix) goto error +// if (!PUSH(&context, tag_directives_copy, value)) +// goto error +// value.handle = NULL +// value.prefix = NULL +// } +// } +// +// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, +// tag_directives_copy.start, tag_directives_copy.top, +// start_implicit, end_implicit, mark, mark) +// +// return 1 +// +//error: +// STACK_DEL(&context, nodes) +// yaml_free(version_directive_copy) +// while (!STACK_EMPTY(&context, tag_directives_copy)) { +// value yaml_tag_directive_t = POP(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// } +// STACK_DEL(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// +// return 0 +//} +// +///* +// * Destroy a document object. +// */ +// +//YAML_DECLARE(void) +//yaml_document_delete(document *yaml_document_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// tag_directive *yaml_tag_directive_t +// +// context.error = YAML_NO_ERROR // Eliminate a compiler warning. +// +// assert(document) // Non-NULL document object is expected. +// +// while (!STACK_EMPTY(&context, document.nodes)) { +// node yaml_node_t = POP(&context, document.nodes) +// yaml_free(node.tag) +// switch (node.type) { +// case YAML_SCALAR_NODE: +// yaml_free(node.data.scalar.value) +// break +// case YAML_SEQUENCE_NODE: +// STACK_DEL(&context, node.data.sequence.items) +// break +// case YAML_MAPPING_NODE: +// STACK_DEL(&context, node.data.mapping.pairs) +// break +// default: +// assert(0) // Should not happen. +// } +// } +// STACK_DEL(&context, document.nodes) +// +// yaml_free(document.version_directive) +// for (tag_directive = document.tag_directives.start +// tag_directive != document.tag_directives.end +// tag_directive++) { +// yaml_free(tag_directive.handle) +// yaml_free(tag_directive.prefix) +// } +// yaml_free(document.tag_directives.start) +// +// memset(document, 0, sizeof(yaml_document_t)) +//} +// +///** +// * Get a document node. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_node(document *yaml_document_t, index int) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (index > 0 && document.nodes.start + index <= document.nodes.top) { +// return document.nodes.start + index - 1 +// } +// return NULL +//} +// +///** +// * Get the root object. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_root_node(document *yaml_document_t) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (document.nodes.top != document.nodes.start) { +// return document.nodes.start +// } +// return NULL +//} +// +///* +// * Add a scalar node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_scalar(document *yaml_document_t, +// tag *yaml_char_t, value *yaml_char_t, length int, +// style yaml_scalar_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// value_copy *yaml_char_t = NULL +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// assert(value) // Non-NULL value is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (length < 0) { +// length = strlen((char *)value) +// } +// +// if (!yaml_check_utf8(value, length)) goto error +// value_copy = yaml_malloc(length+1) +// if (!value_copy) goto error +// memcpy(value_copy, value, length) +// value_copy[length] = '\0' +// +// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// yaml_free(tag_copy) +// yaml_free(value_copy) +// +// return 0 +//} +// +///* +// * Add a sequence node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_sequence(document *yaml_document_t, +// tag *yaml_char_t, style yaml_sequence_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_item_t +// end *yaml_node_item_t +// top *yaml_node_item_t +// } items = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error +// +// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, items) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Add a mapping node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_mapping(document *yaml_document_t, +// tag *yaml_char_t, style yaml_mapping_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_pair_t +// end *yaml_node_pair_t +// top *yaml_node_pair_t +// } pairs = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error +// +// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, pairs) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Append an item to a sequence node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_sequence_item(document *yaml_document_t, +// sequence int, item int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// assert(document) // Non-NULL document is required. +// assert(sequence > 0 +// && document.nodes.start + sequence <= document.nodes.top) +// // Valid sequence id is required. +// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) +// // A sequence node is required. +// assert(item > 0 && document.nodes.start + item <= document.nodes.top) +// // Valid item id is required. +// +// if (!PUSH(&context, +// document.nodes.start[sequence-1].data.sequence.items, item)) +// return 0 +// +// return 1 +//} +// +///* +// * Append a pair of a key and a value to a mapping node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_mapping_pair(document *yaml_document_t, +// mapping int, key int, value int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// pair yaml_node_pair_t +// +// assert(document) // Non-NULL document is required. +// assert(mapping > 0 +// && document.nodes.start + mapping <= document.nodes.top) +// // Valid mapping id is required. +// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) +// // A mapping node is required. +// assert(key > 0 && document.nodes.start + key <= document.nodes.top) +// // Valid key id is required. +// assert(value > 0 && document.nodes.start + value <= document.nodes.top) +// // Valid value id is required. +// +// pair.key = key +// pair.value = value +// +// if (!PUSH(&context, +// document.nodes.start[mapping-1].data.mapping.pairs, pair)) +// return 0 +// +// return 1 +//} +// +// diff --git a/vendor/go.yaml.in/yaml/v3/decode.go b/vendor/go.yaml.in/yaml/v3/decode.go new file mode 100644 index 000000000..02e2b17bf --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/decode.go @@ -0,0 +1,1018 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yaml + +import ( + "encoding" + "encoding/base64" + "fmt" + "io" + "math" + "reflect" + "strconv" + "time" +) + +// ---------------------------------------------------------------------------- +// Parser, produces a node tree out of a libyaml event stream. + +type parser struct { + parser yaml_parser_t + event yaml_event_t + doc *Node + anchors map[string]*Node + doneInit bool + textless bool +} + +func newParser(b []byte) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + if len(b) == 0 { + b = []byte{'\n'} + } + yaml_parser_set_input_string(&p.parser, b) + return &p +} + +func newParserFromReader(r io.Reader) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + yaml_parser_set_input_reader(&p.parser, r) + return &p +} + +func (p *parser) init() { + if p.doneInit { + return + } + p.anchors = make(map[string]*Node) + p.expect(yaml_STREAM_START_EVENT) + p.doneInit = true +} + +func (p *parser) destroy() { + if p.event.typ != yaml_NO_EVENT { + yaml_event_delete(&p.event) + } + yaml_parser_delete(&p.parser) +} + +// expect consumes an event from the event stream and +// checks that it's of the expected type. +func (p *parser) expect(e yaml_event_type_t) { + if p.event.typ == yaml_NO_EVENT { + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } + } + if p.event.typ == yaml_STREAM_END_EVENT { + failf("attempted to go past the end of stream; corrupted value?") + } + if p.event.typ != e { + p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) + p.fail() + } + yaml_event_delete(&p.event) + p.event.typ = yaml_NO_EVENT +} + +// peek peeks at the next event in the event stream, +// puts the results into p.event and returns the event type. +func (p *parser) peek() yaml_event_type_t { + if p.event.typ != yaml_NO_EVENT { + return p.event.typ + } + // It's curious choice from the underlying API to generally return a + // positive result on success, but on this case return true in an error + // scenario. This was the source of bugs in the past (issue #666). + if !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR { + p.fail() + } + return p.event.typ +} + +func (p *parser) fail() { + var where string + var line int + if p.parser.context_mark.line != 0 { + line = p.parser.context_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } else if p.parser.problem_mark.line != 0 { + line = p.parser.problem_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } + if line != 0 { + where = "line " + strconv.Itoa(line) + ": " + } + var msg string + if len(p.parser.problem) > 0 { + msg = p.parser.problem + } else { + msg = "unknown problem parsing YAML content" + } + failf("%s%s", where, msg) +} + +func (p *parser) anchor(n *Node, anchor []byte) { + if anchor != nil { + n.Anchor = string(anchor) + p.anchors[n.Anchor] = n + } +} + +func (p *parser) parse() *Node { + p.init() + switch p.peek() { + case yaml_SCALAR_EVENT: + return p.scalar() + case yaml_ALIAS_EVENT: + return p.alias() + case yaml_MAPPING_START_EVENT: + return p.mapping() + case yaml_SEQUENCE_START_EVENT: + return p.sequence() + case yaml_DOCUMENT_START_EVENT: + return p.document() + case yaml_STREAM_END_EVENT: + // Happens when attempting to decode an empty buffer. + return nil + case yaml_TAIL_COMMENT_EVENT: + panic("internal error: unexpected tail comment event (please report)") + default: + panic("internal error: attempted to parse unknown event (please report): " + p.event.typ.String()) + } +} + +func (p *parser) node(kind Kind, defaultTag, tag, value string) *Node { + var style Style + if tag != "" && tag != "!" { + tag = shortTag(tag) + style = TaggedStyle + } else if defaultTag != "" { + tag = defaultTag + } else if kind == ScalarNode { + tag, _ = resolve("", value) + } + n := &Node{ + Kind: kind, + Tag: tag, + Value: value, + Style: style, + } + if !p.textless { + n.Line = p.event.start_mark.line + 1 + n.Column = p.event.start_mark.column + 1 + n.HeadComment = string(p.event.head_comment) + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + } + return n +} + +func (p *parser) parseChild(parent *Node) *Node { + child := p.parse() + parent.Content = append(parent.Content, child) + return child +} + +func (p *parser) document() *Node { + n := p.node(DocumentNode, "", "", "") + p.doc = n + p.expect(yaml_DOCUMENT_START_EVENT) + p.parseChild(n) + if p.peek() == yaml_DOCUMENT_END_EVENT { + n.FootComment = string(p.event.foot_comment) + } + p.expect(yaml_DOCUMENT_END_EVENT) + return n +} + +func (p *parser) alias() *Node { + n := p.node(AliasNode, "", "", string(p.event.anchor)) + n.Alias = p.anchors[n.Value] + if n.Alias == nil { + failf("unknown anchor '%s' referenced", n.Value) + } + p.expect(yaml_ALIAS_EVENT) + return n +} + +func (p *parser) scalar() *Node { + var parsedStyle = p.event.scalar_style() + var nodeStyle Style + switch { + case parsedStyle&yaml_DOUBLE_QUOTED_SCALAR_STYLE != 0: + nodeStyle = DoubleQuotedStyle + case parsedStyle&yaml_SINGLE_QUOTED_SCALAR_STYLE != 0: + nodeStyle = SingleQuotedStyle + case parsedStyle&yaml_LITERAL_SCALAR_STYLE != 0: + nodeStyle = LiteralStyle + case parsedStyle&yaml_FOLDED_SCALAR_STYLE != 0: + nodeStyle = FoldedStyle + } + var nodeValue = string(p.event.value) + var nodeTag = string(p.event.tag) + var defaultTag string + if nodeStyle == 0 { + if nodeValue == "<<" { + defaultTag = mergeTag + } + } else { + defaultTag = strTag + } + n := p.node(ScalarNode, defaultTag, nodeTag, nodeValue) + n.Style |= nodeStyle + p.anchor(n, p.event.anchor) + p.expect(yaml_SCALAR_EVENT) + return n +} + +func (p *parser) sequence() *Node { + n := p.node(SequenceNode, seqTag, string(p.event.tag), "") + if p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 { + n.Style |= FlowStyle + } + p.anchor(n, p.event.anchor) + p.expect(yaml_SEQUENCE_START_EVENT) + for p.peek() != yaml_SEQUENCE_END_EVENT { + p.parseChild(n) + } + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + p.expect(yaml_SEQUENCE_END_EVENT) + return n +} + +func (p *parser) mapping() *Node { + n := p.node(MappingNode, mapTag, string(p.event.tag), "") + block := true + if p.event.mapping_style()&yaml_FLOW_MAPPING_STYLE != 0 { + block = false + n.Style |= FlowStyle + } + p.anchor(n, p.event.anchor) + p.expect(yaml_MAPPING_START_EVENT) + for p.peek() != yaml_MAPPING_END_EVENT { + k := p.parseChild(n) + if block && k.FootComment != "" { + // Must be a foot comment for the prior value when being dedented. + if len(n.Content) > 2 { + n.Content[len(n.Content)-3].FootComment = k.FootComment + k.FootComment = "" + } + } + v := p.parseChild(n) + if k.FootComment == "" && v.FootComment != "" { + k.FootComment = v.FootComment + v.FootComment = "" + } + if p.peek() == yaml_TAIL_COMMENT_EVENT { + if k.FootComment == "" { + k.FootComment = string(p.event.foot_comment) + } + p.expect(yaml_TAIL_COMMENT_EVENT) + } + } + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + if n.Style&FlowStyle == 0 && n.FootComment != "" && len(n.Content) > 1 { + n.Content[len(n.Content)-2].FootComment = n.FootComment + n.FootComment = "" + } + p.expect(yaml_MAPPING_END_EVENT) + return n +} + +// ---------------------------------------------------------------------------- +// Decoder, unmarshals a node into a provided value. + +type decoder struct { + doc *Node + aliases map[*Node]bool + terrors []string + + stringMapType reflect.Type + generalMapType reflect.Type + + knownFields bool + uniqueKeys bool + decodeCount int + aliasCount int + aliasDepth int + + mergedFields map[interface{}]bool +} + +var ( + nodeType = reflect.TypeOf(Node{}) + durationType = reflect.TypeOf(time.Duration(0)) + stringMapType = reflect.TypeOf(map[string]interface{}{}) + generalMapType = reflect.TypeOf(map[interface{}]interface{}{}) + ifaceType = generalMapType.Elem() + timeType = reflect.TypeOf(time.Time{}) + ptrTimeType = reflect.TypeOf(&time.Time{}) +) + +func newDecoder() *decoder { + d := &decoder{ + stringMapType: stringMapType, + generalMapType: generalMapType, + uniqueKeys: true, + } + d.aliases = make(map[*Node]bool) + return d +} + +func (d *decoder) terror(n *Node, tag string, out reflect.Value) { + if n.Tag != "" { + tag = n.Tag + } + value := n.Value + if tag != seqTag && tag != mapTag { + if len(value) > 10 { + value = " `" + value[:7] + "...`" + } else { + value = " `" + value + "`" + } + } + d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.Line, shortTag(tag), value, out.Type())) +} + +func (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) { + err := u.UnmarshalYAML(n) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +func (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (good bool) { + terrlen := len(d.terrors) + err := u.UnmarshalYAML(func(v interface{}) (err error) { + defer handleErr(&err) + d.unmarshal(n, reflect.ValueOf(v)) + if len(d.terrors) > terrlen { + issues := d.terrors[terrlen:] + d.terrors = d.terrors[:terrlen] + return &TypeError{issues} + } + return nil + }) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +// d.prepare initializes and dereferences pointers and calls UnmarshalYAML +// if a value is found to implement it. +// It returns the initialized and dereferenced out value, whether +// unmarshalling was already done by UnmarshalYAML, and if so whether +// its types unmarshalled appropriately. +// +// If n holds a null value, prepare returns before doing anything. +func (d *decoder) prepare(n *Node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { + if n.ShortTag() == nullTag { + return out, false, false + } + again := true + for again { + again = false + if out.Kind() == reflect.Ptr { + if out.IsNil() { + out.Set(reflect.New(out.Type().Elem())) + } + out = out.Elem() + again = true + } + if out.CanAddr() { + outi := out.Addr().Interface() + if u, ok := outi.(Unmarshaler); ok { + good = d.callUnmarshaler(n, u) + return out, true, good + } + if u, ok := outi.(obsoleteUnmarshaler); ok { + good = d.callObsoleteUnmarshaler(n, u) + return out, true, good + } + } + } + return out, false, false +} + +func (d *decoder) fieldByIndex(n *Node, v reflect.Value, index []int) (field reflect.Value) { + if n.ShortTag() == nullTag { + return reflect.Value{} + } + for _, num := range index { + for { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + continue + } + break + } + v = v.Field(num) + } + return v +} + +const ( + // 400,000 decode operations is ~500kb of dense object declarations, or + // ~5kb of dense object declarations with 10000% alias expansion + alias_ratio_range_low = 400000 + + // 4,000,000 decode operations is ~5MB of dense object declarations, or + // ~4.5MB of dense object declarations with 10% alias expansion + alias_ratio_range_high = 4000000 + + // alias_ratio_range is the range over which we scale allowed alias ratios + alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) +) + +func allowedAliasRatio(decodeCount int) float64 { + switch { + case decodeCount <= alias_ratio_range_low: + // allow 99% to come from alias expansion for small-to-medium documents + return 0.99 + case decodeCount >= alias_ratio_range_high: + // allow 10% to come from alias expansion for very large documents + return 0.10 + default: + // scale smoothly from 99% down to 10% over the range. + // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. + // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). + return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) + } +} + +func (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) { + d.decodeCount++ + if d.aliasDepth > 0 { + d.aliasCount++ + } + if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { + failf("document contains excessive aliasing") + } + if out.Type() == nodeType { + out.Set(reflect.ValueOf(n).Elem()) + return true + } + switch n.Kind { + case DocumentNode: + return d.document(n, out) + case AliasNode: + return d.alias(n, out) + } + out, unmarshaled, good := d.prepare(n, out) + if unmarshaled { + return good + } + switch n.Kind { + case ScalarNode: + good = d.scalar(n, out) + case MappingNode: + good = d.mapping(n, out) + case SequenceNode: + good = d.sequence(n, out) + case 0: + if n.IsZero() { + return d.null(out) + } + fallthrough + default: + failf("cannot decode node with unknown kind %d", n.Kind) + } + return good +} + +func (d *decoder) document(n *Node, out reflect.Value) (good bool) { + if len(n.Content) == 1 { + d.doc = n + d.unmarshal(n.Content[0], out) + return true + } + return false +} + +func (d *decoder) alias(n *Node, out reflect.Value) (good bool) { + if d.aliases[n] { + // TODO this could actually be allowed in some circumstances. + failf("anchor '%s' value contains itself", n.Value) + } + d.aliases[n] = true + d.aliasDepth++ + good = d.unmarshal(n.Alias, out) + d.aliasDepth-- + delete(d.aliases, n) + return good +} + +var zeroValue reflect.Value + +func resetMap(out reflect.Value) { + for _, k := range out.MapKeys() { + out.SetMapIndex(k, zeroValue) + } +} + +func (d *decoder) null(out reflect.Value) bool { + if out.CanAddr() { + switch out.Kind() { + case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: + out.Set(reflect.Zero(out.Type())) + return true + } + } + return false +} + +func (d *decoder) scalar(n *Node, out reflect.Value) bool { + var tag string + var resolved interface{} + if n.indicatedString() { + tag = strTag + resolved = n.Value + } else { + tag, resolved = resolve(n.Tag, n.Value) + if tag == binaryTag { + data, err := base64.StdEncoding.DecodeString(resolved.(string)) + if err != nil { + failf("!!binary value contains invalid base64 data") + } + resolved = string(data) + } + } + if resolved == nil { + return d.null(out) + } + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + // We've resolved to exactly the type we want, so use that. + out.Set(resolvedv) + return true + } + // Perhaps we can use the value as a TextUnmarshaler to + // set its value. + if out.CanAddr() { + u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) + if ok { + var text []byte + if tag == binaryTag { + text = []byte(resolved.(string)) + } else { + // We let any value be unmarshaled into TextUnmarshaler. + // That might be more lax than we'd like, but the + // TextUnmarshaler itself should bowl out any dubious values. + text = []byte(n.Value) + } + err := u.UnmarshalText(text) + if err != nil { + fail(err) + } + return true + } + } + switch out.Kind() { + case reflect.String: + if tag == binaryTag { + out.SetString(resolved.(string)) + return true + } + out.SetString(n.Value) + return true + case reflect.Interface: + out.Set(reflect.ValueOf(resolved)) + return true + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + // This used to work in v2, but it's very unfriendly. + isDuration := out.Type() == durationType + + switch resolved := resolved.(type) { + case int: + if !isDuration && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case int64: + if !isDuration && !out.OverflowInt(resolved) { + out.SetInt(resolved) + return true + } + case uint64: + if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case float64: + if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case string: + if out.Type() == durationType { + d, err := time.ParseDuration(resolved) + if err == nil { + out.SetInt(int64(d)) + return true + } + } + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + switch resolved := resolved.(type) { + case int: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case int64: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case uint64: + if !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case float64: + if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + } + case reflect.Bool: + switch resolved := resolved.(type) { + case bool: + out.SetBool(resolved) + return true + case string: + // This offers some compatibility with the 1.1 spec (https://yaml.org/type/bool.html). + // It only works if explicitly attempting to unmarshal into a typed bool value. + switch resolved { + case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON": + out.SetBool(true) + return true + case "n", "N", "no", "No", "NO", "off", "Off", "OFF": + out.SetBool(false) + return true + } + } + case reflect.Float32, reflect.Float64: + switch resolved := resolved.(type) { + case int: + out.SetFloat(float64(resolved)) + return true + case int64: + out.SetFloat(float64(resolved)) + return true + case uint64: + out.SetFloat(float64(resolved)) + return true + case float64: + out.SetFloat(resolved) + return true + } + case reflect.Struct: + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + out.Set(resolvedv) + return true + } + case reflect.Ptr: + panic("yaml internal error: please report the issue") + } + d.terror(n, tag, out) + return false +} + +func settableValueOf(i interface{}) reflect.Value { + v := reflect.ValueOf(i) + sv := reflect.New(v.Type()).Elem() + sv.Set(v) + return sv +} + +func (d *decoder) sequence(n *Node, out reflect.Value) (good bool) { + l := len(n.Content) + + var iface reflect.Value + switch out.Kind() { + case reflect.Slice: + out.Set(reflect.MakeSlice(out.Type(), l, l)) + case reflect.Array: + if l != out.Len() { + failf("invalid array: want %d elements but got %d", out.Len(), l) + } + case reflect.Interface: + // No type hints. Will have to use a generic sequence. + iface = out + out = settableValueOf(make([]interface{}, l)) + default: + d.terror(n, seqTag, out) + return false + } + et := out.Type().Elem() + + j := 0 + for i := 0; i < l; i++ { + e := reflect.New(et).Elem() + if ok := d.unmarshal(n.Content[i], e); ok { + out.Index(j).Set(e) + j++ + } + } + if out.Kind() != reflect.Array { + out.Set(out.Slice(0, j)) + } + if iface.IsValid() { + iface.Set(out) + } + return true +} + +func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { + l := len(n.Content) + if d.uniqueKeys { + nerrs := len(d.terrors) + for i := 0; i < l; i += 2 { + ni := n.Content[i] + for j := i + 2; j < l; j += 2 { + nj := n.Content[j] + if ni.Kind == nj.Kind && ni.Value == nj.Value { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: mapping key %#v already defined at line %d", nj.Line, nj.Value, ni.Line)) + } + } + } + if len(d.terrors) > nerrs { + return false + } + } + switch out.Kind() { + case reflect.Struct: + return d.mappingStruct(n, out) + case reflect.Map: + // okay + case reflect.Interface: + iface := out + if isStringMap(n) { + out = reflect.MakeMap(d.stringMapType) + } else { + out = reflect.MakeMap(d.generalMapType) + } + iface.Set(out) + default: + d.terror(n, mapTag, out) + return false + } + + outt := out.Type() + kt := outt.Key() + et := outt.Elem() + + stringMapType := d.stringMapType + generalMapType := d.generalMapType + if outt.Elem() == ifaceType { + if outt.Key().Kind() == reflect.String { + d.stringMapType = outt + } else if outt.Key() == ifaceType { + d.generalMapType = outt + } + } + + mergedFields := d.mergedFields + d.mergedFields = nil + + var mergeNode *Node + + mapIsNew := false + if out.IsNil() { + out.Set(reflect.MakeMap(outt)) + mapIsNew = true + } + for i := 0; i < l; i += 2 { + if isMerge(n.Content[i]) { + mergeNode = n.Content[i+1] + continue + } + k := reflect.New(kt).Elem() + if d.unmarshal(n.Content[i], k) { + if mergedFields != nil { + ki := k.Interface() + if d.getPossiblyUnhashableKey(mergedFields, ki) { + continue + } + d.setPossiblyUnhashableKey(mergedFields, ki, true) + } + kkind := k.Kind() + if kkind == reflect.Interface { + kkind = k.Elem().Kind() + } + if kkind == reflect.Map || kkind == reflect.Slice { + failf("invalid map key: %#v", k.Interface()) + } + e := reflect.New(et).Elem() + if d.unmarshal(n.Content[i+1], e) || n.Content[i+1].ShortTag() == nullTag && (mapIsNew || !out.MapIndex(k).IsValid()) { + out.SetMapIndex(k, e) + } + } + } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } + + d.stringMapType = stringMapType + d.generalMapType = generalMapType + return true +} + +func isStringMap(n *Node) bool { + if n.Kind != MappingNode { + return false + } + l := len(n.Content) + for i := 0; i < l; i += 2 { + shortTag := n.Content[i].ShortTag() + if shortTag != strTag && shortTag != mergeTag { + return false + } + } + return true +} + +func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { + sinfo, err := getStructInfo(out.Type()) + if err != nil { + panic(err) + } + + var inlineMap reflect.Value + var elemType reflect.Type + if sinfo.InlineMap != -1 { + inlineMap = out.Field(sinfo.InlineMap) + elemType = inlineMap.Type().Elem() + } + + for _, index := range sinfo.InlineUnmarshalers { + field := d.fieldByIndex(n, out, index) + d.prepare(n, field) + } + + mergedFields := d.mergedFields + d.mergedFields = nil + var mergeNode *Node + var doneFields []bool + if d.uniqueKeys { + doneFields = make([]bool, len(sinfo.FieldsList)) + } + name := settableValueOf("") + l := len(n.Content) + for i := 0; i < l; i += 2 { + ni := n.Content[i] + if isMerge(ni) { + mergeNode = n.Content[i+1] + continue + } + if !d.unmarshal(ni, name) { + continue + } + sname := name.String() + if mergedFields != nil { + if mergedFields[sname] { + continue + } + mergedFields[sname] = true + } + if info, ok := sinfo.FieldsMap[sname]; ok { + if d.uniqueKeys { + if doneFields[info.Id] { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) + continue + } + doneFields[info.Id] = true + } + var field reflect.Value + if info.Inline == nil { + field = out.Field(info.Num) + } else { + field = d.fieldByIndex(n, out, info.Inline) + } + d.unmarshal(n.Content[i+1], field) + } else if sinfo.InlineMap != -1 { + if inlineMap.IsNil() { + inlineMap.Set(reflect.MakeMap(inlineMap.Type())) + } + value := reflect.New(elemType).Elem() + d.unmarshal(n.Content[i+1], value) + inlineMap.SetMapIndex(name, value) + } else if d.knownFields { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) + } + } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } + return true +} + +func failWantMap() { + failf("map merge requires map or sequence of maps as the value") +} + +func (d *decoder) setPossiblyUnhashableKey(m map[interface{}]bool, key interface{}, value bool) { + defer func() { + if err := recover(); err != nil { + failf("%v", err) + } + }() + m[key] = value +} + +func (d *decoder) getPossiblyUnhashableKey(m map[interface{}]bool, key interface{}) bool { + defer func() { + if err := recover(); err != nil { + failf("%v", err) + } + }() + return m[key] +} + +func (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) { + mergedFields := d.mergedFields + if mergedFields == nil { + d.mergedFields = make(map[interface{}]bool) + for i := 0; i < len(parent.Content); i += 2 { + k := reflect.New(ifaceType).Elem() + if d.unmarshal(parent.Content[i], k) { + d.setPossiblyUnhashableKey(d.mergedFields, k.Interface(), true) + } + } + } + + switch merge.Kind { + case MappingNode: + d.unmarshal(merge, out) + case AliasNode: + if merge.Alias != nil && merge.Alias.Kind != MappingNode { + failWantMap() + } + d.unmarshal(merge, out) + case SequenceNode: + for i := 0; i < len(merge.Content); i++ { + ni := merge.Content[i] + if ni.Kind == AliasNode { + if ni.Alias != nil && ni.Alias.Kind != MappingNode { + failWantMap() + } + } else if ni.Kind != MappingNode { + failWantMap() + } + d.unmarshal(ni, out) + } + default: + failWantMap() + } + + d.mergedFields = mergedFields +} + +func isMerge(n *Node) bool { + return n.Kind == ScalarNode && n.Value == "<<" && (n.Tag == "" || n.Tag == "!" || shortTag(n.Tag) == mergeTag) +} diff --git a/vendor/go.yaml.in/yaml/v3/emitterc.go b/vendor/go.yaml.in/yaml/v3/emitterc.go new file mode 100644 index 000000000..ab4e03ba7 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/emitterc.go @@ -0,0 +1,2054 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" + "fmt" +) + +// Flush the buffer if needed. +func flush(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) { + return yaml_emitter_flush(emitter) + } + return true +} + +// Put a character to the output buffer. +func put(emitter *yaml_emitter_t, value byte) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + emitter.buffer[emitter.buffer_pos] = value + emitter.buffer_pos++ + emitter.column++ + return true +} + +// Put a line break to the output buffer. +func put_break(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + switch emitter.line_break { + case yaml_CR_BREAK: + emitter.buffer[emitter.buffer_pos] = '\r' + emitter.buffer_pos += 1 + case yaml_LN_BREAK: + emitter.buffer[emitter.buffer_pos] = '\n' + emitter.buffer_pos += 1 + case yaml_CRLN_BREAK: + emitter.buffer[emitter.buffer_pos+0] = '\r' + emitter.buffer[emitter.buffer_pos+1] = '\n' + emitter.buffer_pos += 2 + default: + panic("unknown line break setting") + } + if emitter.column == 0 { + emitter.space_above = true + } + emitter.column = 0 + emitter.line++ + // [Go] Do this here and below and drop from everywhere else (see commented lines). + emitter.indention = true + return true +} + +// Copy a character from a string into buffer. +func write(emitter *yaml_emitter_t, s []byte, i *int) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + p := emitter.buffer_pos + w := width(s[*i]) + switch w { + case 4: + emitter.buffer[p+3] = s[*i+3] + fallthrough + case 3: + emitter.buffer[p+2] = s[*i+2] + fallthrough + case 2: + emitter.buffer[p+1] = s[*i+1] + fallthrough + case 1: + emitter.buffer[p+0] = s[*i+0] + default: + panic("unknown character width") + } + emitter.column++ + emitter.buffer_pos += w + *i += w + return true +} + +// Write a whole string into buffer. +func write_all(emitter *yaml_emitter_t, s []byte) bool { + for i := 0; i < len(s); { + if !write(emitter, s, &i) { + return false + } + } + return true +} + +// Copy a line break character from a string into buffer. +func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { + if s[*i] == '\n' { + if !put_break(emitter) { + return false + } + *i++ + } else { + if !write(emitter, s, i) { + return false + } + if emitter.column == 0 { + emitter.space_above = true + } + emitter.column = 0 + emitter.line++ + // [Go] Do this here and above and drop from everywhere else (see commented lines). + emitter.indention = true + } + return true +} + +// Set an emitter error and return false. +func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_EMITTER_ERROR + emitter.problem = problem + return false +} + +// Emit an event. +func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.events = append(emitter.events, *event) + for !yaml_emitter_need_more_events(emitter) { + event := &emitter.events[emitter.events_head] + if !yaml_emitter_analyze_event(emitter, event) { + return false + } + if !yaml_emitter_state_machine(emitter, event) { + return false + } + yaml_event_delete(event) + emitter.events_head++ + } + return true +} + +// Check if we need to accumulate more events before emitting. +// +// We accumulate extra +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START +func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { + if emitter.events_head == len(emitter.events) { + return true + } + var accumulate int + switch emitter.events[emitter.events_head].typ { + case yaml_DOCUMENT_START_EVENT: + accumulate = 1 + break + case yaml_SEQUENCE_START_EVENT: + accumulate = 2 + break + case yaml_MAPPING_START_EVENT: + accumulate = 3 + break + default: + return false + } + if len(emitter.events)-emitter.events_head > accumulate { + return false + } + var level int + for i := emitter.events_head; i < len(emitter.events); i++ { + switch emitter.events[i].typ { + case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: + level++ + case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: + level-- + } + if level == 0 { + return false + } + } + return true +} + +// Append a directive to the directives stack. +func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { + for i := 0; i < len(emitter.tag_directives); i++ { + if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") + } + } + + // [Go] Do we actually need to copy this given garbage collection + // and the lack of deallocating destructors? + tag_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(tag_copy.handle, value.handle) + copy(tag_copy.prefix, value.prefix) + emitter.tag_directives = append(emitter.tag_directives, tag_copy) + return true +} + +// Increase the indentation level. +func yaml_emitter_increase_indent_compact(emitter *yaml_emitter_t, flow, indentless bool, compact_seq bool) bool { + emitter.indents = append(emitter.indents, emitter.indent) + if emitter.indent < 0 { + if flow { + emitter.indent = emitter.best_indent + } else { + emitter.indent = 0 + } + } else if !indentless { + // [Go] This was changed so that indentations are more regular. + if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { + // The first indent inside a sequence will just skip the "- " indicator. + emitter.indent += 2 + } else { + // Everything else aligns to the chosen indentation. + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) + if compact_seq { + // The value compact_seq passed in is almost always set to `false` when this function is called, + // except when we are dealing with sequence nodes. So this gets triggered to subtract 2 only when we + // are increasing the indent to account for sequence nodes, which will be correct because we need to + // subtract 2 to account for the - at the beginning of the sequence node. + emitter.indent = emitter.indent - 2 + } + } + } + return true +} + +// State dispatcher. +func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { + switch emitter.state { + default: + case yaml_EMIT_STREAM_START_STATE: + return yaml_emitter_emit_stream_start(emitter, event) + + case yaml_EMIT_FIRST_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, true) + + case yaml_EMIT_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, false) + + case yaml_EMIT_DOCUMENT_CONTENT_STATE: + return yaml_emitter_emit_document_content(emitter, event) + + case yaml_EMIT_DOCUMENT_END_STATE: + return yaml_emitter_emit_document_end(emitter, event) + + case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, true, false) + + case yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false, true) + + case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false, false) + + case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, true, false) + + case yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false, true) + + case yaml_EMIT_FLOW_MAPPING_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false, false) + + case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, false) + + case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, true) + + case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, false) + + case yaml_EMIT_END_STATE: + return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") + } + panic("invalid emitter state") +} + +// Expect STREAM-START. +func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_STREAM_START_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") + } + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = event.encoding + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = yaml_UTF8_ENCODING + } + } + if emitter.best_indent < 2 || emitter.best_indent > 9 { + emitter.best_indent = 2 + } + if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { + emitter.best_width = 80 + } + if emitter.best_width < 0 { + emitter.best_width = 1<<31 - 1 + } + if emitter.line_break == yaml_ANY_BREAK { + emitter.line_break = yaml_LN_BREAK + } + + emitter.indent = -1 + emitter.line = 0 + emitter.column = 0 + emitter.whitespace = true + emitter.indention = true + emitter.space_above = true + emitter.foot_indent = -1 + + if emitter.encoding != yaml_UTF8_ENCODING { + if !yaml_emitter_write_bom(emitter) { + return false + } + } + emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE + return true +} + +// Expect DOCUMENT-START or STREAM-END. +func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + + if event.typ == yaml_DOCUMENT_START_EVENT { + + if event.version_directive != nil { + if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { + return false + } + } + + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { + return false + } + if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { + return false + } + } + + for i := 0; i < len(default_tag_directives); i++ { + tag_directive := &default_tag_directives[i] + if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { + return false + } + } + + implicit := event.implicit + if !first || emitter.canonical { + implicit = false + } + + if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if event.version_directive != nil { + implicit = false + if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if len(event.tag_directives) > 0 { + implicit = false + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { + return false + } + if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if yaml_emitter_check_empty_document(emitter) { + implicit = false + } + if !implicit { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { + return false + } + if emitter.canonical || true { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if len(emitter.head_comment) > 0 { + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !put_break(emitter) { + return false + } + } + + emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE + return true + } + + if event.typ == yaml_STREAM_END_EVENT { + if emitter.open_ended { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_END_STATE + return true + } + + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") +} + +// yaml_emitter_increase_indent preserves the original signature and delegates to +// yaml_emitter_increase_indent_compact without compact-sequence indentation +func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { + return yaml_emitter_increase_indent_compact(emitter, flow, indentless, false) +} + +// yaml_emitter_process_line_comment preserves the original signature and delegates to +// yaml_emitter_process_line_comment_linebreak passing false for linebreak +func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { + return yaml_emitter_process_line_comment_linebreak(emitter, false) +} + +// Expect the root node. +func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !yaml_emitter_emit_node(emitter, event, true, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect DOCUMENT-END. +func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_DOCUMENT_END_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") + } + // [Go] Force document foot separation. + emitter.foot_indent = 0 + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.foot_indent = -1 + if !yaml_emitter_write_indent(emitter) { + return false + } + if !event.implicit { + // [Go] Allocate the slice elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_DOCUMENT_START_STATE + emitter.tag_directives = emitter.tag_directives[:0] + return true +} + +// Expect a flow item node. +func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_SEQUENCE_END_EVENT { + if emitter.canonical && !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.column == 0 || emitter.canonical && !first { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + + return true + } + + if !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if emitter.column == 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE) + } else { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) + } + if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { + return false + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a flow key node. +func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_MAPPING_END_EVENT { + if (emitter.canonical || len(emitter.head_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0) && !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + + if !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + + if emitter.column == 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a flow value node. +func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { + return false + } + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE) + } else { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) + } + if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { + return false + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a block item node. +func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + // emitter.mapping context tells us if we are currently in a mapping context. + // emiiter.column tells us which column we are in in the yaml output. 0 is the first char of the column. + // emitter.indentation tells us if the last character was an indentation character. + // emitter.compact_sequence_indent tells us if '- ' is considered part of the indentation for sequence elements. + // So, `seq` means that we are in a mapping context, and we are either at the first char of the column or + // the last character was not an indentation character, and we consider '- ' part of the indentation + // for sequence elements. + seq := emitter.mapping_context && (emitter.column == 0 || !emitter.indention) && + emitter.compact_sequence_indent + if !yaml_emitter_increase_indent_compact(emitter, false, false, seq) { + return false + } + } + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) + if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a block key node. +func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, false) { + return false + } + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if event.typ == yaml_MAPPING_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if len(emitter.line_comment) > 0 { + // [Go] A line comment was provided for the key. That's unusual as the + // scanner associates line comments with the value. Either way, + // save the line comment and render it appropriately later. + emitter.key_line_comment = emitter.line_comment + emitter.line_comment = nil + } + if yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block value node. +func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { + return false + } + } + if len(emitter.key_line_comment) > 0 { + // [Go] Line comments are generally associated with the value, but when there's + // no value on the same line as a mapping key they end up attached to the + // key itself. + if event.typ == yaml_SCALAR_EVENT { + if len(emitter.line_comment) == 0 { + // A scalar is coming and it has no line comments by itself yet, + // so just let it handle the line comment as usual. If it has a + // line comment, we can't have both so the one from the key is lost. + emitter.line_comment = emitter.key_line_comment + emitter.key_line_comment = nil + } + } else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) { + // An indented block follows, so write the comment right now. + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + if !yaml_emitter_process_line_comment(emitter) { + return false + } + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + } + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) + if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 +} + +// Expect a node. +func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, + root bool, sequence bool, mapping bool, simple_key bool) bool { + + emitter.root_context = root + emitter.sequence_context = sequence + emitter.mapping_context = mapping + emitter.simple_key_context = simple_key + + switch event.typ { + case yaml_ALIAS_EVENT: + return yaml_emitter_emit_alias(emitter, event) + case yaml_SCALAR_EVENT: + return yaml_emitter_emit_scalar(emitter, event) + case yaml_SEQUENCE_START_EVENT: + return yaml_emitter_emit_sequence_start(emitter, event) + case yaml_MAPPING_START_EVENT: + return yaml_emitter_emit_mapping_start(emitter, event) + default: + return yaml_emitter_set_emitter_error(emitter, + fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) + } +} + +// Expect ALIAS. +func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SCALAR. +func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_select_scalar_style(emitter, event) { + return false + } + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + if !yaml_emitter_process_scalar(emitter) { + return false + } + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SEQUENCE-START. +func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || + yaml_emitter_check_empty_sequence(emitter) { + emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE + } + return true +} + +// Expect MAPPING-START. +func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || + yaml_emitter_check_empty_mapping(emitter) { + emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE + } + return true +} + +// Check if the document content is an empty scalar. +func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { + return false // [Go] Huh? +} + +// Check if the next events represent an empty sequence. +func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT +} + +// Check if the next events represent an empty mapping. +func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT +} + +// Check if the next node can be expressed as a simple key. +func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { + length := 0 + switch emitter.events[emitter.events_head].typ { + case yaml_ALIAS_EVENT: + length += len(emitter.anchor_data.anchor) + case yaml_SCALAR_EVENT: + if emitter.scalar_data.multiline { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + + len(emitter.scalar_data.value) + case yaml_SEQUENCE_START_EVENT: + if !yaml_emitter_check_empty_sequence(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + case yaml_MAPPING_START_EVENT: + if !yaml_emitter_check_empty_mapping(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + default: + return false + } + return length <= 128 +} + +// Determine an acceptable scalar style. +func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 + if no_tag && !event.implicit && !event.quoted_implicit { + return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") + } + + style := event.scalar_style() + if style == yaml_ANY_SCALAR_STYLE { + style = yaml_PLAIN_SCALAR_STYLE + } + if emitter.canonical { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + if emitter.simple_key_context && emitter.scalar_data.multiline { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + if style == yaml_PLAIN_SCALAR_STYLE { + if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || + emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if no_tag && !event.implicit { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { + if !emitter.scalar_data.single_quoted_allowed { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { + if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + + if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { + emitter.tag_data.handle = []byte{'!'} + } + emitter.scalar_data.style = style + return true +} + +// Write an anchor. +func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { + if emitter.anchor_data.anchor == nil { + return true + } + c := []byte{'&'} + if emitter.anchor_data.alias { + c[0] = '*' + } + if !yaml_emitter_write_indicator(emitter, c, true, false, false) { + return false + } + return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) +} + +// Write a tag. +func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { + if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { + return true + } + if len(emitter.tag_data.handle) > 0 { + if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { + return false + } + if len(emitter.tag_data.suffix) > 0 { + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + } + } else { + // [Go] Allocate these slices elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { + return false + } + } + return true +} + +// Write a scalar. +func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { + switch emitter.scalar_data.style { + case yaml_PLAIN_SCALAR_STYLE: + return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_SINGLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_DOUBLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_LITERAL_SCALAR_STYLE: + return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) + + case yaml_FOLDED_SCALAR_STYLE: + return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) + } + panic("unknown scalar style") +} + +// Write a head comment. +func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { + if len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.tail_comment) { + return false + } + emitter.tail_comment = emitter.tail_comment[:0] + emitter.foot_indent = emitter.indent + if emitter.foot_indent < 0 { + emitter.foot_indent = 0 + } + } + + if len(emitter.head_comment) == 0 { + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.head_comment) { + return false + } + emitter.head_comment = emitter.head_comment[:0] + return true +} + +// Write an line comment. +func yaml_emitter_process_line_comment_linebreak(emitter *yaml_emitter_t, linebreak bool) bool { + if len(emitter.line_comment) == 0 { + // The next 3 lines are needed to resolve an issue with leading newlines + // See https://github.com/go-yaml/yaml/issues/755 + // When linebreak is set to true, put_break will be called and will add + // the needed newline. + if linebreak && !put_break(emitter) { + return false + } + return true + } + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !yaml_emitter_write_comment(emitter, emitter.line_comment) { + return false + } + emitter.line_comment = emitter.line_comment[:0] + return true +} + +// Write a foot comment. +func yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool { + if len(emitter.foot_comment) == 0 { + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.foot_comment) { + return false + } + emitter.foot_comment = emitter.foot_comment[:0] + emitter.foot_indent = emitter.indent + if emitter.foot_indent < 0 { + emitter.foot_indent = 0 + } + return true +} + +// Check if a %YAML directive is valid. +func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { + if version_directive.major != 1 || version_directive.minor != 1 { + return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") + } + return true +} + +// Check if a %TAG directive is valid. +func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { + handle := tag_directive.handle + prefix := tag_directive.prefix + if len(handle) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") + } + if handle[0] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") + } + if handle[len(handle)-1] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") + } + for i := 1; i < len(handle)-1; i += width(handle[i]) { + if !is_alpha(handle, i) { + return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") + } + } + if len(prefix) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") + } + return true +} + +// Check if an anchor is valid. +func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { + if len(anchor) == 0 { + problem := "anchor value must not be empty" + if alias { + problem = "alias value must not be empty" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + for i := 0; i < len(anchor); i += width(anchor[i]) { + if !is_alpha(anchor, i) { + problem := "anchor value must contain alphanumerical characters only" + if alias { + problem = "alias value must contain alphanumerical characters only" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + } + emitter.anchor_data.anchor = anchor + emitter.anchor_data.alias = alias + return true +} + +// Check if a tag is valid. +func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { + if len(tag) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") + } + for i := 0; i < len(emitter.tag_directives); i++ { + tag_directive := &emitter.tag_directives[i] + if bytes.HasPrefix(tag, tag_directive.prefix) { + emitter.tag_data.handle = tag_directive.handle + emitter.tag_data.suffix = tag[len(tag_directive.prefix):] + return true + } + } + emitter.tag_data.suffix = tag + return true +} + +// Check if a scalar is valid. +func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { + var ( + block_indicators = false + flow_indicators = false + line_breaks = false + special_characters = false + tab_characters = false + + leading_space = false + leading_break = false + trailing_space = false + trailing_break = false + break_space = false + space_break = false + + preceded_by_whitespace = false + followed_by_whitespace = false + previous_space = false + previous_break = false + ) + + emitter.scalar_data.value = value + + if len(value) == 0 { + emitter.scalar_data.multiline = false + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = false + return true + } + + if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { + block_indicators = true + flow_indicators = true + } + + preceded_by_whitespace = true + for i, w := 0, 0; i < len(value); i += w { + w = width(value[i]) + followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) + + if i == 0 { + switch value[i] { + case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': + flow_indicators = true + block_indicators = true + case '?', ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '-': + if followed_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } else { + switch value[i] { + case ',', '?', '[', ']', '{', '}': + flow_indicators = true + case ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '#': + if preceded_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } + + if value[i] == '\t' { + tab_characters = true + } else if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { + special_characters = true + } + if is_space(value, i) { + if i == 0 { + leading_space = true + } + if i+width(value[i]) == len(value) { + trailing_space = true + } + if previous_break { + break_space = true + } + previous_space = true + previous_break = false + } else if is_break(value, i) { + line_breaks = true + if i == 0 { + leading_break = true + } + if i+width(value[i]) == len(value) { + trailing_break = true + } + if previous_space { + space_break = true + } + previous_space = false + previous_break = true + } else { + previous_space = false + previous_break = false + } + + // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. + preceded_by_whitespace = is_blankz(value, i) + } + + emitter.scalar_data.multiline = line_breaks + emitter.scalar_data.flow_plain_allowed = true + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = true + + if leading_space || leading_break || trailing_space || trailing_break { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if trailing_space { + emitter.scalar_data.block_allowed = false + } + if break_space { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || tab_characters || special_characters { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || special_characters { + emitter.scalar_data.block_allowed = false + } + if line_breaks { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if flow_indicators { + emitter.scalar_data.flow_plain_allowed = false + } + if block_indicators { + emitter.scalar_data.block_plain_allowed = false + } + return true +} + +// Check if the event data is valid. +func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + emitter.anchor_data.anchor = nil + emitter.tag_data.handle = nil + emitter.tag_data.suffix = nil + emitter.scalar_data.value = nil + + if len(event.head_comment) > 0 { + emitter.head_comment = event.head_comment + } + if len(event.line_comment) > 0 { + emitter.line_comment = event.line_comment + } + if len(event.foot_comment) > 0 { + emitter.foot_comment = event.foot_comment + } + if len(event.tail_comment) > 0 { + emitter.tail_comment = event.tail_comment + } + + switch event.typ { + case yaml_ALIAS_EVENT: + if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { + return false + } + + case yaml_SCALAR_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + if !yaml_emitter_analyze_scalar(emitter, event.value) { + return false + } + + case yaml_SEQUENCE_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + + case yaml_MAPPING_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + } + return true +} + +// Write the BOM character. +func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { + if !flush(emitter) { + return false + } + pos := emitter.buffer_pos + emitter.buffer[pos+0] = '\xEF' + emitter.buffer[pos+1] = '\xBB' + emitter.buffer[pos+2] = '\xBF' + emitter.buffer_pos += 3 + return true +} + +func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { + indent := emitter.indent + if indent < 0 { + indent = 0 + } + if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { + if !put_break(emitter) { + return false + } + } + if emitter.foot_indent == indent { + if !put_break(emitter) { + return false + } + } + for emitter.column < indent { + if !put(emitter, ' ') { + return false + } + } + emitter.whitespace = true + //emitter.indention = true + emitter.space_above = false + emitter.foot_indent = -1 + return true +} + +func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, indicator) { + return false + } + emitter.whitespace = is_whitespace + emitter.indention = (emitter.indention && is_indention) + emitter.open_ended = false + return true +} + +func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + for i := 0; i < len(value); { + var must_write bool + switch value[i] { + case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': + must_write = true + default: + must_write = is_alpha(value, i) + } + if must_write { + if !write(emitter, value, &i) { + return false + } + } else { + w := width(value[i]) + for k := 0; k < w; k++ { + octet := value[i] + i++ + if !put(emitter, '%') { + return false + } + + c := octet >> 4 + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + + c = octet & 0x0f + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + } + } + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + if len(value) > 0 && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + + if len(value) > 0 { + emitter.whitespace = false + } + emitter.indention = false + if emitter.root_context { + emitter.open_ended = true + } + + return true +} + +func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { + return false + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if value[i] == '\'' { + if !put(emitter, '\'') { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + spaces := false + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { + return false + } + + for i := 0; i < len(value); { + if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || + is_bom(value, i) || is_break(value, i) || + value[i] == '"' || value[i] == '\\' { + + octet := value[i] + + var w int + var v rune + switch { + case octet&0x80 == 0x00: + w, v = 1, rune(octet&0x7F) + case octet&0xE0 == 0xC0: + w, v = 2, rune(octet&0x1F) + case octet&0xF0 == 0xE0: + w, v = 3, rune(octet&0x0F) + case octet&0xF8 == 0xF0: + w, v = 4, rune(octet&0x07) + } + for k := 1; k < w; k++ { + octet = value[i+k] + v = (v << 6) + (rune(octet) & 0x3F) + } + i += w + + if !put(emitter, '\\') { + return false + } + + var ok bool + switch v { + case 0x00: + ok = put(emitter, '0') + case 0x07: + ok = put(emitter, 'a') + case 0x08: + ok = put(emitter, 'b') + case 0x09: + ok = put(emitter, 't') + case 0x0A: + ok = put(emitter, 'n') + case 0x0b: + ok = put(emitter, 'v') + case 0x0c: + ok = put(emitter, 'f') + case 0x0d: + ok = put(emitter, 'r') + case 0x1b: + ok = put(emitter, 'e') + case 0x22: + ok = put(emitter, '"') + case 0x5c: + ok = put(emitter, '\\') + case 0x85: + ok = put(emitter, 'N') + case 0xA0: + ok = put(emitter, '_') + case 0x2028: + ok = put(emitter, 'L') + case 0x2029: + ok = put(emitter, 'P') + default: + if v <= 0xFF { + ok = put(emitter, 'x') + w = 2 + } else if v <= 0xFFFF { + ok = put(emitter, 'u') + w = 4 + } else { + ok = put(emitter, 'U') + w = 8 + } + for k := (w - 1) * 4; ok && k >= 0; k -= 4 { + digit := byte((v >> uint(k)) & 0x0F) + if digit < 10 { + ok = put(emitter, digit+'0') + } else { + ok = put(emitter, digit+'A'-10) + } + } + } + if !ok { + return false + } + spaces = false + } else if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if is_space(value, i+1) { + if !put(emitter, '\\') { + return false + } + } + i += width(value[i]) + } else if !write(emitter, value, &i) { + return false + } + spaces = true + } else { + if !write(emitter, value, &i) { + return false + } + spaces = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { + if is_space(value, 0) || is_break(value, 0) { + indent_hint := []byte{'0' + byte(emitter.best_indent)} + if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { + return false + } + } + + emitter.open_ended = false + + var chomp_hint [1]byte + if len(value) == 0 { + chomp_hint[0] = '-' + } else { + i := len(value) - 1 + for value[i]&0xC0 == 0x80 { + i-- + } + if !is_break(value, i) { + chomp_hint[0] = '-' + } else if i == 0 { + chomp_hint[0] = '+' + emitter.open_ended = true + } else { + i-- + for value[i]&0xC0 == 0x80 { + i-- + } + if is_break(value, i) { + chomp_hint[0] = '+' + emitter.open_ended = true + } + } + } + if chomp_hint[0] != 0 { + if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { + return false + } + } + return true +} + +func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + if !yaml_emitter_process_line_comment_linebreak(emitter, true) { + return false + } + //emitter.indention = true + emitter.whitespace = true + breaks := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + + return true +} + +func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + if !yaml_emitter_process_line_comment_linebreak(emitter, true) { + return false + } + + //emitter.indention = true + emitter.whitespace = true + + breaks := true + leading_spaces := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !breaks && !leading_spaces && value[i] == '\n' { + k := 0 + for is_break(value, k) { + k += width(value[k]) + } + if !is_blankz(value, k) { + if !put_break(emitter) { + return false + } + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + leading_spaces = is_blank(value, i) + } + if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + emitter.indention = false + breaks = false + } + } + return true +} + +func yaml_emitter_write_comment(emitter *yaml_emitter_t, comment []byte) bool { + breaks := false + pound := false + for i := 0; i < len(comment); { + if is_break(comment, i) { + if !write_break(emitter, comment, &i) { + return false + } + //emitter.indention = true + breaks = true + pound = false + } else { + if breaks && !yaml_emitter_write_indent(emitter) { + return false + } + if !pound { + if comment[i] != '#' && (!put(emitter, '#') || !put(emitter, ' ')) { + return false + } + pound = true + } + if !write(emitter, comment, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + if !breaks && !put_break(emitter) { + return false + } + + emitter.whitespace = true + //emitter.indention = true + return true +} diff --git a/vendor/go.yaml.in/yaml/v3/encode.go b/vendor/go.yaml.in/yaml/v3/encode.go new file mode 100644 index 000000000..de9e72a3e --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/encode.go @@ -0,0 +1,577 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yaml + +import ( + "encoding" + "fmt" + "io" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +type encoder struct { + emitter yaml_emitter_t + event yaml_event_t + out []byte + flow bool + indent int + doneInit bool +} + +func newEncoder() *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_string(&e.emitter, &e.out) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func newEncoderWithWriter(w io.Writer) *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_writer(&e.emitter, w) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func (e *encoder) init() { + if e.doneInit { + return + } + if e.indent == 0 { + e.indent = 4 + } + e.emitter.best_indent = e.indent + yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) + e.emit() + e.doneInit = true +} + +func (e *encoder) finish() { + e.emitter.open_ended = false + yaml_stream_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) destroy() { + yaml_emitter_delete(&e.emitter) +} + +func (e *encoder) emit() { + // This will internally delete the e.event value. + e.must(yaml_emitter_emit(&e.emitter, &e.event)) +} + +func (e *encoder) must(ok bool) { + if !ok { + msg := e.emitter.problem + if msg == "" { + msg = "unknown problem generating YAML content" + } + failf("%s", msg) + } +} + +func (e *encoder) marshalDoc(tag string, in reflect.Value) { + e.init() + var node *Node + if in.IsValid() { + node, _ = in.Interface().(*Node) + } + if node != nil && node.Kind == DocumentNode { + e.nodev(in) + } else { + yaml_document_start_event_initialize(&e.event, nil, nil, true) + e.emit() + e.marshal(tag, in) + yaml_document_end_event_initialize(&e.event, true) + e.emit() + } +} + +func (e *encoder) marshal(tag string, in reflect.Value) { + tag = shortTag(tag) + if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { + e.nilv() + return + } + iface := in.Interface() + switch value := iface.(type) { + case *Node: + e.nodev(in) + return + case Node: + if !in.CanAddr() { + var n = reflect.New(in.Type()).Elem() + n.Set(in) + in = n + } + e.nodev(in.Addr()) + return + case time.Time: + e.timev(tag, in) + return + case *time.Time: + e.timev(tag, in.Elem()) + return + case time.Duration: + e.stringv(tag, reflect.ValueOf(value.String())) + return + case Marshaler: + v, err := value.MarshalYAML() + if err != nil { + fail(err) + } + if v == nil { + e.nilv() + return + } + e.marshal(tag, reflect.ValueOf(v)) + return + case encoding.TextMarshaler: + text, err := value.MarshalText() + if err != nil { + fail(err) + } + in = reflect.ValueOf(string(text)) + case nil: + e.nilv() + return + } + switch in.Kind() { + case reflect.Interface: + e.marshal(tag, in.Elem()) + case reflect.Map: + e.mapv(tag, in) + case reflect.Ptr: + e.marshal(tag, in.Elem()) + case reflect.Struct: + e.structv(tag, in) + case reflect.Slice, reflect.Array: + e.slicev(tag, in) + case reflect.String: + e.stringv(tag, in) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + e.intv(tag, in) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + e.uintv(tag, in) + case reflect.Float32, reflect.Float64: + e.floatv(tag, in) + case reflect.Bool: + e.boolv(tag, in) + default: + panic("cannot marshal type: " + in.Type().String()) + } +} + +func (e *encoder) mapv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + keys := keyList(in.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + e.marshal("", k) + e.marshal("", in.MapIndex(k)) + } + }) +} + +func (e *encoder) fieldByIndex(v reflect.Value, index []int) (field reflect.Value) { + for _, num := range index { + for { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + return reflect.Value{} + } + v = v.Elem() + continue + } + break + } + v = v.Field(num) + } + return v +} + +func (e *encoder) structv(tag string, in reflect.Value) { + sinfo, err := getStructInfo(in.Type()) + if err != nil { + panic(err) + } + e.mappingv(tag, func() { + for _, info := range sinfo.FieldsList { + var value reflect.Value + if info.Inline == nil { + value = in.Field(info.Num) + } else { + value = e.fieldByIndex(in, info.Inline) + if !value.IsValid() { + continue + } + } + if info.OmitEmpty && isZero(value) { + continue + } + e.marshal("", reflect.ValueOf(info.Key)) + e.flow = info.Flow + e.marshal("", value) + } + if sinfo.InlineMap >= 0 { + m := in.Field(sinfo.InlineMap) + if m.Len() > 0 { + e.flow = false + keys := keyList(m.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + if _, found := sinfo.FieldsMap[k.String()]; found { + panic(fmt.Sprintf("cannot have key %q in inlined map: conflicts with struct field", k.String())) + } + e.marshal("", k) + e.flow = false + e.marshal("", m.MapIndex(k)) + } + } + } + }) +} + +func (e *encoder) mappingv(tag string, f func()) { + implicit := tag == "" + style := yaml_BLOCK_MAPPING_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_MAPPING_STYLE + } + yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) + e.emit() + f() + yaml_mapping_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) slicev(tag string, in reflect.Value) { + implicit := tag == "" + style := yaml_BLOCK_SEQUENCE_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) + e.emit() + n := in.Len() + for i := 0; i < n; i++ { + e.marshal("", in.Index(i)) + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.emit() +} + +// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. +// +// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported +// in YAML 1.2 and by this package, but these should be marshalled quoted for +// the time being for compatibility with other parsers. +func isBase60Float(s string) (result bool) { + // Fast path. + if s == "" { + return false + } + c := s[0] + if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { + return false + } + // Do the full match. + return base60float.MatchString(s) +} + +// From http://yaml.org/type/float.html, except the regular expression there +// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. +var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) + +// isOldBool returns whether s is bool notation as defined in YAML 1.1. +// +// We continue to force strings that YAML 1.1 would interpret as booleans to be +// rendered as quotes strings so that the marshalled output valid for YAML 1.1 +// parsing. +func isOldBool(s string) (result bool) { + switch s { + case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON", + "n", "N", "no", "No", "NO", "off", "Off", "OFF": + return true + default: + return false + } +} + +func (e *encoder) stringv(tag string, in reflect.Value) { + var style yaml_scalar_style_t + s := in.String() + canUsePlain := true + switch { + case !utf8.ValidString(s): + if tag == binaryTag { + failf("explicitly tagged !!binary data must be base64-encoded") + } + if tag != "" { + failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + } + // It can't be encoded directly as YAML so use a binary tag + // and encode it as base64. + tag = binaryTag + s = encodeBase64(s) + case tag == "": + // Check to see if it would resolve to a specific + // tag when encoded unquoted. If it doesn't, + // there's no need to quote it. + rtag, _ := resolve("", s) + canUsePlain = rtag == strTag && !(isBase60Float(s) || isOldBool(s)) + } + // Note: it's possible for user code to emit invalid YAML + // if they explicitly specify a tag and a string containing + // text that's incompatible with that tag. + switch { + case strings.Contains(s, "\n"): + if e.flow { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } else { + style = yaml_LITERAL_SCALAR_STYLE + } + case canUsePlain: + style = yaml_PLAIN_SCALAR_STYLE + default: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + e.emitScalar(s, "", tag, style, nil, nil, nil, nil) +} + +func (e *encoder) boolv(tag string, in reflect.Value) { + var s string + if in.Bool() { + s = "true" + } else { + s = "false" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) intv(tag string, in reflect.Value) { + s := strconv.FormatInt(in.Int(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) uintv(tag string, in reflect.Value) { + s := strconv.FormatUint(in.Uint(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) timev(tag string, in reflect.Value) { + t := in.Interface().(time.Time) + s := t.Format(time.RFC3339Nano) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) floatv(tag string, in reflect.Value) { + // Issue #352: When formatting, use the precision of the underlying value + precision := 64 + if in.Kind() == reflect.Float32 { + precision = 32 + } + + s := strconv.FormatFloat(in.Float(), 'g', -1, precision) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) nilv() { + e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) { + // TODO Kill this function. Replace all initialize calls by their underlining Go literals. + implicit := tag == "" + if !implicit { + tag = longTag(tag) + } + e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) + e.event.head_comment = head + e.event.line_comment = line + e.event.foot_comment = foot + e.event.tail_comment = tail + e.emit() +} + +func (e *encoder) nodev(in reflect.Value) { + e.node(in.Interface().(*Node), "") +} + +func (e *encoder) node(node *Node, tail string) { + // Zero nodes behave as nil. + if node.Kind == 0 && node.IsZero() { + e.nilv() + return + } + + // If the tag was not explicitly requested, and dropping it won't change the + // implicit tag of the value, don't include it in the presentation. + var tag = node.Tag + var stag = shortTag(tag) + var forceQuoting bool + if tag != "" && node.Style&TaggedStyle == 0 { + if node.Kind == ScalarNode { + if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { + tag = "" + } else { + rtag, _ := resolve("", node.Value) + if rtag == stag { + tag = "" + } else if stag == strTag { + tag = "" + forceQuoting = true + } + } + } else { + var rtag string + switch node.Kind { + case MappingNode: + rtag = mapTag + case SequenceNode: + rtag = seqTag + } + if rtag == stag { + tag = "" + } + } + } + + switch node.Kind { + case DocumentNode: + yaml_document_start_event_initialize(&e.event, nil, nil, true) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + for _, node := range node.Content { + e.node(node, "") + } + yaml_document_end_event_initialize(&e.event, true) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case SequenceNode: + style := yaml_BLOCK_SEQUENCE_STYLE + if node.Style&FlowStyle != 0 { + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + for _, node := range node.Content { + e.node(node, "") + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case MappingNode: + style := yaml_BLOCK_MAPPING_STYLE + if node.Style&FlowStyle != 0 { + style = yaml_FLOW_MAPPING_STYLE + } + yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) + e.event.tail_comment = []byte(tail) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + + // The tail logic below moves the foot comment of prior keys to the following key, + // since the value for each key may be a nested structure and the foot needs to be + // processed only the entirety of the value is streamed. The last tail is processed + // with the mapping end event. + var tail string + for i := 0; i+1 < len(node.Content); i += 2 { + k := node.Content[i] + foot := k.FootComment + if foot != "" { + kopy := *k + kopy.FootComment = "" + k = &kopy + } + e.node(k, tail) + tail = foot + + v := node.Content[i+1] + e.node(v, "") + } + + yaml_mapping_end_event_initialize(&e.event) + e.event.tail_comment = []byte(tail) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case AliasNode: + yaml_alias_event_initialize(&e.event, []byte(node.Value)) + e.event.head_comment = []byte(node.HeadComment) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case ScalarNode: + value := node.Value + if !utf8.ValidString(value) { + if stag == binaryTag { + failf("explicitly tagged !!binary data must be base64-encoded") + } + if stag != "" { + failf("cannot marshal invalid UTF-8 data as %s", stag) + } + // It can't be encoded directly as YAML so use a binary tag + // and encode it as base64. + tag = binaryTag + value = encodeBase64(value) + } + + style := yaml_PLAIN_SCALAR_STYLE + switch { + case node.Style&DoubleQuotedStyle != 0: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + case node.Style&SingleQuotedStyle != 0: + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + case node.Style&LiteralStyle != 0: + style = yaml_LITERAL_SCALAR_STYLE + case node.Style&FoldedStyle != 0: + style = yaml_FOLDED_SCALAR_STYLE + case strings.Contains(value, "\n"): + style = yaml_LITERAL_SCALAR_STYLE + case forceQuoting: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) + default: + failf("cannot encode node with unknown kind %d", node.Kind) + } +} diff --git a/vendor/go.yaml.in/yaml/v3/parserc.go b/vendor/go.yaml.in/yaml/v3/parserc.go new file mode 100644 index 000000000..25fe82363 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/parserc.go @@ -0,0 +1,1274 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" +) + +// The parser implements the following grammar: +// +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// implicit_document ::= block_node DOCUMENT-END* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// block_node_or_indentless_sequence ::= +// ALIAS +// | properties (block_content | indentless_block_sequence)? +// | block_content +// | indentless_block_sequence +// block_node ::= ALIAS +// | properties block_content? +// | block_content +// flow_node ::= ALIAS +// | properties flow_content? +// | flow_content +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// block_content ::= block_collection | flow_collection | SCALAR +// flow_content ::= flow_collection | SCALAR +// block_collection ::= block_sequence | block_mapping +// flow_collection ::= flow_sequence | flow_mapping +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// block_mapping ::= BLOCK-MAPPING_START +// ((KEY block_node_or_indentless_sequence?)? +// (VALUE block_node_or_indentless_sequence?)?)* +// BLOCK-END +// flow_sequence ::= FLOW-SEQUENCE-START +// (flow_sequence_entry FLOW-ENTRY)* +// flow_sequence_entry? +// FLOW-SEQUENCE-END +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// flow_mapping ::= FLOW-MAPPING-START +// (flow_mapping_entry FLOW-ENTRY)* +// flow_mapping_entry? +// FLOW-MAPPING-END +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? + +// Peek the next token in the token queue. +func peek_token(parser *yaml_parser_t) *yaml_token_t { + if parser.token_available || yaml_parser_fetch_more_tokens(parser) { + token := &parser.tokens[parser.tokens_head] + yaml_parser_unfold_comments(parser, token) + return token + } + return nil +} + +// yaml_parser_unfold_comments walks through the comments queue and joins all +// comments behind the position of the provided token into the respective +// top-level comment slices in the parser. +func yaml_parser_unfold_comments(parser *yaml_parser_t, token *yaml_token_t) { + for parser.comments_head < len(parser.comments) && token.start_mark.index >= parser.comments[parser.comments_head].token_mark.index { + comment := &parser.comments[parser.comments_head] + if len(comment.head) > 0 { + if token.typ == yaml_BLOCK_END_TOKEN { + // No heads on ends, so keep comment.head for a follow up token. + break + } + if len(parser.head_comment) > 0 { + parser.head_comment = append(parser.head_comment, '\n') + } + parser.head_comment = append(parser.head_comment, comment.head...) + } + if len(comment.foot) > 0 { + if len(parser.foot_comment) > 0 { + parser.foot_comment = append(parser.foot_comment, '\n') + } + parser.foot_comment = append(parser.foot_comment, comment.foot...) + } + if len(comment.line) > 0 { + if len(parser.line_comment) > 0 { + parser.line_comment = append(parser.line_comment, '\n') + } + parser.line_comment = append(parser.line_comment, comment.line...) + } + *comment = yaml_comment_t{} + parser.comments_head++ + } +} + +// Remove the next token from the queue (must be called after peek_token). +func skip_token(parser *yaml_parser_t) { + parser.token_available = false + parser.tokens_parsed++ + parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN + parser.tokens_head++ +} + +// Get the next event. +func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { + // Erase the event object. + *event = yaml_event_t{} + + // No events after the end of the stream or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { + return true + } + + // Generate the next event. + return yaml_parser_state_machine(parser, event) +} + +// Set parser error. +func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +// State dispatcher. +func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { + //trace("yaml_parser_state_machine", "state:", parser.state.String()) + + switch parser.state { + case yaml_PARSE_STREAM_START_STATE: + return yaml_parser_parse_stream_start(parser, event) + + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, true) + + case yaml_PARSE_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, false) + + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return yaml_parser_parse_document_content(parser, event) + + case yaml_PARSE_DOCUMENT_END_STATE: + return yaml_parser_parse_document_end(parser, event) + + case yaml_PARSE_BLOCK_NODE_STATE: + return yaml_parser_parse_node(parser, event, true, false) + + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return yaml_parser_parse_node(parser, event, true, true) + + case yaml_PARSE_FLOW_NODE_STATE: + return yaml_parser_parse_node(parser, event, false, false) + + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, true) + + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, false) + + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_indentless_sequence_entry(parser, event) + + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, true) + + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, false) + + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return yaml_parser_parse_block_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, true) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, false) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) + + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, true) + + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, true) + + default: + panic("invalid parser state") + } +} + +// Parse the production: +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// +// ************ +func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_STREAM_START_TOKEN { + return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) + } + parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + encoding: token.encoding, + } + skip_token(parser) + return true +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// +// * +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// +// ************************* +func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { + + token := peek_token(parser) + if token == nil { + return false + } + + // Parse extra document end indicators. + if !implicit { + for token.typ == yaml_DOCUMENT_END_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && + token.typ != yaml_TAG_DIRECTIVE_TOKEN && + token.typ != yaml_DOCUMENT_START_TOKEN && + token.typ != yaml_STREAM_END_TOKEN { + // Parse an implicit document. + if !yaml_parser_process_directives(parser, nil, nil) { + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_BLOCK_NODE_STATE + + var head_comment []byte + if len(parser.head_comment) > 0 { + // [Go] Scan the header comment backwards, and if an empty line is found, break + // the header so the part before the last empty line goes into the + // document header, while the bottom of it goes into a follow up event. + for i := len(parser.head_comment) - 1; i > 0; i-- { + if parser.head_comment[i] == '\n' { + if i == len(parser.head_comment)-1 { + head_comment = parser.head_comment[:i] + parser.head_comment = parser.head_comment[i+1:] + break + } else if parser.head_comment[i-1] == '\n' { + head_comment = parser.head_comment[:i-1] + parser.head_comment = parser.head_comment[i+1:] + break + } + } + } + } + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + + head_comment: head_comment, + } + + } else if token.typ != yaml_STREAM_END_TOKEN { + // Parse an explicit document. + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + start_mark := token.start_mark + if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { + return false + } + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_DOCUMENT_START_TOKEN { + yaml_parser_set_parser_error(parser, + "did not find expected ", token.start_mark) + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE + end_mark := token.end_mark + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: false, + } + skip_token(parser) + + } else { + // Parse the stream end. + parser.state = yaml_PARSE_END_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + } + + return true +} + +// Parse the productions: +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// +// *********** +func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || + token.typ == yaml_TAG_DIRECTIVE_TOKEN || + token.typ == yaml_DOCUMENT_START_TOKEN || + token.typ == yaml_DOCUMENT_END_TOKEN || + token.typ == yaml_STREAM_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + return yaml_parser_process_empty_scalar(parser, event, + token.start_mark) + } + return yaml_parser_parse_node(parser, event, true, false) +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + start_mark := token.start_mark + end_mark := token.start_mark + + implicit := true + if token.typ == yaml_DOCUMENT_END_TOKEN { + end_mark = token.end_mark + skip_token(parser) + implicit = false + } + + parser.tag_directives = parser.tag_directives[:0] + + parser.state = yaml_PARSE_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + start_mark: start_mark, + end_mark: end_mark, + implicit: implicit, + } + yaml_parser_set_event_comments(parser, event) + if len(event.head_comment) > 0 && len(event.foot_comment) == 0 { + event.foot_comment = event.head_comment + event.head_comment = nil + } + return true +} + +func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) { + event.head_comment = parser.head_comment + event.line_comment = parser.line_comment + event.foot_comment = parser.foot_comment + parser.head_comment = nil + parser.line_comment = nil + parser.foot_comment = nil + parser.tail_comment = nil + parser.stem_comment = nil +} + +// Parse the productions: +// block_node_or_indentless_sequence ::= +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// +// block_node ::= ALIAS +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// +// flow_node ::= ALIAS +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// +// ************************* +// +// block_content ::= block_collection | flow_collection | SCALAR +// +// ****** +// +// flow_content ::= flow_collection | SCALAR +// +// ****** +func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { + //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_ALIAS_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + anchor: token.value, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + + start_mark := token.start_mark + end_mark := token.start_mark + + var tag_token bool + var tag_handle, tag_suffix, anchor []byte + var tag_mark yaml_mark_t + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + start_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } else if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + start_mark = token.start_mark + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + var tag []byte + if tag_token { + if len(tag_handle) == 0 { + tag = tag_suffix + tag_suffix = nil + } else { + for i := range parser.tag_directives { + if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { + tag = append([]byte(nil), parser.tag_directives[i].prefix...) + tag = append(tag, tag_suffix...) + break + } + } + if len(tag) == 0 { + yaml_parser_set_parser_error_context(parser, + "while parsing a node", start_mark, + "found undefined tag handle", tag_mark) + return false + } + } + } + + implicit := len(tag) == 0 + if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_SCALAR_TOKEN { + var plain_implicit, quoted_implicit bool + end_mark = token.end_mark + if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { + plain_implicit = true + } else if len(tag) == 0 { + quoted_implicit = true + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + value: token.value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(token.style), + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { + // [Go] Some of the events below can be merged as they differ only on style. + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), + } + yaml_parser_set_event_comments(parser, event) + return true + } + if token.typ == yaml_FLOW_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + yaml_parser_set_event_comments(parser, event) + return true + } + if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } + return true + } + if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), + } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } + return true + } + if len(anchor) > 0 || len(tag) > 0 { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + quoted_implicit: false, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true + } + + context := "while parsing a flow node" + if block { + context = "while parsing a block node" + } + yaml_parser_set_parser_error_context(parser, context, start_mark, + "did not find expected node content", token.start_mark) + return false +} + +// Parse the productions: +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// +// ******************** *********** * ********* +func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + if token == nil { + return false + } + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + prior_head_len := len(parser.head_comment) + skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } else { + parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } + if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block collection", context_mark, + "did not find expected '-' indicator", token.start_mark) +} + +// Parse the productions: +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// +// *********** * +func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + prior_head_len := len(parser.head_comment) + skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && + token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? + } + return true +} + +// Split stem comment from head comment. +// +// When a sequence or map is found under a sequence entry, the former head comment +// is assigned to the underlying sequence or map as a whole, not the individual +// sequence or map entry as would be expected otherwise. To handle this case the +// previous head comment is moved aside as the stem comment. +func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { + if stem_len == 0 { + return + } + + token := peek_token(parser) + if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { + return + } + + parser.stem_comment = parser.head_comment[:stem_len] + if len(parser.head_comment) == stem_len { + parser.head_comment = nil + } else { + // Copy suffix to prevent very strange bugs if someone ever appends + // further bytes to the prefix in the stem_comment slice above. + parser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...) + } +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* +// +// BLOCK-END +// ********* +func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + if token == nil { + return false + } + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + // [Go] A tail comment was left from the prior mapping value processed. Emit an event + // as it needs to be processed with that value and not the following key. + if len(parser.tail_comment) > 0 { + *event = yaml_event_t{ + typ: yaml_TAIL_COMMENT_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + foot_comment: parser.tail_comment, + } + parser.tail_comment = nil + return true + } + + if token.typ == yaml_KEY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } else { + parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } else if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block mapping", context_mark, + "did not find expected key", token.start_mark) +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// +// ((KEY block_node_or_indentless_sequence?)? +// +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END +func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence ::= FLOW-SEQUENCE-START +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// +// * +func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + if token == nil { + return false + } + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow sequence", context_mark, + "did not find expected ',' or ']'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + implicit: true, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + skip_token(parser) + return true + } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + + skip_token(parser) + return true +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// +// *** * +func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + mark := token.end_mark + skip_token(parser) + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// +// ***** * +func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// +// * +func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? + } + return true +} + +// Parse the productions: +// flow_mapping ::= FLOW-MAPPING-START +// +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * +func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow mapping", context_mark, + "did not find expected ',' or '}'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } else { + parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true +} + +// Parse the productions: +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - ***** * +func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { + token := peek_token(parser) + if token == nil { + return false + } + if empty { + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Generate an empty scalar event. +func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: mark, + end_mark: mark, + value: nil, // Empty + implicit: true, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true +} + +var default_tag_directives = []yaml_tag_directive_t{ + {[]byte("!"), []byte("!")}, + {[]byte("!!"), []byte("tag:yaml.org,2002:")}, +} + +// Parse directives. +func yaml_parser_process_directives(parser *yaml_parser_t, + version_directive_ref **yaml_version_directive_t, + tag_directives_ref *[]yaml_tag_directive_t) bool { + + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + + token := peek_token(parser) + if token == nil { + return false + } + + for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { + if version_directive != nil { + yaml_parser_set_parser_error(parser, + "found duplicate %YAML directive", token.start_mark) + return false + } + if token.major != 1 || token.minor != 1 { + yaml_parser_set_parser_error(parser, + "found incompatible YAML document", token.start_mark) + return false + } + version_directive = &yaml_version_directive_t{ + major: token.major, + minor: token.minor, + } + } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { + value := yaml_tag_directive_t{ + handle: token.value, + prefix: token.prefix, + } + if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { + return false + } + tag_directives = append(tag_directives, value) + } + + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + + for i := range default_tag_directives { + if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { + return false + } + } + + if version_directive_ref != nil { + *version_directive_ref = version_directive + } + if tag_directives_ref != nil { + *tag_directives_ref = tag_directives + } + return true +} + +// Append a tag directive to the directives stack. +func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { + for i := range parser.tag_directives { + if bytes.Equal(value.handle, parser.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) + } + } + + // [Go] I suspect the copy is unnecessary. This was likely done + // because there was no way to track ownership of the data. + value_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(value_copy.handle, value.handle) + copy(value_copy.prefix, value.prefix) + parser.tag_directives = append(parser.tag_directives, value_copy) + return true +} diff --git a/vendor/go.yaml.in/yaml/v3/readerc.go b/vendor/go.yaml.in/yaml/v3/readerc.go new file mode 100644 index 000000000..56af24536 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/readerc.go @@ -0,0 +1,434 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "io" +) + +// Set the reader error and return 0. +func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { + parser.error = yaml_READER_ERROR + parser.problem = problem + parser.problem_offset = offset + parser.problem_value = value + return false +} + +// Byte order marks. +const ( + bom_UTF8 = "\xef\xbb\xbf" + bom_UTF16LE = "\xff\xfe" + bom_UTF16BE = "\xfe\xff" +) + +// Determine the input stream encoding by checking the BOM symbol. If no BOM is +// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. +func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { + // Ensure that we had enough bytes in the raw buffer. + for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { + if !yaml_parser_update_raw_buffer(parser) { + return false + } + } + + // Determine the encoding. + buf := parser.raw_buffer + pos := parser.raw_buffer_pos + avail := len(buf) - pos + if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { + parser.encoding = yaml_UTF16LE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { + parser.encoding = yaml_UTF16BE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { + parser.encoding = yaml_UTF8_ENCODING + parser.raw_buffer_pos += 3 + parser.offset += 3 + } else { + parser.encoding = yaml_UTF8_ENCODING + } + return true +} + +// Update the raw buffer. +func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { + size_read := 0 + + // Return if the raw buffer is full. + if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { + return true + } + + // Return on EOF. + if parser.eof { + return true + } + + // Move the remaining bytes in the raw buffer to the beginning. + if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { + copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) + } + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] + parser.raw_buffer_pos = 0 + + // Call the read handler to fill the buffer. + size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] + if err == io.EOF { + parser.eof = true + } else if err != nil { + return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) + } + return true +} + +// Ensure that the buffer contains at least `length` characters. +// Return true on success, false on failure. +// +// The length is supposed to be significantly less that the buffer size. +func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { + if parser.read_handler == nil { + panic("read handler must be set") + } + + // [Go] This function was changed to guarantee the requested length size at EOF. + // The fact we need to do this is pretty awful, but the description above implies + // for that to be the case, and there are tests + + // If the EOF flag is set and the raw buffer is empty, do nothing. + if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { + // [Go] ACTUALLY! Read the documentation of this function above. + // This is just broken. To return true, we need to have the + // given length in the buffer. Not doing that means every single + // check that calls this function to make sure the buffer has a + // given length is Go) panicking; or C) accessing invalid memory. + //return true + } + + // Return if the buffer contains enough characters. + if parser.unread >= length { + return true + } + + // Determine the input encoding if it is not known yet. + if parser.encoding == yaml_ANY_ENCODING { + if !yaml_parser_determine_encoding(parser) { + return false + } + } + + // Move the unread characters to the beginning of the buffer. + buffer_len := len(parser.buffer) + if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { + copy(parser.buffer, parser.buffer[parser.buffer_pos:]) + buffer_len -= parser.buffer_pos + parser.buffer_pos = 0 + } else if parser.buffer_pos == buffer_len { + buffer_len = 0 + parser.buffer_pos = 0 + } + + // Open the whole buffer for writing, and cut it before returning. + parser.buffer = parser.buffer[:cap(parser.buffer)] + + // Fill the buffer until it has enough characters. + first := true + for parser.unread < length { + + // Fill the raw buffer if necessary. + if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { + if !yaml_parser_update_raw_buffer(parser) { + parser.buffer = parser.buffer[:buffer_len] + return false + } + } + first = false + + // Decode the raw buffer. + inner: + for parser.raw_buffer_pos != len(parser.raw_buffer) { + var value rune + var width int + + raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos + + // Decode the next character. + switch parser.encoding { + case yaml_UTF8_ENCODING: + // Decode a UTF-8 character. Check RFC 3629 + // (http://www.ietf.org/rfc/rfc3629.txt) for more details. + // + // The following table (taken from the RFC) is used for + // decoding. + // + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // --------------------+------------------------------------ + // 0000 0000-0000 007F | 0xxxxxxx + // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Additionally, the characters in the range 0xD800-0xDFFF + // are prohibited as they are reserved for use with UTF-16 + // surrogate pairs. + + // Determine the length of the UTF-8 sequence. + octet := parser.raw_buffer[parser.raw_buffer_pos] + switch { + case octet&0x80 == 0x00: + width = 1 + case octet&0xE0 == 0xC0: + width = 2 + case octet&0xF0 == 0xE0: + width = 3 + case octet&0xF8 == 0xF0: + width = 4 + default: + // The leading octet is invalid. + return yaml_parser_set_reader_error(parser, + "invalid leading UTF-8 octet", + parser.offset, int(octet)) + } + + // Check if the raw buffer contains an incomplete character. + if width > raw_unread { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-8 octet sequence", + parser.offset, -1) + } + break inner + } + + // Decode the leading octet. + switch { + case octet&0x80 == 0x00: + value = rune(octet & 0x7F) + case octet&0xE0 == 0xC0: + value = rune(octet & 0x1F) + case octet&0xF0 == 0xE0: + value = rune(octet & 0x0F) + case octet&0xF8 == 0xF0: + value = rune(octet & 0x07) + default: + value = 0 + } + + // Check and decode the trailing octets. + for k := 1; k < width; k++ { + octet = parser.raw_buffer[parser.raw_buffer_pos+k] + + // Check if the octet is valid. + if (octet & 0xC0) != 0x80 { + return yaml_parser_set_reader_error(parser, + "invalid trailing UTF-8 octet", + parser.offset+k, int(octet)) + } + + // Decode the octet. + value = (value << 6) + rune(octet&0x3F) + } + + // Check the length of the sequence against the value. + switch { + case width == 1: + case width == 2 && value >= 0x80: + case width == 3 && value >= 0x800: + case width == 4 && value >= 0x10000: + default: + return yaml_parser_set_reader_error(parser, + "invalid length of a UTF-8 sequence", + parser.offset, -1) + } + + // Check the range of the value. + if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { + return yaml_parser_set_reader_error(parser, + "invalid Unicode character", + parser.offset, int(value)) + } + + case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: + var low, high int + if parser.encoding == yaml_UTF16LE_ENCODING { + low, high = 0, 1 + } else { + low, high = 1, 0 + } + + // The UTF-16 encoding is not as simple as one might + // naively think. Check RFC 2781 + // (http://www.ietf.org/rfc/rfc2781.txt). + // + // Normally, two subsequent bytes describe a Unicode + // character. However a special technique (called a + // surrogate pair) is used for specifying character + // values larger than 0xFFFF. + // + // A surrogate pair consists of two pseudo-characters: + // high surrogate area (0xD800-0xDBFF) + // low surrogate area (0xDC00-0xDFFF) + // + // The following formulas are used for decoding + // and encoding characters using surrogate pairs: + // + // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) + // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) + // W1 = 110110yyyyyyyyyy + // W2 = 110111xxxxxxxxxx + // + // where U is the character value, W1 is the high surrogate + // area, W2 is the low surrogate area. + + // Check for incomplete UTF-16 character. + if raw_unread < 2 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 character", + parser.offset, -1) + } + break inner + } + + // Get the character. + value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) + + // Check for unexpected low surrogate area. + if value&0xFC00 == 0xDC00 { + return yaml_parser_set_reader_error(parser, + "unexpected low surrogate area", + parser.offset, int(value)) + } + + // Check for a high surrogate area. + if value&0xFC00 == 0xD800 { + width = 4 + + // Check for incomplete surrogate pair. + if raw_unread < 4 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 surrogate pair", + parser.offset, -1) + } + break inner + } + + // Get the next character. + value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) + + // Check for a low surrogate area. + if value2&0xFC00 != 0xDC00 { + return yaml_parser_set_reader_error(parser, + "expected low surrogate area", + parser.offset+2, int(value2)) + } + + // Generate the value of the surrogate pair. + value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) + } else { + width = 2 + } + + default: + panic("impossible") + } + + // Check if the character is in the allowed range: + // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) + // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) + // | [#x10000-#x10FFFF] (32 bit) + switch { + case value == 0x09: + case value == 0x0A: + case value == 0x0D: + case value >= 0x20 && value <= 0x7E: + case value == 0x85: + case value >= 0xA0 && value <= 0xD7FF: + case value >= 0xE000 && value <= 0xFFFD: + case value >= 0x10000 && value <= 0x10FFFF: + default: + return yaml_parser_set_reader_error(parser, + "control characters are not allowed", + parser.offset, int(value)) + } + + // Move the raw pointers. + parser.raw_buffer_pos += width + parser.offset += width + + // Finally put the character into the buffer. + if value <= 0x7F { + // 0000 0000-0000 007F . 0xxxxxxx + parser.buffer[buffer_len+0] = byte(value) + buffer_len += 1 + } else if value <= 0x7FF { + // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) + parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) + buffer_len += 2 + } else if value <= 0xFFFF { + // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) + buffer_len += 3 + } else { + // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) + buffer_len += 4 + } + + parser.unread++ + } + + // On EOF, put NUL into the buffer and return. + if parser.eof { + parser.buffer[buffer_len] = 0 + buffer_len++ + parser.unread++ + break + } + } + // [Go] Read the documentation of this function above. To return true, + // we need to have the given length in the buffer. Not doing that means + // every single check that calls this function to make sure the buffer + // has a given length is Go) panicking; or C) accessing invalid memory. + // This happens here due to the EOF above breaking early. + for buffer_len < length { + parser.buffer[buffer_len] = 0 + buffer_len++ + } + parser.buffer = parser.buffer[:buffer_len] + return true +} diff --git a/vendor/go.yaml.in/yaml/v3/resolve.go b/vendor/go.yaml.in/yaml/v3/resolve.go new file mode 100644 index 000000000..64ae88805 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/resolve.go @@ -0,0 +1,326 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yaml + +import ( + "encoding/base64" + "math" + "regexp" + "strconv" + "strings" + "time" +) + +type resolveMapItem struct { + value interface{} + tag string +} + +var resolveTable = make([]byte, 256) +var resolveMap = make(map[string]resolveMapItem) + +func init() { + t := resolveTable + t[int('+')] = 'S' // Sign + t[int('-')] = 'S' + for _, c := range "0123456789" { + t[int(c)] = 'D' // Digit + } + for _, c := range "yYnNtTfFoO~" { + t[int(c)] = 'M' // In map + } + t[int('.')] = '.' // Float (potentially in map) + + var resolveMapList = []struct { + v interface{} + tag string + l []string + }{ + {true, boolTag, []string{"true", "True", "TRUE"}}, + {false, boolTag, []string{"false", "False", "FALSE"}}, + {nil, nullTag, []string{"", "~", "null", "Null", "NULL"}}, + {math.NaN(), floatTag, []string{".nan", ".NaN", ".NAN"}}, + {math.Inf(+1), floatTag, []string{".inf", ".Inf", ".INF"}}, + {math.Inf(+1), floatTag, []string{"+.inf", "+.Inf", "+.INF"}}, + {math.Inf(-1), floatTag, []string{"-.inf", "-.Inf", "-.INF"}}, + {"<<", mergeTag, []string{"<<"}}, + } + + m := resolveMap + for _, item := range resolveMapList { + for _, s := range item.l { + m[s] = resolveMapItem{item.v, item.tag} + } + } +} + +const ( + nullTag = "!!null" + boolTag = "!!bool" + strTag = "!!str" + intTag = "!!int" + floatTag = "!!float" + timestampTag = "!!timestamp" + seqTag = "!!seq" + mapTag = "!!map" + binaryTag = "!!binary" + mergeTag = "!!merge" +) + +var longTags = make(map[string]string) +var shortTags = make(map[string]string) + +func init() { + for _, stag := range []string{nullTag, boolTag, strTag, intTag, floatTag, timestampTag, seqTag, mapTag, binaryTag, mergeTag} { + ltag := longTag(stag) + longTags[stag] = ltag + shortTags[ltag] = stag + } +} + +const longTagPrefix = "tag:yaml.org,2002:" + +func shortTag(tag string) string { + if strings.HasPrefix(tag, longTagPrefix) { + if stag, ok := shortTags[tag]; ok { + return stag + } + return "!!" + tag[len(longTagPrefix):] + } + return tag +} + +func longTag(tag string) string { + if strings.HasPrefix(tag, "!!") { + if ltag, ok := longTags[tag]; ok { + return ltag + } + return longTagPrefix + tag[2:] + } + return tag +} + +func resolvableTag(tag string) bool { + switch tag { + case "", strTag, boolTag, intTag, floatTag, nullTag, timestampTag: + return true + } + return false +} + +var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) + +func resolve(tag string, in string) (rtag string, out interface{}) { + tag = shortTag(tag) + if !resolvableTag(tag) { + return tag, in + } + + defer func() { + switch tag { + case "", rtag, strTag, binaryTag: + return + case floatTag: + if rtag == intTag { + switch v := out.(type) { + case int64: + rtag = floatTag + out = float64(v) + return + case int: + rtag = floatTag + out = float64(v) + return + } + } + } + failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) + }() + + // Any data is accepted as a !!str or !!binary. + // Otherwise, the prefix is enough of a hint about what it might be. + hint := byte('N') + if in != "" { + hint = resolveTable[in[0]] + } + if hint != 0 && tag != strTag && tag != binaryTag { + // Handle things we can lookup in a map. + if item, ok := resolveMap[in]; ok { + return item.tag, item.value + } + + // Base 60 floats are a bad idea, were dropped in YAML 1.2, and + // are purposefully unsupported here. They're still quoted on + // the way out for compatibility with other parser, though. + + switch hint { + case 'M': + // We've already checked the map above. + + case '.': + // Not in the map, so maybe a normal float. + floatv, err := strconv.ParseFloat(in, 64) + if err == nil { + return floatTag, floatv + } + + case 'D', 'S': + // Int, float, or timestamp. + // Only try values as a timestamp if the value is unquoted or there's an explicit + // !!timestamp tag. + if tag == "" || tag == timestampTag { + t, ok := parseTimestamp(in) + if ok { + return timestampTag, t + } + } + + plain := strings.Replace(in, "_", "", -1) + intv, err := strconv.ParseInt(plain, 0, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain, 0, 64) + if err == nil { + return intTag, uintv + } + if yamlStyleFloat.MatchString(plain) { + floatv, err := strconv.ParseFloat(plain, 64) + if err == nil { + return floatTag, floatv + } + } + if strings.HasPrefix(plain, "0b") { + intv, err := strconv.ParseInt(plain[2:], 2, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 2, 64) + if err == nil { + return intTag, uintv + } + } else if strings.HasPrefix(plain, "-0b") { + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) + if err == nil { + if true || intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + } + // Octals as introduced in version 1.2 of the spec. + // Octals from the 1.1 spec, spelled as 0777, are still + // decoded by default in v3 as well for compatibility. + // May be dropped in v4 depending on how usage evolves. + if strings.HasPrefix(plain, "0o") { + intv, err := strconv.ParseInt(plain[2:], 8, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 8, 64) + if err == nil { + return intTag, uintv + } + } else if strings.HasPrefix(plain, "-0o") { + intv, err := strconv.ParseInt("-"+plain[3:], 8, 64) + if err == nil { + if true || intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + } + default: + panic("internal error: missing handler for resolver table: " + string(rune(hint)) + " (with " + in + ")") + } + } + return strTag, in +} + +// encodeBase64 encodes s as base64 that is broken up into multiple lines +// as appropriate for the resulting length. +func encodeBase64(s string) string { + const lineLen = 70 + encLen := base64.StdEncoding.EncodedLen(len(s)) + lines := encLen/lineLen + 1 + buf := make([]byte, encLen*2+lines) + in := buf[0:encLen] + out := buf[encLen:] + base64.StdEncoding.Encode(in, []byte(s)) + k := 0 + for i := 0; i < len(in); i += lineLen { + j := i + lineLen + if j > len(in) { + j = len(in) + } + k += copy(out[k:], in[i:j]) + if lines > 1 { + out[k] = '\n' + k++ + } + } + return string(out[:k]) +} + +// This is a subset of the formats allowed by the regular expression +// defined at http://yaml.org/type/timestamp.html. +var allowedTimestampFormats = []string{ + "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. + "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". + "2006-1-2 15:4:5.999999999", // space separated with no time zone + "2006-1-2", // date only + // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" + // from the set of examples. +} + +// parseTimestamp parses s as a timestamp string and +// returns the timestamp and reports whether it succeeded. +// Timestamp formats are defined at http://yaml.org/type/timestamp.html +func parseTimestamp(s string) (time.Time, bool) { + // TODO write code to check all the formats supported by + // http://yaml.org/type/timestamp.html instead of using time.Parse. + + // Quick check: all date formats start with YYYY-. + i := 0 + for ; i < len(s); i++ { + if c := s[i]; c < '0' || c > '9' { + break + } + } + if i != 4 || i == len(s) || s[i] != '-' { + return time.Time{}, false + } + for _, format := range allowedTimestampFormats { + if t, err := time.Parse(format, s); err == nil { + return t, true + } + } + return time.Time{}, false +} diff --git a/vendor/go.yaml.in/yaml/v3/scannerc.go b/vendor/go.yaml.in/yaml/v3/scannerc.go new file mode 100644 index 000000000..30b1f0892 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/scannerc.go @@ -0,0 +1,3040 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" + "fmt" +) + +// Introduction +// ************ +// +// The following notes assume that you are familiar with the YAML specification +// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in +// some cases we are less restrictive that it requires. +// +// The process of transforming a YAML stream into a sequence of events is +// divided on two steps: Scanning and Parsing. +// +// The Scanner transforms the input stream into a sequence of tokens, while the +// parser transform the sequence of tokens produced by the Scanner into a +// sequence of parsing events. +// +// The Scanner is rather clever and complicated. The Parser, on the contrary, +// is a straightforward implementation of a recursive-descendant parser (or, +// LL(1) parser, as it is usually called). +// +// Actually there are two issues of Scanning that might be called "clever", the +// rest is quite straightforward. The issues are "block collection start" and +// "simple keys". Both issues are explained below in details. +// +// Here the Scanning step is explained and implemented. We start with the list +// of all the tokens produced by the Scanner together with short descriptions. +// +// Now, tokens: +// +// STREAM-START(encoding) # The stream start. +// STREAM-END # The stream end. +// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. +// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. +// DOCUMENT-START # '---' +// DOCUMENT-END # '...' +// BLOCK-SEQUENCE-START # Indentation increase denoting a block +// BLOCK-MAPPING-START # sequence or a block mapping. +// BLOCK-END # Indentation decrease. +// FLOW-SEQUENCE-START # '[' +// FLOW-SEQUENCE-END # ']' +// BLOCK-SEQUENCE-START # '{' +// BLOCK-SEQUENCE-END # '}' +// BLOCK-ENTRY # '-' +// FLOW-ENTRY # ',' +// KEY # '?' or nothing (simple keys). +// VALUE # ':' +// ALIAS(anchor) # '*anchor' +// ANCHOR(anchor) # '&anchor' +// TAG(handle,suffix) # '!handle!suffix' +// SCALAR(value,style) # A scalar. +// +// The following two tokens are "virtual" tokens denoting the beginning and the +// end of the stream: +// +// STREAM-START(encoding) +// STREAM-END +// +// We pass the information about the input stream encoding with the +// STREAM-START token. +// +// The next two tokens are responsible for tags: +// +// VERSION-DIRECTIVE(major,minor) +// TAG-DIRECTIVE(handle,prefix) +// +// Example: +// +// %YAML 1.1 +// %TAG ! !foo +// %TAG !yaml! tag:yaml.org,2002: +// --- +// +// The correspoding sequence of tokens: +// +// STREAM-START(utf-8) +// VERSION-DIRECTIVE(1,1) +// TAG-DIRECTIVE("!","!foo") +// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") +// DOCUMENT-START +// STREAM-END +// +// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole +// line. +// +// The document start and end indicators are represented by: +// +// DOCUMENT-START +// DOCUMENT-END +// +// Note that if a YAML stream contains an implicit document (without '---' +// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be +// produced. +// +// In the following examples, we present whole documents together with the +// produced tokens. +// +// 1. An implicit document: +// +// 'a scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// STREAM-END +// +// 2. An explicit document: +// +// --- +// 'a scalar' +// ... +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// SCALAR("a scalar",single-quoted) +// DOCUMENT-END +// STREAM-END +// +// 3. Several documents in a stream: +// +// 'a scalar' +// --- +// 'another scalar' +// --- +// 'yet another scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// DOCUMENT-START +// SCALAR("another scalar",single-quoted) +// DOCUMENT-START +// SCALAR("yet another scalar",single-quoted) +// STREAM-END +// +// We have already introduced the SCALAR token above. The following tokens are +// used to describe aliases, anchors, tag, and scalars: +// +// ALIAS(anchor) +// ANCHOR(anchor) +// TAG(handle,suffix) +// SCALAR(value,style) +// +// The following series of examples illustrate the usage of these tokens: +// +// 1. A recursive sequence: +// +// &A [ *A ] +// +// Tokens: +// +// STREAM-START(utf-8) +// ANCHOR("A") +// FLOW-SEQUENCE-START +// ALIAS("A") +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A tagged scalar: +// +// !!float "3.14" # A good approximation. +// +// Tokens: +// +// STREAM-START(utf-8) +// TAG("!!","float") +// SCALAR("3.14",double-quoted) +// STREAM-END +// +// 3. Various scalar styles: +// +// --- # Implicit empty plain scalars do not produce tokens. +// --- a plain scalar +// --- 'a single-quoted scalar' +// --- "a double-quoted scalar" +// --- |- +// a literal scalar +// --- >- +// a folded +// scalar +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// DOCUMENT-START +// SCALAR("a plain scalar",plain) +// DOCUMENT-START +// SCALAR("a single-quoted scalar",single-quoted) +// DOCUMENT-START +// SCALAR("a double-quoted scalar",double-quoted) +// DOCUMENT-START +// SCALAR("a literal scalar",literal) +// DOCUMENT-START +// SCALAR("a folded scalar",folded) +// STREAM-END +// +// Now it's time to review collection-related tokens. We will start with +// flow collections: +// +// FLOW-SEQUENCE-START +// FLOW-SEQUENCE-END +// FLOW-MAPPING-START +// FLOW-MAPPING-END +// FLOW-ENTRY +// KEY +// VALUE +// +// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and +// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' +// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the +// indicators '?' and ':', which are used for denoting mapping keys and values, +// are represented by the KEY and VALUE tokens. +// +// The following examples show flow collections: +// +// 1. A flow sequence: +// +// [item 1, item 2, item 3] +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-SEQUENCE-START +// SCALAR("item 1",plain) +// FLOW-ENTRY +// SCALAR("item 2",plain) +// FLOW-ENTRY +// SCALAR("item 3",plain) +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A flow mapping: +// +// { +// a simple key: a value, # Note that the KEY token is produced. +// ? a complex key: another value, +// } +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// FLOW-ENTRY +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// FLOW-ENTRY +// FLOW-MAPPING-END +// STREAM-END +// +// A simple key is a key which is not denoted by the '?' indicator. Note that +// the Scanner still produce the KEY token whenever it encounters a simple key. +// +// For scanning block collections, the following tokens are used (note that we +// repeat KEY and VALUE here): +// +// BLOCK-SEQUENCE-START +// BLOCK-MAPPING-START +// BLOCK-END +// BLOCK-ENTRY +// KEY +// VALUE +// +// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation +// increase that precedes a block collection (cf. the INDENT token in Python). +// The token BLOCK-END denote indentation decrease that ends a block collection +// (cf. the DEDENT token in Python). However YAML has some syntax pecularities +// that makes detections of these tokens more complex. +// +// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators +// '-', '?', and ':' correspondingly. +// +// The following examples show how the tokens BLOCK-SEQUENCE-START, +// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: +// +// 1. Block sequences: +// +// - item 1 +// - item 2 +// - +// - item 3.1 +// - item 3.2 +// - +// key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 3.1",plain) +// BLOCK-ENTRY +// SCALAR("item 3.2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Block mappings: +// +// a simple key: a value # The KEY token is produced here. +// ? a complex key +// : another value +// a mapping: +// key 1: value 1 +// key 2: value 2 +// a sequence: +// - item 1 +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// KEY +// SCALAR("a mapping",plain) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML does not always require to start a new block collection from a new +// line. If the current line contains only '-', '?', and ':' indicators, a new +// block collection may start at the current line. The following examples +// illustrate this case: +// +// 1. Collections in a sequence: +// +// - - item 1 +// - item 2 +// - key 1: value 1 +// key 2: value 2 +// - ? complex key +// : complex value +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("complex key") +// VALUE +// SCALAR("complex value") +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Collections in a mapping: +// +// ? a sequence +// : - item 1 +// - item 2 +// ? a mapping +// : key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// KEY +// SCALAR("a mapping",plain) +// VALUE +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML also permits non-indented sequences if they are included into a block +// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: +// +// key: +// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key",plain) +// VALUE +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// + +// Ensure that the buffer contains the required number of characters. +// Return true on success, false on failure (reader error or memory error). +func cache(parser *yaml_parser_t, length int) bool { + // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) + return parser.unread >= length || yaml_parser_update_buffer(parser, length) +} + +// Advance the buffer pointer. +func skip(parser *yaml_parser_t) { + if !is_blank(parser.buffer, parser.buffer_pos) { + parser.newlines = 0 + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) +} + +func skip_line(parser *yaml_parser_t) { + if is_crlf(parser.buffer, parser.buffer_pos) { + parser.mark.index += 2 + parser.mark.column = 0 + parser.mark.line++ + parser.unread -= 2 + parser.buffer_pos += 2 + parser.newlines++ + } else if is_break(parser.buffer, parser.buffer_pos) { + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) + parser.newlines++ + } +} + +// Copy a character to a string buffer and advance pointers. +func read(parser *yaml_parser_t, s []byte) []byte { + if !is_blank(parser.buffer, parser.buffer_pos) { + parser.newlines = 0 + } + w := width(parser.buffer[parser.buffer_pos]) + if w == 0 { + panic("invalid character sequence") + } + if len(s) == 0 { + s = make([]byte, 0, 32) + } + if w == 1 && len(s)+w <= cap(s) { + s = s[:len(s)+1] + s[len(s)-1] = parser.buffer[parser.buffer_pos] + parser.buffer_pos++ + } else { + s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) + parser.buffer_pos += w + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + return s +} + +// Copy a line break character to a string buffer and advance pointers. +func read_line(parser *yaml_parser_t, s []byte) []byte { + buf := parser.buffer + pos := parser.buffer_pos + switch { + case buf[pos] == '\r' && buf[pos+1] == '\n': + // CR LF . LF + s = append(s, '\n') + parser.buffer_pos += 2 + parser.mark.index++ + parser.unread-- + case buf[pos] == '\r' || buf[pos] == '\n': + // CR|LF . LF + s = append(s, '\n') + parser.buffer_pos += 1 + case buf[pos] == '\xC2' && buf[pos+1] == '\x85': + // NEL . LF + s = append(s, '\n') + parser.buffer_pos += 2 + case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): + // LS|PS . LS|PS + s = append(s, buf[parser.buffer_pos:pos+3]...) + parser.buffer_pos += 3 + default: + return s + } + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.newlines++ + return s +} + +// Get the next token. +func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { + // Erase the token object. + *token = yaml_token_t{} // [Go] Is this necessary? + + // No tokens after STREAM-END or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR { + return true + } + + // Ensure that the tokens queue contains enough tokens. + if !parser.token_available { + if !yaml_parser_fetch_more_tokens(parser) { + return false + } + } + + // Fetch the next token from the queue. + *token = parser.tokens[parser.tokens_head] + parser.tokens_head++ + parser.tokens_parsed++ + parser.token_available = false + + if token.typ == yaml_STREAM_END_TOKEN { + parser.stream_end_produced = true + } + return true +} + +// Set the scanner error and return false. +func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { + parser.error = yaml_SCANNER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = parser.mark + return false +} + +func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { + context := "while parsing a tag" + if directive { + context = "while parsing a %TAG directive" + } + return yaml_parser_set_scanner_error(parser, context, context_mark, problem) +} + +func trace(args ...interface{}) func() { + pargs := append([]interface{}{"+++"}, args...) + fmt.Println(pargs...) + pargs = append([]interface{}{"---"}, args...) + return func() { fmt.Println(pargs...) } +} + +// Ensure that the tokens queue contains at least one token which can be +// returned to the Parser. +func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { + // While we need more tokens to fetch, do it. + for { + // [Go] The comment parsing logic requires a lookahead of two tokens + // so that foot comments may be parsed in time of associating them + // with the tokens that are parsed before them, and also for line + // comments to be transformed into head comments in some edge cases. + if parser.tokens_head < len(parser.tokens)-2 { + // If a potential simple key is at the head position, we need to fetch + // the next token to disambiguate it. + head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] + if !ok { + break + } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { + return false + } else if !valid { + break + } + } + // Fetch the next token. + if !yaml_parser_fetch_next_token(parser) { + return false + } + } + + parser.token_available = true + return true +} + +// The dispatcher for token fetchers. +func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) { + // Ensure that the buffer is initialized. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we just started scanning. Fetch STREAM-START then. + if !parser.stream_start_produced { + return yaml_parser_fetch_stream_start(parser) + } + + scan_mark := parser.mark + + // Eat whitespaces and comments until we reach the next token. + if !yaml_parser_scan_to_next_token(parser) { + return false + } + + // [Go] While unrolling indents, transform the head comments of prior + // indentation levels observed after scan_start into foot comments at + // the respective indexes. + + // Check the indentation level against the current column. + if !yaml_parser_unroll_indent(parser, parser.mark.column, scan_mark) { + return false + } + + // Ensure that the buffer contains at least 4 characters. 4 is the length + // of the longest indicators ('--- ' and '... '). + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + // Is it the end of the stream? + if is_z(parser.buffer, parser.buffer_pos) { + return yaml_parser_fetch_stream_end(parser) + } + + // Is it a directive? + if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { + return yaml_parser_fetch_directive(parser) + } + + buf := parser.buffer + pos := parser.buffer_pos + + // Is it the document start indicator? + if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) + } + + // Is it the document end indicator? + if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) + } + + comment_mark := parser.mark + if len(parser.tokens) > 0 && (parser.flow_level == 0 && buf[pos] == ':' || parser.flow_level > 0 && buf[pos] == ',') { + // Associate any following comments with the prior token. + comment_mark = parser.tokens[len(parser.tokens)-1].start_mark + } + defer func() { + if !ok { + return + } + if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { + // Sequence indicators alone have no line comments. It becomes + // a head comment for whatever follows. + return + } + if !yaml_parser_scan_line_comment(parser, comment_mark) { + ok = false + return + } + }() + + // Is it the flow sequence start indicator? + if buf[pos] == '[' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) + } + + // Is it the flow mapping start indicator? + if parser.buffer[parser.buffer_pos] == '{' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) + } + + // Is it the flow sequence end indicator? + if parser.buffer[parser.buffer_pos] == ']' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_SEQUENCE_END_TOKEN) + } + + // Is it the flow mapping end indicator? + if parser.buffer[parser.buffer_pos] == '}' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_MAPPING_END_TOKEN) + } + + // Is it the flow entry indicator? + if parser.buffer[parser.buffer_pos] == ',' { + return yaml_parser_fetch_flow_entry(parser) + } + + // Is it the block entry indicator? + if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { + return yaml_parser_fetch_block_entry(parser) + } + + // Is it the key indicator? + if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_key(parser) + } + + // Is it the value indicator? + if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_value(parser) + } + + // Is it an alias? + if parser.buffer[parser.buffer_pos] == '*' { + return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) + } + + // Is it an anchor? + if parser.buffer[parser.buffer_pos] == '&' { + return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) + } + + // Is it a tag? + if parser.buffer[parser.buffer_pos] == '!' { + return yaml_parser_fetch_tag(parser) + } + + // Is it a literal scalar? + if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, true) + } + + // Is it a folded scalar? + if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, false) + } + + // Is it a single-quoted scalar? + if parser.buffer[parser.buffer_pos] == '\'' { + return yaml_parser_fetch_flow_scalar(parser, true) + } + + // Is it a double-quoted scalar? + if parser.buffer[parser.buffer_pos] == '"' { + return yaml_parser_fetch_flow_scalar(parser, false) + } + + // Is it a plain scalar? + // + // A plain scalar may start with any non-blank characters except + // + // '-', '?', ':', ',', '[', ']', '{', '}', + // '#', '&', '*', '!', '|', '>', '\'', '\"', + // '%', '@', '`'. + // + // In the block context (and, for the '-' indicator, in the flow context + // too), it may also start with the characters + // + // '-', '?', ':' + // + // if it is followed by a non-space character. + // + // The last rule is more restrictive than the specification requires. + // [Go] TODO Make this logic more reasonable. + //switch parser.buffer[parser.buffer_pos] { + //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': + //} + if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || + parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || + parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || + (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level == 0 && + (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && + !is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_plain_scalar(parser) + } + + // If we don't determine the token type so far, it is an error. + return yaml_parser_set_scanner_error(parser, + "while scanning for the next token", parser.mark, + "found character that cannot start any token") +} + +func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { + if !simple_key.possible { + return false, true + } + + // The 1.2 specification says: + // + // "If the ? indicator is omitted, parsing needs to see past the + // implicit key to recognize it as such. To limit the amount of + // lookahead required, the “:” indicator must appear at most 1024 + // Unicode characters beyond the start of the key. In addition, the key + // is restricted to a single line." + // + if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { + // Check if the potential simple key to be removed is required. + if simple_key.required { + return false, yaml_parser_set_scanner_error(parser, + "while scanning a simple key", simple_key.mark, + "could not find expected ':'") + } + simple_key.possible = false + return false, true + } + return true, true +} + +// Check if a simple key may start at the current position and add it if +// needed. +func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { + // A simple key is required at the current position if the scanner is in + // the block context and the current column coincides with the indentation + // level. + + required := parser.flow_level == 0 && parser.indent == parser.mark.column + + // + // If the current position may start a simple key, save it. + // + if parser.simple_key_allowed { + simple_key := yaml_simple_key_t{ + possible: true, + required: required, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + } + + if !yaml_parser_remove_simple_key(parser) { + return false + } + parser.simple_keys[len(parser.simple_keys)-1] = simple_key + parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 + } + return true +} + +// Remove a potential simple key at the current flow level. +func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { + i := len(parser.simple_keys) - 1 + if parser.simple_keys[i].possible { + // If the key is required, it is an error. + if parser.simple_keys[i].required { + return yaml_parser_set_scanner_error(parser, + "while scanning a simple key", parser.simple_keys[i].mark, + "could not find expected ':'") + } + // Remove the key from the stack. + parser.simple_keys[i].possible = false + delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) + } + return true +} + +// max_flow_level limits the flow_level +const max_flow_level = 10000 + +// Increase the flow level and resize the simple key list if needed. +func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { + // Reset the simple key on the next level. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ + possible: false, + required: false, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + }) + + // Increase the flow level. + parser.flow_level++ + if parser.flow_level > max_flow_level { + return yaml_parser_set_scanner_error(parser, + "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_flow_level)) + } + return true +} + +// Decrease the flow level. +func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { + if parser.flow_level > 0 { + parser.flow_level-- + last := len(parser.simple_keys) - 1 + delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) + parser.simple_keys = parser.simple_keys[:last] + } + return true +} + +// max_indents limits the indents stack size +const max_indents = 10000 + +// Push the current indentation level to the stack and set the new level +// the current column is greater than the indentation level. In this case, +// append or insert the specified token into the token queue. +func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + if parser.indent < column { + // Push the current indentation level to the stack and set the new + // indentation level. + parser.indents = append(parser.indents, parser.indent) + parser.indent = column + if len(parser.indents) > max_indents { + return yaml_parser_set_scanner_error(parser, + "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_indents)) + } + + // Create a token and insert it into the queue. + token := yaml_token_t{ + typ: typ, + start_mark: mark, + end_mark: mark, + } + if number > -1 { + number -= parser.tokens_parsed + } + yaml_insert_token(parser, number, &token) + } + return true +} + +// Pop indentation levels from the indents stack until the current level +// becomes less or equal to the column. For each indentation level, append +// the BLOCK-END token. +func yaml_parser_unroll_indent(parser *yaml_parser_t, column int, scan_mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + block_mark := scan_mark + block_mark.index-- + + // Loop through the indentation levels in the stack. + for parser.indent > column { + + // [Go] Reposition the end token before potential following + // foot comments of parent blocks. For that, search + // backwards for recent comments that were at the same + // indent as the block that is ending now. + stop_index := block_mark.index + for i := len(parser.comments) - 1; i >= 0; i-- { + comment := &parser.comments[i] + + if comment.end_mark.index < stop_index { + // Don't go back beyond the start of the comment/whitespace scan, unless column < 0. + // If requested indent column is < 0, then the document is over and everything else + // is a foot anyway. + break + } + if comment.start_mark.column == parser.indent+1 { + // This is a good match. But maybe there's a former comment + // at that same indent level, so keep searching. + block_mark = comment.start_mark + } + + // While the end of the former comment matches with + // the start of the following one, we know there's + // nothing in between and scanning is still safe. + stop_index = comment.scan_mark.index + } + + // Create a token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_END_TOKEN, + start_mark: block_mark, + end_mark: block_mark, + } + yaml_insert_token(parser, -1, &token) + + // Pop the indentation level. + parser.indent = parser.indents[len(parser.indents)-1] + parser.indents = parser.indents[:len(parser.indents)-1] + } + return true +} + +// Initialize the scanner and produce the STREAM-START token. +func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { + + // Set the initial indentation. + parser.indent = -1 + + // Initialize the simple key stack. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) + + parser.simple_keys_by_tok = make(map[int]int) + + // A simple key is allowed at the beginning of the stream. + parser.simple_key_allowed = true + + // We have started. + parser.stream_start_produced = true + + // Create the STREAM-START token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_START_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + encoding: parser.encoding, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the STREAM-END token and shut down the scanner. +func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { + + // Force new line. + if parser.mark.column != 0 { + parser.mark.column = 0 + parser.mark.line++ + } + + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the STREAM-END token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. +func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. + token := yaml_token_t{} + if !yaml_parser_scan_directive(parser, &token) { + return false + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the DOCUMENT-START or DOCUMENT-END token. +func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Consume the token. + start_mark := parser.mark + + skip(parser) + skip(parser) + skip(parser) + + end_mark := parser.mark + + // Create the DOCUMENT-START or DOCUMENT-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. +func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { + + // The indicators '[' and '{' may start a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // Increase the flow level. + if !yaml_parser_increase_flow_level(parser) { + return false + } + + // A simple key may follow the indicators '[' and '{'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. +func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset any potential simple key on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Decrease the flow level. + if !yaml_parser_decrease_flow_level(parser) { + return false + } + + // No simple keys after the indicators ']' and '}'. + parser.simple_key_allowed = false + + // Consume the token. + + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-ENTRY token. +func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after ','. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_FLOW_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the BLOCK-ENTRY token. +func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { + // Check if the scanner is in the block context. + if parser.flow_level == 0 { + // Check if we are allowed to start a new entry. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "block sequence entries are not allowed in this context") + } + // Add the BLOCK-SEQUENCE-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { + return false + } + } else { + // It is an error for the '-' indicator to occur in the flow context, + // but we let the Parser detect and report about it because the Parser + // is able to point to the context. + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '-'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the BLOCK-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the KEY token. +func yaml_parser_fetch_key(parser *yaml_parser_t) bool { + + // In the block context, additional checks are required. + if parser.flow_level == 0 { + // Check if we are allowed to start a new key (not nessesary simple). + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping keys are not allowed in this context") + } + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '?' in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the KEY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the VALUE token. +func yaml_parser_fetch_value(parser *yaml_parser_t) bool { + + simple_key := &parser.simple_keys[len(parser.simple_keys)-1] + + // Have we found a simple key? + if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { + return false + + } else if valid { + + // Create the KEY token and insert it into the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: simple_key.mark, + end_mark: simple_key.mark, + } + yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) + + // In the block context, we may need to add the BLOCK-MAPPING-START token. + if !yaml_parser_roll_indent(parser, simple_key.mark.column, + simple_key.token_number, + yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { + return false + } + + // Remove the simple key. + simple_key.possible = false + delete(parser.simple_keys_by_tok, simple_key.token_number) + + // A simple key cannot follow another simple key. + parser.simple_key_allowed = false + + } else { + // The ':' indicator follows a complex key. + + // In the block context, extra checks are required. + if parser.flow_level == 0 { + + // Check if we are allowed to start a complex value. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping values are not allowed in this context") + } + + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Simple keys after ':' are allowed in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + } + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the VALUE token and append it to the queue. + token := yaml_token_t{ + typ: yaml_VALUE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the ALIAS or ANCHOR token. +func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // An anchor or an alias could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow an anchor or an alias. + parser.simple_key_allowed = false + + // Create the ALIAS or ANCHOR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_anchor(parser, &token, typ) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the TAG token. +func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { + // A tag could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a tag. + parser.simple_key_allowed = false + + // Create the TAG token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_tag(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. +func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { + // Remove any potential simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // A simple key may follow a block scalar. + parser.simple_key_allowed = true + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_block_scalar(parser, &token, literal) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. +func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_flow_scalar(parser, &token, single) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,plain) token. +func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_plain_scalar(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Eat whitespaces and comments until the next token is found. +func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { + + scan_mark := parser.mark + + // Until the next token is not found. + for { + // Allow the BOM mark to start a line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { + skip(parser) + } + + // Eat whitespaces. + // Tabs are allowed: + // - in the flow context + // - in the block context, but not at the beginning of the line or + // after '-', '?', or ':' (complex value). + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if we just had a line comment under a sequence entry that + // looks more like a header to the following content. Similar to this: + // + // - # The comment + // - Some data + // + // If so, transform the line comment to a head comment and reposition. + if len(parser.comments) > 0 && len(parser.tokens) > 1 { + tokenA := parser.tokens[len(parser.tokens)-2] + tokenB := parser.tokens[len(parser.tokens)-1] + comment := &parser.comments[len(parser.comments)-1] + if tokenA.typ == yaml_BLOCK_SEQUENCE_START_TOKEN && tokenB.typ == yaml_BLOCK_ENTRY_TOKEN && len(comment.line) > 0 && !is_break(parser.buffer, parser.buffer_pos) { + // If it was in the prior line, reposition so it becomes a + // header of the follow up token. Otherwise, keep it in place + // so it becomes a header of the former. + comment.head = comment.line + comment.line = nil + if comment.start_mark.line == parser.mark.line-1 { + comment.token_mark = parser.mark + } + } + } + + // Eat a comment until a line break. + if parser.buffer[parser.buffer_pos] == '#' { + if !yaml_parser_scan_comments(parser, scan_mark) { + return false + } + } + + // If it is a line break, eat it. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + + // In the block context, a new line may start a simple key. + if parser.flow_level == 0 { + parser.simple_key_allowed = true + } + } else { + break // We have found a token. + } + } + + return true +} + +// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. +// +// Scope: +// +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { + // Eat '%'. + start_mark := parser.mark + skip(parser) + + // Scan the directive name. + var name []byte + if !yaml_parser_scan_directive_name(parser, start_mark, &name) { + return false + } + + // Is it a YAML directive? + if bytes.Equal(name, []byte("YAML")) { + // Scan the VERSION directive value. + var major, minor int8 + if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { + return false + } + end_mark := parser.mark + + // Create a VERSION-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_VERSION_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + major: major, + minor: minor, + } + + // Is it a TAG directive? + } else if bytes.Equal(name, []byte("TAG")) { + // Scan the TAG directive value. + var handle, prefix []byte + if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { + return false + } + end_mark := parser.mark + + // Create a TAG-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_TAG_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + prefix: prefix, + } + + // Unknown directive. + } else { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unknown directive name") + return false + } + + // Eat the rest of the line including any comments. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + if parser.buffer[parser.buffer_pos] == '#' { + // [Go] Discard this inline comment for the time being. + //if !yaml_parser_scan_line_comment(parser, start_mark) { + // return false + //} + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + return true +} + +// Scan the directive name. +// +// Scope: +// +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ +func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { + // Consume the directive name. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + var s []byte + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the name is empty. + if len(s) == 0 { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "could not find expected directive name") + return false + } + + // Check for an blank character after the name. + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unexpected non-alphabetical character") + return false + } + *name = s + return true +} + +// Scan the value of VERSION-DIRECTIVE. +// +// Scope: +// +// %YAML 1.1 # a comment \n +// ^^^^^^ +func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the major version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { + return false + } + + // Eat '.'. + if parser.buffer[parser.buffer_pos] != '.' { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected digit or '.' character") + } + + skip(parser) + + // Consume the minor version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { + return false + } + return true +} + +const max_number_length = 2 + +// Scan the version number of VERSION-DIRECTIVE. +// +// Scope: +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ +func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { + + // Repeat while the next character is digit. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var value, length int8 + for is_digit(parser.buffer, parser.buffer_pos) { + // Check if the number is too long. + length++ + if length > max_number_length { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "found extremely long version number") + } + value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the number was present. + if length == 0 { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected version number") + } + *number = value + return true +} + +// Scan the value of a TAG-DIRECTIVE token. +// +// Scope: +// +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { + var handle_value, prefix_value []byte + + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a handle. + if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { + return false + } + + // Expect a whitespace. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blank(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace") + return false + } + + // Eat whitespaces. + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a prefix. + if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { + return false + } + + // Expect a whitespace or line break. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace or line break") + return false + } + + *handle = handle_value + *prefix = prefix_value + return true +} + +func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { + var s []byte + + // Eat the indicator character. + start_mark := parser.mark + skip(parser) + + // Consume the value. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + end_mark := parser.mark + + /* + * Check if length of the anchor is greater than 0 and it is followed by + * a whitespace character or one of the indicators: + * + * '?', ':', ',', ']', '}', '%', '@', '`'. + */ + + if len(s) == 0 || + !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || + parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '`') { + context := "while scanning an alias" + if typ == yaml_ANCHOR_TOKEN { + context = "while scanning an anchor" + } + yaml_parser_set_scanner_error(parser, context, start_mark, + "did not find expected alphabetic or numeric character") + return false + } + + // Create a token. + *token = yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + value: s, + } + + return true +} + +/* + * Scan a TAG token. + */ + +func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { + var handle, suffix []byte + + start_mark := parser.mark + + // Check if the tag is in the canonical form. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + if parser.buffer[parser.buffer_pos+1] == '<' { + // Keep the handle as '' + + // Eat '!<' + skip(parser) + skip(parser) + + // Consume the tag value. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + + // Check for '>' and eat it. + if parser.buffer[parser.buffer_pos] != '>' { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find the expected '>'") + return false + } + + skip(parser) + } else { + // The tag has either the '!suffix' or the '!handle!suffix' form. + + // First, try to scan a handle. + if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { + return false + } + + // Check if it is, indeed, handle. + if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { + // Scan the suffix now. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + } else { + // It wasn't a handle after all. Scan the rest of the tag. + if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { + return false + } + + // Set the handle to '!'. + handle = []byte{'!'} + + // A special case: the '!' tag. Set the handle to '' and the + // suffix to '!'. + if len(suffix) == 0 { + handle, suffix = suffix, handle + } + } + } + + // Check the character which ends the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find expected whitespace or line break") + return false + } + + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_TAG_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + suffix: suffix, + } + return true +} + +// Scan a tag handle. +func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { + // Check the initial '!' character. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] != '!' { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + + var s []byte + + // Copy the '!' character. + s = read(parser, s) + + // Copy all subsequent alphabetical and numerical characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the trailing character is '!' and copy it. + if parser.buffer[parser.buffer_pos] == '!' { + s = read(parser, s) + } else { + // It's either the '!' tag or not really a tag handle. If it's a %TAG + // directive, it's an error. If it's a tag token, it must be a part of URI. + if directive && string(s) != "!" { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + } + + *handle = s + return true +} + +// Scan a tag. +func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { + //size_t length = head ? strlen((char *)head) : 0 + var s []byte + hasTag := len(head) > 0 + + // Copy the head if needed. + // + // Note that we don't copy the leading '!' character. + if len(head) > 1 { + s = append(s, head[1:]...) + } + + // Scan the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // The set of characters that may appear in URI is as follows: + // + // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', + // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', + // '%'. + // [Go] TODO Convert this into more reasonable logic. + for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || + parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || + parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || + parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || + parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || + parser.buffer[parser.buffer_pos] == '%' { + // Check if it is a URI-escape sequence. + if parser.buffer[parser.buffer_pos] == '%' { + if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { + return false + } + } else { + s = read(parser, s) + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + hasTag = true + } + + if !hasTag { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected tag URI") + return false + } + *uri = s + return true +} + +// Decode an URI-escape sequence corresponding to a single UTF-8 character. +func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { + + // Decode the required number of characters. + w := 1024 + for w > 0 { + // Check for a URI-escaped octet. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + + if !(parser.buffer[parser.buffer_pos] == '%' && + is_hex(parser.buffer, parser.buffer_pos+1) && + is_hex(parser.buffer, parser.buffer_pos+2)) { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find URI escaped octet") + } + + // Get the octet. + octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) + + // If it is the leading octet, determine the length of the UTF-8 sequence. + if w == 1024 { + w = width(octet) + if w == 0 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect leading UTF-8 octet") + } + } else { + // Check if the trailing octet is correct. + if octet&0xC0 != 0x80 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect trailing UTF-8 octet") + } + } + + // Copy the octet and move the pointers. + *s = append(*s, octet) + skip(parser) + skip(parser) + skip(parser) + w-- + } + return true +} + +// Scan a block scalar. +func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { + // Eat the indicator '|' or '>'. + start_mark := parser.mark + skip(parser) + + // Scan the additional block scalar indicators. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check for a chomping indicator. + var chomping, increment int + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + // Set the chomping method and eat the indicator. + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + + // Check for an indentation indicator. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_digit(parser.buffer, parser.buffer_pos) { + // Check that the indentation is greater than 0. + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + + // Get the indentation level and eat the indicator. + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + } + + } else if is_digit(parser.buffer, parser.buffer_pos) { + // Do the same as above, but in the opposite order. + + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + } + } + + // Eat whitespaces and comments to the end of the line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.buffer[parser.buffer_pos] == '#' { + if !yaml_parser_scan_line_comment(parser, start_mark) { + return false + } + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + end_mark := parser.mark + + // Set the indentation level if it was specified. + var indent int + if increment > 0 { + if parser.indent >= 0 { + indent = parser.indent + increment + } else { + indent = increment + } + } + + // Scan the leading line breaks and determine the indentation level if needed. + var s, leading_break, trailing_breaks []byte + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + + // Scan the block scalar content. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var leading_blank, trailing_blank bool + for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { + // We are at the beginning of a non-empty line. + + // Is it a trailing whitespace? + trailing_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Check if we need to fold the leading line break. + if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { + // Do we need to join the lines by space? + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } + } else { + s = append(s, leading_break...) + } + leading_break = leading_break[:0] + + // Append the remaining line breaks. + s = append(s, trailing_breaks...) + trailing_breaks = trailing_breaks[:0] + + // Is it a leading whitespace? + leading_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Consume the current line. + for !is_breakz(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + leading_break = read_line(parser, leading_break) + + // Eat the following indentation spaces and line breaks. + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + } + + // Chomp the tail. + if chomping != -1 { + s = append(s, leading_break...) + } + if chomping == 1 { + s = append(s, trailing_breaks...) + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_LITERAL_SCALAR_STYLE, + } + if !literal { + token.style = yaml_FOLDED_SCALAR_STYLE + } + return true +} + +// Scan indentation spaces and line breaks for a block scalar. Determine the +// indentation level if needed. +func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { + *end_mark = parser.mark + + // Eat the indentation spaces and line breaks. + max_indent := 0 + for { + // Eat the indentation spaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.mark.column > max_indent { + max_indent = parser.mark.column + } + + // Check for a tab character messing the indentation. + if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { + return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found a tab character where an indentation space is expected") + } + + // Have we found a non-empty line? + if !is_break(parser.buffer, parser.buffer_pos) { + break + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + // [Go] Should really be returning breaks instead. + *breaks = read_line(parser, *breaks) + *end_mark = parser.mark + } + + // Determine the indentation level if needed. + if *indent == 0 { + *indent = max_indent + if *indent < parser.indent+1 { + *indent = parser.indent + 1 + } + if *indent < 1 { + *indent = 1 + } + } + return true +} + +// Scan a quoted scalar. +func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { + // Eat the left quote. + start_mark := parser.mark + skip(parser) + + // Consume the content of the quoted scalar. + var s, leading_break, trailing_breaks, whitespaces []byte + for { + // Check that there are no document indicators at the beginning of the line. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected document indicator") + return false + } + + // Check for EOF. + if is_z(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected end of stream") + return false + } + + // Consume non-blank characters. + leading_blanks := false + for !is_blankz(parser.buffer, parser.buffer_pos) { + if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { + // Is is an escaped single quote. + s = append(s, '\'') + skip(parser) + skip(parser) + + } else if single && parser.buffer[parser.buffer_pos] == '\'' { + // It is a right single quote. + break + } else if !single && parser.buffer[parser.buffer_pos] == '"' { + // It is a right double quote. + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { + // It is an escaped line break. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + skip(parser) + skip_line(parser) + leading_blanks = true + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' { + // It is an escape sequence. + code_length := 0 + + // Check the escape character. + switch parser.buffer[parser.buffer_pos+1] { + case '0': + s = append(s, 0) + case 'a': + s = append(s, '\x07') + case 'b': + s = append(s, '\x08') + case 't', '\t': + s = append(s, '\x09') + case 'n': + s = append(s, '\x0A') + case 'v': + s = append(s, '\x0B') + case 'f': + s = append(s, '\x0C') + case 'r': + s = append(s, '\x0D') + case 'e': + s = append(s, '\x1B') + case ' ': + s = append(s, '\x20') + case '"': + s = append(s, '"') + case '\'': + s = append(s, '\'') + case '\\': + s = append(s, '\\') + case 'N': // NEL (#x85) + s = append(s, '\xC2') + s = append(s, '\x85') + case '_': // #xA0 + s = append(s, '\xC2') + s = append(s, '\xA0') + case 'L': // LS (#x2028) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA8') + case 'P': // PS (#x2029) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA9') + case 'x': + code_length = 2 + case 'u': + code_length = 4 + case 'U': + code_length = 8 + default: + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found unknown escape character") + return false + } + + skip(parser) + skip(parser) + + // Consume an arbitrary escape code. + if code_length > 0 { + var value int + + // Scan the character value. + if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { + return false + } + for k := 0; k < code_length; k++ { + if !is_hex(parser.buffer, parser.buffer_pos+k) { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "did not find expected hexdecimal number") + return false + } + value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) + } + + // Check the value and write the character. + if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found invalid Unicode character escape code") + return false + } + if value <= 0x7F { + s = append(s, byte(value)) + } else if value <= 0x7FF { + s = append(s, byte(0xC0+(value>>6))) + s = append(s, byte(0x80+(value&0x3F))) + } else if value <= 0xFFFF { + s = append(s, byte(0xE0+(value>>12))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } else { + s = append(s, byte(0xF0+(value>>18))) + s = append(s, byte(0x80+((value>>12)&0x3F))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } + + // Advance the pointer. + for k := 0; k < code_length; k++ { + skip(parser) + } + } + } else { + // It is a non-escaped non-blank character. + s = read(parser, s) + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we are at the end of the scalar. + if single { + if parser.buffer[parser.buffer_pos] == '\'' { + break + } + } else { + if parser.buffer[parser.buffer_pos] == '"' { + break + } + } + + // Consume blank characters. + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Join the whitespaces or fold line breaks. + if leading_blanks { + // Do we need to fold line breaks? + if len(leading_break) > 0 && leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Eat the right quote. + skip(parser) + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_SINGLE_QUOTED_SCALAR_STYLE, + } + if !single { + token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + return true +} + +// Scan a plain scalar. +func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { + + var s, leading_break, trailing_breaks, whitespaces []byte + var leading_blanks bool + var indent = parser.indent + 1 + + start_mark := parser.mark + end_mark := parser.mark + + // Consume the content of the plain scalar. + for { + // Check for a document indicator. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + break + } + + // Check for a comment. + if parser.buffer[parser.buffer_pos] == '#' { + break + } + + // Consume non-blank characters. + for !is_blankz(parser.buffer, parser.buffer_pos) { + + // Check for indicators that may end a plain scalar. + if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level > 0 && + (parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}')) { + break + } + + // Check if we need to join whitespaces and breaks. + if leading_blanks || len(whitespaces) > 0 { + if leading_blanks { + // Do we need to fold line breaks? + if leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + leading_blanks = false + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Copy the character. + s = read(parser, s) + + end_mark = parser.mark + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + // Is it the end? + if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { + break + } + + // Consume blank characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + + // Check for tab characters that abuse indentation. + if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", + start_mark, "found a tab character that violates indentation") + return false + } + + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check indentation level. + if parser.flow_level == 0 && parser.mark.column < indent { + break + } + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_PLAIN_SCALAR_STYLE, + } + + // Note that we change the 'simple_key_allowed' flag. + if leading_blanks { + parser.simple_key_allowed = true + } + return true +} + +func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t) bool { + if parser.newlines > 0 { + return true + } + + var start_mark yaml_mark_t + var text []byte + + for peek := 0; peek < 512; peek++ { + if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { + break + } + if is_blank(parser.buffer, parser.buffer_pos+peek) { + continue + } + if parser.buffer[parser.buffer_pos+peek] == '#' { + seen := parser.mark.index + peek + for { + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_breakz(parser.buffer, parser.buffer_pos) { + if parser.mark.index >= seen { + break + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } else if parser.mark.index >= seen { + if len(text) == 0 { + start_mark = parser.mark + } + text = read(parser, text) + } else { + skip(parser) + } + } + } + break + } + if len(text) > 0 { + parser.comments = append(parser.comments, yaml_comment_t{ + token_mark: token_mark, + start_mark: start_mark, + line: text, + }) + } + return true +} + +func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) bool { + token := parser.tokens[len(parser.tokens)-1] + + if token.typ == yaml_FLOW_ENTRY_TOKEN && len(parser.tokens) > 1 { + token = parser.tokens[len(parser.tokens)-2] + } + + var token_mark = token.start_mark + var start_mark yaml_mark_t + var next_indent = parser.indent + if next_indent < 0 { + next_indent = 0 + } + + var recent_empty = false + var first_empty = parser.newlines <= 1 + + var line = parser.mark.line + var column = parser.mark.column + + var text []byte + + // The foot line is the place where a comment must start to + // still be considered as a foot of the prior content. + // If there's some content in the currently parsed line, then + // the foot is the line below it. + var foot_line = -1 + if scan_mark.line > 0 { + foot_line = parser.mark.line - parser.newlines + 1 + if parser.newlines == 0 && parser.mark.column > 1 { + foot_line++ + } + } + + var peek = 0 + for ; peek < 512; peek++ { + if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { + break + } + column++ + if is_blank(parser.buffer, parser.buffer_pos+peek) { + continue + } + c := parser.buffer[parser.buffer_pos+peek] + var close_flow = parser.flow_level > 0 && (c == ']' || c == '}') + if close_flow || is_breakz(parser.buffer, parser.buffer_pos+peek) { + // Got line break or terminator. + if close_flow || !recent_empty { + if close_flow || first_empty && (start_mark.line == foot_line && token.typ != yaml_VALUE_TOKEN || start_mark.column-1 < next_indent) { + // This is the first empty line and there were no empty lines before, + // so this initial part of the comment is a foot of the prior token + // instead of being a head for the following one. Split it up. + // Alternatively, this might also be the last comment inside a flow + // scope, so it must be a footer. + if len(text) > 0 { + if start_mark.column-1 < next_indent { + // If dedented it's unrelated to the prior token. + token_mark = start_mark + } + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: token_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, + foot: text, + }) + scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} + token_mark = scan_mark + text = nil + } + } else { + if len(text) > 0 && parser.buffer[parser.buffer_pos+peek] != 0 { + text = append(text, '\n') + } + } + } + if !is_break(parser.buffer, parser.buffer_pos+peek) { + break + } + first_empty = false + recent_empty = true + column = 0 + line++ + continue + } + + if len(text) > 0 && (close_flow || column-1 < next_indent && column != start_mark.column) { + // The comment at the different indentation is a foot of the + // preceding data rather than a head of the upcoming one. + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: token_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, + foot: text, + }) + scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} + token_mark = scan_mark + text = nil + } + + if parser.buffer[parser.buffer_pos+peek] != '#' { + break + } + + if len(text) == 0 { + start_mark = yaml_mark_t{parser.mark.index + peek, line, column} + } else { + text = append(text, '\n') + } + + recent_empty = false + + // Consume until after the consumed comment line. + seen := parser.mark.index + peek + for { + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_breakz(parser.buffer, parser.buffer_pos) { + if parser.mark.index >= seen { + break + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } else if parser.mark.index >= seen { + text = read(parser, text) + } else { + skip(parser) + } + } + + peek = 0 + column = 0 + line = parser.mark.line + next_indent = parser.indent + if next_indent < 0 { + next_indent = 0 + } + } + + if len(text) > 0 { + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: start_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek - 1, line, column}, + head: text, + }) + } + return true +} diff --git a/vendor/go.yaml.in/yaml/v3/sorter.go b/vendor/go.yaml.in/yaml/v3/sorter.go new file mode 100644 index 000000000..9210ece7e --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/sorter.go @@ -0,0 +1,134 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yaml + +import ( + "reflect" + "unicode" +) + +type keyList []reflect.Value + +func (l keyList) Len() int { return len(l) } +func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l keyList) Less(i, j int) bool { + a := l[i] + b := l[j] + ak := a.Kind() + bk := b.Kind() + for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { + a = a.Elem() + ak = a.Kind() + } + for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { + b = b.Elem() + bk = b.Kind() + } + af, aok := keyFloat(a) + bf, bok := keyFloat(b) + if aok && bok { + if af != bf { + return af < bf + } + if ak != bk { + return ak < bk + } + return numLess(a, b) + } + if ak != reflect.String || bk != reflect.String { + return ak < bk + } + ar, br := []rune(a.String()), []rune(b.String()) + digits := false + for i := 0; i < len(ar) && i < len(br); i++ { + if ar[i] == br[i] { + digits = unicode.IsDigit(ar[i]) + continue + } + al := unicode.IsLetter(ar[i]) + bl := unicode.IsLetter(br[i]) + if al && bl { + return ar[i] < br[i] + } + if al || bl { + if digits { + return al + } else { + return bl + } + } + var ai, bi int + var an, bn int64 + if ar[i] == '0' || br[i] == '0' { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + if ar[j] != '0' { + an = 1 + bn = 1 + break + } + } + } + for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { + an = an*10 + int64(ar[ai]-'0') + } + for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { + bn = bn*10 + int64(br[bi]-'0') + } + if an != bn { + return an < bn + } + if ai != bi { + return ai < bi + } + return ar[i] < br[i] + } + return len(ar) < len(br) +} + +// keyFloat returns a float value for v if it is a number/bool +// and whether it is a number/bool or not. +func keyFloat(v reflect.Value) (f float64, ok bool) { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return float64(v.Int()), true + case reflect.Float32, reflect.Float64: + return v.Float(), true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return float64(v.Uint()), true + case reflect.Bool: + if v.Bool() { + return 1, true + } + return 0, true + } + return 0, false +} + +// numLess returns whether a < b. +// a and b must necessarily have the same kind. +func numLess(a, b reflect.Value) bool { + switch a.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return a.Int() < b.Int() + case reflect.Float32, reflect.Float64: + return a.Float() < b.Float() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return a.Uint() < b.Uint() + case reflect.Bool: + return !a.Bool() && b.Bool() + } + panic("not a number") +} diff --git a/vendor/go.yaml.in/yaml/v3/writerc.go b/vendor/go.yaml.in/yaml/v3/writerc.go new file mode 100644 index 000000000..266d0b092 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/writerc.go @@ -0,0 +1,48 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +// Set the writer error and return false. +func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_WRITER_ERROR + emitter.problem = problem + return false +} + +// Flush the output buffer. +func yaml_emitter_flush(emitter *yaml_emitter_t) bool { + if emitter.write_handler == nil { + panic("write handler not set") + } + + // Check if the buffer is empty. + if emitter.buffer_pos == 0 { + return true + } + + if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { + return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) + } + emitter.buffer_pos = 0 + return true +} diff --git a/vendor/go.yaml.in/yaml/v3/yaml.go b/vendor/go.yaml.in/yaml/v3/yaml.go new file mode 100644 index 000000000..0b101cd20 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/yaml.go @@ -0,0 +1,703 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package yaml implements YAML support for the Go language. +// +// Source code and other details for the project are available at GitHub: +// +// https://github.com/yaml/go-yaml +package yaml + +import ( + "errors" + "fmt" + "io" + "reflect" + "strings" + "sync" + "unicode/utf8" +) + +// The Unmarshaler interface may be implemented by types to customize their +// behavior when being unmarshaled from a YAML document. +type Unmarshaler interface { + UnmarshalYAML(value *Node) error +} + +type obsoleteUnmarshaler interface { + UnmarshalYAML(unmarshal func(interface{}) error) error +} + +// The Marshaler interface may be implemented by types to customize their +// behavior when being marshaled into a YAML document. The returned value +// is marshaled in place of the original value implementing Marshaler. +// +// If an error is returned by MarshalYAML, the marshaling procedure stops +// and returns with the provided error. +type Marshaler interface { + MarshalYAML() (interface{}, error) +} + +// Unmarshal decodes the first document found within the in byte slice +// and assigns decoded values into the out value. +// +// Maps and pointers (to a struct, string, int, etc) are accepted as out +// values. If an internal pointer within a struct is not initialized, +// the yaml package will initialize it if necessary for unmarshalling +// the provided data. The out parameter must not be nil. +// +// The type of the decoded values should be compatible with the respective +// values in out. If one or more values cannot be decoded due to a type +// mismatches, decoding continues partially until the end of the YAML +// content, and a *yaml.TypeError is returned with details for all +// missed values. +// +// Struct fields are only unmarshalled if they are exported (have an +// upper case first letter), and are unmarshalled using the field name +// lowercased as the default key. Custom keys may be defined via the +// "yaml" name in the field tag: the content preceding the first comma +// is used as the key, and the following comma-separated options are +// used to tweak the marshalling process (see Marshal). +// Conflicting names result in a runtime error. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// +// See the documentation of Marshal for the format of tags and a list of +// supported tag options. +func Unmarshal(in []byte, out interface{}) (err error) { + return unmarshal(in, out, false) +} + +// A Decoder reads and decodes YAML values from an input stream. +type Decoder struct { + parser *parser + knownFields bool +} + +// NewDecoder returns a new decoder that reads from r. +// +// The decoder introduces its own buffering and may read +// data from r beyond the YAML values requested. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{ + parser: newParserFromReader(r), + } +} + +// KnownFields ensures that the keys in decoded mappings to +// exist as fields in the struct being decoded into. +func (dec *Decoder) KnownFields(enable bool) { + dec.knownFields = enable +} + +// Decode reads the next YAML-encoded value from its input +// and stores it in the value pointed to by v. +// +// See the documentation for Unmarshal for details about the +// conversion of YAML into a Go value. +func (dec *Decoder) Decode(v interface{}) (err error) { + d := newDecoder() + d.knownFields = dec.knownFields + defer handleErr(&err) + node := dec.parser.parse() + if node == nil { + return io.EOF + } + out := reflect.ValueOf(v) + if out.Kind() == reflect.Ptr && !out.IsNil() { + out = out.Elem() + } + d.unmarshal(node, out) + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Decode decodes the node and stores its data into the value pointed to by v. +// +// See the documentation for Unmarshal for details about the +// conversion of YAML into a Go value. +func (n *Node) Decode(v interface{}) (err error) { + d := newDecoder() + defer handleErr(&err) + out := reflect.ValueOf(v) + if out.Kind() == reflect.Ptr && !out.IsNil() { + out = out.Elem() + } + d.unmarshal(n, out) + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +func unmarshal(in []byte, out interface{}, strict bool) (err error) { + defer handleErr(&err) + d := newDecoder() + p := newParser(in) + defer p.destroy() + node := p.parse() + if node != nil { + v := reflect.ValueOf(out) + if v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + d.unmarshal(node, v) + } + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Marshal serializes the value provided into a YAML document. The structure +// of the generated document will reflect the structure of the value itself. +// Maps and pointers (to struct, string, int, etc) are accepted as the in value. +// +// Struct fields are only marshalled if they are exported (have an upper case +// first letter), and are marshalled using the field name lowercased as the +// default key. Custom keys may be defined via the "yaml" name in the field +// tag: the content preceding the first comma is used as the key, and the +// following comma-separated options are used to tweak the marshalling process. +// Conflicting names result in a runtime error. +// +// The field tag format accepted is: +// +// `(...) yaml:"[][,[,]]" (...)` +// +// The following flags are currently supported: +// +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. +// +// flow Marshal using a flow style (useful for structs, +// sequences and maps). +// +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. +// +// In addition, if the key is "-", the field is ignored. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" +func Marshal(in interface{}) (out []byte, err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(in)) + e.finish() + out = e.out + return +} + +// An Encoder writes YAML values to an output stream. +type Encoder struct { + encoder *encoder +} + +// NewEncoder returns a new encoder that writes to w. +// The Encoder should be closed after use to flush all data +// to w. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + encoder: newEncoderWithWriter(w), + } +} + +// Encode writes the YAML encoding of v to the stream. +// If multiple items are encoded to the stream, the +// second and subsequent document will be preceded +// with a "---" document separator, but the first will not. +// +// See the documentation for Marshal for details about the conversion of Go +// values to YAML. +func (e *Encoder) Encode(v interface{}) (err error) { + defer handleErr(&err) + e.encoder.marshalDoc("", reflect.ValueOf(v)) + return nil +} + +// Encode encodes value v and stores its representation in n. +// +// See the documentation for Marshal for details about the +// conversion of Go values into YAML. +func (n *Node) Encode(v interface{}) (err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(v)) + e.finish() + p := newParser(e.out) + p.textless = true + defer p.destroy() + doc := p.parse() + *n = *doc.Content[0] + return nil +} + +// SetIndent changes the used indentation used when encoding. +func (e *Encoder) SetIndent(spaces int) { + if spaces < 0 { + panic("yaml: cannot indent to a negative number of spaces") + } + e.encoder.indent = spaces +} + +// CompactSeqIndent makes it so that '- ' is considered part of the indentation. +func (e *Encoder) CompactSeqIndent() { + e.encoder.emitter.compact_sequence_indent = true +} + +// DefaultSeqIndent makes it so that '- ' is not considered part of the indentation. +func (e *Encoder) DefaultSeqIndent() { + e.encoder.emitter.compact_sequence_indent = false +} + +// Close closes the encoder by writing any remaining data. +// It does not write a stream terminating string "...". +func (e *Encoder) Close() (err error) { + defer handleErr(&err) + e.encoder.finish() + return nil +} + +func handleErr(err *error) { + if v := recover(); v != nil { + if e, ok := v.(yamlError); ok { + *err = e.err + } else { + panic(v) + } + } +} + +type yamlError struct { + err error +} + +func fail(err error) { + panic(yamlError{err}) +} + +func failf(format string, args ...interface{}) { + panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) +} + +// A TypeError is returned by Unmarshal when one or more fields in +// the YAML document cannot be properly decoded into the requested +// types. When this error is returned, the value is still +// unmarshaled partially. +type TypeError struct { + Errors []string +} + +func (e *TypeError) Error() string { + return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) +} + +type Kind uint32 + +const ( + DocumentNode Kind = 1 << iota + SequenceNode + MappingNode + ScalarNode + AliasNode +) + +type Style uint32 + +const ( + TaggedStyle Style = 1 << iota + DoubleQuotedStyle + SingleQuotedStyle + LiteralStyle + FoldedStyle + FlowStyle +) + +// Node represents an element in the YAML document hierarchy. While documents +// are typically encoded and decoded into higher level types, such as structs +// and maps, Node is an intermediate representation that allows detailed +// control over the content being decoded or encoded. +// +// It's worth noting that although Node offers access into details such as +// line numbers, colums, and comments, the content when re-encoded will not +// have its original textual representation preserved. An effort is made to +// render the data plesantly, and to preserve comments near the data they +// describe, though. +// +// Values that make use of the Node type interact with the yaml package in the +// same way any other type would do, by encoding and decoding yaml data +// directly or indirectly into them. +// +// For example: +// +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) +// +// Or by itself: +// +// var person Node +// err := yaml.Unmarshal(data, &person) +type Node struct { + // Kind defines whether the node is a document, a mapping, a sequence, + // a scalar value, or an alias to another node. The specific data type of + // scalar nodes may be obtained via the ShortTag and LongTag methods. + Kind Kind + + // Style allows customizing the apperance of the node in the tree. + Style Style + + // Tag holds the YAML tag defining the data type for the value. + // When decoding, this field will always be set to the resolved tag, + // even when it wasn't explicitly provided in the YAML content. + // When encoding, if this field is unset the value type will be + // implied from the node properties, and if it is set, it will only + // be serialized into the representation if TaggedStyle is used or + // the implicit tag diverges from the provided one. + Tag string + + // Value holds the unescaped and unquoted represenation of the value. + Value string + + // Anchor holds the anchor name for this node, which allows aliases to point to it. + Anchor string + + // Alias holds the node that this alias points to. Only valid when Kind is AliasNode. + Alias *Node + + // Content holds contained nodes for documents, mappings, and sequences. + Content []*Node + + // HeadComment holds any comments in the lines preceding the node and + // not separated by an empty line. + HeadComment string + + // LineComment holds any comments at the end of the line where the node is in. + LineComment string + + // FootComment holds any comments following the node and before empty lines. + FootComment string + + // Line and Column hold the node position in the decoded YAML text. + // These fields are not respected when encoding the node. + Line int + Column int +} + +// IsZero returns whether the node has all of its fields unset. +func (n *Node) IsZero() bool { + return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && + n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 +} + +// LongTag returns the long form of the tag that indicates the data type for +// the node. If the Tag field isn't explicitly defined, one will be computed +// based on the node properties. +func (n *Node) LongTag() string { + return longTag(n.ShortTag()) +} + +// ShortTag returns the short form of the YAML tag that indicates data type for +// the node. If the Tag field isn't explicitly defined, one will be computed +// based on the node properties. +func (n *Node) ShortTag() string { + if n.indicatedString() { + return strTag + } + if n.Tag == "" || n.Tag == "!" { + switch n.Kind { + case MappingNode: + return mapTag + case SequenceNode: + return seqTag + case AliasNode: + if n.Alias != nil { + return n.Alias.ShortTag() + } + case ScalarNode: + tag, _ := resolve("", n.Value) + return tag + case 0: + // Special case to make the zero value convenient. + if n.IsZero() { + return nullTag + } + } + return "" + } + return shortTag(n.Tag) +} + +func (n *Node) indicatedString() bool { + return n.Kind == ScalarNode && + (shortTag(n.Tag) == strTag || + (n.Tag == "" || n.Tag == "!") && n.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0) +} + +// SetString is a convenience function that sets the node to a string value +// and defines its style in a pleasant way depending on its content. +func (n *Node) SetString(s string) { + n.Kind = ScalarNode + if utf8.ValidString(s) { + n.Value = s + n.Tag = strTag + } else { + n.Value = encodeBase64(s) + n.Tag = binaryTag + } + if strings.Contains(n.Value, "\n") { + n.Style = LiteralStyle + } +} + +// -------------------------------------------------------------------------- +// Maintain a mapping of keys to structure field indexes + +// The code in this section was copied from mgo/bson. + +// structInfo holds details for the serialization of fields of +// a given struct. +type structInfo struct { + FieldsMap map[string]fieldInfo + FieldsList []fieldInfo + + // InlineMap is the number of the field in the struct that + // contains an ,inline map, or -1 if there's none. + InlineMap int + + // InlineUnmarshalers holds indexes to inlined fields that + // contain unmarshaler values. + InlineUnmarshalers [][]int +} + +type fieldInfo struct { + Key string + Num int + OmitEmpty bool + Flow bool + // Id holds the unique field identifier, so we can cheaply + // check for field duplicates without maintaining an extra map. + Id int + + // Inline holds the field index if the field is part of an inlined struct. + Inline []int +} + +var structMap = make(map[reflect.Type]*structInfo) +var fieldMapMutex sync.RWMutex +var unmarshalerType reflect.Type + +func init() { + var v Unmarshaler + unmarshalerType = reflect.ValueOf(&v).Elem().Type() +} + +func getStructInfo(st reflect.Type) (*structInfo, error) { + fieldMapMutex.RLock() + sinfo, found := structMap[st] + fieldMapMutex.RUnlock() + if found { + return sinfo, nil + } + + n := st.NumField() + fieldsMap := make(map[string]fieldInfo) + fieldsList := make([]fieldInfo, 0, n) + inlineMap := -1 + inlineUnmarshalers := [][]int(nil) + for i := 0; i != n; i++ { + field := st.Field(i) + if field.PkgPath != "" && !field.Anonymous { + continue // Private field + } + + info := fieldInfo{Num: i} + + tag := field.Tag.Get("yaml") + if tag == "" && strings.Index(string(field.Tag), ":") < 0 { + tag = string(field.Tag) + } + if tag == "-" { + continue + } + + inline := false + fields := strings.Split(tag, ",") + if len(fields) > 1 { + for _, flag := range fields[1:] { + switch flag { + case "omitempty": + info.OmitEmpty = true + case "flow": + info.Flow = true + case "inline": + inline = true + default: + return nil, errors.New(fmt.Sprintf("unsupported flag %q in tag %q of type %s", flag, tag, st)) + } + } + tag = fields[0] + } + + if inline { + switch field.Type.Kind() { + case reflect.Map: + if inlineMap >= 0 { + return nil, errors.New("multiple ,inline maps in struct " + st.String()) + } + if field.Type.Key() != reflect.TypeOf("") { + return nil, errors.New("option ,inline needs a map with string keys in struct " + st.String()) + } + inlineMap = info.Num + case reflect.Struct, reflect.Ptr: + ftype := field.Type + for ftype.Kind() == reflect.Ptr { + ftype = ftype.Elem() + } + if ftype.Kind() != reflect.Struct { + return nil, errors.New("option ,inline may only be used on a struct or map field") + } + if reflect.PtrTo(ftype).Implements(unmarshalerType) { + inlineUnmarshalers = append(inlineUnmarshalers, []int{i}) + } else { + sinfo, err := getStructInfo(ftype) + if err != nil { + return nil, err + } + for _, index := range sinfo.InlineUnmarshalers { + inlineUnmarshalers = append(inlineUnmarshalers, append([]int{i}, index...)) + } + for _, finfo := range sinfo.FieldsList { + if _, found := fieldsMap[finfo.Key]; found { + msg := "duplicated key '" + finfo.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + if finfo.Inline == nil { + finfo.Inline = []int{i, finfo.Num} + } else { + finfo.Inline = append([]int{i}, finfo.Inline...) + } + finfo.Id = len(fieldsList) + fieldsMap[finfo.Key] = finfo + fieldsList = append(fieldsList, finfo) + } + } + default: + return nil, errors.New("option ,inline may only be used on a struct or map field") + } + continue + } + + if tag != "" { + info.Key = tag + } else { + info.Key = strings.ToLower(field.Name) + } + + if _, found = fieldsMap[info.Key]; found { + msg := "duplicated key '" + info.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + + info.Id = len(fieldsList) + fieldsList = append(fieldsList, info) + fieldsMap[info.Key] = info + } + + sinfo = &structInfo{ + FieldsMap: fieldsMap, + FieldsList: fieldsList, + InlineMap: inlineMap, + InlineUnmarshalers: inlineUnmarshalers, + } + + fieldMapMutex.Lock() + structMap[st] = sinfo + fieldMapMutex.Unlock() + return sinfo, nil +} + +// IsZeroer is used to check whether an object is zero to +// determine whether it should be omitted when marshaling +// with the omitempty flag. One notable implementation +// is time.Time. +type IsZeroer interface { + IsZero() bool +} + +func isZero(v reflect.Value) bool { + kind := v.Kind() + if z, ok := v.Interface().(IsZeroer); ok { + if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { + return true + } + return z.IsZero() + } + switch kind { + case reflect.String: + return len(v.String()) == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Slice: + return v.Len() == 0 + case reflect.Map: + return v.Len() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Struct: + vt := v.Type() + for i := v.NumField() - 1; i >= 0; i-- { + if vt.Field(i).PkgPath != "" { + continue // Private field + } + if !isZero(v.Field(i)) { + return false + } + } + return true + } + return false +} diff --git a/vendor/go.yaml.in/yaml/v3/yamlh.go b/vendor/go.yaml.in/yaml/v3/yamlh.go new file mode 100644 index 000000000..f59aa40f6 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/yamlh.go @@ -0,0 +1,811 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "fmt" + "io" +) + +// The version directive data. +type yaml_version_directive_t struct { + major int8 // The major version number. + minor int8 // The minor version number. +} + +// The tag directive data. +type yaml_tag_directive_t struct { + handle []byte // The tag handle. + prefix []byte // The tag prefix. +} + +type yaml_encoding_t int + +// The stream encoding. +const ( + // Let the parser choose the encoding. + yaml_ANY_ENCODING yaml_encoding_t = iota + + yaml_UTF8_ENCODING // The default UTF-8 encoding. + yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. + yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. +) + +type yaml_break_t int + +// Line break types. +const ( + // Let the parser choose the break type. + yaml_ANY_BREAK yaml_break_t = iota + + yaml_CR_BREAK // Use CR for line breaks (Mac style). + yaml_LN_BREAK // Use LN for line breaks (Unix style). + yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). +) + +type yaml_error_type_t int + +// Many bad things could happen with the parser and emitter. +const ( + // No error is produced. + yaml_NO_ERROR yaml_error_type_t = iota + + yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. + yaml_READER_ERROR // Cannot read or decode the input stream. + yaml_SCANNER_ERROR // Cannot scan the input stream. + yaml_PARSER_ERROR // Cannot parse the input stream. + yaml_COMPOSER_ERROR // Cannot compose a YAML document. + yaml_WRITER_ERROR // Cannot write to the output stream. + yaml_EMITTER_ERROR // Cannot emit a YAML stream. +) + +// The pointer position. +type yaml_mark_t struct { + index int // The position index. + line int // The position line. + column int // The position column. +} + +// Node Styles + +type yaml_style_t int8 + +type yaml_scalar_style_t yaml_style_t + +// Scalar styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = 0 + + yaml_PLAIN_SCALAR_STYLE yaml_scalar_style_t = 1 << iota // The plain scalar style. + yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. + yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. + yaml_LITERAL_SCALAR_STYLE // The literal scalar style. + yaml_FOLDED_SCALAR_STYLE // The folded scalar style. +) + +type yaml_sequence_style_t yaml_style_t + +// Sequence styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota + + yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. + yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. +) + +type yaml_mapping_style_t yaml_style_t + +// Mapping styles. +const ( + // Let the emitter choose the style. + yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota + + yaml_BLOCK_MAPPING_STYLE // The block mapping style. + yaml_FLOW_MAPPING_STYLE // The flow mapping style. +) + +// Tokens + +type yaml_token_type_t int + +// Token types. +const ( + // An empty token. + yaml_NO_TOKEN yaml_token_type_t = iota + + yaml_STREAM_START_TOKEN // A STREAM-START token. + yaml_STREAM_END_TOKEN // A STREAM-END token. + + yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. + yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. + yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. + yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. + + yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. + yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. + yaml_BLOCK_END_TOKEN // A BLOCK-END token. + + yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. + yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. + yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. + yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. + + yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. + yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. + yaml_KEY_TOKEN // A KEY token. + yaml_VALUE_TOKEN // A VALUE token. + + yaml_ALIAS_TOKEN // An ALIAS token. + yaml_ANCHOR_TOKEN // An ANCHOR token. + yaml_TAG_TOKEN // A TAG token. + yaml_SCALAR_TOKEN // A SCALAR token. +) + +func (tt yaml_token_type_t) String() string { + switch tt { + case yaml_NO_TOKEN: + return "yaml_NO_TOKEN" + case yaml_STREAM_START_TOKEN: + return "yaml_STREAM_START_TOKEN" + case yaml_STREAM_END_TOKEN: + return "yaml_STREAM_END_TOKEN" + case yaml_VERSION_DIRECTIVE_TOKEN: + return "yaml_VERSION_DIRECTIVE_TOKEN" + case yaml_TAG_DIRECTIVE_TOKEN: + return "yaml_TAG_DIRECTIVE_TOKEN" + case yaml_DOCUMENT_START_TOKEN: + return "yaml_DOCUMENT_START_TOKEN" + case yaml_DOCUMENT_END_TOKEN: + return "yaml_DOCUMENT_END_TOKEN" + case yaml_BLOCK_SEQUENCE_START_TOKEN: + return "yaml_BLOCK_SEQUENCE_START_TOKEN" + case yaml_BLOCK_MAPPING_START_TOKEN: + return "yaml_BLOCK_MAPPING_START_TOKEN" + case yaml_BLOCK_END_TOKEN: + return "yaml_BLOCK_END_TOKEN" + case yaml_FLOW_SEQUENCE_START_TOKEN: + return "yaml_FLOW_SEQUENCE_START_TOKEN" + case yaml_FLOW_SEQUENCE_END_TOKEN: + return "yaml_FLOW_SEQUENCE_END_TOKEN" + case yaml_FLOW_MAPPING_START_TOKEN: + return "yaml_FLOW_MAPPING_START_TOKEN" + case yaml_FLOW_MAPPING_END_TOKEN: + return "yaml_FLOW_MAPPING_END_TOKEN" + case yaml_BLOCK_ENTRY_TOKEN: + return "yaml_BLOCK_ENTRY_TOKEN" + case yaml_FLOW_ENTRY_TOKEN: + return "yaml_FLOW_ENTRY_TOKEN" + case yaml_KEY_TOKEN: + return "yaml_KEY_TOKEN" + case yaml_VALUE_TOKEN: + return "yaml_VALUE_TOKEN" + case yaml_ALIAS_TOKEN: + return "yaml_ALIAS_TOKEN" + case yaml_ANCHOR_TOKEN: + return "yaml_ANCHOR_TOKEN" + case yaml_TAG_TOKEN: + return "yaml_TAG_TOKEN" + case yaml_SCALAR_TOKEN: + return "yaml_SCALAR_TOKEN" + } + return "" +} + +// The token structure. +type yaml_token_t struct { + // The token type. + typ yaml_token_type_t + + // The start/end of the token. + start_mark, end_mark yaml_mark_t + + // The stream encoding (for yaml_STREAM_START_TOKEN). + encoding yaml_encoding_t + + // The alias/anchor/scalar value or tag/tag directive handle + // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). + value []byte + + // The tag suffix (for yaml_TAG_TOKEN). + suffix []byte + + // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). + prefix []byte + + // The scalar style (for yaml_SCALAR_TOKEN). + style yaml_scalar_style_t + + // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). + major, minor int8 +} + +// Events + +type yaml_event_type_t int8 + +// Event types. +const ( + // An empty event. + yaml_NO_EVENT yaml_event_type_t = iota + + yaml_STREAM_START_EVENT // A STREAM-START event. + yaml_STREAM_END_EVENT // A STREAM-END event. + yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. + yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. + yaml_ALIAS_EVENT // An ALIAS event. + yaml_SCALAR_EVENT // A SCALAR event. + yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. + yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. + yaml_MAPPING_START_EVENT // A MAPPING-START event. + yaml_MAPPING_END_EVENT // A MAPPING-END event. + yaml_TAIL_COMMENT_EVENT +) + +var eventStrings = []string{ + yaml_NO_EVENT: "none", + yaml_STREAM_START_EVENT: "stream start", + yaml_STREAM_END_EVENT: "stream end", + yaml_DOCUMENT_START_EVENT: "document start", + yaml_DOCUMENT_END_EVENT: "document end", + yaml_ALIAS_EVENT: "alias", + yaml_SCALAR_EVENT: "scalar", + yaml_SEQUENCE_START_EVENT: "sequence start", + yaml_SEQUENCE_END_EVENT: "sequence end", + yaml_MAPPING_START_EVENT: "mapping start", + yaml_MAPPING_END_EVENT: "mapping end", + yaml_TAIL_COMMENT_EVENT: "tail comment", +} + +func (e yaml_event_type_t) String() string { + if e < 0 || int(e) >= len(eventStrings) { + return fmt.Sprintf("unknown event %d", e) + } + return eventStrings[e] +} + +// The event structure. +type yaml_event_t struct { + + // The event type. + typ yaml_event_type_t + + // The start and end of the event. + start_mark, end_mark yaml_mark_t + + // The document encoding (for yaml_STREAM_START_EVENT). + encoding yaml_encoding_t + + // The version directive (for yaml_DOCUMENT_START_EVENT). + version_directive *yaml_version_directive_t + + // The list of tag directives (for yaml_DOCUMENT_START_EVENT). + tag_directives []yaml_tag_directive_t + + // The comments + head_comment []byte + line_comment []byte + foot_comment []byte + tail_comment []byte + + // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). + anchor []byte + + // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + tag []byte + + // The scalar value (for yaml_SCALAR_EVENT). + value []byte + + // Is the document start/end indicator implicit, or the tag optional? + // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). + implicit bool + + // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). + quoted_implicit bool + + // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + style yaml_style_t +} + +func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } +func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } +func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } + +// Nodes + +const ( + yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. + yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. + yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. + yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. + yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. + yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. + + yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. + yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. + + // Not in original libyaml. + yaml_BINARY_TAG = "tag:yaml.org,2002:binary" + yaml_MERGE_TAG = "tag:yaml.org,2002:merge" + + yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. + yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. + yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. +) + +type yaml_node_type_t int + +// Node types. +const ( + // An empty node. + yaml_NO_NODE yaml_node_type_t = iota + + yaml_SCALAR_NODE // A scalar node. + yaml_SEQUENCE_NODE // A sequence node. + yaml_MAPPING_NODE // A mapping node. +) + +// An element of a sequence node. +type yaml_node_item_t int + +// An element of a mapping node. +type yaml_node_pair_t struct { + key int // The key of the element. + value int // The value of the element. +} + +// The node structure. +type yaml_node_t struct { + typ yaml_node_type_t // The node type. + tag []byte // The node tag. + + // The node data. + + // The scalar parameters (for yaml_SCALAR_NODE). + scalar struct { + value []byte // The scalar value. + length int // The length of the scalar value. + style yaml_scalar_style_t // The scalar style. + } + + // The sequence parameters (for YAML_SEQUENCE_NODE). + sequence struct { + items_data []yaml_node_item_t // The stack of sequence items. + style yaml_sequence_style_t // The sequence style. + } + + // The mapping parameters (for yaml_MAPPING_NODE). + mapping struct { + pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). + pairs_start *yaml_node_pair_t // The beginning of the stack. + pairs_end *yaml_node_pair_t // The end of the stack. + pairs_top *yaml_node_pair_t // The top of the stack. + style yaml_mapping_style_t // The mapping style. + } + + start_mark yaml_mark_t // The beginning of the node. + end_mark yaml_mark_t // The end of the node. + +} + +// The document structure. +type yaml_document_t struct { + + // The document nodes. + nodes []yaml_node_t + + // The version directive. + version_directive *yaml_version_directive_t + + // The list of tag directives. + tag_directives_data []yaml_tag_directive_t + tag_directives_start int // The beginning of the tag directives list. + tag_directives_end int // The end of the tag directives list. + + start_implicit int // Is the document start indicator implicit? + end_implicit int // Is the document end indicator implicit? + + // The start/end of the document. + start_mark, end_mark yaml_mark_t +} + +// The prototype of a read handler. +// +// The read handler is called when the parser needs to read more bytes from the +// source. The handler should write not more than size bytes to the buffer. +// The number of written bytes should be set to the size_read variable. +// +// [in,out] data A pointer to an application data specified by +// +// yaml_parser_set_input(). +// +// [out] buffer The buffer to write the data from the source. +// [in] size The size of the buffer. +// [out] size_read The actual number of bytes read from the source. +// +// On success, the handler should return 1. If the handler failed, +// the returned value should be 0. On EOF, the handler should set the +// size_read to 0 and return 1. +type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) + +// This structure holds information about a potential simple key. +type yaml_simple_key_t struct { + possible bool // Is a simple key possible? + required bool // Is a simple key required? + token_number int // The number of the token. + mark yaml_mark_t // The position mark. +} + +// The states of the parser. +type yaml_parser_state_t int + +const ( + yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota + + yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. + yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. + yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. + yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. + yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. + yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. + yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. + yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. + yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. + yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. + yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. + yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. + yaml_PARSE_END_STATE // Expect nothing. +) + +func (ps yaml_parser_state_t) String() string { + switch ps { + case yaml_PARSE_STREAM_START_STATE: + return "yaml_PARSE_STREAM_START_STATE" + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_START_STATE: + return "yaml_PARSE_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return "yaml_PARSE_DOCUMENT_CONTENT_STATE" + case yaml_PARSE_DOCUMENT_END_STATE: + return "yaml_PARSE_DOCUMENT_END_STATE" + case yaml_PARSE_BLOCK_NODE_STATE: + return "yaml_PARSE_BLOCK_NODE_STATE" + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" + case yaml_PARSE_FLOW_NODE_STATE: + return "yaml_PARSE_FLOW_NODE_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" + case yaml_PARSE_END_STATE: + return "yaml_PARSE_END_STATE" + } + return "" +} + +// This structure holds aliases data. +type yaml_alias_data_t struct { + anchor []byte // The anchor. + index int // The node id. + mark yaml_mark_t // The anchor mark. +} + +// The parser structure. +// +// All members are internal. Manage the structure using the +// yaml_parser_ family of functions. +type yaml_parser_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + + problem string // Error description. + + // The byte about which the problem occurred. + problem_offset int + problem_value int + problem_mark yaml_mark_t + + // The error context. + context string + context_mark yaml_mark_t + + // Reader stuff + + read_handler yaml_read_handler_t // Read handler. + + input_reader io.Reader // File input data. + input []byte // String input data. + input_pos int + + eof bool // EOF flag + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + unread int // The number of unread characters in the buffer. + + newlines int // The number of line breaks since last non-break/non-blank character + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The input encoding. + + offset int // The offset of the current position (in bytes). + mark yaml_mark_t // The mark of the current position. + + // Comments + + head_comment []byte // The current head comments + line_comment []byte // The current line comments + foot_comment []byte // The current foot comments + tail_comment []byte // Foot comment that happens at the end of a block. + stem_comment []byte // Comment in item preceding a nested structure (list inside list item, etc) + + comments []yaml_comment_t // The folded comments for all parsed tokens + comments_head int + + // Scanner stuff + + stream_start_produced bool // Have we started to scan the input stream? + stream_end_produced bool // Have we reached the end of the input stream? + + flow_level int // The number of unclosed '[' and '{' indicators. + + tokens []yaml_token_t // The tokens queue. + tokens_head int // The head of the tokens queue. + tokens_parsed int // The number of tokens fetched from the queue. + token_available bool // Does the tokens queue contain a token ready for dequeueing. + + indent int // The current indentation level. + indents []int // The indentation levels stack. + + simple_key_allowed bool // May a simple key occur at the current position? + simple_keys []yaml_simple_key_t // The stack of simple keys. + simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number + + // Parser stuff + + state yaml_parser_state_t // The current parser state. + states []yaml_parser_state_t // The parser states stack. + marks []yaml_mark_t // The stack of marks. + tag_directives []yaml_tag_directive_t // The list of TAG directives. + + // Dumper stuff + + aliases []yaml_alias_data_t // The alias data. + + document *yaml_document_t // The currently parsed document. +} + +type yaml_comment_t struct { + scan_mark yaml_mark_t // Position where scanning for comments started + token_mark yaml_mark_t // Position after which tokens will be associated with this comment + start_mark yaml_mark_t // Position of '#' comment mark + end_mark yaml_mark_t // Position where comment terminated + + head []byte + line []byte + foot []byte +} + +// Emitter Definitions + +// The prototype of a write handler. +// +// The write handler is called when the emitter needs to flush the accumulated +// characters to the output. The handler should write @a size bytes of the +// @a buffer to the output. +// +// @param[in,out] data A pointer to an application data specified by +// +// yaml_emitter_set_output(). +// +// @param[in] buffer The buffer with bytes to be written. +// @param[in] size The size of the buffer. +// +// @returns On success, the handler should return @c 1. If the handler failed, +// the returned value should be @c 0. +type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error + +type yaml_emitter_state_t int + +// The emitter states. +const ( + // Expect STREAM-START. + yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota + + yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. + yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE // Expect the next item of a flow sequence, with the comma already written out + yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. + yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE // Expect the next key of a flow mapping, with the comma already written out + yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. + yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. + yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. + yaml_EMIT_END_STATE // Expect nothing. +) + +// The emitter structure. +// +// All members are internal. Manage the structure using the @c yaml_emitter_ +// family of functions. +type yaml_emitter_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + problem string // Error description. + + // Writer stuff + + write_handler yaml_write_handler_t // Write handler. + + output_buffer *[]byte // String output data. + output_writer io.Writer // File output data. + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The stream encoding. + + // Emitter stuff + + canonical bool // If the output is in the canonical style? + best_indent int // The number of indentation spaces. + best_width int // The preferred width of the output lines. + unicode bool // Allow unescaped non-ASCII characters? + line_break yaml_break_t // The preferred line break. + + state yaml_emitter_state_t // The current emitter state. + states []yaml_emitter_state_t // The stack of states. + + events []yaml_event_t // The event queue. + events_head int // The head of the event queue. + + indents []int // The stack of indentation levels. + + tag_directives []yaml_tag_directive_t // The list of tag directives. + + indent int // The current indentation level. + + compact_sequence_indent bool // Is '- ' is considered part of the indentation for sequence elements? + + flow_level int // The current flow level. + + root_context bool // Is it the document root context? + sequence_context bool // Is it a sequence context? + mapping_context bool // Is it a mapping context? + simple_key_context bool // Is it a simple mapping key context? + + line int // The current line. + column int // The current column. + whitespace bool // If the last character was a whitespace? + indention bool // If the last character was an indentation character (' ', '-', '?', ':')? + open_ended bool // If an explicit document end is required? + + space_above bool // Is there's an empty line above? + foot_indent int // The indent used to write the foot comment above, or -1 if none. + + // Anchor analysis. + anchor_data struct { + anchor []byte // The anchor value. + alias bool // Is it an alias? + } + + // Tag analysis. + tag_data struct { + handle []byte // The tag handle. + suffix []byte // The tag suffix. + } + + // Scalar analysis. + scalar_data struct { + value []byte // The scalar value. + multiline bool // Does the scalar contain line breaks? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + block_plain_allowed bool // Can the scalar be expressed in the block plain style? + single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? + block_allowed bool // Can the scalar be expressed in the literal or folded styles? + style yaml_scalar_style_t // The output style. + } + + // Comments + head_comment []byte + line_comment []byte + foot_comment []byte + tail_comment []byte + + key_line_comment []byte + + // Dumper stuff + + opened bool // If the stream was already opened? + closed bool // If the stream was already closed? + + // The information associated with the document nodes. + anchors *struct { + references int // The number of references. + anchor int // The anchor id. + serialized bool // If the node has been emitted? + } + + last_anchor_id int // The last assigned anchor id. + + document *yaml_document_t // The currently emitted document. +} diff --git a/vendor/go.yaml.in/yaml/v3/yamlprivateh.go b/vendor/go.yaml.in/yaml/v3/yamlprivateh.go new file mode 100644 index 000000000..dea1ba961 --- /dev/null +++ b/vendor/go.yaml.in/yaml/v3/yamlprivateh.go @@ -0,0 +1,198 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +const ( + // The size of the input raw buffer. + input_raw_buffer_size = 512 + + // The size of the input buffer. + // It should be possible to decode the whole raw buffer. + input_buffer_size = input_raw_buffer_size * 3 + + // The size of the output buffer. + output_buffer_size = 128 + + // The size of the output raw buffer. + // It should be possible to encode the whole output buffer. + output_raw_buffer_size = (output_buffer_size*2 + 2) + + // The size of other stacks and queues. + initial_stack_size = 16 + initial_queue_size = 16 + initial_string_size = 16 +) + +// Check if the character at the specified position is an alphabetical +// character, a digit, '_', or '-'. +func is_alpha(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' +} + +// Check if the character at the specified position is a digit. +func is_digit(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' +} + +// Get the value of a digit. +func as_digit(b []byte, i int) int { + return int(b[i]) - '0' +} + +// Check if the character at the specified position is a hex-digit. +func is_hex(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' +} + +// Get the value of a hex-digit. +func as_hex(b []byte, i int) int { + bi := b[i] + if bi >= 'A' && bi <= 'F' { + return int(bi) - 'A' + 10 + } + if bi >= 'a' && bi <= 'f' { + return int(bi) - 'a' + 10 + } + return int(bi) - '0' +} + +// Check if the character is ASCII. +func is_ascii(b []byte, i int) bool { + return b[i] <= 0x7F +} + +// Check if the character at the start of the buffer can be printed unescaped. +func is_printable(b []byte, i int) bool { + return ((b[i] == 0x0A) || // . == #x0A + (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E + (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF + (b[i] > 0xC2 && b[i] < 0xED) || + (b[i] == 0xED && b[i+1] < 0xA0) || + (b[i] == 0xEE) || + (b[i] == 0xEF && // #xE000 <= . <= #xFFFD + !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF + !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) +} + +// Check if the character at the specified position is NUL. +func is_z(b []byte, i int) bool { + return b[i] == 0x00 +} + +// Check if the beginning of the buffer is a BOM. +func is_bom(b []byte, i int) bool { + return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF +} + +// Check if the character at the specified position is space. +func is_space(b []byte, i int) bool { + return b[i] == ' ' +} + +// Check if the character at the specified position is tab. +func is_tab(b []byte, i int) bool { + return b[i] == '\t' +} + +// Check if the character at the specified position is blank (space or tab). +func is_blank(b []byte, i int) bool { + //return is_space(b, i) || is_tab(b, i) + return b[i] == ' ' || b[i] == '\t' +} + +// Check if the character at the specified position is a line break. +func is_break(b []byte, i int) bool { + return (b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) +} + +func is_crlf(b []byte, i int) bool { + return b[i] == '\r' && b[i+1] == '\n' +} + +// Check if the character is a line break or NUL. +func is_breakz(b []byte, i int) bool { + //return is_break(b, i) || is_z(b, i) + return ( + // is_break: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + // is_z: + b[i] == 0) +} + +// Check if the character is a line break, space, or NUL. +func is_spacez(b []byte, i int) bool { + //return is_space(b, i) || is_breakz(b, i) + return ( + // is_space: + b[i] == ' ' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Check if the character is a line break, space, tab, or NUL. +func is_blankz(b []byte, i int) bool { + //return is_blank(b, i) || is_breakz(b, i) + return ( + // is_blank: + b[i] == ' ' || b[i] == '\t' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Determine the width of the character. +func width(b byte) int { + // Don't replace these by a switch without first + // confirming that it is being inlined. + if b&0x80 == 0x00 { + return 1 + } + if b&0xE0 == 0xC0 { + return 2 + } + if b&0xF0 == 0xE0 { + return 3 + } + if b&0xF8 == 0xF0 { + return 4 + } + return 0 + +} diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 6c18ea230..ea5ae629f 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -11,8 +11,6 @@ // requires Go 1.6 or later) // // See https://http2.github.io/ for more information on HTTP/2. -// -// See https://http2.golang.org/ for a test server running this code. package http2 // import "golang.org/x/net/http2" import ( diff --git a/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go b/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go deleted file mode 100644 index 73687de74..000000000 --- a/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.5 - -package plan9 - -import "syscall" - -func fixwd() { - syscall.Fixwd() -} - -func Getwd() (wd string, err error) { - return syscall.Getwd() -} - -func Chdir(path string) error { - return syscall.Chdir(path) -} diff --git a/vendor/golang.org/x/sys/plan9/pwd_plan9.go b/vendor/golang.org/x/sys/plan9/pwd_plan9.go index fb9458218..7a76489db 100644 --- a/vendor/golang.org/x/sys/plan9/pwd_plan9.go +++ b/vendor/golang.org/x/sys/plan9/pwd_plan9.go @@ -2,22 +2,18 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !go1.5 - package plan9 +import "syscall" + func fixwd() { + syscall.Fixwd() } func Getwd() (wd string, err error) { - fd, err := open(".", O_RDONLY) - if err != nil { - return "", err - } - defer Close(fd) - return Fd2path(fd) + return syscall.Getwd() } func Chdir(path string) error { - return chdir(path) + return syscall.Chdir(path) } diff --git a/vendor/golang.org/x/sys/unix/affinity_linux.go b/vendor/golang.org/x/sys/unix/affinity_linux.go index 6e5c81acd..3c7a6d6e2 100644 --- a/vendor/golang.org/x/sys/unix/affinity_linux.go +++ b/vendor/golang.org/x/sys/unix/affinity_linux.go @@ -38,9 +38,7 @@ func SchedSetaffinity(pid int, set *CPUSet) error { // Zero clears the set s, so that it contains no CPUs. func (s *CPUSet) Zero() { - for i := range s { - s[i] = 0 - } + clear(s[:]) } func cpuBitsIndex(cpu int) int { diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 6ab02b6c3..d1c8b2640 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -349,6 +349,9 @@ struct ltchars { #define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN) #define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN) +// Renamed in v6.16, commit c6d732c38f93 ("net: ethtool: remove duplicate defines for family info") +#define ETHTOOL_FAMILY_NAME ETHTOOL_GENL_NAME +#define ETHTOOL_FAMILY_VERSION ETHTOOL_GENL_VERSION ' includes_NetBSD=' diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 798f61ad3..7838ca5db 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -602,14 +602,9 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI return } -// sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) const minIovec = 8 func Readv(fd int, iovs [][]byte) (n int, err error) { - if !darwinKernelVersionMin(11, 0, 0) { - return 0, ENOSYS - } - iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) n, err = readv(fd, iovecs) @@ -618,9 +613,6 @@ func Readv(fd int, iovs [][]byte) (n int, err error) { } func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { - if !darwinKernelVersionMin(11, 0, 0) { - return 0, ENOSYS - } iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) n, err = preadv(fd, iovecs, offset) @@ -629,10 +621,6 @@ func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { } func Writev(fd int, iovs [][]byte) (n int, err error) { - if !darwinKernelVersionMin(11, 0, 0) { - return 0, ENOSYS - } - iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) if raceenabled { @@ -644,10 +632,6 @@ func Writev(fd int, iovs [][]byte) (n int, err error) { } func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { - if !darwinKernelVersionMin(11, 0, 0) { - return 0, ENOSYS - } - iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) if raceenabled { @@ -707,45 +691,7 @@ func readvRacedetect(iovecs []Iovec, n int, err error) { } } -func darwinMajorMinPatch() (maj, min, patch int, err error) { - var un Utsname - err = Uname(&un) - if err != nil { - return - } - - var mmp [3]int - c := 0 -Loop: - for _, b := range un.Release[:] { - switch { - case b >= '0' && b <= '9': - mmp[c] = 10*mmp[c] + int(b-'0') - case b == '.': - c++ - if c > 2 { - return 0, 0, 0, ENOTSUP - } - case b == 0: - break Loop - default: - return 0, 0, 0, ENOTSUP - } - } - if c != 2 { - return 0, 0, 0, ENOTSUP - } - return mmp[0], mmp[1], mmp[2], nil -} - -func darwinKernelVersionMin(maj, min, patch int) bool { - actualMaj, actualMin, actualPatch, err := darwinMajorMinPatch() - if err != nil { - return false - } - return actualMaj > maj || actualMaj == maj && (actualMin > min || actualMin == min && actualPatch >= patch) -} - +//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index abc395547..18a3d9bda 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -629,7 +629,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Kill(pid int, signum syscall.Signal) (err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) -//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten +//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_listen //sys Lstat(path string, stat *Stat_t) (err error) //sys Madvise(b []byte, advice int) (err error) //sys Mkdir(path string, mode uint32) (err error) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 9e7a6c5a4..b6db27d93 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -328,6 +328,8 @@ const ( AUDIT_KERNEL = 0x7d0 AUDIT_KERNEL_OTHER = 0x524 AUDIT_KERN_MODULE = 0x532 + AUDIT_LANDLOCK_ACCESS = 0x58f + AUDIT_LANDLOCK_DOMAIN = 0x590 AUDIT_LAST_FEATURE = 0x1 AUDIT_LAST_KERN_ANOM_MSG = 0x707 AUDIT_LAST_USER_MSG = 0x4af @@ -492,6 +494,7 @@ const ( BPF_F_BEFORE = 0x8 BPF_F_ID = 0x20 BPF_F_NETFILTER_IP_DEFRAG = 0x1 + BPF_F_PREORDER = 0x40 BPF_F_QUERY_EFFECTIVE = 0x1 BPF_F_REDIRECT_FLAGS = 0x19 BPF_F_REPLACE = 0x4 @@ -528,6 +531,7 @@ const ( BPF_LDX = 0x1 BPF_LEN = 0x80 BPF_LL_OFF = -0x200000 + BPF_LOAD_ACQ = 0x100 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 @@ -555,6 +559,7 @@ const ( BPF_RET = 0x6 BPF_RSH = 0x70 BPF_ST = 0x2 + BPF_STORE_REL = 0x110 BPF_STX = 0x3 BPF_SUB = 0x10 BPF_TAG_SIZE = 0x8 @@ -844,9 +849,9 @@ const ( DM_UUID_FLAG = 0x4000 DM_UUID_LEN = 0x81 DM_VERSION = 0xc138fd00 - DM_VERSION_EXTRA = "-ioctl (2025-01-17)" + DM_VERSION_EXTRA = "-ioctl (2025-04-28)" DM_VERSION_MAJOR = 0x4 - DM_VERSION_MINOR = 0x31 + DM_VERSION_MINOR = 0x32 DM_VERSION_PATCHLEVEL = 0x0 DT_BLK = 0x6 DT_CHR = 0x2 @@ -937,9 +942,6 @@ const ( EPOLL_CTL_MOD = 0x3 EPOLL_IOC_TYPE = 0x8a EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 - ESP_V4_FLOW = 0xa - ESP_V6_FLOW = 0xc - ETHER_FLOW = 0x12 ETHTOOL_BUSINFO_LEN = 0x20 ETHTOOL_EROMVERS_LEN = 0x20 ETHTOOL_FAMILY_NAME = "ethtool" @@ -1213,6 +1215,7 @@ const ( FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2 FAN_EVENT_INFO_TYPE_ERROR = 0x5 FAN_EVENT_INFO_TYPE_FID = 0x1 + FAN_EVENT_INFO_TYPE_MNT = 0x7 FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa FAN_EVENT_INFO_TYPE_PIDFD = 0x4 @@ -1231,9 +1234,12 @@ const ( FAN_MARK_IGNORED_SURV_MODIFY = 0x40 FAN_MARK_IGNORE_SURV = 0x440 FAN_MARK_INODE = 0x0 + FAN_MARK_MNTNS = 0x110 FAN_MARK_MOUNT = 0x10 FAN_MARK_ONLYDIR = 0x8 FAN_MARK_REMOVE = 0x2 + FAN_MNT_ATTACH = 0x1000000 + FAN_MNT_DETACH = 0x2000000 FAN_MODIFY = 0x2 FAN_MOVE = 0xc0 FAN_MOVED_FROM = 0x40 @@ -1255,6 +1261,7 @@ const ( FAN_REPORT_DIR_FID = 0x400 FAN_REPORT_FD_ERROR = 0x2000 FAN_REPORT_FID = 0x200 + FAN_REPORT_MNT = 0x4000 FAN_REPORT_NAME = 0x800 FAN_REPORT_PIDFD = 0x80 FAN_REPORT_TARGET_FID = 0x1000 @@ -1274,6 +1281,7 @@ const ( FIB_RULE_PERMANENT = 0x1 FIB_RULE_UNRESOLVED = 0x4 FIDEDUPERANGE = 0xc0189436 + FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED = 0x1 FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8 FSCRYPT_KEY_DESC_PREFIX = "fscrypt:" FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8 @@ -1582,7 +1590,6 @@ const ( IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b - IPV6_FLOW = 0x11 IPV6_FREEBIND = 0x4e IPV6_HDRINCL = 0x24 IPV6_HOPLIMIT = 0x34 @@ -1633,7 +1640,6 @@ const ( IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 IPV6_UNICAST_IF = 0x4c - IPV6_USER_FLOW = 0xe IPV6_V6ONLY = 0x1a IPV6_VERSION = 0x60 IPV6_VERSION_MASK = 0xf0 @@ -1695,7 +1701,6 @@ const ( IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 IP_UNICAST_IF = 0x32 - IP_USER_FLOW = 0xd IP_XFRM_POLICY = 0x11 ISOFS_SUPER_MAGIC = 0x9660 ISTRIP = 0x20 @@ -1817,7 +1822,11 @@ const ( LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 + LANDLOCK_CREATE_RULESET_ERRATA = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 + LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON = 0x2 + LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF = 0x1 + LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF = 0x4 LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1 LANDLOCK_SCOPE_SIGNAL = 0x2 LINUX_REBOOT_CMD_CAD_OFF = 0x0 @@ -2493,6 +2502,10 @@ const ( PR_FP_EXC_UND = 0x40000 PR_FP_MODE_FR = 0x1 PR_FP_MODE_FRE = 0x2 + PR_FUTEX_HASH = 0x4e + PR_FUTEX_HASH_GET_IMMUTABLE = 0x3 + PR_FUTEX_HASH_GET_SLOTS = 0x2 + PR_FUTEX_HASH_SET_SLOTS = 0x1 PR_GET_AUXV = 0x41555856 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 @@ -2652,6 +2665,10 @@ const ( PR_TAGGED_ADDR_ENABLE = 0x1 PR_TASK_PERF_EVENTS_DISABLE = 0x1f PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMER_CREATE_RESTORE_IDS = 0x4d + PR_TIMER_CREATE_RESTORE_IDS_GET = 0x2 + PR_TIMER_CREATE_RESTORE_IDS_OFF = 0x0 + PR_TIMER_CREATE_RESTORE_IDS_ON = 0x1 PR_TIMING_STATISTICAL = 0x0 PR_TIMING_TIMESTAMP = 0x1 PR_TSC_ENABLE = 0x1 @@ -2732,6 +2749,7 @@ const ( PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 PTRACE_SETSIGMASK = 0x420b + PTRACE_SET_SYSCALL_INFO = 0x4212 PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210 PTRACE_SINGLESTEP = 0x9 PTRACE_SYSCALL = 0x18 @@ -2982,6 +3000,7 @@ const ( RTPROT_NTK = 0xf RTPROT_OPENR = 0x63 RTPROT_OSPF = 0xbc + RTPROT_OVN = 0x54 RTPROT_RA = 0x9 RTPROT_REDIRECT = 0x1 RTPROT_RIP = 0xbd @@ -3336,7 +3355,7 @@ const ( TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0xf + TASKSTATS_VERSION = 0x10 TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 @@ -3406,8 +3425,6 @@ const ( TCP_TX_DELAY = 0x25 TCP_ULP = 0x1f TCP_USER_TIMEOUT = 0x12 - TCP_V4_FLOW = 0x1 - TCP_V6_FLOW = 0x5 TCP_WINDOW_CLAMP = 0xa TCP_ZEROCOPY_RECEIVE = 0x23 TFD_TIMER_ABSTIME = 0x1 @@ -3530,8 +3547,6 @@ const ( UDP_NO_CHECK6_RX = 0x66 UDP_NO_CHECK6_TX = 0x65 UDP_SEGMENT = 0x67 - UDP_V4_FLOW = 0x2 - UDP_V6_FLOW = 0x6 UMOUNT_NOFOLLOW = 0x8 USBDEVICE_SUPER_MAGIC = 0x9fa2 UTIME_NOW = 0x3fffffff @@ -3574,7 +3589,7 @@ const ( WDIOS_TEMPPANIC = 0x4 WDIOS_UNKNOWN = -0x1 WEXITED = 0x4 - WGALLOWEDIP_A_MAX = 0x3 + WGALLOWEDIP_A_MAX = 0x4 WGDEVICE_A_MAX = 0x8 WGPEER_A_MAX = 0xa WG_CMD_MAX = 0x1 @@ -3688,6 +3703,7 @@ const ( XDP_SHARED_UMEM = 0x1 XDP_STATISTICS = 0x7 XDP_TXMD_FLAGS_CHECKSUM = 0x2 + XDP_TXMD_FLAGS_LAUNCH_TIME = 0x4 XDP_TXMD_FLAGS_TIMESTAMP = 0x1 XDP_TX_METADATA = 0x2 XDP_TX_RING = 0x3 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index a8c421e29..1c37f9fbc 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -360,6 +361,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 9a88d1813..6f54d34ae 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -361,6 +362,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 7cb6a867e..783ec5c12 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -366,6 +367,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index d0ecd2c58..ca83d3ba1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -359,6 +360,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 7a2940ae0..607e611c0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -353,6 +354,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index d14ca8f2e..b9cb5bd3c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 @@ -359,6 +360,7 @@ const ( SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 2da1bac1e..65b078a63 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 @@ -359,6 +360,7 @@ const ( SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 28727514b..5298a3033 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 @@ -359,6 +360,7 @@ const ( SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 7f287b54b..7bc557c87 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 @@ -359,6 +360,7 @@ const ( SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 7e5f9e6aa..152399bb0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -68,6 +68,7 @@ const ( CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 @@ -414,6 +415,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 37c87952f..1a1ce2409 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 @@ -418,6 +419,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 522013361..4231a1fb5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -68,6 +68,7 @@ const ( CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 @@ -418,6 +419,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 4bfe2b5b6..21c0e9526 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -350,6 +351,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index e3cffb869..f00d1cd7c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -68,6 +68,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 @@ -422,6 +423,7 @@ const ( SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index c219c8db3..bc8d539e6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -71,6 +71,7 @@ const ( CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0x2000fd12 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 @@ -461,6 +462,7 @@ const ( SO_OOBINLINE = 0x100 SO_PASSCRED = 0x2 SO_PASSPIDFD = 0x55 + SO_PASSRIGHTS = 0x5c SO_PASSSEC = 0x1f SO_PEEK_OFF = 0x26 SO_PEERCRED = 0x40 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index c6545413c..b4609c20c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -72,7 +72,7 @@ import ( //go:cgo_import_dynamic libc_kill kill "libc.so" //go:cgo_import_dynamic libc_lchown lchown "libc.so" //go:cgo_import_dynamic libc_link link "libc.so" -//go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so" +//go:cgo_import_dynamic libc___xnet_listen __xnet_listen "libsocket.so" //go:cgo_import_dynamic libc_lstat lstat "libc.so" //go:cgo_import_dynamic libc_madvise madvise "libc.so" //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" @@ -221,7 +221,7 @@ import ( //go:linkname procKill libc_kill //go:linkname procLchown libc_lchown //go:linkname procLink libc_link -//go:linkname proc__xnet_llisten libc___xnet_llisten +//go:linkname proc__xnet_listen libc___xnet_listen //go:linkname procLstat libc_lstat //go:linkname procMadvise libc_madvise //go:linkname procMkdir libc_mkdir @@ -371,7 +371,7 @@ var ( procKill, procLchown, procLink, - proc__xnet_llisten, + proc__xnet_listen, procLstat, procMadvise, procMkdir, @@ -1178,7 +1178,7 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index c79aaff30..aca56ee49 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -462,4 +462,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 5eb450695..2ea1ef58c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -385,4 +385,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 05e502974..d22c8af31 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -426,4 +426,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 38c53ec51..5ee264ae9 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -329,4 +329,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 31d2e71a1..f9f03ebf5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -325,4 +325,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index f4184a336..87c2118e8 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -446,4 +446,5 @@ const ( SYS_GETXATTRAT = 4464 SYS_LISTXATTRAT = 4465 SYS_REMOVEXATTRAT = 4466 + SYS_OPEN_TREE_ATTR = 4467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 05b996227..391ad102f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -376,4 +376,5 @@ const ( SYS_GETXATTRAT = 5464 SYS_LISTXATTRAT = 5465 SYS_REMOVEXATTRAT = 5466 + SYS_OPEN_TREE_ATTR = 5467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index 43a256e9e..565615775 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -376,4 +376,5 @@ const ( SYS_GETXATTRAT = 5464 SYS_LISTXATTRAT = 5465 SYS_REMOVEXATTRAT = 5466 + SYS_OPEN_TREE_ATTR = 5467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index eea5ddfc2..0482b52e3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -446,4 +446,5 @@ const ( SYS_GETXATTRAT = 4464 SYS_LISTXATTRAT = 4465 SYS_REMOVEXATTRAT = 4466 + SYS_OPEN_TREE_ATTR = 4467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 0d777bfbb..71806f08f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -453,4 +453,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index b44636502..e35a71058 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -425,4 +425,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 0c7d21c18..2aea47670 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -425,4 +425,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 840539169..6c9bb4e56 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -330,4 +330,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index fcf1b790d..680bc9915 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -391,4 +391,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 52d15b5f9..620f27105 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -404,4 +404,5 @@ const ( SYS_GETXATTRAT = 464 SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 + SYS_OPEN_TREE_ATTR = 467 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 8bcac2835..944e75a11 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -115,7 +115,9 @@ type Statx_t struct { Atomic_write_unit_max uint32 Atomic_write_segments_max uint32 Dio_read_offset_align uint32 - _ [9]uint64 + Atomic_write_unit_max_opt uint32 + _ [1]uint32 + _ [8]uint64 } type Fsid struct { @@ -199,7 +201,8 @@ type FscryptAddKeyArg struct { Key_spec FscryptKeySpecifier Raw_size uint32 Key_id uint32 - _ [8]uint32 + Flags uint32 + _ [7]uint32 } type FscryptRemoveKeyArg struct { @@ -629,6 +632,8 @@ const ( IFA_FLAGS = 0x8 IFA_RT_PRIORITY = 0x9 IFA_TARGET_NETNSID = 0xa + IFAL_LABEL = 0x2 + IFAL_ADDRESS = 0x1 RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -686,6 +691,7 @@ const ( SizeofRtAttr = 0x4 SizeofIfInfomsg = 0x10 SizeofIfAddrmsg = 0x8 + SizeofIfAddrlblmsg = 0xc SizeofIfaCacheinfo = 0x10 SizeofRtMsg = 0xc SizeofRtNexthop = 0x8 @@ -737,6 +743,15 @@ type IfAddrmsg struct { Index uint32 } +type IfAddrlblmsg struct { + Family uint8 + _ uint8 + Prefixlen uint8 + Flags uint8 + Index uint32 + Seq uint32 +} + type IfaCacheinfo struct { Prefered uint32 Valid uint32 @@ -2317,6 +2332,11 @@ const ( NFT_CT_AVGPKT = 0x10 NFT_CT_ZONE = 0x11 NFT_CT_EVENTMASK = 0x12 + NFT_CT_SRC_IP = 0x13 + NFT_CT_DST_IP = 0x14 + NFT_CT_SRC_IP6 = 0x15 + NFT_CT_DST_IP6 = 0x16 + NFT_CT_ID = 0x17 NFTA_CT_UNSPEC = 0x0 NFTA_CT_DREG = 0x1 NFTA_CT_KEY = 0x2 @@ -2597,8 +2617,8 @@ const ( SOF_TIMESTAMPING_BIND_PHC = 0x8000 SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 - SOF_TIMESTAMPING_LAST = 0x20000 - SOF_TIMESTAMPING_MASK = 0x3ffff + SOF_TIMESTAMPING_LAST = 0x40000 + SOF_TIMESTAMPING_MASK = 0x7ffff SCM_TSTAMP_SND = 0x0 SCM_TSTAMP_SCHED = 0x1 @@ -3044,6 +3064,23 @@ const ( ) const ( + TCA_UNSPEC = 0x0 + TCA_KIND = 0x1 + TCA_OPTIONS = 0x2 + TCA_STATS = 0x3 + TCA_XSTATS = 0x4 + TCA_RATE = 0x5 + TCA_FCNT = 0x6 + TCA_STATS2 = 0x7 + TCA_STAB = 0x8 + TCA_PAD = 0x9 + TCA_DUMP_INVISIBLE = 0xa + TCA_CHAIN = 0xb + TCA_HW_OFFLOAD = 0xc + TCA_INGRESS_BLOCK = 0xd + TCA_EGRESS_BLOCK = 0xe + TCA_DUMP_FLAGS = 0xf + TCA_EXT_WARN_MSG = 0x10 RTNLGRP_NONE = 0x0 RTNLGRP_LINK = 0x1 RTNLGRP_NOTIFY = 0x2 @@ -3078,6 +3115,18 @@ const ( RTNLGRP_IPV6_MROUTE_R = 0x1f RTNLGRP_NEXTHOP = 0x20 RTNLGRP_BRVLAN = 0x21 + RTNLGRP_MCTP_IFADDR = 0x22 + RTNLGRP_TUNNEL = 0x23 + RTNLGRP_STATS = 0x24 + RTNLGRP_IPV4_MCADDR = 0x25 + RTNLGRP_IPV6_MCADDR = 0x26 + RTNLGRP_IPV6_ACADDR = 0x27 + TCA_ROOT_UNSPEC = 0x0 + TCA_ROOT_TAB = 0x1 + TCA_ROOT_FLAGS = 0x2 + TCA_ROOT_COUNT = 0x3 + TCA_ROOT_TIME_DELTA = 0x4 + TCA_ROOT_EXT_WARN_MSG = 0x5 ) type CapUserHeader struct { @@ -4044,7 +4093,7 @@ const ( ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 ETHTOOL_A_TSINFO_STATS = 0x6 ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7 - ETHTOOL_A_TSINFO_MAX = 0x7 + ETHTOOL_A_TSINFO_MAX = 0x9 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_MAX = 0x1 @@ -4130,6 +4179,19 @@ const ( ETHTOOL_A_TUNNEL_INFO_MAX = 0x2 ) +const ( + TCP_V4_FLOW = 0x1 + UDP_V4_FLOW = 0x2 + TCP_V6_FLOW = 0x5 + UDP_V6_FLOW = 0x6 + ESP_V4_FLOW = 0xa + ESP_V6_FLOW = 0xc + IP_USER_FLOW = 0xd + IPV6_USER_FLOW = 0xe + IPV6_FLOW = 0x11 + ETHER_FLOW = 0x12 +) + const SPEED_UNKNOWN = -0x1 type EthtoolDrvinfo struct { @@ -4780,7 +4842,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x150 + NL80211_ATTR_MAX = 0x151 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143 @@ -5414,7 +5476,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x21 + NL80211_FREQUENCY_ATTR_MAX = 0x22 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5530,7 +5592,7 @@ const ( NL80211_MAX_SUPP_SELECTORS = 0x80 NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5 NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3 - NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5 + NL80211_MBSSID_CONFIG_ATTR_MAX = 0x6 NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY = 0x2 NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES = 0x1 NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX = 0x4 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 62db85f6c..485f2d3a1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -282,19 +282,13 @@ type Taskstats struct { Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 - _ [4]byte + _ [6]byte Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -330,17 +324,11 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 @@ -348,10 +336,22 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 7d89d648d..ecbd1ad8b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -300,16 +300,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -344,27 +338,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 9c0b39eec..02f0463a4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -91,7 +91,7 @@ type Stat_t struct { Gid uint32 Rdev uint64 _ uint16 - _ [4]byte + _ [6]byte Size int64 Blksize int32 _ [4]byte @@ -273,19 +273,13 @@ type Taskstats struct { Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 - _ [4]byte + _ [6]byte Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 @@ -321,17 +315,11 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 @@ -339,10 +327,22 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index de9c7ff36..6f4d400d2 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -279,16 +279,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -323,27 +317,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index 2336bd2bf..cd532cfa5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -280,16 +280,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -324,27 +318,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 4711f0be1..413362085 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -278,19 +278,13 @@ type Taskstats struct { Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 - _ [4]byte + _ [6]byte Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -326,17 +320,11 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 @@ -344,10 +332,22 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index ab99a34b9..eaa37eb71 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -282,16 +282,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -326,27 +320,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 04c9866e3..98ae6a1e4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -282,16 +282,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -326,27 +320,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 60aa69f61..cae196159 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -278,19 +278,13 @@ type Taskstats struct { Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 - _ [4]byte + _ [6]byte Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -326,17 +320,11 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 @@ -344,10 +332,22 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index cb4fad785..6ce3b4e02 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -90,7 +90,7 @@ type Stat_t struct { Gid uint32 Rdev uint64 _ uint16 - _ [4]byte + _ [6]byte Size int64 Blksize int32 _ [4]byte @@ -285,19 +285,13 @@ type Taskstats struct { Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 - _ [4]byte + _ [6]byte Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 @@ -333,17 +327,11 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 @@ -351,10 +339,22 @@ type Taskstats struct { Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 60272cfce..c7429c6a1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -289,16 +289,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 @@ -333,27 +327,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 3f5b91bc0..4bf4baf4c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -289,16 +289,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 @@ -333,27 +327,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 51550f15a..e9709d70a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -307,16 +307,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 @@ -351,27 +345,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index 3239e50e0..fb44268ca 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -302,16 +302,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -346,27 +340,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index faf200278..9c38265c7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -284,16 +284,10 @@ type Taskstats struct { Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 - Cpu_delay_max uint64 - Cpu_delay_min uint64 Blkio_count uint64 Blkio_delay_total uint64 - Blkio_delay_max uint64 - Blkio_delay_min uint64 Swapin_count uint64 Swapin_delay_total uint64 - Swapin_delay_max uint64 - Swapin_delay_min uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 @@ -328,27 +322,33 @@ type Taskstats struct { Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 - Freepages_delay_max uint64 - Freepages_delay_min uint64 Thrashing_count uint64 Thrashing_delay_total uint64 - Thrashing_delay_max uint64 - Thrashing_delay_min uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 - Compact_delay_max uint64 - Compact_delay_min uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 - Wpcopy_delay_max uint64 - Wpcopy_delay_min uint64 Irq_count uint64 Irq_delay_total uint64 + Cpu_delay_max uint64 + Cpu_delay_min uint64 + Blkio_delay_max uint64 + Blkio_delay_min uint64 + Swapin_delay_max uint64 + Swapin_delay_min uint64 + Freepages_delay_max uint64 + Freepages_delay_min uint64 + Thrashing_delay_max uint64 + Thrashing_delay_min uint64 + Compact_delay_max uint64 + Compact_delay_min uint64 + Wpcopy_delay_max uint64 + Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 } diff --git a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go index fc1835d8a..bc1ce4360 100644 --- a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go @@ -52,7 +52,7 @@ var ( ) func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result))) + r0, _, _ := syscall.SyscallN(procRegConnectRegistryW.Addr(), uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -60,7 +60,7 @@ func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall } func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) + r0, _, _ := syscall.SyscallN(procRegCreateKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -68,7 +68,7 @@ func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class * } func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0) + r0, _, _ := syscall.SyscallN(procRegDeleteKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -76,7 +76,7 @@ func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) { } func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0) + r0, _, _ := syscall.SyscallN(procRegDeleteValueW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -84,7 +84,7 @@ func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) { } func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0) + r0, _, _ := syscall.SyscallN(procRegEnumValueW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -92,7 +92,7 @@ func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint3 } func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0) + r0, _, _ := syscall.SyscallN(procRegLoadMUIStringW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -100,7 +100,7 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint } func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) { - r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) + r0, _, _ := syscall.SyscallN(procRegSetValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -108,7 +108,7 @@ func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype } func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) + r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) n = uint32(r0) if n == 0 { err = errnoErr(e1) diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 958bcf47a..993a2297d 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -1976,6 +1976,12 @@ const ( SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1 ) +// FILE_ZERO_DATA_INFORMATION from winioctl.h +type FileZeroDataInformation struct { + FileOffset int64 + BeyondFinalZero int64 +} + const ( ComputerNameNetBIOS = 0 ComputerNameDnsHostname = 1 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index a58bc48b8..641a5f4b7 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -546,25 +546,25 @@ var ( ) func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) { - r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_Status.Addr(), 4, uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags), 0, 0) + r0, _, _ := syscall.SyscallN(procCM_Get_DevNode_Status.Addr(), uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags)) ret = CONFIGRET(r0) return } func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) { - r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_ListW.Addr(), 5, uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags), 0) + r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_ListW.Addr(), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags)) ret = CONFIGRET(r0) return } func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) { - r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_List_SizeW.Addr(), 4, uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags), 0, 0) + r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_List_SizeW.Addr(), uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags)) ret = CONFIGRET(r0) return } func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) { - r0, _, _ := syscall.Syscall(procCM_MapCrToWin32Err.Addr(), 2, uintptr(configRet), uintptr(defaultWin32Error), 0) + r0, _, _ := syscall.SyscallN(procCM_MapCrToWin32Err.Addr(), uintptr(configRet), uintptr(defaultWin32Error)) ret = Errno(r0) return } @@ -574,7 +574,7 @@ func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, if resetToDefault { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) + r1, _, e1 := syscall.SyscallN(procAdjustTokenGroups.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) if r1 == 0 { err = errnoErr(e1) } @@ -586,7 +586,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok if disableAllPrivileges { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) + r1, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) if r1 == 0 { err = errnoErr(e1) } @@ -594,7 +594,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok } func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) { - r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0) + r1, _, e1 := syscall.SyscallN(procAllocateAndInitializeSid.Addr(), uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid))) if r1 == 0 { err = errnoErr(e1) } @@ -602,7 +602,7 @@ func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, s } func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) { - r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor))) + r0, _, _ := syscall.SyscallN(procBuildSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -610,7 +610,7 @@ func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries } func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) { - r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info))) + r1, _, e1 := syscall.SyscallN(procChangeServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info))) if r1 == 0 { err = errnoErr(e1) } @@ -618,7 +618,7 @@ func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err err } func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) { - r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0) + r1, _, e1 := syscall.SyscallN(procChangeServiceConfigW.Addr(), uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName))) if r1 == 0 { err = errnoErr(e1) } @@ -626,7 +626,7 @@ func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, e } func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) { - r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember))) + r1, _, e1 := syscall.SyscallN(procCheckTokenMembership.Addr(), uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember))) if r1 == 0 { err = errnoErr(e1) } @@ -634,7 +634,7 @@ func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) ( } func CloseServiceHandle(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procCloseServiceHandle.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -642,7 +642,7 @@ func CloseServiceHandle(handle Handle) (err error) { } func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) { - r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status))) + r1, _, e1 := syscall.SyscallN(procControlService.Addr(), uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status))) if r1 == 0 { err = errnoErr(e1) } @@ -650,7 +650,7 @@ func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err } func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0) + r1, _, e1 := syscall.SyscallN(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen))) if r1 == 0 { err = errnoErr(e1) } @@ -658,7 +658,7 @@ func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR } func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) { - r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0) + r1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid))) if r1 == 0 { err = errnoErr(e1) } @@ -675,7 +675,7 @@ func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision ui } func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0) + r1, _, e1 := syscall.SyscallN(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size))) if r1 == 0 { err = errnoErr(e1) } @@ -683,7 +683,7 @@ func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision } func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) { - r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0) + r1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid))) if r1 == 0 { err = errnoErr(e1) } @@ -691,7 +691,7 @@ func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) { } func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) { - r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid))) + r1, _, e1 := syscall.SyscallN(procCopySid.Addr(), uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid))) if r1 == 0 { err = errnoErr(e1) } @@ -703,7 +703,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc if inheritHandles { _p0 = 1 } - r1, _, e1 := syscall.Syscall12(procCreateProcessAsUserW.Addr(), 11, uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0) + r1, _, e1 := syscall.SyscallN(procCreateProcessAsUserW.Addr(), uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo))) if r1 == 0 { err = errnoErr(e1) } @@ -711,7 +711,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc } func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -720,7 +720,7 @@ func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access } func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCreateWellKnownSid.Addr(), uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid))) if r1 == 0 { err = errnoErr(e1) } @@ -728,7 +728,7 @@ func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, s } func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procCryptAcquireContextW.Addr(), uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -736,7 +736,7 @@ func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16 } func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) { - r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf))) + r1, _, e1 := syscall.SyscallN(procCryptGenRandom.Addr(), uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf))) if r1 == 0 { err = errnoErr(e1) } @@ -744,7 +744,7 @@ func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) { } func CryptReleaseContext(provhandle Handle, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procCryptReleaseContext.Addr(), uintptr(provhandle), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -752,7 +752,7 @@ func CryptReleaseContext(provhandle Handle, flags uint32) (err error) { } func DeleteService(service Handle) (err error) { - r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0) + r1, _, e1 := syscall.SyscallN(procDeleteService.Addr(), uintptr(service)) if r1 == 0 { err = errnoErr(e1) } @@ -760,7 +760,7 @@ func DeleteService(service Handle) (err error) { } func DeregisterEventSource(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procDeregisterEventSource.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -768,7 +768,7 @@ func DeregisterEventSource(handle Handle) (err error) { } func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) { - r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken))) + r1, _, e1 := syscall.SyscallN(procDuplicateTokenEx.Addr(), uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken))) if r1 == 0 { err = errnoErr(e1) } @@ -776,7 +776,7 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes } func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned))) + r1, _, e1 := syscall.SyscallN(procEnumDependentServicesW.Addr(), uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned))) if r1 == 0 { err = errnoErr(e1) } @@ -784,7 +784,7 @@ func EnumDependentServices(service Handle, activityState uint32, services *ENUM_ } func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) { - r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0) + r1, _, e1 := syscall.SyscallN(procEnumServicesStatusExW.Addr(), uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName))) if r1 == 0 { err = errnoErr(e1) } @@ -792,13 +792,13 @@ func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serv } func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) { - r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0) + r0, _, _ := syscall.SyscallN(procEqualSid.Addr(), uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2))) isEqual = r0 != 0 return } func FreeSid(sid *SID) (err error) { - r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + r1, _, e1 := syscall.SyscallN(procFreeSid.Addr(), uintptr(unsafe.Pointer(sid))) if r1 != 0 { err = errnoErr(e1) } @@ -806,7 +806,7 @@ func FreeSid(sid *SID) (err error) { } func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { - r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) + r1, _, e1 := syscall.SyscallN(procGetAce.Addr(), uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) if r1 == 0 { err = errnoErr(e1) } @@ -814,7 +814,7 @@ func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { } func GetLengthSid(sid *SID) (len uint32) { - r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetLengthSid.Addr(), uintptr(unsafe.Pointer(sid))) len = uint32(r0) return } @@ -829,7 +829,7 @@ func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security } func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) { - r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0) + r0, _, _ := syscall.SyscallN(procGetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -837,7 +837,7 @@ func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi } func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision))) + r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision))) if r1 == 0 { err = errnoErr(e1) } @@ -853,7 +853,7 @@ func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl if *daclDefaulted { _p1 = 1 } - r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1))) *daclPresent = _p0 != 0 *daclDefaulted = _p1 != 0 if r1 == 0 { @@ -867,7 +867,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau if *groupDefaulted { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0))) + r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0))) *groupDefaulted = _p0 != 0 if r1 == 0 { err = errnoErr(e1) @@ -876,7 +876,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau } func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) { - r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorLength.Addr(), uintptr(unsafe.Pointer(sd))) len = uint32(r0) return } @@ -886,7 +886,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau if *ownerDefaulted { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0))) + r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0))) *ownerDefaulted = _p0 != 0 if r1 == 0 { err = errnoErr(e1) @@ -895,7 +895,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau } func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) { - r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0) + r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -911,7 +911,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl if *saclDefaulted { _p1 = 1 } - r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1))) *saclPresent = _p0 != 0 *saclDefaulted = _p1 != 0 if r1 == 0 { @@ -921,7 +921,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl } func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) { - r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0) + r0, _, _ := syscall.SyscallN(procGetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -929,25 +929,25 @@ func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati } func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) { - r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetSidIdentifierAuthority.Addr(), uintptr(unsafe.Pointer(sid))) authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0)) return } func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) { - r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0) + r0, _, _ := syscall.SyscallN(procGetSidSubAuthority.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(index)) subAuthority = (*uint32)(unsafe.Pointer(r0)) return } func getSidSubAuthorityCount(sid *SID) (count *uint8) { - r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetSidSubAuthorityCount.Addr(), uintptr(unsafe.Pointer(sid))) count = (*uint8)(unsafe.Pointer(r0)) return } func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0) + r1, _, e1 := syscall.SyscallN(procGetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen))) if r1 == 0 { err = errnoErr(e1) } @@ -955,7 +955,7 @@ func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint } func ImpersonateSelf(impersonationlevel uint32) (err error) { - r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0) + r1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(impersonationlevel)) if r1 == 0 { err = errnoErr(e1) } @@ -963,7 +963,7 @@ func ImpersonateSelf(impersonationlevel uint32) (err error) { } func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) { - r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0) + r1, _, e1 := syscall.SyscallN(procInitializeSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision)) if r1 == 0 { err = errnoErr(e1) } @@ -979,7 +979,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint if rebootAfterShutdown { _p1 = 1 } - r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason)) + r1, _, e1 := syscall.SyscallN(procInitiateSystemShutdownExW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason)) if r1 == 0 { err = errnoErr(e1) } @@ -987,7 +987,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint } func isTokenRestricted(tokenHandle Token) (ret bool, err error) { - r0, _, e1 := syscall.Syscall(procIsTokenRestricted.Addr(), 1, uintptr(tokenHandle), 0, 0) + r0, _, e1 := syscall.SyscallN(procIsTokenRestricted.Addr(), uintptr(tokenHandle)) ret = r0 != 0 if !ret { err = errnoErr(e1) @@ -996,25 +996,25 @@ func isTokenRestricted(tokenHandle Token) (ret bool, err error) { } func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) { - r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0) + r0, _, _ := syscall.SyscallN(procIsValidSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(sd))) isValid = r0 != 0 return } func isValidSid(sid *SID) (isValid bool) { - r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + r0, _, _ := syscall.SyscallN(procIsValidSid.Addr(), uintptr(unsafe.Pointer(sid))) isValid = r0 != 0 return } func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) { - r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0) + r0, _, _ := syscall.SyscallN(procIsWellKnownSid.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(sidType)) isWellKnown = r0 != 0 return } func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + r1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use))) if r1 == 0 { err = errnoErr(e1) } @@ -1022,7 +1022,7 @@ func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen } func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + r1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use))) if r1 == 0 { err = errnoErr(e1) } @@ -1030,7 +1030,7 @@ func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint3 } func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) { - r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid))) + r1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid))) if r1 == 0 { err = errnoErr(e1) } @@ -1038,7 +1038,7 @@ func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err err } func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0) + r1, _, e1 := syscall.SyscallN(procMakeAbsoluteSD.Addr(), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize))) if r1 == 0 { err = errnoErr(e1) } @@ -1046,7 +1046,7 @@ func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DE } func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize))) + r1, _, e1 := syscall.SyscallN(procMakeSelfRelativeSD.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize))) if r1 == 0 { err = errnoErr(e1) } @@ -1054,7 +1054,7 @@ func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURIT } func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) { - r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier))) + r0, _, _ := syscall.SyscallN(procNotifyServiceStatusChangeW.Addr(), uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1062,7 +1062,7 @@ func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERV } func OpenProcessToken(process Handle, access uint32, token *Token) (err error) { - r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token))) + r1, _, e1 := syscall.SyscallN(procOpenProcessToken.Addr(), uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token))) if r1 == 0 { err = errnoErr(e1) } @@ -1070,7 +1070,7 @@ func OpenProcessToken(process Handle, access uint32, token *Token) (err error) { } func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access)) + r0, _, e1 := syscall.SyscallN(procOpenSCManagerW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1079,7 +1079,7 @@ func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (ha } func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access)) + r0, _, e1 := syscall.SyscallN(procOpenServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1092,7 +1092,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token if openAsSelf { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0) + r1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token))) if r1 == 0 { err = errnoErr(e1) } @@ -1100,7 +1100,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token } func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0) + r1, _, e1 := syscall.SyscallN(procQueryServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded))) if r1 == 0 { err = errnoErr(e1) } @@ -1108,7 +1108,7 @@ func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize } func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0) + r1, _, e1 := syscall.SyscallN(procQueryServiceConfigW.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded))) if r1 == 0 { err = errnoErr(e1) } @@ -1120,7 +1120,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf if err != nil { return } - r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo)) + r1, _, e1 := syscall.SyscallN(procQueryServiceDynamicInformation.Addr(), uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo)) if r1 == 0 { err = errnoErr(e1) } @@ -1128,7 +1128,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf } func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0) + r1, _, e1 := syscall.SyscallN(procQueryServiceLockStatusW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded))) if r1 == 0 { err = errnoErr(e1) } @@ -1136,7 +1136,7 @@ func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, b } func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) { - r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0) + r1, _, e1 := syscall.SyscallN(procQueryServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(status))) if r1 == 0 { err = errnoErr(e1) } @@ -1144,7 +1144,7 @@ func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) { } func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0) + r1, _, e1 := syscall.SyscallN(procQueryServiceStatusEx.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded))) if r1 == 0 { err = errnoErr(e1) } @@ -1152,7 +1152,7 @@ func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize } func RegCloseKey(key Handle) (regerrno error) { - r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0) + r0, _, _ := syscall.SyscallN(procRegCloseKey.Addr(), uintptr(key)) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1160,7 +1160,7 @@ func RegCloseKey(key Handle) (regerrno error) { } func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) { - r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0) + r0, _, _ := syscall.SyscallN(procRegEnumKeyExW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1176,7 +1176,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, if asynchronous { _p1 = 1 } - r0, _, _ := syscall.Syscall6(procRegNotifyChangeKeyValue.Addr(), 5, uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1), 0) + r0, _, _ := syscall.SyscallN(procRegNotifyChangeKeyValue.Addr(), uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1)) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1184,7 +1184,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, } func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) { - r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0) + r0, _, _ := syscall.SyscallN(procRegOpenKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1192,7 +1192,7 @@ func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint } func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) { - r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime))) + r0, _, _ := syscall.SyscallN(procRegQueryInfoKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1200,7 +1200,7 @@ func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint } func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { - r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) + r0, _, _ := syscall.SyscallN(procRegQueryValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) if r0 != 0 { regerrno = syscall.Errno(r0) } @@ -1208,7 +1208,7 @@ func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32 } func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0) + r0, _, e1 := syscall.SyscallN(procRegisterEventSourceW.Addr(), uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1217,7 +1217,7 @@ func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Hand } func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context)) + r0, _, e1 := syscall.SyscallN(procRegisterServiceCtrlHandlerExW.Addr(), uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1226,7 +1226,7 @@ func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, cont } func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) { - r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData))) + r1, _, e1 := syscall.SyscallN(procReportEventW.Addr(), uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData))) if r1 == 0 { err = errnoErr(e1) } @@ -1234,7 +1234,7 @@ func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrS } func RevertToSelf() (err error) { - r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0) + r1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr()) if r1 == 0 { err = errnoErr(e1) } @@ -1242,7 +1242,7 @@ func RevertToSelf() (err error) { } func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) { - r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0) + r0, _, _ := syscall.SyscallN(procSetEntriesInAclW.Addr(), uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1250,7 +1250,7 @@ func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCE } func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) { - r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor))) + r1, _, e1 := syscall.SyscallN(procSetKernelObjectSecurity.Addr(), uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor))) if r1 == 0 { err = errnoErr(e1) } @@ -1267,7 +1267,7 @@ func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security } func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) { - r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0) + r0, _, _ := syscall.SyscallN(procSetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1275,7 +1275,7 @@ func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi } func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) { - r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet)) + r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet)) if r1 == 0 { err = errnoErr(e1) } @@ -1291,7 +1291,7 @@ func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl * if daclDefaulted { _p1 = 1 } - r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1)) if r1 == 0 { err = errnoErr(e1) } @@ -1303,7 +1303,7 @@ func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaul if groupDefaulted { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0)) + r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } @@ -1315,7 +1315,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul if ownerDefaulted { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0)) + r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } @@ -1323,7 +1323,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul } func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) { - syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0) + syscall.SyscallN(procSetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl))) return } @@ -1336,7 +1336,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl * if saclDefaulted { _p1 = 1 } - r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1)) if r1 == 0 { err = errnoErr(e1) } @@ -1344,7 +1344,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl * } func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) { - r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0) + r0, _, _ := syscall.SyscallN(procSetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1352,7 +1352,7 @@ func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati } func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) { - r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0) + r1, _, e1 := syscall.SyscallN(procSetServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceStatus))) if r1 == 0 { err = errnoErr(e1) } @@ -1360,7 +1360,7 @@ func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) } func SetThreadToken(thread *Handle, token Token) (err error) { - r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0) + r1, _, e1 := syscall.SyscallN(procSetThreadToken.Addr(), uintptr(unsafe.Pointer(thread)), uintptr(token)) if r1 == 0 { err = errnoErr(e1) } @@ -1368,7 +1368,7 @@ func SetThreadToken(thread *Handle, token Token) (err error) { } func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen)) if r1 == 0 { err = errnoErr(e1) } @@ -1376,7 +1376,7 @@ func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint } func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) { - r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0) + r1, _, e1 := syscall.SyscallN(procStartServiceCtrlDispatcherW.Addr(), uintptr(unsafe.Pointer(serviceTable))) if r1 == 0 { err = errnoErr(e1) } @@ -1384,7 +1384,7 @@ func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) { } func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) { - r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors))) + r1, _, e1 := syscall.SyscallN(procStartServiceW.Addr(), uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors))) if r1 == 0 { err = errnoErr(e1) } @@ -1392,7 +1392,7 @@ func StartService(service Handle, numArgs uint32, argVectors **uint16) (err erro } func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) { - r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCertAddCertificateContextToStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext))) if r1 == 0 { err = errnoErr(e1) } @@ -1400,7 +1400,7 @@ func CertAddCertificateContextToStore(store Handle, certContext *CertContext, ad } func CertCloseStore(store Handle, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procCertCloseStore.Addr(), uintptr(store), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -1408,7 +1408,7 @@ func CertCloseStore(store Handle, flags uint32) (err error) { } func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) { - r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen)) + r0, _, e1 := syscall.SyscallN(procCertCreateCertificateContext.Addr(), uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen)) context = (*CertContext)(unsafe.Pointer(r0)) if context == nil { err = errnoErr(e1) @@ -1417,7 +1417,7 @@ func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, en } func CertDeleteCertificateFromStore(certContext *CertContext) (err error) { - r1, _, e1 := syscall.Syscall(procCertDeleteCertificateFromStore.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCertDeleteCertificateFromStore.Addr(), uintptr(unsafe.Pointer(certContext))) if r1 == 0 { err = errnoErr(e1) } @@ -1425,13 +1425,13 @@ func CertDeleteCertificateFromStore(certContext *CertContext) (err error) { } func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) { - r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0) + r0, _, _ := syscall.SyscallN(procCertDuplicateCertificateContext.Addr(), uintptr(unsafe.Pointer(certContext))) dupContext = (*CertContext)(unsafe.Pointer(r0)) return } func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) { - r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0) + r0, _, e1 := syscall.SyscallN(procCertEnumCertificatesInStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(prevContext))) context = (*CertContext)(unsafe.Pointer(r0)) if context == nil { err = errnoErr(e1) @@ -1440,7 +1440,7 @@ func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (contex } func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) { - r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext))) + r0, _, e1 := syscall.SyscallN(procCertFindCertificateInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext))) cert = (*CertContext)(unsafe.Pointer(r0)) if cert == nil { err = errnoErr(e1) @@ -1449,7 +1449,7 @@ func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags } func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) { - r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext))) + r0, _, e1 := syscall.SyscallN(procCertFindChainInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext))) certchain = (*CertChainContext)(unsafe.Pointer(r0)) if certchain == nil { err = errnoErr(e1) @@ -1458,18 +1458,18 @@ func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint3 } func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) { - r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions))) + r0, _, _ := syscall.SyscallN(procCertFindExtension.Addr(), uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions))) ret = (*CertExtension)(unsafe.Pointer(r0)) return } func CertFreeCertificateChain(ctx *CertChainContext) { - syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + syscall.SyscallN(procCertFreeCertificateChain.Addr(), uintptr(unsafe.Pointer(ctx))) return } func CertFreeCertificateContext(ctx *CertContext) (err error) { - r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCertFreeCertificateContext.Addr(), uintptr(unsafe.Pointer(ctx))) if r1 == 0 { err = errnoErr(e1) } @@ -1477,7 +1477,7 @@ func CertFreeCertificateContext(ctx *CertContext) (err error) { } func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) { - r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0) + r1, _, e1 := syscall.SyscallN(procCertGetCertificateChain.Addr(), uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx))) if r1 == 0 { err = errnoErr(e1) } @@ -1485,13 +1485,13 @@ func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, a } func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) { - r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size)) + r0, _, _ := syscall.SyscallN(procCertGetNameStringW.Addr(), uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size)) chars = uint32(r0) return } func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0) + r0, _, e1 := syscall.SyscallN(procCertOpenStore.Addr(), uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1500,7 +1500,7 @@ func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptPr } func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) { - r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0) + r0, _, e1 := syscall.SyscallN(procCertOpenSystemStoreW.Addr(), uintptr(hprov), uintptr(unsafe.Pointer(name))) store = Handle(r0) if store == 0 { err = errnoErr(e1) @@ -1509,7 +1509,7 @@ func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) { } func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) { - r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCertVerifyCertificateChainPolicy.Addr(), uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status))) if r1 == 0 { err = errnoErr(e1) } @@ -1521,7 +1521,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete if *callerFreeProvOrNCryptKey { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0))) + r1, _, e1 := syscall.SyscallN(procCryptAcquireCertificatePrivateKey.Addr(), uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0))) *callerFreeProvOrNCryptKey = _p0 != 0 if r1 == 0 { err = errnoErr(e1) @@ -1530,7 +1530,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete } func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCryptDecodeObject.Addr(), uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen))) if r1 == 0 { err = errnoErr(e1) } @@ -1538,7 +1538,7 @@ func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte } func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) { - r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCryptProtectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut))) if r1 == 0 { err = errnoErr(e1) } @@ -1546,7 +1546,7 @@ func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, } func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) { - r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0) + r1, _, e1 := syscall.SyscallN(procCryptQueryObject.Addr(), uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context))) if r1 == 0 { err = errnoErr(e1) } @@ -1554,7 +1554,7 @@ func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentT } func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) { - r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCryptUnprotectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut))) if r1 == 0 { err = errnoErr(e1) } @@ -1562,7 +1562,7 @@ func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBl } func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) { - r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags)) + r0, _, e1 := syscall.SyscallN(procPFXImportCertStore.Addr(), uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags)) store = Handle(r0) if store == 0 { err = errnoErr(e1) @@ -1571,7 +1571,7 @@ func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (sto } func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) { - r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0) + r0, _, _ := syscall.SyscallN(procDnsNameCompare_W.Addr(), uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2))) same = r0 != 0 return } @@ -1586,7 +1586,7 @@ func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSR } func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) { - r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr))) + r0, _, _ := syscall.SyscallN(procDnsQuery_W.Addr(), uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr))) if r0 != 0 { status = syscall.Errno(r0) } @@ -1594,12 +1594,12 @@ func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DN } func DnsRecordListFree(rl *DNSRecord, freetype uint32) { - syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0) + syscall.SyscallN(procDnsRecordListFree.Addr(), uintptr(unsafe.Pointer(rl)), uintptr(freetype)) return } func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { - r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) + r0, _, _ := syscall.SyscallN(procDwmGetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size)) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1607,7 +1607,7 @@ func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si } func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { - r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) + r0, _, _ := syscall.SyscallN(procDwmSetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size)) if r0 != 0 { ret = syscall.Errno(r0) } @@ -1615,7 +1615,7 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si } func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { - r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0) + r0, _, _ := syscall.SyscallN(procCancelMibChangeNotify2.Addr(), uintptr(notificationHandle)) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1623,7 +1623,7 @@ func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { } func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { - r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) + r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1631,7 +1631,7 @@ func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapter } func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) { - r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0) + r0, _, _ := syscall.SyscallN(procGetAdaptersInfo.Addr(), uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1639,7 +1639,7 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) { } func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) { - r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0) + r0, _, _ := syscall.SyscallN(procGetBestInterfaceEx.Addr(), uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1647,7 +1647,7 @@ func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcod } func GetIfEntry(pIfRow *MibIfRow) (errcode error) { - r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetIfEntry.Addr(), uintptr(unsafe.Pointer(pIfRow))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1655,7 +1655,7 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { } func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { - r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0) + r0, _, _ := syscall.SyscallN(procGetIfEntry2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(row))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1663,7 +1663,7 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { } func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { - r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1675,7 +1675,7 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa if initialNotification { _p0 = 1 } - r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + r0, _, _ := syscall.SyscallN(procNotifyIpInterfaceChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1687,7 +1687,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext if initialNotification { _p0 = 1 } - r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + r0, _, _ := syscall.SyscallN(procNotifyUnicastIpAddressChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle))) if r0 != 0 { errcode = syscall.Errno(r0) } @@ -1695,7 +1695,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext } func AddDllDirectory(path *uint16) (cookie uintptr, err error) { - r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + r0, _, e1 := syscall.SyscallN(procAddDllDirectory.Addr(), uintptr(unsafe.Pointer(path))) cookie = uintptr(r0) if cookie == 0 { err = errnoErr(e1) @@ -1704,7 +1704,7 @@ func AddDllDirectory(path *uint16) (cookie uintptr, err error) { } func AssignProcessToJobObject(job Handle, process Handle) (err error) { - r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0) + r1, _, e1 := syscall.SyscallN(procAssignProcessToJobObject.Addr(), uintptr(job), uintptr(process)) if r1 == 0 { err = errnoErr(e1) } @@ -1712,7 +1712,7 @@ func AssignProcessToJobObject(job Handle, process Handle) (err error) { } func CancelIo(s Handle) (err error) { - r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0) + r1, _, e1 := syscall.SyscallN(procCancelIo.Addr(), uintptr(s)) if r1 == 0 { err = errnoErr(e1) } @@ -1720,7 +1720,7 @@ func CancelIo(s Handle) (err error) { } func CancelIoEx(s Handle, o *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0) + r1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(s), uintptr(unsafe.Pointer(o))) if r1 == 0 { err = errnoErr(e1) } @@ -1728,7 +1728,7 @@ func CancelIoEx(s Handle, o *Overlapped) (err error) { } func ClearCommBreak(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procClearCommBreak.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procClearCommBreak.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -1736,7 +1736,7 @@ func ClearCommBreak(handle Handle) (err error) { } func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) { - r1, _, e1 := syscall.Syscall(procClearCommError.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat))) + r1, _, e1 := syscall.SyscallN(procClearCommError.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat))) if r1 == 0 { err = errnoErr(e1) } @@ -1744,7 +1744,7 @@ func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error } func CloseHandle(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procCloseHandle.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -1752,12 +1752,12 @@ func CloseHandle(handle Handle) (err error) { } func ClosePseudoConsole(console Handle) { - syscall.Syscall(procClosePseudoConsole.Addr(), 1, uintptr(console), 0, 0) + syscall.SyscallN(procClosePseudoConsole.Addr(), uintptr(console)) return } func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -1765,7 +1765,7 @@ func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) { } func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) { - r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0) + r1, _, e1 := syscall.SyscallN(procCreateDirectoryW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa))) if r1 == 0 { err = errnoErr(e1) } @@ -1773,7 +1773,7 @@ func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) { } func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateEventExW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess)) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) @@ -1782,7 +1782,7 @@ func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, d } func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateEventW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) @@ -1791,7 +1791,7 @@ func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialStat } func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name))) + r0, _, e1 := syscall.SyscallN(procCreateFileMappingW.Addr(), uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) @@ -1800,7 +1800,7 @@ func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxS } func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -1809,7 +1809,7 @@ func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes } func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved)) + r1, _, e1 := syscall.SyscallN(procCreateHardLinkW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved)) if r1&0xff == 0 { err = errnoErr(e1) } @@ -1817,7 +1817,7 @@ func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr } func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1826,7 +1826,7 @@ func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, thr } func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0) + r0, _, e1 := syscall.SyscallN(procCreateJobObjectW.Addr(), uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -1835,7 +1835,7 @@ func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, } func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0) + r0, _, e1 := syscall.SyscallN(procCreateMutexExW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess)) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) @@ -1848,7 +1848,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16 if initialOwner { _p0 = 1 } - r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name))) + r0, _, e1 := syscall.SyscallN(procCreateMutexW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) @@ -1857,7 +1857,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16 } func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0) + r0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa))) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -1866,7 +1866,7 @@ func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances u } func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0) + r1, _, e1 := syscall.SyscallN(procCreatePipe.Addr(), uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size)) if r1 == 0 { err = errnoErr(e1) } @@ -1878,7 +1878,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA if inheritHandles { _p0 = 1 } - r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0) + r1, _, e1 := syscall.SyscallN(procCreateProcessW.Addr(), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo))) if r1 == 0 { err = errnoErr(e1) } @@ -1886,7 +1886,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA } func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) { - r0, _, _ := syscall.Syscall6(procCreatePseudoConsole.Addr(), 5, uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)), 0) + r0, _, _ := syscall.SyscallN(procCreatePseudoConsole.Addr(), uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole))) if r0 != 0 { hr = syscall.Errno(r0) } @@ -1894,7 +1894,7 @@ func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pcons } func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags)) + r1, _, e1 := syscall.SyscallN(procCreateSymbolicLinkW.Addr(), uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags)) if r1&0xff == 0 { err = errnoErr(e1) } @@ -1902,7 +1902,7 @@ func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags u } func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0) + r0, _, e1 := syscall.SyscallN(procCreateToolhelp32Snapshot.Addr(), uintptr(flags), uintptr(processId)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -1911,7 +1911,7 @@ func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, er } func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath))) + r1, _, e1 := syscall.SyscallN(procDefineDosDeviceW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath))) if r1 == 0 { err = errnoErr(e1) } @@ -1919,7 +1919,7 @@ func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err } func DeleteFile(path *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + r1, _, e1 := syscall.SyscallN(procDeleteFileW.Addr(), uintptr(unsafe.Pointer(path))) if r1 == 0 { err = errnoErr(e1) } @@ -1927,12 +1927,12 @@ func DeleteFile(path *uint16) (err error) { } func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) { - syscall.Syscall(procDeleteProcThreadAttributeList.Addr(), 1, uintptr(unsafe.Pointer(attrlist)), 0, 0) + syscall.SyscallN(procDeleteProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist))) return } func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0) + r1, _, e1 := syscall.SyscallN(procDeleteVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint))) if r1 == 0 { err = errnoErr(e1) } @@ -1940,7 +1940,7 @@ func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) { } func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procDeviceIoControl.Addr(), uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -1948,7 +1948,7 @@ func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBuff } func DisconnectNamedPipe(pipe Handle) (err error) { - r1, _, e1 := syscall.Syscall(procDisconnectNamedPipe.Addr(), 1, uintptr(pipe), 0, 0) + r1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe)) if r1 == 0 { err = errnoErr(e1) } @@ -1960,7 +1960,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP if bInheritHandle { _p0 = 1 } - r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0) + r1, _, e1 := syscall.SyscallN(procDuplicateHandle.Addr(), uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions)) if r1 == 0 { err = errnoErr(e1) } @@ -1968,7 +1968,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP } func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) { - r1, _, e1 := syscall.Syscall(procEscapeCommFunction.Addr(), 2, uintptr(handle), uintptr(dwFunc), 0) + r1, _, e1 := syscall.SyscallN(procEscapeCommFunction.Addr(), uintptr(handle), uintptr(dwFunc)) if r1 == 0 { err = errnoErr(e1) } @@ -1976,12 +1976,12 @@ func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) { } func ExitProcess(exitcode uint32) { - syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0) + syscall.SyscallN(procExitProcess.Addr(), uintptr(exitcode)) return } func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) + r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -1990,7 +1990,7 @@ func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, } func FindClose(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procFindClose.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -1998,7 +1998,7 @@ func FindClose(handle Handle) (err error) { } func FindCloseChangeNotification(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procFindCloseChangeNotification.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -2019,7 +2019,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter if watchSubtree { _p1 = 1 } - r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter)) + r0, _, e1 := syscall.SyscallN(procFindFirstChangeNotificationW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -2028,7 +2028,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter } func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0) + r0, _, e1 := syscall.SyscallN(procFindFirstFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data))) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -2037,7 +2037,7 @@ func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err erro } func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) + r0, _, e1 := syscall.SyscallN(procFindFirstVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -2046,7 +2046,7 @@ func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, b } func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0) + r0, _, e1 := syscall.SyscallN(procFindFirstVolumeW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -2055,7 +2055,7 @@ func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, er } func FindNextChangeNotification(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procFindNextChangeNotification.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -2063,7 +2063,7 @@ func FindNextChangeNotification(handle Handle) (err error) { } func findNextFile1(handle Handle, data *win32finddata1) (err error) { - r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + r1, _, e1 := syscall.SyscallN(procFindNextFileW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data))) if r1 == 0 { err = errnoErr(e1) } @@ -2071,7 +2071,7 @@ func findNextFile1(handle Handle, data *win32finddata1) (err error) { } func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) { - r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) + r1, _, e1 := syscall.SyscallN(procFindNextVolumeMountPointW.Addr(), uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } @@ -2079,7 +2079,7 @@ func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uin } func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) { - r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength)) + r1, _, e1 := syscall.SyscallN(procFindNextVolumeW.Addr(), uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } @@ -2087,7 +2087,7 @@ func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) } func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) { - r0, _, e1 := syscall.Syscall(procFindResourceW.Addr(), 3, uintptr(module), uintptr(name), uintptr(resType)) + r0, _, e1 := syscall.SyscallN(procFindResourceW.Addr(), uintptr(module), uintptr(name), uintptr(resType)) resInfo = Handle(r0) if resInfo == 0 { err = errnoErr(e1) @@ -2096,7 +2096,7 @@ func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, } func FindVolumeClose(findVolume Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0) + r1, _, e1 := syscall.SyscallN(procFindVolumeClose.Addr(), uintptr(findVolume)) if r1 == 0 { err = errnoErr(e1) } @@ -2104,7 +2104,7 @@ func FindVolumeClose(findVolume Handle) (err error) { } func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0) + r1, _, e1 := syscall.SyscallN(procFindVolumeMountPointClose.Addr(), uintptr(findVolumeMountPoint)) if r1 == 0 { err = errnoErr(e1) } @@ -2112,7 +2112,7 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) { } func FlushFileBuffers(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -2120,7 +2120,7 @@ func FlushFileBuffers(handle Handle) (err error) { } func FlushViewOfFile(addr uintptr, length uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0) + r1, _, e1 := syscall.SyscallN(procFlushViewOfFile.Addr(), uintptr(addr), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } @@ -2132,7 +2132,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu if len(buf) > 0 { _p0 = &buf[0] } - r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0) + r0, _, e1 := syscall.SyscallN(procFormatMessageW.Addr(), uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args))) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2141,7 +2141,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu } func FreeEnvironmentStrings(envs *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0) + r1, _, e1 := syscall.SyscallN(procFreeEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(envs))) if r1 == 0 { err = errnoErr(e1) } @@ -2149,7 +2149,7 @@ func FreeEnvironmentStrings(envs *uint16) (err error) { } func FreeLibrary(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procFreeLibrary.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -2157,7 +2157,7 @@ func FreeLibrary(handle Handle) (err error) { } func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0) + r1, _, e1 := syscall.SyscallN(procGenerateConsoleCtrlEvent.Addr(), uintptr(ctrlEvent), uintptr(processGroupID)) if r1 == 0 { err = errnoErr(e1) } @@ -2165,19 +2165,19 @@ func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err erro } func GetACP() (acp uint32) { - r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetACP.Addr()) acp = uint32(r0) return } func GetActiveProcessorCount(groupNumber uint16) (ret uint32) { - r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0) + r0, _, _ := syscall.SyscallN(procGetActiveProcessorCount.Addr(), uintptr(groupNumber)) ret = uint32(r0) return } func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetCommModemStatus.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)), 0) + r1, _, e1 := syscall.SyscallN(procGetCommModemStatus.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpModemStat))) if r1 == 0 { err = errnoErr(e1) } @@ -2185,7 +2185,7 @@ func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) { } func GetCommState(handle Handle, lpDCB *DCB) (err error) { - r1, _, e1 := syscall.Syscall(procGetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) + r1, _, e1 := syscall.SyscallN(procGetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB))) if r1 == 0 { err = errnoErr(e1) } @@ -2193,7 +2193,7 @@ func GetCommState(handle Handle, lpDCB *DCB) (err error) { } func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { - r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) + r1, _, e1 := syscall.SyscallN(procGetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts))) if r1 == 0 { err = errnoErr(e1) } @@ -2201,13 +2201,13 @@ func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { } func GetCommandLine() (cmd *uint16) { - r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetCommandLineW.Addr()) cmd = (*uint16)(unsafe.Pointer(r0)) return } func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n))) + r1, _, e1 := syscall.SyscallN(procGetComputerNameExW.Addr(), uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n))) if r1 == 0 { err = errnoErr(e1) } @@ -2215,7 +2215,7 @@ func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) { } func GetComputerName(buf *uint16, n *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0) + r1, _, e1 := syscall.SyscallN(procGetComputerNameW.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n))) if r1 == 0 { err = errnoErr(e1) } @@ -2223,7 +2223,7 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { } func GetConsoleCP() (cp uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) + r0, _, e1 := syscall.SyscallN(procGetConsoleCP.Addr()) cp = uint32(r0) if cp == 0 { err = errnoErr(e1) @@ -2232,7 +2232,7 @@ func GetConsoleCP() (cp uint32, err error) { } func GetConsoleMode(console Handle, mode *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) + r1, _, e1 := syscall.SyscallN(procGetConsoleMode.Addr(), uintptr(console), uintptr(unsafe.Pointer(mode))) if r1 == 0 { err = errnoErr(e1) } @@ -2240,7 +2240,7 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { } func GetConsoleOutputCP() (cp uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) + r0, _, e1 := syscall.SyscallN(procGetConsoleOutputCP.Addr()) cp = uint32(r0) if cp == 0 { err = errnoErr(e1) @@ -2249,7 +2249,7 @@ func GetConsoleOutputCP() (cp uint32, err error) { } func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { - r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) + r1, _, e1 := syscall.SyscallN(procGetConsoleScreenBufferInfo.Addr(), uintptr(console), uintptr(unsafe.Pointer(info))) if r1 == 0 { err = errnoErr(e1) } @@ -2257,7 +2257,7 @@ func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) ( } func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + r0, _, e1 := syscall.SyscallN(procGetCurrentDirectoryW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf))) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2266,19 +2266,19 @@ func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) { } func GetCurrentProcessId() (pid uint32) { - r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetCurrentProcessId.Addr()) pid = uint32(r0) return } func GetCurrentThreadId() (id uint32) { - r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetCurrentThreadId.Addr()) id = uint32(r0) return } func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) { - r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetDiskFreeSpaceExW.Addr(), uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes))) if r1 == 0 { err = errnoErr(e1) } @@ -2286,13 +2286,13 @@ func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint6 } func GetDriveType(rootPathName *uint16) (driveType uint32) { - r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetDriveTypeW.Addr(), uintptr(unsafe.Pointer(rootPathName))) driveType = uint32(r0) return } func GetEnvironmentStrings() (envs *uint16, err error) { - r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0) + r0, _, e1 := syscall.SyscallN(procGetEnvironmentStringsW.Addr()) envs = (*uint16)(unsafe.Pointer(r0)) if envs == nil { err = errnoErr(e1) @@ -2301,7 +2301,7 @@ func GetEnvironmentStrings() (envs *uint16, err error) { } func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size)) + r0, _, e1 := syscall.SyscallN(procGetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2310,7 +2310,7 @@ func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32 } func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0) + r1, _, e1 := syscall.SyscallN(procGetExitCodeProcess.Addr(), uintptr(handle), uintptr(unsafe.Pointer(exitcode))) if r1 == 0 { err = errnoErr(e1) } @@ -2318,7 +2318,7 @@ func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) { } func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) { - r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info))) + r1, _, e1 := syscall.SyscallN(procGetFileAttributesExW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info))) if r1 == 0 { err = errnoErr(e1) } @@ -2326,7 +2326,7 @@ func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) { } func GetFileAttributes(name *uint16) (attrs uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name))) attrs = uint32(r0) if attrs == INVALID_FILE_ATTRIBUTES { err = errnoErr(e1) @@ -2335,7 +2335,7 @@ func GetFileAttributes(name *uint16) (attrs uint32, err error) { } func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) { - r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandle.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data))) if r1 == 0 { err = errnoErr(e1) } @@ -2343,7 +2343,7 @@ func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (e } func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandleEx.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen)) if r1 == 0 { err = errnoErr(e1) } @@ -2351,7 +2351,7 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, } func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { - r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime))) if r1 == 0 { err = errnoErr(e1) } @@ -2359,7 +2359,7 @@ func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim } func GetFileType(filehandle Handle) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetFileType.Addr(), uintptr(filehandle)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2368,7 +2368,7 @@ func GetFileType(filehandle Handle) (n uint32, err error) { } func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetFinalPathNameByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2377,7 +2377,7 @@ func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32 } func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) { - r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetFullPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname))) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2386,13 +2386,13 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) ( } func GetLargePageMinimum() (size uintptr) { - r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetLargePageMinimum.Addr()) size = uintptr(r0) return } func GetLastError() (lasterr error) { - r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetLastError.Addr()) if r0 != 0 { lasterr = syscall.Errno(r0) } @@ -2400,7 +2400,7 @@ func GetLastError() (lasterr error) { } func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0) + r0, _, e1 := syscall.SyscallN(procGetLogicalDriveStringsW.Addr(), uintptr(bufferLength), uintptr(unsafe.Pointer(buffer))) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2409,7 +2409,7 @@ func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err } func GetLogicalDrives() (drivesBitMask uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0) + r0, _, e1 := syscall.SyscallN(procGetLogicalDrives.Addr()) drivesBitMask = uint32(r0) if drivesBitMask == 0 { err = errnoErr(e1) @@ -2418,7 +2418,7 @@ func GetLogicalDrives() (drivesBitMask uint32, err error) { } func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen)) + r0, _, e1 := syscall.SyscallN(procGetLongPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2427,13 +2427,13 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er } func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) { - r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0) + r0, _, _ := syscall.SyscallN(procGetMaximumProcessorCount.Addr(), uintptr(groupNumber)) ret = uint32(r0) return } func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size)) + r0, _, e1 := syscall.SyscallN(procGetModuleFileNameW.Addr(), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2442,7 +2442,7 @@ func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, } func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) { - r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module))) + r1, _, e1 := syscall.SyscallN(procGetModuleHandleExW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module))) if r1 == 0 { err = errnoErr(e1) } @@ -2450,7 +2450,7 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er } func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0) + r1, _, e1 := syscall.SyscallN(procGetNamedPipeClientProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID))) if r1 == 0 { err = errnoErr(e1) } @@ -2458,7 +2458,7 @@ func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err erro } func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize)) if r1 == 0 { err = errnoErr(e1) } @@ -2466,7 +2466,7 @@ func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, m } func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0) + r1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances))) if r1 == 0 { err = errnoErr(e1) } @@ -2474,7 +2474,7 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3 } func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0) + r1, _, e1 := syscall.SyscallN(procGetNamedPipeServerProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID))) if r1 == 0 { err = errnoErr(e1) } @@ -2486,7 +2486,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa if wait { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetOverlappedResult.Addr(), uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } @@ -2494,7 +2494,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa } func GetPriorityClass(process Handle) (ret uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetPriorityClass.Addr(), uintptr(process)) ret = uint32(r0) if ret == 0 { err = errnoErr(e1) @@ -2512,7 +2512,7 @@ func GetProcAddress(module Handle, procname string) (proc uintptr, err error) { } func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) { - r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0) + r0, _, e1 := syscall.SyscallN(procGetProcAddress.Addr(), uintptr(module), uintptr(unsafe.Pointer(procname))) proc = uintptr(r0) if proc == 0 { err = errnoErr(e1) @@ -2521,7 +2521,7 @@ func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) { } func GetProcessId(process Handle) (id uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetProcessId.Addr(), uintptr(process)) id = uint32(r0) if id == 0 { err = errnoErr(e1) @@ -2530,7 +2530,7 @@ func GetProcessId(process Handle) (id uint32, err error) { } func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetProcessPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize))) if r1 == 0 { err = errnoErr(e1) } @@ -2538,7 +2538,7 @@ func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uin } func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0) + r1, _, e1 := syscall.SyscallN(procGetProcessShutdownParameters.Addr(), uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags))) if r1 == 0 { err = errnoErr(e1) } @@ -2546,7 +2546,7 @@ func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) { } func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) { - r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0) + r1, _, e1 := syscall.SyscallN(procGetProcessTimes.Addr(), uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime))) if r1 == 0 { err = errnoErr(e1) } @@ -2554,12 +2554,12 @@ func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, } func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) { - syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0) + syscall.SyscallN(procGetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags))) return } func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0) + r1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout)) if r1 == 0 { err = errnoErr(e1) } @@ -2567,7 +2567,7 @@ func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overl } func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen)) + r0, _, e1 := syscall.SyscallN(procGetShortPathNameW.Addr(), uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2576,12 +2576,12 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin } func getStartupInfo(startupInfo *StartupInfo) { - syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) + syscall.SyscallN(procGetStartupInfoW.Addr(), uintptr(unsafe.Pointer(startupInfo))) return } func GetStdHandle(stdhandle uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetStdHandle.Addr(), uintptr(stdhandle)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -2590,7 +2590,7 @@ func GetStdHandle(stdhandle uint32) (handle Handle, err error) { } func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) + r0, _, e1 := syscall.SyscallN(procGetSystemDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen)) len = uint32(r0) if len == 0 { err = errnoErr(e1) @@ -2599,7 +2599,7 @@ func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { } func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetSystemPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize))) if r1 == 0 { err = errnoErr(e1) } @@ -2607,17 +2607,17 @@ func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint } func GetSystemTimeAsFileTime(time *Filetime) { - syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) + syscall.SyscallN(procGetSystemTimeAsFileTime.Addr(), uintptr(unsafe.Pointer(time))) return } func GetSystemTimePreciseAsFileTime(time *Filetime) { - syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) + syscall.SyscallN(procGetSystemTimePreciseAsFileTime.Addr(), uintptr(unsafe.Pointer(time))) return } func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) + r0, _, e1 := syscall.SyscallN(procGetSystemWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen)) len = uint32(r0) if len == 0 { err = errnoErr(e1) @@ -2626,7 +2626,7 @@ func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err erro } func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + r0, _, e1 := syscall.SyscallN(procGetTempPathW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf))) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2635,7 +2635,7 @@ func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) { } func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetThreadPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize))) if r1 == 0 { err = errnoErr(e1) } @@ -2643,13 +2643,13 @@ func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint } func getTickCount64() (ms uint64) { - r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetTickCount64.Addr()) ms = uint64(r0) return } func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0) + r0, _, e1 := syscall.SyscallN(procGetTimeZoneInformation.Addr(), uintptr(unsafe.Pointer(tzi))) rc = uint32(r0) if rc == 0xffffffff { err = errnoErr(e1) @@ -2658,7 +2658,7 @@ func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) { } func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetUserPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize))) if r1 == 0 { err = errnoErr(e1) } @@ -2666,7 +2666,7 @@ func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16 } func GetVersion() (ver uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0) + r0, _, e1 := syscall.SyscallN(procGetVersion.Addr()) ver = uint32(r0) if ver == 0 { err = errnoErr(e1) @@ -2675,7 +2675,7 @@ func GetVersion() (ver uint32, err error) { } func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) + r1, _, e1 := syscall.SyscallN(procGetVolumeInformationByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize)) if r1 == 0 { err = errnoErr(e1) } @@ -2683,7 +2683,7 @@ func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeN } func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) + r1, _, e1 := syscall.SyscallN(procGetVolumeInformationW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize)) if r1 == 0 { err = errnoErr(e1) } @@ -2691,7 +2691,7 @@ func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volume } func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength)) + r1, _, e1 := syscall.SyscallN(procGetVolumeNameForVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength)) if r1 == 0 { err = errnoErr(e1) } @@ -2699,7 +2699,7 @@ func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint } func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength)) + r1, _, e1 := syscall.SyscallN(procGetVolumePathNameW.Addr(), uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } @@ -2707,7 +2707,7 @@ func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength ui } func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetVolumePathNamesForVolumeNameW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength))) if r1 == 0 { err = errnoErr(e1) } @@ -2715,7 +2715,7 @@ func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16 } func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) + r0, _, e1 := syscall.SyscallN(procGetWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen)) len = uint32(r0) if len == 0 { err = errnoErr(e1) @@ -2724,7 +2724,7 @@ func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { } func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procInitializeProcThreadAttributeList.Addr(), 4, uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)), 0, 0) + r1, _, e1 := syscall.SyscallN(procInitializeProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size))) if r1 == 0 { err = errnoErr(e1) } @@ -2736,7 +2736,7 @@ func IsWow64Process(handle Handle, isWow64 *bool) (err error) { if *isWow64 { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0) + r1, _, e1 := syscall.SyscallN(procIsWow64Process.Addr(), uintptr(handle), uintptr(unsafe.Pointer(&_p0))) *isWow64 = _p0 != 0 if r1 == 0 { err = errnoErr(e1) @@ -2749,7 +2749,7 @@ func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint1 if err != nil { return } - r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine))) + r1, _, e1 := syscall.SyscallN(procIsWow64Process2.Addr(), uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine))) if r1 == 0 { err = errnoErr(e1) } @@ -2766,7 +2766,7 @@ func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, e } func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags)) + r0, _, e1 := syscall.SyscallN(procLoadLibraryExW.Addr(), uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2784,7 +2784,7 @@ func LoadLibrary(libname string) (handle Handle, err error) { } func _LoadLibrary(libname *uint16) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0) + r0, _, e1 := syscall.SyscallN(procLoadLibraryW.Addr(), uintptr(unsafe.Pointer(libname))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2793,7 +2793,7 @@ func _LoadLibrary(libname *uint16) (handle Handle, err error) { } func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) { - r0, _, e1 := syscall.Syscall(procLoadResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0) + r0, _, e1 := syscall.SyscallN(procLoadResource.Addr(), uintptr(module), uintptr(resInfo)) resData = Handle(r0) if resData == 0 { err = errnoErr(e1) @@ -2802,7 +2802,7 @@ func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) { } func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) { - r0, _, e1 := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(length), 0) + r0, _, e1 := syscall.SyscallN(procLocalAlloc.Addr(), uintptr(flags), uintptr(length)) ptr = uintptr(r0) if ptr == 0 { err = errnoErr(e1) @@ -2811,7 +2811,7 @@ func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) { } func LocalFree(hmem Handle) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0) + r0, _, e1 := syscall.SyscallN(procLocalFree.Addr(), uintptr(hmem)) handle = Handle(r0) if handle != 0 { err = errnoErr(e1) @@ -2820,7 +2820,7 @@ func LocalFree(hmem Handle) (handle Handle, err error) { } func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped))) + r1, _, e1 := syscall.SyscallN(procLockFileEx.Addr(), uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -2828,7 +2828,7 @@ func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, byt } func LockResource(resData Handle) (addr uintptr, err error) { - r0, _, e1 := syscall.Syscall(procLockResource.Addr(), 1, uintptr(resData), 0, 0) + r0, _, e1 := syscall.SyscallN(procLockResource.Addr(), uintptr(resData)) addr = uintptr(r0) if addr == 0 { err = errnoErr(e1) @@ -2837,7 +2837,7 @@ func LockResource(resData Handle) (addr uintptr, err error) { } func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) { - r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0) + r0, _, e1 := syscall.SyscallN(procMapViewOfFile.Addr(), uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length)) addr = uintptr(r0) if addr == 0 { err = errnoErr(e1) @@ -2846,7 +2846,7 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui } func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0) + r1, _, e1 := syscall.SyscallN(procModule32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -2854,7 +2854,7 @@ func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { } func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0) + r1, _, e1 := syscall.SyscallN(procModule32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -2862,7 +2862,7 @@ func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { } func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) + r1, _, e1 := syscall.SyscallN(procMoveFileExW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -2870,7 +2870,7 @@ func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) { } func MoveFile(from *uint16, to *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0) + r1, _, e1 := syscall.SyscallN(procMoveFileW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to))) if r1 == 0 { err = errnoErr(e1) } @@ -2878,7 +2878,7 @@ func MoveFile(from *uint16, to *uint16) (err error) { } func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) { - r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar)) + r0, _, e1 := syscall.SyscallN(procMultiByteToWideChar.Addr(), uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar)) nwrite = int32(r0) if nwrite == 0 { err = errnoErr(e1) @@ -2891,7 +2891,7 @@ func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H if inheritHandle { _p0 = 1 } - r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) + r0, _, e1 := syscall.SyscallN(procOpenEventW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2904,7 +2904,7 @@ func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H if inheritHandle { _p0 = 1 } - r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) + r0, _, e1 := syscall.SyscallN(procOpenMutexW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2917,7 +2917,7 @@ func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (ha if inheritHandle { _p0 = 1 } - r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId)) + r0, _, e1 := syscall.SyscallN(procOpenProcess.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(processId)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2930,7 +2930,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand if inheritHandle { _p0 = 1 } - r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId)) + r0, _, e1 := syscall.SyscallN(procOpenThread.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(threadId)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) @@ -2939,7 +2939,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand } func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0) + r1, _, e1 := syscall.SyscallN(procPostQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -2947,7 +2947,7 @@ func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overla } func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + r1, _, e1 := syscall.SyscallN(procProcess32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -2955,7 +2955,7 @@ func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) { } func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + r1, _, e1 := syscall.SyscallN(procProcess32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -2963,7 +2963,7 @@ func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) { } func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procProcessIdToSessionId.Addr(), 2, uintptr(pid), uintptr(unsafe.Pointer(sessionid)), 0) + r1, _, e1 := syscall.SyscallN(procProcessIdToSessionId.Addr(), uintptr(pid), uintptr(unsafe.Pointer(sessionid))) if r1 == 0 { err = errnoErr(e1) } @@ -2971,7 +2971,7 @@ func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) { } func PulseEvent(event Handle) (err error) { - r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0) + r1, _, e1 := syscall.SyscallN(procPulseEvent.Addr(), uintptr(event)) if r1 == 0 { err = errnoErr(e1) } @@ -2979,7 +2979,7 @@ func PulseEvent(event Handle) (err error) { } func PurgeComm(handle Handle, dwFlags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procPurgeComm.Addr(), 2, uintptr(handle), uintptr(dwFlags), 0) + r1, _, e1 := syscall.SyscallN(procPurgeComm.Addr(), uintptr(handle), uintptr(dwFlags)) if r1 == 0 { err = errnoErr(e1) } @@ -2987,7 +2987,7 @@ func PurgeComm(handle Handle, dwFlags uint32) (err error) { } func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) { - r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max)) + r0, _, e1 := syscall.SyscallN(procQueryDosDeviceW.Addr(), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max)) n = uint32(r0) if n == 0 { err = errnoErr(e1) @@ -2996,7 +2996,7 @@ func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint3 } func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryFullProcessImageNameW.Addr(), 4, uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)), 0, 0) + r1, _, e1 := syscall.SyscallN(procQueryFullProcessImageNameW.Addr(), uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size))) if r1 == 0 { err = errnoErr(e1) } @@ -3004,7 +3004,7 @@ func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size } func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)), 0) + r1, _, e1 := syscall.SyscallN(procQueryInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen))) if r1 == 0 { err = errnoErr(e1) } @@ -3012,7 +3012,7 @@ func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobO } func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) { - r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0) + r1, _, e1 := syscall.SyscallN(procReadConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl))) if r1 == 0 { err = errnoErr(e1) } @@ -3024,7 +3024,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree if watchSubTree { _p0 = 1 } - r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0) + r1, _, e1 := syscall.SyscallN(procReadDirectoryChangesW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine)) if r1 == 0 { err = errnoErr(e1) } @@ -3036,7 +3036,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) ( if len(buf) > 0 { _p0 = &buf[0] } - r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procReadFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -3044,7 +3044,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) ( } func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0) + r1, _, e1 := syscall.SyscallN(procReadProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead))) if r1 == 0 { err = errnoErr(e1) } @@ -3052,7 +3052,7 @@ func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size u } func ReleaseMutex(mutex Handle) (err error) { - r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0) + r1, _, e1 := syscall.SyscallN(procReleaseMutex.Addr(), uintptr(mutex)) if r1 == 0 { err = errnoErr(e1) } @@ -3060,7 +3060,7 @@ func ReleaseMutex(mutex Handle) (err error) { } func RemoveDirectory(path *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + r1, _, e1 := syscall.SyscallN(procRemoveDirectoryW.Addr(), uintptr(unsafe.Pointer(path))) if r1 == 0 { err = errnoErr(e1) } @@ -3068,7 +3068,7 @@ func RemoveDirectory(path *uint16) (err error) { } func RemoveDllDirectory(cookie uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0) + r1, _, e1 := syscall.SyscallN(procRemoveDllDirectory.Addr(), uintptr(cookie)) if r1 == 0 { err = errnoErr(e1) } @@ -3076,7 +3076,7 @@ func RemoveDllDirectory(cookie uintptr) (err error) { } func ResetEvent(event Handle) (err error) { - r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0) + r1, _, e1 := syscall.SyscallN(procResetEvent.Addr(), uintptr(event)) if r1 == 0 { err = errnoErr(e1) } @@ -3084,7 +3084,7 @@ func ResetEvent(event Handle) (err error) { } func resizePseudoConsole(pconsole Handle, size uint32) (hr error) { - r0, _, _ := syscall.Syscall(procResizePseudoConsole.Addr(), 2, uintptr(pconsole), uintptr(size), 0) + r0, _, _ := syscall.SyscallN(procResizePseudoConsole.Addr(), uintptr(pconsole), uintptr(size)) if r0 != 0 { hr = syscall.Errno(r0) } @@ -3092,7 +3092,7 @@ func resizePseudoConsole(pconsole Handle, size uint32) (hr error) { } func ResumeThread(thread Handle) (ret uint32, err error) { - r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0) + r0, _, e1 := syscall.SyscallN(procResumeThread.Addr(), uintptr(thread)) ret = uint32(r0) if ret == 0xffffffff { err = errnoErr(e1) @@ -3101,7 +3101,7 @@ func ResumeThread(thread Handle) (ret uint32, err error) { } func SetCommBreak(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procSetCommBreak.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetCommBreak.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -3109,7 +3109,7 @@ func SetCommBreak(handle Handle) (err error) { } func SetCommMask(handle Handle, dwEvtMask uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetCommMask.Addr(), 2, uintptr(handle), uintptr(dwEvtMask), 0) + r1, _, e1 := syscall.SyscallN(procSetCommMask.Addr(), uintptr(handle), uintptr(dwEvtMask)) if r1 == 0 { err = errnoErr(e1) } @@ -3117,7 +3117,7 @@ func SetCommMask(handle Handle, dwEvtMask uint32) (err error) { } func SetCommState(handle Handle, lpDCB *DCB) (err error) { - r1, _, e1 := syscall.Syscall(procSetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) + r1, _, e1 := syscall.SyscallN(procSetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB))) if r1 == 0 { err = errnoErr(e1) } @@ -3125,7 +3125,7 @@ func SetCommState(handle Handle, lpDCB *DCB) (err error) { } func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { - r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) + r1, _, e1 := syscall.SyscallN(procSetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts))) if r1 == 0 { err = errnoErr(e1) } @@ -3133,7 +3133,7 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { } func SetConsoleCP(cp uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetConsoleCP.Addr(), uintptr(cp)) if r1 == 0 { err = errnoErr(e1) } @@ -3141,7 +3141,7 @@ func SetConsoleCP(cp uint32) (err error) { } func setConsoleCursorPosition(console Handle, position uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) + r1, _, e1 := syscall.SyscallN(procSetConsoleCursorPosition.Addr(), uintptr(console), uintptr(position)) if r1 == 0 { err = errnoErr(e1) } @@ -3149,7 +3149,7 @@ func setConsoleCursorPosition(console Handle, position uint32) (err error) { } func SetConsoleMode(console Handle, mode uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0) + r1, _, e1 := syscall.SyscallN(procSetConsoleMode.Addr(), uintptr(console), uintptr(mode)) if r1 == 0 { err = errnoErr(e1) } @@ -3157,7 +3157,7 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { } func SetConsoleOutputCP(cp uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetConsoleOutputCP.Addr(), uintptr(cp)) if r1 == 0 { err = errnoErr(e1) } @@ -3165,7 +3165,7 @@ func SetConsoleOutputCP(cp uint32) (err error) { } func SetCurrentDirectory(path *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetCurrentDirectoryW.Addr(), uintptr(unsafe.Pointer(path))) if r1 == 0 { err = errnoErr(e1) } @@ -3173,7 +3173,7 @@ func SetCurrentDirectory(path *uint16) (err error) { } func SetDefaultDllDirectories(directoryFlags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetDefaultDllDirectories.Addr(), 1, uintptr(directoryFlags), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetDefaultDllDirectories.Addr(), uintptr(directoryFlags)) if r1 == 0 { err = errnoErr(e1) } @@ -3190,7 +3190,7 @@ func SetDllDirectory(path string) (err error) { } func _SetDllDirectory(path *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procSetDllDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetDllDirectoryW.Addr(), uintptr(unsafe.Pointer(path))) if r1 == 0 { err = errnoErr(e1) } @@ -3198,7 +3198,7 @@ func _SetDllDirectory(path *uint16) (err error) { } func SetEndOfFile(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetEndOfFile.Addr(), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -3206,7 +3206,7 @@ func SetEndOfFile(handle Handle) (err error) { } func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) + r1, _, e1 := syscall.SyscallN(procSetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value))) if r1 == 0 { err = errnoErr(e1) } @@ -3214,13 +3214,13 @@ func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { } func SetErrorMode(mode uint32) (ret uint32) { - r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0) + r0, _, _ := syscall.SyscallN(procSetErrorMode.Addr(), uintptr(mode)) ret = uint32(r0) return } func SetEvent(event Handle) (err error) { - r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetEvent.Addr(), uintptr(event)) if r1 == 0 { err = errnoErr(e1) } @@ -3228,7 +3228,7 @@ func SetEvent(event Handle) (err error) { } func SetFileAttributes(name *uint16, attrs uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0) + r1, _, e1 := syscall.SyscallN(procSetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(attrs)) if r1 == 0 { err = errnoErr(e1) } @@ -3236,7 +3236,7 @@ func SetFileAttributes(name *uint16, attrs uint32) (err error) { } func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) { - r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(handle), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -3244,7 +3244,7 @@ func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) } func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetFileInformationByHandle.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen)) if r1 == 0 { err = errnoErr(e1) } @@ -3252,7 +3252,7 @@ func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inB } func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) { - r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0) + r0, _, e1 := syscall.SyscallN(procSetFilePointer.Addr(), uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence)) newlowoffset = uint32(r0) if newlowoffset == 0xffffffff { err = errnoErr(e1) @@ -3261,7 +3261,7 @@ func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence } func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { - r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime))) if r1 == 0 { err = errnoErr(e1) } @@ -3269,7 +3269,7 @@ func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim } func SetFileValidData(handle Handle, validDataLength int64) (err error) { - r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) + r1, _, e1 := syscall.SyscallN(procSetFileValidData.Addr(), uintptr(handle), uintptr(validDataLength)) if r1 == 0 { err = errnoErr(e1) } @@ -3277,7 +3277,7 @@ func SetFileValidData(handle Handle, validDataLength int64) (err error) { } func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags)) + r1, _, e1 := syscall.SyscallN(procSetHandleInformation.Addr(), uintptr(handle), uintptr(mask), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -3285,7 +3285,7 @@ func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) } func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) { - r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0) + r0, _, e1 := syscall.SyscallN(procSetInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength)) ret = int(r0) if ret == 0 { err = errnoErr(e1) @@ -3294,7 +3294,7 @@ func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobOb } func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetNamedPipeHandleState.Addr(), 4, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetNamedPipeHandleState.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout))) if r1 == 0 { err = errnoErr(e1) } @@ -3302,7 +3302,7 @@ func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uin } func SetPriorityClass(process Handle, priorityClass uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0) + r1, _, e1 := syscall.SyscallN(procSetPriorityClass.Addr(), uintptr(process), uintptr(priorityClass)) if r1 == 0 { err = errnoErr(e1) } @@ -3314,7 +3314,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) { if disable { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0) + r1, _, e1 := syscall.SyscallN(procSetProcessPriorityBoost.Addr(), uintptr(process), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } @@ -3322,7 +3322,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) { } func SetProcessShutdownParameters(level uint32, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procSetProcessShutdownParameters.Addr(), uintptr(level), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -3330,7 +3330,7 @@ func SetProcessShutdownParameters(level uint32, flags uint32) (err error) { } func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -3338,7 +3338,7 @@ func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr } func SetStdHandle(stdhandle uint32, handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0) + r1, _, e1 := syscall.SyscallN(procSetStdHandle.Addr(), uintptr(stdhandle), uintptr(handle)) if r1 == 0 { err = errnoErr(e1) } @@ -3346,7 +3346,7 @@ func SetStdHandle(stdhandle uint32, handle Handle) (err error) { } func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0) + r1, _, e1 := syscall.SyscallN(procSetVolumeLabelW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName))) if r1 == 0 { err = errnoErr(e1) } @@ -3354,7 +3354,7 @@ func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) { } func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0) + r1, _, e1 := syscall.SyscallN(procSetVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName))) if r1 == 0 { err = errnoErr(e1) } @@ -3362,7 +3362,7 @@ func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err erro } func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) { - r1, _, e1 := syscall.Syscall(procSetupComm.Addr(), 3, uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue)) + r1, _, e1 := syscall.SyscallN(procSetupComm.Addr(), uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue)) if r1 == 0 { err = errnoErr(e1) } @@ -3370,7 +3370,7 @@ func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) { } func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) { - r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0) + r0, _, e1 := syscall.SyscallN(procSizeofResource.Addr(), uintptr(module), uintptr(resInfo)) size = uint32(r0) if size == 0 { err = errnoErr(e1) @@ -3383,13 +3383,13 @@ func SleepEx(milliseconds uint32, alertable bool) (ret uint32) { if alertable { _p0 = 1 } - r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0) + r0, _, _ := syscall.SyscallN(procSleepEx.Addr(), uintptr(milliseconds), uintptr(_p0)) ret = uint32(r0) return } func TerminateJobObject(job Handle, exitCode uint32) (err error) { - r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0) + r1, _, e1 := syscall.SyscallN(procTerminateJobObject.Addr(), uintptr(job), uintptr(exitCode)) if r1 == 0 { err = errnoErr(e1) } @@ -3397,7 +3397,7 @@ func TerminateJobObject(job Handle, exitCode uint32) (err error) { } func TerminateProcess(handle Handle, exitcode uint32) (err error) { - r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0) + r1, _, e1 := syscall.SyscallN(procTerminateProcess.Addr(), uintptr(handle), uintptr(exitcode)) if r1 == 0 { err = errnoErr(e1) } @@ -3405,7 +3405,7 @@ func TerminateProcess(handle Handle, exitcode uint32) (err error) { } func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0) + r1, _, e1 := syscall.SyscallN(procThread32First.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -3413,7 +3413,7 @@ func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) { } func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) { - r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0) + r1, _, e1 := syscall.SyscallN(procThread32Next.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry))) if r1 == 0 { err = errnoErr(e1) } @@ -3421,7 +3421,7 @@ func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) { } func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procUnlockFileEx.Addr(), uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -3429,7 +3429,7 @@ func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint3 } func UnmapViewOfFile(addr uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0) + r1, _, e1 := syscall.SyscallN(procUnmapViewOfFile.Addr(), uintptr(addr)) if r1 == 0 { err = errnoErr(e1) } @@ -3437,7 +3437,7 @@ func UnmapViewOfFile(addr uintptr) (err error) { } func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) { - r1, _, e1 := syscall.Syscall9(procUpdateProcThreadAttribute.Addr(), 7, uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procUpdateProcThreadAttribute.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize))) if r1 == 0 { err = errnoErr(e1) } @@ -3445,7 +3445,7 @@ func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, } func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) { - r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0) + r0, _, e1 := syscall.SyscallN(procVirtualAlloc.Addr(), uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect)) value = uintptr(r0) if value == 0 { err = errnoErr(e1) @@ -3454,7 +3454,7 @@ func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint3 } func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) { - r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype)) + r1, _, e1 := syscall.SyscallN(procVirtualFree.Addr(), uintptr(address), uintptr(size), uintptr(freetype)) if r1 == 0 { err = errnoErr(e1) } @@ -3462,7 +3462,7 @@ func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) { } func VirtualLock(addr uintptr, length uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0) + r1, _, e1 := syscall.SyscallN(procVirtualLock.Addr(), uintptr(addr), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } @@ -3470,7 +3470,7 @@ func VirtualLock(addr uintptr, length uintptr) (err error) { } func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0) + r1, _, e1 := syscall.SyscallN(procVirtualProtect.Addr(), uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect))) if r1 == 0 { err = errnoErr(e1) } @@ -3478,7 +3478,7 @@ func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect } func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0) + r1, _, e1 := syscall.SyscallN(procVirtualProtectEx.Addr(), uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect))) if r1 == 0 { err = errnoErr(e1) } @@ -3486,7 +3486,7 @@ func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect } func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length)) + r1, _, e1 := syscall.SyscallN(procVirtualQuery.Addr(), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } @@ -3494,7 +3494,7 @@ func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintpt } func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0) + r1, _, e1 := syscall.SyscallN(procVirtualQueryEx.Addr(), uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } @@ -3502,7 +3502,7 @@ func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformat } func VirtualUnlock(addr uintptr, length uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0) + r1, _, e1 := syscall.SyscallN(procVirtualUnlock.Addr(), uintptr(addr), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } @@ -3510,13 +3510,13 @@ func VirtualUnlock(addr uintptr, length uintptr) (err error) { } func WTSGetActiveConsoleSessionId() (sessionID uint32) { - r0, _, _ := syscall.Syscall(procWTSGetActiveConsoleSessionId.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procWTSGetActiveConsoleSessionId.Addr()) sessionID = uint32(r0) return } func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall(procWaitCommEvent.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped))) + r1, _, e1 := syscall.SyscallN(procWaitCommEvent.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -3528,7 +3528,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil if waitAll { _p0 = 1 } - r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0) + r0, _, e1 := syscall.SyscallN(procWaitForMultipleObjects.Addr(), uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds)) event = uint32(r0) if event == 0xffffffff { err = errnoErr(e1) @@ -3537,7 +3537,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil } func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) { - r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0) + r0, _, e1 := syscall.SyscallN(procWaitForSingleObject.Addr(), uintptr(handle), uintptr(waitMilliseconds)) event = uint32(r0) if event == 0xffffffff { err = errnoErr(e1) @@ -3546,7 +3546,7 @@ func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, } func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) { - r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0) + r1, _, e1 := syscall.SyscallN(procWriteConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved))) if r1 == 0 { err = errnoErr(e1) } @@ -3558,7 +3558,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) if len(buf) > 0 { _p0 = &buf[0] } - r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procWriteFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -3566,7 +3566,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) } func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0) + r1, _, e1 := syscall.SyscallN(procWriteProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten))) if r1 == 0 { err = errnoErr(e1) } @@ -3574,7 +3574,7 @@ func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size } func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) { - r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0) + r1, _, e1 := syscall.SyscallN(procAcceptEx.Addr(), uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } @@ -3582,12 +3582,12 @@ func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32 } func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) { - syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0) + syscall.SyscallN(procGetAcceptExSockaddrs.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen))) return } func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0) + r1, _, e1 := syscall.SyscallN(procTransmitFile.Addr(), uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -3595,7 +3595,7 @@ func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint } func NetApiBufferFree(buf *byte) (neterr error) { - r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0) + r0, _, _ := syscall.SyscallN(procNetApiBufferFree.Addr(), uintptr(unsafe.Pointer(buf))) if r0 != 0 { neterr = syscall.Errno(r0) } @@ -3603,7 +3603,7 @@ func NetApiBufferFree(buf *byte) (neterr error) { } func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) { - r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType))) + r0, _, _ := syscall.SyscallN(procNetGetJoinInformation.Addr(), uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType))) if r0 != 0 { neterr = syscall.Errno(r0) } @@ -3611,7 +3611,7 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete } func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) { - r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0) + r0, _, _ := syscall.SyscallN(procNetUserEnum.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle))) if r0 != 0 { neterr = syscall.Errno(r0) } @@ -3619,7 +3619,7 @@ func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, pr } func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { - r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) + r0, _, _ := syscall.SyscallN(procNetUserGetInfo.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf))) if r0 != 0 { neterr = syscall.Errno(r0) } @@ -3627,7 +3627,7 @@ func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **by } func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength), 0) + r0, _, _ := syscall.SyscallN(procNtCreateFile.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength)) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3635,7 +3635,7 @@ func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO } func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) { - r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3643,7 +3643,7 @@ func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, i } func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)), 0) + r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3651,7 +3651,7 @@ func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe } func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0) + r0, _, _ := syscall.SyscallN(procNtQuerySystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3659,7 +3659,7 @@ func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInf } func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0) + r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class)) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3667,7 +3667,7 @@ func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, } func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0) + r0, _, _ := syscall.SyscallN(procNtSetInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen)) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3675,7 +3675,7 @@ func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.P } func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) { - r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen)) + r0, _, _ := syscall.SyscallN(procNtSetSystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen)) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3683,13 +3683,13 @@ func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoL } func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) { - r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress)) + r0, _, _ := syscall.SyscallN(procRtlAddFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress)) ret = r0 != 0 return } func RtlDefaultNpAcl(acl **ACL) (ntstatus error) { - r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(acl))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3697,13 +3697,13 @@ func RtlDefaultNpAcl(acl **ACL) (ntstatus error) { } func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) { - r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlDeleteFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable))) ret = r0 != 0 return } func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3711,7 +3711,7 @@ func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFile } func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) { - r0, _, _ := syscall.Syscall6(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3719,18 +3719,18 @@ func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString } func RtlGetCurrentPeb() (peb *PEB) { - r0, _, _ := syscall.Syscall(procRtlGetCurrentPeb.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procRtlGetCurrentPeb.Addr()) peb = (*PEB)(unsafe.Pointer(r0)) return } func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) { - syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber))) + syscall.SyscallN(procRtlGetNtVersionNumbers.Addr(), uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber))) return } func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) { - r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlGetVersion.Addr(), uintptr(unsafe.Pointer(info))) if r0 != 0 { ntstatus = NTStatus(r0) } @@ -3738,23 +3738,23 @@ func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) { } func RtlInitString(destinationString *NTString, sourceString *byte) { - syscall.Syscall(procRtlInitString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0) + syscall.SyscallN(procRtlInitString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString))) return } func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) { - syscall.Syscall(procRtlInitUnicodeString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0) + syscall.SyscallN(procRtlInitUnicodeString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString))) return } func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) { - r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(ntstatus), 0, 0) + r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(ntstatus)) ret = syscall.Errno(r0) return } func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) { - r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0) + r0, _, _ := syscall.SyscallN(procCLSIDFromString.Addr(), uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -3762,7 +3762,7 @@ func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) { } func coCreateGuid(pguid *GUID) (ret error) { - r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0) + r0, _, _ := syscall.SyscallN(procCoCreateGuid.Addr(), uintptr(unsafe.Pointer(pguid))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -3770,7 +3770,7 @@ func coCreateGuid(pguid *GUID) (ret error) { } func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) { - r0, _, _ := syscall.Syscall6(procCoGetObject.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)), 0, 0) + r0, _, _ := syscall.SyscallN(procCoGetObject.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -3778,7 +3778,7 @@ func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable * } func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) { - r0, _, _ := syscall.Syscall(procCoInitializeEx.Addr(), 2, uintptr(reserved), uintptr(coInit), 0) + r0, _, _ := syscall.SyscallN(procCoInitializeEx.Addr(), uintptr(reserved), uintptr(coInit)) if r0 != 0 { ret = syscall.Errno(r0) } @@ -3786,23 +3786,23 @@ func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) { } func CoTaskMemFree(address unsafe.Pointer) { - syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0) + syscall.SyscallN(procCoTaskMemFree.Addr(), uintptr(address)) return } func CoUninitialize() { - syscall.Syscall(procCoUninitialize.Addr(), 0, 0, 0, 0) + syscall.SyscallN(procCoUninitialize.Addr()) return } func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) { - r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax)) + r0, _, _ := syscall.SyscallN(procStringFromGUID2.Addr(), uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax)) chars = int32(r0) return } func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0) + r1, _, e1 := syscall.SyscallN(procEnumProcessModules.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded))) if r1 == 0 { err = errnoErr(e1) } @@ -3810,7 +3810,7 @@ func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uin } func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0) + r1, _, e1 := syscall.SyscallN(procEnumProcessModulesEx.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag)) if r1 == 0 { err = errnoErr(e1) } @@ -3818,7 +3818,7 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u } func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned))) + r1, _, e1 := syscall.SyscallN(procEnumProcesses.Addr(), uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned))) if r1 == 0 { err = errnoErr(e1) } @@ -3826,7 +3826,7 @@ func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err } func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetModuleBaseNameW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size)) if r1 == 0 { err = errnoErr(e1) } @@ -3834,7 +3834,7 @@ func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uin } func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetModuleFileNameExW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size)) if r1 == 0 { err = errnoErr(e1) } @@ -3842,7 +3842,7 @@ func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size u } func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetModuleInformation.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb)) if r1 == 0 { err = errnoErr(e1) } @@ -3850,7 +3850,7 @@ func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb } func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) { - r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb)) + r1, _, e1 := syscall.SyscallN(procQueryWorkingSetEx.Addr(), uintptr(process), uintptr(pv), uintptr(cb)) if r1 == 0 { err = errnoErr(e1) } @@ -3862,7 +3862,7 @@ func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callb if ret != nil { return } - r0, _, _ := syscall.Syscall6(procSubscribeServiceChangeNotifications.Addr(), 5, uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)), 0) + r0, _, _ := syscall.SyscallN(procSubscribeServiceChangeNotifications.Addr(), uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -3874,12 +3874,12 @@ func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) { if err != nil { return } - syscall.Syscall(procUnsubscribeServiceChangeNotifications.Addr(), 1, uintptr(subscription), 0, 0) + syscall.SyscallN(procUnsubscribeServiceChangeNotifications.Addr(), uintptr(subscription)) return } func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize))) + r1, _, e1 := syscall.SyscallN(procGetUserNameExW.Addr(), uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize))) if r1&0xff == 0 { err = errnoErr(e1) } @@ -3887,7 +3887,7 @@ func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err er } func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0) + r1, _, e1 := syscall.SyscallN(procTranslateNameW.Addr(), uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize))) if r1&0xff == 0 { err = errnoErr(e1) } @@ -3895,7 +3895,7 @@ func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint } func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiBuildDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) + r1, _, e1 := syscall.SyscallN(procSetupDiBuildDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) if r1 == 0 { err = errnoErr(e1) } @@ -3903,7 +3903,7 @@ func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa } func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiCallClassInstaller.Addr(), 3, uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData))) + r1, _, e1 := syscall.SyscallN(procSetupDiCallClassInstaller.Addr(), uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -3911,7 +3911,7 @@ func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInf } func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiCancelDriverInfoSearch.Addr(), 1, uintptr(deviceInfoSet), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetupDiCancelDriverInfoSearch.Addr(), uintptr(deviceInfoSet)) if r1 == 0 { err = errnoErr(e1) } @@ -3919,7 +3919,7 @@ func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) { } func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiClassGuidsFromNameExW.Addr(), 6, uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) + r1, _, e1 := syscall.SyscallN(procSetupDiClassGuidsFromNameExW.Addr(), uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } @@ -3927,7 +3927,7 @@ func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGu } func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiClassNameFromGuidExW.Addr(), 6, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) + r1, _, e1 := syscall.SyscallN(procSetupDiClassNameFromGuidExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } @@ -3935,7 +3935,7 @@ func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSiz } func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) { - r0, _, e1 := syscall.Syscall6(procSetupDiCreateDeviceInfoListExW.Addr(), 4, uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0) + r0, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoListExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) handle = DevInfo(r0) if handle == DevInfo(InvalidHandle) { err = errnoErr(e1) @@ -3944,7 +3944,7 @@ func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineN } func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) { - r1, _, e1 := syscall.Syscall9(procSetupDiCreateDeviceInfoW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -3952,7 +3952,7 @@ func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUI } func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiDestroyDeviceInfoList.Addr(), 1, uintptr(deviceInfoSet), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDeviceInfoList.Addr(), uintptr(deviceInfoSet)) if r1 == 0 { err = errnoErr(e1) } @@ -3960,7 +3960,7 @@ func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) { } func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiDestroyDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) + r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) if r1 == 0 { err = errnoErr(e1) } @@ -3968,7 +3968,7 @@ func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfo } func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiEnumDeviceInfo.Addr(), 3, uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData))) + r1, _, e1 := syscall.SyscallN(procSetupDiEnumDeviceInfo.Addr(), uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -3976,7 +3976,7 @@ func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfo } func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiEnumDriverInfoW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiEnumDriverInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -3984,7 +3984,7 @@ func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, d } func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) { - r0, _, e1 := syscall.Syscall9(procSetupDiGetClassDevsExW.Addr(), 7, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0) + r0, _, e1 := syscall.SyscallN(procSetupDiGetClassDevsExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) handle = DevInfo(r0) if handle == DevInfo(InvalidHandle) { err = errnoErr(e1) @@ -3993,7 +3993,7 @@ func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintp } func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiGetClassInstallParamsW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize))) if r1 == 0 { err = errnoErr(e1) } @@ -4001,7 +4001,7 @@ func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo } func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInfoListDetailW.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInfoListDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData))) if r1 == 0 { err = errnoErr(e1) } @@ -4009,7 +4009,7 @@ func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailDa } func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) if r1 == 0 { err = errnoErr(e1) } @@ -4017,7 +4017,7 @@ func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf } func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiGetDeviceInstanceIdW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstanceIdW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize))) if r1 == 0 { err = errnoErr(e1) } @@ -4025,7 +4025,7 @@ func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa } func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procSetupDiGetDevicePropertyW.Addr(), 8, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDevicePropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } @@ -4033,7 +4033,7 @@ func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData } func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall9(procSetupDiGetDeviceRegistryPropertyW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize))) if r1 == 0 { err = errnoErr(e1) } @@ -4041,7 +4041,7 @@ func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev } func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiGetDriverInfoDetailW.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize))) + r1, _, e1 := syscall.SyscallN(procSetupDiGetDriverInfoDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize))) if r1 == 0 { err = errnoErr(e1) } @@ -4049,7 +4049,7 @@ func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa } func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -4057,7 +4057,7 @@ func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData } func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) + r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -4065,7 +4065,7 @@ func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData } func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) { - r0, _, e1 := syscall.Syscall6(procSetupDiOpenDevRegKey.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired)) + r0, _, e1 := syscall.SyscallN(procSetupDiOpenDevRegKey.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired)) key = Handle(r0) if key == InvalidHandle { err = errnoErr(e1) @@ -4074,7 +4074,7 @@ func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Sc } func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiSetClassInstallParamsW.Addr(), 4, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), 0, 0) + r1, _, e1 := syscall.SyscallN(procSetupDiSetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize)) if r1 == 0 { err = errnoErr(e1) } @@ -4082,7 +4082,7 @@ func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo } func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiSetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) + r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) if r1 == 0 { err = errnoErr(e1) } @@ -4090,7 +4090,7 @@ func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf } func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procSetupDiSetDeviceRegistryPropertyW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize)) if r1 == 0 { err = errnoErr(e1) } @@ -4098,7 +4098,7 @@ func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev } func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0) + r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -4106,7 +4106,7 @@ func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData } func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) { - r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) + r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) if r1 == 0 { err = errnoErr(e1) } @@ -4114,7 +4114,7 @@ func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData } func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) { - r1, _, e1 := syscall.Syscall(procSetupUninstallOEMInfW.Addr(), 3, uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved)) + r1, _, e1 := syscall.SyscallN(procSetupUninstallOEMInfW.Addr(), uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } @@ -4122,7 +4122,7 @@ func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (er } func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) { - r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0) + r0, _, e1 := syscall.SyscallN(procCommandLineToArgvW.Addr(), uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc))) argv = (**uint16)(unsafe.Pointer(r0)) if argv == nil { err = errnoErr(e1) @@ -4131,7 +4131,7 @@ func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) { } func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) { - r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0) + r0, _, _ := syscall.SyscallN(procSHGetKnownFolderPath.Addr(), uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -4139,7 +4139,7 @@ func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **u } func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) { - r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd)) + r1, _, e1 := syscall.SyscallN(procShellExecuteW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd)) if r1 <= 32 { err = errnoErr(e1) } @@ -4147,12 +4147,12 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui } func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) { - syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param)) + syscall.SyscallN(procEnumChildWindows.Addr(), uintptr(hwnd), uintptr(enumFunc), uintptr(param)) return } func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) { - r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0) + r1, _, e1 := syscall.SyscallN(procEnumWindows.Addr(), uintptr(enumFunc), uintptr(param)) if r1 == 0 { err = errnoErr(e1) } @@ -4160,7 +4160,7 @@ func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) { } func ExitWindowsEx(flags uint32, reason uint32) (err error) { - r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0) + r1, _, e1 := syscall.SyscallN(procExitWindowsEx.Addr(), uintptr(flags), uintptr(reason)) if r1 == 0 { err = errnoErr(e1) } @@ -4168,7 +4168,7 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) { } func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) { - r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount)) + r0, _, e1 := syscall.SyscallN(procGetClassNameW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount)) copied = int32(r0) if copied == 0 { err = errnoErr(e1) @@ -4177,19 +4177,19 @@ func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, e } func GetDesktopWindow() (hwnd HWND) { - r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetDesktopWindow.Addr()) hwnd = HWND(r0) return } func GetForegroundWindow() (hwnd HWND) { - r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetForegroundWindow.Addr()) hwnd = HWND(r0) return } func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { - r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0) + r1, _, e1 := syscall.SyscallN(procGetGUIThreadInfo.Addr(), uintptr(thread), uintptr(unsafe.Pointer(info))) if r1 == 0 { err = errnoErr(e1) } @@ -4197,19 +4197,19 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { } func GetKeyboardLayout(tid uint32) (hkl Handle) { - r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) + r0, _, _ := syscall.SyscallN(procGetKeyboardLayout.Addr(), uintptr(tid)) hkl = Handle(r0) return } func GetShellWindow() (shellWindow HWND) { - r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) + r0, _, _ := syscall.SyscallN(procGetShellWindow.Addr()) shellWindow = HWND(r0) return } func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0) + r0, _, e1 := syscall.SyscallN(procGetWindowThreadProcessId.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(pid))) tid = uint32(r0) if tid == 0 { err = errnoErr(e1) @@ -4218,25 +4218,25 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) { } func IsWindow(hwnd HWND) (isWindow bool) { - r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0) + r0, _, _ := syscall.SyscallN(procIsWindow.Addr(), uintptr(hwnd)) isWindow = r0 != 0 return } func IsWindowUnicode(hwnd HWND) (isUnicode bool) { - r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0) + r0, _, _ := syscall.SyscallN(procIsWindowUnicode.Addr(), uintptr(hwnd)) isUnicode = r0 != 0 return } func IsWindowVisible(hwnd HWND) (isVisible bool) { - r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0) + r0, _, _ := syscall.SyscallN(procIsWindowVisible.Addr(), uintptr(hwnd)) isVisible = r0 != 0 return } func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { - r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) + r0, _, e1 := syscall.SyscallN(procLoadKeyboardLayoutW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags)) hkl = Handle(r0) if hkl == 0 { err = errnoErr(e1) @@ -4245,7 +4245,7 @@ func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { } func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { - r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) + r0, _, e1 := syscall.SyscallN(procMessageBoxW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype)) ret = int32(r0) if ret == 0 { err = errnoErr(e1) @@ -4254,13 +4254,13 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i } func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { - r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) + r0, _, _ := syscall.SyscallN(procToUnicodeEx.Addr(), uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl)) ret = int32(r0) return } func UnloadKeyboardLayout(hkl Handle) (err error) { - r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) + r1, _, e1 := syscall.SyscallN(procUnloadKeyboardLayout.Addr(), uintptr(hkl)) if r1 == 0 { err = errnoErr(e1) } @@ -4272,7 +4272,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) ( if inheritExisting { _p0 = 1 } - r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0)) + r1, _, e1 := syscall.SyscallN(procCreateEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } @@ -4280,7 +4280,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) ( } func DestroyEnvironmentBlock(block *uint16) (err error) { - r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0) + r1, _, e1 := syscall.SyscallN(procDestroyEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block))) if r1 == 0 { err = errnoErr(e1) } @@ -4288,7 +4288,7 @@ func DestroyEnvironmentBlock(block *uint16) (err error) { } func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) { - r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) + r1, _, e1 := syscall.SyscallN(procGetUserProfileDirectoryW.Addr(), uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) if r1 == 0 { err = errnoErr(e1) } @@ -4305,7 +4305,7 @@ func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32 } func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) { - r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0) + r0, _, e1 := syscall.SyscallN(procGetFileVersionInfoSizeW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle))) bufSize = uint32(r0) if bufSize == 0 { err = errnoErr(e1) @@ -4323,7 +4323,7 @@ func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer u } func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) { - r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0) + r1, _, e1 := syscall.SyscallN(procGetFileVersionInfoW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer)) if r1 == 0 { err = errnoErr(e1) } @@ -4340,7 +4340,7 @@ func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer } func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0) + r1, _, e1 := syscall.SyscallN(procVerQueryValueW.Addr(), uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize))) if r1 == 0 { err = errnoErr(e1) } @@ -4348,7 +4348,7 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint } func TimeBeginPeriod(period uint32) (err error) { - r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0) + r1, _, e1 := syscall.SyscallN(proctimeBeginPeriod.Addr(), uintptr(period)) if r1 != 0 { err = errnoErr(e1) } @@ -4356,7 +4356,7 @@ func TimeBeginPeriod(period uint32) (err error) { } func TimeEndPeriod(period uint32) (err error) { - r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0) + r1, _, e1 := syscall.SyscallN(proctimeEndPeriod.Addr(), uintptr(period)) if r1 != 0 { err = errnoErr(e1) } @@ -4364,7 +4364,7 @@ func TimeEndPeriod(period uint32) (err error) { } func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) { - r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data))) + r0, _, _ := syscall.SyscallN(procWinVerifyTrustEx.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data))) if r0 != 0 { ret = syscall.Errno(r0) } @@ -4372,12 +4372,12 @@ func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) } func FreeAddrInfoW(addrinfo *AddrinfoW) { - syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0) + syscall.SyscallN(procFreeAddrInfoW.Addr(), uintptr(unsafe.Pointer(addrinfo))) return } func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) { - r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0) + r0, _, _ := syscall.SyscallN(procGetAddrInfoW.Addr(), uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result))) if r0 != 0 { sockerr = syscall.Errno(r0) } @@ -4385,7 +4385,7 @@ func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, resul } func WSACleanup() (err error) { - r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) + r1, _, e1 := syscall.SyscallN(procWSACleanup.Addr()) if r1 == socket_error { err = errnoErr(e1) } @@ -4393,7 +4393,7 @@ func WSACleanup() (err error) { } func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) { - r1, _, e1 := syscall.Syscall(procWSADuplicateSocketW.Addr(), 3, uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info))) + r1, _, e1 := syscall.SyscallN(procWSADuplicateSocketW.Addr(), uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info))) if r1 != 0 { err = errnoErr(e1) } @@ -4401,7 +4401,7 @@ func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err } func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) { - r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength))) + r0, _, e1 := syscall.SyscallN(procWSAEnumProtocolsW.Addr(), uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength))) n = int32(r0) if n == -1 { err = errnoErr(e1) @@ -4414,7 +4414,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f if wait { _p0 = 1 } - r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0) + r1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags))) if r1 == 0 { err = errnoErr(e1) } @@ -4422,7 +4422,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f } func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) { - r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine)) + r1, _, e1 := syscall.SyscallN(procWSAIoctl.Addr(), uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine)) if r1 == socket_error { err = errnoErr(e1) } @@ -4430,7 +4430,7 @@ func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbo } func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) { - r1, _, e1 := syscall.Syscall(procWSALookupServiceBeginW.Addr(), 3, uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle))) + r1, _, e1 := syscall.SyscallN(procWSALookupServiceBeginW.Addr(), uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle))) if r1 == socket_error { err = errnoErr(e1) } @@ -4438,7 +4438,7 @@ func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) } func WSALookupServiceEnd(handle Handle) (err error) { - r1, _, e1 := syscall.Syscall(procWSALookupServiceEnd.Addr(), 1, uintptr(handle), 0, 0) + r1, _, e1 := syscall.SyscallN(procWSALookupServiceEnd.Addr(), uintptr(handle)) if r1 == socket_error { err = errnoErr(e1) } @@ -4446,7 +4446,7 @@ func WSALookupServiceEnd(handle Handle) (err error) { } func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) { - r1, _, e1 := syscall.Syscall6(procWSALookupServiceNextW.Addr(), 4, uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)), 0, 0) + r1, _, e1 := syscall.SyscallN(procWSALookupServiceNextW.Addr(), uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet))) if r1 == socket_error { err = errnoErr(e1) } @@ -4454,7 +4454,7 @@ func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WS } func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) { - r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + r1, _, e1 := syscall.SyscallN(procWSARecv.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) if r1 == socket_error { err = errnoErr(e1) } @@ -4462,7 +4462,7 @@ func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32 } func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) { - r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + r1, _, e1 := syscall.SyscallN(procWSARecvFrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) if r1 == socket_error { err = errnoErr(e1) } @@ -4470,7 +4470,7 @@ func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *ui } func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) { - r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + r1, _, e1 := syscall.SyscallN(procWSASend.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) if r1 == socket_error { err = errnoErr(e1) } @@ -4478,7 +4478,7 @@ func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, } func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) { - r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + r1, _, e1 := syscall.SyscallN(procWSASendTo.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) if r1 == socket_error { err = errnoErr(e1) } @@ -4486,7 +4486,7 @@ func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32 } func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags)) + r0, _, e1 := syscall.SyscallN(procWSASocketW.Addr(), uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -4495,7 +4495,7 @@ func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, } func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { - r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0) + r0, _, _ := syscall.SyscallN(procWSAStartup.Addr(), uintptr(verreq), uintptr(unsafe.Pointer(data))) if r0 != 0 { sockerr = syscall.Errno(r0) } @@ -4503,7 +4503,7 @@ func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { } func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) { - r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + r1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen)) if r1 == socket_error { err = errnoErr(e1) } @@ -4511,7 +4511,7 @@ func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) { } func Closesocket(s Handle) (err error) { - r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0) + r1, _, e1 := syscall.SyscallN(procclosesocket.Addr(), uintptr(s)) if r1 == socket_error { err = errnoErr(e1) } @@ -4519,7 +4519,7 @@ func Closesocket(s Handle) (err error) { } func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) { - r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + r1, _, e1 := syscall.SyscallN(procconnect.Addr(), uintptr(s), uintptr(name), uintptr(namelen)) if r1 == socket_error { err = errnoErr(e1) } @@ -4536,7 +4536,7 @@ func GetHostByName(name string) (h *Hostent, err error) { } func _GetHostByName(name *byte) (h *Hostent, err error) { - r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + r0, _, e1 := syscall.SyscallN(procgethostbyname.Addr(), uintptr(unsafe.Pointer(name))) h = (*Hostent)(unsafe.Pointer(r0)) if h == nil { err = errnoErr(e1) @@ -4545,7 +4545,7 @@ func _GetHostByName(name *byte) (h *Hostent, err error) { } func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { - r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + r1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if r1 == socket_error { err = errnoErr(e1) } @@ -4562,7 +4562,7 @@ func GetProtoByName(name string) (p *Protoent, err error) { } func _GetProtoByName(name *byte) (p *Protoent, err error) { - r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + r0, _, e1 := syscall.SyscallN(procgetprotobyname.Addr(), uintptr(unsafe.Pointer(name))) p = (*Protoent)(unsafe.Pointer(r0)) if p == nil { err = errnoErr(e1) @@ -4585,7 +4585,7 @@ func GetServByName(name string, proto string) (s *Servent, err error) { } func _GetServByName(name *byte, proto *byte) (s *Servent, err error) { - r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0) + r0, _, e1 := syscall.SyscallN(procgetservbyname.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto))) s = (*Servent)(unsafe.Pointer(r0)) if s == nil { err = errnoErr(e1) @@ -4594,7 +4594,7 @@ func _GetServByName(name *byte, proto *byte) (s *Servent, err error) { } func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { - r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + r1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if r1 == socket_error { err = errnoErr(e1) } @@ -4602,7 +4602,7 @@ func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { } func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) { - r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0) + r1, _, e1 := syscall.SyscallN(procgetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen))) if r1 == socket_error { err = errnoErr(e1) } @@ -4610,7 +4610,7 @@ func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int3 } func listen(s Handle, backlog int32) (err error) { - r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0) + r1, _, e1 := syscall.SyscallN(proclisten.Addr(), uintptr(s), uintptr(backlog)) if r1 == socket_error { err = errnoErr(e1) } @@ -4618,7 +4618,7 @@ func listen(s Handle, backlog int32) (err error) { } func Ntohs(netshort uint16) (u uint16) { - r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0) + r0, _, _ := syscall.SyscallN(procntohs.Addr(), uintptr(netshort)) u = uint16(r0) return } @@ -4628,7 +4628,7 @@ func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen * if len(buf) > 0 { _p0 = &buf[0] } - r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + r0, _, e1 := syscall.SyscallN(procrecvfrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int32(r0) if n == -1 { err = errnoErr(e1) @@ -4641,7 +4641,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) ( if len(buf) > 0 { _p0 = &buf[0] } - r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen)) + r1, _, e1 := syscall.SyscallN(procsendto.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen)) if r1 == socket_error { err = errnoErr(e1) } @@ -4649,7 +4649,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) ( } func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) { - r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0) + r1, _, e1 := syscall.SyscallN(procsetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen)) if r1 == socket_error { err = errnoErr(e1) } @@ -4657,7 +4657,7 @@ func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32 } func shutdown(s Handle, how int32) (err error) { - r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0) + r1, _, e1 := syscall.SyscallN(procshutdown.Addr(), uintptr(s), uintptr(how)) if r1 == socket_error { err = errnoErr(e1) } @@ -4665,7 +4665,7 @@ func shutdown(s Handle, how int32) (err error) { } func socket(af int32, typ int32, protocol int32) (handle Handle, err error) { - r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol)) + r0, _, e1 := syscall.SyscallN(procsocket.Addr(), uintptr(af), uintptr(typ), uintptr(protocol)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) @@ -4674,7 +4674,7 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, err error) { } func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) { - r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0) + r1, _, e1 := syscall.SyscallN(procWTSEnumerateSessionsW.Addr(), uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count))) if r1 == 0 { err = errnoErr(e1) } @@ -4682,12 +4682,12 @@ func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessio } func WTSFreeMemory(ptr uintptr) { - syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0) + syscall.SyscallN(procWTSFreeMemory.Addr(), uintptr(ptr)) return } func WTSQueryUserToken(session uint32, token *Token) (err error) { - r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0) + r1, _, e1 := syscall.SyscallN(procWTSQueryUserToken.Addr(), uintptr(session), uintptr(unsafe.Pointer(token))) if r1 == 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go index df6bf948e..0ddd81c02 100644 --- a/vendor/golang.org/x/term/term_windows.go +++ b/vendor/golang.org/x/term/term_windows.go @@ -20,12 +20,14 @@ func isTerminal(fd int) bool { return err == nil } +// This is intended to be used on a console input handle. +// See https://learn.microsoft.com/en-us/windows/console/setconsolemode func makeRaw(fd int) (*State, error) { var st uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { return nil, err } - raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT) raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go index 13e9a64ad..bddb2e2ae 100644 --- a/vendor/golang.org/x/term/terminal.go +++ b/vendor/golang.org/x/term/terminal.go @@ -146,6 +146,7 @@ const ( keyCtrlD = 4 keyCtrlU = 21 keyEnter = '\r' + keyLF = '\n' keyEscape = 27 keyBackspace = 127 keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota @@ -497,7 +498,7 @@ func (t *Terminal) historyAdd(entry string) { // handleKey processes the given key and, optionally, returns a line of text // that the user has entered. func (t *Terminal) handleKey(key rune) (line string, ok bool) { - if t.pasteActive && key != keyEnter { + if t.pasteActive && key != keyEnter && key != keyLF { t.addKeyToLine(key) return } @@ -567,7 +568,7 @@ func (t *Terminal) handleKey(key rune) (line string, ok bool) { t.setLine(runes, len(runes)) } } - case keyEnter: + case keyEnter, keyLF: t.moveCursorToPos(len(t.line)) t.queue([]rune("\r\n")) line = string(t.line) @@ -812,6 +813,10 @@ func (t *Terminal) readLine() (line string, err error) { if !t.pasteActive { lineIsPasted = false } + // If we have CR, consume LF if present (CRLF sequence) to avoid returning an extra empty line. + if key == keyEnter && len(rest) > 0 && rest[0] == keyLF { + rest = rest[1:] + } line, lineOk = t.handleKey(key) } if len(rest) > 0 { diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go index 89f5097be..0fb4e7eea 100644 --- a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go +++ b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go @@ -113,7 +113,7 @@ func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Nod // childrenOf elides the FuncType node beneath FuncDecl. // Add it back here for TypeParams, Params, Results, // all FieldLists). But we don't add it back for the "func" token - // even though it is is the tree at FuncDecl.Type.Func. + // even though it is the tree at FuncDecl.Type.Func. if decl, ok := node.(*ast.FuncDecl); ok { if fields, ok := child.(*ast.FieldList); ok && fields != decl.Recv { path = append(path, decl.Type) diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go index f1931d10e..366aab6b2 100644 --- a/vendor/golang.org/x/tools/go/packages/doc.go +++ b/vendor/golang.org/x/tools/go/packages/doc.go @@ -76,6 +76,8 @@ uninterpreted to Load, so that it can interpret them according to the conventions of the underlying build system. See the Example function for typical usage. +See also [golang.org/x/tools/go/packages/internal/linecount] +for an example application. # The driver protocol diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go index 96e43cd80..89f89dd2d 100644 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ b/vendor/golang.org/x/tools/go/packages/golist.go @@ -224,13 +224,22 @@ extractQueries: return response.dr, nil } +// abs returns an absolute representation of path, based on cfg.Dir. +func (cfg *Config) abs(path string) (string, error) { + if filepath.IsAbs(path) { + return path, nil + } + // In case cfg.Dir is relative, pass it to filepath.Abs. + return filepath.Abs(filepath.Join(cfg.Dir, path)) +} + func (state *golistState) runContainsQueries(response *responseDeduper, queries []string) error { for _, query := range queries { // TODO(matloob): Do only one query per directory. fdir := filepath.Dir(query) // Pass absolute path of directory to go list so that it knows to treat it as a directory, // not a package path. - pattern, err := filepath.Abs(fdir) + pattern, err := state.cfg.abs(fdir) if err != nil { return fmt.Errorf("could not determine absolute path of file= query path %q: %v", query, err) } @@ -703,9 +712,8 @@ func (state *golistState) getGoVersion() (int, error) { // getPkgPath finds the package path of a directory if it's relative to a root // directory. func (state *golistState) getPkgPath(dir string) (string, bool, error) { - absDir, err := filepath.Abs(dir) - if err != nil { - return "", false, err + if !filepath.IsAbs(dir) { + panic("non-absolute dir passed to getPkgPath") } roots, err := state.determineRootDirs() if err != nil { @@ -715,7 +723,7 @@ func (state *golistState) getPkgPath(dir string) (string, bool, error) { for rdir, rpath := range roots { // Make sure that the directory is in the module, // to avoid creating a path relative to another module. - if !strings.HasPrefix(absDir, rdir) { + if !strings.HasPrefix(dir, rdir) { continue } // TODO(matloob): This doesn't properly handle symlinks. diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go index d823c474a..d9d5a45cd 100644 --- a/vendor/golang.org/x/tools/go/packages/golist_overlay.go +++ b/vendor/golang.org/x/tools/go/packages/golist_overlay.go @@ -55,7 +55,7 @@ func (state *golistState) determineRootDirsModules() (map[string]string, error) } if mod.Dir != "" && mod.Path != "" { // This is a valid module; add it to the map. - absDir, err := filepath.Abs(mod.Dir) + absDir, err := state.cfg.abs(mod.Dir) if err != nil { return nil, err } diff --git a/vendor/golang.org/x/tools/internal/imports/source_modindex.go b/vendor/golang.org/x/tools/internal/imports/source_modindex.go index 05229f06c..ca745d4a1 100644 --- a/vendor/golang.org/x/tools/internal/imports/source_modindex.go +++ b/vendor/golang.org/x/tools/internal/imports/source_modindex.go @@ -15,6 +15,10 @@ import ( // This code is here rather than in the modindex package // to avoid import loops +// TODO(adonovan): this code is only used by a test in this package. +// Can we delete it? Or is there a plan to call NewIndexSource from +// cmd/goimports? + // implements Source using modindex, so only for module cache. // // this is perhaps over-engineered. A new Index is read at first use. @@ -22,8 +26,8 @@ import ( // is read if the index changed. It is not clear the Mutex is needed. type IndexSource struct { modcachedir string - mutex sync.Mutex - ix *modindex.Index + mu sync.Mutex + index *modindex.Index // (access via getIndex) expires time.Time } @@ -39,13 +43,14 @@ func (s *IndexSource) LoadPackageNames(ctx context.Context, srcDir string, paths } func (s *IndexSource) ResolveReferences(ctx context.Context, filename string, missing References) ([]*Result, error) { - if err := s.maybeReadIndex(); err != nil { + index, err := s.getIndex() + if err != nil { return nil, err } var cs []modindex.Candidate for pkg, nms := range missing { for nm := range nms { - x := s.ix.Lookup(pkg, nm, false) + x := index.Lookup(pkg, nm, false) cs = append(cs, x...) } } @@ -74,30 +79,22 @@ func (s *IndexSource) ResolveReferences(ctx context.Context, filename string, mi return ans, nil } -func (s *IndexSource) maybeReadIndex() error { - s.mutex.Lock() - defer s.mutex.Unlock() - - var readIndex bool - if time.Now().After(s.expires) { - ok, err := modindex.Update(s.modcachedir) - if err != nil { - return err - } - if ok { - readIndex = true - } - } +func (s *IndexSource) getIndex() (*modindex.Index, error) { + s.mu.Lock() + defer s.mu.Unlock() - if readIndex || s.ix == nil { - ix, err := modindex.ReadIndex(s.modcachedir) + // (s.index = nil => s.expires is zero, + // so the first condition is strictly redundant. + // But it makes the postcondition very clear.) + if s.index == nil || time.Now().After(s.expires) { + index, err := modindex.Update(s.modcachedir) if err != nil { - return err + return nil, err } - s.ix = ix - // for now refresh every 15 minutes - s.expires = time.Now().Add(time.Minute * 15) + s.index = index + s.expires = index.ValidAt.Add(15 * time.Minute) // (refresh period) } + // Inv: s.index != nil - return nil + return s.index, nil } diff --git a/vendor/golang.org/x/tools/internal/modindex/directories.go b/vendor/golang.org/x/tools/internal/modindex/directories.go index 2faa6ce0b..9a963744b 100644 --- a/vendor/golang.org/x/tools/internal/modindex/directories.go +++ b/vendor/golang.org/x/tools/internal/modindex/directories.go @@ -10,7 +10,6 @@ import ( "os" "path/filepath" "regexp" - "slices" "strings" "sync" "time" @@ -20,50 +19,48 @@ import ( ) type directory struct { - path Relpath + path string // relative to GOMODCACHE importPath string version string // semantic version - syms []symbol } -// byImportPath groups the directories by import path, -// sorting the ones with the same import path by semantic version, -// most recent first. -func byImportPath(dirs []Relpath) (map[string][]*directory, error) { - ans := make(map[string][]*directory) // key is import path - for _, d := range dirs { - ip, sv, err := DirToImportPathVersion(d) +// bestDirByImportPath returns the best directory for each import +// path, where "best" means most recent semantic version. These import +// paths are inferred from the GOMODCACHE-relative dir names in dirs. +func bestDirByImportPath(dirs []string) (map[string]directory, error) { + dirsByPath := make(map[string]directory) + for _, dir := range dirs { + importPath, version, err := dirToImportPathVersion(dir) if err != nil { return nil, err } - ans[ip] = append(ans[ip], &directory{ - path: d, - importPath: ip, - version: sv, - }) - } - for k, v := range ans { - semanticSort(v) - ans[k] = v + new := directory{ + path: dir, + importPath: importPath, + version: version, + } + if old, ok := dirsByPath[importPath]; !ok || compareDirectory(new, old) < 0 { + dirsByPath[importPath] = new + } } - return ans, nil + return dirsByPath, nil } -// sort the directories by semantic version, latest first -func semanticSort(v []*directory) { - slices.SortFunc(v, func(l, r *directory) int { - if n := semver.Compare(l.version, r.version); n != 0 { - return -n // latest first - } - return strings.Compare(string(l.path), string(r.path)) - }) +// compareDirectory defines an ordering of path@version directories, +// by descending version, then by ascending path. +func compareDirectory(x, y directory) int { + if sign := -semver.Compare(x.version, y.version); sign != 0 { + return sign // latest first + } + return strings.Compare(string(x.path), string(y.path)) } // modCacheRegexp splits a relpathpath into module, module version, and package. var modCacheRegexp = regexp.MustCompile(`(.*)@([^/\\]*)(.*)`) -// DirToImportPathVersion computes import path and semantic version -func DirToImportPathVersion(dir Relpath) (string, string, error) { +// dirToImportPathVersion computes import path and semantic version +// from a GOMODCACHE-relative directory name. +func dirToImportPathVersion(dir string) (string, string, error) { m := modCacheRegexp.FindStringSubmatch(string(dir)) // m[1] is the module path // m[2] is the version major.minor.patch(-
 that contains the name
+// Package modindex contains code for building and searching an
+// [Index] of the Go module cache.
+package modindex
+
+// The directory containing the index, returned by
+// [IndexDir], contains a file index-name- that contains the name
 // of the current index. We believe writing that short file is atomic.
-// ReadIndex reads that file to get the file name of the index.
+// [Read] reads that file to get the file name of the index.
 // WriteIndex writes an index with a unique name and then
 // writes that name into a new version of index-name-.
 // ( stands for the CurrentVersion of the index format.)
-package modindex
 
 import (
+	"maps"
+	"os"
 	"path/filepath"
 	"slices"
 	"strings"
@@ -21,144 +25,95 @@ import (
 	"golang.org/x/mod/semver"
 )
 
-// Create always creates a new index for the go module cache that is in cachedir.
-func Create(cachedir string) error {
-	_, err := indexModCache(cachedir, true)
-	return err
-}
-
-// Update the index for the go module cache that is in cachedir,
-// If there is no existing index it will build one.
-// If there are changed directories since the last index, it will
-// write a new one and return true. Otherwise it returns false.
-func Update(cachedir string) (bool, error) {
-	return indexModCache(cachedir, false)
+// Update updates the index for the specified Go
+// module cache directory, creating it as needed.
+// On success it returns the current index.
+func Update(gomodcache string) (*Index, error) {
+	prev, err := Read(gomodcache)
+	if err != nil {
+		if !os.IsNotExist(err) {
+			return nil, err
+		}
+		prev = nil
+	}
+	return update(gomodcache, prev)
 }
 
-// indexModCache writes an index current as of when it is called.
-// If clear is true the index is constructed from all of GOMODCACHE
-// otherwise the index is constructed from the last previous index
-// and the updates to the cache. It returns true if it wrote an index,
-// false otherwise.
-func indexModCache(cachedir string, clear bool) (bool, error) {
-	cachedir, err := filepath.Abs(cachedir)
+// update builds, writes, and returns the current index.
+//
+// If old is nil, the new index is built from all of GOMODCACHE;
+// otherwise it is built from the old index plus cache updates
+// since the previous index's time.
+func update(gomodcache string, old *Index) (*Index, error) {
+	gomodcache, err := filepath.Abs(gomodcache)
 	if err != nil {
-		return false, err
+		return nil, err
 	}
-	cd := Abspath(cachedir)
-	future := time.Now().Add(24 * time.Hour) // safely in the future
-	ok, err := modindexTimed(future, cd, clear)
+	new, changed, err := build(gomodcache, old)
 	if err != nil {
-		return false, err
+		return nil, err
 	}
-	return ok, nil
-}
-
-// modindexTimed writes an index current as of onlyBefore.
-// If clear is true the index is constructed from all of GOMODCACHE
-// otherwise the index is constructed from the last previous index
-// and all the updates to the cache before onlyBefore.
-// It returns true if it wrote a new index, false if it wrote nothing.
-func modindexTimed(onlyBefore time.Time, cachedir Abspath, clear bool) (bool, error) {
-	var curIndex *Index
-	if !clear {
-		var err error
-		curIndex, err = ReadIndex(string(cachedir))
-		if clear && err != nil {
-			return false, err
+	if old == nil || changed {
+		if err := write(gomodcache, new); err != nil {
+			return nil, err
 		}
-		// TODO(pjw): check that most of those directories still exist
-	}
-	cfg := &work{
-		onlyBefore: onlyBefore,
-		oldIndex:   curIndex,
-		cacheDir:   cachedir,
-	}
-	if curIndex != nil {
-		cfg.onlyAfter = curIndex.Changed
-	}
-	if err := cfg.buildIndex(); err != nil {
-		return false, err
 	}
-	if len(cfg.newIndex.Entries) == 0 && curIndex != nil {
-		// no changes from existing curIndex, don't write a new index
-		return false, nil
-	}
-	if err := cfg.writeIndex(); err != nil {
-		return false, err
-	}
-	return true, nil
-}
-
-type work struct {
-	onlyBefore time.Time // do not use directories later than this
-	onlyAfter  time.Time // only interested in directories after this
-	// directories from before onlyAfter come from oldIndex
-	oldIndex *Index
-	newIndex *Index
-	cacheDir Abspath
+	return new, nil
 }
 
-func (w *work) buildIndex() error {
-	// The effective date of the new index should be at least
-	// slightly earlier than when the directories are scanned
-	// so set it now.
-	w.newIndex = &Index{Changed: time.Now(), Cachedir: w.cacheDir}
-	dirs := findDirs(string(w.cacheDir), w.onlyAfter, w.onlyBefore)
-	if len(dirs) == 0 {
-		return nil
+// build returns a new index for the specified Go module cache (an
+// absolute path).
+//
+// If an old index is provided, only directories more recent than it
+// that it are scanned; older directories are provided by the old
+// Index.
+//
+// The boolean result indicates whether new entries were found.
+func build(gomodcache string, old *Index) (*Index, bool, error) {
+	// Set the time window.
+	var start time.Time // = dawn of time
+	if old != nil {
+		start = old.ValidAt
 	}
-	newdirs, err := byImportPath(dirs)
+	now := time.Now()
+	end := now.Add(24 * time.Hour) // safely in the future
+
+	// Enumerate GOMODCACHE package directories.
+	// Choose the best (latest) package for each import path.
+	pkgDirs := findDirs(gomodcache, start, end)
+	dirByPath, err := bestDirByImportPath(pkgDirs)
 	if err != nil {
-		return err
+		return nil, false, err
 	}
-	// for each import path it might occur only in newdirs,
-	// only in w.oldIndex, or in both.
-	// If it occurs in both, use the semantically later one
-	if w.oldIndex != nil {
-		for _, e := range w.oldIndex.Entries {
-			found, ok := newdirs[e.ImportPath]
-			if !ok {
-				w.newIndex.Entries = append(w.newIndex.Entries, e)
-				continue // use this one, there is no new one
-			}
-			if semver.Compare(found[0].version, e.Version) > 0 {
-				// use the new one
-			} else {
-				// use the old one, forget the new one
-				w.newIndex.Entries = append(w.newIndex.Entries, e)
-				delete(newdirs, e.ImportPath)
+
+	// For each import path it might occur only in
+	// dirByPath, only in old, or in both.
+	// If both, use the semantically later one.
+	var entries []Entry
+	if old != nil {
+		for _, entry := range old.Entries {
+			dir, ok := dirByPath[entry.ImportPath]
+			if !ok || semver.Compare(dir.version, entry.Version) <= 0 {
+				// New dir is missing or not more recent; use old entry.
+				entries = append(entries, entry)
+				delete(dirByPath, entry.ImportPath)
 			}
 		}
 	}
-	// get symbol information for all the new diredtories
-	getSymbols(w.cacheDir, newdirs)
-	// assemble the new index entries
-	for k, v := range newdirs {
-		d := v[0]
-		pkg, names := processSyms(d.syms)
-		if pkg == "" {
-			continue // PJW: does this ever happen?
-		}
-		entry := Entry{
-			PkgName:    pkg,
-			Dir:        d.path,
-			ImportPath: k,
-			Version:    d.version,
-			Names:      names,
-		}
-		w.newIndex.Entries = append(w.newIndex.Entries, entry)
-	}
-	// sort the entries in the new index
-	slices.SortFunc(w.newIndex.Entries, func(l, r Entry) int {
-		if n := strings.Compare(l.PkgName, r.PkgName); n != 0 {
+
+	// Extract symbol information for all the new directories.
+	newEntries := extractSymbols(gomodcache, maps.Values(dirByPath))
+	entries = append(entries, newEntries...)
+	slices.SortFunc(entries, func(x, y Entry) int {
+		if n := strings.Compare(x.PkgName, y.PkgName); n != 0 {
 			return n
 		}
-		return strings.Compare(l.ImportPath, r.ImportPath)
+		return strings.Compare(x.ImportPath, y.ImportPath)
 	})
-	return nil
-}
 
-func (w *work) writeIndex() error {
-	return writeIndex(w.cacheDir, w.newIndex)
+	return &Index{
+		GOMODCACHE: gomodcache,
+		ValidAt:    now, // time before the directories were scanned
+		Entries:    entries,
+	}, len(newEntries) > 0, nil
 }
diff --git a/vendor/golang.org/x/tools/internal/modindex/symbols.go b/vendor/golang.org/x/tools/internal/modindex/symbols.go
index 31a502c58..fe24db9b1 100644
--- a/vendor/golang.org/x/tools/internal/modindex/symbols.go
+++ b/vendor/golang.org/x/tools/internal/modindex/symbols.go
@@ -10,11 +10,13 @@ import (
 	"go/parser"
 	"go/token"
 	"go/types"
+	"iter"
 	"os"
 	"path/filepath"
 	"runtime"
 	"slices"
 	"strings"
+	"sync"
 
 	"golang.org/x/sync/errgroup"
 )
@@ -34,41 +36,65 @@ type symbol struct {
 	sig  string // signature information, for F
 }
 
-// find the symbols for the best directories
-func getSymbols(cd Abspath, dirs map[string][]*directory) {
+// extractSymbols returns a (new, unordered) array of Entries, one for
+// each provided package directory, describing its exported symbols.
+func extractSymbols(cwd string, dirs iter.Seq[directory]) []Entry {
+	var (
+		mu      sync.Mutex
+		entries []Entry
+	)
+
 	var g errgroup.Group
 	g.SetLimit(max(2, runtime.GOMAXPROCS(0)/2))
-	for _, vv := range dirs {
-		// throttling some day?
-		d := vv[0]
+	for dir := range dirs {
 		g.Go(func() error {
-			thedir := filepath.Join(string(cd), string(d.path))
+			thedir := filepath.Join(cwd, string(dir.path))
 			mode := parser.SkipObjectResolution | parser.ParseComments
 
-			fi, err := os.ReadDir(thedir)
+			// Parse all Go files in dir and extract symbols.
+			dirents, err := os.ReadDir(thedir)
 			if err != nil {
 				return nil // log this someday?
 			}
-			for _, fx := range fi {
-				if !strings.HasSuffix(fx.Name(), ".go") || strings.HasSuffix(fx.Name(), "_test.go") {
+			var syms []symbol
+			for _, dirent := range dirents {
+				if !strings.HasSuffix(dirent.Name(), ".go") ||
+					strings.HasSuffix(dirent.Name(), "_test.go") {
 					continue
 				}
-				fname := filepath.Join(thedir, fx.Name())
+				fname := filepath.Join(thedir, dirent.Name())
 				tr, err := parser.ParseFile(token.NewFileSet(), fname, nil, mode)
 				if err != nil {
 					continue // ignore errors, someday log them?
 				}
-				d.syms = append(d.syms, getFileExports(tr)...)
+				syms = append(syms, getFileExports(tr)...)
+			}
+
+			// Create an entry for the package.
+			pkg, names := processSyms(syms)
+			if pkg != "" {
+				mu.Lock()
+				defer mu.Unlock()
+				entries = append(entries, Entry{
+					PkgName:    pkg,
+					Dir:        dir.path,
+					ImportPath: dir.importPath,
+					Version:    dir.version,
+					Names:      names,
+				})
 			}
+
 			return nil
 		})
 	}
-	g.Wait()
+	g.Wait() // ignore error
+
+	return entries
 }
 
 func getFileExports(f *ast.File) []symbol {
 	pkg := f.Name.Name
-	if pkg == "main" {
+	if pkg == "main" || pkg == "" {
 		return nil
 	}
 	var ans []symbol
@@ -202,17 +228,18 @@ func processSyms(syms []symbol) (string, []string) {
 	pkg := syms[0].pkg
 	var names []string
 	for _, s := range syms {
+		if s.pkg != pkg {
+			// Symbols came from two files in same dir
+			// with different package declarations.
+			continue
+		}
 		var nx string
-		if s.pkg == pkg {
-			if s.sig != "" {
-				nx = fmt.Sprintf("%s %s %s", s.name, s.kind, s.sig)
-			} else {
-				nx = fmt.Sprintf("%s %s", s.name, s.kind)
-			}
-			names = append(names, nx)
+		if s.sig != "" {
+			nx = fmt.Sprintf("%s %s %s", s.name, s.kind, s.sig)
 		} else {
-			continue // PJW: do we want to keep track of these?
+			nx = fmt.Sprintf("%s %s", s.name, s.kind)
 		}
+		names = append(names, nx)
 	}
 	return pkg, names
 }
diff --git a/vendor/golang.org/x/tools/internal/modindex/types.go b/vendor/golang.org/x/tools/internal/modindex/types.go
deleted file mode 100644
index ece448863..000000000
--- a/vendor/golang.org/x/tools/internal/modindex/types.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package modindex
-
-import (
-	"strings"
-)
-
-// some special types to avoid confusions
-
-// distinguish various types of directory names. It's easy to get confused.
-type Abspath string // absolute paths
-type Relpath string // paths with GOMODCACHE prefix removed
-
-func toRelpath(cachedir Abspath, s string) Relpath {
-	if strings.HasPrefix(s, string(cachedir)) {
-		if s == string(cachedir) {
-			return Relpath("")
-		}
-		return Relpath(s[len(cachedir)+1:])
-	}
-	return Relpath(s)
-}
diff --git a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
index 73eefa2a7..929b470be 100644
--- a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
+++ b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
@@ -5,6 +5,8 @@
 // Package packagesinternal exposes internal-only fields from go/packages.
 package packagesinternal
 
+import "fmt"
+
 var GetDepsErrors = func(p any) []*PackageError { return nil }
 
 type PackageError struct {
@@ -13,5 +15,9 @@ type PackageError struct {
 	Err         string   // the error itself
 }
 
+func (err PackageError) String() string {
+	return fmt.Sprintf("%s: %s (import stack: %s)", err.Pos, err.Err, err.ImportStack)
+}
+
 var TypecheckCgo int
 var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go
index c9b343c71..b1264017d 100644
--- a/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -360,6 +360,10 @@ type Balancer interface {
 	// call SubConn.Shutdown for its existing SubConns; however, this will be
 	// required in a future release, so it is recommended.
 	Close()
+	// ExitIdle instructs the LB policy to reconnect to backends / exit the
+	// IDLE state, if appropriate and possible.  Note that SubConns that enter
+	// the IDLE state will not reconnect until SubConn.Connect is called.
+	ExitIdle()
 }
 
 // ExitIdler is an optional interface for balancers to implement.  If
@@ -367,8 +371,8 @@ type Balancer interface {
 // the ClientConn is idle.  If unimplemented, ClientConn.Connect will cause
 // all SubConns to connect.
 //
-// Notice: it will be required for all balancers to implement this in a future
-// release.
+// Deprecated: All balancers must implement this interface. This interface will
+// be removed in a future release.
 type ExitIdler interface {
 	// ExitIdle instructs the LB policy to reconnect to backends / exit the
 	// IDLE state, if appropriate and possible.  Note that SubConns that enter
diff --git a/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go b/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
index cc606f4da..0ad6bb1f2 100644
--- a/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
+++ b/vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go
@@ -45,7 +45,15 @@ type ChildState struct {
 
 	// Balancer exposes only the ExitIdler interface of the child LB policy.
 	// Other methods of the child policy are called only by endpointsharding.
-	Balancer balancer.ExitIdler
+	Balancer ExitIdler
+}
+
+// ExitIdler provides access to only the ExitIdle method of the child balancer.
+type ExitIdler interface {
+	// ExitIdle instructs the LB policy to reconnect to backends / exit the
+	// IDLE state, if appropriate and possible.  Note that SubConns that enter
+	// the IDLE state will not reconnect until SubConn.Connect is called.
+	ExitIdle()
 }
 
 // Options are the options to configure the behaviour of the
@@ -205,6 +213,16 @@ func (es *endpointSharding) Close() {
 	}
 }
 
+func (es *endpointSharding) ExitIdle() {
+	es.childMu.Lock()
+	defer es.childMu.Unlock()
+	for _, bw := range es.children.Load().Values() {
+		if !bw.isClosed {
+			bw.child.ExitIdle()
+		}
+	}
+}
+
 // updateState updates this component's state. It sends the aggregated state,
 // and a picker with round robin behavior with all the child states present if
 // needed.
@@ -326,15 +344,13 @@ func (bw *balancerWrapper) UpdateState(state balancer.State) {
 // ExitIdle pings an IDLE child balancer to exit idle in a new goroutine to
 // avoid deadlocks due to synchronous balancer state updates.
 func (bw *balancerWrapper) ExitIdle() {
-	if ei, ok := bw.child.(balancer.ExitIdler); ok {
-		go func() {
-			bw.es.childMu.Lock()
-			if !bw.isClosed {
-				ei.ExitIdle()
-			}
-			bw.es.childMu.Unlock()
-		}()
-	}
+	go func() {
+		bw.es.childMu.Lock()
+		if !bw.isClosed {
+			bw.child.ExitIdle()
+		}
+		bw.es.childMu.Unlock()
+	}()
 }
 
 // updateClientConnStateLocked delivers the ClientConnState to the child
diff --git a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
index 494314f23..e62047256 100644
--- a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
+++ b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
@@ -54,18 +54,9 @@ func init() {
 	balancer.Register(pickfirstBuilder{})
 }
 
-type (
-	// enableHealthListenerKeyType is a unique key type used in resolver
-	// attributes to indicate whether the health listener usage is enabled.
-	enableHealthListenerKeyType struct{}
-	// managedByPickfirstKeyType is an attribute key type to inform Outlier
-	// Detection that the generic health listener is being used.
-	// TODO: https://github.com/grpc/grpc-go/issues/7915 - Remove this when
-	// implementing the dualstack design. This is a hack. Once Dualstack is
-	// completed, outlier detection will stop sending ejection updates through
-	// the connectivity listener.
-	managedByPickfirstKeyType struct{}
-)
+// enableHealthListenerKeyType is a unique key type used in resolver
+// attributes to indicate whether the health listener usage is enabled.
+type enableHealthListenerKeyType struct{}
 
 var (
 	logger = grpclog.Component("pick-first-leaf-lb")
@@ -149,17 +140,6 @@ func EnableHealthListener(state resolver.State) resolver.State {
 	return state
 }
 
-// IsManagedByPickfirst returns whether an address belongs to a SubConn
-// managed by the pickfirst LB policy.
-// TODO: https://github.com/grpc/grpc-go/issues/7915 - This is a hack to disable
-// outlier_detection via the with connectivity listener when using pick_first.
-// Once Dualstack changes are complete, all SubConns will be created by
-// pick_first and outlier detection will only use the health listener for
-// ejection. This hack can then be removed.
-func IsManagedByPickfirst(addr resolver.Address) bool {
-	return addr.BalancerAttributes.Value(managedByPickfirstKeyType{}) != nil
-}
-
 type pfConfig struct {
 	serviceconfig.LoadBalancingConfig `json:"-"`
 
@@ -186,7 +166,6 @@ type scData struct {
 }
 
 func (b *pickfirstBalancer) newSCData(addr resolver.Address) (*scData, error) {
-	addr.BalancerAttributes = addr.BalancerAttributes.WithValue(managedByPickfirstKeyType{}, true)
 	sd := &scData{
 		rawConnectivityState: connectivity.Idle,
 		effectiveState:       connectivity.Idle,
diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
index 35da5d1ec..22045bf39 100644
--- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
+++ b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
@@ -70,10 +70,3 @@ func (b *rrBalancer) UpdateClientConnState(ccs balancer.ClientConnState) error {
 		ResolverState: pickfirstleaf.EnableHealthListener(ccs.ResolverState),
 	})
 }
-
-func (b *rrBalancer) ExitIdle() {
-	// Should always be ok, as child is endpoint sharding.
-	if ei, ok := b.Balancer.(balancer.ExitIdler); ok {
-		ei.ExitIdle()
-	}
-}
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 050ba0f16..ec0ca89cc 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -213,6 +213,7 @@ func WithReadBufferSize(s int) DialOption {
 func WithInitialWindowSize(s int32) DialOption {
 	return newFuncDialOption(func(o *dialOptions) {
 		o.copts.InitialWindowSize = s
+		o.copts.StaticWindowSize = true
 	})
 }
 
@@ -222,6 +223,26 @@ func WithInitialWindowSize(s int32) DialOption {
 func WithInitialConnWindowSize(s int32) DialOption {
 	return newFuncDialOption(func(o *dialOptions) {
 		o.copts.InitialConnWindowSize = s
+		o.copts.StaticWindowSize = true
+	})
+}
+
+// WithStaticStreamWindowSize returns a DialOption which sets the initial
+// stream window size to the value provided and disables dynamic flow control.
+func WithStaticStreamWindowSize(s int32) DialOption {
+	return newFuncDialOption(func(o *dialOptions) {
+		o.copts.InitialWindowSize = s
+		o.copts.StaticWindowSize = true
+	})
+}
+
+// WithStaticConnWindowSize returns a DialOption which sets the initial
+// connection window size to the value provided and disables dynamic flow
+// control.
+func WithStaticConnWindowSize(s int32) DialOption {
+	return newFuncDialOption(func(o *dialOptions) {
+		o.copts.InitialConnWindowSize = s
+		o.copts.StaticWindowSize = true
 	})
 }
 
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
index 93136610e..f2c01f296 100644
--- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
@@ -188,13 +188,13 @@ type HealthServer interface {
 type UnimplementedHealthServer struct{}
 
 func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
+	return nil, status.Error(codes.Unimplemented, "method Check not implemented")
 }
 func (UnimplementedHealthServer) List(context.Context, *HealthListRequest) (*HealthListResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
+	return nil, status.Error(codes.Unimplemented, "method List not implemented")
 }
 func (UnimplementedHealthServer) Watch(*HealthCheckRequest, grpc.ServerStreamingServer[HealthCheckResponse]) error {
-	return status.Errorf(codes.Unimplemented, "method Watch not implemented")
+	return status.Error(codes.Unimplemented, "method Watch not implemented")
 }
 func (UnimplementedHealthServer) testEmbeddedByValue() {}
 
diff --git a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go
index fbc1ca356..ba25b8988 100644
--- a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go
+++ b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go
@@ -223,15 +223,7 @@ func (gsb *Balancer) ExitIdle() {
 	// There is no need to protect this read with a mutex, as the write to the
 	// Balancer field happens in SwitchTo, which completes before this can be
 	// called.
-	if ei, ok := balToUpdate.Balancer.(balancer.ExitIdler); ok {
-		ei.ExitIdle()
-		return
-	}
-	gsb.mu.Lock()
-	defer gsb.mu.Unlock()
-	for sc := range balToUpdate.subconns {
-		sc.Connect()
-	}
+	balToUpdate.ExitIdle()
 }
 
 // updateSubConnState forwards the update to the appropriate child.
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index f5f2bdeb8..2fdaed88d 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -33,10 +33,6 @@ var (
 	// "GRPC_RING_HASH_CAP".  This does not override the default bounds
 	// checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M).
 	RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024)
-	// LeastRequestLB is set if we should support the least_request_experimental
-	// LB policy, which can be enabled by setting the environment variable
-	// "GRPC_EXPERIMENTAL_ENABLE_LEAST_REQUEST" to "true".
-	LeastRequestLB = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_LEAST_REQUEST", true)
 	// ALTSMaxConcurrentHandshakes is the maximum number of concurrent ALTS
 	// handshakes that can be performed.
 	ALTSMaxConcurrentHandshakes = uint64FromEnv("GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES", 100, 1, 100)
diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index ef72fbb3a..a2831e5d0 100644
--- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -40,6 +40,13 @@ var updateHeaderTblSize = func(e *hpack.Encoder, v uint32) {
 	e.SetMaxDynamicTableSizeLimit(v)
 }
 
+// itemNodePool is used to reduce heap allocations.
+var itemNodePool = sync.Pool{
+	New: func() any {
+		return &itemNode{}
+	},
+}
+
 type itemNode struct {
 	it   any
 	next *itemNode
@@ -51,7 +58,9 @@ type itemList struct {
 }
 
 func (il *itemList) enqueue(i any) {
-	n := &itemNode{it: i}
+	n := itemNodePool.Get().(*itemNode)
+	n.next = nil
+	n.it = i
 	if il.tail == nil {
 		il.head, il.tail = n, n
 		return
@@ -71,7 +80,9 @@ func (il *itemList) dequeue() any {
 		return nil
 	}
 	i := il.head.it
+	temp := il.head
 	il.head = il.head.next
+	itemNodePool.Put(temp)
 	if il.head == nil {
 		il.tail = nil
 	}
@@ -146,10 +157,11 @@ type earlyAbortStream struct {
 func (*earlyAbortStream) isTransportResponseFrame() bool { return false }
 
 type dataFrame struct {
-	streamID  uint32
-	endStream bool
-	h         []byte
-	reader    mem.Reader
+	streamID   uint32
+	endStream  bool
+	h          []byte
+	data       mem.BufferSlice
+	processing bool
 	// onEachWrite is called every time
 	// a part of data is written out.
 	onEachWrite func()
@@ -234,6 +246,7 @@ type outStream struct {
 	itl              *itemList
 	bytesOutStanding int
 	wq               *writeQuota
+	reader           mem.Reader
 
 	next *outStream
 	prev *outStream
@@ -461,7 +474,9 @@ func (c *controlBuffer) finish() {
 				v.onOrphaned(ErrConnClosing)
 			}
 		case *dataFrame:
-			_ = v.reader.Close()
+			if !v.processing {
+				v.data.Free()
+			}
 		}
 	}
 
@@ -650,10 +665,11 @@ func (l *loopyWriter) incomingSettingsHandler(s *incomingSettings) error {
 
 func (l *loopyWriter) registerStreamHandler(h *registerStream) {
 	str := &outStream{
-		id:    h.streamID,
-		state: empty,
-		itl:   &itemList{},
-		wq:    h.wq,
+		id:     h.streamID,
+		state:  empty,
+		itl:    &itemList{},
+		wq:     h.wq,
+		reader: mem.BufferSlice{}.Reader(),
 	}
 	l.estdStreams[h.streamID] = str
 }
@@ -685,10 +701,11 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error {
 	}
 	// Case 2: Client wants to originate stream.
 	str := &outStream{
-		id:    h.streamID,
-		state: empty,
-		itl:   &itemList{},
-		wq:    h.wq,
+		id:     h.streamID,
+		state:  empty,
+		itl:    &itemList{},
+		wq:     h.wq,
+		reader: mem.BufferSlice{}.Reader(),
 	}
 	return l.originateStream(str, h)
 }
@@ -790,10 +807,13 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error {
 		// a RST_STREAM before stream initialization thus the stream might
 		// not be established yet.
 		delete(l.estdStreams, c.streamID)
+		str.reader.Close()
 		str.deleteSelf()
 		for head := str.itl.dequeueAll(); head != nil; head = head.next {
 			if df, ok := head.it.(*dataFrame); ok {
-				_ = df.reader.Close()
+				if !df.processing {
+					df.data.Free()
+				}
 			}
 		}
 	}
@@ -928,7 +948,13 @@ func (l *loopyWriter) processData() (bool, error) {
 	if str == nil {
 		return true, nil
 	}
+	reader := str.reader
 	dataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream.
+	if !dataItem.processing {
+		dataItem.processing = true
+		str.reader.Reset(dataItem.data)
+		dataItem.data.Free()
+	}
 	// A data item is represented by a dataFrame, since it later translates into
 	// multiple HTTP2 data frames.
 	// Every dataFrame has two buffers; h that keeps grpc-message header and data
@@ -936,13 +962,13 @@ func (l *loopyWriter) processData() (bool, error) {
 	// from data is copied to h to make as big as the maximum possible HTTP2 frame
 	// size.
 
-	if len(dataItem.h) == 0 && dataItem.reader.Remaining() == 0 { // Empty data frame
+	if len(dataItem.h) == 0 && reader.Remaining() == 0 { // Empty data frame
 		// Client sends out empty data frame with endStream = true
 		if err := l.framer.fr.WriteData(dataItem.streamID, dataItem.endStream, nil); err != nil {
 			return false, err
 		}
 		str.itl.dequeue() // remove the empty data item from stream
-		_ = dataItem.reader.Close()
+		_ = reader.Close()
 		if str.itl.isEmpty() {
 			str.state = empty
 		} else if trailer, ok := str.itl.peek().(*headerFrame); ok { // the next item is trailers.
@@ -971,8 +997,8 @@ func (l *loopyWriter) processData() (bool, error) {
 	}
 	// Compute how much of the header and data we can send within quota and max frame length
 	hSize := min(maxSize, len(dataItem.h))
-	dSize := min(maxSize-hSize, dataItem.reader.Remaining())
-	remainingBytes := len(dataItem.h) + dataItem.reader.Remaining() - hSize - dSize
+	dSize := min(maxSize-hSize, reader.Remaining())
+	remainingBytes := len(dataItem.h) + reader.Remaining() - hSize - dSize
 	size := hSize + dSize
 
 	var buf *[]byte
@@ -993,7 +1019,7 @@ func (l *loopyWriter) processData() (bool, error) {
 		defer pool.Put(buf)
 
 		copy((*buf)[:hSize], dataItem.h)
-		_, _ = dataItem.reader.Read((*buf)[hSize:])
+		_, _ = reader.Read((*buf)[hSize:])
 	}
 
 	// Now that outgoing flow controls are checked we can replenish str's write quota
@@ -1014,7 +1040,7 @@ func (l *loopyWriter) processData() (bool, error) {
 	dataItem.h = dataItem.h[hSize:]
 
 	if remainingBytes == 0 { // All the data from that message was written out.
-		_ = dataItem.reader.Close()
+		_ = reader.Close()
 		str.itl.dequeue()
 	}
 	if str.itl.isEmpty() {
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index ef56592b9..5467fe971 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -309,11 +309,9 @@ func NewHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
 			scheme = "https"
 		}
 	}
-	dynamicWindow := true
 	icwz := int32(initialWindowSize)
 	if opts.InitialConnWindowSize >= defaultWindowSize {
 		icwz = opts.InitialConnWindowSize
-		dynamicWindow = false
 	}
 	writeBufSize := opts.WriteBufferSize
 	readBufSize := opts.ReadBufferSize
@@ -381,9 +379,8 @@ func NewHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
 	t.controlBuf = newControlBuffer(t.ctxDone)
 	if opts.InitialWindowSize >= defaultWindowSize {
 		t.initialWindowSize = opts.InitialWindowSize
-		dynamicWindow = false
 	}
-	if dynamicWindow {
+	if !opts.StaticWindowSize {
 		t.bdpEst = &bdpEstimator{
 			bdp:               initialWindowSize,
 			updateFlowControl: t.updateFlowControl,
@@ -1091,32 +1088,29 @@ func (t *http2Client) GracefulClose() {
 // Write formats the data into HTTP2 data frame(s) and sends it out. The caller
 // should proceed only if Write returns nil.
 func (t *http2Client) write(s *ClientStream, hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {
-	reader := data.Reader()
-
 	if opts.Last {
 		// If it's the last message, update stream state.
 		if !s.compareAndSwapState(streamActive, streamWriteDone) {
-			_ = reader.Close()
 			return errStreamDone
 		}
 	} else if s.getState() != streamActive {
-		_ = reader.Close()
 		return errStreamDone
 	}
 	df := &dataFrame{
 		streamID:  s.id,
 		endStream: opts.Last,
 		h:         hdr,
-		reader:    reader,
+		data:      data,
 	}
-	if hdr != nil || df.reader.Remaining() != 0 { // If it's not an empty data frame, check quota.
-		if err := s.wq.get(int32(len(hdr) + df.reader.Remaining())); err != nil {
-			_ = reader.Close()
+	dataLen := data.Len()
+	if hdr != nil || dataLen != 0 { // If it's not an empty data frame, check quota.
+		if err := s.wq.get(int32(len(hdr) + dataLen)); err != nil {
 			return err
 		}
 	}
+	data.Ref()
 	if err := t.controlBuf.put(df); err != nil {
-		_ = reader.Close()
+		data.Free()
 		return err
 	}
 	t.incrMsgSent()
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index e4c3731bd..9f725e15a 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -132,6 +132,10 @@ type http2Server struct {
 	maxStreamID uint32 // max stream ID ever seen
 
 	logger *grpclog.PrefixLogger
+	// setResetPingStrikes is stored as a closure instead of making this a
+	// method on http2Server to avoid a heap allocation when converting a method
+	// to a closure for passing to frames objects.
+	setResetPingStrikes func()
 }
 
 // NewServerTransport creates a http2 transport with conn and configuration
@@ -176,16 +180,13 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
 			Val: config.MaxStreams,
 		})
 	}
-	dynamicWindow := true
 	iwz := int32(initialWindowSize)
 	if config.InitialWindowSize >= defaultWindowSize {
 		iwz = config.InitialWindowSize
-		dynamicWindow = false
 	}
 	icwz := int32(initialWindowSize)
 	if config.InitialConnWindowSize >= defaultWindowSize {
 		icwz = config.InitialConnWindowSize
-		dynamicWindow = false
 	}
 	if iwz != defaultWindowSize {
 		isettings = append(isettings, http2.Setting{
@@ -266,6 +267,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
 		initialWindowSize: iwz,
 		bufferPool:        config.BufferPool,
 	}
+	t.setResetPingStrikes = func() {
+		atomic.StoreUint32(&t.resetPingStrikes, 1)
+	}
 	var czSecurity credentials.ChannelzSecurityValue
 	if au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok {
 		czSecurity = au.GetSecurityValue()
@@ -285,7 +289,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
 	t.logger = prefixLoggerForServerTransport(t)
 
 	t.controlBuf = newControlBuffer(t.done)
-	if dynamicWindow {
+	if !config.StaticWindowSize {
 		t.bdpEst = &bdpEstimator{
 			bdp:               initialWindowSize,
 			updateFlowControl: t.updateFlowControl,
@@ -596,10 +600,25 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
 			return nil
 		}
 	}
+
+	if s.ctx.Err() != nil {
+		t.mu.Unlock()
+		// Early abort in case the timeout was zero or so low it already fired.
+		t.controlBuf.put(&earlyAbortStream{
+			httpStatus:     http.StatusOK,
+			streamID:       s.id,
+			contentSubtype: s.contentSubtype,
+			status:         status.New(codes.DeadlineExceeded, context.DeadlineExceeded.Error()),
+			rst:            !frame.StreamEnded(),
+		})
+		return nil
+	}
+
 	t.activeStreams[streamID] = s
 	if len(t.activeStreams) == 1 {
 		t.idle = time.Time{}
 	}
+
 	// Start a timer to close the stream on reaching the deadline.
 	if timeoutSet {
 		// We need to wait for s.cancel to be updated before calling
@@ -1016,10 +1035,6 @@ func (t *http2Server) writeHeader(s *ServerStream, md metadata.MD) error {
 	return nil
 }
 
-func (t *http2Server) setResetPingStrikes() {
-	atomic.StoreUint32(&t.resetPingStrikes, 1)
-}
-
 func (t *http2Server) writeHeaderLocked(s *ServerStream) error {
 	// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
 	// first and create a slice of that exact size.
@@ -1132,17 +1147,13 @@ func (t *http2Server) writeStatus(s *ServerStream, st *status.Status) error {
 // Write converts the data into HTTP2 data frame and sends it out. Non-nil error
 // is returns if it fails (e.g., framing error, transport error).
 func (t *http2Server) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _ *WriteOptions) error {
-	reader := data.Reader()
-
 	if !s.isHeaderSent() { // Headers haven't been written yet.
 		if err := t.writeHeader(s, nil); err != nil {
-			_ = reader.Close()
 			return err
 		}
 	} else {
 		// Writing headers checks for this condition.
 		if s.getState() == streamDone {
-			_ = reader.Close()
 			return t.streamContextErr(s)
 		}
 	}
@@ -1150,15 +1161,16 @@ func (t *http2Server) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _
 	df := &dataFrame{
 		streamID:    s.id,
 		h:           hdr,
-		reader:      reader,
+		data:        data,
 		onEachWrite: t.setResetPingStrikes,
 	}
-	if err := s.wq.get(int32(len(hdr) + df.reader.Remaining())); err != nil {
-		_ = reader.Close()
+	dataLen := data.Len()
+	if err := s.wq.get(int32(len(hdr) + dataLen)); err != nil {
 		return t.streamContextErr(s)
 	}
+	data.Ref()
 	if err := t.controlBuf.put(df); err != nil {
-		_ = reader.Close()
+		data.Free()
 		return err
 	}
 	t.incrMsgSent()
diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go
index 607d2c4ce..e3663f87f 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http_util.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go
@@ -200,9 +200,6 @@ func decodeTimeout(s string) (time.Duration, error) {
 	if err != nil {
 		return 0, err
 	}
-	if t == 0 {
-		return 0, fmt.Errorf("transport: timeout must be positive: %q", s)
-	}
 	const maxHours = math.MaxInt64 / uint64(time.Hour)
 	if d == time.Hour && t > maxHours {
 		// This timeout would overflow math.MaxInt64; clamp it.
diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go
index 1730a639f..7dd53e80a 100644
--- a/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -466,6 +466,7 @@ type ServerConfig struct {
 	MaxHeaderListSize     *uint32
 	HeaderTableSize       *uint32
 	BufferPool            mem.BufferPool
+	StaticWindowSize      bool
 }
 
 // ConnectOptions covers all relevant options for communicating with the server.
@@ -504,6 +505,8 @@ type ConnectOptions struct {
 	MaxHeaderListSize *uint32
 	// The mem.BufferPool to use when reading/writing to the wire.
 	BufferPool mem.BufferPool
+	// StaticWindowSize controls whether dynamic window sizing is enabled.
+	StaticWindowSize bool
 }
 
 // WriteOptions provides additional hints and information for message
diff --git a/vendor/google.golang.org/grpc/mem/buffer_slice.go b/vendor/google.golang.org/grpc/mem/buffer_slice.go
index 65002e2cc..af510d20c 100644
--- a/vendor/google.golang.org/grpc/mem/buffer_slice.go
+++ b/vendor/google.golang.org/grpc/mem/buffer_slice.go
@@ -137,6 +137,9 @@ type Reader interface {
 	Close() error
 	// Remaining returns the number of unread bytes remaining in the slice.
 	Remaining() int
+	// Reset frees the currently held buffer slice and starts reading from the
+	// provided slice. This allows reusing the reader object.
+	Reset(s BufferSlice)
 }
 
 type sliceReader struct {
@@ -150,6 +153,14 @@ func (r *sliceReader) Remaining() int {
 	return r.len
 }
 
+func (r *sliceReader) Reset(s BufferSlice) {
+	r.data.Free()
+	s.Ref()
+	r.data = s
+	r.len = s.Len()
+	r.bufferIdx = 0
+}
+
 func (r *sliceReader) Close() error {
 	r.data.Free()
 	r.data = nil
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
index 976e70ae0..70fe23f55 100644
--- a/vendor/google.golang.org/grpc/server.go
+++ b/vendor/google.golang.org/grpc/server.go
@@ -179,6 +179,7 @@ type serverOptions struct {
 	numServerWorkers      uint32
 	bufferPool            mem.BufferPool
 	waitForHandlers       bool
+	staticWindowSize      bool
 }
 
 var defaultServerOptions = serverOptions{
@@ -279,6 +280,7 @@ func ReadBufferSize(s int) ServerOption {
 func InitialWindowSize(s int32) ServerOption {
 	return newFuncServerOption(func(o *serverOptions) {
 		o.initialWindowSize = s
+		o.staticWindowSize = true
 	})
 }
 
@@ -287,6 +289,29 @@ func InitialWindowSize(s int32) ServerOption {
 func InitialConnWindowSize(s int32) ServerOption {
 	return newFuncServerOption(func(o *serverOptions) {
 		o.initialConnWindowSize = s
+		o.staticWindowSize = true
+	})
+}
+
+// StaticStreamWindowSize returns a ServerOption to set the initial stream
+// window size to the value provided and disables dynamic flow control.
+// The lower bound for window size is 64K and any value smaller than that
+// will be ignored.
+func StaticStreamWindowSize(s int32) ServerOption {
+	return newFuncServerOption(func(o *serverOptions) {
+		o.initialWindowSize = s
+		o.staticWindowSize = true
+	})
+}
+
+// StaticConnWindowSize returns a ServerOption to set the initial connection
+// window size to the value provided and disables dynamic flow control.
+// The lower bound for window size is 64K and any value smaller than that
+// will be ignored.
+func StaticConnWindowSize(s int32) ServerOption {
+	return newFuncServerOption(func(o *serverOptions) {
+		o.initialConnWindowSize = s
+		o.staticWindowSize = true
 	})
 }
 
@@ -986,6 +1011,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport {
 		MaxHeaderListSize:     s.opts.maxHeaderListSize,
 		HeaderTableSize:       s.opts.headerTableSize,
 		BufferPool:            s.opts.bufferPool,
+		StaticWindowSize:      s.opts.staticWindowSize,
 	}
 	st, err := transport.NewServerTransport(c, config)
 	if err != nil {
diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go
index d58bb6471..ca6948926 100644
--- a/vendor/google.golang.org/grpc/stream.go
+++ b/vendor/google.golang.org/grpc/stream.go
@@ -1171,7 +1171,7 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) {
 	} else if err != nil {
 		return toRPCErr(err)
 	}
-	return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want "))
+	return status.Errorf(codes.Internal, "cardinality violation: expected  for non server-streaming RPCs, but received another message")
 }
 
 func (a *csAttempt) finish(err error) {
@@ -1495,7 +1495,7 @@ func (as *addrConnStream) RecvMsg(m any) (err error) {
 	} else if err != nil {
 		return toRPCErr(err)
 	}
-	return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want "))
+	return status.Errorf(codes.Internal, "cardinality violation: expected  for non server-streaming RPCs, but received another message")
 }
 
 func (as *addrConnStream) finish(err error) {
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index bd82673dc..8b0e5f973 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
 package grpc
 
 // Version is the current grpc version.
-const Version = "1.73.0"
+const Version = "1.74.2"
diff --git a/vendor/k8s.io/gengo/v2/Makefile b/vendor/k8s.io/gengo/v2/Makefile
new file mode 100644
index 000000000..5cb81a2fd
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/Makefile
@@ -0,0 +1,14 @@
+all:
+	go build ./...
+
+test:
+	GODEBUG=gotypesalias=0 go test -race ./... -count=1
+	GODEBUG=gotypesalias=1 go test -race ./... -count=1
+
+# We verify for the maximum version of the go directive as 1.20
+# here because the oldest go directive that exists on our supported
+# release branches in k/k is 1.20.
+verify:
+	GODEBUG=gotypesalias=0 ./hack/verify-examples.sh
+	GODEBUG=gotypesalias=1 ./hack/verify-examples.sh
+	./hack/verify-go-directive.sh 1.23
diff --git a/vendor/k8s.io/gengo/v2/README.md b/vendor/k8s.io/gengo/v2/README.md
index 79d1070d1..e1dff4b4b 100644
--- a/vendor/k8s.io/gengo/v2/README.md
+++ b/vendor/k8s.io/gengo/v2/README.md
@@ -50,4 +50,4 @@ The `tracer` example in this repo can be used to examine all of the hooks.
 
 ## Contributing
 
-Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute.
+Please see [CONTRIBUTING.md](../CONTRIBUTING.md) for instructions on how to contribute.
diff --git a/vendor/k8s.io/gengo/v2/codetags/extractor.go b/vendor/k8s.io/gengo/v2/codetags/extractor.go
new file mode 100644
index 000000000..5e58b0083
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/codetags/extractor.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package codetags
+
+import (
+	"strings"
+	"unicode/utf8"
+)
+
+// Extract identifies and collects lines containing special metadata tags.
+// It processes only lines that begin with the prefix.
+//
+// The portion of a line immediately following the prefix is treated as
+// a potential tag name. To be considered valid, this tag name must
+// match the regular expression `[a-zA-Z_][a-zA-Z0-9_.-:]*`.
+//
+// Extract returns a map where each key is a valid tag name found in
+// lines that begin with the prefix.
+// The value for each key is a slice of strings. Each string in this slice
+// represents the contents of an original line after the prefix has been removed.
+//
+// Example: When called with prefix "+k8s:", lines:
+//
+//	Comment line without marker
+//	+k8s:noArgs # comment
+//	+withValue=value1
+//	+withValue=value2
+//	+k8s:withArg(arg1)=value1
+//	+k8s:withArg(arg2)=value2 # comment
+//	+k8s:withNamedArgs(arg1=value1, arg2=value2)=value
+//
+// Then this function will return:
+//
+//	map[string][]string{
+//		"noArgs":        {"noArgs # comment"},
+//		"withArg":       {"withArg(arg1)=value1", "withArg(arg2)=value2 # comment"},
+//		"withNamedArgs": {"withNamedArgs(arg1=value1, arg2=value2)=value"},
+//	}
+func Extract(prefix string, lines []string) map[string][]string {
+	out := map[string][]string{}
+	for _, line := range lines {
+		line = strings.TrimLeft(line, " \t")
+		if !strings.HasPrefix(line, prefix) {
+			continue
+		}
+		line = line[len(prefix):]
+
+		// Find the end of the presumed tag name.
+		nameEnd := findNameEnd(line)
+		name := line[:nameEnd]
+		out[name] = append(out[name], line)
+	}
+	return out
+}
+
+// findNameEnd matches a tag in the same way as the parser.
+func findNameEnd(s string) int {
+	if len(s) == 0 {
+		return 0
+	}
+	if r, _ := utf8.DecodeRuneInString(s); !isIdentBegin(r) {
+		return 0
+	}
+	idx := strings.IndexFunc(s, func(r rune) bool {
+		return !(isTagNameInterior(r))
+	})
+	if idx == -1 {
+		return len(s)
+	}
+	return idx
+}
diff --git a/vendor/k8s.io/gengo/v2/codetags/parser.go b/vendor/k8s.io/gengo/v2/codetags/parser.go
new file mode 100644
index 000000000..8ff49b039
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/codetags/parser.go
@@ -0,0 +1,407 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package codetags
+
+import (
+	"fmt"
+	"strings"
+	"unicode"
+)
+
+// Parse parses a tag string into a Tag, or returns an error if the tag
+// string fails to parse.
+//
+// ParseOption may be provided to modify the behavior of the parser. The below
+// describes the default behavior.
+//
+// A tag consists of a name, optional arguments, and an optional scalar value or
+// tag value. For example,
+//
+//	"name"
+//	"name=50"
+//	"name("featureX")=50"
+//	"name(limit: 10, path: "/xyz")=text value"
+//	"name(limit: 10, path: "/xyz")=+anotherTag(size: 100)"
+//
+// Arguments are optional and may be either:
+//   - A single positional argument.
+//   - One or more named arguments (in the format `name: value`).
+//   - (Positional and named arguments cannot be mixed.)
+//
+// For example,
+//
+//	"name()"
+//	"name(arg)"
+//	"name(namedArg1: argValue1)"
+//	"name(namedArg1: argValue1, namedArg2: argValue2)"
+//
+// Argument values may be strings, ints, booleans, or identifiers.
+//
+// For example,
+//
+//	"name("double-quoted")"
+//	"name(`backtick-quoted`)"
+//	"name(100)"
+//	"name(true)"
+//	"name(arg1: identifier)"
+//	"name(arg1:`string value`)"
+//	"name(arg1: 100)"
+//	"name(arg1: true)"
+//
+// Note: When processing Go source code comments, the Extract function is
+// typically used first to find and isolate tag strings matching a specific
+// prefix. Those extracted strings can then be parsed using this function.
+//
+// The value part of the tag is optional and follows an equals sign "=". If a
+// value is present, it must be a string, int, boolean, identifier, or tag.
+//
+// For example,
+//
+//	"name" # no value
+//	"name=identifier"
+//	"name="double-quoted value""
+//	"name=`backtick-quoted value`"
+//	"name(100)"
+//	"name(true)"
+//	"name=+anotherTag"
+//	"name=+anotherTag(size: 100)"
+//
+// Trailing comments are ignored unless the RawValues option is enabled, in which
+// case they are treated as part of the value.
+//
+// For example,
+//
+//	"key=value # This comment is ignored"
+//
+// Formal Grammar:
+//
+//              ::=  [ "(" [  ] ")" ] [ ( "="  | "=+"  ) ]
+//             ::=  | 
+//        ::=  [ ","  ]*
+//  ::=  ":" 
+//            ::=  |  |  | 
+//
+//        ::= [a-zA-Z_][a-zA-Z0-9_-.:]*
+//     ::= [a-zA-Z_][a-zA-Z0-9_-.]*
+//         ::= /* Go-style double-quoted or backtick-quoted strings,
+// ...                    with standard Go escape sequences for double-quoted strings. */
+//            ::= /* Standard Go integer literals (decimal, 0x hex, 0o octal, 0b binary),
+// ...                    with an optional +/- prefix. */
+//           ::= "true" | "false"
+func Parse(tag string, options ...ParseOption) (Tag, error) {
+	opts := parseOpts{}
+	for _, o := range options {
+		o(&opts)
+	}
+
+	tag = strings.TrimSpace(tag)
+	return parseTag(tag, opts)
+}
+
+// ParseAll calls Parse on each tag in the input slice.
+func ParseAll(tags []string, options ...ParseOption) ([]Tag, error) {
+	var out []Tag
+	for _, tag := range tags {
+		parsed, err := Parse(tag, options...)
+		if err != nil {
+			return nil, err
+		}
+		out = append(out, parsed)
+	}
+	return out, nil
+}
+
+type parseOpts struct {
+	rawValues bool
+}
+
+// ParseOption provides a parser option.
+type ParseOption func(*parseOpts)
+
+// RawValues skips parsing of the value part of the tag. If enabled, the Value
+// in the parse response will contain all text following the "=" sign, up to the last
+// non-whitespace character, and ValueType will be set to ValueTypeRaw.
+// Default: disabled
+func RawValues(enabled bool) ParseOption {
+	return func(opts *parseOpts) {
+		opts.rawValues = enabled
+	}
+}
+
+func parseTag(input string, opts parseOpts) (Tag, error) {
+	const (
+		stTag           = "stTag"
+		stMaybeArgs     = "stMaybeArgs"
+		stArg           = "stArg"
+		stArgEndOfToken = "stArgEndOfToken"
+		stMaybeValue    = "stMaybeValue"
+		stValue         = "stValue"
+		stMaybeComment  = "stMaybeComment"
+	)
+	var startTag, endTag *Tag // both ends of the chain when parsing chained tags
+
+	// accumulators
+	var tagName string      // current tag name
+	var value string        // current value
+	var valueType ValueType // current value type
+	cur := Arg{}            // current argument
+	var args []Arg          // current arguments slice
+
+	s := scanner{buf: []rune(input)} // scanner for parsing the tag string
+	var incomplete bool              // tracks if a token is incomplete
+
+	// These are defined outside the loop to make errors easier.
+	saveArg := func(v string, t ArgType) {
+		cur.Value = v
+		cur.Type = t
+		args = append(args, cur)
+		cur = Arg{}
+	}
+	saveInt := func(v string) { saveArg(v, ArgTypeInt) }
+	saveString := func(v string) { saveArg(v, ArgTypeString) }
+	saveBoolOrString := func(value string) {
+		if value == "true" || value == "false" {
+			saveArg(value, ArgTypeBool)
+		} else {
+			saveArg(value, ArgTypeString)
+		}
+	}
+	saveName := func(value string) {
+		cur.Name = value
+	}
+	saveTag := func() error {
+		usingNamedArgs := false
+		for i, arg := range args {
+			if (usingNamedArgs && arg.Name == "") || (!usingNamedArgs && arg.Name != "" && i > 0) {
+				return fmt.Errorf("can't mix named and positional arguments")
+			}
+			if arg.Name != "" {
+				usingNamedArgs = true
+			}
+		}
+		if !usingNamedArgs && len(args) > 1 {
+			return fmt.Errorf("multiple arguments must use 'name: value' syntax")
+		}
+		newTag := &Tag{Name: tagName, Args: args}
+		if startTag == nil {
+			startTag = newTag
+			endTag = newTag
+		} else {
+			endTag.ValueTag = newTag
+			endTag.ValueType = ValueTypeTag
+			endTag = newTag
+		}
+		args = nil // Reset to nil instead of empty slice
+		return nil
+	}
+	saveValue := func() {
+		endTag.Value = value
+		endTag.ValueType = valueType
+	}
+	var err error
+	st := stTag
+parseLoop:
+	for r := s.peek(); r != EOF; r = s.peek() {
+		switch st {
+		case stTag: // Any leading whitespace is expected to be trimmed before parsing.
+			switch {
+			case isIdentBegin(r):
+				tagName, err = s.nextIdent(isTagNameInterior)
+				if err != nil {
+					return Tag{}, err
+				}
+				st = stMaybeArgs
+			default:
+				break parseLoop
+			}
+		case stMaybeArgs:
+			switch {
+			case r == '(':
+				s.next() // consume (
+				incomplete = true
+				st = stArg
+			case r == '=':
+				s.next() // consume =
+				if opts.rawValues {
+					// only raw values support empty values following =
+					valueType = ValueTypeRaw
+				} else {
+					incomplete = true
+				}
+				st = stValue
+			default:
+				st = stMaybeComment
+			}
+		case stArg:
+			switch {
+			case r == ')':
+				s.next() // consume )
+				incomplete = false
+				st = stMaybeValue
+			case r == '-' || r == '+' || unicode.IsDigit(r):
+				number, err := s.nextNumber()
+				if err != nil {
+					return Tag{}, err
+				}
+				saveInt(number)
+				st = stArgEndOfToken
+			case r == '"' || r == '`':
+				str, err := s.nextString()
+				if err != nil {
+					return Tag{}, err
+				}
+				saveString(str)
+				st = stArgEndOfToken
+			case isIdentBegin(r):
+				identifier, err := s.nextIdent(isIdentInterior)
+				if err != nil {
+					return Tag{}, err
+				}
+				r = s.peek() // reset r after nextIdent
+
+				switch {
+				case r == ',' || r == ')': // positional arg
+					if r == ',' {
+						r = s.skipWhitespace() // allow whitespace after ,
+					}
+					saveBoolOrString(identifier)
+					st = stArgEndOfToken
+				case r == ':': // named arg
+					s.next()               // consume :
+					r = s.skipWhitespace() // allow whitespace after :
+					saveName(identifier)
+					st = stArg
+				default:
+					break parseLoop
+				}
+			default:
+				break parseLoop
+			}
+		case stArgEndOfToken:
+			switch {
+			case r == ',':
+				s.next()               // consume ,
+				r = s.skipWhitespace() // allow whitespace after ,
+				st = stArg
+			case r == ')':
+				s.next() // consume )
+				incomplete = false
+				st = stMaybeValue
+			default:
+				break parseLoop
+			}
+		case stMaybeValue:
+			switch {
+			case r == '=':
+				s.next() // consume =
+				if opts.rawValues {
+					// Empty values are allowed for raw.
+					// Since = might be the last char in the input, we need
+					// to record the valueType as raw immediately.
+					valueType = ValueTypeRaw
+				}
+				st = stValue
+			default:
+				st = stMaybeComment
+			}
+		case stValue:
+			switch {
+			case opts.rawValues: // When enabled, consume all remaining chars
+				incomplete = false
+				value = s.remainder()
+				break parseLoop
+			case r == '+' && isIdentBegin(s.peekN(1)): // tag value
+				incomplete = false
+				s.next() // consume +
+				if err := saveTag(); err != nil {
+					return Tag{}, err
+				}
+				st = stTag
+			case r == '-' || r == '+' || unicode.IsDigit(r):
+				incomplete = false
+				number, err := s.nextNumber()
+				valueType = ValueTypeInt
+				if err != nil {
+					return Tag{}, err
+				}
+				value = number
+				st = stMaybeComment
+			case r == '"' || r == '`':
+				incomplete = false
+				str, err := s.nextString()
+				if err != nil {
+					return Tag{}, err
+				}
+				value = str
+				valueType = ValueTypeString
+				st = stMaybeComment
+			case isIdentBegin(r):
+				incomplete = false
+				str, err := s.nextIdent(isIdentInterior)
+				if err != nil {
+					return Tag{}, err
+				}
+				value = str
+				if str == "true" || str == "false" {
+					valueType = ValueTypeBool
+				} else {
+					valueType = ValueTypeString
+				}
+				st = stMaybeComment
+			default:
+				break parseLoop
+			}
+		case stMaybeComment:
+			switch {
+			case s.nextIsTrailingComment():
+				s.remainder()
+			default:
+				break parseLoop
+			}
+		default:
+			return Tag{}, fmt.Errorf("unexpected internal parser error: unknown state: %s at position %d", st, s.pos)
+		}
+	}
+	if s.peek() != EOF {
+		return Tag{}, fmt.Errorf("unexpected character %q at position %d", s.next(), s.pos)
+	}
+	if incomplete {
+		return Tag{}, fmt.Errorf("unexpected end of input")
+	}
+	if err := saveTag(); err != nil {
+		return Tag{}, err
+	}
+	if len(valueType) > 0 {
+		saveValue()
+	}
+	if startTag == nil {
+		return Tag{}, fmt.Errorf("unexpected internal parser error: no tags parsed")
+	}
+	return *startTag, nil
+}
+
+func isIdentBegin(r rune) bool {
+	return unicode.IsLetter(r) || r == '_'
+}
+
+func isIdentInterior(r rune) bool {
+	return unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' || r == '.' || r == '-'
+}
+
+func isTagNameInterior(r rune) bool {
+	return isIdentInterior(r) || r == ':'
+}
diff --git a/vendor/k8s.io/gengo/v2/codetags/scanner.go b/vendor/k8s.io/gengo/v2/codetags/scanner.go
new file mode 100644
index 000000000..5204e347f
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/codetags/scanner.go
@@ -0,0 +1,228 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package codetags
+
+import (
+	"bytes"
+	"fmt"
+	"strconv"
+	"strings"
+	"unicode"
+)
+
+type scanner struct {
+	buf []rune
+	pos int
+}
+
+func (s *scanner) next() rune {
+	if s.pos >= len(s.buf) {
+		return EOF
+	}
+	r := s.buf[s.pos]
+	s.pos++
+	return r
+}
+
+func (s *scanner) peek() rune {
+	return s.peekN(0)
+}
+
+func (s *scanner) peekN(n int) rune {
+	if s.pos+n >= len(s.buf) {
+		return EOF
+	}
+	return s.buf[s.pos+n]
+}
+
+func (s *scanner) skipWhitespace() rune {
+	for r := s.peek(); unicode.IsSpace(r); r = s.peek() {
+		s.next()
+	}
+	return s.peek()
+}
+
+func (s *scanner) remainder() string {
+	result := string(s.buf[s.pos:])
+	s.pos = len(s.buf)
+	return result
+}
+
+const (
+	EOF = -1
+)
+
+func (s *scanner) nextIsTrailingComment() bool {
+	i := 0
+	for ; unicode.IsSpace(s.peekN(i)); i++ {
+	}
+	return s.peekN(i) == '#'
+}
+
+func (s *scanner) nextNumber() (string, error) {
+	const (
+		stBegin  = "stBegin"
+		stPrefix = "stPrefix"
+		stPosNeg = "stPosNeg"
+		stNumber = "stNumber"
+	)
+	var buf bytes.Buffer
+	st := stBegin
+
+parseLoop:
+	for r := s.peek(); r != EOF; r = s.peek() {
+		switch st {
+		case stBegin:
+			switch {
+			case r == '0':
+				buf.WriteRune(s.next())
+				st = stPrefix
+			case r == '+' || r == '-':
+				buf.WriteRune(s.next())
+				st = stPosNeg
+			case unicode.IsDigit(r):
+				buf.WriteRune(s.next())
+				st = stNumber
+			default:
+				break parseLoop
+			}
+		case stPosNeg:
+			switch {
+			case r == '0':
+				buf.WriteRune(s.next())
+				st = stPrefix
+			case unicode.IsDigit(r):
+				buf.WriteRune(s.next())
+				st = stNumber
+			default:
+				break parseLoop
+			}
+		case stPrefix:
+			switch {
+			case unicode.IsDigit(r):
+				buf.WriteRune(s.next())
+				st = stNumber
+			case r == 'x' || r == 'o' || r == 'b':
+				buf.WriteRune(s.next())
+				st = stNumber
+			default:
+				break parseLoop
+			}
+		case stNumber:
+			const hexits = "abcdefABCDEF"
+			switch {
+			case unicode.IsDigit(r) || strings.Contains(hexits, string(r)):
+				buf.WriteRune(s.next())
+			default:
+				break parseLoop
+			}
+		default:
+			return "", fmt.Errorf("unexpected internal parser error: unknown state: %s at position %d", st, s.pos)
+		}
+	}
+	numStr := buf.String()
+	if _, err := strconv.ParseInt(numStr, 0, 64); err != nil {
+		return "", fmt.Errorf("invalid number %q at position %d", numStr, s.pos)
+	}
+	return numStr, nil
+}
+
+func (s *scanner) nextString() (string, error) {
+	const (
+		stBegin        = "stBegin"
+		stQuotedString = "stQuotedString"
+		stEscape       = "stEscape"
+	)
+	var buf bytes.Buffer
+	var quote rune
+	var incomplete bool
+	st := stBegin
+
+parseLoop:
+	for r := s.peek(); r != EOF; r = s.peek() {
+		switch st {
+		case stBegin:
+			switch {
+			case r == '"' || r == '`':
+				incomplete = true
+				quote = s.next() // consume quote
+				st = stQuotedString
+			default:
+				return "", fmt.Errorf("expected string at position %d", s.pos)
+			}
+		case stQuotedString:
+			switch {
+			case r == '\\':
+				s.next() // consume escape
+				st = stEscape
+			case r == quote:
+				incomplete = false
+				s.next()
+				break parseLoop
+			default:
+				buf.WriteRune(s.next())
+			}
+		case stEscape:
+			switch {
+			case r == quote || r == '\\':
+				buf.WriteRune(s.next())
+				st = stQuotedString
+			default:
+				return "", fmt.Errorf("unhandled escaped character %q", r)
+			}
+		default:
+			return "", fmt.Errorf("unexpected internal parser error: unknown state: %s at position %d", st, s.pos)
+		}
+	}
+	if incomplete {
+		return "", fmt.Errorf("unterminated string at position %d", s.pos)
+	}
+	return buf.String(), nil
+}
+
+func (s *scanner) nextIdent(isInteriorChar func(r rune) bool) (string, error) {
+	const (
+		stBegin    = "stBegin"
+		stInterior = "stInterior"
+	)
+	var buf bytes.Buffer
+	st := stBegin
+
+parseLoop:
+	for r := s.peek(); r != EOF; r = s.peek() {
+		switch st {
+		case stBegin:
+			switch {
+			case isIdentBegin(r):
+				buf.WriteRune(s.next())
+				st = stInterior
+			default:
+				return "", fmt.Errorf("expected identifier at position %d", s.pos)
+			}
+		case stInterior:
+			switch {
+			case isInteriorChar(r):
+				buf.WriteRune(s.next())
+			default:
+				break parseLoop
+			}
+		default:
+			return "", fmt.Errorf("unexpected internal parser error: unknown state: %s at position %d", st, s.pos)
+		}
+	}
+	return buf.String(), nil
+}
diff --git a/vendor/k8s.io/gengo/v2/codetags/types.go b/vendor/k8s.io/gengo/v2/codetags/types.go
new file mode 100644
index 000000000..d004f9bf2
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/codetags/types.go
@@ -0,0 +1,169 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package codetags
+
+import (
+	"strconv"
+	"strings"
+)
+
+// Tag represents a single comment tag with typed args.
+type Tag struct {
+	// Name is the name of the tag with no arguments.
+	Name string
+
+	// Args is a list of optional arguments to the tag.
+	Args []Arg
+
+	// Value is the string representation of the tag value.
+	// Provides the tag value when ValueType is ValueTypeString, ValueTypeBool, ValueTypeInt or ValueTypeRaw.
+	Value string
+
+	// ValueTag is another tag parsed from the value of this tag.
+	// Provides the tag value when ValueType is ValueTypeTag.
+	ValueTag *Tag
+
+	// ValueType is the type of the value.
+	ValueType ValueType
+}
+
+// PositionalArg returns the positional argument. If there is no positional
+// argument, it returns false.
+func (t Tag) PositionalArg() (Arg, bool) {
+	if len(t.Args) == 0 || len(t.Args[0].Name) > 0 {
+		return Arg{}, false
+	}
+	return t.Args[0], true
+}
+
+// NamedArg returns the named argument. If o named argument is found, it returns
+// false. Always returns false for empty name; use PositionalArg instead.
+func (t Tag) NamedArg(name string) (Arg, bool) {
+	if len(name) == 0 {
+		return Arg{}, false
+	}
+	for _, arg := range t.Args {
+		if arg.Name == name {
+			return arg, true
+		}
+	}
+	return Arg{}, false
+}
+
+// String returns the canonical string representation of the tag.
+// All strings are represented in double quotes. Spacing is normalized.
+func (t Tag) String() string {
+	buf := strings.Builder{}
+	buf.WriteString(t.Name)
+	if len(t.Args) > 0 {
+		buf.WriteString("(")
+		for i, a := range t.Args {
+			if i > 0 {
+				buf.WriteString(", ")
+			}
+			buf.WriteString(a.String())
+		}
+		buf.WriteString(")")
+	}
+	if t.ValueType != ValueTypeNone {
+		if t.ValueType == ValueTypeTag {
+			buf.WriteString("=+")
+			buf.WriteString(t.ValueTag.String())
+		} else {
+			buf.WriteString("=")
+			if t.ValueType == ValueTypeString {
+				buf.WriteString(strconv.Quote(t.Value))
+			} else {
+				buf.WriteString(t.Value)
+			}
+		}
+	}
+	return buf.String()
+}
+
+// Arg represents a argument.
+type Arg struct {
+	// Name is the name of a named argument. This is zero-valued for positional arguments.
+	Name string
+
+	// Value is the string value of an argument. It has been validated to match the Type.
+	// See the ArgType const godoc for further details on how to parse the value for the
+	// Type.
+	Value string
+
+	// Type identifies the type of the argument.
+	Type ArgType
+}
+
+func (a Arg) String() string {
+	buf := strings.Builder{}
+	if len(a.Name) > 0 {
+		buf.WriteString(a.Name)
+		buf.WriteString(": ")
+	}
+	if a.Type == ArgTypeString {
+		buf.WriteString(strconv.Quote(a.Value))
+	} else {
+		buf.WriteString(a.Value)
+	}
+	return buf.String()
+}
+
+// ArgType is an argument's type.
+type ArgType string
+
+const (
+	// ArgTypeString identifies string values.
+	ArgTypeString ArgType = "string"
+
+	// ArgTypeInt identifies int values. Values of this type may be in decimal,
+	// octal, hex or binary string representations. Consider using strconv.ParseInt
+	// to parse, as it supports all these string representations.
+	ArgTypeInt ArgType = "int"
+
+	// ArgTypeBool identifies bool values. Values of this type must either be the
+	// string "true" or "false".
+	ArgTypeBool ArgType = "bool"
+)
+
+// ValueType is a tag's value type.
+type ValueType string
+
+const (
+	// ValueTypeNone indicates that the tag has no value.
+	ValueTypeNone ValueType = ""
+
+	// ValueTypeString identifies string values.
+	ValueTypeString ValueType = "string"
+
+	// ValueTypeInt identifies int values. Values of this type may be in decimal,
+	// octal, hex or binary string representations. Consider using strconv.ParseInt
+	// to parse, as it supports all these string representations.
+	ValueTypeInt ValueType = "int"
+
+	// ValueTypeBool identifies bool values. Values of this type must either be the
+	// string "true" or "false".
+	ValueTypeBool ValueType = "bool"
+
+	// ValueTypeTag identifies that the value is another tag.
+	ValueTypeTag ValueType = "tag"
+
+	// ValueTypeRaw identifies that the value is raw, untyped content and contains
+	// all text from the tag declaration following the "=" sign, up to the last
+	// non-whitespace character.
+	ValueTypeRaw ValueType = "raw"
+)
diff --git a/vendor/k8s.io/gengo/v2/comments.go b/vendor/k8s.io/gengo/v2/comments.go
index ba49c432b..fbc41bed5 100644
--- a/vendor/k8s.io/gengo/v2/comments.go
+++ b/vendor/k8s.io/gengo/v2/comments.go
@@ -17,8 +17,12 @@ limitations under the License.
 package gengo
 
 import (
+	"bytes"
 	"fmt"
+	"slices"
 	"strings"
+
+	"k8s.io/gengo/v2/codetags"
 )
 
 // ExtractCommentTags parses comments for lines of the form:
@@ -39,7 +43,9 @@ import (
 //
 // Then this function will return:
 //
-//	map[string][]string{"foo":{"value1, "value2"}, "bar": {""}, "baz": {"qux"}}
+//	map[string][]string{"foo":{"value1, "value2"}, "bar": {""}, "baz": {`"qux"`}}
+//
+// Deprecated: Prefer codetags.Extract and codetags.Parse.
 func ExtractCommentTags(marker string, lines []string) map[string][]string {
 	out := map[string][]string{}
 	for _, line := range lines {
@@ -50,7 +56,6 @@ func ExtractCommentTags(marker string, lines []string) map[string][]string {
 		if !strings.HasPrefix(line, marker) {
 			continue
 		}
-		// TODO: we could support multiple values per key if we split on spaces
 		kv := strings.SplitN(line[len(marker):], "=", 2)
 		if len(kv) == 2 {
 			out[kv[0]] = append(out[kv[0]], kv[1])
@@ -68,16 +73,122 @@ func ExtractCommentTags(marker string, lines []string) map[string][]string {
 // If the tag is not found, the default value is returned.  Values are asserted
 // to be boolean ("true" or "false"), and any other value will cause an error
 // to be returned.  If the key has multiple values, the first one will be used.
+//
+// This function is a wrapper around codetags.Extract and codetags.Parse, but only supports tags with
+// a single position arg of type string, and a value of type bool.
 func ExtractSingleBoolCommentTag(marker string, key string, defaultVal bool, lines []string) (bool, error) {
-	values := ExtractCommentTags(marker, lines)[key]
+	tags, err := ExtractFunctionStyleCommentTags(marker, []string{key}, lines, ParseValues(true))
+	if err != nil {
+		return false, err
+	}
+	values := tags[key]
 	if values == nil {
 		return defaultVal, nil
 	}
-	if values[0] == "true" {
+	if values[0].Value == "true" {
 		return true, nil
 	}
-	if values[0] == "false" {
+	if values[0].Value == "false" {
 		return false, nil
 	}
 	return false, fmt.Errorf("tag value for %q is not boolean: %q", key, values[0])
 }
+
+// ExtractFunctionStyleCommentTags parses comments for special metadata tags.
+//
+// This function is a wrapper around codetags.Extract and codetags.Parse, but only supports tags with
+// a single position arg of type string.
+func ExtractFunctionStyleCommentTags(marker string, tagNames []string, lines []string, options ...TagOption) (map[string][]Tag, error) {
+	opts := tagOpts{}
+	for _, o := range options {
+		o(&opts)
+	}
+
+	out := map[string][]Tag{}
+
+	tags := codetags.Extract(marker, lines)
+	for tagName, tagLines := range tags {
+		if len(tagNames) > 0 && !slices.Contains(tagNames, tagName) {
+			continue
+		}
+		for _, line := range tagLines {
+			typedTag, err := codetags.Parse(line, codetags.RawValues(!opts.parseValues))
+			if err != nil {
+				return nil, err
+			}
+			tag, err := toStringArgs(typedTag)
+			if err != nil {
+				return nil, err
+			}
+			out[tagName] = append(out[tagName], tag)
+		}
+	}
+
+	return out, nil
+}
+
+// TagOption provides an option for extracting tags.
+type TagOption func(opts *tagOpts)
+
+// ParseValues enables parsing of tag values. When enabled, tag values must
+// be valid quoted strings, ints, booleans, identifiers, or tags. Otherwise, a
+// parse error will be returned. Also, when enabled, trailing comments are
+// ignored.
+// Default: disabled
+func ParseValues(enabled bool) TagOption {
+	return func(opts *tagOpts) {
+		opts.parseValues = enabled
+	}
+}
+
+type tagOpts struct {
+	parseValues bool
+}
+
+func toStringArgs(tag codetags.Tag) (Tag, error) {
+	var stringArgs []string
+	if len(tag.Args) > 1 {
+		return Tag{}, fmt.Errorf("expected one argument, got: %v", tag.Args)
+	}
+	for _, arg := range tag.Args {
+		if len(arg.Name) > 0 {
+			return Tag{}, fmt.Errorf("unexpected named argument: %q", arg.Name)
+		}
+		if arg.Type != codetags.ArgTypeString {
+			return Tag{}, fmt.Errorf("unexpected argument type: %s", arg.Type)
+		} else {
+			stringArgs = append(stringArgs, arg.Value)
+		}
+	}
+	return Tag{
+		Name:  tag.Name,
+		Args:  stringArgs,
+		Value: tag.Value,
+	}, nil
+}
+
+// Tag represents a single comment tag.
+type Tag struct {
+	// Name is the name of the tag with no arguments.
+	Name string
+	// Args is a list of optional arguments to the tag.
+	Args []string
+	// Value is the value of the tag.
+	Value string
+}
+
+func (t Tag) String() string {
+	buf := bytes.Buffer{}
+	buf.WriteString(t.Name)
+	if len(t.Args) > 0 {
+		buf.WriteString("(")
+		for i, a := range t.Args {
+			if i > 0 {
+				buf.WriteString(", ")
+			}
+			buf.WriteString(a)
+		}
+		buf.WriteString(")")
+	}
+	return buf.String()
+}
diff --git a/vendor/k8s.io/gengo/v2/generator/execute.go b/vendor/k8s.io/gengo/v2/generator/execute.go
index 02b4c3318..06edb5c21 100644
--- a/vendor/k8s.io/gengo/v2/generator/execute.go
+++ b/vendor/k8s.io/gengo/v2/generator/execute.go
@@ -22,10 +22,12 @@ import (
 	"fmt"
 	"io"
 	"os"
+	"os/exec"
 	"path/filepath"
 	"strings"
 
 	"golang.org/x/tools/imports"
+
 	"k8s.io/gengo/v2/namer"
 	"k8s.io/gengo/v2/types"
 	"k8s.io/klog/v2"
@@ -113,13 +115,53 @@ func assembleGoFile(w io.Writer, f *File) {
 	w.Write(f.Body.Bytes())
 }
 
+func formatCode(src []byte) ([]byte, error) {
+	// We call goimports because it formats imports better than gofmt, but also
+	// call gofmt because it has the "simplify" logic.  If a gofmt binary is
+	// not found, we will skip it.
+	src, err := importsWrapper(src)
+	if err != nil {
+		return nil, err
+	}
+	return gofmtWrapper(src)
+}
+
 func importsWrapper(src []byte) ([]byte, error) {
-	return imports.Process("", src, nil)
+	opt := imports.Options{
+		Comments:   true,
+		TabIndent:  true,
+		TabWidth:   8,
+		FormatOnly: true, // Disable the insertion and deletion of imports (slow!)
+	}
+	return imports.Process("", src, &opt)
+}
+
+func gofmtWrapper(src []byte) ([]byte, error) {
+	const gofmt = "gofmt"
+
+	if _, err := exec.LookPath(gofmt); err != nil {
+		klog.Errorf("WARNING: skipping output simplification: %v", err)
+		return nil, nil
+	}
+
+	cmd := exec.Command(gofmt, "-s")
+	cmd.Stdin = bytes.NewReader(src)
+	stdout := &bytes.Buffer{}
+	cmd.Stdout = stdout
+	stderr := &bytes.Buffer{}
+	cmd.Stderr = stderr
+	if err := cmd.Run(); err != nil {
+		if stderr.Len() > 0 {
+			return nil, fmt.Errorf("%s failed: %v: %s", gofmt, err, strings.TrimSpace(stderr.String()))
+		}
+		return nil, fmt.Errorf("%s failed: %v", gofmt, err)
+	}
+	return stdout.Bytes(), nil
 }
 
 func NewGoFile() *DefaultFileType {
 	return &DefaultFileType{
-		Format:   importsWrapper,
+		Format:   formatCode,
 		Assemble: assembleGoFile,
 	}
 }
diff --git a/vendor/k8s.io/gengo/v2/generator/import_tracker.go b/vendor/k8s.io/gengo/v2/generator/import_tracker.go
index 70b86cf56..f4b0f7b5f 100644
--- a/vendor/k8s.io/gengo/v2/generator/import_tracker.go
+++ b/vendor/k8s.io/gengo/v2/generator/import_tracker.go
@@ -18,6 +18,7 @@ package generator
 
 import (
 	"go/token"
+	"path/filepath"
 	"strings"
 
 	"k8s.io/klog/v2"
@@ -45,7 +46,7 @@ import (
 func NewImportTrackerForPackage(local string, typesToAdd ...*types.Type) *namer.DefaultImportTracker {
 	tracker := namer.NewDefaultImportTracker(types.Name{Package: local})
 	tracker.IsInvalidType = func(*types.Type) bool { return false }
-	tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, name) }
+	tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, local, name) }
 	tracker.PrintImport = func(path, name string) string { return name + " \"" + path + "\"" }
 
 	tracker.AddTypes(typesToAdd...)
@@ -56,16 +57,17 @@ func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker {
 	return NewImportTrackerForPackage("", typesToAdd...)
 }
 
-func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string {
+func goTrackerLocalName(tracker namer.ImportTracker, localPkg string, t types.Name) string {
 	path := t.Package
 
 	// Using backslashes in package names causes gengo to produce Go code which
-	// will not compile with the gc compiler. See the comment on GoSeperator.
+	// will not compile with the gc compiler. See the comment on GoSeparator.
 	if strings.ContainsRune(path, '\\') {
 		klog.Warningf("Warning: backslash used in import path '%v', this is unsupported.\n", path)
 	}
+	localLeaf := filepath.Base(localPkg)
 
-	dirs := strings.Split(path, namer.GoSeperator)
+	dirs := strings.Split(path, namer.GoSeparator)
 	for n := len(dirs) - 1; n >= 0; n-- {
 		// follow kube convention of not having anything between directory names
 		name := strings.Join(dirs[n:], "")
@@ -74,8 +76,13 @@ func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string {
 		// packages, but aren't legal go names. So we'll sanitize.
 		name = strings.ReplaceAll(name, ".", "")
 		name = strings.ReplaceAll(name, "-", "")
-		if _, found := tracker.PathOf(name); found {
-			// This name collides with some other package
+		if _, found := tracker.PathOf(name); found || name == localLeaf {
+			// This name collides with some other package.
+			// Or, this name is tne same name as the local package,
+			// which we avoid because it can be confusing. For example,
+			// if the local package is v1, we to avoid importing
+			// another package using the v1 name, and instead import
+			// it with a more qualified name, such as metav1.
 			continue
 		}
 
diff --git a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go
index 7f4610c00..b0adcc28a 100644
--- a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go
+++ b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go
@@ -123,25 +123,28 @@ func (s *SnippetWriter) Do(format string, args interface{}) *SnippetWriter {
 // SnippetWriter.Do.
 type Args map[interface{}]interface{}
 
-// With makes a copy of a and adds the given key, value pair.
+// With makes a copy of a and adds the given key, value pair. If key overlaps,
+// the new value wins.
 func (a Args) With(key, value interface{}) Args {
-	a2 := Args{key: value}
+	result := Args{}
 	for k, v := range a {
-		a2[k] = v
+		result[k] = v
 	}
-	return a2
+	result[key] = value
+	return result
 }
 
-// WithArgs makes a copy of a and adds the given arguments.
+// WithArgs makes a copy of a and adds the given arguments. If any keys
+// overlap, the values from rhs win.
 func (a Args) WithArgs(rhs Args) Args {
-	a2 := Args{}
-	for k, v := range rhs {
-		a2[k] = v
-	}
+	result := Args{}
 	for k, v := range a {
-		a2[k] = v
+		result[k] = v
+	}
+	for k, v := range rhs {
+		result[k] = v
 	}
-	return a2
+	return result
 }
 
 func (s *SnippetWriter) Out() io.Writer {
@@ -152,3 +155,34 @@ func (s *SnippetWriter) Out() io.Writer {
 func (s *SnippetWriter) Error() error {
 	return s.err
 }
+
+// Dup creates an exact duplicate SnippetWriter with a different io.Writer.
+func (s *SnippetWriter) Dup(w io.Writer) *SnippetWriter {
+	ret := *s
+	ret.w = w
+	return &ret
+}
+
+// Append adds the contents of the io.Reader to this SnippetWriter's buffer.
+func (s *SnippetWriter) Append(r io.Reader) error {
+	// The behavior of Do() is to ignore all future calls if there's an error,
+	// assuming the top-level caller will check Error().  This method is
+	// effectively a fancy Do(), so keep the same semantic.
+	if s.err != nil {
+		return nil
+	}
+	_, err := io.Copy(s.w, r)
+	return err
+}
+
+// Merge adds the contents of the io.Reader to this SnippetWriter's buffer and
+// sets this SnippetWriter's error to the other's, if needed.
+func (s *SnippetWriter) Merge(r io.Reader, other *SnippetWriter) error {
+	if s.err != nil {
+		return nil
+	}
+	if other.err != nil {
+		s.err = other.err
+	}
+	return s.Append(r)
+}
diff --git a/vendor/k8s.io/gengo/v2/namer/namer.go b/vendor/k8s.io/gengo/v2/namer/namer.go
index e82fe66ad..2202f8e70 100644
--- a/vendor/k8s.io/gengo/v2/namer/namer.go
+++ b/vendor/k8s.io/gengo/v2/namer/namer.go
@@ -26,14 +26,17 @@ import (
 )
 
 const (
-	// GoSeperator is used to split go import paths.
+	// GoSeparator is used to split go import paths.
 	// Forward slash is used instead of filepath.Seperator because it is the
 	// only universally-accepted path delimiter and the only delimiter not
 	// potentially forbidden by Go compilers. (In particular gc does not allow
 	// the use of backslashes in import paths.)
 	// See https://golang.org/ref/spec#Import_declarations.
 	// See also https://github.com/kubernetes/gengo/issues/83#issuecomment-367040772.
-	GoSeperator = "/"
+	GoSeparator = "/"
+	// GoSeperator is a typo for GoSeparator.
+	// Deprecated: use GoSeparator instead.
+	GoSeperator = GoSeparator
 )
 
 // Returns whether a name is a private Go name.
@@ -200,7 +203,7 @@ var (
 
 // filters out unwanted directory names and sanitizes remaining names.
 func (ns *NameStrategy) filterDirs(path string) []string {
-	allDirs := strings.Split(path, GoSeperator)
+	allDirs := strings.Split(path, GoSeparator)
 	dirs := make([]string, 0, len(allDirs))
 	for _, p := range allDirs {
 		if ns.IgnoreWords == nil || !ns.IgnoreWords[p] {
@@ -281,12 +284,12 @@ func (ns *NameStrategy) Name(t *types.Type) string {
 	case types.Func:
 		// TODO: add to name test
 		parts := []string{"Func"}
-		for _, pt := range t.Signature.Parameters {
-			parts = append(parts, ns.removePrefixAndSuffix(ns.Name(pt)))
+		for _, param := range t.Signature.Parameters {
+			parts = append(parts, ns.removePrefixAndSuffix(ns.Name(param.Type)))
 		}
 		parts = append(parts, "Returns")
-		for _, rt := range t.Signature.Results {
-			parts = append(parts, ns.removePrefixAndSuffix(ns.Name(rt)))
+		for _, result := range t.Signature.Results {
+			parts = append(parts, ns.removePrefixAndSuffix(ns.Name(result.Type)))
 		}
 		name = ns.Join(ns.Prefix, parts, ns.Suffix)
 	default:
@@ -370,16 +373,20 @@ func (r *rawNamer) Name(t *types.Type) string {
 			// TODO: include function signature
 			elems = append(elems, m.Name.Name)
 		}
-		name = "interface{" + strings.Join(elems, "; ") + "}"
+		if len(elems) == 0 {
+			name = "any"
+		} else {
+			name = "interface{" + strings.Join(elems, "; ") + "}"
+		}
 	case types.Func:
 		// TODO: add to name test
 		params := []string{}
-		for _, pt := range t.Signature.Parameters {
-			params = append(params, r.Name(pt))
+		for _, param := range t.Signature.Parameters {
+			params = append(params, r.Name(param.Type))
 		}
 		results := []string{}
-		for _, rt := range t.Signature.Results {
-			results = append(results, r.Name(rt))
+		for _, result := range t.Signature.Results {
+			results = append(results, r.Name(result.Type))
 		}
 		name = "func(" + strings.Join(params, ",") + ")"
 		if len(results) == 1 {
diff --git a/vendor/k8s.io/gengo/v2/parser/parse.go b/vendor/k8s.io/gengo/v2/parser/parse.go
index a5993d163..f3760983d 100644
--- a/vendor/k8s.io/gengo/v2/parser/parse.go
+++ b/vendor/k8s.io/gengo/v2/parser/parse.go
@@ -23,12 +23,16 @@ import (
 	"go/constant"
 	"go/token"
 	gotypes "go/types"
+	"maps"
 	"path/filepath"
+	"reflect"
+	"slices"
 	"sort"
 	"strings"
 	"time"
 
 	"golang.org/x/tools/go/packages"
+
 	"k8s.io/gengo/v2/types"
 	"k8s.io/klog/v2"
 )
@@ -381,11 +385,117 @@ func (p *Parser) NewUniverse() (types.Universe, error) {
 	return u, nil
 }
 
+// minimize returns a copy of lines with "irrelevant" lines removed.  This
+// includes blank lines and paragraphs starting with "Deprecated:".
+func minimize(lines []string) []string {
+	out := make([]string, 0, len(lines))
+	inDeprecated := false // paragraph tracking
+	prevWasBlank := false
+	for _, line := range lines {
+		if len(strings.TrimSpace(line)) == 0 {
+			prevWasBlank = true
+			inDeprecated = false
+			continue
+		}
+		if inDeprecated {
+			continue
+		}
+		if prevWasBlank && strings.HasPrefix(strings.TrimSpace(line), "Deprecated:") {
+			prevWasBlank = false
+			inDeprecated = true
+			continue
+		}
+		prevWasBlank = false
+		out = append(out, line)
+	}
+	return out
+}
+
 // addCommentsToType takes any accumulated comment lines prior to obj and
 // attaches them to the type t.
 func (p *Parser) addCommentsToType(obj gotypes.Object, t *types.Type) {
-	t.CommentLines = p.docComment(obj.Pos())
-	t.SecondClosestCommentLines = p.priorDetachedComment(obj.Pos())
+	if newLines, oldLines := p.docComment(obj.Pos()), t.CommentLines; len(newLines) > 0 {
+		switch {
+		case reflect.DeepEqual(oldLines, newLines):
+			// nothing needed
+
+		case len(oldLines) == 0:
+			// no comments associated, or comments match exactly
+			t.CommentLines = newLines
+
+		case isTypeAlias(obj.Type()):
+			// Ignore mismatched comments from obj because it's an alias.
+			// This can only be hit if gotypesalias is enabled.
+			if !reflect.DeepEqual(minimize(oldLines), minimize(newLines)) {
+				klog.Warningf(
+					"Mismatched comments on type %v.\n  Using comments:\n%s\n  Ignoring comments from type alias:\n%s\n",
+					t.GoType,
+					formatCommentBlock(oldLines),
+					formatCommentBlock(newLines),
+				)
+			}
+
+		case !isTypeAlias(obj.Type()):
+			// Overwrite existing comments with ones from obj because obj is not an alias.
+			// If gotypesalias is enabled, this should mean we found the "real"
+			// type, not an alias.  If gotypesalias is disabled, we can end up
+			// overwriting the "real" comments with an alias's comments, but
+			// it is not clear if we can assume which one is the "real" one.
+			t.CommentLines = newLines
+			if !reflect.DeepEqual(minimize(oldLines), minimize(newLines)) {
+				klog.Warningf(
+					"Mismatched comments on type %v.\n  Using comments:\n%s\n  Ignoring comments from possible type alias:\n%s\n",
+					t.GoType,
+					formatCommentBlock(newLines),
+					formatCommentBlock(oldLines),
+				)
+			}
+		}
+	}
+
+	if newLines, oldLines := p.priorDetachedComment(obj.Pos()), t.SecondClosestCommentLines; len(newLines) > 0 {
+		switch {
+		case reflect.DeepEqual(oldLines, newLines):
+			// nothing needed
+
+		case len(oldLines) == 0:
+			// no comments associated, or comments match exactly
+			t.SecondClosestCommentLines = newLines
+
+		case isTypeAlias(obj.Type()):
+			// Ignore mismatched comments from obj because it's an alias.
+			// This can only be hit if gotypesalias is enabled.
+			if !reflect.DeepEqual(minimize(oldLines), minimize(newLines)) {
+				// ignore mismatched comments from obj because it's an alias
+				klog.Warningf(
+					"Mismatched secondClosestCommentLines on type %v.\n  Using comments:\n%s\n  Ignoring comments from type alias:\n%s\n",
+					t.GoType,
+					formatCommentBlock(oldLines),
+					formatCommentBlock(newLines),
+				)
+			}
+
+		case !isTypeAlias(obj.Type()):
+			// Overwrite existing comments with ones from obj because obj is not an alias.
+			// If gotypesalias is enabled, this should mean we found the "real"
+			// type, not an alias.  If gotypesalias is disabled, we can end up
+			// overwriting the "real" comments with an alias's comments, but
+			// it is not clear if we can assume which one is the "real" one.
+			t.SecondClosestCommentLines = newLines
+			if !reflect.DeepEqual(minimize(oldLines), minimize(newLines)) {
+				klog.Warningf(
+					"Mismatched secondClosestCommentLines on type %v.\n  Using comments:\n%s\n  Ignoring comments from possible type alias:\n%s\n",
+					t.GoType,
+					formatCommentBlock(newLines),
+					formatCommentBlock(oldLines),
+				)
+			}
+		}
+	}
+}
+
+func formatCommentBlock(lines []string) string {
+	return "    ```\n    " + strings.Join(lines, "\n    ") + "\n    ```"
 }
 
 // packageDir tries to figure out the directory of the specified package.
@@ -509,7 +619,9 @@ func (p *Parser) addPkgToUniverse(pkg *packages.Package, u *types.Universe) erro
 
 	// Add all of this package's imports.
 	importedPkgs := []string{}
-	for _, imp := range pkg.Imports {
+	// Iterate imports in a predictable order
+	for _, key := range slices.Sorted(maps.Keys(pkg.Imports)) {
+		imp := pkg.Imports[key]
 		if err := p.addPkgToUniverse(imp, u); err != nil {
 			return err
 		}
@@ -556,7 +668,11 @@ func (p *Parser) priorCommentLines(pos token.Pos, lines int) *ast.CommentGroup {
 }
 
 func splitLines(str string) []string {
-	return strings.Split(strings.TrimRight(str, "\n"), "\n")
+	lines := strings.Split(strings.TrimRight(str, "\n"), "\n")
+	if len(lines) == 1 && lines[0] == "" {
+		return nil
+	}
+	return lines
 }
 
 func goFuncNameToName(in string) types.Name {
@@ -572,6 +688,9 @@ func goVarNameToName(in string) types.Name {
 	return goNameToName(nameParts[1])
 }
 
+// goNameToName converts a go name string to a gengo types.Name.
+// It operates solely on the string on a best effort basis. The name may be updated
+// in walkType for generics.
 func goNameToName(in string) types.Name {
 	// Detect anonymous type names. (These may have '.' characters because
 	// embedded types may have packages, so we detect them specially.)
@@ -587,14 +706,25 @@ func goNameToName(in string) types.Name {
 		return types.Name{Name: in}
 	}
 
+	// There may be '.' characters within a generic. Temporarily remove
+	// the generic.
+	genericIndex := strings.IndexRune(in, '[')
+	if genericIndex == -1 {
+		genericIndex = len(in)
+	}
+
 	// Otherwise, if there are '.' characters present, the name has a
 	// package path in front.
-	nameParts := strings.Split(in, ".")
+	nameParts := strings.Split(in[:genericIndex], ".")
 	name := types.Name{Name: in}
 	if n := len(nameParts); n >= 2 {
 		// The final "." is the name of the type--previous ones must
 		// have been in the package path.
 		name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1]
+		// Add back the generic component now that the package and type name have been separated.
+		if genericIndex != len(in) {
+			name.Name = name.Name + in[genericIndex:]
+		}
 	}
 	return name
 }
@@ -602,12 +732,16 @@ func goNameToName(in string) types.Name {
 func (p *Parser) convertSignature(u types.Universe, t *gotypes.Signature) *types.Signature {
 	signature := &types.Signature{}
 	for i := 0; i < t.Params().Len(); i++ {
-		signature.Parameters = append(signature.Parameters, p.walkType(u, nil, t.Params().At(i).Type()))
-		signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name())
+		signature.Parameters = append(signature.Parameters, &types.ParamResult{
+			Name: t.Params().At(i).Name(),
+			Type: p.walkType(u, nil, t.Params().At(i).Type()),
+		})
 	}
 	for i := 0; i < t.Results().Len(); i++ {
-		signature.Results = append(signature.Results, p.walkType(u, nil, t.Results().At(i).Type()))
-		signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name())
+		signature.Results = append(signature.Results, &types.ParamResult{
+			Name: t.Results().At(i).Name(),
+			Type: p.walkType(u, nil, t.Results().At(i).Type()),
+		})
 	}
 	if r := t.Recv(); r != nil {
 		signature.Receiver = p.walkType(u, nil, r.Type())
@@ -624,9 +758,16 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		name = *useName
 	}
 
+	// Handle alias types conditionally on go1.22+.
+	// Inline this once the minimum supported version is go1.22
+	if out := p.walkAliasType(u, in); out != nil {
+		return out
+	}
+
 	switch t := in.(type) {
 	case *gotypes.Struct:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -645,6 +786,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Map:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -654,6 +796,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Pointer:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -662,6 +805,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Slice:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -670,6 +814,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Array:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -679,6 +824,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Chan:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -692,6 +838,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 			Package: "", // This is a magic package name in the Universe.
 			Name:    t.Name(),
 		})
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -699,6 +846,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Signature:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -707,6 +855,7 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		return out
 	case *gotypes.Interface:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
@@ -729,11 +878,34 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 		case *gotypes.Named, *gotypes.Basic, *gotypes.Map, *gotypes.Slice:
 			name := goNameToName(t.String())
 			out = u.Type(name)
+			out.GoType = in
 			if out.Kind != types.Unknown {
 				return out
 			}
 			out.Kind = types.Alias
 			out.Underlying = p.walkType(u, nil, t.Underlying())
+		case *gotypes.Struct, *gotypes.Interface:
+			name := goNameToName(t.String())
+			tpMap := map[string]*types.Type{}
+			if t.TypeParams().Len() != 0 {
+				// Remove generics, then readd them without the encoded
+				// type, e.g. Foo[T any] => Foo[T]
+				var tpNames []string
+				for i := 0; i < t.TypeParams().Len(); i++ {
+					tp := t.TypeParams().At(i)
+					tpName := tp.Obj().Name()
+					tpNames = append(tpNames, tpName)
+					tpMap[tpName] = p.walkType(u, nil, tp.Constraint())
+				}
+				name.Name = fmt.Sprintf("%s[%s]", strings.SplitN(name.Name, "[", 2)[0], strings.Join(tpNames, ","))
+			}
+
+			if out := u.Type(name); out.Kind != types.Unknown {
+				out.GoType = in
+				return out // short circuit if we've already made this.
+			}
+			out = p.walkType(u, &name, t.Underlying())
+			out.TypeParams = tpMap
 		default:
 			// gotypes package makes everything "named" with an
 			// underlying anonymous type--we remove that annoying
@@ -760,8 +932,18 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type
 			}
 		}
 		return out
+	case *gotypes.TypeParam:
+		// DO NOT retrieve the type from the universe. The default type-param name is only the
+		// generic variable name. Ideally, it would be namespaced by package and struct but it is
+		// not. Thus, if we try to use the universe, we would start polluting it.
+		// e.g. if Foo[T] and Bar[T] exists, we'd mistakenly use the same type T for both.
+		return &types.Type{
+			Name: name,
+			Kind: types.TypeParam,
+		}
 	default:
 		out := u.Type(name)
+		out.GoType = in
 		if out.Kind != types.Unknown {
 			return out
 		}
diff --git a/vendor/k8s.io/gengo/v2/parser/parse_122.go b/vendor/k8s.io/gengo/v2/parser/parse_122.go
new file mode 100644
index 000000000..de378eedd
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/parser/parse_122.go
@@ -0,0 +1,38 @@
+//go:build go1.22
+// +build go1.22
+
+/*
+Copyright 2024 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package parser
+
+import (
+	gotypes "go/types"
+
+	"k8s.io/gengo/v2/types"
+)
+
+func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type {
+	if t, isAlias := in.(*gotypes.Alias); isAlias {
+		return p.walkType(u, nil, gotypes.Unalias(t))
+	}
+	return nil
+}
+
+func isTypeAlias(in gotypes.Type) bool {
+	_, isAlias := in.(*gotypes.Alias)
+	return isAlias
+}
diff --git a/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go
new file mode 100644
index 000000000..535d6c9db
--- /dev/null
+++ b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go
@@ -0,0 +1,34 @@
+//go:build !go1.22
+// +build !go1.22
+
+/*
+Copyright 2024 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package parser
+
+import (
+	gotypes "go/types"
+
+	"k8s.io/gengo/v2/types"
+)
+
+func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type {
+	return nil
+}
+
+func isTypeAlias(in gotypes.Type) bool {
+	return false
+}
diff --git a/vendor/k8s.io/gengo/v2/types/types.go b/vendor/k8s.io/gengo/v2/types/types.go
index e9c8319c6..dab11d96e 100644
--- a/vendor/k8s.io/gengo/v2/types/types.go
+++ b/vendor/k8s.io/gengo/v2/types/types.go
@@ -16,7 +16,10 @@ limitations under the License.
 
 package types
 
-import "strings"
+import (
+	gotypes "go/types"
+	"strings"
+)
 
 // Ref makes a reference to the given type. It can only be used for e.g.
 // passing to namers.
@@ -98,6 +101,7 @@ const (
 	DeclarationOf Kind = "DeclarationOf"
 	Unknown       Kind = ""
 	Unsupported   Kind = "Unsupported"
+	TypeParam     Kind = "TypeParam"
 
 	// Protobuf is protobuf type.
 	Protobuf Kind = "Protobuf"
@@ -324,6 +328,9 @@ type Type struct {
 	// If Kind == Struct
 	Members []Member
 
+	// If Kind == Struct
+	TypeParams map[string]*Type
+
 	// If Kind == Map, Slice, Pointer, or Chan
 	Elem *Type
 
@@ -354,6 +361,9 @@ type Type struct {
 
 	// If Kind == Array
 	Len int64
+
+	// The underlying Go type.
+	GoType gotypes.Type
 }
 
 // String returns the name of the type.
@@ -398,6 +408,11 @@ func (t *Type) IsAnonymousStruct() bool {
 	return (t.Kind == Struct && t.Name.Name == "struct{}") || (t.Kind == Alias && t.Underlying.IsAnonymousStruct())
 }
 
+// IsComparable returns whether the type is comparable.
+func (t *Type) IsComparable() bool {
+	return gotypes.Comparable(t.GoType)
+}
+
 // A single struct member
 type Member struct {
 	// The name of the member.
@@ -423,14 +438,20 @@ func (m Member) String() string {
 	return m.Name + " " + m.Type.String()
 }
 
+// ParamResult represents a parameter or a result of a method's signature.
+type ParamResult struct {
+	// The name of the parameter or result.
+	Name string
+	// The type of this parameter or result.
+	Type *Type
+}
+
 // Signature is a function's signature.
 type Signature struct {
 	// If a method of some type, this is the type it's a member of.
-	Receiver       *Type
-	Parameters     []*Type
-	ParameterNames []string
-	Results        []*Type
-	ResultNames    []string
+	Receiver   *Type
+	Parameters []*ParamResult
+	Results    []*ParamResult
 
 	// True if the last in parameter is of the form ...T.
 	Variadic bool
@@ -442,6 +463,10 @@ type Signature struct {
 
 // Built in types.
 var (
+	Any = &Type{
+		Name: Name{Name: "any"},
+		Kind: Interface,
+	}
 	String = &Type{
 		Name: Name{Name: "string"},
 		Kind: Builtin,
@@ -505,6 +530,7 @@ var (
 
 	builtins = &Package{
 		Types: map[string]*Type{
+			"any":     Any,
 			"bool":    Bool,
 			"string":  String,
 			"int":     Int,
@@ -529,6 +555,16 @@ var (
 	}
 )
 
+func PointerTo(t *Type) *Type {
+	return &Type{
+		Name: Name{
+			Name: "*" + t.Name.String(),
+		},
+		Kind: Pointer,
+		Elem: t,
+	}
+}
+
 func IsInteger(t *Type) bool {
 	switch t {
 	case Int, Int64, Int32, Int16, Uint, Uint64, Uint32, Uint16, Byte:
diff --git a/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go b/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go
index 153784ed9..7634c727b 100644
--- a/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go
+++ b/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go
@@ -33,6 +33,12 @@ type Args struct {
 	// by API linter. If specified, API rule violations will be printed to report file.
 	// Otherwise default value "-" will be used which indicates stdout.
 	ReportFilename string
+
+	// OutputModelNameFile is the name of the file to be generated for OpenAPI schema name
+	// accessor functions. If empty, no model name accessor functions are generated.
+	// When this is specified, the OpenAPI spec generator will use the function names
+	// instead of Go type names for schema names.
+	OutputModelNameFile string
 }
 
 // New returns default arguments for the generator. Returning the arguments instead
@@ -54,6 +60,13 @@ func (args *Args) AddFlags(fs *pflag.FlagSet) {
 		"the base Go import-path under which to generate results")
 	fs.StringVar(&args.OutputFile, "output-file", "generated.openapi.go",
 		"the name of the file to be generated")
+	fs.StringVar(&args.OutputModelNameFile, "output-model-name-file", "",
+		`The filename for generated model name accessor functions.
+If specified, a file with this name will be created in each package containing
+a "+k8s:openapi-model-package" tag. The generated functions return fully qualified
+model names, which are used in the OpenAPI spec as schema references instead of
+Go type names. If empty, no model name accessor functions are generated and names
+are inferred from Go type names.`)
 	fs.StringVar(&args.GoHeaderFile, "go-header-file", "",
 		"the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year")
 	fs.StringVarP(&args.ReportFilename, "report-filename", "r", args.ReportFilename,
diff --git a/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go b/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go
index 081dae306..0ce85af9f 100644
--- a/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go
+++ b/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go
@@ -285,7 +285,10 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error {
 			sortParameters(pathItem.Parameters)
 
 			for _, route := range routes {
-				op, _ := o.buildOperations(route, inPathCommonParamsMap)
+				op, err := o.buildOperations(route, inPathCommonParamsMap)
+				if err != nil {
+					return err
+				}
 				sortParameters(op.Parameters)
 
 				switch strings.ToUpper(route.Method()) {
diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go
index e4ce843b0..da2e8f11a 100644
--- a/vendor/k8s.io/kube-openapi/pkg/common/common.go
+++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go
@@ -48,11 +48,11 @@ type GetOpenAPIDefinitions func(ReferenceCallback) map[string]OpenAPIDefinition
 // GetOpenAPITypeFormat for more information about trade-offs of using this interface or GetOpenAPITypeFormat method when
 // possible.
 type OpenAPIDefinitionGetter interface {
-	OpenAPIDefinition() *OpenAPIDefinition
+	OpenAPIDefinition() OpenAPIDefinition
 }
 
 type OpenAPIV3DefinitionGetter interface {
-	OpenAPIV3Definition() *OpenAPIDefinition
+	OpenAPIV3Definition() OpenAPIDefinition
 }
 
 type PathHandler interface {
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go b/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go
index 5deff4d5a..fc854a641 100644
--- a/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go
@@ -139,6 +139,9 @@ func newAPILinter() *apiLinter {
 			&rules.NamesMatch{},
 			&rules.OmitEmptyMatchCase{},
 			&rules.ListTypeMissing{},
+			&rules.StreamingListTypeFieldOrder{},
+			&rules.StreamingListTypeJSONTags{},
+			&rules.StreamingListTypeProtoTags{},
 		},
 	}
 }
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/config.go b/vendor/k8s.io/kube-openapi/pkg/generators/config.go
index 1fbd77598..1bcf2a523 100644
--- a/vendor/k8s.io/kube-openapi/pkg/generators/config.go
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/config.go
@@ -19,7 +19,6 @@ package generators
 import (
 	"path"
 
-	"k8s.io/gengo/v2"
 	"k8s.io/gengo/v2/generator"
 	"k8s.io/gengo/v2/namer"
 	"k8s.io/gengo/v2/types"
@@ -49,12 +48,8 @@ func DefaultNameSystem() string {
 	return "sorting_namer"
 }
 
-func GetTargets(context *generator.Context, args *args.Args) []generator.Target {
-	boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy)
-	if err != nil {
-		klog.Fatalf("Failed loading boilerplate: %v", err)
-	}
-
+// GetOpenAPITargets returns the targets for OpenAPI definition generation.
+func GetOpenAPITargets(context *generator.Context, args *args.Args, boilerplate []byte) []generator.Target {
 	reportPath := "-"
 	if args.ReportFilename != "" {
 		reportPath = args.ReportFilename
@@ -82,3 +77,56 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
 		},
 	}
 }
+
+// GetModelNameTargets returns the targets for model name generation.
+func GetModelNameTargets(context *generator.Context, args *args.Args, boilerplate []byte) []generator.Target {
+	var targets []generator.Target
+	for _, i := range context.Inputs {
+		klog.V(5).Infof("Considering pkg %q", i)
+
+		pkg := context.Universe[i]
+
+		openAPISchemaNamePackage, err := extractOpenAPISchemaNamePackage(pkg.Comments)
+		if err != nil {
+			klog.Fatalf("Package %v: invalid %s:%v", i, tagModelPackage, err)
+		}
+		hasPackageTag := len(openAPISchemaNamePackage) > 0
+
+		hasCandidates := false
+		for _, t := range pkg.Types {
+			v, err := singularTag(tagModelPackage, t.CommentLines)
+			if err != nil {
+				klog.Fatalf("Type %v: invalid %s:%v", t.Name, tagModelPackage, err)
+			}
+			hasTag := hasPackageTag || v != nil
+			hasModel := isSchemaNameType(t)
+			if hasModel && hasTag {
+				hasCandidates = true
+				break
+			}
+		}
+		if !hasCandidates {
+			klog.V(5).Infof("  skipping package")
+			continue
+		}
+
+		klog.V(3).Infof("Generating package %q", pkg.Path)
+
+		targets = append(targets,
+			&generator.SimpleTarget{
+				PkgName:       path.Base(pkg.Path),
+				PkgPath:       pkg.Path,
+				PkgDir:        pkg.Dir, // output pkg is the same as the input
+				HeaderComment: boilerplate,
+				FilterFunc: func(c *generator.Context, t *types.Type) bool {
+					return t.Name.Package == pkg.Path
+				},
+				GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) {
+					return []generator.Generator{
+						NewSchemaNameGen(args.OutputModelNameFile, pkg.Path, openAPISchemaNamePackage),
+					}
+				},
+			})
+	}
+	return targets
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go
index 7f0fe985a..a8af60b6c 100644
--- a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go
@@ -20,9 +20,11 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"reflect"
 	"regexp"
 	"strconv"
 	"strings"
+	"sync"
 
 	"k8s.io/gengo/v2/types"
 	openapi "k8s.io/kube-openapi/pkg/common"
@@ -61,6 +63,34 @@ func (c *CELTag) Validate() error {
 	return nil
 }
 
+// isKnownTagCommentKey returns true if the given key is a known comment tag key.
+// Known keys are identified by the json field tags in the commentTags struct.
+// If the key is a composite key, only the first key part is checked, and is
+// expected to be separated by the remainder of the key by a ':' or '[' delimiter.
+func isKnownTagCommentKey(key string) bool {
+	split := func(r rune) bool { return r == ':' || r == '[' }
+	commentTags := strings.FieldsFunc(key, split)
+	if len(commentTags) == 0 {
+		return false
+	}
+	_, ok := tagKeys()[commentTags[0]]
+	return ok
+}
+
+var tagKeys = sync.OnceValue(func() map[string]struct{} {
+	result := map[string]struct{}{}
+	t := reflect.TypeOf(commentTags{})
+	for i := 0; i < t.NumField(); i++ {
+		field := t.Field(i)
+		if jsonTag := field.Tag.Get("json"); jsonTag != "" {
+			if key, _, _ := strings.Cut(jsonTag, ","); key != "" {
+				result[key] = struct{}{}
+			}
+		}
+	}
+	return result
+})
+
 // commentTags represents the parsed comment tags for a given type. These types are then used to generate schema validations.
 // These only include the newer prefixed tags. The older tags are still supported,
 // but are not included in this struct. Comment Tags are transformed into a
@@ -75,7 +105,29 @@ func (c *CELTag) Validate() error {
 // - +listMapKeys
 // - +mapType
 type commentTags struct {
-	spec.SchemaProps
+	Nullable         *bool         `json:"nullable,omitempty"`
+	Format           *string       `json:"format,omitempty"`
+	Maximum          *float64      `json:"maximum,omitempty"`
+	ExclusiveMaximum *bool         `json:"exclusiveMaximum,omitempty"`
+	Minimum          *float64      `json:"minimum,omitempty"`
+	ExclusiveMinimum *bool         `json:"exclusiveMinimum,omitempty"`
+	MaxLength        *int64        `json:"maxLength,omitempty"`
+	MinLength        *int64        `json:"minLength,omitempty"`
+	Pattern          *string       `json:"pattern,omitempty"`
+	MaxItems         *int64        `json:"maxItems,omitempty"`
+	MinItems         *int64        `json:"minItems,omitempty"`
+	UniqueItems      *bool         `json:"uniqueItems,omitempty"`
+	MultipleOf       *float64      `json:"multipleOf,omitempty"`
+	Enum             []interface{} `json:"enum,omitempty"`
+	MaxProperties    *int64        `json:"maxProperties,omitempty"`
+	MinProperties    *int64        `json:"minProperties,omitempty"`
+
+	// Nested commentTags for extending the schemas of subfields at point-of-use
+	// when you cant annotate them directly. Cannot be used to add properties
+	// or remove validations on the overridden schema.
+	Items                *commentTags            `json:"items,omitempty"`
+	Properties           map[string]*commentTags `json:"properties,omitempty"`
+	AdditionalProperties *commentTags            `json:"additionalProperties,omitempty"`
 
 	CEL []CELTag `json:"cel,omitempty"`
 
@@ -86,9 +138,75 @@ type commentTags struct {
 
 // Returns the schema for the given CommentTags instance.
 // This is the final authoritative schema for the comment tags
-func (c commentTags) ValidationSchema() (*spec.Schema, error) {
+func (c *commentTags) ValidationSchema() (*spec.Schema, error) {
+	if c == nil {
+		return nil, nil
+	}
+
+	isNullable := c.Nullable != nil && *c.Nullable
+	format := ""
+	if c.Format != nil {
+		format = *c.Format
+	}
+	isExclusiveMaximum := c.ExclusiveMaximum != nil && *c.ExclusiveMaximum
+	isExclusiveMinimum := c.ExclusiveMinimum != nil && *c.ExclusiveMinimum
+	isUniqueItems := c.UniqueItems != nil && *c.UniqueItems
+	pattern := ""
+	if c.Pattern != nil {
+		pattern = *c.Pattern
+	}
+
+	var transformedItems *spec.SchemaOrArray
+	var transformedProperties map[string]spec.Schema
+	var transformedAdditionalProperties *spec.SchemaOrBool
+
+	if c.Items != nil {
+		items, err := c.Items.ValidationSchema()
+		if err != nil {
+			return nil, fmt.Errorf("failed to transform items: %w", err)
+		}
+		transformedItems = &spec.SchemaOrArray{Schema: items}
+	}
+
+	if c.Properties != nil {
+		properties := make(map[string]spec.Schema)
+		for key, value := range c.Properties {
+			property, err := value.ValidationSchema()
+			if err != nil {
+				return nil, fmt.Errorf("failed to transform property %q: %w", key, err)
+			}
+			properties[key] = *property
+		}
+		transformedProperties = properties
+	}
+
+	if c.AdditionalProperties != nil {
+		additionalProperties, err := c.AdditionalProperties.ValidationSchema()
+		if err != nil {
+			return nil, fmt.Errorf("failed to transform additionalProperties: %w", err)
+		}
+		transformedAdditionalProperties = &spec.SchemaOrBool{Schema: additionalProperties, Allows: true}
+	}
+
 	res := spec.Schema{
-		SchemaProps: c.SchemaProps,
+		SchemaProps: spec.SchemaProps{
+			Nullable:         isNullable,
+			Format:           format,
+			Maximum:          c.Maximum,
+			ExclusiveMaximum: isExclusiveMaximum,
+			Minimum:          c.Minimum,
+			ExclusiveMinimum: isExclusiveMinimum,
+			MaxLength:        c.MaxLength,
+			MinLength:        c.MinLength,
+			Pattern:          pattern,
+			MaxItems:         c.MaxItems,
+			MinItems:         c.MinItems,
+			UniqueItems:      isUniqueItems,
+			MultipleOf:       c.MultipleOf,
+			Enum:             c.Enum,
+			MaxProperties:    c.MaxProperties,
+			MinProperties:    c.MinProperties,
+		},
 	}
 
 	if len(c.CEL) > 0 {
@@ -105,6 +223,18 @@ func (c commentTags) ValidationSchema() (*spec.Schema, error) {
 		res.VendorExtensible.AddExtension("x-kubernetes-validations", celTagMap)
 	}
 
+	// Dont add structural properties directly to this schema. This schema
+	// is used only for validation.
+	if transformedItems != nil || len(transformedProperties) > 0 || transformedAdditionalProperties != nil {
+		res.AllOf = append(res.AllOf, spec.Schema{
+			SchemaProps: spec.SchemaProps{
+				Items:                transformedItems,
+				Properties:           transformedProperties,
+				AdditionalProperties: transformedAdditionalProperties,
+			},
+		})
+	}
+
 	return &res, nil
 }
 
@@ -134,7 +264,7 @@ func (c commentTags) Validate() error {
 	if c.Minimum != nil && c.Maximum != nil && *c.Minimum > *c.Maximum {
 		err = errors.Join(err, fmt.Errorf("minimum %f is greater than maximum %f", *c.Minimum, *c.Maximum))
 	}
-	if (c.ExclusiveMinimum || c.ExclusiveMaximum) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum {
+	if (c.ExclusiveMinimum != nil || c.ExclusiveMaximum != nil) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum {
 		err = errors.Join(err, fmt.Errorf("exclusiveMinimum/Maximum cannot be set when minimum == maximum"))
 	}
 	if c.MinLength != nil && c.MaxLength != nil && *c.MinLength > *c.MaxLength {
@@ -146,10 +276,10 @@ func (c commentTags) Validate() error {
 	if c.MinProperties != nil && c.MaxProperties != nil && *c.MinProperties > *c.MaxProperties {
 		err = errors.Join(err, fmt.Errorf("minProperties %d is greater than maxProperties %d", *c.MinProperties, *c.MaxProperties))
 	}
-	if c.Pattern != "" {
-		_, e := regexp.Compile(c.Pattern)
+	if c.Pattern != nil {
+		_, e := regexp.Compile(*c.Pattern)
 		if e != nil {
-			err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", c.Pattern, e))
+			err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", *c.Pattern, e))
 		}
 	}
 	if c.MultipleOf != nil && *c.MultipleOf == 0 {
@@ -175,10 +305,23 @@ func (c commentTags) ValidateType(t *types.Type) error {
 	typeString, _ := openapi.OpenAPITypeFormat(resolvedType.String()) // will be empty for complicated types
 
 	// Structs and interfaces may dynamically be any type, so we cant validate them
-	// easily. We may be able to if we check that they don't implement all the
-	// override functions, but for now we just skip them.
+	// easily.
 	if resolvedType.Kind == types.Interface || resolvedType.Kind == types.Struct {
-		return nil
+		// Skip validation for structs and interfaces which implement custom
+		// overrides
+		//
+		// Only check top-level t type without resolving alias to mirror generator
+		// behavior. Generator only checks the top level type without resolving
+		// alias. The `has*Method` functions can be changed to add this behavior in the
+		// future if needed.
+		elemT := resolvePtrType(t)
+		if hasOpenAPIDefinitionMethod(elemT) ||
+			hasOpenAPIDefinitionMethods(elemT) ||
+			hasOpenAPIV3DefinitionMethod(elemT) ||
+			hasOpenAPIV3OneOfMethod(elemT) {
+
+			return nil
+		}
 	}
 
 	isArray := resolvedType.Kind == types.Slice || resolvedType.Kind == types.Array
@@ -186,6 +329,7 @@ func (c commentTags) ValidateType(t *types.Type) error {
 	isString := typeString == "string"
 	isInt := typeString == "integer"
 	isFloat := typeString == "number"
+	isStruct := resolvedType.Kind == types.Struct
 
 	if c.MaxItems != nil && !isArray {
 		err = errors.Join(err, fmt.Errorf("maxItems can only be used on array types"))
@@ -193,13 +337,13 @@ func (c commentTags) ValidateType(t *types.Type) error {
 	if c.MinItems != nil && !isArray {
 		err = errors.Join(err, fmt.Errorf("minItems can only be used on array types"))
 	}
-	if c.UniqueItems && !isArray {
+	if c.UniqueItems != nil && !isArray {
 		err = errors.Join(err, fmt.Errorf("uniqueItems can only be used on array types"))
 	}
-	if c.MaxProperties != nil && !isMap {
+	if c.MaxProperties != nil && !(isMap || isStruct) {
 		err = errors.Join(err, fmt.Errorf("maxProperties can only be used on map types"))
 	}
-	if c.MinProperties != nil && !isMap {
+	if c.MinProperties != nil && !(isMap || isStruct) {
 		err = errors.Join(err, fmt.Errorf("minProperties can only be used on map types"))
 	}
 	if c.MinLength != nil && !isString {
@@ -208,7 +352,7 @@ func (c commentTags) ValidateType(t *types.Type) error {
 	if c.MaxLength != nil && !isString {
 		err = errors.Join(err, fmt.Errorf("maxLength can only be used on string types"))
 	}
-	if c.Pattern != "" && !isString {
+	if c.Pattern != nil && !isString {
 		err = errors.Join(err, fmt.Errorf("pattern can only be used on string types"))
 	}
 	if c.Minimum != nil && !isInt && !isFloat {
@@ -220,22 +364,62 @@ func (c commentTags) ValidateType(t *types.Type) error {
 	if c.MultipleOf != nil && !isInt && !isFloat {
 		err = errors.Join(err, fmt.Errorf("multipleOf can only be used on numeric types"))
 	}
-	if c.ExclusiveMinimum && !isInt && !isFloat {
+	if c.ExclusiveMinimum != nil && !isInt && !isFloat {
 		err = errors.Join(err, fmt.Errorf("exclusiveMinimum can only be used on numeric types"))
 	}
-	if c.ExclusiveMaximum && !isInt && !isFloat {
+	if c.ExclusiveMaximum != nil && !isInt && !isFloat {
 		err = errors.Join(err, fmt.Errorf("exclusiveMaximum can only be used on numeric types"))
 	}
+	if c.AdditionalProperties != nil && !isMap {
+		err = errors.Join(err, fmt.Errorf("additionalProperties can only be used on map types"))
+
+		if err == nil {
+			err = errors.Join(err, c.AdditionalProperties.ValidateType(t))
+		}
+	}
+	if c.Items != nil && !isArray {
+		err = errors.Join(err, fmt.Errorf("items can only be used on array types"))
+
+		if err == nil {
+			err = errors.Join(err, c.Items.ValidateType(t))
+		}
+	}
+	if c.Properties != nil {
+		if !isStruct && !isMap {
+			err = errors.Join(err, fmt.Errorf("properties can only be used on struct types"))
+		} else if isStruct && err == nil {
+			for key, tags := range c.Properties {
+				if member := memberWithJSONName(resolvedType, key); member == nil {
+					err = errors.Join(err, fmt.Errorf("property used in comment tag %q not found in struct %s", key, resolvedType.String()))
+				} else if nestedErr := tags.ValidateType(member.Type); nestedErr != nil {
+					err = errors.Join(err, fmt.Errorf("failed to validate property %q: %w", key, nestedErr))
+				}
+			}
+		}
+	}
 
 	return err
 }
 
-// Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result.
+func memberWithJSONName(t *types.Type, key string) *types.Member {
+	for _, member := range t.Members {
+		tags := getJsonTags(&member)
+		if len(tags) > 0 && tags[0] == key {
+			return &member
+		} else if member.Embedded {
+			if embeddedMember := memberWithJSONName(member.Type, key); embeddedMember != nil {
+				return embeddedMember
+			}
+		}
+	}
+	return nil
+}
+
+// ParseCommentTags parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result.
 // Accepts an optional type to validate against, and a prefix to filter out markers not related to validation.
 // Accepts a prefix to filter out markers not related to validation.
 // Returns any errors encountered while parsing or validating the comment tags.
 func ParseCommentTags(t *types.Type, comments []string, prefix string) (*spec.Schema, error) {
-
 	markers, err := parseMarkers(comments, prefix)
 	if err != nil {
 		return nil, fmt.Errorf("failed to parse marker comments: %w", err)
@@ -455,6 +639,8 @@ func parseMarkers(markerComments []string, prefix string) (map[string]any, error
 
 		if len(key) == 0 {
 			return nil, fmt.Errorf("cannot have empty key for marker comment")
+		} else if !isKnownTagCommentKey(key) {
+			continue
 		} else if _, ok := parseSymbolReference(value, ""); ok {
 			// Skip ref markers
 			continue
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/model_names.go b/vendor/k8s.io/kube-openapi/pkg/generators/model_names.go
new file mode 100644
index 000000000..783e975d4
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/model_names.go
@@ -0,0 +1,177 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package generators
+
+import (
+	"fmt"
+	"io"
+	"strings"
+
+	"k8s.io/gengo/v2"
+	"k8s.io/gengo/v2/generator"
+	"k8s.io/gengo/v2/namer"
+	"k8s.io/gengo/v2/types"
+	"k8s.io/klog/v2"
+)
+
+const (
+	tagModelPackage = "k8s:openapi-model-package"
+)
+
+func extractOpenAPISchemaNamePackage(comments []string) (string, error) {
+	v, err := singularTag(tagModelPackage, comments)
+	if v == nil || err != nil {
+		return "", err
+	}
+	return v.Value, nil
+}
+
+func singularTag(tagName string, comments []string) (*gengo.Tag, error) {
+	tags, err := gengo.ExtractFunctionStyleCommentTags("+", []string{tagName}, comments)
+	if err != nil {
+		return nil, err
+	}
+	if len(tags) == 0 {
+		return nil, nil
+	}
+	if len(tags) > 1 {
+		return nil, fmt.Errorf("multiple %s tags found", tagName)
+	}
+	tag := tags[tagName]
+	if len(tag) == 0 {
+		return nil, nil
+	}
+	if len(tag) > 1 {
+		klog.V(5).Infof("multiple %s tags found, using the first one", tagName)
+	}
+	value := tag[0]
+	return &value, nil
+}
+
+// genSchemaName produces a file with autogenerated openapi schema name functions.
+type genSchemaName struct {
+	generator.GoGenerator
+	targetPackage            string
+	imports                  namer.ImportTracker
+	typesForInit             []*types.Type
+	openAPISchemaNamePackage string
+}
+
+// NewSchemaNameGen creates a generator
+func NewSchemaNameGen(outputFilename, targetPackage string, openAPISchemaNamePackage string) generator.Generator {
+	return &genSchemaName{
+		GoGenerator: generator.GoGenerator{
+			OutputFilename: outputFilename,
+		},
+		targetPackage:            targetPackage,
+		imports:                  generator.NewImportTracker(),
+		typesForInit:             make([]*types.Type, 0),
+		openAPISchemaNamePackage: openAPISchemaNamePackage,
+	}
+}
+
+func (g *genSchemaName) Namers(c *generator.Context) namer.NameSystems {
+	return namer.NameSystems{
+		"public": namer.NewPublicNamer(1),
+		"local":  namer.NewPublicNamer(0),
+		"raw":    namer.NewRawNamer("", nil),
+	}
+}
+
+func (g *genSchemaName) Filter(c *generator.Context, t *types.Type) bool {
+	// Filter out types not being processed or not copyable within the package.
+	if !isSchemaNameType(t) {
+		klog.V(2).Infof("Type %v is not a valid target for OpenAPI schema name", t)
+		return false
+	}
+	g.typesForInit = append(g.typesForInit, t)
+	return true
+}
+
+// isSchemaNameType indicates whether or not a type could be used to serve an API.
+func isSchemaNameType(t *types.Type) bool {
+	// Filter out private types.
+	if namer.IsPrivateGoName(t.Name.Name) {
+		return false
+	}
+
+	for t.Kind == types.Alias {
+		t = t.Underlying
+	}
+
+	if t.Kind != types.Struct {
+		return false
+	}
+	return true
+}
+
+func (g *genSchemaName) isOtherPackage(pkg string) bool {
+	if pkg == g.targetPackage {
+		return false
+	}
+	if strings.HasSuffix(pkg, ""+g.targetPackage+"") {
+		return false
+	}
+	return true
+}
+
+func (g *genSchemaName) Imports(c *generator.Context) (imports []string) {
+	importLines := []string{}
+	for _, singleImport := range g.imports.ImportLines() {
+		if g.isOtherPackage(singleImport) {
+			importLines = append(importLines, singleImport)
+		}
+	}
+	return importLines
+}
+
+func (g *genSchemaName) Init(c *generator.Context, w io.Writer) error {
+	return nil
+}
+
+func (g *genSchemaName) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {
+	klog.V(3).Infof("Generating openapi schema name for type %v", t)
+
+	openAPISchemaNamePackage := g.openAPISchemaNamePackage
+	v, err := singularTag(tagModelPackage, t.CommentLines)
+	if err != nil {
+		return fmt.Errorf("type %v: invalid %s:%v", t.Name, tagModelPackage, err)
+	}
+	if v != nil && v.Value != "" {
+		openAPISchemaNamePackage = v.Value
+	}
+
+	if openAPISchemaNamePackage == "" {
+		return nil
+	}
+
+	schemaName := openAPISchemaNamePackage + "." + t.Name.Name
+
+	a := map[string]interface{}{
+		"type":       t,
+		"schemaName": schemaName,
+	}
+
+	sw := generator.NewSnippetWriter(w, c, "$", "$")
+
+	sw.Do("// OpenAPIModelName returns the OpenAPI model name for this type.\n", a)
+	sw.Do("func (in $.type|local$) OpenAPIModelName() string {\n", a)
+	sw.Do("\treturn \"$.schemaName$\"\n", a)
+	sw.Do("}\n\n", nil)
+
+	return sw.Error()
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go
index 743f5b8b2..5d58754a7 100644
--- a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go
@@ -249,7 +249,7 @@ func methodReturnsValue(mt *types.Type, pkg, name string) bool {
 		return false
 	}
 	r := mt.Signature.Results[0]
-	return r.Name.Name == name && r.Name.Package == pkg
+	return r.Type.Name.Name == name && r.Type.Name.Package == pkg
 }
 
 func hasOpenAPIV3DefinitionMethod(t *types.Type) bool {
@@ -295,6 +295,40 @@ func hasOpenAPIV3OneOfMethod(t *types.Type) bool {
 	return false
 }
 
+func hasOpenAPIModelName(t *types.Type) bool {
+	for mn, mt := range t.Methods {
+		if mn != "OpenAPIModelName" {
+			continue
+		}
+		return methodReturnsValue(mt, "", "string")
+	}
+	return false
+}
+
+func (g openAPITypeWriter) shouldUseOpenAPIModelName(t *types.Type) bool {
+	// Finds non-generated OpenAPIModelName() functions.
+	// Generated OpenAPIModelName() are ignored due to the 'ignore_autogenerated' build tag
+	// but are handled below by checking for use of the +k8s:openapi-model-package.
+	// This approach allows code generators to be called in any order.
+	if hasOpenAPIModelName(t) {
+		return true
+	}
+
+	value, err := extractOpenAPISchemaNamePackage(t.CommentLines)
+	if err != nil {
+		klog.Fatalf("Type %v: invalid %s:%v", t, tagModelPackage, err)
+	}
+	if value != "" {
+		return true
+	}
+	pkg := g.context.Universe.Package(t.Name.Package)
+	value, err = extractOpenAPISchemaNamePackage(pkg.Comments)
+	if err != nil {
+		klog.Fatalf("Package %v: invalid %s:%v", pkg, tagModelPackage, err)
+	}
+	return value != ""
+}
+
 // typeShortName returns short package name (e.g. the name x appears in package x definition) dot type name.
 func typeShortName(t *types.Type) string {
 	// `path` vs. `filepath` because packages use '/'
@@ -339,8 +373,18 @@ func (g openAPITypeWriter) generateCall(t *types.Type) error {
 	// Only generate for struct type and ignore the rest
 	switch t.Kind {
 	case types.Struct:
+		if namer.IsPrivateGoName(t.Name.Name) { // skip private types
+			return nil
+		}
+
 		args := argsFromType(t)
-		g.Do("\"$.$\": ", t.Name)
+
+		if g.shouldUseOpenAPIModelName(t) {
+			g.Do("$.|raw${}.OpenAPIModelName(): ", t)
+		} else {
+			// Legacy case: use the "canonical type name"
+			g.Do("\"$.$\": ", t.Name)
+		}
 
 		hasV2Definition := hasOpenAPIDefinitionMethod(t)
 		hasV2DefinitionTypeAndFormat := hasOpenAPIDefinitionMethods(t)
@@ -362,6 +406,88 @@ func (g openAPITypeWriter) generateCall(t *types.Type) error {
 	return g.Error()
 }
 
+// Generates Go code to represent an OpenAPI schema. May be refactored in
+// the future to take more responsibility as we transition from an on-line
+// approach to parsing the comments to spec.Schema
+func (g openAPITypeWriter) generateSchema(s *spec.Schema) error {
+	if !reflect.DeepEqual(s.SchemaProps, spec.SchemaProps{}) {
+		g.Do("SchemaProps: spec.SchemaProps{\n", nil)
+		err := g.generateValueValidations(&s.SchemaProps)
+		if err != nil {
+			return err
+		}
+
+		if len(s.Properties) > 0 {
+			g.Do("Properties: map[string]spec.Schema{\n", nil)
+
+			// Sort property names to generate deterministic output
+			keys := []string{}
+			for k := range s.Properties {
+				keys = append(keys, k)
+			}
+			sort.Strings(keys)
+
+			for _, k := range keys {
+				v := s.Properties[k]
+				g.Do("$.$: {\n", fmt.Sprintf("%#v", k))
+				err := g.generateSchema(&v)
+				if err != nil {
+					return err
+				}
+				g.Do("},\n", nil)
+			}
+			g.Do("},\n", nil)
+		}
+
+		if s.AdditionalProperties != nil && s.AdditionalProperties.Schema != nil {
+			g.Do("AdditionalProperties: &spec.SchemaOrBool{\n", nil)
+			g.Do("Allows: true,\n", nil)
+			g.Do("Schema: &spec.Schema{\n", nil)
+			err := g.generateSchema(s.AdditionalProperties.Schema)
+			if err != nil {
+				return err
+			}
+			g.Do("},\n", nil)
+			g.Do("},\n", nil)
+		}
+
+		if s.Items != nil && s.Items.Schema != nil {
+			g.Do("Items: &spec.SchemaOrArray{\n", nil)
+			g.Do("Schema: &spec.Schema{\n", nil)
+			err := g.generateSchema(s.Items.Schema)
+			if err != nil {
+				return err
+			}
+			g.Do("},\n", nil)
+			g.Do("},\n", nil)
+		}
+
+		g.Do("},\n", nil)
+	}
+
+	if len(s.Extensions) > 0 {
+		g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil)
+
+		// Sort extension keys to generate deterministic output
+		keys := []string{}
+		for k := range s.Extensions {
+			keys = append(keys, k)
+		}
+		sort.Strings(keys)
+
+		for _, k := range keys {
+			v := s.Extensions[k]
+			g.Do("$.key$: $.value$,\n", map[string]interface{}{
+				"key":   fmt.Sprintf("%#v", k),
+				"value": fmt.Sprintf("%#v", v),
+			})
+		}
+		g.Do("},\n},\n", nil)
+	}
+
+	return nil
+}
+
 func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error {
 
 	if vs == nil {
@@ -420,6 +546,18 @@ func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error
 		g.Do("UniqueItems: true,\n", nil)
 	}
 
+	if len(vs.AllOf) > 0 {
+		g.Do("AllOf: []spec.Schema{\n", nil)
+		for _, s := range vs.AllOf {
+			g.Do("{\n", nil)
+			if err := g.generateSchema(&s); err != nil {
+				return err
+			}
+			g.Do("},\n", nil)
+		}
+		g.Do("},\n", nil)
+	}
+
 	return nil
 }
 
@@ -429,7 +567,7 @@ func (g openAPITypeWriter) generate(t *types.Type) error {
 	case types.Struct:
 		validationSchema, err := ParseCommentTags(t, t.CommentLines, markerPrefix)
 		if err != nil {
-			return err
+			return fmt.Errorf("failed parsing comment tags for %v: %w", t.String(), err)
 		}
 
 		hasV2Definition := hasOpenAPIDefinitionMethod(t)
@@ -563,6 +701,9 @@ func (g openAPITypeWriter) generate(t *types.Type) error {
 		deps := []string{}
 		for _, k := range keys {
 			v := g.refTypes[k]
+			if t.Kind != types.Struct {
+				continue
+			}
 			if t, _ := openapi.OpenAPITypeFormat(v.String()); t != "" {
 				// This is a known type, we do not need a reference to it
 				// Will eliminate special case of time.Time
@@ -573,7 +714,12 @@ func (g openAPITypeWriter) generate(t *types.Type) error {
 		if len(deps) > 0 {
 			g.Do("Dependencies: []string{\n", args)
 			for _, k := range deps {
-				g.Do("\"$.$\",", k)
+				t := g.refTypes[k]
+				if g.shouldUseOpenAPIModelName(t) {
+					g.Do("$.|raw${}.OpenAPIModelName(),", t)
+				} else {
+					g.Do("\"$.$\",", k)
+				}
 			}
 			g.Do("},\n", nil)
 		}
@@ -644,7 +790,15 @@ func (g openAPITypeWriter) emitExtensions(extensions []extension, unions []union
 	}
 
 	if len(otherExtensions) > 0 {
-		for k, v := range otherExtensions {
+		// Sort extension keys to generate deterministic output
+		keys := []string{}
+		for k := range otherExtensions {
+			keys = append(keys, k)
+		}
+		sort.Strings(keys)
+
+		for _, k := range keys {
+			v := otherExtensions[k]
 			g.Do("$.key$: $.value$,\n", map[string]interface{}{
 				"key":   fmt.Sprintf("%#v", k),
 				"value": fmt.Sprintf("%#v", v),
@@ -704,7 +858,7 @@ func defaultFromComments(comments []string, commentPath string, t *types.Type) (
 
 	var i interface{}
 	if id, ok := parseSymbolReference(tag, commentPath); ok {
-		klog.Errorf("%v, %v", id, commentPath)
+		klog.V(5).Infof("%v, %v", id, commentPath)
 		return nil, &id, nil
 	} else if err := json.Unmarshal([]byte(tag), &i); err != nil {
 		return nil, nil, fmt.Errorf("failed to unmarshal default: %v", err)
@@ -844,15 +998,9 @@ func (g openAPITypeWriter) generateDescription(CommentLines []string) {
 		}
 	}
 
-	postDoc := strings.TrimLeft(buffer.String(), "\n")
-	postDoc = strings.TrimRight(postDoc, "\n")
-	postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to "
-	postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape "
-	postDoc = strings.Replace(postDoc, "\n", "\\n", -1)
-	postDoc = strings.Replace(postDoc, "\t", "\\t", -1)
-	postDoc = strings.Trim(postDoc, " ")
-	if postDoc != "" {
-		g.Do("Description: \"$.$\",\n", postDoc)
+	postDoc := strings.TrimSpace(buffer.String())
+	if len(postDoc) > 0 {
+		g.Do("Description: $.$,\n", fmt.Sprintf("%#v", postDoc))
 	}
 }
 
@@ -915,8 +1063,10 @@ func (g openAPITypeWriter) generateProperty(m *types.Member, parent *types.Type)
 		if err := g.generateSliceProperty(t); err != nil {
 			return fmt.Errorf("failed to generate slice property in %v: %v: %v", parent, m.Name, err)
 		}
-	case types.Struct, types.Interface:
+	case types.Struct:
 		g.generateReferenceProperty(t)
+	case types.Interface:
+		// Don't generate references to interfaces since we don't declare them
 	default:
 		return fmt.Errorf("cannot generate spec for type %v", t)
 	}
@@ -931,7 +1081,22 @@ func (g openAPITypeWriter) generateSimpleProperty(typeString, format string) {
 
 func (g openAPITypeWriter) generateReferenceProperty(t *types.Type) {
 	g.refTypes[t.Name.String()] = t
-	g.Do("Ref: ref(\"$.$\"),\n", t.Name.String())
+	if g.shouldUseOpenAPIModelName(t) {
+		g.Do("Ref: ref($.|raw${}.OpenAPIModelName()),\n", t)
+	} else {
+		g.Do("Ref: ref(\"$.$\"),\n", t.Name.String())
+	}
+}
+
+func resolvePtrType(t *types.Type) *types.Type {
+	var prev *types.Type
+	for prev != t {
+		prev = t
+		if t.Kind == types.Pointer {
+			t = t.Elem
+		}
+	}
+	return t
 }
 
 func resolveAliasAndPtrType(t *types.Type) *types.Type {
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/list_type_streaming_tags.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/list_type_streaming_tags.go
new file mode 100644
index 000000000..4f34d42ec
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/rules/list_type_streaming_tags.go
@@ -0,0 +1,117 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rules
+
+import (
+	"reflect"
+
+	"k8s.io/gengo/v2/types"
+)
+
+// StreamingListTypeFieldOrder implements APIRule interface.
+// Fields must be ordered TypeMeta, ListMeta, Items
+type StreamingListTypeFieldOrder struct{}
+
+func (l *StreamingListTypeFieldOrder) Name() string {
+	return "streaming_list_type_field_order"
+}
+func (l *StreamingListTypeFieldOrder) Validate(t *types.Type) ([]string, error) {
+	if !isListType(t) {
+		return nil, nil
+	}
+	var fields []string
+	if t.Members[0].Name != "TypeMeta" {
+		fields = append(fields, "TypeMeta")
+	}
+	if t.Members[1].Name != "ListMeta" {
+		fields = append(fields, "ListMeta")
+	}
+	if t.Members[2].Name != "Items" {
+		fields = append(fields, "Items")
+	}
+	return fields, nil
+}
+
+// StreamingListTypeJSONTags implements APIRule interface.
+// Fields must be JSON-tagged
+type StreamingListTypeJSONTags struct{}
+
+func (l *StreamingListTypeJSONTags) Name() string {
+	return "streaming_list_type_json_tags"
+}
+
+func (l *StreamingListTypeJSONTags) Validate(t *types.Type) ([]string, error) {
+	if !isListType(t) {
+		return nil, nil
+	}
+	var fields []string
+	for _, m := range t.Members {
+		switch m.Name {
+		case "TypeMeta":
+			if reflect.StructTag(m.Tags).Get("json") != ",inline" {
+				fields = append(fields, "TypeMeta")
+			}
+		case "ListMeta":
+			if reflect.StructTag(m.Tags).Get("json") != "metadata,omitempty" {
+				fields = append(fields, "ListMeta")
+			}
+		case "Items":
+			if reflect.StructTag(m.Tags).Get("json") != "items" {
+				fields = append(fields, "Items")
+			}
+		}
+	}
+	return fields, nil
+}
+
+// StreamingListTypeProtoTags implements APIRule interface.
+// Fields must be Proto-tagged with specific tags for streaming to work.
+type StreamingListTypeProtoTags struct{}
+
+func (l *StreamingListTypeProtoTags) Name() string {
+	return "streaming_list_type_proto_tags"
+}
+func (l *StreamingListTypeProtoTags) Validate(t *types.Type) ([]string, error) {
+	if !isListType(t) {
+		return nil, nil
+	}
+	var fields []string
+	for _, m := range t.Members {
+		switch m.Name {
+		case "TypeMeta":
+			if v := reflect.StructTag(m.Tags).Get("protobuf"); v != "" {
+				fields = append(fields, "TypeMeta")
+			}
+		case "ListMeta":
+			if v := reflect.StructTag(m.Tags).Get("protobuf"); v != "" && v != "bytes,1,opt,name=metadata" {
+				fields = append(fields, "ListMeta")
+			}
+		case "Items":
+			if v := reflect.StructTag(m.Tags).Get("protobuf"); v != "" && v != "bytes,2,rep,name=items" {
+				fields = append(fields, "Items")
+			}
+		}
+	}
+	return fields, nil
+}
+
+func isListType(t *types.Type) bool {
+	return len(t.Members) == 3 &&
+		hasNamedMember(t, "TypeMeta") &&
+		hasNamedMember(t, "ListMeta") &&
+		hasNamedMember(t, "Items")
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go
index af30edc5e..d7655f0d9 100644
--- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go
+++ b/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go
@@ -32,14 +32,6 @@ var (
 		"-",
 	)
 
-	// Blacklist of JSON names that should skip match evaluation
-	jsonNameBlacklist = sets.NewString(
-		// Empty name is used for inline struct field (e.g. metav1.TypeMeta)
-		"",
-		// Special case for object and list meta
-		"metadata",
-	)
-
 	// List of substrings that aren't allowed in Go name and JSON name
 	disallowedNameSubstrings = sets.NewString(
 		// Underscore is not allowed in either name
@@ -73,12 +65,11 @@ is also considered matched.
 
 	HTTPJSONSpec   httpjsonSpec   true
 
-NOTE: JSON names in jsonNameBlacklist should skip evaluation
+NOTE: an empty JSON name is valid only for inlined structs or pointer to structs.
+It cannot be empty for anything else because capitalization must be set explicitly.
 
-	                              true
-	podSpec                       true
-	podSpec        -              true
-	podSpec        metadata       true
+NOTE: metav1.ListMeta and metav1.ObjectMeta by convention must have "metadata" as name.
+Other fields may have that JSON name if the field name matches.
 */
 type NamesMatch struct{}
 
@@ -109,7 +100,7 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) {
 				continue
 			}
 			jsonName := strings.Split(jsonTag, ",")[0]
-			if !namesMatch(goName, jsonName) {
+			if !nameIsOkay(m, jsonName) {
 				fields = append(fields, goName)
 			}
 		}
@@ -117,6 +108,22 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) {
 	return fields, nil
 }
 
+func nameIsOkay(member types.Member, jsonName string) bool {
+	if jsonName == "" {
+		return member.Type.Kind == types.Struct ||
+			member.Type.Kind == types.Pointer && member.Type.Elem.Kind == types.Struct
+	}
+
+	typeName := member.Type.String()
+	switch typeName {
+	case "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta",
+		"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta":
+		return jsonName == "metadata"
+	}
+
+	return namesMatch(member.Name, jsonName)
+}
+
 // namesMatch evaluates if goName and jsonName match the API rule
 // TODO: Use an off-the-shelf CamelCase solution instead of implementing this logic. The following existing
 //
@@ -129,9 +136,6 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) {
 //		 about why they don't satisfy our need. What we need can be a function that detects an acronym at the
 //		 beginning of a string.
 func namesMatch(goName, jsonName string) bool {
-	if jsonNameBlacklist.Has(jsonName) {
-		return true
-	}
 	if !isAllowedName(goName) || !isAllowedName(jsonName) {
 		return false
 	}
diff --git a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go
index 5fc629773..5102e7125 100644
--- a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go
+++ b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go
@@ -26,10 +26,10 @@ import (
 
 	"github.com/NYTimes/gziphandler"
 	"github.com/emicklei/go-restful/v3"
-	"github.com/golang/protobuf/proto"
 	openapi_v2 "github.com/google/gnostic-models/openapiv2"
 	"github.com/google/uuid"
 	"github.com/munnerz/goautoneg"
+	"google.golang.org/protobuf/proto"
 
 	klog "k8s.io/klog/v2"
 	"k8s.io/kube-openapi/pkg/builder"
diff --git a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
index fc4563488..10f0b385f 100644
--- a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
+++ b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
@@ -29,10 +29,10 @@ import (
 	"sync"
 	"time"
 
-	"github.com/golang/protobuf/proto"
 	openapi_v3 "github.com/google/gnostic-models/openapiv3"
 	"github.com/google/uuid"
 	"github.com/munnerz/goautoneg"
+	"google.golang.org/protobuf/proto"
 
 	"k8s.io/klog/v2"
 	"k8s.io/kube-openapi/pkg/cached"
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/LICENSE b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/LICENSE
new file mode 100644
index 000000000..2f9a31fad
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Alex Saskevich
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/patterns.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/patterns.go
new file mode 100644
index 000000000..6e02f2d00
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/patterns.go
@@ -0,0 +1,26 @@
+package govalidator
+
+import "regexp"
+
+// Basic regular expressions for validating strings
+const (
+	CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$"
+	ISBN10     string = "^(?:[0-9]{9}X|[0-9]{10})$"
+	ISBN13     string = "^(?:[0-9]{13})$"
+	Hexcolor   string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
+	RGBcolor   string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$"
+	Base64     string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$"
+	SSN        string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$`
+	Int        string = "^(?:[-+]?(?:0|[1-9][0-9]*))$"
+)
+
+var (
+	rxCreditCard = regexp.MustCompile(CreditCard)
+	rxInt        = regexp.MustCompile(Int)
+	rxISBN10     = regexp.MustCompile(ISBN10)
+	rxISBN13     = regexp.MustCompile(ISBN13)
+	rxHexcolor   = regexp.MustCompile(Hexcolor)
+	rxRGBcolor   = regexp.MustCompile(RGBcolor)
+	rxBase64     = regexp.MustCompile(Base64)
+	rxSSN        = regexp.MustCompile(SSN)
+)
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/validator.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/validator.go
new file mode 100644
index 000000000..4d089508a
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/govalidator/validator.go
@@ -0,0 +1,181 @@
+// Package govalidator is package of validators and sanitizers for strings, structs and collections.
+package govalidator
+
+import (
+	"fmt"
+	"net"
+	"net/url"
+	"reflect"
+	"regexp"
+	"strconv"
+	"strings"
+)
+
+var (
+	notNumberRegexp     = regexp.MustCompile("[^0-9]+")
+	whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`)
+)
+
+// IsRequestURI check if the string rawurl, assuming
+// it was received in an HTTP request, is an
+// absolute URI or an absolute path.
+func IsRequestURI(rawurl string) bool {
+	_, err := url.ParseRequestURI(rawurl)
+	return err == nil
+}
+
+// IsHexcolor check if the string is a hexadecimal color.
+func IsHexcolor(str string) bool {
+	return rxHexcolor.MatchString(str)
+}
+
+// IsRGBcolor check if the string is a valid RGB color in form rgb(RRR, GGG, BBB).
+func IsRGBcolor(str string) bool {
+	return rxRGBcolor.MatchString(str)
+}
+
+// IsCreditCard check if the string is a credit card.
+func IsCreditCard(str string) bool {
+	sanitized := notNumberRegexp.ReplaceAllString(str, "")
+	if !rxCreditCard.MatchString(sanitized) {
+		return false
+	}
+	var sum int64
+	var digit string
+	var tmpNum int64
+	var shouldDouble bool
+	for i := len(sanitized) - 1; i >= 0; i-- {
+		digit = sanitized[i:(i + 1)]
+		tmpNum, _ = ToInt(digit)
+		if shouldDouble {
+			tmpNum *= 2
+			if tmpNum >= 10 {
+				sum += (tmpNum % 10) + 1
+			} else {
+				sum += tmpNum
+			}
+		} else {
+			sum += tmpNum
+		}
+		shouldDouble = !shouldDouble
+	}
+
+	return sum%10 == 0
+}
+
+// IsISBN10 check if the string is an ISBN version 10.
+func IsISBN10(str string) bool {
+	return IsISBN(str, 10)
+}
+
+// IsISBN13 check if the string is an ISBN version 13.
+func IsISBN13(str string) bool {
+	return IsISBN(str, 13)
+}
+
+// IsISBN check if the string is an ISBN (version 10 or 13).
+// If version value is not equal to 10 or 13, it will be check both variants.
+func IsISBN(str string, version int) bool {
+	sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "")
+	var checksum int32
+	var i int32
+	if version == 10 {
+		if !rxISBN10.MatchString(sanitized) {
+			return false
+		}
+		for i = 0; i < 9; i++ {
+			checksum += (i + 1) * int32(sanitized[i]-'0')
+		}
+		if sanitized[9] == 'X' {
+			checksum += 10 * 10
+		} else {
+			checksum += 10 * int32(sanitized[9]-'0')
+		}
+		if checksum%11 == 0 {
+			return true
+		}
+		return false
+	} else if version == 13 {
+		if !rxISBN13.MatchString(sanitized) {
+			return false
+		}
+		factor := []int32{1, 3}
+		for i = 0; i < 12; i++ {
+			checksum += factor[i%2] * int32(sanitized[i]-'0')
+		}
+		return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0
+	}
+	return IsISBN(str, 10) || IsISBN(str, 13)
+}
+
+// IsBase64 check if a string is base64 encoded.
+func IsBase64(str string) bool {
+	return rxBase64.MatchString(str)
+}
+
+// IsIPv6 check if the string is an IP version 6.
+func IsIPv6(str string) bool {
+	ip := net.ParseIP(str)
+	return ip != nil && strings.Contains(str, ":")
+}
+
+// IsMAC check if a string is valid MAC address.
+// Possible MAC formats:
+// 01:23:45:67:89:ab
+// 01:23:45:67:89:ab:cd:ef
+// 01-23-45-67-89-ab
+// 01-23-45-67-89-ab-cd-ef
+// 0123.4567.89ab
+// 0123.4567.89ab.cdef
+func IsMAC(str string) bool {
+	_, err := net.ParseMAC(str)
+	return err == nil
+}
+
+// IsSSN will validate the given string as a U.S. Social Security Number
+func IsSSN(str string) bool {
+	if str == "" || len(str) != 11 {
+		return false
+	}
+	return rxSSN.MatchString(str)
+}
+
+// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer.
+func ToInt(value interface{}) (res int64, err error) {
+	val := reflect.ValueOf(value)
+
+	switch value.(type) {
+	case int, int8, int16, int32, int64:
+		res = val.Int()
+	case uint, uint8, uint16, uint32, uint64:
+		res = int64(val.Uint())
+	case string:
+		if IsInt(val.String()) {
+			res, err = strconv.ParseInt(val.String(), 0, 64)
+			if err != nil {
+				res = 0
+			}
+		} else {
+			err = fmt.Errorf("math: square root of negative number %g", value)
+			res = 0
+		}
+	default:
+		err = fmt.Errorf("math: square root of negative number %g", value)
+		res = 0
+	}
+
+	return
+}
+
+// IsInt check if the string is an integer. Empty string is valid.
+func IsInt(str string) bool {
+	if IsNull(str) {
+		return true
+	}
+	return rxInt.MatchString(str)
+}
+
+// IsNull check if the string is null.
+func IsNull(str string) bool {
+	return len(str) == 0
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go
index 61141a500..81280aae6 100644
--- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go
@@ -22,7 +22,7 @@ import (
 	"strings"
 
 	"k8s.io/kube-openapi/pkg/validation/spec"
-	"sigs.k8s.io/structured-merge-diff/v4/schema"
+	"sigs.k8s.io/structured-merge-diff/v6/schema"
 )
 
 // ToSchemaFromOpenAPI converts a directory of OpenAPI schemas to an smd Schema.
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go
index 2c6fd76a9..e40f6056e 100644
--- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go
@@ -22,7 +22,7 @@ import (
 	"strings"
 
 	"k8s.io/kube-openapi/pkg/util/proto"
-	"sigs.k8s.io/structured-merge-diff/v4/schema"
+	"sigs.k8s.io/structured-merge-diff/v6/schema"
 )
 
 // ToSchema converts openapi definitions into a schema suitable for structured
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
index 9887d185b..c4a083cb4 100644
--- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
@@ -20,7 +20,7 @@ import (
 	"fmt"
 	"sort"
 
-	"sigs.k8s.io/structured-merge-diff/v4/schema"
+	"sigs.k8s.io/structured-merge-diff/v6/schema"
 )
 
 const (
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go
index 08b6246ce..25e4fd09e 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go
@@ -4,7 +4,7 @@ import (
 	"math/rand"
 	"strings"
 
-	fuzz "github.com/google/gofuzz"
+	"sigs.k8s.io/randfill"
 
 	"k8s.io/kube-openapi/pkg/validation/spec"
 )
@@ -25,15 +25,15 @@ func randAlphanumString() string {
 }
 
 var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
-	func(s *string, c fuzz.Continue) {
+	func(s *string, c randfill.Continue) {
 		// All OpenAPI V3 map keys must follow the corresponding
 		// regex. Note that this restricts the range for all other
 		// string values as well.
 		str := randAlphanumString()
 		*s = str
 	},
-	func(o *OpenAPI, c fuzz.Continue) {
-		c.FuzzNoCustom(o)
+	func(o *OpenAPI, c randfill.Continue) {
+		c.FillNoCustom(o)
 		o.Version = "3.0.0"
 		for i, val := range o.SecurityRequirement {
 			if val == nil {
@@ -48,45 +48,45 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
 		}
 
 	},
-	func(r *interface{}, c fuzz.Continue) {
+	func(r *interface{}, c randfill.Continue) {
 		switch c.Intn(3) {
 		case 0:
 			*r = nil
 		case 1:
-			n := c.RandString() + "x"
+			n := c.String(0) + "x"
 			*r = n
 		case 2:
 			n := c.Float64()
 			*r = n
 		}
 	},
-	func(v **spec.Info, c fuzz.Continue) {
+	func(v **spec.Info, c randfill.Continue) {
 		// Info is never nil
 		*v = &spec.Info{}
-		c.FuzzNoCustom(*v)
-		(*v).Title = c.RandString() + "x"
+		c.FillNoCustom(*v)
+		(*v).Title = c.String(0) + "x"
 	},
-	func(v *Paths, c fuzz.Continue) {
-		c.Fuzz(&v.VendorExtensible)
+	func(v *Paths, c randfill.Continue) {
+		c.Fill(&v.VendorExtensible)
 		num := c.Intn(5)
 		if num > 0 {
 			v.Paths = make(map[string]*Path)
 		}
 		for i := 0; i < num; i++ {
 			val := Path{}
-			c.Fuzz(&val)
-			v.Paths["/"+c.RandString()] = &val
+			c.Fill(&val)
+			v.Paths["/"+c.String(0)] = &val
 		}
 	},
-	func(v *SecurityScheme, c fuzz.Continue) {
+	func(v *SecurityScheme, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Refable)
+			c.Fill(&v.Refable)
 			return
 		}
 		switch c.Intn(4) {
 		case 0:
 			v.Type = "apiKey"
-			v.Name = c.RandString() + "x"
+			v.Name = c.String(0) + "x"
 			switch c.Intn(3) {
 			case 0:
 				v.In = "query"
@@ -101,17 +101,17 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
 			v.Type = "oauth2"
 			v.Flows = make(map[string]*OAuthFlow)
 			flow := OAuthFlow{}
-			flow.AuthorizationUrl = c.RandString() + "x"
+			flow.AuthorizationUrl = c.String(0) + "x"
 			v.Flows["implicit"] = &flow
 			flow.Scopes = make(map[string]string)
 			flow.Scopes["foo"] = "bar"
 		case 3:
 			v.Type = "openIdConnect"
-			v.OpenIdConnectUrl = "https://" + c.RandString()
+			v.OpenIdConnectUrl = "https://" + c.String(0)
 		}
 		v.Scheme = "basic"
 	},
-	func(v *spec.Ref, c fuzz.Continue) {
+	func(v *spec.Ref, c randfill.Continue) {
 		switch c.Intn(7) {
 		case 0:
 			*v = spec.MustCreateRef("#/components/schemas/" + randAlphanumString())
@@ -127,13 +127,13 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
 			*v = spec.MustCreateRef("#/components/requestBodies/" + randAlphanumString())
 		}
 	},
-	func(v *Parameter, c fuzz.Continue) {
+	func(v *Parameter, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Refable)
+			c.Fill(&v.Refable)
 			return
 		}
-		c.Fuzz(&v.ParameterProps)
-		c.Fuzz(&v.VendorExtensible)
+		c.Fill(&v.ParameterProps)
+		c.Fill(&v.VendorExtensible)
 
 		switch c.Intn(3) {
 		case 0:
@@ -145,44 +145,44 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
 			v.In = "cookie"
 		}
 	},
-	func(v *RequestBody, c fuzz.Continue) {
+	func(v *RequestBody, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Refable)
+			c.Fill(&v.Refable)
 			return
 		}
-		c.Fuzz(&v.RequestBodyProps)
-		c.Fuzz(&v.VendorExtensible)
+		c.Fill(&v.RequestBodyProps)
+		c.Fill(&v.VendorExtensible)
 	},
-	func(v *Header, c fuzz.Continue) {
+	func(v *Header, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Refable)
+			c.Fill(&v.Refable)
 			return
 		}
-		c.Fuzz(&v.HeaderProps)
-		c.Fuzz(&v.VendorExtensible)
+		c.Fill(&v.HeaderProps)
+		c.Fill(&v.VendorExtensible)
 	},
-	func(v *ResponsesProps, c fuzz.Continue) {
-		c.Fuzz(&v.Default)
+	func(v *ResponsesProps, c randfill.Continue) {
+		c.Fill(&v.Default)
 		n := c.Intn(5)
 		for i := 0; i < n; i++ {
 			r2 := Response{}
-			c.Fuzz(&r2)
+			c.Fill(&r2)
 			// HTTP Status code in 100-599 Range
 			code := c.Intn(500) + 100
 			v.StatusCodeResponses = make(map[int]*Response)
 			v.StatusCodeResponses[code] = &r2
 		}
 	},
-	func(v *Response, c fuzz.Continue) {
+	func(v *Response, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Refable)
+			c.Fill(&v.Refable)
 			return
 		}
-		c.Fuzz(&v.ResponseProps)
-		c.Fuzz(&v.VendorExtensible)
+		c.Fill(&v.ResponseProps)
+		c.Fill(&v.VendorExtensible)
 	},
-	func(v *Operation, c fuzz.Continue) {
-		c.FuzzNoCustom(v)
+	func(v *Operation, c randfill.Continue) {
+		c.FillNoCustom(v)
 		// Do not fuzz null values into the array.
 		for i, val := range v.SecurityRequirement {
 			if val == nil {
@@ -196,85 +196,85 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
 			}
 		}
 	},
-	func(v *spec.Extensions, c fuzz.Continue) {
+	func(v *spec.Extensions, c randfill.Continue) {
 		numChildren := c.Intn(5)
 		for i := 0; i < numChildren; i++ {
 			if *v == nil {
 				*v = spec.Extensions{}
 			}
-			(*v)["x-"+c.RandString()] = c.RandString()
+			(*v)["x-"+c.String(0)] = c.String(0)
 		}
 	},
-	func(v *spec.ExternalDocumentation, c fuzz.Continue) {
-		c.Fuzz(&v.Description)
+	func(v *spec.ExternalDocumentation, c randfill.Continue) {
+		c.Fill(&v.Description)
 		v.URL = "https://" + randAlphanumString()
 	},
-	func(v *spec.SchemaURL, c fuzz.Continue) {
+	func(v *spec.SchemaURL, c randfill.Continue) {
 		*v = spec.SchemaURL("https://" + randAlphanumString())
 	},
-	func(v *spec.SchemaOrBool, c fuzz.Continue) {
+	func(v *spec.SchemaOrBool, c randfill.Continue) {
 		*v = spec.SchemaOrBool{}
 
-		if c.RandBool() {
-			v.Allows = c.RandBool()
+		if c.Bool() {
+			v.Allows = c.Bool()
 		} else {
 			v.Schema = &spec.Schema{}
 			v.Allows = true
-			c.Fuzz(&v.Schema)
+			c.Fill(&v.Schema)
 		}
 	},
-	func(v *spec.SchemaOrArray, c fuzz.Continue) {
+	func(v *spec.SchemaOrArray, c randfill.Continue) {
 		*v = spec.SchemaOrArray{}
-		if c.RandBool() {
+		if c.Bool() {
 			schema := spec.Schema{}
-			c.Fuzz(&schema)
+			c.Fill(&schema)
 			v.Schema = &schema
 		} else {
 			v.Schemas = []spec.Schema{}
 			numChildren := c.Intn(5)
 			for i := 0; i < numChildren; i++ {
 				schema := spec.Schema{}
-				c.Fuzz(&schema)
+				c.Fill(&schema)
 				v.Schemas = append(v.Schemas, schema)
 			}
 
 		}
 
 	},
-	func(v *spec.SchemaOrStringArray, c fuzz.Continue) {
-		if c.RandBool() {
+	func(v *spec.SchemaOrStringArray, c randfill.Continue) {
+		if c.Bool() {
 			*v = spec.SchemaOrStringArray{}
-			if c.RandBool() {
-				c.Fuzz(&v.Property)
+			if c.Bool() {
+				c.Fill(&v.Property)
 			} else {
-				c.Fuzz(&v.Schema)
+				c.Fill(&v.Schema)
 			}
 		}
 	},
-	func(v *spec.Schema, c fuzz.Continue) {
+	func(v *spec.Schema, c randfill.Continue) {
 		if c.Intn(refChance) == 0 {
-			c.Fuzz(&v.Ref)
+			c.Fill(&v.Ref)
 			return
 		}
-		if c.RandBool() {
+		if c.Bool() {
 			// file schema
-			c.Fuzz(&v.Default)
-			c.Fuzz(&v.Description)
-			c.Fuzz(&v.Example)
-			c.Fuzz(&v.ExternalDocs)
+			c.Fill(&v.Default)
+			c.Fill(&v.Description)
+			c.Fill(&v.Example)
+			c.Fill(&v.ExternalDocs)
 
-			c.Fuzz(&v.Format)
-			c.Fuzz(&v.ReadOnly)
-			c.Fuzz(&v.Required)
-			c.Fuzz(&v.Title)
+			c.Fill(&v.Format)
+			c.Fill(&v.ReadOnly)
+			c.Fill(&v.Required)
+			c.Fill(&v.Title)
 			v.Type = spec.StringOrArray{"file"}
 
 		} else {
 			// normal schema
-			c.Fuzz(&v.SchemaProps)
-			c.Fuzz(&v.SwaggerSchemaProps)
-			c.Fuzz(&v.VendorExtensible)
-			c.Fuzz(&v.ExtraProps)
+			c.Fill(&v.SchemaProps)
+			c.Fill(&v.SwaggerSchemaProps)
+			c.Fill(&v.VendorExtensible)
+			c.Fill(&v.ExtraProps)
 		}
 
 	},
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go
index 5789e67ab..c7b69b200 100644
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go
+++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go
@@ -22,7 +22,7 @@ import (
 	"strings"
 
 	openapi_v2 "github.com/google/gnostic-models/openapiv2"
-	"gopkg.in/yaml.v2"
+	yaml "go.yaml.in/yaml/v2"
 )
 
 func newSchemaError(path *Path, format string, a ...interface{}) error {
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
index d9f2896e3..8694c6c76 100644
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
+++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
@@ -22,7 +22,7 @@ import (
 	"strings"
 
 	openapi_v3 "github.com/google/gnostic-models/openapiv3"
-	"gopkg.in/yaml.v3"
+	"go.yaml.in/yaml/v3"
 )
 
 // Temporary parse implementation to be used until gnostic->kube-openapi conversion
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/util.go b/vendor/k8s.io/kube-openapi/pkg/util/util.go
index 6eee935b2..830ec3ca0 100644
--- a/vendor/k8s.io/kube-openapi/pkg/util/util.go
+++ b/vendor/k8s.io/kube-openapi/pkg/util/util.go
@@ -92,10 +92,21 @@ type OpenAPICanonicalTypeNamer interface {
 	OpenAPICanonicalTypeName() string
 }
 
+// OpenAPIModelNamer is an interface Go types may implement to provide an OpenAPI model name.
+//
+// This takes precedence over OpenAPICanonicalTypeNamer, and should be used when a Go type has a model
+// name that differs from its canonical type name as determined by Go package name reflection.
+type OpenAPIModelNamer interface {
+	OpenAPIModelName() string
+}
+
 // GetCanonicalTypeName will find the canonical type name of a sample object, removing
 // the "vendor" part of the path
 func GetCanonicalTypeName(model interface{}) string {
-	if namer, ok := model.(OpenAPICanonicalTypeNamer); ok {
+	switch namer := model.(type) {
+	case OpenAPIModelNamer:
+		return namer.OpenAPIModelName()
+	case OpenAPICanonicalTypeNamer:
 		return namer.OpenAPICanonicalTypeName()
 	}
 	t := reflect.TypeOf(model)
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/default.go b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/default.go
index e85b0f1b4..23109816e 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/default.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/default.go
@@ -17,14 +17,13 @@ package strfmt
 import (
 	"encoding/base64"
 	"encoding/json"
-	"fmt"
 	"net/mail"
 	"regexp"
 	"strings"
 
-	"github.com/asaskevich/govalidator"
-
 	netutils "k8s.io/utils/net"
+
+	"k8s.io/kube-openapi/pkg/internal/third_party/govalidator"
 )
 
 const (
@@ -247,29 +246,6 @@ func (b *Base64) UnmarshalText(data []byte) error { // validation is performed l
 	return nil
 }
 
-// Scan read a value from a database driver
-func (b *Base64) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		dbuf := make([]byte, base64.StdEncoding.DecodedLen(len(v)))
-		n, err := base64.StdEncoding.Decode(dbuf, v)
-		if err != nil {
-			return err
-		}
-		*b = dbuf[:n]
-	case string:
-		vv, err := base64.StdEncoding.DecodeString(v)
-		if err != nil {
-			return err
-		}
-		*b = Base64(vv)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.Base64 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (b Base64) String() string {
 	return base64.StdEncoding.EncodeToString([]byte(b))
 }
@@ -324,20 +300,6 @@ func (u *URI) UnmarshalText(data []byte) error { // validation is performed late
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *URI) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = URI(string(v))
-	case string:
-		*u = URI(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u URI) String() string {
 	return string(u)
 }
@@ -388,20 +350,6 @@ func (e *Email) UnmarshalText(data []byte) error { // validation is performed la
 	return nil
 }
 
-// Scan read a value from a database driver
-func (e *Email) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*e = Email(string(v))
-	case string:
-		*e = Email(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.Email from: %#v", v)
-	}
-
-	return nil
-}
-
 func (e Email) String() string {
 	return string(e)
 }
@@ -452,20 +400,6 @@ func (h *Hostname) UnmarshalText(data []byte) error { // validation is performed
 	return nil
 }
 
-// Scan read a value from a database driver
-func (h *Hostname) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*h = Hostname(string(v))
-	case string:
-		*h = Hostname(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.Hostname from: %#v", v)
-	}
-
-	return nil
-}
-
 func (h Hostname) String() string {
 	return string(h)
 }
@@ -516,20 +450,6 @@ func (u *IPv4) UnmarshalText(data []byte) error { // validation is performed lat
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *IPv4) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = IPv4(string(v))
-	case string:
-		*u = IPv4(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.IPv4 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u IPv4) String() string {
 	return string(u)
 }
@@ -580,20 +500,6 @@ func (u *IPv6) UnmarshalText(data []byte) error { // validation is performed lat
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *IPv6) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = IPv6(string(v))
-	case string:
-		*u = IPv6(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.IPv6 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u IPv6) String() string {
 	return string(u)
 }
@@ -644,20 +550,6 @@ func (u *CIDR) UnmarshalText(data []byte) error { // validation is performed lat
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *CIDR) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = CIDR(string(v))
-	case string:
-		*u = CIDR(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.CIDR from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u CIDR) String() string {
 	return string(u)
 }
@@ -708,20 +600,6 @@ func (u *MAC) UnmarshalText(data []byte) error { // validation is performed late
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *MAC) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = MAC(string(v))
-	case string:
-		*u = MAC(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.IPv4 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u MAC) String() string {
 	return string(u)
 }
@@ -772,20 +650,6 @@ func (u *UUID) UnmarshalText(data []byte) error { // validation is performed lat
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *UUID) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = UUID(string(v))
-	case string:
-		*u = UUID(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.UUID from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u UUID) String() string {
 	return string(u)
 }
@@ -839,20 +703,6 @@ func (u *UUID3) UnmarshalText(data []byte) error { // validation is performed la
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *UUID3) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = UUID3(string(v))
-	case string:
-		*u = UUID3(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.UUID3 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u UUID3) String() string {
 	return string(u)
 }
@@ -906,20 +756,6 @@ func (u *UUID4) UnmarshalText(data []byte) error { // validation is performed la
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *UUID4) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = UUID4(string(v))
-	case string:
-		*u = UUID4(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.UUID4 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u UUID4) String() string {
 	return string(u)
 }
@@ -973,20 +809,6 @@ func (u *UUID5) UnmarshalText(data []byte) error { // validation is performed la
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *UUID5) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = UUID5(string(v))
-	case string:
-		*u = UUID5(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.UUID5 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u UUID5) String() string {
 	return string(u)
 }
@@ -1040,20 +862,6 @@ func (u *ISBN) UnmarshalText(data []byte) error { // validation is performed lat
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *ISBN) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = ISBN(string(v))
-	case string:
-		*u = ISBN(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.ISBN from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u ISBN) String() string {
 	return string(u)
 }
@@ -1107,20 +915,6 @@ func (u *ISBN10) UnmarshalText(data []byte) error { // validation is performed l
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *ISBN10) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = ISBN10(string(v))
-	case string:
-		*u = ISBN10(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.ISBN10 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u ISBN10) String() string {
 	return string(u)
 }
@@ -1174,20 +968,6 @@ func (u *ISBN13) UnmarshalText(data []byte) error { // validation is performed l
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *ISBN13) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = ISBN13(string(v))
-	case string:
-		*u = ISBN13(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.ISBN13 from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u ISBN13) String() string {
 	return string(u)
 }
@@ -1241,20 +1021,6 @@ func (u *CreditCard) UnmarshalText(data []byte) error { // validation is perform
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *CreditCard) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = CreditCard(string(v))
-	case string:
-		*u = CreditCard(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.CreditCard from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u CreditCard) String() string {
 	return string(u)
 }
@@ -1308,20 +1074,6 @@ func (u *SSN) UnmarshalText(data []byte) error { // validation is performed late
 	return nil
 }
 
-// Scan read a value from a database driver
-func (u *SSN) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*u = SSN(string(v))
-	case string:
-		*u = SSN(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.SSN from: %#v", v)
-	}
-
-	return nil
-}
-
 func (u SSN) String() string {
 	return string(u)
 }
@@ -1375,20 +1127,6 @@ func (h *HexColor) UnmarshalText(data []byte) error { // validation is performed
 	return nil
 }
 
-// Scan read a value from a database driver
-func (h *HexColor) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*h = HexColor(string(v))
-	case string:
-		*h = HexColor(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.HexColor from: %#v", v)
-	}
-
-	return nil
-}
-
 func (h HexColor) String() string {
 	return string(h)
 }
@@ -1442,20 +1180,6 @@ func (r *RGBColor) UnmarshalText(data []byte) error { // validation is performed
 	return nil
 }
 
-// Scan read a value from a database driver
-func (r *RGBColor) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*r = RGBColor(string(v))
-	case string:
-		*r = RGBColor(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.RGBColor from: %#v", v)
-	}
-
-	return nil
-}
-
 func (r RGBColor) String() string {
 	return string(r)
 }
@@ -1510,20 +1234,6 @@ func (r *Password) UnmarshalText(data []byte) error { // validation is performed
 	return nil
 }
 
-// Scan read a value from a database driver
-func (r *Password) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	case []byte:
-		*r = Password(string(v))
-	case string:
-		*r = Password(v)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.Password from: %#v", v)
-	}
-
-	return nil
-}
-
 func (r Password) String() string {
 	return string(r)
 }
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/duration.go b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/duration.go
index 8fbeb635f..04545296b 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/duration.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/duration.go
@@ -119,23 +119,6 @@ func ParseDuration(cand string) (time.Duration, error) {
 	return 0, fmt.Errorf("unable to parse %s as duration", cand)
 }
 
-// Scan reads a Duration value from database driver type.
-func (d *Duration) Scan(raw interface{}) error {
-	switch v := raw.(type) {
-	// TODO: case []byte: // ?
-	case int64:
-		*d = Duration(v)
-	case float64:
-		*d = Duration(int64(v))
-	case nil:
-		*d = Duration(0)
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.Duration from: %#v", v)
-	}
-
-	return nil
-}
-
 // String converts this duration to a string
 func (d Duration) String() string {
 	return time.Duration(d).String()
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/format.go b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/format.go
index c85067a26..6981a40f5 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/format.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/format.go
@@ -16,6 +16,7 @@ package strfmt
 
 import (
 	"encoding"
+	"encoding/json"
 	"reflect"
 	"strings"
 	"sync"
@@ -231,3 +232,26 @@ func (f *defaultFormats) Parse(name, data string) (interface{}, error) {
 	}
 	return nil, errors.InvalidTypeName(name)
 }
+
+// unmarshalJSON provides a generic implementation of json.Unmarshaler interface's UnmarshalJSON function for basic string formats.
+func unmarshalJSON[T ~string](r *T, data []byte) error {
+	if string(data) == jsonNull {
+		return nil
+	}
+	var ustr string
+	if err := json.Unmarshal(data, &ustr); err != nil {
+		return err
+	}
+	*r = T(ustr)
+	return nil
+}
+
+// deepCopy provides a generic implementation of DeepCopy for basic string formats.
+func deepCopy[T ~string](r *T) *T {
+	if r == nil {
+		return nil
+	}
+	out := new(T)
+	*out = *r
+	return out
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/kubernetes-extensions.go b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/kubernetes-extensions.go
new file mode 100644
index 000000000..64d665476
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/kubernetes-extensions.go
@@ -0,0 +1,143 @@
+// Copyright 2024 go-swagger maintainers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package strfmt
+
+import (
+	"encoding/json"
+	"regexp"
+)
+
+const k8sPrefix = "k8s-"
+
+func init() {
+	// register formats in the KubernetesExtensions registry:
+	//   - k8s-short-name
+	//   - k8s-long-name
+	shortName := ShortName("")
+	Default.Add(k8sPrefix+"short-name", &shortName, IsShortName)
+
+	longName := LongName("")
+	Default.Add(k8sPrefix+"long-name", &longName, IsLongName)
+}
+
+// ShortName is a name, up to 63 characters long, composed of alphanumeric
+// characters and dashes, which cannot begin or end with a dash.
+//
+// ShortName almost conforms to the definition of a label in DNS (RFC 1123),
+// except that uppercase letters are not allowed.
+//
+// xref: https://github.com/kubernetes/kubernetes/issues/71140
+//
+// swagger:strfmt k8s-short-name
+type ShortName string
+
+func (r ShortName) MarshalText() ([]byte, error) {
+	return []byte(string(r)), nil
+}
+
+func (r *ShortName) UnmarshalText(data []byte) error { // validation is performed later on
+	*r = ShortName(data)
+	return nil
+}
+
+func (r ShortName) String() string {
+	return string(r)
+}
+
+func (r ShortName) MarshalJSON() ([]byte, error) {
+	return json.Marshal(string(r))
+}
+
+func (r *ShortName) UnmarshalJSON(data []byte) error {
+	return unmarshalJSON(r, data)
+}
+
+func (r *ShortName) DeepCopyInto(out *ShortName) {
+	*out = *r
+}
+
+func (r *ShortName) DeepCopy() *ShortName {
+	return deepCopy(r)
+}
+
+const shortNameFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
+
+// ShortNameMaxLength is a label's max length in DNS (RFC 1123)
+const ShortNameMaxLength int = 63
+
+var shortNameRegexp = regexp.MustCompile("^" + shortNameFmt + "$")
+
+// IsShortName checks if a string is a valid ShortName.
+func IsShortName(value string) bool {
+	return len(value) <= ShortNameMaxLength &&
+		shortNameRegexp.MatchString(value)
+}
+
+// LongName is a name, up to 253 characters long, composed of dot-separated
+// segments; each segment uses only alphanumerics and dashes (no
+// leading/trailing).
+//
+// LongName almost conforms to the definition of a subdomain in DNS (RFC 1123),
+// except that uppercase letters are not allowed, and there is no max length
+// limit of 63 for each of the dot-separated DNS Labels that make up the
+// subdomain.
+//
+// xref: https://github.com/kubernetes/kubernetes/issues/71140
+// xref: https://github.com/kubernetes/kubernetes/issues/79351
+//
+// swagger:strfmt k8s-long-name
+type LongName string
+
+func (r LongName) MarshalText() ([]byte, error) {
+	return []byte(string(r)), nil
+}
+
+func (r *LongName) UnmarshalText(data []byte) error { // validation is performed later on
+	*r = LongName(data)
+	return nil
+}
+
+func (r LongName) String() string {
+	return string(r)
+}
+
+func (r LongName) MarshalJSON() ([]byte, error) {
+	return json.Marshal(string(r))
+}
+
+func (r *LongName) UnmarshalJSON(data []byte) error {
+	return unmarshalJSON(r, data)
+}
+
+func (r *LongName) DeepCopyInto(out *LongName) {
+	*out = *r
+}
+
+func (r *LongName) DeepCopy() *LongName {
+	return deepCopy(r)
+}
+
+const longNameFmt string = shortNameFmt + "(\\." + shortNameFmt + ")*"
+
+// LongNameMaxLength is a subdomain's max length in DNS (RFC 1123)
+const LongNameMaxLength int = 253
+
+var longNameRegexp = regexp.MustCompile("^" + longNameFmt + "$")
+
+// IsLongName checks if a string is a valid LongName.
+func IsLongName(value string) bool {
+	return len(value) <= LongNameMaxLength &&
+		longNameRegexp.MatchString(value)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/time.go b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/time.go
index b2324db05..d0fd31a9d 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/time.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/time.go
@@ -16,7 +16,6 @@ package strfmt
 
 import (
 	"encoding/json"
-	"fmt"
 	"regexp"
 	"strings"
 	"time"
@@ -114,25 +113,6 @@ func (t *DateTime) UnmarshalText(text []byte) error {
 	return nil
 }
 
-// Scan scans a DateTime value from database driver type.
-func (t *DateTime) Scan(raw interface{}) error {
-	// TODO: case int64: and case float64: ?
-	switch v := raw.(type) {
-	case []byte:
-		return t.UnmarshalText(v)
-	case string:
-		return t.UnmarshalText([]byte(v))
-	case time.Time:
-		*t = DateTime(v)
-	case nil:
-		*t = DateTime{}
-	default:
-		return fmt.Errorf("cannot sql.Scan() strfmt.DateTime from: %#v", v)
-	}
-
-	return nil
-}
-
 // MarshalJSON returns the DateTime as JSON
 func (t DateTime) MarshalJSON() ([]byte, error) {
 	return json.Marshal(time.Time(t).Format(MarshalFormat))
diff --git a/vendor/modules.txt b/vendor/modules.txt
index c34af65c2..228873e0b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,4 +1,4 @@
-# cel.dev/expr v0.23.0
+# cel.dev/expr v0.24.0
 ## explicit; go 1.22.0
 cel.dev/expr
 # emperror.dev/errors v0.8.1
@@ -170,7 +170,7 @@ github.com/go-kit/log
 # github.com/go-logfmt/logfmt v0.6.0
 ## explicit; go 1.17
 github.com/go-logfmt/logfmt
-# github.com/go-logr/logr v1.4.2
+# github.com/go-logr/logr v1.4.3
 ## explicit; go 1.18
 github.com/go-logr/logr
 github.com/go-logr/logr/funcr
@@ -197,7 +197,7 @@ github.com/gogo/protobuf/gogoproto
 github.com/gogo/protobuf/proto
 github.com/gogo/protobuf/protoc-gen-gogo/descriptor
 github.com/gogo/protobuf/sortkeys
-# github.com/golang/glog v1.2.4
+# github.com/golang/glog v1.2.5
 ## explicit; go 1.19
 github.com/golang/glog
 github.com/golang/glog/internal/logsink
@@ -237,8 +237,8 @@ github.com/google/cel-go/interpreter
 github.com/google/cel-go/interpreter/functions
 github.com/google/cel-go/parser
 github.com/google/cel-go/parser/gen
-# github.com/google/gnostic-models v0.6.9
-## explicit; go 1.21
+# github.com/google/gnostic-models v0.7.0
+## explicit; go 1.22
 github.com/google/gnostic-models/compiler
 github.com/google/gnostic-models/extensions
 github.com/google/gnostic-models/jsonschema
@@ -524,7 +524,7 @@ github.com/mxk/go-flowrate/flowrate
 # github.com/ncruces/go-strftime v0.1.9
 ## explicit; go 1.17
 github.com/ncruces/go-strftime
-# github.com/onsi/gomega v1.37.0
+# github.com/onsi/gomega v1.38.0
 ## explicit; go 1.23.0
 github.com/onsi/gomega
 github.com/onsi/gomega/format
@@ -537,12 +537,12 @@ github.com/onsi/gomega/matchers/support/goraph/edge
 github.com/onsi/gomega/matchers/support/goraph/node
 github.com/onsi/gomega/matchers/support/goraph/util
 github.com/onsi/gomega/types
-# github.com/openshift/api v0.0.0 => github.com/openshift/api v0.0.0-20250106182855-361e35fd82e5
-## explicit; go 1.22.0
+# github.com/openshift/api v0.0.0 => github.com/openshift/api v0.0.0-20250910195410-e515d9c65abd
+## explicit; go 1.24.0
 github.com/openshift/api/route/v1
 github.com/openshift/api/security/v1
-# github.com/openshift/client-go v0.0.0 => github.com/openshift/client-go v0.0.0-20250106104058-89709a455e2a
-## explicit; go 1.22.0
+# github.com/openshift/client-go v0.0.0 => github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379
+## explicit; go 1.24.0
 github.com/openshift/client-go/route/applyconfigurations/internal
 github.com/openshift/client-go/route/applyconfigurations/route/v1
 github.com/openshift/client-go/route/clientset/versioned/scheme
@@ -598,10 +598,14 @@ github.com/prometheus/common/model
 github.com/prometheus/procfs
 github.com/prometheus/procfs/internal/fs
 github.com/prometheus/procfs/internal/util
-# github.com/rancher/aks-operator v1.12.0
+# github.com/rancher/aks-operator v1.12.1
 ## explicit; go 1.24.0
 github.com/rancher/aks-operator/pkg/apis/aks.cattle.io
 github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1
+# github.com/rancher/ali-operator v0.0.0-20250820165811-6163f9930e10
+## explicit; go 1.24.0
+github.com/rancher/ali-operator/pkg/apis/ali.cattle.io
+github.com/rancher/ali-operator/pkg/apis/ali.cattle.io/v1
 # github.com/rancher/apiserver v0.6.3
 ## explicit; go 1.24.0
 github.com/rancher/apiserver/pkg/apierror
@@ -626,7 +630,7 @@ github.com/rancher/dynamiclistener/server
 github.com/rancher/dynamiclistener/storage/file
 github.com/rancher/dynamiclistener/storage/kubernetes
 github.com/rancher/dynamiclistener/storage/memory
-# github.com/rancher/eks-operator v1.12.0
+# github.com/rancher/eks-operator v1.12.1
 ## explicit; go 1.24.0
 github.com/rancher/eks-operator/pkg/apis/eks.cattle.io
 github.com/rancher/eks-operator/pkg/apis/eks.cattle.io/v1
@@ -635,7 +639,7 @@ github.com/rancher/eks-operator/pkg/apis/eks.cattle.io/v1
 github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1
 github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1/summary
 github.com/rancher/fleet/pkg/apis/internal
-# github.com/rancher/gke-operator v1.12.0
+# github.com/rancher/gke-operator v1.12.1
 ## explicit; go 1.24.0
 github.com/rancher/gke-operator/pkg/apis/gke.cattle.io
 github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1
@@ -643,7 +647,7 @@ github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1
 ## explicit; go 1.14
 github.com/rancher/kubernetes-provider-detector
 github.com/rancher/kubernetes-provider-detector/providers
-# github.com/rancher/lasso v0.2.3 => github.com/rancher/lasso v0.0.0-20241202185148-04649f379358
+# github.com/rancher/lasso v0.2.4 => github.com/rancher/lasso v0.0.0-20241202185148-04649f379358
 ## explicit; go 1.22.0
 github.com/rancher/lasso/pkg/cache
 github.com/rancher/lasso/pkg/client
@@ -681,14 +685,12 @@ github.com/rancher/rancher/pkg/generated/controllers/rke.cattle.io
 github.com/rancher/rancher/pkg/generated/controllers/rke.cattle.io/v1
 github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3
 github.com/rancher/rancher/pkg/project
-# github.com/rancher/rancher/pkg/apis v0.0.0 => github.com/rancher/rancher/pkg/apis v0.0.0-20240919204204-3da2ae0cabd1
-## explicit; go 1.22.0
+# github.com/rancher/rancher/pkg/apis v0.0.0 => github.com/rancher/rancher/pkg/apis v0.0.0-20250910194406-58abf492671b
+## explicit; go 1.24.0
 github.com/rancher/rancher/pkg/apis/catalog.cattle.io
 github.com/rancher/rancher/pkg/apis/catalog.cattle.io/v1
 github.com/rancher/rancher/pkg/apis/management.cattle.io
 github.com/rancher/rancher/pkg/apis/management.cattle.io/v3
-github.com/rancher/rancher/pkg/apis/project.cattle.io
-github.com/rancher/rancher/pkg/apis/project.cattle.io/v3
 github.com/rancher/rancher/pkg/apis/provisioning.cattle.io
 github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1
 github.com/rancher/rancher/pkg/apis/rke.cattle.io
@@ -772,7 +774,7 @@ github.com/rancher/wrangler/pkg/objectset
 github.com/rancher/wrangler/pkg/patch
 github.com/rancher/wrangler/pkg/schemes
 github.com/rancher/wrangler/pkg/stringset
-# github.com/rancher/wrangler/v3 v3.2.2
+# github.com/rancher/wrangler/v3 v3.2.4
 ## explicit; go 1.24.0
 github.com/rancher/wrangler/v3/pkg/apply
 github.com/rancher/wrangler/v3/pkg/apply/injectors
@@ -869,10 +871,11 @@ github.com/spf13/pflag
 # github.com/stoewer/go-strcase v1.3.0
 ## explicit; go 1.11
 github.com/stoewer/go-strcase
-# github.com/tevino/tcp-shaker v0.0.0-20191112104505-00eab0aefc80
-## explicit; go 1.13
+# github.com/tevino/tcp-shaker v0.0.0-20250909043154-0d2151ffed43
+## explicit; go 1.24.0
 github.com/tevino/tcp-shaker
-# github.com/urfave/cli v1.22.16
+github.com/tevino/tcp-shaker/internal
+# github.com/urfave/cli v1.22.17
 ## explicit; go 1.11
 github.com/urfave/cli
 # github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa
@@ -993,7 +996,10 @@ go.uber.org/zap/zapgrpc
 # go.yaml.in/yaml/v2 v2.4.2
 ## explicit; go 1.15
 go.yaml.in/yaml/v2
-# golang.org/x/crypto v0.40.0
+# go.yaml.in/yaml/v3 v3.0.3
+## explicit; go 1.22
+go.yaml.in/yaml/v3
+# golang.org/x/crypto v0.41.0
 ## explicit; go 1.23.0
 golang.org/x/crypto/acme
 golang.org/x/crypto/acme/autocert
@@ -1014,12 +1020,12 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
 golang.org/x/exp/constraints
 golang.org/x/exp/maps
 golang.org/x/exp/slices
-# golang.org/x/mod v0.25.0
+# golang.org/x/mod v0.27.0
 ## explicit; go 1.23.0
 golang.org/x/mod/internal/lazyregexp
 golang.org/x/mod/module
 golang.org/x/mod/semver
-# golang.org/x/net v0.42.0
+# golang.org/x/net v0.43.0
 ## explicit; go 1.23.0
 golang.org/x/net/context
 golang.org/x/net/html
@@ -1045,17 +1051,17 @@ golang.org/x/oauth2/internal
 golang.org/x/sync/errgroup
 golang.org/x/sync/semaphore
 golang.org/x/sync/singleflight
-# golang.org/x/sys v0.34.0
-## explicit; go 1.23.0
+# golang.org/x/sys v0.36.0
+## explicit; go 1.24.0
 golang.org/x/sys/cpu
 golang.org/x/sys/plan9
 golang.org/x/sys/unix
 golang.org/x/sys/windows
 golang.org/x/sys/windows/registry
-# golang.org/x/term v0.33.0
+# golang.org/x/term v0.34.0
 ## explicit; go 1.23.0
 golang.org/x/term
-# golang.org/x/text v0.27.0
+# golang.org/x/text v0.28.0
 ## explicit; go 1.23.0
 golang.org/x/text/cases
 golang.org/x/text/encoding
@@ -1089,7 +1095,7 @@ golang.org/x/text/unicode/norm
 # golang.org/x/time v0.12.0
 ## explicit; go 1.23.0
 golang.org/x/time/rate
-# golang.org/x/tools v0.34.0
+# golang.org/x/tools v0.36.0
 ## explicit; go 1.23.0
 golang.org/x/tools/go/ast/astutil
 golang.org/x/tools/go/gcexportdata
@@ -1116,17 +1122,17 @@ golang.org/x/tools/internal/versions
 # gomodules.xyz/jsonpatch/v2 v2.5.0
 ## explicit; go 1.20
 gomodules.xyz/jsonpatch/v2
-# google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2
+# google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a
 ## explicit; go 1.23.0
 google.golang.org/genproto/googleapis/api
 google.golang.org/genproto/googleapis/api/annotations
 google.golang.org/genproto/googleapis/api/expr/v1alpha1
 google.golang.org/genproto/googleapis/api/httpbody
-# google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822
+# google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0
 ## explicit; go 1.23.0
 google.golang.org/genproto/googleapis/rpc/errdetails
 google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.73.0
+# google.golang.org/grpc v1.74.2
 ## explicit; go 1.23.0
 google.golang.org/grpc
 google.golang.org/grpc/attributes
@@ -1922,9 +1928,10 @@ k8s.io/gengo/generator
 k8s.io/gengo/namer
 k8s.io/gengo/parser
 k8s.io/gengo/types
-# k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 => k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70
-## explicit; go 1.20
+# k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f => k8s.io/gengo/v2 v2.0.0-20250903151518-081d64401ab4
+## explicit; go 1.23
 k8s.io/gengo/v2
+k8s.io/gengo/v2/codetags
 k8s.io/gengo/v2/generator
 k8s.io/gengo/v2/namer
 k8s.io/gengo/v2/parser
@@ -1962,8 +1969,8 @@ k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset
 k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme
 k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1
 k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1
-# k8s.io/kube-openapi v0.31.5 => k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
-## explicit; go 1.20
+# k8s.io/kube-openapi v0.31.5 => k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
+## explicit; go 1.23.0
 k8s.io/kube-openapi/cmd/openapi-gen/args
 k8s.io/kube-openapi/pkg/builder
 k8s.io/kube-openapi/pkg/builder3
@@ -1977,6 +1984,7 @@ k8s.io/kube-openapi/pkg/handler
 k8s.io/kube-openapi/pkg/handler3
 k8s.io/kube-openapi/pkg/internal
 k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json
+k8s.io/kube-openapi/pkg/internal/third_party/govalidator
 k8s.io/kube-openapi/pkg/schemaconv
 k8s.io/kube-openapi/pkg/schemamutation
 k8s.io/kube-openapi/pkg/spec3
@@ -2202,6 +2210,10 @@ sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics
 ## explicit; go 1.23
 sigs.k8s.io/json
 sigs.k8s.io/json/internal/golang/encoding/json
+# sigs.k8s.io/randfill v1.0.0
+## explicit; go 1.18
+sigs.k8s.io/randfill
+sigs.k8s.io/randfill/bytesource
 # sigs.k8s.io/structured-merge-diff/v4 v4.6.0
 ## explicit; go 1.13
 sigs.k8s.io/structured-merge-diff/v4/fieldpath
@@ -2209,15 +2221,18 @@ sigs.k8s.io/structured-merge-diff/v4/merge
 sigs.k8s.io/structured-merge-diff/v4/schema
 sigs.k8s.io/structured-merge-diff/v4/typed
 sigs.k8s.io/structured-merge-diff/v4/value
-# sigs.k8s.io/yaml v1.5.0
+# sigs.k8s.io/structured-merge-diff/v6 v6.2.0
+## explicit; go 1.23
+sigs.k8s.io/structured-merge-diff/v6/schema
+# sigs.k8s.io/yaml v1.6.0
 ## explicit; go 1.22
 sigs.k8s.io/yaml
 sigs.k8s.io/yaml/goyaml.v2
-# github.com/openshift/api => github.com/openshift/api v0.0.0-20250106182855-361e35fd82e5
-# github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20250106104058-89709a455e2a
+# github.com/openshift/api => github.com/openshift/api v0.0.0-20250910195410-e515d9c65abd
+# github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379
 # github.com/rancher/lasso => github.com/rancher/lasso v0.0.0-20241202185148-04649f379358
 # github.com/rancher/rancher => github.com/rancher/rancher v0.0.0-20241119020906-df45e368c82d
-# github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20240919204204-3da2ae0cabd1
+# github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20250910194406-58abf492671b
 # github.com/rancher/steve => github.com/rancher/steve v0.5.6
 # go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0
 # k8s.io/api => k8s.io/api v0.31.5
@@ -2227,8 +2242,8 @@ sigs.k8s.io/yaml/goyaml.v2
 # k8s.io/client-go => k8s.io/client-go v0.31.5
 # k8s.io/code-generator => k8s.io/code-generator v0.31.5
 # k8s.io/component-base => k8s.io/component-base v0.31.5
-# k8s.io/gengo/v2 => k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70
+# k8s.io/gengo/v2 => k8s.io/gengo/v2 v2.0.0-20250903151518-081d64401ab4
 # k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.31.5
-# k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
+# k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
 # kubevirt.io/client-go => kubevirt.io/client-go v1.5.1
 # sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.4
diff --git a/vendor/sigs.k8s.io/randfill/CONTRIBUTING.md b/vendor/sigs.k8s.io/randfill/CONTRIBUTING.md
new file mode 100644
index 000000000..7566c879c
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/CONTRIBUTING.md
@@ -0,0 +1,43 @@
+# Contributing Guidelines
+
+Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt:
+
+_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._
+
+## Getting Started
+
+We have full documentation on how to get started contributing here:
+
+
+
+- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
+- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing)
+- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers
+
+## Mentorship
+
+- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!
+
+
+
+## Project Management
+
+The [maintainers](https://github.com/kubernetes-sigs/randfill/blob/main/OWNERS_ALIASES#L12) of this project (and often others who have official positions on the [contributor ladder](https://github.com/kubernetes-sigs/randfill/blob/main/OWNERS_ALIASES)) are responsible for performing project management which oversees development and maintenance of the API, tests, tools, e.t.c. While we try to be generally flexible when it comes to the management of individual pieces (such as Issues or PRs), we have some rules and guidelines which help us plan, coordinate and reduce waste. In this section you'll find some rules/guidelines for contributors related to project management which may extend or go beyond what you would find in the standard [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide).
+
+### Bumping stale and closed Issues & PRs
+
+Maintainers are ultimately responsible for triaging new issues and PRs, accepting or declining them, deciding priority and fitting them into milestones intended for future releases. Bots are responsible for marking issues and PRs which stagnate as stale, or closing them if progress does not continue for a long period of time. Due to the nature of this community-driven development effort (we do not have dedicated engineering resources, we rely on the community which is effectively "volunteer time") **not all issues can be accepted, prioritized or completed**.
+
+You may find times when an issue you're subscribed to and interested in seems to stagnate, or perhaps gets auto-closed. Prior to bumping or directly re-opening issues yourself, we generally ask that you bring these up for discussion on the agenda for one of our community syncs if possible, or bring them up for discussion in Slack or the mailing list as this gives us a better opportunity to discuss the issue and determine viability and logistics. If feasible we **highly recommend being ready to contribute directly** to any stale or unprioritized effort that you want to see move forward, as **the best way to ensure progress is to engage with the community and personally invest time**.
+
+We (the community) aren't opposed to making exceptions in some cases, but when in doubt please follow the above guidelines before bumping closed or stale issues if you're not ready to personally invest time in them. We are responsible for managing these and without further context or engagement we may set these back to how they were previously organized.
diff --git a/vendor/sigs.k8s.io/randfill/LICENSE b/vendor/sigs.k8s.io/randfill/LICENSE
new file mode 100644
index 000000000..9dd29274c
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/LICENSE
@@ -0,0 +1,202 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2014 The gofuzz Authors
+   Copyright 2025 The Kubernetes Authors
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/vendor/sigs.k8s.io/randfill/NOTICE b/vendor/sigs.k8s.io/randfill/NOTICE
new file mode 100644
index 000000000..6984e71f6
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/NOTICE
@@ -0,0 +1,24 @@
+When donating the randfill project to the CNCF, we could not reach all the
+gofuzz contributors to sign the CNCF CLA. As such, according to the CNCF rules
+to donate a repository, we must add a NOTICE referencing section 7 of the CLA
+with a list of developers who could not be reached.
+
+`7. Should You wish to submit work that is not Your original creation, You may
+submit it to the Foundation separately from any Contribution, identifying the
+complete details of its source and of any license or other restriction
+(including, but not limited to, related patents, trademarks, and license
+agreements) of which you are personally aware, and conspicuously marking the
+work as "Submitted on behalf of a third-party: [named here]".`
+
+Submitted on behalf of a third-party: @dnephin (Daniel Nephin)
+Submitted on behalf of a third-party: @AlekSi (Alexey Palazhchenko)
+Submitted on behalf of a third-party: @bbigras (Bruno Bigras)
+Submitted on behalf of a third-party: @samirkut (Samir)
+Submitted on behalf of a third-party: @posener (Eyal Posener)
+Submitted on behalf of a third-party: @Ashikpaul (Ashik Paul)
+Submitted on behalf of a third-party: @kwongtailau (Kwongtai)
+Submitted on behalf of a third-party: @ericcornelissen (Eric Cornelissen)
+Submitted on behalf of a third-party: @eclipseo (Robert-André Mauchin)
+Submitted on behalf of a third-party: @yanzhoupan (Andrew Pan)
+Submitted on behalf of a third-party: @STRRL (Zhiqiang ZHOU)
+Submitted on behalf of a third-party: @disconnect3d (Disconnect3d)
diff --git a/vendor/sigs.k8s.io/randfill/OWNERS b/vendor/sigs.k8s.io/randfill/OWNERS
new file mode 100644
index 000000000..59f6a50f6
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/OWNERS
@@ -0,0 +1,8 @@
+# See the OWNERS docs at https://go.k8s.io/owners
+# See the OWNERS_ALIASES file at https://github.com/kubernetes-sigs/randfill/blob/main/OWNERS_ALIASES for a list of members for each alias.
+
+approvers:
+  - sig-testing-leads
+  - thockin
+
+reviewers: []
diff --git a/vendor/sigs.k8s.io/randfill/OWNERS_ALIASES b/vendor/sigs.k8s.io/randfill/OWNERS_ALIASES
new file mode 100644
index 000000000..927f1209b
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/OWNERS_ALIASES
@@ -0,0 +1,14 @@
+# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
+# This file should be kept in sync with k/org.
+
+aliases:
+  # Reference: https://github.com/kubernetes/org/blob/main/OWNERS_ALIASES
+  sig-testing-leads:
+    - BenTheElder
+    - alvaroaleman
+    - aojea
+    - cjwagner
+    - jbpratt
+    - michelle192837
+    - pohly
+    - xmcqueen
diff --git a/vendor/sigs.k8s.io/randfill/README.md b/vendor/sigs.k8s.io/randfill/README.md
new file mode 100644
index 000000000..d892fc9f5
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/README.md
@@ -0,0 +1,98 @@
+randfill
+======
+
+randfill is a library for populating go objects with random values.
+
+This is a fork of github.com/google/gofuzz, which was archived.
+
+NOTE: This repo is supported only for use within Kubernetes.  It is not our
+intention to support general use.  That said, if it works for you, that's
+great!  If you have a problem, please feel free to file an issue, but be aware
+that it may not be a priority for us to fix it unless it is affecting
+Kubernetes.  PRs are welcome, within reason.
+
+[![GoDoc](https://godoc.org/sigs.k8s.io/randfill?status.svg)](https://godoc.org/sigs.k8s.io/randfill)
+
+This is useful for testing:
+
+* Do your project's objects really serialize/unserialize correctly in all cases?
+* Is there an incorrectly formatted object that will cause your project to panic?
+
+Import with ```import "sigs.k8s.io/randfill"```
+
+You can use it on single variables:
+```go
+f := randfill.New()
+var myInt int
+f.Fill(&myInt) // myInt gets a random value.
+```
+
+You can use it on maps:
+```go
+f := randfill.New().NilChance(0).NumElements(1, 1)
+var myMap map[ComplexKeyType]string
+f.Fill(&myMap) // myMap will have exactly one element.
+```
+
+Customize the chance of getting a nil pointer:
+```go
+f := randfill.New().NilChance(.5)
+var fancyStruct struct {
+  A, B, C, D *string
+}
+f.Fill(&fancyStruct) // About half the pointers should be set.
+```
+
+You can even customize the randomization completely if needed:
+```go
+type MyEnum string
+const (
+        A MyEnum = "A"
+        B MyEnum = "B"
+)
+type MyInfo struct {
+        Type MyEnum
+        AInfo *string
+        BInfo *string
+}
+
+f := randfill.New().NilChance(0).Funcs(
+        func(e *MyInfo, c randfill.Continue) {
+                switch c.Intn(2) {
+                case 0:
+                        e.Type = A
+                        c.Fill(&e.AInfo)
+                case 1:
+                        e.Type = B
+                        c.Fill(&e.BInfo)
+                }
+        },
+)
+
+var myObject MyInfo
+f.Fill(&myObject) // Type will correspond to whether A or B info is set.
+```
+
+See more examples in ```example_test.go```.
+
+## dvyukov/go-fuzz integration
+
+You can use this library for easier [go-fuzz](https://github.com/dvyukov/go-fuzz)ing.
+go-fuzz provides the user a byte-slice, which should be converted to different inputs
+for the tested function. This library can help convert the byte slice. Consider for
+example a fuzz test for a the function `mypackage.MyFunc` that takes an int arguments:
+```go
+// +build gofuzz
+package mypackage
+
+import "sigs.k8s.io/randfill"
+
+func Fuzz(data []byte) int {
+        var i int
+        randfill.NewFromGoFuzz(data).Fill(&i)
+        MyFunc(i)
+        return 0
+}
+```
+
+Happy testing!
diff --git a/vendor/sigs.k8s.io/randfill/SECURITY_CONTACTS b/vendor/sigs.k8s.io/randfill/SECURITY_CONTACTS
new file mode 100644
index 000000000..91d785337
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/SECURITY_CONTACTS
@@ -0,0 +1,16 @@
+# Defined below are the security contacts for this repo.
+#
+# They are the contact point for the Product Security Committee to reach out
+# to for triaging and handling of incoming issues.
+#
+# The below names agree to abide by the
+# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy)
+# and will be removed and replaced if they violate that agreement.
+#
+# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
+# INSTRUCTIONS AT https://kubernetes.io/security/
+
+thockin
+BenTheElder
+aojea
+pohly
diff --git a/vendor/sigs.k8s.io/randfill/bytesource/bytesource.go b/vendor/sigs.k8s.io/randfill/bytesource/bytesource.go
new file mode 100644
index 000000000..5bb365949
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/bytesource/bytesource.go
@@ -0,0 +1,81 @@
+/*
+Copyright 2014 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package bytesource provides a rand.Source64 that is determined by a slice of bytes.
+package bytesource
+
+import (
+	"bytes"
+	"encoding/binary"
+	"io"
+	"math/rand"
+)
+
+// ByteSource implements rand.Source64 determined by a slice of bytes. The random numbers are
+// generated from each 8 bytes in the slice, until the last bytes are consumed, from which a
+// fallback pseudo random source is created in case more random numbers are required.
+// It also exposes a `bytes.Reader` API, which lets callers consume the bytes directly.
+type ByteSource struct {
+	*bytes.Reader
+	fallback rand.Source
+}
+
+// New returns a new ByteSource from a given slice of bytes.
+func New(input []byte) *ByteSource {
+	s := &ByteSource{
+		Reader:   bytes.NewReader(input),
+		fallback: rand.NewSource(0),
+	}
+	if len(input) > 0 {
+		s.fallback = rand.NewSource(int64(s.consumeUint64()))
+	}
+	return s
+}
+
+func (s *ByteSource) Uint64() uint64 {
+	// Return from input if it was not exhausted.
+	if s.Len() > 0 {
+		return s.consumeUint64()
+	}
+
+	// Input was exhausted, return random number from fallback (in this case fallback should not be
+	// nil). Try first having a Uint64 output (Should work in current rand implementation),
+	// otherwise return a conversion of Int63.
+	if s64, ok := s.fallback.(rand.Source64); ok {
+		return s64.Uint64()
+	}
+	return uint64(s.fallback.Int63())
+}
+
+func (s *ByteSource) Int63() int64 {
+	return int64(s.Uint64() >> 1)
+}
+
+func (s *ByteSource) Seed(seed int64) {
+	s.fallback = rand.NewSource(seed)
+	s.Reader = bytes.NewReader(nil)
+}
+
+// consumeUint64 reads 8 bytes from the input and convert them to a uint64. It assumes that the the
+// bytes reader is not empty.
+func (s *ByteSource) consumeUint64() uint64 {
+	var bytes [8]byte
+	_, err := s.Read(bytes[:])
+	if err != nil && err != io.EOF {
+		panic("failed reading source") // Should not happen.
+	}
+	return binary.BigEndian.Uint64(bytes[:])
+}
diff --git a/vendor/sigs.k8s.io/randfill/code-of-conduct.md b/vendor/sigs.k8s.io/randfill/code-of-conduct.md
new file mode 100644
index 000000000..0d15c00cf
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/code-of-conduct.md
@@ -0,0 +1,3 @@
+# Kubernetes Community Code of Conduct
+
+Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md)
diff --git a/vendor/sigs.k8s.io/randfill/randfill.go b/vendor/sigs.k8s.io/randfill/randfill.go
new file mode 100644
index 000000000..b73482484
--- /dev/null
+++ b/vendor/sigs.k8s.io/randfill/randfill.go
@@ -0,0 +1,682 @@
+/*
+Copyright 2014 Google Inc. All rights reserved.
+Copyright 2014 The gofuzz Authors.
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package randfill is a library for populating go objects with random values.
+package randfill
+
+import (
+	"fmt"
+	"math/rand"
+	"reflect"
+	"regexp"
+	"sync"
+	"time"
+	"unsafe"
+
+	"strings"
+
+	"sigs.k8s.io/randfill/bytesource"
+)
+
+// funcMap is a map from a type to a function that randfills that type.  The
+// function is a reflect.Value because the type being filled is different for
+// each func.
+type funcMap map[reflect.Type]reflect.Value
+
+// Filler knows how to fill any object with random fields.
+type Filler struct {
+	customFuncs           funcMap
+	defaultFuncs          funcMap
+	r                     *rand.Rand
+	nilChance             float64
+	minElements           int
+	maxElements           int
+	maxDepth              int
+	allowUnexportedFields bool
+	skipFieldPatterns     []*regexp.Regexp
+
+	lock sync.Mutex
+}
+
+// New returns a new Filler. Customize your Filler further by calling Funcs,
+// RandSource, NilChance, or NumElements in any order.
+func New() *Filler {
+	return NewWithSeed(time.Now().UnixNano())
+}
+
+func NewWithSeed(seed int64) *Filler {
+	f := &Filler{
+		defaultFuncs: funcMap{
+			reflect.TypeOf(&time.Time{}): reflect.ValueOf(randfillTime),
+		},
+
+		customFuncs:           funcMap{},
+		r:                     rand.New(rand.NewSource(seed)),
+		nilChance:             .2,
+		minElements:           1,
+		maxElements:           10,
+		maxDepth:              100,
+		allowUnexportedFields: false,
+	}
+	return f
+}
+
+// NewFromGoFuzz is a helper function that enables using randfill (this
+// project) with go-fuzz (https://github.com/dvyukov/go-fuzz) for continuous
+// fuzzing. Essentially, it enables translating the fuzzing bytes from
+// go-fuzz to any Go object using this library.
+//
+// This implementation promises a constant translation from a given slice of
+// bytes to the fuzzed objects. This promise will remain over future
+// versions of Go and of this library.
+//
+// Note: the returned Filler should not be shared between multiple goroutines,
+// as its deterministic output will no longer be available.
+//
+// Example: use go-fuzz to test the function `MyFunc(int)` in the package
+// `mypackage`. Add the file: "mypackage_fuzz.go" with the content:
+//
+// // +build gofuzz
+// package mypackage
+// import "sigs.k8s.io/randfill"
+//
+//	func Fuzz(data []byte) int {
+//		var i int
+//		randfill.NewFromGoFuzz(data).Fill(&i)
+//		MyFunc(i)
+//		return 0
+//	}
+func NewFromGoFuzz(data []byte) *Filler {
+	return New().RandSource(bytesource.New(data))
+}
+
+// Funcs registers custom fill functions for this Filler.
+//
+// Each entry in customFuncs must be a function taking two parameters.
+// The first parameter must be a pointer or map. It is the variable that
+// function will fill with random data. The second parameter must be a
+// randfill.Continue, which will provide a source of randomness and a way
+// to automatically continue filling smaller pieces of the first parameter.
+//
+// These functions are called sensibly, e.g., if you wanted custom string
+// filling, the function `func(s *string, c randfill.Continue)` would get
+// called and passed the address of strings. Maps and pointers will always
+// be made/new'd for you, ignoring the NilChance option. For slices, it
+// doesn't make much sense to pre-create them--Filler doesn't know how
+// long you want your slice--so take a pointer to a slice, and make it
+// yourself. (If you don't want your map/pointer type pre-made, take a
+// pointer to it, and make it yourself.) See the examples for a range of
+// custom functions.
+//
+// If a function is already registered for a type, and a new function is
+// provided, the previous function will be replaced with the new one.
+func (f *Filler) Funcs(customFuncs ...interface{}) *Filler {
+	for i := range customFuncs {
+		v := reflect.ValueOf(customFuncs[i])
+		if v.Kind() != reflect.Func {
+			panic("Filler.Funcs: all arguments must be functions")
+		}
+		t := v.Type()
+		if t.NumIn() != 2 || t.NumOut() != 0 {
+			panic("Filler.Funcs: all customFuncs must have 2 arguments and 0 returns")
+		}
+		argT := t.In(0)
+		switch argT.Kind() {
+		case reflect.Ptr, reflect.Map:
+		default:
+			panic("Filler.Funcs: customFuncs' first argument must be a pointer or map type")
+		}
+		if t.In(1) != reflect.TypeOf(Continue{}) {
+			panic("Filler.Funcs: customFuncs' second argument must be a randfill.Continue")
+		}
+		f.customFuncs[argT] = v
+	}
+	return f
+}
+
+// RandSource causes this Filler to get values from the given source of
+// randomness. Use this if you want deterministic filling.
+func (f *Filler) RandSource(s rand.Source) *Filler {
+	f.r = rand.New(s)
+	return f
+}
+
+// NilChance sets the probability of creating a nil pointer, map, or slice to
+// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive.
+func (f *Filler) NilChance(p float64) *Filler {
+	if p < 0 || p > 1 {
+		panic("Filler.NilChance: p must be between 0 and 1, inclusive")
+	}
+	f.nilChance = p
+	return f
+}
+
+// NumElements sets the minimum and maximum number of elements that will be
+// added to a non-nil map or slice.
+func (f *Filler) NumElements(min, max int) *Filler {
+	if min < 0 {
+		panic("Filler.NumElements: min must be >= 0")
+	}
+	if min > max {
+		panic("Filler.NumElements: min must be <= max")
+	}
+	f.minElements = min
+	f.maxElements = max
+	return f
+}
+
+func (f *Filler) genElementCount() int {
+	if f.minElements == f.maxElements {
+		return f.minElements
+	}
+	return f.minElements + f.r.Intn(f.maxElements-f.minElements+1)
+}
+
+func (f *Filler) genShouldFill() bool {
+	return f.r.Float64() >= f.nilChance
+}
+
+// MaxDepth sets the maximum number of recursive fill calls that will be made
+// before stopping.  This includes struct members, pointers, and map and slice
+// elements.
+func (f *Filler) MaxDepth(d int) *Filler {
+	f.maxDepth = d
+	return f
+}
+
+// AllowUnexportedFields defines whether to fill unexported fields.
+func (f *Filler) AllowUnexportedFields(flag bool) *Filler {
+	f.allowUnexportedFields = flag
+	return f
+}
+
+// SkipFieldsWithPattern tells this Filler to skip any field whose name matches
+// the supplied pattern. Call this multiple times if needed. This is useful to
+// skip XXX_ fields generated by protobuf.
+func (f *Filler) SkipFieldsWithPattern(pattern *regexp.Regexp) *Filler {
+	f.skipFieldPatterns = append(f.skipFieldPatterns, pattern)
+	return f
+}
+
+// SimpleSelfFiller represents an object that knows how to randfill itself.
+//
+// Unlike NativeSelfFiller, this interface does not cause the type in question
+// to depend on the randfill package.  This is most useful for simple types.  For
+// more complex types, consider using NativeSelfFiller.
+type SimpleSelfFiller interface {
+	// RandFill fills the current object with random data.
+	RandFill(r *rand.Rand)
+}
+
+// NativeSelfFiller represents an object that knows how to randfill itself.
+//
+// Unlike SimpleSelfFiller, this interface allows for recursive filling of
+// child objects with the same rules as the parent Filler.
+type NativeSelfFiller interface {
+	// RandFill fills the current object with random data.
+	RandFill(c Continue)
+}
+
+// Fill recursively fills all of obj's fields with something random.  First
+// this tries to find a custom fill function (see Funcs).  If there is no
+// custom function, this tests whether the object implements SimpleSelfFiller
+// or NativeSelfFiller and if so, calls RandFill on it to fill itself.  If that
+// fails, this will see if there is a default fill function provided by this
+// package. If all of that fails, this will generate random values for all
+// primitive fields and then recurse for all non-primitives.
+//
+// This is safe for cyclic or tree-like structs, up to a limit.  Use the
+// MaxDepth method to adjust how deep you need it to recurse.
+//
+// obj must be a pointer. Exported (public) fields can always be set, and if
+// the AllowUnexportedFields() modifier was called it can try to set unexported
+// (private) fields, too.
+//
+// This is intended for tests, so will panic on bad input or unimplemented
+// types.  This method takes a lock for the whole Filler, so it is not
+// reentrant.  See Continue.
+func (f *Filler) Fill(obj interface{}) {
+	f.lock.Lock()
+	defer f.lock.Unlock()
+
+	v := reflect.ValueOf(obj)
+	if v.Kind() != reflect.Ptr {
+		panic("Filler.Fill: obj must be a pointer")
+	}
+	v = v.Elem()
+	f.fillWithContext(v, 0)
+}
+
+// FillNoCustom is just like Fill, except that any custom fill function for
+// obj's type will not be called and obj will not be tested for
+// SimpleSelfFiller or NativeSelfFiller. This applies only to obj and not other
+// instances of obj's type or to obj's child fields.
+//
+// obj must be a pointer. Exported (public) fields can always be set, and if
+// the AllowUnexportedFields() modifier was called it can try to set unexported
+// (private) fields, too.
+//
+// This is intended for tests, so will panic on bad input or unimplemented
+// types.  This method takes a lock for the whole Filler, so it is not
+// reentrant.  See Continue.
+func (f *Filler) FillNoCustom(obj interface{}) {
+	f.lock.Lock()
+	defer f.lock.Unlock()
+
+	v := reflect.ValueOf(obj)
+	if v.Kind() != reflect.Ptr {
+		panic("Filler.FillNoCustom: obj must be a pointer")
+	}
+	v = v.Elem()
+	f.fillWithContext(v, flagNoCustomFill)
+}
+
+const (
+	// Do not try to find a custom fill function.  Does not apply recursively.
+	flagNoCustomFill uint64 = 1 << iota
+)
+
+func (f *Filler) fillWithContext(v reflect.Value, flags uint64) {
+	fc := &fillerContext{filler: f}
+	fc.doFill(v, flags)
+}
+
+// fillerContext carries context about a single filling run, which lets Filler
+// be thread-safe.
+type fillerContext struct {
+	filler   *Filler
+	curDepth int
+}
+
+func (fc *fillerContext) doFill(v reflect.Value, flags uint64) {
+	if fc.curDepth >= fc.filler.maxDepth {
+		return
+	}
+	fc.curDepth++
+	defer func() { fc.curDepth-- }()
+
+	if !v.CanSet() {
+		if !fc.filler.allowUnexportedFields || !v.CanAddr() {
+			return
+		}
+		v = reflect.NewAt(v.Type(), unsafe.Pointer(v.UnsafeAddr())).Elem()
+	}
+
+	if flags&flagNoCustomFill == 0 {
+		// Check for both pointer and non-pointer custom functions.
+		if v.CanAddr() && fc.tryCustom(v.Addr()) {
+			return
+		}
+		if fc.tryCustom(v) {
+			return
+		}
+	}
+
+	if fn, ok := fillFuncMap[v.Kind()]; ok {
+		fn(v, fc.filler.r)
+		return
+	}
+
+	switch v.Kind() {
+	case reflect.Map:
+		if fc.filler.genShouldFill() {
+			v.Set(reflect.MakeMap(v.Type()))
+			n := fc.filler.genElementCount()
+			for i := 0; i < n; i++ {
+				key := reflect.New(v.Type().Key()).Elem()
+				fc.doFill(key, 0)
+				val := reflect.New(v.Type().Elem()).Elem()
+				fc.doFill(val, 0)
+				v.SetMapIndex(key, val)
+			}
+			return
+		}
+		v.Set(reflect.Zero(v.Type()))
+	case reflect.Ptr:
+		if fc.filler.genShouldFill() {
+			v.Set(reflect.New(v.Type().Elem()))
+			fc.doFill(v.Elem(), 0)
+			return
+		}
+		v.Set(reflect.Zero(v.Type()))
+	case reflect.Slice:
+		if fc.filler.genShouldFill() {
+			n := fc.filler.genElementCount()
+			v.Set(reflect.MakeSlice(v.Type(), n, n))
+			for i := 0; i < n; i++ {
+				fc.doFill(v.Index(i), 0)
+			}
+			return
+		}
+		v.Set(reflect.Zero(v.Type()))
+	case reflect.Array:
+		if fc.filler.genShouldFill() {
+			n := v.Len()
+			for i := 0; i < n; i++ {
+				fc.doFill(v.Index(i), 0)
+			}
+			return
+		}
+		v.Set(reflect.Zero(v.Type()))
+	case reflect.Struct:
+		for i := 0; i < v.NumField(); i++ {
+			skipField := false
+			fieldName := v.Type().Field(i).Name
+			for _, pattern := range fc.filler.skipFieldPatterns {
+				if pattern.MatchString(fieldName) {
+					skipField = true
+					break
+				}
+			}
+			if !skipField {
+				fc.doFill(v.Field(i), 0)
+			}
+		}
+	case reflect.Chan:
+		fallthrough
+	case reflect.Func:
+		fallthrough
+	case reflect.Interface:
+		fallthrough
+	default:
+		panic(fmt.Sprintf("can't fill type %v, kind %v", v.Type(), v.Kind()))
+	}
+}
+
+// tryCustom searches for custom handlers, and returns true iff it finds a match
+// and successfully randomizes v.
+func (fc *fillerContext) tryCustom(v reflect.Value) bool {
+	// First: see if we have a fill function for it.
+	doCustom, ok := fc.filler.customFuncs[v.Type()]
+	if !ok {
+		// Second: see if it can fill itself.
+		if v.CanInterface() {
+			intf := v.Interface()
+			if fillable, ok := intf.(SimpleSelfFiller); ok {
+				fillable.RandFill(fc.filler.r)
+				return true
+			}
+			if fillable, ok := intf.(NativeSelfFiller); ok {
+				fillable.RandFill(Continue{fc: fc, Rand: fc.filler.r})
+				return true
+			}
+		}
+		// Finally: see if there is a default fill function.
+		doCustom, ok = fc.filler.defaultFuncs[v.Type()]
+		if !ok {
+			return false
+		}
+	}
+
+	switch v.Kind() {
+	case reflect.Ptr:
+		if v.IsNil() {
+			if !v.CanSet() {
+				return false
+			}
+			v.Set(reflect.New(v.Type().Elem()))
+		}
+	case reflect.Map:
+		if v.IsNil() {
+			if !v.CanSet() {
+				return false
+			}
+			v.Set(reflect.MakeMap(v.Type()))
+		}
+	default:
+		return false
+	}
+
+	doCustom.Call([]reflect.Value{
+		v,
+		reflect.ValueOf(Continue{
+			fc:   fc,
+			Rand: fc.filler.r,
+		}),
+	})
+	return true
+}
+
+// Continue can be passed to custom fill functions to allow them to use
+// the correct source of randomness and to continue filling their members.
+type Continue struct {
+	fc *fillerContext
+
+	// For convenience, Continue implements rand.Rand via embedding.
+	// Use this for generating any randomness if you want your filling
+	// to be repeatable for a given seed.
+	*rand.Rand
+}
+
+// Fill continues filling obj. obj must be a pointer or a reflect.Value of a
+// pointer.  See Filler.Fill.
+func (c Continue) Fill(obj interface{}) {
+	v, ok := obj.(reflect.Value)
+	if !ok {
+		v = reflect.ValueOf(obj)
+	}
+	if v.Kind() != reflect.Ptr {
+		panic("Continue.Fill: obj must be a pointer")
+	}
+	v = v.Elem()
+	c.fc.doFill(v, 0)
+}
+
+// FillNoCustom continues filling obj, except that any custom fill function for
+// obj's type will not be called and obj will not be tested for
+// SimpleSelfFiller or NativeSelfFiller.  See Filler.FillNoCustom.
+func (c Continue) FillNoCustom(obj interface{}) {
+	v, ok := obj.(reflect.Value)
+	if !ok {
+		v = reflect.ValueOf(obj)
+	}
+	if v.Kind() != reflect.Ptr {
+		panic("Continue.FillNoCustom: obj must be a pointer")
+	}
+	v = v.Elem()
+	c.fc.doFill(v, flagNoCustomFill)
+}
+
+const defaultStringMaxLen = 20
+
+// String makes a random string up to n characters long. If n is 0, the default
+// size range is [0-20). The returned string may include a variety of (valid)
+// UTF-8 encodings.
+func (c Continue) String(n int) string {
+	return randString(c.Rand, n)
+}
+
+// Uint64 makes random 64 bit numbers.
+// Weirdly, rand doesn't have a function that gives you 64 random bits.
+func (c Continue) Uint64() uint64 {
+	return randUint64(c.Rand)
+}
+
+// Bool returns true or false randomly.
+func (c Continue) Bool() bool {
+	return randBool(c.Rand)
+}
+
+func fillInt(v reflect.Value, r *rand.Rand) {
+	v.SetInt(int64(randUint64(r)))
+}
+
+func fillUint(v reflect.Value, r *rand.Rand) {
+	v.SetUint(randUint64(r))
+}
+
+func randfillTime(t *time.Time, c Continue) {
+	var sec, nsec int64
+	// Allow for about 1000 years of random time values, which keeps things
+	// like JSON parsing reasonably happy.
+	sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60)
+	// Nanosecond values greater than 1Bn are technically allowed but result in
+	// time.Time values with invalid timezone offsets.
+	nsec = c.Rand.Int63n(999999999)
+	*t = time.Unix(sec, nsec)
+}
+
+var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){
+	reflect.Bool: func(v reflect.Value, r *rand.Rand) {
+		v.SetBool(randBool(r))
+	},
+	reflect.Int:     fillInt,
+	reflect.Int8:    fillInt,
+	reflect.Int16:   fillInt,
+	reflect.Int32:   fillInt,
+	reflect.Int64:   fillInt,
+	reflect.Uint:    fillUint,
+	reflect.Uint8:   fillUint,
+	reflect.Uint16:  fillUint,
+	reflect.Uint32:  fillUint,
+	reflect.Uint64:  fillUint,
+	reflect.Uintptr: fillUint,
+	reflect.Float32: func(v reflect.Value, r *rand.Rand) {
+		v.SetFloat(float64(r.Float32()))
+	},
+	reflect.Float64: func(v reflect.Value, r *rand.Rand) {
+		v.SetFloat(r.Float64())
+	},
+	reflect.Complex64: func(v reflect.Value, r *rand.Rand) {
+		v.SetComplex(complex128(complex(r.Float32(), r.Float32())))
+	},
+	reflect.Complex128: func(v reflect.Value, r *rand.Rand) {
+		v.SetComplex(complex(r.Float64(), r.Float64()))
+	},
+	reflect.String: func(v reflect.Value, r *rand.Rand) {
+		v.SetString(randString(r, 0))
+	},
+	reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) {
+		panic("filling of UnsafePointers is not implemented")
+	},
+}
+
+// randBool returns true or false randomly.
+func randBool(r *rand.Rand) bool {
+	return r.Int31()&(1<<30) == 0
+}
+
+type int63nPicker interface {
+	Int63n(int64) int64
+}
+
+// UnicodeRange describes a sequential range of unicode characters.
+// Last must be numerically greater than First.
+type UnicodeRange struct {
+	First, Last rune
+}
+
+// UnicodeRanges describes an arbitrary number of sequential ranges of unicode characters.
+// To be useful, each range must have at least one character (First <= Last) and
+// there must be at least one range.
+type UnicodeRanges []UnicodeRange
+
+// choose returns a random unicode character from the given range, using the
+// given randomness source.
+func (ur UnicodeRange) choose(r int63nPicker) rune {
+	count := int64(ur.Last - ur.First + 1)
+	return ur.First + rune(r.Int63n(count))
+}
+
+// CustomStringFillFunc constructs a FillFunc which produces random strings.
+// Each character is selected from the range ur. If there are no characters
+// in the range (cr.Last < cr.First), this will panic.
+func (ur UnicodeRange) CustomStringFillFunc(n int) func(s *string, c Continue) {
+	ur.check()
+	return func(s *string, c Continue) {
+		*s = ur.randString(c.Rand, n)
+	}
+}
+
+// check is a function that used to check whether the first of ur(UnicodeRange)
+// is greater than the last one.
+func (ur UnicodeRange) check() {
+	if ur.Last < ur.First {
+		panic("UnicodeRange.check: the last encoding must be greater than the first")
+	}
+}
+
+// randString of UnicodeRange makes a random string up to 20 characters long.
+// Each character is selected form ur(UnicodeRange).
+func (ur UnicodeRange) randString(r *rand.Rand, max int) string {
+	if max == 0 {
+		max = defaultStringMaxLen
+	}
+	n := r.Intn(max)
+	sb := strings.Builder{}
+	sb.Grow(n)
+	for i := 0; i < n; i++ {
+		sb.WriteRune(ur.choose(r))
+	}
+	return sb.String()
+}
+
+// defaultUnicodeRanges sets a default unicode range when users do not set
+// CustomStringFillFunc() but want to fill strings.
+var defaultUnicodeRanges = UnicodeRanges{
+	{' ', '~'},           // ASCII characters
+	{'\u00a0', '\u02af'}, // Multi-byte encoded characters
+	{'\u4e00', '\u9fff'}, // Common CJK (even longer encodings)
+}
+
+// CustomStringFillFunc constructs a FillFunc which produces random strings.
+// Each character is selected from one of the ranges of ur(UnicodeRanges).
+// Each range has an equal probability of being chosen. If there are no ranges,
+// or a selected range has no characters (.Last < .First), this will panic.
+// Do not modify any of the ranges in ur after calling this function.
+func (ur UnicodeRanges) CustomStringFillFunc(n int) func(s *string, c Continue) {
+	// Check unicode ranges slice is empty.
+	if len(ur) == 0 {
+		panic("UnicodeRanges is empty")
+	}
+	// if not empty, each range should be checked.
+	for i := range ur {
+		ur[i].check()
+	}
+	return func(s *string, c Continue) {
+		*s = ur.randString(c.Rand, n)
+	}
+}
+
+// randString of UnicodeRanges makes a random string up to 20 characters long.
+// Each character is selected form one of the ranges of ur(UnicodeRanges),
+// and each range has an equal probability of being chosen.
+func (ur UnicodeRanges) randString(r *rand.Rand, max int) string {
+	if max == 0 {
+		max = defaultStringMaxLen
+	}
+	n := r.Intn(max)
+	sb := strings.Builder{}
+	sb.Grow(n)
+	for i := 0; i < n; i++ {
+		sb.WriteRune(ur[r.Intn(len(ur))].choose(r))
+	}
+	return sb.String()
+}
+
+// randString makes a random string up to 20 characters long. The returned string
+// may include a variety of (valid) UTF-8 encodings.
+func randString(r *rand.Rand, max int) string {
+	return defaultUnicodeRanges.randString(r, max)
+}
+
+// randUint64 makes random 64 bit numbers.
+// Weirdly, rand doesn't have a function that gives you 64 random bits.
+func randUint64(r *rand.Rand) uint64 {
+	return uint64(r.Uint32())<<32 | uint64(r.Uint32())
+}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/LICENSE b/vendor/sigs.k8s.io/structured-merge-diff/v6/LICENSE
new file mode 100644
index 000000000..8dada3eda
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/doc.go
new file mode 100644
index 000000000..9081ccbc7
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/doc.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2018 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package schema defines a targeted schema language which allows one to
+// represent all the schema information necessary to perform "structured"
+// merges and diffs.
+//
+// Due to the targeted nature of the data model, the schema language can fit in
+// just a few hundred lines of go code, making it much more understandable and
+// concise than e.g. OpenAPI.
+//
+// This schema was derived by observing the API objects used by Kubernetes, and
+// formalizing a model which allows certain operations ("apply") to be more
+// well defined. It is currently missing one feature: one-of ("unions").
+package schema
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go
new file mode 100644
index 000000000..5d3707a5b
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go
@@ -0,0 +1,375 @@
+/*
+Copyright 2018 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package schema
+
+import (
+	"sync"
+)
+
+// Schema is a list of named types.
+//
+// Schema types are indexed in a map before the first search so this type
+// should be considered immutable.
+type Schema struct {
+	Types []TypeDef `yaml:"types,omitempty"`
+
+	once sync.Once
+	m    map[string]TypeDef
+
+	lock sync.Mutex
+	// Cached results of resolving type references to atoms. Only stores
+	// type references which require fields of Atom to be overriden.
+	resolvedTypes map[TypeRef]Atom
+}
+
+// A TypeSpecifier references a particular type in a schema.
+type TypeSpecifier struct {
+	Type   TypeRef `yaml:"type,omitempty"`
+	Schema Schema  `yaml:"schema,omitempty"`
+}
+
+// TypeDef represents a named type in a schema.
+type TypeDef struct {
+	// Top level types should be named. Every type must have a unique name.
+	Name string `yaml:"name,omitempty"`
+
+	Atom `yaml:"atom,omitempty,inline"`
+}
+
+// TypeRef either refers to a named type or declares an inlined type.
+type TypeRef struct {
+	// Either the name or one member of Atom should be set.
+	NamedType *string `yaml:"namedType,omitempty"`
+	Inlined   Atom    `yaml:",inline,omitempty"`
+
+	// If this reference refers to a map-type or list-type, this field overrides
+	// the `ElementRelationship` of the referred type when resolved.
+	// If this field is nil, then it has no effect.
+	// See `Map` and `List` for more information about `ElementRelationship`
+	ElementRelationship *ElementRelationship `yaml:"elementRelationship,omitempty"`
+}
+
+// Atom represents the smallest possible pieces of the type system.
+// Each set field in the Atom represents a possible type for the object.
+// If none of the fields are set, any object will fail validation against the atom.
+type Atom struct {
+	*Scalar `yaml:"scalar,omitempty"`
+	*List   `yaml:"list,omitempty"`
+	*Map    `yaml:"map,omitempty"`
+}
+
+// Scalar (AKA "primitive") represents a type which has a single value which is
+// either numeric, string, or boolean, or untyped for any of them.
+//
+// TODO: split numeric into float/int? Something even more fine-grained?
+type Scalar string
+
+const (
+	Numeric = Scalar("numeric")
+	String  = Scalar("string")
+	Boolean = Scalar("boolean")
+	Untyped = Scalar("untyped")
+)
+
+// ElementRelationship is an enum of the different possible relationships
+// between the elements of container types (maps, lists).
+type ElementRelationship string
+
+const (
+	// Associative only applies to lists (see the documentation there).
+	Associative = ElementRelationship("associative")
+	// Atomic makes container types (lists, maps) behave
+	// as scalars / leaf fields
+	Atomic = ElementRelationship("atomic")
+	// Separable means the items of the container type have no particular
+	// relationship (default behavior for maps).
+	Separable = ElementRelationship("separable")
+)
+
+// Map is a key-value pair. Its default semantics are the same as an
+// associative list, but:
+//   - It is serialized differently:
+//     map:  {"k": {"value": "v"}}
+//     list: [{"key": "k", "value": "v"}]
+//   - Keys must be string typed.
+//   - Keys can't have multiple components.
+//
+// Optionally, maps may be atomic (for example, imagine representing an RGB
+// color value--it doesn't make sense to have different actors own the R and G
+// values).
+//
+// Maps may also represent a type which is composed of a number of different fields.
+// Each field has a name and a type.
+//
+// Fields are indexed in a map before the first search so this type
+// should be considered immutable.
+type Map struct {
+	// Each struct field appears exactly once in this list. The order in
+	// this list defines the canonical field ordering.
+	Fields []StructField `yaml:"fields,omitempty"`
+
+	// A Union is a grouping of fields with special rules. It may refer to
+	// one or more fields in the above list. A given field from the above
+	// list may be referenced in exactly 0 or 1 places in the below list.
+	// One can have multiple unions in the same struct, but the fields can't
+	// overlap between unions.
+	Unions []Union `yaml:"unions,omitempty"`
+
+	// ElementType is the type of the structs's unknown fields.
+	ElementType TypeRef `yaml:"elementType,omitempty"`
+
+	// ElementRelationship states the relationship between the map's items.
+	// * `separable` (or unset) implies that each element is 100% independent.
+	// * `atomic` implies that all elements depend on each other, and this
+	//   is effectively a scalar / leaf field; it doesn't make sense for
+	//   separate actors to set the elements. Example: an RGB color struct;
+	//   it would never make sense to "own" only one component of the
+	//   color.
+	// The default behavior for maps is `separable`; it's permitted to
+	// leave this unset to get the default behavior.
+	ElementRelationship ElementRelationship `yaml:"elementRelationship,omitempty"`
+
+	once sync.Once
+	m    map[string]StructField
+}
+
+// FindField is a convenience function that returns the referenced StructField,
+// if it exists, or (nil, false) if it doesn't.
+func (m *Map) FindField(name string) (StructField, bool) {
+	m.once.Do(func() {
+		m.m = make(map[string]StructField, len(m.Fields))
+		for _, field := range m.Fields {
+			m.m[field.Name] = field
+		}
+	})
+	sf, ok := m.m[name]
+	return sf, ok
+}
+
+// CopyInto this instance of Map into the other
+// If other is nil this method does nothing.
+// If other is already initialized, overwrites it with this instance
+// Warning: Not thread safe
+func (m *Map) CopyInto(dst *Map) {
+	if dst == nil {
+		return
+	}
+
+	// Map type is considered immutable so sharing references
+	dst.Fields = m.Fields
+	dst.ElementType = m.ElementType
+	dst.Unions = m.Unions
+	dst.ElementRelationship = m.ElementRelationship
+
+	if m.m != nil {
+		// If cache is non-nil then the once token had been consumed.
+		// Must reset token and use it again to ensure same semantics.
+		dst.once = sync.Once{}
+		dst.once.Do(func() {
+			dst.m = m.m
+		})
+	}
+}
+
+// UnionFields are mapping between the fields that are part of the union and
+// their discriminated value. The discriminated value has to be set, and
+// should not conflict with other discriminated value in the list.
+type UnionField struct {
+	// FieldName is the name of the field that is part of the union. This
+	// is the serialized form of the field.
+	FieldName string `yaml:"fieldName"`
+	// Discriminatorvalue is the value of the discriminator to
+	// select that field. If the union doesn't have a discriminator,
+	// this field is ignored.
+	DiscriminatorValue string `yaml:"discriminatorValue"`
+}
+
+// Union, or oneof, means that only one of multiple fields of a structure can be
+// set at a time. Setting the discriminator helps clearing oher fields:
+// - If discriminator changed to non-nil, and a new field has been added
+// that doesn't match, an error is returned,
+// - If discriminator hasn't changed and two fields or more are set, an
+// error is returned,
+// - If discriminator changed to non-nil, all other fields but the
+// discriminated one will be cleared,
+// - Otherwise, If only one field is left, update discriminator to that value.
+type Union struct {
+	// Discriminator, if present, is the name of the field that
+	// discriminates fields in the union. The mapping between the value of
+	// the discriminator and the field is done by using the Fields list
+	// below.
+	Discriminator *string `yaml:"discriminator,omitempty"`
+
+	// DeduceInvalidDiscriminator indicates if the discriminator
+	// should be updated automatically based on the fields set. This
+	// typically defaults to false since we don't want to deduce by
+	// default (the behavior exists to maintain compatibility on
+	// existing types and shouldn't be used for new types).
+	DeduceInvalidDiscriminator bool `yaml:"deduceInvalidDiscriminator,omitempty"`
+
+	// This is the list of fields that belong to this union. All the
+	// fields present in here have to be part of the parent
+	// structure. Discriminator (if oneOf has one), is NOT included in
+	// this list. The value for field is how we map the name of the field
+	// to actual value for discriminator.
+	Fields []UnionField `yaml:"fields,omitempty"`
+}
+
+// StructField pairs a field name with a field type.
+type StructField struct {
+	// Name is the field name.
+	Name string `yaml:"name,omitempty"`
+	// Type is the field type.
+	Type TypeRef `yaml:"type,omitempty"`
+	// Default value for the field, nil if not present.
+	Default interface{} `yaml:"default,omitempty"`
+}
+
+// List represents a type which contains a zero or more elements, all of the
+// same subtype. Lists may be either associative: each element is more or less
+// independent and could be managed by separate entities in the system; or
+// atomic, where the elements are heavily dependent on each other: it is not
+// sensible to change one element without considering the ramifications on all
+// the other elements.
+type List struct {
+	// ElementType is the type of the list's elements.
+	ElementType TypeRef `yaml:"elementType,omitempty"`
+
+	// ElementRelationship states the relationship between the list's elements
+	// and must have one of these values:
+	// * `atomic`: the list is treated as a single entity, like a scalar.
+	// * `associative`:
+	//   - If the list element is a scalar, the list is treated as a set.
+	//   - If the list element is a map, the list is treated as a map.
+	// There is no default for this value for lists; all schemas must
+	// explicitly state the element relationship for all lists.
+	ElementRelationship ElementRelationship `yaml:"elementRelationship,omitempty"`
+
+	// Iff ElementRelationship is `associative`, and the element type is
+	// map, then Keys must have non-zero length, and it lists the fields
+	// of the element's map type which are to be used as the keys of the
+	// list.
+	//
+	// TODO: change this to "non-atomic struct" above and make the code reflect this.
+	//
+	// Each key must refer to a single field name (no nesting, not JSONPath).
+	Keys []string `yaml:"keys,omitempty"`
+}
+
+// FindNamedType is a convenience function that returns the referenced TypeDef,
+// if it exists, or (nil, false) if it doesn't.
+func (s *Schema) FindNamedType(name string) (TypeDef, bool) {
+	s.once.Do(func() {
+		s.m = make(map[string]TypeDef, len(s.Types))
+		for _, t := range s.Types {
+			s.m[t.Name] = t
+		}
+	})
+	t, ok := s.m[name]
+	return t, ok
+}
+
+func (s *Schema) resolveNoOverrides(tr TypeRef) (Atom, bool) {
+	result := Atom{}
+
+	if tr.NamedType != nil {
+		t, ok := s.FindNamedType(*tr.NamedType)
+		if !ok {
+			return Atom{}, false
+		}
+
+		result = t.Atom
+	} else {
+		result = tr.Inlined
+	}
+
+	return result, true
+}
+
+// Resolve is a convenience function which returns the atom referenced, whether
+// it is inline or named. Returns (Atom{}, false) if the type can't be resolved.
+//
+// This allows callers to not care about the difference between a (possibly
+// inlined) reference and a definition.
+func (s *Schema) Resolve(tr TypeRef) (Atom, bool) {
+	// If this is a plain reference with no overrides, just return the type
+	if tr.ElementRelationship == nil {
+		return s.resolveNoOverrides(tr)
+	}
+
+	s.lock.Lock()
+	defer s.lock.Unlock()
+
+	if s.resolvedTypes == nil {
+		s.resolvedTypes = make(map[TypeRef]Atom)
+	}
+
+	var result Atom
+	var exists bool
+
+	// Return cached result if available
+	// If not, calculate result and cache it
+	if result, exists = s.resolvedTypes[tr]; !exists {
+		if result, exists = s.resolveNoOverrides(tr); exists {
+			// Allow field-level electives to override the referred type's modifiers
+			switch {
+			case result.Map != nil:
+				mapCopy := Map{}
+				result.Map.CopyInto(&mapCopy)
+				mapCopy.ElementRelationship = *tr.ElementRelationship
+				result.Map = &mapCopy
+			case result.List != nil:
+				listCopy := *result.List
+				listCopy.ElementRelationship = *tr.ElementRelationship
+				result.List = &listCopy
+			case result.Scalar != nil:
+				return Atom{}, false
+			default:
+				return Atom{}, false
+			}
+		} else {
+			return Atom{}, false
+		}
+
+		// Save result. If it is nil, that is also recorded as not existing.
+		s.resolvedTypes[tr] = result
+	}
+
+	return result, true
+}
+
+// Clones this instance of Schema into the other
+// If other is nil this method does nothing.
+// If other is already initialized, overwrites it with this instance
+// Warning: Not thread safe
+func (s *Schema) CopyInto(dst *Schema) {
+	if dst == nil {
+		return
+	}
+
+	// Schema type is considered immutable so sharing references
+	dst.Types = s.Types
+
+	if s.m != nil {
+		// If cache is non-nil then the once token had been consumed.
+		// Must reset token and use it again to ensure same semantics.
+		dst.once = sync.Once{}
+		dst.once.Do(func() {
+			dst.m = s.m
+		})
+	}
+}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go
new file mode 100644
index 000000000..b668eff83
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go
@@ -0,0 +1,202 @@
+/*
+Copyright 2019 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package schema
+
+import "reflect"
+
+// Equals returns true iff the two Schemas are equal.
+func (a *Schema) Equals(b *Schema) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+
+	if len(a.Types) != len(b.Types) {
+		return false
+	}
+	for i := range a.Types {
+		if !a.Types[i].Equals(&b.Types[i]) {
+			return false
+		}
+	}
+	return true
+}
+
+// Equals returns true iff the two TypeRefs are equal.
+//
+// Note that two typerefs that have an equivalent type but where one is
+// inlined and the other is named, are not considered equal.
+func (a *TypeRef) Equals(b *TypeRef) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if (a.NamedType == nil) != (b.NamedType == nil) {
+		return false
+	}
+	if a.NamedType != nil {
+		if *a.NamedType != *b.NamedType {
+			return false
+		}
+		//return true
+	}
+	if a.ElementRelationship != b.ElementRelationship {
+		return false
+	}
+	return a.Inlined.Equals(&b.Inlined)
+}
+
+// Equals returns true iff the two TypeDefs are equal.
+func (a *TypeDef) Equals(b *TypeDef) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if a.Name != b.Name {
+		return false
+	}
+	return a.Atom.Equals(&b.Atom)
+}
+
+// Equals returns true iff the two Atoms are equal.
+func (a *Atom) Equals(b *Atom) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if (a.Scalar == nil) != (b.Scalar == nil) {
+		return false
+	}
+	if (a.List == nil) != (b.List == nil) {
+		return false
+	}
+	if (a.Map == nil) != (b.Map == nil) {
+		return false
+	}
+	switch {
+	case a.Scalar != nil:
+		return *a.Scalar == *b.Scalar
+	case a.List != nil:
+		return a.List.Equals(b.List)
+	case a.Map != nil:
+		return a.Map.Equals(b.Map)
+	}
+	return true
+}
+
+// Equals returns true iff the two Maps are equal.
+func (a *Map) Equals(b *Map) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if !a.ElementType.Equals(&b.ElementType) {
+		return false
+	}
+	if a.ElementRelationship != b.ElementRelationship {
+		return false
+	}
+	if len(a.Fields) != len(b.Fields) {
+		return false
+	}
+	for i := range a.Fields {
+		if !a.Fields[i].Equals(&b.Fields[i]) {
+			return false
+		}
+	}
+	if len(a.Unions) != len(b.Unions) {
+		return false
+	}
+	for i := range a.Unions {
+		if !a.Unions[i].Equals(&b.Unions[i]) {
+			return false
+		}
+	}
+	return true
+}
+
+// Equals returns true iff the two Unions are equal.
+func (a *Union) Equals(b *Union) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if (a.Discriminator == nil) != (b.Discriminator == nil) {
+		return false
+	}
+	if a.Discriminator != nil {
+		if *a.Discriminator != *b.Discriminator {
+			return false
+		}
+	}
+	if a.DeduceInvalidDiscriminator != b.DeduceInvalidDiscriminator {
+		return false
+	}
+	if len(a.Fields) != len(b.Fields) {
+		return false
+	}
+	for i := range a.Fields {
+		if !a.Fields[i].Equals(&b.Fields[i]) {
+			return false
+		}
+	}
+	return true
+}
+
+// Equals returns true iff the two UnionFields are equal.
+func (a *UnionField) Equals(b *UnionField) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if a.FieldName != b.FieldName {
+		return false
+	}
+	if a.DiscriminatorValue != b.DiscriminatorValue {
+		return false
+	}
+	return true
+}
+
+// Equals returns true iff the two StructFields are equal.
+func (a *StructField) Equals(b *StructField) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if a.Name != b.Name {
+		return false
+	}
+	if !reflect.DeepEqual(a.Default, b.Default) {
+		return false
+	}
+	return a.Type.Equals(&b.Type)
+}
+
+// Equals returns true iff the two Lists are equal.
+func (a *List) Equals(b *List) bool {
+	if a == nil || b == nil {
+		return a == nil && b == nil
+	}
+	if !a.ElementType.Equals(&b.ElementType) {
+		return false
+	}
+	if a.ElementRelationship != b.ElementRelationship {
+		return false
+	}
+	if len(a.Keys) != len(b.Keys) {
+		return false
+	}
+	for i := range a.Keys {
+		if a.Keys[i] != b.Keys[i] {
+			return false
+		}
+	}
+	return true
+}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go
new file mode 100644
index 000000000..6eb6c36df
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go
@@ -0,0 +1,165 @@
+/*
+Copyright 2018 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package schema
+
+// SchemaSchemaYAML is a schema against which you can validate other schemas.
+// It will validate itself. It can be unmarshalled into a Schema type.
+var SchemaSchemaYAML = `types:
+- name: schema
+  map:
+    fields:
+      - name: types
+        type:
+          list:
+            elementRelationship: associative
+            elementType:
+              namedType: typeDef
+            keys:
+            - name
+- name: typeDef
+  map:
+    fields:
+    - name: name
+      type:
+        scalar: string
+    - name: scalar
+      type:
+        scalar: string
+    - name: map
+      type:
+        namedType: map
+    - name: list
+      type:
+        namedType: list
+    - name: untyped
+      type:
+        namedType: untyped
+- name: typeRef
+  map:
+    fields:
+    - name: namedType
+      type:
+        scalar: string
+    - name: scalar
+      type:
+        scalar: string
+    - name: map
+      type:
+        namedType: map
+    - name: list
+      type:
+        namedType: list
+    - name: untyped
+      type:
+        namedType: untyped
+    - name: elementRelationship
+      type:
+        scalar: string
+- name: scalar
+  scalar: string
+- name: map
+  map:
+    fields:
+    - name: fields
+      type:
+        list:
+          elementType:
+            namedType: structField
+          elementRelationship: associative
+          keys: [ "name" ]
+    - name: unions
+      type:
+        list:
+          elementType:
+            namedType: union
+          elementRelationship: atomic
+    - name: elementType
+      type:
+        namedType: typeRef
+    - name: elementRelationship
+      type:
+        scalar: string
+- name: unionField
+  map:
+    fields:
+    - name: fieldName
+      type:
+        scalar: string
+    - name: discriminatorValue
+      type:
+        scalar: string
+- name: union
+  map:
+    fields:
+    - name: discriminator
+      type:
+        scalar: string
+    - name: deduceInvalidDiscriminator
+      type:
+        scalar: boolean
+    - name: fields
+      type:
+        list:
+          elementRelationship: associative
+          elementType:
+            namedType: unionField
+          keys:
+          - fieldName
+- name: structField
+  map:
+    fields:
+    - name: name
+      type:
+        scalar: string
+    - name: type
+      type:
+        namedType: typeRef
+    - name: default
+      type:
+        namedType: __untyped_atomic_
+- name: list
+  map:
+    fields:
+    - name: elementType
+      type:
+        namedType: typeRef
+    - name: elementRelationship
+      type:
+        scalar: string
+    - name: keys
+      type:
+        list:
+          elementType:
+            scalar: string
+          elementRelationship: atomic
+- name: untyped
+  map:
+    fields:
+    - name: elementRelationship
+      type:
+        scalar: string
+- name: __untyped_atomic_
+  scalar: untyped
+  list:
+    elementType:
+      namedType: __untyped_atomic_
+    elementRelationship: atomic
+  map:
+    elementType:
+      namedType: __untyped_atomic_
+    elementRelationship: atomic
+`