diff --git a/go.mod b/go.mod index 94ec882022..f3b996fad2 100644 --- a/go.mod +++ b/go.mod @@ -7,10 +7,10 @@ toolchain go1.21.8 require ( github.com/Masterminds/semver v1.5.0 github.com/Pallinder/go-randomdata v1.2.0 - github.com/argoproj/argo-cd/v2 v2.8.17 + github.com/argoproj/argo-cd/v2 v2.9.20 github.com/argoproj/argo-workflows/v3 v3.4.3 - github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814 - github.com/aws/aws-sdk-go v1.44.290 + github.com/argoproj/gitops-engine v0.7.1-0.20240715141028-c68bce0f979c + github.com/aws/aws-sdk-go v1.44.317 github.com/aws/aws-sdk-go-v2/service/ecr v1.20.0 github.com/caarlos0/env v3.5.0+incompatible github.com/caarlos0/env/v6 v6.7.2 @@ -60,9 +60,9 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/satori/go.uuid v1.2.0 github.com/stretchr/testify v1.8.4 - github.com/tidwall/gjson v1.14.3 + github.com/tidwall/gjson v1.14.4 github.com/tidwall/sjson v1.2.4 - github.com/xanzy/go-gitlab v0.86.0 + github.com/xanzy/go-gitlab v0.91.1 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yannh/kubeconform v0.5.0 github.com/zclconf/go-cty v1.13.2 @@ -121,7 +121,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/agext/levenshtein v1.2.1 // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect - github.com/antonmedv/expr v1.12.5 // indirect + github.com/antonmedv/expr v1.15.2 // indirect github.com/apparentlymart/go-textseg v1.0.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/argoproj/pkg v0.13.7-0.20230627120311-a4dd357b057e // indirect @@ -130,7 +130,7 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect github.com/bombsimon/logrusr/v2 v2.0.1 // indirect - github.com/bradleyfalzon/ghinstallation/v2 v2.5.0 // indirect + github.com/bradleyfalzon/ghinstallation/v2 v2.6.0 // indirect github.com/casbin/govaluate v1.1.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -165,7 +165,7 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-github/v53 v53.0.0 // indirect + github.com/google/go-github/v53 v53.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.4 // indirect @@ -233,8 +233,8 @@ require ( github.com/sergi/go-diff v1.1.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skeema/knownhosts v1.2.1 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/skeema/knownhosts v1.2.2 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect @@ -291,7 +291,7 @@ require ( k8s.io/kube-aggregator v0.26.4 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect mellium.im/sasl v0.3.1 // indirect - oras.land/oras-go/v2 v2.2.0 // indirect + oras.land/oras-go/v2 v2.3.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect diff --git a/go.sum b/go.sum index b7bcc091fe..41c7bbac97 100644 --- a/go.sum +++ b/go.sum @@ -76,35 +76,36 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis/v2 v2.30.3 h1:hrqDB4cHFSHQf4gO3xu6YKQg8PqJpNjLYsQAFYHstqw= -github.com/alicebob/miniredis/v2 v2.30.3/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= +github.com/alicebob/miniredis/v2 v2.30.4 h1:8S4/o1/KoUArAGbGwPxcwf0krlzceva2XVOSchFS7Eo= +github.com/alicebob/miniredis/v2 v2.30.4/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= -github.com/antonmedv/expr v1.12.5 h1:Fq4okale9swwL3OeLLs9WD9H6GbgBLJyN/NUHRv+n0E= -github.com/antonmedv/expr v1.12.5/go.mod h1:FPC8iWArxls7axbVLsW+kpg1mz29A1b2M6jt+hZfDkU= +github.com/antonmedv/expr v1.15.2 h1:afFXpDWIC2n3bF+kTZE1JvFo+c34uaM3sTqh8z0xfdU= +github.com/antonmedv/expr v1.15.2/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/argoproj/argo-cd/v2 v2.8.17 h1:PPAGPj37RBoxWfplu2HSjLJ6bZY75FPgy9h4mcKyxqQ= -github.com/argoproj/argo-cd/v2 v2.8.17/go.mod h1:qdkZvAPT+uurfySoFIlptZ402k/h1ZWuEJ511yd8GOE= +github.com/argoproj/argo-cd/v2 v2.9.20 h1:3VO6lrl8fE7tBxv3kli+hF83amMtbq+6uJkREMjxzsE= +github.com/argoproj/argo-cd/v2 v2.9.20/go.mod h1:V9EKQR1U5kJV/aLVRgUV46muOStnP6C5c4wTeT6nkoY= github.com/argoproj/argo-workflows/v3 v3.4.3 h1:4pt7+Rjy9Lzq/r6dWp6wL8mr3ucPHSsGIlWwoP3fueM= github.com/argoproj/argo-workflows/v3 v3.4.3/go.mod h1:Od1rQK5j9/WefqFaUsIwAqTialDhLlhups0RE/WYzz4= -github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814 h1:oTaLRbCwjnGtScIX2ZRdIEDsiDxonwh9/BbUxdXrjYc= -github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814/go.mod h1:1TchqKw9XmYYZluyEHa1dTJQoZgbV6PhabB/e8Wf3KY= +github.com/argoproj/gitops-engine v0.7.1-0.20240715141028-c68bce0f979c h1:kkHx4mvqnUCLruADf1t/aO6yXnLcrl6rhsINaJomukc= +github.com/argoproj/gitops-engine v0.7.1-0.20240715141028-c68bce0f979c/go.mod h1:/GMN0JuoJUUpnKlNLp2Wn/mfK8sglFsdPn+eoxSddmg= github.com/argoproj/pkg v0.13.7-0.20230627120311-a4dd357b057e h1:kuLQvJqwwRMQTheT4MFyKVM8Txncu21CHT4yBWUl1Mk= github.com/argoproj/pkg v0.13.7-0.20230627120311-a4dd357b057e/go.mod h1:xBN5PLx2MoK63dmPfMo/PGBvd77K1Y0m/rzZOe4cs1s= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.44.290 h1:Md4+os9DQtJjow0lWLMzeJljsimD+XS2xwwHDr5Z+Lk= github.com/aws/aws-sdk-go v1.44.290/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.317 h1:+8XWrLmGMwPPXSRSLPzhgcGnzJ2mYkgkrcB9C/GnSOU= +github.com/aws/aws-sdk-go v1.44.317/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= @@ -123,8 +124,8 @@ github.com/bmatcuk/doublestar/v4 v4.6.0 h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvz github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4mvaOAM= github.com/bombsimon/logrusr/v2 v2.0.1/go.mod h1:ByVAX+vHdLGAfdroiMg6q0zgq2FODY2lc5YJvzmOJio= -github.com/bradleyfalzon/ghinstallation/v2 v2.5.0 h1:yaYcGQ7yEIGbsJfW/9z7v1sLiZg/5rSNNXwmMct5XaE= -github.com/bradleyfalzon/ghinstallation/v2 v2.5.0/go.mod h1:amcvPQMrRkWNdueWOjPytGL25xQGzox7425qMgzo+Vo= +github.com/bradleyfalzon/ghinstallation/v2 v2.6.0 h1:IRY7Xy588KylkoycsUhFpW7cdGpy5Y5BPsz4IfuJtGk= +github.com/bradleyfalzon/ghinstallation/v2 v2.6.0/go.mod h1:oQ3etOwN3TRH4EwgW5/7MxSVMGlMlzG/O8TU7eYdoSk= github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao= github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w= github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= @@ -245,8 +246,8 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -272,6 +273,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= +github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k= +github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -390,8 +393,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-github/v53 v53.0.0 h1:T1RyHbSnpHYnoF0ZYKiIPSgPtuJ8G6vgc0MKodXsQDQ= -github.com/google/go-github/v53 v53.0.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= +github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI= +github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -761,13 +764,13 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= -github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= +github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -797,8 +800,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= -github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= @@ -818,8 +821,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xanzy/go-gitlab v0.86.0 h1:jR8V9cK9jXRQDb46KOB20NCF3ksY09luaG0IfXE6p7w= -github.com/xanzy/go-gitlab v0.86.0/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw= +github.com/xanzy/go-gitlab v0.91.1 h1:gnV57IPGYywWer32oXKBcdmc8dVxeKl3AauV8Bu17rw= +github.com/xanzy/go-gitlab v0.91.1/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1288,8 +1291,8 @@ launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80 launchpad.net/xmlpath v0.0.0-20130614043138-000000000004/go.mod h1:vqyExLOM3qBx7mvYRkoxjSCF945s0mbe7YynlKYXtsA= mellium.im/sasl v0.3.1 h1:wE0LW6g7U83vhvxjC1IY8DnXM+EU095yeo8XClvCdfo= mellium.im/sasl v0.3.1/go.mod h1:xm59PUYpZHhgQ9ZqoJ5QaCqzWMi8IeS49dhp6plPCzw= -oras.land/oras-go/v2 v2.2.0 h1:E1fqITD56Eg5neZbxBtAdZVgDHD6wBabJo6xESTcQyo= -oras.land/oras-go/v2 v2.2.0/go.mod h1:pXjn0+KfarspMHHNR3A56j3tgvr+mxArHuI8qVn59v8= +oras.land/oras-go/v2 v2.3.0 h1:lqX1aXdN+DAmDTKjiDyvq85cIaI4RkIKp/PghWlAGIU= +oras.land/oras-go/v2 v2.3.0/go.mod h1:GeAwLuC4G/JpNwkd+bSZ6SkDMGaaYglt6YK2WvZP7uQ= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= diff --git a/vendor/github.com/antonmedv/expr/README.md b/vendor/github.com/antonmedv/expr/README.md index 242431f2ce..0e11943d31 100644 --- a/vendor/github.com/antonmedv/expr/README.md +++ b/vendor/github.com/antonmedv/expr/README.md @@ -2,45 +2,53 @@ [![test](https://github.com/antonmedv/expr/actions/workflows/test.yml/badge.svg)](https://github.com/antonmedv/expr/actions/workflows/test.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/antonmedv/expr)](https://goreportcard.com/report/github.com/antonmedv/expr) [![GoDoc](https://godoc.org/github.com/antonmedv/expr?status.svg)](https://godoc.org/github.com/antonmedv/expr) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/expr.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:expr) + +**Expr** is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed. expr logo -**Expr** package provides an engine that can compile and evaluate expressions. -An expression is a one-liner that returns a value (mostly, but not limited to, booleans). -It is designed for simplicity, speed and safety. +```js +// Allow only admins and moderators to moderate comments. +user.Group in ["admin", "moderator"] || user.Id == comment.UserId +``` -The purpose of the package is to allow users to use expressions inside configuration for more complex logic. -It is a perfect candidate for the foundation of a _business rule engine_. -The idea is to let configure things in a dynamic way without recompile of a program: +```js +// Ensure all tweets are less than 240 characters. +all(Tweets, .Size <= 240) +``` -```coffeescript -# Get the special price if -user.Group in ["good_customers", "collaborator"] +## Features -# Promote article to the homepage when -len(article.Comments) > 100 and article.Category not in ["misc"] +**Expr** is a safe, fast, and intuitive expression evaluator optimized for the Go language. +Here are its standout features: -# Send an alert when -product.Stock < 15 -``` +### Safety and Isolation +* **Memory-Safe**: Expr is designed with a focus on safety, ensuring that programs do not access unrelated memory or introduce memory vulnerabilities. +* **Side-Effect-Free**: Expressions evaluated in Expr only compute outputs from their inputs, ensuring no side-effects that can change state or produce unintended results. +* **Always Terminating**: Expr is designed to prevent infinite loops, ensuring that every program will conclude in a reasonable amount of time. -## Features +### Go Integration +* **Seamless with Go**: Integrate Expr into your Go projects without the need to redefine types. -* Seamless integration with Go (no need to redefine types) -* Static typing ([example](https://godoc.org/github.com/antonmedv/expr#example-Env)). +### Static Typing +* Ensures type correctness and prevents runtime type errors. ```go out, err := expr.Compile(`name + age`) // err: invalid operation + (mismatched types string and int) // | name + age // | .....^ ``` -* User-friendly error messages. -* Reasonable set of basic operators. -* Builtins `all`, `none`, `any`, `one`, `filter`, `map`. - ```coffeescript - all(Tweets, {.Size <= 280}) - ``` -* Fast ([benchmarks](https://github.com/antonmedv/golang-expression-evaluation-comparison#readme)): uses bytecode virtual machine and optimizing compiler. + +### User-Friendly +* Provides user-friendly error messages to assist with debugging and development. + +### Flexibility and Utility +* **Rich Operators**: Offers a reasonable set of basic operators for a variety of applications. +* **Built-in Functions**: Functions like `all`, `none`, `any`, `one`, `filter`, and `map` are provided out-of-the-box. + +### Performance +* **Optimized for Speed**: Expr stands out in its performance, utilizing an optimizing compiler and a bytecode virtual machine. Check out these [benchmarks](https://github.com/antonmedv/golang-expression-evaluation-comparison#readme) for more details. ## Install @@ -138,20 +146,24 @@ func main() { ## Who uses Expr? -* [Aviasales](https://aviasales.ru) uses Expr as a business rule engine for our flight search engine. -* [Wish.com](https://www.wish.com) uses Expr for decision-making rule engine in the Wish Assistant. -* [Argo](https://argoproj.github.io) uses Expr in Argo Rollouts and Argo Workflows for Kubernetes. -* [Crowdsec](https://crowdsec.net) uses Expr in a security automation tool. -* [FACEIT](https://www.faceit.com) uses Expr to allow customization of its eSports matchmaking algorithm. -* [qiniu](https://www.qiniu.com) uses Expr in trade systems. -* [Junglee Games](https://www.jungleegames.com/) uses Expr for an in house marketing retention tool [Project Audience](https://www.linkedin.com/pulse/meet-project-audience-our-no-code-swiss-army-knife-product-bharti). -* [OpenTelemetry](https://opentelemetry.io) uses Expr in the OpenTelemetry Collector. -* [Philips Labs](https://github.com/philips-labs/tabia) uses Expr in Tabia, a tool for collecting insights on the characteristics of our code bases. -* [CoreDNS](https://coredns.io) uses Expr in CoreDNS, a DNS server. -* [Chaos Mesh](https://chaos-mesh.org) uses Expr in Chaos Mesh, a cloud-native Chaos Engineering platform. -* [Milvus](https://milvus.io) uses Expr in Milvus, an open-source vector database. -* [Visually.io](https://visually.io) uses Expr as a business rule engine for our personalization targeting algorithm. -* [Akvorado](https://github.com/akvorado/akvorado) uses Expr to classify exporters and interfaces in network flows. +* [Google](https://google.com) uses Expr as one of its expression languages on the [Google Cloud Platform](https://cloud.google.com). +* [Uber](https://uber.com) uses Expr to allow customization of its Uber Eats marketplace. +* [GoDaddy](https://godaddy.com) employs Expr for the customization of its GoDaddy Pro product. +* [ByteDance](https://bytedance.com) incorporates Expr into its internal business rule engine. +* [Aviasales](https://aviasales.ru) utilizes Expr as a business rule engine for its flight search engine. +* [Wish.com](https://www.wish.com) employs Expr in its decision-making rule engine for the Wish Assistant. +* [Argo](https://argoproj.github.io) integrates Expr into Argo Rollouts and Argo Workflows for Kubernetes. +* [Crowdsec](https://crowdsec.net) incorporates Expr into its security automation tool. +* [FACEIT](https://www.faceit.com) uses Expr to enhance customization of its eSports matchmaking algorithm. +* [qiniu](https://www.qiniu.com) implements Expr in its trade systems. +* [Junglee Games](https://www.jungleegames.com/) uses Expr for its in-house marketing retention tool, Project Audience. +* [OpenTelemetry](https://opentelemetry.io) integrates Expr into the OpenTelemetry Collector. +* [Philips Labs](https://github.com/philips-labs/tabia) employs Expr in Tabia, a tool designed to collect insights on their code bases. +* [CoreDNS](https://coredns.io) uses Expr in CoreDNS, which is a DNS server. +* [Chaos Mesh](https://chaos-mesh.org) incorporates Expr into Chaos Mesh, a cloud-native Chaos Engineering platform. +* [Milvus](https://milvus.io) integrates Expr into Milvus, an open-source vector database. +* [Visually.io](https://visually.io) employs Expr as a business rule engine for its personalization targeting algorithm. +* [Akvorado](https://github.com/akvorado/akvorado) utilizes Expr to classify exporters and interfaces in network flows. [Add your company too](https://github.com/antonmedv/expr/edit/master/README.md) diff --git a/vendor/github.com/antonmedv/expr/SECURITY.md b/vendor/github.com/antonmedv/expr/SECURITY.md new file mode 100644 index 0000000000..6e343ee367 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Supported Versions + +Expr is generally backwards compatible with very few exceptions, so we +recommend users to always use the latest version to experience stability, +performance and security. + +We generally backport security issues to a single previous minor version, +unless this is not possible or feasible with a reasonable effort. + +| Version | Supported | +|---------|--------------------| +| 1.15 | :white_check_mark: | +| 1.14 | :white_check_mark: | +| 1.13 | :white_check_mark: | +| 1.12 | :white_check_mark: | +| < 1.12 | :x: | + +## Reporting a Vulnerability + +If you believe you've discovered a serious vulnerability, please contact the +Expr core team at anton+security@medv.io. We will evaluate your report and if +necessary issue a fix and an advisory. If the issue was previously undisclosed, +we'll also mention your name in the credits. diff --git a/vendor/github.com/antonmedv/expr/ast/dump.go b/vendor/github.com/antonmedv/expr/ast/dump.go new file mode 100644 index 0000000000..56bc7dbe2e --- /dev/null +++ b/vendor/github.com/antonmedv/expr/ast/dump.go @@ -0,0 +1,59 @@ +package ast + +import ( + "fmt" + "reflect" + "regexp" +) + +func Dump(node Node) string { + return dump(reflect.ValueOf(node), "") +} + +func dump(v reflect.Value, ident string) string { + if !v.IsValid() { + return "nil" + } + t := v.Type() + switch t.Kind() { + case reflect.Struct: + out := t.Name() + "{\n" + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if isPrivate(f.Name) { + continue + } + s := v.Field(i) + out += fmt.Sprintf("%v%v: %v,\n", ident+"\t", f.Name, dump(s, ident+"\t")) + } + return out + ident + "}" + case reflect.Slice: + if v.Len() == 0 { + return t.String() + "{}" + } + out := t.String() + "{\n" + for i := 0; i < v.Len(); i++ { + s := v.Index(i) + out += fmt.Sprintf("%v%v,", ident+"\t", dump(s, ident+"\t")) + if i+1 < v.Len() { + out += "\n" + } + } + return out + "\n" + ident + "}" + case reflect.Ptr: + return dump(v.Elem(), ident) + case reflect.Interface: + return dump(reflect.ValueOf(v.Interface()), ident) + + case reflect.String: + return fmt.Sprintf("%q", v) + default: + return fmt.Sprintf("%v", v) + } +} + +var isCapital = regexp.MustCompile("^[A-Z]") + +func isPrivate(s string) bool { + return !isCapital.Match([]byte(s)) +} diff --git a/vendor/github.com/antonmedv/expr/ast/func.go b/vendor/github.com/antonmedv/expr/ast/func.go new file mode 100644 index 0000000000..a873c35e99 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/ast/func.go @@ -0,0 +1,12 @@ +package ast + +import "reflect" + +type Function struct { + Name string + Func func(args ...any) (any, error) + Fast func(arg any) any + Types []reflect.Type + Validate func(args []reflect.Type) (reflect.Type, error) + Predicate bool +} diff --git a/vendor/github.com/antonmedv/expr/ast/node.go b/vendor/github.com/antonmedv/expr/ast/node.go index e85f853e91..d037926c19 100644 --- a/vendor/github.com/antonmedv/expr/ast/node.go +++ b/vendor/github.com/antonmedv/expr/ast/node.go @@ -4,7 +4,6 @@ import ( "reflect" "regexp" - "github.com/antonmedv/expr/builtin" "github.com/antonmedv/expr/file" ) @@ -14,6 +13,7 @@ type Node interface { SetLocation(file.Location) Type() reflect.Type SetType(reflect.Type) + String() string } func Patch(node *Node, newNode Node) { @@ -50,7 +50,6 @@ type NilNode struct { type IdentifierNode struct { base Value string - Deref bool FieldIndex []int Method bool // true if method, false if field MethodIndex int // index of method, set only if Method is true @@ -78,7 +77,7 @@ type StringNode struct { type ConstantNode struct { base - Value interface{} + Value any } type UnaryNode struct { @@ -106,10 +105,9 @@ type MemberNode struct { Property Node Name string // Name of the filed or method. Used for error reporting. Optional bool - Deref bool FieldIndex []int - // TODO: Replace with a single MethodIndex field of &int type. + // TODO: Combine Method and MethodIndex into a single MethodIndex field of &int type. Method bool MethodIndex int } @@ -127,13 +125,15 @@ type CallNode struct { Arguments []Node Typed int Fast bool - Func *builtin.Function + Func *Function } type BuiltinNode struct { base Name string Arguments []Node + Throws bool + Map Node } type ClosureNode struct { @@ -143,6 +143,7 @@ type ClosureNode struct { type PointerNode struct { base + Name string } type ConditionalNode struct { @@ -152,6 +153,13 @@ type ConditionalNode struct { Exp2 Node } +type VariableDeclaratorNode struct { + base + Name string + Value Node + Expr Node +} + type ArrayNode struct { base Nodes []Node diff --git a/vendor/github.com/antonmedv/expr/ast/print.go b/vendor/github.com/antonmedv/expr/ast/print.go index 56bc7dbe2e..dd9e0db0f9 100644 --- a/vendor/github.com/antonmedv/expr/ast/print.go +++ b/vendor/github.com/antonmedv/expr/ast/print.go @@ -1,59 +1,175 @@ package ast import ( + "encoding/json" "fmt" - "reflect" - "regexp" + "strings" + + "github.com/antonmedv/expr/parser/operator" + "github.com/antonmedv/expr/parser/utils" ) -func Dump(node Node) string { - return dump(reflect.ValueOf(node), "") +func (n *NilNode) String() string { + return "nil" +} + +func (n *IdentifierNode) String() string { + return n.Value +} + +func (n *IntegerNode) String() string { + return fmt.Sprintf("%d", n.Value) +} + +func (n *FloatNode) String() string { + return fmt.Sprintf("%v", n.Value) } -func dump(v reflect.Value, ident string) string { - if !v.IsValid() { +func (n *BoolNode) String() string { + return fmt.Sprintf("%t", n.Value) +} + +func (n *StringNode) String() string { + return fmt.Sprintf("%q", n.Value) +} + +func (n *ConstantNode) String() string { + if n.Value == nil { return "nil" } - t := v.Type() - switch t.Kind() { - case reflect.Struct: - out := t.Name() + "{\n" - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if isPrivate(f.Name) { - continue - } - s := v.Field(i) - out += fmt.Sprintf("%v%v: %v,\n", ident+"\t", f.Name, dump(s, ident+"\t")) - } - return out + ident + "}" - case reflect.Slice: - if v.Len() == 0 { - return t.String() + "{}" + b, err := json.Marshal(n.Value) + if err != nil { + panic(err) + } + return string(b) +} + +func (n *UnaryNode) String() string { + op := "" + if n.Operator == "not" { + op = fmt.Sprintf("%s ", n.Operator) + } else { + op = fmt.Sprintf("%s", n.Operator) + } + if _, ok := n.Node.(*BinaryNode); ok { + return fmt.Sprintf("%s(%s)", op, n.Node.String()) + } + return fmt.Sprintf("%s%s", op, n.Node.String()) +} + +func (n *BinaryNode) String() string { + var left, right string + if b, ok := n.Left.(*BinaryNode); ok && operator.Less(b.Operator, n.Operator) { + left = fmt.Sprintf("(%s)", n.Left.String()) + } else { + left = n.Left.String() + } + if b, ok := n.Right.(*BinaryNode); ok && operator.Less(b.Operator, n.Operator) { + right = fmt.Sprintf("(%s)", n.Right.String()) + } else { + right = n.Right.String() + } + return fmt.Sprintf("%s %s %s", left, n.Operator, right) +} + +func (n *ChainNode) String() string { + return n.Node.String() +} + +func (n *MemberNode) String() string { + if n.Optional { + if str, ok := n.Property.(*StringNode); ok && utils.IsValidIdentifier(str.Value) { + return fmt.Sprintf("%s?.%s", n.Node.String(), str.Value) + } else { + return fmt.Sprintf("get(%s, %s)", n.Node.String(), n.Property.String()) } - out := t.String() + "{\n" - for i := 0; i < v.Len(); i++ { - s := v.Index(i) - out += fmt.Sprintf("%v%v,", ident+"\t", dump(s, ident+"\t")) - if i+1 < v.Len() { - out += "\n" - } + } + if str, ok := n.Property.(*StringNode); ok && utils.IsValidIdentifier(str.Value) { + if _, ok := n.Node.(*PointerNode); ok { + return fmt.Sprintf(".%s", str.Value) } - return out + "\n" + ident + "}" - case reflect.Ptr: - return dump(v.Elem(), ident) - case reflect.Interface: - return dump(reflect.ValueOf(v.Interface()), ident) + return fmt.Sprintf("%s.%s", n.Node.String(), str.Value) + } + return fmt.Sprintf("%s[%s]", n.Node.String(), n.Property.String()) +} + +func (n *SliceNode) String() string { + if n.From == nil && n.To == nil { + return fmt.Sprintf("%s[:]", n.Node.String()) + } + if n.From == nil { + return fmt.Sprintf("%s[:%s]", n.Node.String(), n.To.String()) + } + if n.To == nil { + return fmt.Sprintf("%s[%s:]", n.Node.String(), n.From.String()) + } + return fmt.Sprintf("%s[%s:%s]", n.Node.String(), n.From.String(), n.To.String()) +} + +func (n *CallNode) String() string { + arguments := make([]string, len(n.Arguments)) + for i, arg := range n.Arguments { + arguments[i] = arg.String() + } + return fmt.Sprintf("%s(%s)", n.Callee.String(), strings.Join(arguments, ", ")) +} + +func (n *BuiltinNode) String() string { + arguments := make([]string, len(n.Arguments)) + for i, arg := range n.Arguments { + arguments[i] = arg.String() + } + return fmt.Sprintf("%s(%s)", n.Name, strings.Join(arguments, ", ")) +} - case reflect.String: - return fmt.Sprintf("%q", v) - default: - return fmt.Sprintf("%v", v) +func (n *ClosureNode) String() string { + return n.Node.String() +} + +func (n *PointerNode) String() string { + return "#" +} + +func (n *VariableDeclaratorNode) String() string { + return fmt.Sprintf("let %s = %s; %s", n.Name, n.Value.String(), n.Expr.String()) +} + +func (n *ConditionalNode) String() string { + var cond, exp1, exp2 string + if _, ok := n.Cond.(*ConditionalNode); ok { + cond = fmt.Sprintf("(%s)", n.Cond.String()) + } else { + cond = n.Cond.String() + } + if _, ok := n.Exp1.(*ConditionalNode); ok { + exp1 = fmt.Sprintf("(%s)", n.Exp1.String()) + } else { + exp1 = n.Exp1.String() } + if _, ok := n.Exp2.(*ConditionalNode); ok { + exp2 = fmt.Sprintf("(%s)", n.Exp2.String()) + } else { + exp2 = n.Exp2.String() + } + return fmt.Sprintf("%s ? %s : %s", cond, exp1, exp2) +} + +func (n *ArrayNode) String() string { + nodes := make([]string, len(n.Nodes)) + for i, node := range n.Nodes { + nodes[i] = node.String() + } + return fmt.Sprintf("[%s]", strings.Join(nodes, ", ")) } -var isCapital = regexp.MustCompile("^[A-Z]") +func (n *MapNode) String() string { + pairs := make([]string, len(n.Pairs)) + for i, pair := range n.Pairs { + pairs[i] = pair.String() + } + return fmt.Sprintf("{%s}", strings.Join(pairs, ", ")) +} -func isPrivate(s string) bool { - return !isCapital.Match([]byte(s)) +func (n *PairNode) String() string { + return fmt.Sprintf("%s: %s", n.Key.String(), n.Value.String()) } diff --git a/vendor/github.com/antonmedv/expr/ast/visitor.go b/vendor/github.com/antonmedv/expr/ast/visitor.go index 351e5d72b2..287a755896 100644 --- a/vendor/github.com/antonmedv/expr/ast/visitor.go +++ b/vendor/github.com/antonmedv/expr/ast/visitor.go @@ -45,6 +45,9 @@ func Walk(node *Node, v Visitor) { case *ClosureNode: Walk(&n.Node, v) case *PointerNode: + case *VariableDeclaratorNode: + Walk(&n.Value, v) + Walk(&n.Expr, v) case *ConditionalNode: Walk(&n.Cond, v) Walk(&n.Exp1, v) diff --git a/vendor/github.com/antonmedv/expr/builtin/builtin.go b/vendor/github.com/antonmedv/expr/builtin/builtin.go index ad9376962e..d7248a8679 100644 --- a/vendor/github.com/antonmedv/expr/builtin/builtin.go +++ b/vendor/github.com/antonmedv/expr/builtin/builtin.go @@ -1,38 +1,104 @@ package builtin import ( + "encoding/base64" + "encoding/json" "fmt" "reflect" + "sort" + "strings" + "time" + + "github.com/antonmedv/expr/ast" + "github.com/antonmedv/expr/vm/runtime" ) var ( - anyType = reflect.TypeOf(new(interface{})).Elem() - integerType = reflect.TypeOf(0) - floatType = reflect.TypeOf(float64(0)) + Index map[string]int + Names []string ) -type Function struct { - Name string - Func func(args ...interface{}) (interface{}, error) - Opcode int - Types []reflect.Type - Validate func(args []reflect.Type) (reflect.Type, error) +func init() { + Index = make(map[string]int) + Names = make([]string, len(Builtins)) + for i, fn := range Builtins { + Index[fn.Name] = i + Names[i] = fn.Name + } } -const ( - Len = iota + 1 - Abs - Int - Float -) - -var Builtins = map[int]*Function{ - Len: { - Name: "len", - Opcode: Len, +var Builtins = []*ast.Function{ + { + Name: "all", + Predicate: true, + Types: types(new(func([]any, func(any) bool) bool)), + }, + { + Name: "none", + Predicate: true, + Types: types(new(func([]any, func(any) bool) bool)), + }, + { + Name: "any", + Predicate: true, + Types: types(new(func([]any, func(any) bool) bool)), + }, + { + Name: "one", + Predicate: true, + Types: types(new(func([]any, func(any) bool) bool)), + }, + { + Name: "filter", + Predicate: true, + Types: types(new(func([]any, func(any) bool) []any)), + }, + { + Name: "map", + Predicate: true, + Types: types(new(func([]any, func(any) any) []any)), + }, + { + Name: "find", + Predicate: true, + Types: types(new(func([]any, func(any) bool) any)), + }, + { + Name: "findIndex", + Predicate: true, + Types: types(new(func([]any, func(any) bool) int)), + }, + { + Name: "findLast", + Predicate: true, + Types: types(new(func([]any, func(any) bool) any)), + }, + { + Name: "findLastIndex", + Predicate: true, + Types: types(new(func([]any, func(any) bool) int)), + }, + { + Name: "count", + Predicate: true, + Types: types(new(func([]any, func(any) bool) int)), + }, + { + Name: "groupBy", + Predicate: true, + Types: types(new(func([]any, func(any) any) map[any][]any)), + }, + { + Name: "reduce", + Predicate: true, + Types: types(new(func([]any, func(any, any) any, any) any)), + }, + { + Name: "len", + Fast: Len, Validate: func(args []reflect.Type) (reflect.Type, error) { if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments for len (expected 1, got %d)", len(args)) + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) } switch kind(args[0]) { case reflect.Array, reflect.Map, reflect.Slice, reflect.String, reflect.Interface: @@ -41,12 +107,17 @@ var Builtins = map[int]*Function{ return anyType, fmt.Errorf("invalid argument for len (type %s)", args[0]) }, }, - Abs: { - Name: "abs", - Opcode: Abs, + { + Name: "type", + Fast: Type, + Types: types(new(func(any) string)), + }, + { + Name: "abs", + Fast: Abs, Validate: func(args []reflect.Type) (reflect.Type, error) { if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments for abs (expected 1, got %d)", len(args)) + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) } switch kind(args[0]) { case reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Interface: @@ -55,12 +126,12 @@ var Builtins = map[int]*Function{ return anyType, fmt.Errorf("invalid argument for abs (type %s)", args[0]) }, }, - Int: { - Name: "int", - Opcode: Int, + { + Name: "int", + Fast: Int, Validate: func(args []reflect.Type) (reflect.Type, error) { if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments for int (expected 1, got %d)", len(args)) + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) } switch kind(args[0]) { case reflect.Interface: @@ -73,12 +144,12 @@ var Builtins = map[int]*Function{ return anyType, fmt.Errorf("invalid argument for int (type %s)", args[0]) }, }, - Float: { - Name: "float", - Opcode: Float, + { + Name: "float", + Fast: Float, Validate: func(args []reflect.Type) (reflect.Type, error) { if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments for float (expected 1, got %d)", len(args)) + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) } switch kind(args[0]) { case reflect.Interface: @@ -91,11 +162,772 @@ var Builtins = map[int]*Function{ return anyType, fmt.Errorf("invalid argument for float (type %s)", args[0]) }, }, -} + { + Name: "string", + Fast: String, + Types: types(new(func(any any) string)), + }, + { + Name: "trim", + Func: func(args ...any) (any, error) { + if len(args) == 1 { + return strings.TrimSpace(args[0].(string)), nil + } else if len(args) == 2 { + return strings.Trim(args[0].(string), args[1].(string)), nil + } else { + return nil, fmt.Errorf("invalid number of arguments for trim (expected 1 or 2, got %d)", len(args)) + } + }, + Types: types( + strings.TrimSpace, + strings.Trim, + ), + }, + { + Name: "trimPrefix", + Func: func(args ...any) (any, error) { + s := " " + if len(args) == 2 { + s = args[1].(string) + } + return strings.TrimPrefix(args[0].(string), s), nil + }, + Types: types( + strings.TrimPrefix, + new(func(string) string), + ), + }, + { + Name: "trimSuffix", + Func: func(args ...any) (any, error) { + s := " " + if len(args) == 2 { + s = args[1].(string) + } + return strings.TrimSuffix(args[0].(string), s), nil + }, + Types: types( + strings.TrimSuffix, + new(func(string) string), + ), + }, + { + Name: "upper", + Fast: func(arg any) any { + return strings.ToUpper(arg.(string)) + }, + Types: types(strings.ToUpper), + }, + { + Name: "lower", + Fast: func(arg any) any { + return strings.ToLower(arg.(string)) + }, + Types: types(strings.ToLower), + }, + { + Name: "split", + Func: func(args ...any) (any, error) { + if len(args) == 2 { + return strings.Split(args[0].(string), args[1].(string)), nil + } else if len(args) == 3 { + return strings.SplitN(args[0].(string), args[1].(string), runtime.ToInt(args[2])), nil + } else { + return nil, fmt.Errorf("invalid number of arguments for split (expected 2 or 3, got %d)", len(args)) + } + }, + Types: types( + strings.Split, + strings.SplitN, + ), + }, + { + Name: "splitAfter", + Func: func(args ...any) (any, error) { + if len(args) == 2 { + return strings.SplitAfter(args[0].(string), args[1].(string)), nil + } else if len(args) == 3 { + return strings.SplitAfterN(args[0].(string), args[1].(string), runtime.ToInt(args[2])), nil + } else { + return nil, fmt.Errorf("invalid number of arguments for splitAfter (expected 2 or 3, got %d)", len(args)) + } + }, + Types: types( + strings.SplitAfter, + strings.SplitAfterN, + ), + }, + { + Name: "replace", + Func: func(args ...any) (any, error) { + if len(args) == 4 { + return strings.Replace(args[0].(string), args[1].(string), args[2].(string), runtime.ToInt(args[3])), nil + } else if len(args) == 3 { + return strings.ReplaceAll(args[0].(string), args[1].(string), args[2].(string)), nil + } else { + return nil, fmt.Errorf("invalid number of arguments for replace (expected 3 or 4, got %d)", len(args)) + } + }, + Types: types( + strings.Replace, + strings.ReplaceAll, + ), + }, + { + Name: "repeat", + Func: func(args ...any) (any, error) { + n := runtime.ToInt(args[1]) + if n > 1e6 { + panic("memory budget exceeded") + } + return strings.Repeat(args[0].(string), n), nil + }, + Types: types(strings.Repeat), + }, + { + Name: "join", + Func: func(args ...any) (any, error) { + glue := "" + if len(args) == 2 { + glue = args[1].(string) + } + switch args[0].(type) { + case []string: + return strings.Join(args[0].([]string), glue), nil + case []any: + var s []string + for _, arg := range args[0].([]any) { + s = append(s, arg.(string)) + } + return strings.Join(s, glue), nil + } + return nil, fmt.Errorf("invalid argument for join (type %s)", reflect.TypeOf(args[0])) + }, + Types: types( + strings.Join, + new(func([]any, string) string), + new(func([]any) string), + new(func([]string, string) string), + new(func([]string) string), + ), + }, + { + Name: "indexOf", + Func: func(args ...any) (any, error) { + return strings.Index(args[0].(string), args[1].(string)), nil + }, + Types: types(strings.Index), + }, + { + Name: "lastIndexOf", + Func: func(args ...any) (any, error) { + return strings.LastIndex(args[0].(string), args[1].(string)), nil + }, + Types: types(strings.LastIndex), + }, + { + Name: "hasPrefix", + Func: func(args ...any) (any, error) { + return strings.HasPrefix(args[0].(string), args[1].(string)), nil + }, + Types: types(strings.HasPrefix), + }, + { + Name: "hasSuffix", + Func: func(args ...any) (any, error) { + return strings.HasSuffix(args[0].(string), args[1].(string)), nil + }, + Types: types(strings.HasSuffix), + }, + { + Name: "max", + Func: Max, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) == 0 { + return anyType, fmt.Errorf("not enough arguments to call max") + } + for _, arg := range args { + switch kind(arg) { + case reflect.Interface: + return anyType, nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64: + default: + return anyType, fmt.Errorf("invalid argument for max (type %s)", arg) + } + } + return args[0], nil + }, + }, + { + Name: "min", + Func: Min, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) == 0 { + return anyType, fmt.Errorf("not enough arguments to call min") + } + for _, arg := range args { + switch kind(arg) { + case reflect.Interface: + return anyType, nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64: + default: + return anyType, fmt.Errorf("invalid argument for min (type %s)", arg) + } + } + return args[0], nil + }, + }, + { + Name: "sum", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot sum %s", v.Kind()) + } + sum := int64(0) + i := 0 + for ; i < v.Len(); i++ { + it := deref(v.Index(i)) + if it.CanInt() { + sum += it.Int() + } else if it.CanFloat() { + goto float + } else { + return nil, fmt.Errorf("cannot sum %s", it.Kind()) + } + } + return int(sum), nil + float: + fSum := float64(sum) + for ; i < v.Len(); i++ { + it := deref(v.Index(i)) + if it.CanInt() { + fSum += float64(it.Int()) + } else if it.CanFloat() { + fSum += it.Float() + } else { + return nil, fmt.Errorf("cannot sum %s", it.Kind()) + } + } + return fSum, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot sum %s", args[0]) + } + return anyType, nil + }, + }, + { + Name: "mean", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot mean %s", v.Kind()) + } + if v.Len() == 0 { + return 0.0, nil + } + sum := float64(0) + i := 0 + for ; i < v.Len(); i++ { + it := deref(v.Index(i)) + if it.CanInt() { + sum += float64(it.Int()) + } else if it.CanFloat() { + sum += it.Float() + } else { + return nil, fmt.Errorf("cannot mean %s", it.Kind()) + } + } + return sum / float64(i), nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot avg %s", args[0]) + } + return floatType, nil + }, + }, + { + Name: "median", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot median %s", v.Kind()) + } + if v.Len() == 0 { + return 0.0, nil + } + s := make([]float64, v.Len()) + for i := 0; i < v.Len(); i++ { + it := deref(v.Index(i)) + if it.CanInt() { + s[i] = float64(it.Int()) + } else if it.CanFloat() { + s[i] = it.Float() + } else { + return nil, fmt.Errorf("cannot median %s", it.Kind()) + } + } + sort.Float64s(s) + if len(s)%2 == 0 { + return (s[len(s)/2-1] + s[len(s)/2]) / 2, nil + } + return s[len(s)/2], nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot median %s", args[0]) + } + return floatType, nil + }, + }, + { + Name: "toJSON", + Func: func(args ...any) (any, error) { + b, err := json.MarshalIndent(args[0], "", " ") + if err != nil { + return nil, err + } + return string(b), nil + }, + Types: types(new(func(any) string)), + }, + { + Name: "fromJSON", + Func: func(args ...any) (any, error) { + var v any + err := json.Unmarshal([]byte(args[0].(string)), &v) + if err != nil { + return nil, err + } + return v, nil + }, + Types: types(new(func(string) any)), + }, + { + Name: "toBase64", + Func: func(args ...any) (any, error) { + return base64.StdEncoding.EncodeToString([]byte(args[0].(string))), nil + }, + Types: types(new(func(string) string)), + }, + { + Name: "fromBase64", + Func: func(args ...any) (any, error) { + b, err := base64.StdEncoding.DecodeString(args[0].(string)) + if err != nil { + return nil, err + } + return string(b), nil + }, + Types: types(new(func(string) string)), + }, + { + Name: "now", + Func: func(args ...any) (any, error) { + return time.Now(), nil + }, + Types: types(new(func() time.Time)), + }, + { + Name: "duration", + Func: func(args ...any) (any, error) { + return time.ParseDuration(args[0].(string)) + }, + Types: types(time.ParseDuration), + }, + { + Name: "date", + Func: func(args ...any) (any, error) { + date := args[0].(string) + if len(args) == 2 { + layout := args[1].(string) + return time.Parse(layout, date) + } + if len(args) == 3 { + layout := args[1].(string) + timeZone := args[2].(string) + tz, err := time.LoadLocation(timeZone) + if err != nil { + return nil, err + } + t, err := time.ParseInLocation(layout, date, tz) + if err != nil { + return nil, err + } + return t, nil + } -func kind(t reflect.Type) reflect.Kind { - if t == nil { - return reflect.Invalid - } - return t.Kind() + layouts := []string{ + "2006-01-02", + "15:04:05", + "2006-01-02 15:04:05", + time.RFC3339, + time.RFC822, + time.RFC850, + time.RFC1123, + } + for _, layout := range layouts { + t, err := time.Parse(layout, date) + if err == nil { + return t, nil + } + } + return nil, fmt.Errorf("invalid date %s", date) + }, + Types: types( + new(func(string) time.Time), + new(func(string, string) time.Time), + new(func(string, string, string) time.Time), + ), + }, + { + Name: "first", + Func: func(args ...any) (any, error) { + defer func() { + if r := recover(); r != nil { + return + } + }() + return runtime.Fetch(args[0], 0), nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface: + return anyType, nil + case reflect.Slice, reflect.Array: + return args[0].Elem(), nil + } + return anyType, fmt.Errorf("cannot get first element from %s", args[0]) + }, + }, + { + Name: "last", + Func: func(args ...any) (any, error) { + defer func() { + if r := recover(); r != nil { + return + } + }() + return runtime.Fetch(args[0], -1), nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface: + return anyType, nil + case reflect.Slice, reflect.Array: + return args[0].Elem(), nil + } + return anyType, fmt.Errorf("cannot get last element from %s", args[0]) + }, + }, + { + Name: "get", + Func: func(args ...any) (out any, err error) { + defer func() { + if r := recover(); r != nil { + return + } + }() + return runtime.Fetch(args[0], args[1]), nil + }, + }, + { + Name: "take", + Func: func(args ...any) (any, error) { + if len(args) != 2 { + return nil, fmt.Errorf("invalid number of arguments (expected 2, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot take from %s", v.Kind()) + } + n := reflect.ValueOf(args[1]) + if !n.CanInt() { + return nil, fmt.Errorf("cannot take %s elements", n.Kind()) + } + if n.Int() > int64(v.Len()) { + return args[0], nil + } + return v.Slice(0, int(n.Int())).Interface(), nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 2 { + return anyType, fmt.Errorf("invalid number of arguments (expected 2, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot take from %s", args[0]) + } + switch kind(args[1]) { + case reflect.Interface, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + default: + return anyType, fmt.Errorf("cannot take %s elements", args[1]) + } + return args[0], nil + }, + }, + { + Name: "keys", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Map { + return nil, fmt.Errorf("cannot get keys from %s", v.Kind()) + } + keys := v.MapKeys() + out := make([]any, len(keys)) + for i, key := range keys { + out[i] = key.Interface() + } + return out, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface: + return arrayType, nil + case reflect.Map: + return arrayType, nil + } + return anyType, fmt.Errorf("cannot get keys from %s", args[0]) + }, + }, + { + Name: "values", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Map { + return nil, fmt.Errorf("cannot get values from %s", v.Kind()) + } + keys := v.MapKeys() + out := make([]any, len(keys)) + for i, key := range keys { + out[i] = v.MapIndex(key).Interface() + } + return out, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface: + return arrayType, nil + case reflect.Map: + return arrayType, nil + } + return anyType, fmt.Errorf("cannot get values from %s", args[0]) + }, + }, + { + Name: "toPairs", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Map { + return nil, fmt.Errorf("cannot transform %s to pairs", v.Kind()) + } + keys := v.MapKeys() + out := make([][2]any, len(keys)) + for i, key := range keys { + out[i] = [2]any{key.Interface(), v.MapIndex(key).Interface()} + } + return out, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Map: + return arrayType, nil + } + return anyType, fmt.Errorf("cannot transform %s to pairs", args[0]) + }, + }, + { + Name: "fromPairs", + Func: func(args ...any) (any, error) { + if len(args) != 1 { + return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot transform %s from pairs", v) + } + out := reflect.MakeMap(mapType) + for i := 0; i < v.Len(); i++ { + pair := deref(v.Index(i)) + if pair.Kind() != reflect.Array && pair.Kind() != reflect.Slice { + return nil, fmt.Errorf("invalid pair %v", pair) + } + if pair.Len() != 2 { + return nil, fmt.Errorf("invalid pair length %v", pair) + } + key := pair.Index(0) + value := pair.Index(1) + out.SetMapIndex(key, value) + } + return out.Interface(), nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + return mapType, nil + } + return anyType, fmt.Errorf("cannot transform %s from pairs", args[0]) + }, + }, + { + Name: "sort", + Func: func(args ...any) (any, error) { + if len(args) != 1 && len(args) != 2 { + return nil, fmt.Errorf("invalid number of arguments (expected 1 or 2, got %d)", len(args)) + } + + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot sort %s", v.Kind()) + } + + orderBy := OrderBy{} + if len(args) == 2 { + dir, err := ascOrDesc(args[1]) + if err != nil { + return nil, err + } + orderBy.Desc = dir + } + + sortable, err := copyArray(v, orderBy) + if err != nil { + return nil, err + } + sort.Sort(sortable) + return sortable.Array, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 1 && len(args) != 2 { + return anyType, fmt.Errorf("invalid number of arguments (expected 1 or 2, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot sort %s", args[0]) + } + if len(args) == 2 { + switch kind(args[1]) { + case reflect.String, reflect.Interface: + default: + return anyType, fmt.Errorf("invalid argument for sort (expected string, got %s)", args[1]) + } + } + return arrayType, nil + }, + }, + { + Name: "sortBy", + Func: func(args ...any) (any, error) { + if len(args) != 2 && len(args) != 3 { + return nil, fmt.Errorf("invalid number of arguments (expected 2 or 3, got %d)", len(args)) + } + + v := reflect.ValueOf(args[0]) + if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { + return nil, fmt.Errorf("cannot sort %s", v.Kind()) + } + + orderBy := OrderBy{} + + field, ok := args[1].(string) + if !ok { + return nil, fmt.Errorf("invalid argument for sort (expected string, got %s)", reflect.TypeOf(args[1])) + } + orderBy.Field = field + + if len(args) == 3 { + dir, err := ascOrDesc(args[2]) + if err != nil { + return nil, err + } + orderBy.Desc = dir + } + + sortable, err := copyArray(v, orderBy) + if err != nil { + return nil, err + } + sort.Sort(sortable) + return sortable.Array, nil + }, + Validate: func(args []reflect.Type) (reflect.Type, error) { + if len(args) != 2 && len(args) != 3 { + return anyType, fmt.Errorf("invalid number of arguments (expected 2 or 3, got %d)", len(args)) + } + switch kind(args[0]) { + case reflect.Interface, reflect.Slice, reflect.Array: + default: + return anyType, fmt.Errorf("cannot sort %s", args[0]) + } + switch kind(args[1]) { + case reflect.String, reflect.Interface: + default: + return anyType, fmt.Errorf("invalid argument for sort (expected string, got %s)", args[1]) + } + if len(args) == 3 { + switch kind(args[2]) { + case reflect.String, reflect.Interface: + default: + return anyType, fmt.Errorf("invalid argument for sort (expected string, got %s)", args[1]) + } + } + return arrayType, nil + }, + }, } diff --git a/vendor/github.com/antonmedv/expr/builtin/func.go b/vendor/github.com/antonmedv/expr/builtin/func.go new file mode 100644 index 0000000000..7c042c6d28 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/builtin/func.go @@ -0,0 +1,237 @@ +package builtin + +import ( + "fmt" + "reflect" + "strconv" + + "github.com/antonmedv/expr/vm/runtime" +) + +func Len(x any) any { + v := reflect.ValueOf(x) + switch v.Kind() { + case reflect.Array, reflect.Slice, reflect.Map, reflect.String: + return v.Len() + default: + panic(fmt.Sprintf("invalid argument for len (type %T)", x)) + } +} + +func Type(arg any) any { + if arg == nil { + return "nil" + } + v := reflect.ValueOf(arg) + for { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } else if v.Kind() == reflect.Interface { + v = v.Elem() + } else { + break + } + } + if v.Type().Name() != "" && v.Type().PkgPath() != "" { + return fmt.Sprintf("%s.%s", v.Type().PkgPath(), v.Type().Name()) + } + switch v.Type().Kind() { + case reflect.Invalid: + return "invalid" + case reflect.Bool: + return "bool" + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return "int" + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return "uint" + case reflect.Float32, reflect.Float64: + return "float" + case reflect.String: + return "string" + case reflect.Array, reflect.Slice: + return "array" + case reflect.Map: + return "map" + case reflect.Func: + return "func" + case reflect.Struct: + return "struct" + } + return "unknown" +} + +func Abs(x any) any { + switch x.(type) { + case float32: + if x.(float32) < 0 { + return -x.(float32) + } else { + return x + } + case float64: + if x.(float64) < 0 { + return -x.(float64) + } else { + return x + } + case int: + if x.(int) < 0 { + return -x.(int) + } else { + return x + } + case int8: + if x.(int8) < 0 { + return -x.(int8) + } else { + return x + } + case int16: + if x.(int16) < 0 { + return -x.(int16) + } else { + return x + } + case int32: + if x.(int32) < 0 { + return -x.(int32) + } else { + return x + } + case int64: + if x.(int64) < 0 { + return -x.(int64) + } else { + return x + } + case uint: + if x.(uint) < 0 { + return -x.(uint) + } else { + return x + } + case uint8: + if x.(uint8) < 0 { + return -x.(uint8) + } else { + return x + } + case uint16: + if x.(uint16) < 0 { + return -x.(uint16) + } else { + return x + } + case uint32: + if x.(uint32) < 0 { + return -x.(uint32) + } else { + return x + } + case uint64: + if x.(uint64) < 0 { + return -x.(uint64) + } else { + return x + } + } + panic(fmt.Sprintf("invalid argument for abs (type %T)", x)) +} + +func Int(x any) any { + switch x := x.(type) { + case float32: + return int(x) + case float64: + return int(x) + case int: + return x + case int8: + return int(x) + case int16: + return int(x) + case int32: + return int(x) + case int64: + return int(x) + case uint: + return int(x) + case uint8: + return int(x) + case uint16: + return int(x) + case uint32: + return int(x) + case uint64: + return int(x) + case string: + i, err := strconv.Atoi(x) + if err != nil { + panic(fmt.Sprintf("invalid operation: int(%s)", x)) + } + return i + default: + panic(fmt.Sprintf("invalid operation: int(%T)", x)) + } +} + +func Float(x any) any { + switch x := x.(type) { + case float32: + return float64(x) + case float64: + return x + case int: + return float64(x) + case int8: + return float64(x) + case int16: + return float64(x) + case int32: + return float64(x) + case int64: + return float64(x) + case uint: + return float64(x) + case uint8: + return float64(x) + case uint16: + return float64(x) + case uint32: + return float64(x) + case uint64: + return float64(x) + case string: + f, err := strconv.ParseFloat(x, 64) + if err != nil { + panic(fmt.Sprintf("invalid operation: float(%s)", x)) + } + return f + default: + panic(fmt.Sprintf("invalid operation: float(%T)", x)) + } +} + +func String(arg any) any { + return fmt.Sprintf("%v", arg) +} + +func Max(args ...any) (any, error) { + var max any + for _, arg := range args { + if max == nil || runtime.Less(max, arg) { + max = arg + } + } + return max, nil +} + +func Min(args ...any) (any, error) { + var min any + for _, arg := range args { + if min == nil || runtime.More(min, arg) { + min = arg + } + } + return min, nil +} diff --git a/vendor/github.com/antonmedv/expr/builtin/sort.go b/vendor/github.com/antonmedv/expr/builtin/sort.go new file mode 100644 index 0000000000..31e302c727 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/builtin/sort.go @@ -0,0 +1,91 @@ +package builtin + +import ( + "fmt" + "reflect" +) + +type Sortable struct { + Array []any + Values []reflect.Value + OrderBy +} + +type OrderBy struct { + Field string + Desc bool +} + +func (s *Sortable) Len() int { + return len(s.Array) +} + +func (s *Sortable) Swap(i, j int) { + s.Array[i], s.Array[j] = s.Array[j], s.Array[i] + s.Values[i], s.Values[j] = s.Values[j], s.Values[i] +} + +func (s *Sortable) Less(i, j int) bool { + a, b := s.Values[i], s.Values[j] + switch a.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if s.Desc { + return a.Int() > b.Int() + } + return a.Int() < b.Int() + case reflect.String: + if s.Desc { + return a.String() > b.String() + } + return a.String() < b.String() + default: + panic(fmt.Sprintf("sort: unsupported type %s", a.Kind())) + } +} + +func copyArray(v reflect.Value, orderBy OrderBy) (*Sortable, error) { + s := &Sortable{ + Array: make([]any, v.Len()), + Values: make([]reflect.Value, v.Len()), + OrderBy: orderBy, + } + var prev reflect.Value + for i := 0; i < s.Len(); i++ { + elem := deref(v.Index(i)) + var value reflect.Value + switch elem.Kind() { + case reflect.Struct: + value = elem.FieldByName(s.Field) + case reflect.Map: + value = elem.MapIndex(reflect.ValueOf(s.Field)) + default: + value = elem + } + value = deref(value) + + s.Array[i] = elem.Interface() + s.Values[i] = value + + if i == 0 { + prev = value + } else if value.Type() != prev.Type() { + return nil, fmt.Errorf("cannot sort array of different types (%s and %s)", value.Type(), prev.Type()) + } + } + return s, nil +} + +func ascOrDesc(arg any) (bool, error) { + dir, ok := arg.(string) + if !ok { + return false, fmt.Errorf("invalid argument for sort (expected string, got %s)", reflect.TypeOf(arg)) + } + switch dir { + case "desc": + return true, nil + case "asc": + return false, nil + default: + return false, fmt.Errorf(`invalid argument for sort (expected "asc" or "desc", got %q)`, dir) + } +} diff --git a/vendor/github.com/antonmedv/expr/builtin/utils.go b/vendor/github.com/antonmedv/expr/builtin/utils.go new file mode 100644 index 0000000000..eff8fdcd1d --- /dev/null +++ b/vendor/github.com/antonmedv/expr/builtin/utils.go @@ -0,0 +1,65 @@ +package builtin + +import ( + "fmt" + "reflect" +) + +var ( + anyType = reflect.TypeOf(new(any)).Elem() + integerType = reflect.TypeOf(0) + floatType = reflect.TypeOf(float64(0)) + arrayType = reflect.TypeOf([]any{}) + mapType = reflect.TypeOf(map[any]any{}) +) + +func kind(t reflect.Type) reflect.Kind { + if t == nil { + return reflect.Invalid + } + return t.Kind() +} + +func types(types ...any) []reflect.Type { + ts := make([]reflect.Type, len(types)) + for i, t := range types { + t := reflect.TypeOf(t) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if t.Kind() != reflect.Func { + panic("not a function") + } + ts[i] = t + } + return ts +} + +func deref(v reflect.Value) reflect.Value { + if v.Kind() == reflect.Interface { + if v.IsNil() { + return v + } + v = v.Elem() + } + +loop: + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return v + } + indirect := reflect.Indirect(v) + switch indirect.Kind() { + case reflect.Struct, reflect.Map, reflect.Array, reflect.Slice: + break loop + default: + v = v.Elem() + } + } + + if v.IsValid() { + return v + } + + panic(fmt.Sprintf("cannot deref %s", v)) +} diff --git a/vendor/github.com/antonmedv/expr/checker/checker.go b/vendor/github.com/antonmedv/expr/checker/checker.go index 00025a33ce..efa1b7eb93 100644 --- a/vendor/github.com/antonmedv/expr/checker/checker.go +++ b/vendor/github.com/antonmedv/expr/checker/checker.go @@ -18,11 +18,7 @@ func Check(tree *parser.Tree, config *conf.Config) (t reflect.Type, err error) { config = conf.New(nil) } - v := &visitor{ - config: config, - collections: make([]reflect.Type, 0), - parents: make([]ast.Node, 0), - } + v := &checker{config: config} t, _ = v.visit(tree.Node) @@ -31,9 +27,15 @@ func Check(tree *parser.Tree, config *conf.Config) (t reflect.Type, err error) { } if v.config.Expect != reflect.Invalid { + if v.config.ExpectAny { + if isAny(t) { + return t, nil + } + } + switch v.config.Expect { case reflect.Int, reflect.Int64, reflect.Float64: - if !isNumber(t) && !isAny(t) { + if !isNumber(t) { return nil, fmt.Errorf("expected %v, but got %v", v.config.Expect, t) } default: @@ -49,19 +51,31 @@ func Check(tree *parser.Tree, config *conf.Config) (t reflect.Type, err error) { return t, nil } -type visitor struct { - config *conf.Config - collections []reflect.Type - parents []ast.Node - err *file.Error +type checker struct { + config *conf.Config + predicateScopes []predicateScope + varScopes []varScope + parents []ast.Node + err *file.Error +} + +type predicateScope struct { + vtype reflect.Type + vars map[string]reflect.Type +} + +type varScope struct { + name string + vtype reflect.Type + info info } type info struct { method bool - fn *builtin.Function + fn *ast.Function } -func (v *visitor) visit(node ast.Node) (reflect.Type, info) { +func (v *checker) visit(node ast.Node) (reflect.Type, info) { var t reflect.Type var i info v.parents = append(v.parents, node) @@ -98,6 +112,8 @@ func (v *visitor) visit(node ast.Node) (reflect.Type, info) { t, i = v.ClosureNode(n) case *ast.PointerNode: t, i = v.PointerNode(n) + case *ast.VariableDeclaratorNode: + t, i = v.VariableDeclaratorNode(n) case *ast.ConditionalNode: t, i = v.ConditionalNode(n) case *ast.ArrayNode: @@ -114,7 +130,7 @@ func (v *visitor) visit(node ast.Node) (reflect.Type, info) { return t, i } -func (v *visitor) error(node ast.Node, format string, args ...interface{}) (reflect.Type, info) { +func (v *checker) error(node ast.Node, format string, args ...any) (reflect.Type, info) { if v.err == nil { // show first error v.err = &file.Error{ Location: node.Location(), @@ -124,29 +140,31 @@ func (v *visitor) error(node ast.Node, format string, args ...interface{}) (refl return anyType, info{} // interface represent undefined type } -func (v *visitor) NilNode(*ast.NilNode) (reflect.Type, info) { +func (v *checker) NilNode(*ast.NilNode) (reflect.Type, info) { return nilType, info{} } -func (v *visitor) IdentifierNode(node *ast.IdentifierNode) (reflect.Type, info) { +func (v *checker) IdentifierNode(node *ast.IdentifierNode) (reflect.Type, info) { + if s, ok := v.lookupVariable(node.Value); ok { + return s.vtype, s.info + } + if node.Value == "$env" { + return mapType, info{} + } + if fn, ok := v.config.Builtins[node.Value]; ok { + return functionType, info{fn: fn} + } if fn, ok := v.config.Functions[node.Value]; ok { - // Return anyType instead of func type as we don't know the arguments yet. - // The func type can be one of the fn.Types. The type will be resolved - // when the arguments are known in CallNode. - return anyType, info{fn: fn} - } - if v.config.Types == nil { - node.Deref = true - } else if t, ok := v.config.Types[node.Value]; ok { + return functionType, info{fn: fn} + } + if t, ok := v.config.Types[node.Value]; ok { if t.Ambiguous { return v.error(node, "ambiguous identifier %v", node.Value) } - d, c := deref(t.Type) - node.Deref = c node.Method = t.Method node.MethodIndex = t.MethodIndex node.FieldIndex = t.FieldIndex - return d, info{method: t.Method} + return t.Type, info{method: t.Method} } if v.config.Strict { return v.error(node, "unknown name %v", node.Value) @@ -157,29 +175,31 @@ func (v *visitor) IdentifierNode(node *ast.IdentifierNode) (reflect.Type, info) return anyType, info{} } -func (v *visitor) IntegerNode(*ast.IntegerNode) (reflect.Type, info) { +func (v *checker) IntegerNode(*ast.IntegerNode) (reflect.Type, info) { return integerType, info{} } -func (v *visitor) FloatNode(*ast.FloatNode) (reflect.Type, info) { +func (v *checker) FloatNode(*ast.FloatNode) (reflect.Type, info) { return floatType, info{} } -func (v *visitor) BoolNode(*ast.BoolNode) (reflect.Type, info) { +func (v *checker) BoolNode(*ast.BoolNode) (reflect.Type, info) { return boolType, info{} } -func (v *visitor) StringNode(*ast.StringNode) (reflect.Type, info) { +func (v *checker) StringNode(*ast.StringNode) (reflect.Type, info) { return stringType, info{} } -func (v *visitor) ConstantNode(node *ast.ConstantNode) (reflect.Type, info) { +func (v *checker) ConstantNode(node *ast.ConstantNode) (reflect.Type, info) { return reflect.TypeOf(node.Value), info{} } -func (v *visitor) UnaryNode(node *ast.UnaryNode) (reflect.Type, info) { +func (v *checker) UnaryNode(node *ast.UnaryNode) (reflect.Type, info) { t, _ := v.visit(node.Node) + t = deref(t) + switch node.Operator { case "!", "not": @@ -205,10 +225,13 @@ func (v *visitor) UnaryNode(node *ast.UnaryNode) (reflect.Type, info) { return v.error(node, `invalid operation: %v (mismatched type %v)`, node.Operator, t) } -func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { +func (v *checker) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { l, _ := v.visit(node.Left) r, _ := v.visit(node.Right) + l = deref(l) + r = deref(r) + // check operator overloading if fns, ok := v.config.Operators[node.Operator]; ok { t, _, ok := conf.FindSuitableOperatorOverload(fns, v.config.Types, l, r) @@ -219,16 +242,7 @@ func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { switch node.Operator { case "==", "!=": - if isNumber(l) && isNumber(r) { - return boolType, info{} - } - if l == nil || r == nil { // It is possible to compare with nil. - return boolType, info{} - } - if l.Kind() == r.Kind() { - return boolType, info{} - } - if isAny(l) || isAny(r) { + if isComparable(l, r) { return boolType, info{} } @@ -261,11 +275,14 @@ func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { if isTime(l) && isTime(r) { return durationType, info{} } + if isTime(l) && isDuration(r) { + return timeType, info{} + } if or(l, r, isNumber, isTime) { return anyType, info{} } - case "/", "*": + case "*": if isNumber(l) && isNumber(r) { return combined(l, r), info{} } @@ -273,6 +290,14 @@ func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { return anyType, info{} } + case "/": + if isNumber(l) && isNumber(r) { + return floatType, info{} + } + if or(l, r, isNumber) { + return floatType, info{} + } + case "**", "^": if isNumber(l) && isNumber(r) { return floatType, info{} @@ -311,9 +336,21 @@ func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { return boolType, info{} } if isMap(r) { + if l == nil { // It is possible to compare with nil. + return boolType, info{} + } + if !isAny(l) && !l.AssignableTo(r.Key()) { + return v.error(node, "cannot use %v as type %v in map key", l, r.Key()) + } return boolType, info{} } if isArray(r) { + if l == nil { // It is possible to compare with nil. + return boolType, info{} + } + if !isComparable(l, r.Elem()) { + return v.error(node, "cannot use %v as type %v in array", l, r.Elem()) + } return boolType, info{} } if isAny(l) && anyOf(r, isString, isArray, isMap) { @@ -378,14 +415,25 @@ func (v *visitor) BinaryNode(node *ast.BinaryNode) (reflect.Type, info) { return v.error(node, `invalid operation: %v (mismatched types %v and %v)`, node.Operator, l, r) } -func (v *visitor) ChainNode(node *ast.ChainNode) (reflect.Type, info) { +func (v *checker) ChainNode(node *ast.ChainNode) (reflect.Type, info) { return v.visit(node.Node) } -func (v *visitor) MemberNode(node *ast.MemberNode) (reflect.Type, info) { +func (v *checker) MemberNode(node *ast.MemberNode) (reflect.Type, info) { base, _ := v.visit(node.Node) prop, _ := v.visit(node.Property) + if an, ok := node.Node.(*ast.IdentifierNode); ok && an.Value == "$env" { + // If the index is a constant string, can save some + // cycles later by finding the type of its referent + if name, ok := node.Property.(*ast.StringNode); ok { + if t, ok := v.config.Types[name.Value]; ok { + return t.Type, info{method: t.Method} + } // No error if no type found; it may be added to env between compile and run + } + return anyType, info{} + } + if name, ok := node.Property.(*ast.StringNode); ok { if base == nil { return v.error(node, "type %v has no field %v", base, name.Value) @@ -393,7 +441,7 @@ func (v *visitor) MemberNode(node *ast.MemberNode) (reflect.Type, info) { // First, check methods defined on base type itself, // independent of which type it is. Without dereferencing. if m, ok := base.MethodByName(name.Value); ok { - if base.Kind() == reflect.Interface { + if kind(base) == reflect.Interface { // In case of interface type method will not have a receiver, // and to prevent checker decreasing numbers of in arguments // return method type as not method (second argument is false). @@ -411,40 +459,33 @@ func (v *visitor) MemberNode(node *ast.MemberNode) (reflect.Type, info) { } } - if base.Kind() == reflect.Ptr { + if kind(base) == reflect.Ptr { base = base.Elem() } - switch base.Kind() { + switch kind(base) { case reflect.Interface: - node.Deref = true return anyType, info{} case reflect.Map: if prop != nil && !prop.AssignableTo(base.Key()) && !isAny(prop) { return v.error(node.Property, "cannot use %v to get an element from %v", prop, base) } - t, c := deref(base.Elem()) - node.Deref = c - return t, info{} + return base.Elem(), info{} case reflect.Array, reflect.Slice: if !isInteger(prop) && !isAny(prop) { return v.error(node.Property, "array elements can only be selected using an integer (got %v)", prop) } - t, c := deref(base.Elem()) - node.Deref = c - return t, info{} + return base.Elem(), info{} case reflect.Struct: if name, ok := node.Property.(*ast.StringNode); ok { propertyName := name.Value if field, ok := fetchField(base, propertyName); ok { - t, c := deref(field.Type) - node.Deref = c node.FieldIndex = field.Index node.Name = propertyName - return t, info{} + return field.Type, info{} } if len(v.parents) > 1 { if _, ok := v.parents[len(v.parents)-2].(*ast.CallNode); ok { @@ -458,10 +499,10 @@ func (v *visitor) MemberNode(node *ast.MemberNode) (reflect.Type, info) { return v.error(node, "type %v[%v] is undefined", base, prop) } -func (v *visitor) SliceNode(node *ast.SliceNode) (reflect.Type, info) { +func (v *checker) SliceNode(node *ast.SliceNode) (reflect.Type, info) { t, _ := v.visit(node.Node) - switch t.Kind() { + switch kind(t) { case reflect.Interface: // ok case reflect.String, reflect.Array, reflect.Slice: @@ -485,49 +526,12 @@ func (v *visitor) SliceNode(node *ast.SliceNode) (reflect.Type, info) { return t, info{} } -func (v *visitor) CallNode(node *ast.CallNode) (reflect.Type, info) { +func (v *checker) CallNode(node *ast.CallNode) (reflect.Type, info) { fn, fnInfo := v.visit(node.Callee) if fnInfo.fn != nil { - f := fnInfo.fn - node.Func = f - if f.Validate != nil { - args := make([]reflect.Type, len(node.Arguments)) - for i, arg := range node.Arguments { - args[i], _ = v.visit(arg) - } - t, err := f.Validate(args) - if err != nil { - return v.error(node, "%v", err) - } - return t, info{} - } - if len(f.Types) == 0 { - t, err := v.checkFunc(f.Name, functionType, false, node) - if err != nil { - if v.err == nil { - v.err = err - } - return anyType, info{} - } - // No type was specified, so we assume the function returns any. - return t, info{} - } - var lastErr *file.Error - for _, t := range f.Types { - outType, err := v.checkFunc(f.Name, t, false, node) - if err != nil { - lastErr = err - continue - } - return outType, info{} - } - if lastErr != nil { - if v.err == nil { - v.err = lastErr - } - return anyType, info{} - } + node.Func = fnInfo.fn + return v.checkFunction(fnInfo.fn, node, node.Arguments) } fnName := "function" @@ -555,12 +559,12 @@ func (v *visitor) CallNode(node *ast.CallNode) (reflect.Type, info) { fn.NumOut() == 1 && fn.Out(0).Kind() == reflect.Interface { rest := fn.In(fn.NumIn() - 1) // function has only one param for functions and two for methods - if rest.Kind() == reflect.Slice && rest.Elem().Kind() == reflect.Interface { + if kind(rest) == reflect.Slice && rest.Elem().Kind() == reflect.Interface { node.Fast = true } } - outType, err := v.checkFunc(fnName, fn, fnInfo.method, node) + outType, err := v.checkArguments(fnName, fn, fnInfo.method, node.Arguments, node) if err != nil { if v.err == nil { v.err = err @@ -575,7 +579,287 @@ func (v *visitor) CallNode(node *ast.CallNode) (reflect.Type, info) { return v.error(node, "%v is not callable", fn) } -func (v *visitor) checkFunc(name string, fn reflect.Type, method bool, node *ast.CallNode) (reflect.Type, *file.Error) { +func (v *checker) BuiltinNode(node *ast.BuiltinNode) (reflect.Type, info) { + switch node.Name { + case "all", "none", "any", "one": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { + return v.error(node.Arguments[1], "predicate should return boolean (got %v)", closure.Out(0).String()) + } + return boolType, info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "filter": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { + return v.error(node.Arguments[1], "predicate should return boolean (got %v)", closure.Out(0).String()) + } + if isAny(collection) { + return arrayType, info{} + } + return reflect.SliceOf(collection.Elem()), info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "map": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection, scopeVar{"index", integerType}) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + return reflect.SliceOf(closure.Out(0)), info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "count": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { + return v.error(node.Arguments[1], "predicate should return boolean (got %v)", closure.Out(0).String()) + } + + return integerType, info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "find", "findLast": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { + return v.error(node.Arguments[1], "predicate should return boolean (got %v)", closure.Out(0).String()) + } + if isAny(collection) { + return anyType, info{} + } + return collection.Elem(), info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "findIndex", "findLastIndex": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { + return v.error(node.Arguments[1], "predicate should return boolean (got %v)", closure.Out(0).String()) + } + return integerType, info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "groupBy": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if isFunc(closure) && + closure.NumOut() == 1 && + closure.NumIn() == 1 && isAny(closure.In(0)) { + + return reflect.TypeOf(map[any][]any{}), info{} + } + return v.error(node.Arguments[1], "predicate should has one input and one output param") + + case "reduce": + collection, _ := v.visit(node.Arguments[0]) + if !isArray(collection) && !isAny(collection) { + return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) + } + + v.begin(collection, scopeVar{"index", integerType}, scopeVar{"acc", anyType}) + closure, _ := v.visit(node.Arguments[1]) + v.end() + + if len(node.Arguments) == 3 { + _, _ = v.visit(node.Arguments[2]) + } + + if isFunc(closure) && closure.NumOut() == 1 { + return closure.Out(0), info{} + } + return v.error(node.Arguments[1], "predicate should has two input and one output param") + + } + + if id, ok := builtin.Index[node.Name]; ok { + switch node.Name { + case "get": + return v.checkBuiltinGet(node) + } + return v.checkFunction(builtin.Builtins[id], node, node.Arguments) + } + + return v.error(node, "unknown builtin %v", node.Name) +} + +type scopeVar struct { + name string + vtype reflect.Type +} + +func (v *checker) begin(vtype reflect.Type, vars ...scopeVar) { + scope := predicateScope{vtype: vtype, vars: make(map[string]reflect.Type)} + for _, v := range vars { + scope.vars[v.name] = v.vtype + } + v.predicateScopes = append(v.predicateScopes, scope) +} + +func (v *checker) end() { + v.predicateScopes = v.predicateScopes[:len(v.predicateScopes)-1] +} + +func (v *checker) checkBuiltinGet(node *ast.BuiltinNode) (reflect.Type, info) { + if len(node.Arguments) != 2 { + return v.error(node, "invalid number of arguments (expected 2, got %d)", len(node.Arguments)) + } + + val := node.Arguments[0] + prop := node.Arguments[1] + if id, ok := val.(*ast.IdentifierNode); ok && id.Value == "$env" { + if s, ok := prop.(*ast.StringNode); ok { + return v.config.Types[s.Value].Type, info{} + } + return anyType, info{} + } + + t, _ := v.visit(val) + + switch kind(t) { + case reflect.Interface: + return anyType, info{} + case reflect.Slice, reflect.Array: + p, _ := v.visit(prop) + if p == nil { + return v.error(prop, "cannot use nil as slice index") + } + if !isInteger(p) && !isAny(p) { + return v.error(prop, "non-integer slice index %v", p) + } + return t.Elem(), info{} + case reflect.Map: + p, _ := v.visit(prop) + if p == nil { + return v.error(prop, "cannot use nil as map index") + } + if !p.AssignableTo(t.Key()) && !isAny(p) { + return v.error(prop, "cannot use %v to get an element from %v", p, t) + } + return t.Elem(), info{} + } + return v.error(val, "type %v does not support indexing", t) +} + +func (v *checker) checkFunction(f *ast.Function, node ast.Node, arguments []ast.Node) (reflect.Type, info) { + if f.Validate != nil { + args := make([]reflect.Type, len(arguments)) + for i, arg := range arguments { + args[i], _ = v.visit(arg) + } + t, err := f.Validate(args) + if err != nil { + return v.error(node, "%v", err) + } + return t, info{} + } else if len(f.Types) == 0 { + t, err := v.checkArguments(f.Name, functionType, false, arguments, node) + if err != nil { + if v.err == nil { + v.err = err + } + return anyType, info{} + } + // No type was specified, so we assume the function returns any. + return t, info{} + } + var lastErr *file.Error + for _, t := range f.Types { + outType, err := v.checkArguments(f.Name, t, false, arguments, node) + if err != nil { + lastErr = err + continue + } + return outType, info{} + } + if lastErr != nil { + if v.err == nil { + v.err = lastErr + } + return anyType, info{} + } + + return v.error(node, "no matching overload for %v", f.Name) +} + +func (v *checker) checkArguments(name string, fn reflect.Type, method bool, arguments []ast.Node, node ast.Node) (reflect.Type, *file.Error) { if isAny(fn) { return anyType, nil } @@ -606,20 +890,20 @@ func (v *visitor) checkFunc(name string, fn reflect.Type, method bool, node *ast } if fn.IsVariadic() { - if len(node.Arguments) < fnNumIn-1 { + if len(arguments) < fnNumIn-1 { return anyType, &file.Error{ Location: node.Location(), Message: fmt.Sprintf("not enough arguments to call %v", name), } } } else { - if len(node.Arguments) > fnNumIn { + if len(arguments) > fnNumIn { return anyType, &file.Error{ Location: node.Location(), Message: fmt.Sprintf("too many arguments to call %v", name), } } - if len(node.Arguments) < fnNumIn { + if len(arguments) < fnNumIn { return anyType, &file.Error{ Location: node.Location(), Message: fmt.Sprintf("not enough arguments to call %v", name), @@ -627,7 +911,7 @@ func (v *visitor) checkFunc(name string, fn reflect.Type, method bool, node *ast } } - for i, arg := range node.Arguments { + for i, arg := range arguments { t, _ := v.visit(arg) var in reflect.Type @@ -639,16 +923,21 @@ func (v *visitor) checkFunc(name string, fn reflect.Type, method bool, node *ast in = fn.In(i + fnInOffset) } - if isIntegerOrArithmeticOperation(arg) && (isInteger(in) || isFloat(in)) { - t = in - setTypeForIntegers(arg, t) + if isFloat(in) { + traverseAndReplaceIntegerNodesWithFloatNodes(&arguments[i], in) + continue + } + + if isInteger(in) && isInteger(t) && kind(t) != kind(in) { + traverseAndReplaceIntegerNodesWithIntegerNodes(&arguments[i], in) + continue } if t == nil { continue } - if !t.AssignableTo(in) && t.Kind() != reflect.Interface { + if !t.AssignableTo(in) && kind(t) != reflect.Interface { return anyType, &file.Error{ Location: arg.Location(), Message: fmt.Sprintf("cannot use %v as argument (type %v) to call %v ", t, in, name), @@ -659,118 +948,101 @@ func (v *visitor) checkFunc(name string, fn reflect.Type, method bool, node *ast return fn.Out(0), nil } -func (v *visitor) BuiltinNode(node *ast.BuiltinNode) (reflect.Type, info) { - switch node.Name { - case "all", "none", "any", "one": - collection, _ := v.visit(node.Arguments[0]) - if !isArray(collection) && !isAny(collection) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) - } - - v.collections = append(v.collections, collection) - closure, _ := v.visit(node.Arguments[1]) - v.collections = v.collections[:len(v.collections)-1] - - if isFunc(closure) && - closure.NumOut() == 1 && - closure.NumIn() == 1 && isAny(closure.In(0)) { - - if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { - return v.error(node.Arguments[1], "closure should return boolean (got %v)", closure.Out(0).String()) - } - return boolType, info{} - } - return v.error(node.Arguments[1], "closure should has one input and one output param") - - case "filter": - collection, _ := v.visit(node.Arguments[0]) - if !isArray(collection) && !isAny(collection) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) - } - - v.collections = append(v.collections, collection) - closure, _ := v.visit(node.Arguments[1]) - v.collections = v.collections[:len(v.collections)-1] - - if isFunc(closure) && - closure.NumOut() == 1 && - closure.NumIn() == 1 && isAny(closure.In(0)) { - - if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { - return v.error(node.Arguments[1], "closure should return boolean (got %v)", closure.Out(0).String()) - } - if isAny(collection) { - return arrayType, info{} - } - return reflect.SliceOf(collection.Elem()), info{} - } - return v.error(node.Arguments[1], "closure should has one input and one output param") - - case "map": - collection, _ := v.visit(node.Arguments[0]) - if !isArray(collection) && !isAny(collection) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) - } - - v.collections = append(v.collections, collection) - closure, _ := v.visit(node.Arguments[1]) - v.collections = v.collections[:len(v.collections)-1] - - if isFunc(closure) && - closure.NumOut() == 1 && - closure.NumIn() == 1 && isAny(closure.In(0)) { - - return reflect.SliceOf(closure.Out(0)), info{} - } - return v.error(node.Arguments[1], "closure should has one input and one output param") - - case "count": - collection, _ := v.visit(node.Arguments[0]) - if !isArray(collection) && !isAny(collection) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection) +func traverseAndReplaceIntegerNodesWithFloatNodes(node *ast.Node, newType reflect.Type) { + switch (*node).(type) { + case *ast.IntegerNode: + *node = &ast.FloatNode{Value: float64((*node).(*ast.IntegerNode).Value)} + (*node).SetType(newType) + case *ast.UnaryNode: + unaryNode := (*node).(*ast.UnaryNode) + traverseAndReplaceIntegerNodesWithFloatNodes(&unaryNode.Node, newType) + case *ast.BinaryNode: + binaryNode := (*node).(*ast.BinaryNode) + switch binaryNode.Operator { + case "+", "-", "*": + traverseAndReplaceIntegerNodesWithFloatNodes(&binaryNode.Left, newType) + traverseAndReplaceIntegerNodesWithFloatNodes(&binaryNode.Right, newType) } + } +} - v.collections = append(v.collections, collection) - closure, _ := v.visit(node.Arguments[1]) - v.collections = v.collections[:len(v.collections)-1] - - if isFunc(closure) && - closure.NumOut() == 1 && - closure.NumIn() == 1 && isAny(closure.In(0)) { - if !isBool(closure.Out(0)) && !isAny(closure.Out(0)) { - return v.error(node.Arguments[1], "closure should return boolean (got %v)", closure.Out(0).String()) - } - - return integerType, info{} +func traverseAndReplaceIntegerNodesWithIntegerNodes(node *ast.Node, newType reflect.Type) { + switch (*node).(type) { + case *ast.IntegerNode: + (*node).SetType(newType) + case *ast.UnaryNode: + unaryNode := (*node).(*ast.UnaryNode) + traverseAndReplaceIntegerNodesWithIntegerNodes(&unaryNode.Node, newType) + case *ast.BinaryNode: + binaryNode := (*node).(*ast.BinaryNode) + switch binaryNode.Operator { + case "+", "-", "*": + traverseAndReplaceIntegerNodesWithIntegerNodes(&binaryNode.Left, newType) + traverseAndReplaceIntegerNodesWithIntegerNodes(&binaryNode.Right, newType) } - return v.error(node.Arguments[1], "closure should has one input and one output param") - - default: - return v.error(node, "unknown builtin %v", node.Name) } } -func (v *visitor) ClosureNode(node *ast.ClosureNode) (reflect.Type, info) { +func (v *checker) ClosureNode(node *ast.ClosureNode) (reflect.Type, info) { t, _ := v.visit(node.Node) + if t == nil { + return v.error(node.Node, "closure cannot be nil") + } return reflect.FuncOf([]reflect.Type{anyType}, []reflect.Type{t}, false), info{} } -func (v *visitor) PointerNode(node *ast.PointerNode) (reflect.Type, info) { - if len(v.collections) == 0 { +func (v *checker) PointerNode(node *ast.PointerNode) (reflect.Type, info) { + if len(v.predicateScopes) == 0 { return v.error(node, "cannot use pointer accessor outside closure") } + scope := v.predicateScopes[len(v.predicateScopes)-1] + if node.Name == "" { + switch scope.vtype.Kind() { + case reflect.Interface: + return anyType, info{} + case reflect.Array, reflect.Slice: + return scope.vtype.Elem(), info{} + } + return v.error(node, "cannot use %v as array", scope) + } + if scope.vars != nil { + if t, ok := scope.vars[node.Name]; ok { + return t, info{} + } + } + return v.error(node, "unknown pointer #%v", node.Name) +} - collection := v.collections[len(v.collections)-1] - switch collection.Kind() { - case reflect.Interface: - return anyType, info{} - case reflect.Array, reflect.Slice: - return collection.Elem(), info{} +func (v *checker) VariableDeclaratorNode(node *ast.VariableDeclaratorNode) (reflect.Type, info) { + if _, ok := v.config.Types[node.Name]; ok { + return v.error(node, "cannot redeclare %v", node.Name) + } + if _, ok := v.config.Functions[node.Name]; ok { + return v.error(node, "cannot redeclare function %v", node.Name) + } + if _, ok := v.config.Builtins[node.Name]; ok { + return v.error(node, "cannot redeclare builtin %v", node.Name) + } + if _, ok := v.lookupVariable(node.Name); ok { + return v.error(node, "cannot redeclare variable %v", node.Name) + } + vtype, vinfo := v.visit(node.Value) + v.varScopes = append(v.varScopes, varScope{node.Name, vtype, vinfo}) + t, i := v.visit(node.Expr) + v.varScopes = v.varScopes[:len(v.varScopes)-1] + return t, i +} + +func (v *checker) lookupVariable(name string) (varScope, bool) { + for i := len(v.varScopes) - 1; i >= 0; i-- { + if v.varScopes[i].name == name { + return v.varScopes[i], true + } } - return v.error(node, "cannot use %v as array", collection) + return varScope{}, false } -func (v *visitor) ConditionalNode(node *ast.ConditionalNode) (reflect.Type, info) { +func (v *checker) ConditionalNode(node *ast.ConditionalNode) (reflect.Type, info) { c, _ := v.visit(node.Cond) if !isBool(c) && !isAny(c) { return v.error(node.Cond, "non-bool expression (type %v) used as condition", c) @@ -794,27 +1066,27 @@ func (v *visitor) ConditionalNode(node *ast.ConditionalNode) (reflect.Type, info return anyType, info{} } -func (v *visitor) ArrayNode(node *ast.ArrayNode) (reflect.Type, info) { +func (v *checker) ArrayNode(node *ast.ArrayNode) (reflect.Type, info) { for _, node := range node.Nodes { v.visit(node) } return arrayType, info{} } -func (v *visitor) MapNode(node *ast.MapNode) (reflect.Type, info) { +func (v *checker) MapNode(node *ast.MapNode) (reflect.Type, info) { for _, pair := range node.Pairs { v.visit(pair) } return mapType, info{} } -func (v *visitor) PairNode(node *ast.PairNode) (reflect.Type, info) { +func (v *checker) PairNode(node *ast.PairNode) (reflect.Type, info) { v.visit(node.Key) v.visit(node.Value) return nilType, info{} } -func (v *visitor) findTypedFunc(node *ast.CallNode, fn reflect.Type, method bool) { +func (v *checker) findTypedFunc(node *ast.CallNode, fn reflect.Type, method bool) { // OnCallTyped doesn't work for functions with variadic arguments, // and doesn't work named function, like `type MyFunc func() int`. // In PkgPath() is an empty string, it's unnamed function. diff --git a/vendor/github.com/antonmedv/expr/checker/types.go b/vendor/github.com/antonmedv/expr/checker/types.go index 7ccd894809..890d74a5f2 100644 --- a/vendor/github.com/antonmedv/expr/checker/types.go +++ b/vendor/github.com/antonmedv/expr/checker/types.go @@ -4,7 +4,6 @@ import ( "reflect" "time" - "github.com/antonmedv/expr/ast" "github.com/antonmedv/expr/conf" ) @@ -14,13 +13,12 @@ var ( integerType = reflect.TypeOf(0) floatType = reflect.TypeOf(float64(0)) stringType = reflect.TypeOf("") - arrayType = reflect.TypeOf([]interface{}{}) - mapType = reflect.TypeOf(map[string]interface{}{}) - anyType = reflect.TypeOf(new(interface{})).Elem() + arrayType = reflect.TypeOf([]any{}) + mapType = reflect.TypeOf(map[string]any{}) + anyType = reflect.TypeOf(new(any)).Elem() timeType = reflect.TypeOf(time.Time{}) durationType = reflect.TypeOf(time.Duration(0)) - functionType = reflect.TypeOf(new(func(...interface{}) (interface{}, error))).Elem() - errorType = reflect.TypeOf((*error)(nil)).Elem() + functionType = reflect.TypeOf(new(func(...any) (any, error))).Elem() ) func combined(a, b reflect.Type) reflect.Type { @@ -98,7 +96,7 @@ func isTime(t reflect.Type) bool { return true } } - return isAny(t) + return false } func isDuration(t reflect.Type) bool { @@ -204,59 +202,43 @@ func fetchField(t reflect.Type, name string) (reflect.StructField, bool) { return reflect.StructField{}, false } -func deref(t reflect.Type) (reflect.Type, bool) { +func deref(t reflect.Type) reflect.Type { if t == nil { - return nil, false + return nil } if t.Kind() == reflect.Interface { - return t, true + return t } - found := false for t != nil && t.Kind() == reflect.Ptr { e := t.Elem() switch e.Kind() { case reflect.Struct, reflect.Map, reflect.Array, reflect.Slice: - return t, false + return t default: - found = true t = e } } - return t, found + return t } -func isIntegerOrArithmeticOperation(node ast.Node) bool { - switch n := node.(type) { - case *ast.IntegerNode: - return true - case *ast.UnaryNode: - switch n.Operator { - case "+", "-": - return true - } - case *ast.BinaryNode: - switch n.Operator { - case "+", "/", "-", "*": - return true - } +func kind(t reflect.Type) reflect.Kind { + if t == nil { + return reflect.Invalid } - return false + return t.Kind() } -func setTypeForIntegers(node ast.Node, t reflect.Type) { - switch n := node.(type) { - case *ast.IntegerNode: - n.SetType(t) - case *ast.UnaryNode: - switch n.Operator { - case "+", "-": - setTypeForIntegers(n.Node, t) - } - case *ast.BinaryNode: - switch n.Operator { - case "+", "/", "-", "*": - setTypeForIntegers(n.Left, t) - setTypeForIntegers(n.Right, t) - } +func isComparable(l, r reflect.Type) bool { + if l == nil || r == nil { + return true + } + switch { + case l.Kind() == r.Kind(): + return true + case isNumber(l) && isNumber(r): + return true + case isAny(l) || isAny(r): + return true } + return false } diff --git a/vendor/github.com/antonmedv/expr/compiler/compiler.go b/vendor/github.com/antonmedv/expr/compiler/compiler.go index 3cd32af0f2..8e26d8788e 100644 --- a/vendor/github.com/antonmedv/expr/compiler/compiler.go +++ b/vendor/github.com/antonmedv/expr/compiler/compiler.go @@ -5,6 +5,7 @@ import ( "reflect" "github.com/antonmedv/expr/ast" + "github.com/antonmedv/expr/builtin" "github.com/antonmedv/expr/conf" "github.com/antonmedv/expr/file" "github.com/antonmedv/expr/parser" @@ -25,8 +26,9 @@ func Compile(tree *parser.Tree, config *conf.Config) (program *Program, err erro c := &compiler{ locations: make([]file.Location, 0), - constantsIndex: make(map[interface{}]int), + constantsIndex: make(map[any]int), functionsIndex: make(map[string]int), + debugInfo: make(map[string]string), } if config != nil { @@ -49,10 +51,12 @@ func Compile(tree *parser.Tree, config *conf.Config) (program *Program, err erro Node: tree.Node, Source: tree.Source, Locations: c.locations, + Variables: c.variables, Constants: c.constants, Bytecode: c.bytecode, Arguments: c.arguments, Functions: c.functions, + DebugInfo: c.debugInfo, } return } @@ -60,10 +64,13 @@ func Compile(tree *parser.Tree, config *conf.Config) (program *Program, err erro type compiler struct { locations []file.Location bytecode []Opcode - constants []interface{} - constantsIndex map[interface{}]int + variables []any + scopes []scope + constants []any + constantsIndex map[any]int functions []Function functionsIndex map[string]int + debugInfo map[string]string mapEnv bool cast reflect.Kind nodes []ast.Node @@ -71,6 +78,11 @@ type compiler struct { arguments []int } +type scope struct { + variableName string + index int +} + func (c *compiler) emitLocation(loc file.Location, op Opcode, arg int) int { c.bytecode = append(c.bytecode, op) current := len(c.bytecode) @@ -94,11 +106,11 @@ func (c *compiler) emit(op Opcode, args ...int) int { return c.emitLocation(loc, op, arg) } -func (c *compiler) emitPush(value interface{}) int { +func (c *compiler) emitPush(value any) int { return c.emit(OpPush, c.addConstant(value)) } -func (c *compiler) addConstant(constant interface{}) int { +func (c *compiler) addConstant(constant any) int { indexable := true hash := constant switch reflect.TypeOf(constant).Kind() { @@ -126,16 +138,42 @@ func (c *compiler) addConstant(constant interface{}) int { return p } -func (c *compiler) addFunction(node *ast.CallNode) int { - if node.Func == nil { +func (c *compiler) addVariable(name string) int { + c.variables = append(c.variables, nil) + p := len(c.variables) - 1 + c.debugInfo[fmt.Sprintf("var_%d", p)] = name + return p +} + +// emitFunction adds builtin.Function.Func to the program.Functions and emits call opcode. +func (c *compiler) emitFunction(fn *ast.Function, argsLen int) { + switch argsLen { + case 0: + c.emit(OpCall0, c.addFunction(fn)) + case 1: + c.emit(OpCall1, c.addFunction(fn)) + case 2: + c.emit(OpCall2, c.addFunction(fn)) + case 3: + c.emit(OpCall3, c.addFunction(fn)) + default: + c.emit(OpLoadFunc, c.addFunction(fn)) + c.emit(OpCallN, argsLen) + } +} + +// addFunction adds builtin.Function.Func to the program.Functions and returns its index. +func (c *compiler) addFunction(fn *ast.Function) int { + if fn == nil { panic("function is nil") } - if p, ok := c.functionsIndex[node.Func.Name]; ok { + if p, ok := c.functionsIndex[fn.Name]; ok { return p } p := len(c.functions) - c.functions = append(c.functions, node.Func.Func) - c.functionsIndex[node.Func.Name] = p + c.functions = append(c.functions, fn.Func) + c.functionsIndex[fn.Name] = p + c.debugInfo[fmt.Sprintf("func_%d", p)] = fn.Name return p } @@ -187,6 +225,8 @@ func (c *compiler) compile(node ast.Node) { c.ClosureNode(n) case *ast.PointerNode: c.PointerNode(n) + case *ast.VariableDeclaratorNode: + c.VariableDeclaratorNode(n) case *ast.ConditionalNode: c.ConditionalNode(n) case *ast.ArrayNode: @@ -205,6 +245,14 @@ func (c *compiler) NilNode(_ *ast.NilNode) { } func (c *compiler) IdentifierNode(node *ast.IdentifierNode) { + if index, ok := c.lookupVariable(node.Value); ok { + c.emit(OpLoadVar, index) + return + } + if node.Value == "$env" { + c.emit(OpLoadEnv) + return + } if c.mapEnv { c.emit(OpLoadFast, c.addConstant(node.Value)) } else if len(node.FieldIndex) > 0 { @@ -220,11 +268,6 @@ func (c *compiler) IdentifierNode(node *ast.IdentifierNode) { } else { c.emit(OpLoadConst, c.addConstant(node.Value)) } - if node.Deref { - c.emit(OpDeref) - } else if node.Type() == nil { - c.emit(OpDeref) - } } func (c *compiler) IntegerNode(node *ast.IntegerNode) { @@ -264,7 +307,17 @@ func (c *compiler) IntegerNode(node *ast.IntegerNode) { } func (c *compiler) FloatNode(node *ast.FloatNode) { - c.emitPush(node.Value) + t := node.Type() + if t == nil { + c.emitPush(node.Value) + return + } + switch t.Kind() { + case reflect.Float32: + c.emitPush(float32(node.Value)) + case reflect.Float64: + c.emitPush(node.Value) + } } func (c *compiler) BoolNode(node *ast.BoolNode) { @@ -285,6 +338,7 @@ func (c *compiler) ConstantNode(node *ast.ConstantNode) { func (c *compiler) UnaryNode(node *ast.UnaryNode) { c.compile(node.Node) + c.derefInNeeded(node.Node) switch node.Operator { @@ -309,7 +363,9 @@ func (c *compiler) BinaryNode(node *ast.BinaryNode) { switch node.Operator { case "==": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Left) if l == r && l == reflect.Int { c.emit(OpEqualInt) @@ -321,114 +377,155 @@ func (c *compiler) BinaryNode(node *ast.BinaryNode) { case "!=": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Left) c.emit(OpEqual) c.emit(OpNot) case "or", "||": c.compile(node.Left) + c.derefInNeeded(node.Left) end := c.emit(OpJumpIfTrue, placeholder) c.emit(OpPop) c.compile(node.Right) + c.derefInNeeded(node.Right) c.patchJump(end) case "and", "&&": c.compile(node.Left) + c.derefInNeeded(node.Left) end := c.emit(OpJumpIfFalse, placeholder) c.emit(OpPop) c.compile(node.Right) + c.derefInNeeded(node.Right) c.patchJump(end) case "<": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpLess) case ">": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpMore) case "<=": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpLessOrEqual) case ">=": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpMoreOrEqual) case "+": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpAdd) case "-": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpSubtract) case "*": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpMultiply) case "/": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpDivide) case "%": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpModulo) case "**", "^": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpExponent) case "in": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpIn) case "matches": if node.Regexp != nil { c.compile(node.Left) + c.derefInNeeded(node.Left) c.emit(OpMatchesConst, c.addConstant(node.Regexp)) } else { c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpMatches) } case "contains": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpContains) case "startsWith": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpStartsWith) case "endsWith": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpEndsWith) case "..": c.compile(node.Left) + c.derefInNeeded(node.Left) c.compile(node.Right) + c.derefInNeeded(node.Right) c.emit(OpRange) case "??": c.compile(node.Left) + c.derefInNeeded(node.Left) end := c.emit(OpJumpIfNotNil, placeholder) c.emit(OpPop) c.compile(node.Right) + c.derefInNeeded(node.Right) c.patchJump(end) default: @@ -457,7 +554,6 @@ func (c *compiler) MemberNode(node *ast.MemberNode) { return } op := OpFetch - original := node index := node.FieldIndex path := []string{node.Name} base := node.Node @@ -466,21 +562,15 @@ func (c *compiler) MemberNode(node *ast.MemberNode) { for !node.Optional { ident, ok := base.(*ast.IdentifierNode) if ok && len(ident.FieldIndex) > 0 { - if ident.Deref { - panic("IdentifierNode should not be dereferenced") - } index = append(ident.FieldIndex, index...) path = append([]string{ident.Value}, path...) c.emitLocation(ident.Location(), OpLoadField, c.addConstant( &runtime.Field{Index: index, Path: path}, )) - goto deref + return } member, ok := base.(*ast.MemberNode) if ok && len(member.FieldIndex) > 0 { - if member.Deref { - panic("MemberNode should not be dereferenced") - } index = append(member.FieldIndex, index...) path = append([]string{member.Name}, path...) node = member @@ -505,13 +595,6 @@ func (c *compiler) MemberNode(node *ast.MemberNode) { &runtime.Field{Index: index, Path: path}, )) } - -deref: - if original.Deref { - c.emit(OpDeref) - } else if original.Type() == nil { - c.emit(OpDeref) - } } func (c *compiler) SliceNode(node *ast.SliceNode) { @@ -534,23 +617,7 @@ func (c *compiler) CallNode(node *ast.CallNode) { c.compile(arg) } if node.Func != nil { - if node.Func.Opcode > 0 { - c.emit(OpBuiltin, node.Func.Opcode) - return - } - switch len(node.Arguments) { - case 0: - c.emit(OpCall0, c.addFunction(node)) - case 1: - c.emit(OpCall1, c.addFunction(node)) - case 2: - c.emit(OpCall2, c.addFunction(node)) - case 3: - c.emit(OpCall3, c.addFunction(node)) - default: - c.emit(OpLoadFunc, c.addFunction(node)) - c.emit(OpCallN, len(node.Arguments)) - } + c.emitFunction(node.Func, len(node.Arguments)) return } c.compile(node.Callee) @@ -578,6 +645,7 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.emit(OpTrue) c.patchJump(loopBreak) c.emit(OpEnd) + return case "none": c.compile(node.Arguments[0]) @@ -592,6 +660,7 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.emit(OpTrue) c.patchJump(loopBreak) c.emit(OpEnd) + return case "any": c.compile(node.Arguments[0]) @@ -605,6 +674,7 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.emit(OpFalse) c.patchJump(loopBreak) c.emit(OpEnd) + return case "one": c.compile(node.Arguments[0]) @@ -619,6 +689,7 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.emitPush(1) c.emit(OpEqual) c.emit(OpEnd) + return case "filter": c.compile(node.Arguments[0]) @@ -627,12 +698,17 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.compile(node.Arguments[1]) c.emitCond(func() { c.emit(OpIncrementCount) - c.emit(OpPointer) + if node.Map != nil { + c.compile(node.Map) + } else { + c.emit(OpPointer) + } }) }) c.emit(OpGetCount) c.emit(OpEnd) c.emit(OpArray) + return case "map": c.compile(node.Arguments[0]) @@ -643,6 +719,7 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { c.emit(OpGetLen) c.emit(OpEnd) c.emit(OpArray) + return case "count": c.compile(node.Arguments[0]) @@ -655,10 +732,144 @@ func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { }) c.emit(OpGetCount) c.emit(OpEnd) + return + + case "find": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + var loopBreak int + c.emitLoop(func() { + c.compile(node.Arguments[1]) + noop := c.emit(OpJumpIfFalse, placeholder) + c.emit(OpPop) + if node.Map != nil { + c.compile(node.Map) + } else { + c.emit(OpPointer) + } + loopBreak = c.emit(OpJump, placeholder) + c.patchJump(noop) + c.emit(OpPop) + }) + if node.Throws { + c.emit(OpPush, c.addConstant(fmt.Errorf("reflect: slice index out of range"))) + c.emit(OpThrow) + } else { + c.emit(OpNil) + } + c.patchJump(loopBreak) + c.emit(OpEnd) + return + + case "findIndex": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + var loopBreak int + c.emitLoop(func() { + c.compile(node.Arguments[1]) + noop := c.emit(OpJumpIfFalse, placeholder) + c.emit(OpPop) + c.emit(OpGetIndex) + loopBreak = c.emit(OpJump, placeholder) + c.patchJump(noop) + c.emit(OpPop) + }) + c.emit(OpNil) + c.patchJump(loopBreak) + c.emit(OpEnd) + return + + case "findLast": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + var loopBreak int + c.emitLoopBackwards(func() { + c.compile(node.Arguments[1]) + noop := c.emit(OpJumpIfFalse, placeholder) + c.emit(OpPop) + if node.Map != nil { + c.compile(node.Map) + } else { + c.emit(OpPointer) + } + loopBreak = c.emit(OpJump, placeholder) + c.patchJump(noop) + c.emit(OpPop) + }) + if node.Throws { + c.emit(OpPush, c.addConstant(fmt.Errorf("reflect: slice index out of range"))) + c.emit(OpThrow) + } else { + c.emit(OpNil) + } + c.patchJump(loopBreak) + c.emit(OpEnd) + return + + case "findLastIndex": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + var loopBreak int + c.emitLoopBackwards(func() { + c.compile(node.Arguments[1]) + noop := c.emit(OpJumpIfFalse, placeholder) + c.emit(OpPop) + c.emit(OpGetIndex) + loopBreak = c.emit(OpJump, placeholder) + c.patchJump(noop) + c.emit(OpPop) + }) + c.emit(OpNil) + c.patchJump(loopBreak) + c.emit(OpEnd) + return + + case "groupBy": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + c.emitLoop(func() { + c.compile(node.Arguments[1]) + c.emit(OpGroupBy) + }) + c.emit(OpGetGroupBy) + c.emit(OpEnd) + return + + case "reduce": + c.compile(node.Arguments[0]) + c.emit(OpBegin) + if len(node.Arguments) == 3 { + c.compile(node.Arguments[2]) + c.emit(OpSetAcc) + } else { + c.emit(OpPointer) + c.emit(OpIncrementIndex) + c.emit(OpSetAcc) + } + c.emitLoop(func() { + c.compile(node.Arguments[1]) + c.emit(OpSetAcc) + }) + c.emit(OpGetAcc) + c.emit(OpEnd) + return - default: - panic(fmt.Sprintf("unknown builtin %v", node.Name)) } + + if id, ok := builtin.Index[node.Name]; ok { + f := builtin.Builtins[id] + for _, arg := range node.Arguments { + c.compile(arg) + } + if f.Fast != nil { + c.emit(OpCallBuiltin1, id) + } else if f.Func != nil { + c.emitFunction(f, len(node.Arguments)) + } + return + } + + panic(fmt.Sprintf("unknown builtin %v", node.Name)) } func (c *compiler) emitCond(body func()) { @@ -679,7 +890,25 @@ func (c *compiler) emitLoop(body func()) { body() - c.emit(OpIncrementIt) + c.emit(OpIncrementIndex) + c.emit(OpJumpBackward, c.calcBackwardJump(begin)) + c.patchJump(end) +} + +func (c *compiler) emitLoopBackwards(body func()) { + c.emit(OpGetLen) + c.emit(OpInt, 1) + c.emit(OpSubtract) + c.emit(OpSetIndex) + begin := len(c.bytecode) + c.emit(OpGetIndex) + c.emit(OpInt, 0) + c.emit(OpMoreOrEqual) + end := c.emit(OpJumpIfFalse, placeholder) + + body() + + c.emit(OpDecrementIndex) c.emit(OpJumpBackward, c.calcBackwardJump(begin)) c.patchJump(end) } @@ -689,7 +918,42 @@ func (c *compiler) ClosureNode(node *ast.ClosureNode) { } func (c *compiler) PointerNode(node *ast.PointerNode) { - c.emit(OpPointer) + switch node.Name { + case "index": + c.emit(OpGetIndex) + case "acc": + c.emit(OpGetAcc) + case "": + c.emit(OpPointer) + default: + panic(fmt.Sprintf("unknown pointer %v", node.Name)) + } +} + +func (c *compiler) VariableDeclaratorNode(node *ast.VariableDeclaratorNode) { + c.compile(node.Value) + index := c.addVariable(node.Name) + c.emit(OpStore, index) + c.beginScope(node.Name, index) + c.compile(node.Expr) + c.endScope() +} + +func (c *compiler) beginScope(name string, index int) { + c.scopes = append(c.scopes, scope{name, index}) +} + +func (c *compiler) endScope() { + c.scopes = c.scopes[:len(c.scopes)-1] +} + +func (c *compiler) lookupVariable(name string) (int, bool) { + for i := len(c.scopes) - 1; i >= 0; i-- { + if c.scopes[i].variableName == name { + return c.scopes[i].index, true + } + } + return 0, false } func (c *compiler) ConditionalNode(node *ast.ConditionalNode) { @@ -730,6 +994,13 @@ func (c *compiler) PairNode(node *ast.PairNode) { c.compile(node.Value) } +func (c *compiler) derefInNeeded(node ast.Node) { + switch kind(node) { + case reflect.Ptr, reflect.Interface: + c.emit(OpDeref) + } +} + func kind(node ast.Node) reflect.Kind { t := node.Type() if t == nil { diff --git a/vendor/github.com/antonmedv/expr/conf/config.go b/vendor/github.com/antonmedv/expr/conf/config.go index 1ac0fa7d29..5fb5e1194b 100644 --- a/vendor/github.com/antonmedv/expr/conf/config.go +++ b/vendor/github.com/antonmedv/expr/conf/config.go @@ -10,44 +10,49 @@ import ( ) type Config struct { - Env interface{} + Env any Types TypesTable MapEnv bool DefaultType reflect.Type Operators OperatorsTable Expect reflect.Kind + ExpectAny bool Optimize bool Strict bool ConstFns map[string]reflect.Value Visitors []ast.Visitor - Functions map[string]*builtin.Function + Functions map[string]*ast.Function + Builtins map[string]*ast.Function + Disabled map[string]bool // disabled builtins } // CreateNew creates new config with default values. func CreateNew() *Config { c := &Config{ + Optimize: true, Operators: make(map[string][]string), ConstFns: make(map[string]reflect.Value), - Functions: make(map[string]*builtin.Function), - Optimize: true, + Functions: make(map[string]*ast.Function), + Builtins: make(map[string]*ast.Function), + Disabled: make(map[string]bool), } for _, f := range builtin.Builtins { - c.Functions[f.Name] = f + c.Builtins[f.Name] = f } return c } // New creates new config with environment. -func New(env interface{}) *Config { +func New(env any) *Config { c := CreateNew() c.WithEnv(env) return c } -func (c *Config) WithEnv(env interface{}) { +func (c *Config) WithEnv(env any) { var mapEnv bool var mapValueType reflect.Type - if _, ok := env.(map[string]interface{}); ok { + if _, ok := env.(map[string]any); ok { mapEnv = true } else { if reflect.ValueOf(env).Kind() == reflect.Map { @@ -93,4 +98,20 @@ func (c *Config) Check() { } } } + for fnName, t := range c.Types { + if kind(t.Type) == reflect.Func { + for _, b := range c.Builtins { + if b.Name == fnName { + panic(fmt.Errorf(`cannot override builtin %s(): use expr.DisableBuiltin("%s") to override`, b.Name, b.Name)) + } + } + } + } + for _, f := range c.Functions { + for _, b := range c.Builtins { + if b.Name == f.Name { + panic(fmt.Errorf(`cannot override builtin %s(); use expr.DisableBuiltin("%s") to override`, f.Name, f.Name)) + } + } + } } diff --git a/vendor/github.com/antonmedv/expr/conf/types_table.go b/vendor/github.com/antonmedv/expr/conf/types_table.go index e917f5fa84..8ebb76c357 100644 --- a/vendor/github.com/antonmedv/expr/conf/types_table.go +++ b/vendor/github.com/antonmedv/expr/conf/types_table.go @@ -20,7 +20,7 @@ type TypesTable map[string]Tag // // If map is passed, all items will be treated as variables // (key as name, value as type). -func CreateTypesTable(i interface{}) TypesTable { +func CreateTypesTable(i any) TypesTable { if i == nil { return nil } @@ -54,6 +54,9 @@ func CreateTypesTable(i interface{}) TypesTable { for _, key := range v.MapKeys() { value := v.MapIndex(key) if key.Kind() == reflect.String && value.IsValid() && value.CanInterface() { + if key.String() == "$env" { // Could check for all keywords here + panic("attempt to misuse env keyword as env map key") + } types[key.String()] = Tag{Type: reflect.TypeOf(value.Interface())} } } @@ -94,10 +97,13 @@ func FieldsFromStruct(t reflect.Type) TypesTable { } } } - - types[FieldName(f)] = Tag{ - Type: f.Type, - FieldIndex: f.Index, + if fn := FieldName(f); fn == "$env" { // Could check for all keywords here + panic("attempt to misuse env keyword as env struct field tag") + } else { + types[FieldName(f)] = Tag{ + Type: f.Type, + FieldIndex: f.Index, + } } } } @@ -115,6 +121,13 @@ func dereference(t reflect.Type) reflect.Type { return t } +func kind(t reflect.Type) reflect.Kind { + if t == nil { + return reflect.Invalid + } + return t.Kind() +} + func FieldName(field reflect.StructField) string { if taggedName := field.Tag.Get("expr"); taggedName != "" { return taggedName diff --git a/vendor/github.com/antonmedv/expr/expr.go b/vendor/github.com/antonmedv/expr/expr.go index 14f6af285c..eb9eb7683e 100644 --- a/vendor/github.com/antonmedv/expr/expr.go +++ b/vendor/github.com/antonmedv/expr/expr.go @@ -5,7 +5,6 @@ import ( "reflect" "github.com/antonmedv/expr/ast" - "github.com/antonmedv/expr/builtin" "github.com/antonmedv/expr/checker" "github.com/antonmedv/expr/compiler" "github.com/antonmedv/expr/conf" @@ -23,7 +22,7 @@ type Option func(c *conf.Config) // as well as all fields of embedded structs and struct itself. // If map is passed, all items will be treated as variables. // Methods defined on this type will be available as functions. -func Env(env interface{}) Option { +func Env(env any) Option { return func(c *conf.Config) { c.WithEnv(env) } @@ -52,6 +51,13 @@ func ConstExpr(fn string) Option { } } +// AsAny tells the compiler to expect any result. +func AsAny() Option { + return func(c *conf.Config) { + c.ExpectAny = true + } +} + // AsKind tells the compiler to expect kind of the result. func AsKind(kind reflect.Kind) Option { return func(c *conf.Config) { @@ -102,7 +108,7 @@ func Patch(visitor ast.Visitor) Option { } // Function adds function to list of functions what will be available in expressions. -func Function(name string, fn func(params ...interface{}) (interface{}, error), types ...interface{}) Option { +func Function(name string, fn func(params ...any) (any, error), types ...any) Option { return func(c *conf.Config) { ts := make([]reflect.Type, len(types)) for i, t := range types { @@ -115,7 +121,7 @@ func Function(name string, fn func(params ...interface{}) (interface{}, error), } ts[i] = t } - c.Functions[name] = &builtin.Function{ + c.Functions[name] = &ast.Function{ Name: name, Func: fn, Types: ts, @@ -123,13 +129,38 @@ func Function(name string, fn func(params ...interface{}) (interface{}, error), } } +// DisableAllBuiltins disables all builtins. +func DisableAllBuiltins() Option { + return func(c *conf.Config) { + for name := range c.Builtins { + c.Disabled[name] = true + } + } +} + +// DisableBuiltin disables builtin function. +func DisableBuiltin(name string) Option { + return func(c *conf.Config) { + c.Disabled[name] = true + } +} + +// EnableBuiltin enables builtin function. +func EnableBuiltin(name string) Option { + return func(c *conf.Config) { + delete(c.Disabled, name) + } +} + // Compile parses and compiles given input expression to bytecode program. func Compile(input string, ops ...Option) (*vm.Program, error) { config := conf.CreateNew() - for _, op := range ops { op(config) } + for name := range config.Disabled { + delete(config.Builtins, name) + } config.Check() if len(config.Operators) > 0 { @@ -139,7 +170,7 @@ func Compile(input string, ops ...Option) (*vm.Program, error) { }) } - tree, err := parser.Parse(input) + tree, err := parser.ParseWithConfig(input, config) if err != nil { return nil, err } @@ -151,15 +182,10 @@ func Compile(input string, ops ...Option) (*vm.Program, error) { _, _ = checker.Check(tree, config) ast.Walk(&tree.Node, v) } - _, err = checker.Check(tree, config) - if err != nil { - return nil, err - } - } else { - _, err = checker.Check(tree, config) - if err != nil { - return nil, err - } + } + _, err = checker.Check(tree, config) + if err != nil { + return nil, err } if config.Optimize { @@ -181,12 +207,12 @@ func Compile(input string, ops ...Option) (*vm.Program, error) { } // Run evaluates given bytecode program. -func Run(program *vm.Program, env interface{}) (interface{}, error) { +func Run(program *vm.Program, env any) (any, error) { return vm.Run(program, env) } // Eval parses, compiles and runs given input. -func Eval(input string, env interface{}) (interface{}, error) { +func Eval(input string, env any) (any, error) { if _, ok := env.(Option); ok { return nil, fmt.Errorf("misused expr.Eval: second argument (env) should be passed without expr.Env") } diff --git a/vendor/github.com/antonmedv/expr/file/error.go b/vendor/github.com/antonmedv/expr/file/error.go index 1e7e81b947..edf202b045 100644 --- a/vendor/github.com/antonmedv/expr/file/error.go +++ b/vendor/github.com/antonmedv/expr/file/error.go @@ -10,7 +10,7 @@ type Error struct { Location Message string Snippet string - Prev error + Prev error } func (e *Error) Error() string { @@ -45,7 +45,6 @@ func (e *Error) Bind(source *Source) *Error { return e } - func (e *Error) Unwrap() error { return e.Prev } @@ -54,7 +53,6 @@ func (e *Error) Wrap(err error) { e.Prev = err } - func (e *Error) format() string { if e.Location.Empty() { return e.Message diff --git a/vendor/github.com/antonmedv/expr/optimizer/const_expr.go b/vendor/github.com/antonmedv/expr/optimizer/const_expr.go index 7ececb3dba..694c88bcf1 100644 --- a/vendor/github.com/antonmedv/expr/optimizer/const_expr.go +++ b/vendor/github.com/antonmedv/expr/optimizer/const_expr.go @@ -42,7 +42,7 @@ func (c *constExpr) Visit(node *Node) { in := make([]reflect.Value, len(call.Arguments)) for i := 0; i < len(call.Arguments); i++ { arg := call.Arguments[i] - var param interface{} + var param any switch a := arg.(type) { case *NilNode: diff --git a/vendor/github.com/antonmedv/expr/optimizer/filter_first.go b/vendor/github.com/antonmedv/expr/optimizer/filter_first.go new file mode 100644 index 0000000000..852e2c268a --- /dev/null +++ b/vendor/github.com/antonmedv/expr/optimizer/filter_first.go @@ -0,0 +1,38 @@ +package optimizer + +import ( + . "github.com/antonmedv/expr/ast" +) + +type filterFirst struct{} + +func (*filterFirst) Visit(node *Node) { + if member, ok := (*node).(*MemberNode); ok && member.Property != nil && !member.Optional { + if prop, ok := member.Property.(*IntegerNode); ok && prop.Value == 0 { + if filter, ok := member.Node.(*BuiltinNode); ok && + filter.Name == "filter" && + len(filter.Arguments) == 2 { + Patch(node, &BuiltinNode{ + Name: "find", + Arguments: filter.Arguments, + Throws: true, // to match the behavior of filter()[0] + Map: filter.Map, + }) + } + } + } + if first, ok := (*node).(*BuiltinNode); ok && + first.Name == "first" && + len(first.Arguments) == 1 { + if filter, ok := first.Arguments[0].(*BuiltinNode); ok && + filter.Name == "filter" && + len(filter.Arguments) == 2 { + Patch(node, &BuiltinNode{ + Name: "find", + Arguments: filter.Arguments, + Throws: false, // as first() will return nil if not found + Map: filter.Map, + }) + } + } +} diff --git a/vendor/github.com/antonmedv/expr/optimizer/filter_last.go b/vendor/github.com/antonmedv/expr/optimizer/filter_last.go new file mode 100644 index 0000000000..0a072004be --- /dev/null +++ b/vendor/github.com/antonmedv/expr/optimizer/filter_last.go @@ -0,0 +1,38 @@ +package optimizer + +import ( + . "github.com/antonmedv/expr/ast" +) + +type filterLast struct{} + +func (*filterLast) Visit(node *Node) { + if member, ok := (*node).(*MemberNode); ok && member.Property != nil && !member.Optional { + if prop, ok := member.Property.(*IntegerNode); ok && prop.Value == -1 { + if filter, ok := member.Node.(*BuiltinNode); ok && + filter.Name == "filter" && + len(filter.Arguments) == 2 { + Patch(node, &BuiltinNode{ + Name: "findLast", + Arguments: filter.Arguments, + Throws: true, // to match the behavior of filter()[-1] + Map: filter.Map, + }) + } + } + } + if first, ok := (*node).(*BuiltinNode); ok && + first.Name == "last" && + len(first.Arguments) == 1 { + if filter, ok := first.Arguments[0].(*BuiltinNode); ok && + filter.Name == "filter" && + len(filter.Arguments) == 2 { + Patch(node, &BuiltinNode{ + Name: "findLast", + Arguments: filter.Arguments, + Throws: false, // as last() will return nil if not found + Map: filter.Map, + }) + } + } +} diff --git a/vendor/github.com/antonmedv/expr/optimizer/filter_len.go b/vendor/github.com/antonmedv/expr/optimizer/filter_len.go new file mode 100644 index 0000000000..2293de81d7 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/optimizer/filter_len.go @@ -0,0 +1,22 @@ +package optimizer + +import ( + . "github.com/antonmedv/expr/ast" +) + +type filterLen struct{} + +func (*filterLen) Visit(node *Node) { + if ln, ok := (*node).(*BuiltinNode); ok && + ln.Name == "len" && + len(ln.Arguments) == 1 { + if filter, ok := ln.Arguments[0].(*BuiltinNode); ok && + filter.Name == "filter" && + len(filter.Arguments) == 2 { + Patch(node, &BuiltinNode{ + Name: "count", + Arguments: filter.Arguments, + }) + } + } +} diff --git a/vendor/github.com/antonmedv/expr/optimizer/filter_map.go b/vendor/github.com/antonmedv/expr/optimizer/filter_map.go new file mode 100644 index 0000000000..9044ac34d5 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/optimizer/filter_map.go @@ -0,0 +1,25 @@ +package optimizer + +import ( + . "github.com/antonmedv/expr/ast" +) + +type filterMap struct{} + +func (*filterMap) Visit(node *Node) { + if mapBuiltin, ok := (*node).(*BuiltinNode); ok && + mapBuiltin.Name == "map" && + len(mapBuiltin.Arguments) == 2 { + if closure, ok := mapBuiltin.Arguments[1].(*ClosureNode); ok { + if filter, ok := mapBuiltin.Arguments[0].(*BuiltinNode); ok && + filter.Name == "filter" && + filter.Map == nil /* not already optimized */ { + Patch(node, &BuiltinNode{ + Name: "filter", + Arguments: filter.Arguments, + Map: closure.Node, + }) + } + } + } +} diff --git a/vendor/github.com/antonmedv/expr/optimizer/fold.go b/vendor/github.com/antonmedv/expr/optimizer/fold.go index b62b2d7ed4..670ebec094 100644 --- a/vendor/github.com/antonmedv/expr/optimizer/fold.go +++ b/vendor/github.com/antonmedv/expr/optimizer/fold.go @@ -1,6 +1,7 @@ package optimizer import ( + "fmt" "math" "reflect" @@ -8,6 +9,12 @@ import ( "github.com/antonmedv/expr/file" ) +var ( + integerType = reflect.TypeOf(0) + floatType = reflect.TypeOf(float64(0)) + stringType = reflect.TypeOf("") +) + type fold struct { applied bool err *file.Error @@ -18,11 +25,18 @@ func (fold *fold) Visit(node *Node) { fold.applied = true Patch(node, newNode) } - // for IntegerNode the type may have been changed from int->float - // preserve this information by setting the type after the Patch - patchWithType := func(newNode Node, leafType reflect.Type) { + patchWithType := func(newNode Node) { patch(newNode) - newNode.SetType(leafType) + switch newNode.(type) { + case *IntegerNode: + newNode.SetType(integerType) + case *FloatNode: + newNode.SetType(floatType) + case *StringNode: + newNode.SetType(stringType) + default: + panic(fmt.Sprintf("unknown type %T", newNode)) + } } switch n := (*node).(type) { @@ -30,17 +44,17 @@ func (fold *fold) Visit(node *Node) { switch n.Operator { case "-": if i, ok := n.Node.(*IntegerNode); ok { - patchWithType(&IntegerNode{Value: -i.Value}, n.Node.Type()) + patchWithType(&IntegerNode{Value: -i.Value}) } if i, ok := n.Node.(*FloatNode); ok { - patchWithType(&FloatNode{Value: -i.Value}, n.Node.Type()) + patchWithType(&FloatNode{Value: -i.Value}) } case "+": if i, ok := n.Node.(*IntegerNode); ok { - patchWithType(&IntegerNode{Value: i.Value}, n.Node.Type()) + patchWithType(&IntegerNode{Value: i.Value}) } if i, ok := n.Node.(*FloatNode); ok { - patchWithType(&FloatNode{Value: i.Value}, n.Node.Type()) + patchWithType(&FloatNode{Value: i.Value}) } case "!", "not": if a := toBool(n.Node); a != nil { @@ -55,28 +69,28 @@ func (fold *fold) Visit(node *Node) { a := toInteger(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&IntegerNode{Value: a.Value + b.Value}, a.Type()) + patchWithType(&IntegerNode{Value: a.Value + b.Value}) } } { a := toInteger(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: float64(a.Value) + b.Value}, a.Type()) + patchWithType(&FloatNode{Value: float64(a.Value) + b.Value}) } } { a := toFloat(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value + float64(b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: a.Value + float64(b.Value)}) } } { a := toFloat(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value + b.Value}, a.Type()) + patchWithType(&FloatNode{Value: a.Value + b.Value}) } } { @@ -91,28 +105,28 @@ func (fold *fold) Visit(node *Node) { a := toInteger(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&IntegerNode{Value: a.Value - b.Value}, a.Type()) + patchWithType(&IntegerNode{Value: a.Value - b.Value}) } } { a := toInteger(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: float64(a.Value) - b.Value}, a.Type()) + patchWithType(&FloatNode{Value: float64(a.Value) - b.Value}) } } { a := toFloat(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value - float64(b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: a.Value - float64(b.Value)}) } } { a := toFloat(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value - b.Value}, a.Type()) + patchWithType(&FloatNode{Value: a.Value - b.Value}) } } case "*": @@ -120,28 +134,28 @@ func (fold *fold) Visit(node *Node) { a := toInteger(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&IntegerNode{Value: a.Value * b.Value}, a.Type()) + patchWithType(&IntegerNode{Value: a.Value * b.Value}) } } { a := toInteger(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: float64(a.Value) * b.Value}, a.Type()) + patchWithType(&FloatNode{Value: float64(a.Value) * b.Value}) } } { a := toFloat(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value * float64(b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: a.Value * float64(b.Value)}) } } { a := toFloat(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value * b.Value}, a.Type()) + patchWithType(&FloatNode{Value: a.Value * b.Value}) } } case "/": @@ -149,28 +163,28 @@ func (fold *fold) Visit(node *Node) { a := toInteger(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: float64(a.Value) / float64(b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: float64(a.Value) / float64(b.Value)}) } } { a := toInteger(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: float64(a.Value) / b.Value}, a.Type()) + patchWithType(&FloatNode{Value: float64(a.Value) / b.Value}) } } { a := toFloat(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value / float64(b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: a.Value / float64(b.Value)}) } } { a := toFloat(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: a.Value / b.Value}, a.Type()) + patchWithType(&FloatNode{Value: a.Value / b.Value}) } } case "%": @@ -191,28 +205,28 @@ func (fold *fold) Visit(node *Node) { a := toInteger(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: math.Pow(float64(a.Value), float64(b.Value))}, a.Type()) + patchWithType(&FloatNode{Value: math.Pow(float64(a.Value), float64(b.Value))}) } } { a := toInteger(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: math.Pow(float64(a.Value), b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: math.Pow(float64(a.Value), b.Value)}) } } { a := toFloat(n.Left) b := toInteger(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: math.Pow(a.Value, float64(b.Value))}, a.Type()) + patchWithType(&FloatNode{Value: math.Pow(a.Value, float64(b.Value))}) } } { a := toFloat(n.Left) b := toFloat(n.Right) if a != nil && b != nil { - patchWithType(&FloatNode{Value: math.Pow(a.Value, b.Value)}, a.Type()) + patchWithType(&FloatNode{Value: math.Pow(a.Value, b.Value)}) } } case "and", "&&": @@ -271,7 +285,7 @@ func (fold *fold) Visit(node *Node) { return } } - value := make([]interface{}, len(n.Nodes)) + value := make([]any, len(n.Nodes)) for i, a := range n.Nodes { switch b := a.(type) { case *IntegerNode: diff --git a/vendor/github.com/antonmedv/expr/optimizer/in_range.go b/vendor/github.com/antonmedv/expr/optimizer/in_range.go index 7895249e0b..b361c6c39b 100644 --- a/vendor/github.com/antonmedv/expr/optimizer/in_range.go +++ b/vendor/github.com/antonmedv/expr/optimizer/in_range.go @@ -1,6 +1,8 @@ package optimizer import ( + "reflect" + . "github.com/antonmedv/expr/ast" ) @@ -10,9 +12,16 @@ func (*inRange) Visit(node *Node) { switch n := (*node).(type) { case *BinaryNode: if n.Operator == "in" { - if rng, ok := n.Right.(*BinaryNode); ok && rng.Operator == ".." { - if from, ok := rng.Left.(*IntegerNode); ok { - if to, ok := rng.Right.(*IntegerNode); ok { + t := n.Left.Type() + if t == nil { + return + } + if t.Kind() != reflect.Int { + return + } + if rangeOp, ok := n.Right.(*BinaryNode); ok && rangeOp.Operator == ".." { + if from, ok := rangeOp.Left.(*IntegerNode); ok { + if to, ok := rangeOp.Right.(*IntegerNode); ok { Patch(node, &BinaryNode{ Operator: "and", Left: &BinaryNode{ diff --git a/vendor/github.com/antonmedv/expr/optimizer/optimizer.go b/vendor/github.com/antonmedv/expr/optimizer/optimizer.go index 9c97496c8d..15f50fd736 100644 --- a/vendor/github.com/antonmedv/expr/optimizer/optimizer.go +++ b/vendor/github.com/antonmedv/expr/optimizer/optimizer.go @@ -33,5 +33,9 @@ func Optimize(node *Node, config *conf.Config) error { } Walk(node, &inRange{}) Walk(node, &constRange{}) + Walk(node, &filterMap{}) + Walk(node, &filterLen{}) + Walk(node, &filterLast{}) + Walk(node, &filterFirst{}) return nil } diff --git a/vendor/github.com/antonmedv/expr/parser/lexer/lexer.go b/vendor/github.com/antonmedv/expr/parser/lexer/lexer.go index cfb1e8c61b..5db2dcbb52 100644 --- a/vendor/github.com/antonmedv/expr/parser/lexer/lexer.go +++ b/vendor/github.com/antonmedv/expr/parser/lexer/lexer.go @@ -150,7 +150,7 @@ func (l *lexer) acceptWord(word string) bool { return true } -func (l *lexer) error(format string, args ...interface{}) stateFn { +func (l *lexer) error(format string, args ...any) stateFn { if l.err == nil { // show first error l.err = &file.Error{ Location: l.loc, diff --git a/vendor/github.com/antonmedv/expr/parser/lexer/state.go b/vendor/github.com/antonmedv/expr/parser/lexer/state.go index 1212aa3217..bb150878a6 100644 --- a/vendor/github.com/antonmedv/expr/parser/lexer/state.go +++ b/vendor/github.com/antonmedv/expr/parser/lexer/state.go @@ -2,6 +2,8 @@ package lexer import ( "strings" + + "github.com/antonmedv/expr/parser/utils" ) type stateFn func(*lexer) stateFn @@ -11,7 +13,7 @@ func root(l *lexer) stateFn { case r == eof: l.emitEOF() return nil - case IsSpace(r): + case utils.IsSpace(r): l.ignore() return root case r == '\'' || r == '"': @@ -28,19 +30,24 @@ func root(l *lexer) stateFn { return questionMark case r == '/': return slash + case r == '#': + return pointer + case r == '|': + l.accept("|") + l.emit(Operator) case strings.ContainsRune("([{", r): l.emit(Bracket) case strings.ContainsRune(")]}", r): l.emit(Bracket) - case strings.ContainsRune("#,:%+-^", r): // single rune operator + case strings.ContainsRune(",:;%+-^", r): // single rune operator l.emit(Operator) - case strings.ContainsRune("&|!=*<>", r): // possible double rune operator - l.accept("&|=*") + case strings.ContainsRune("&!=*<>", r): // possible double rune operator + l.accept("&=*") l.emit(Operator) case r == '.': l.backup() return dot - case IsAlphaNumeric(r): + case utils.IsAlphaNumeric(r): l.backup() return identifier default: @@ -88,7 +95,7 @@ func (l *lexer) scanNumber() bool { l.acceptRun(digits) } // Next thing mustn't be alphanumeric. - if IsAlphaNumeric(l.peek()) { + if utils.IsAlphaNumeric(l.peek()) { l.next() return false } @@ -110,7 +117,7 @@ func identifier(l *lexer) stateFn { loop: for { switch r := l.next(); { - case IsAlphaNumeric(r): + case utils.IsAlphaNumeric(r): // absorb default: l.backup() @@ -119,6 +126,8 @@ loop: return not case "in", "or", "and", "matches", "contains", "startsWith", "endsWith": l.emit(Operator) + case "let": + l.emit(Operator) default: l.emit(Identifier) } @@ -138,7 +147,7 @@ func not(l *lexer) stateFn { // Get the next word. for { r := l.next() - if IsAlphaNumeric(r) { + if utils.IsAlphaNumeric(r) { // absorb } else { l.backup() @@ -196,3 +205,19 @@ func multiLineComment(l *lexer) stateFn { l.ignore() return root } + +func pointer(l *lexer) stateFn { + l.accept("#") + l.emit(Operator) + for { + switch r := l.next(); { + case utils.IsAlphaNumeric(r): // absorb + default: + l.backup() + if l.word() != "" { + l.emit(Identifier) + } + return root + } + } +} diff --git a/vendor/github.com/antonmedv/expr/parser/lexer/utils.go b/vendor/github.com/antonmedv/expr/parser/lexer/utils.go index 72e3cf20c9..5c9e6b59de 100644 --- a/vendor/github.com/antonmedv/expr/parser/lexer/utils.go +++ b/vendor/github.com/antonmedv/expr/parser/lexer/utils.go @@ -2,23 +2,11 @@ package lexer import ( "fmt" + "math" "strings" - "unicode" "unicode/utf8" ) -func IsSpace(r rune) bool { - return unicode.IsSpace(r) -} - -func IsAlphaNumeric(r rune) bool { - return IsAlphabetic(r) || unicode.IsDigit(r) -} - -func IsAlphabetic(r rune) bool { - return r == '_' || r == '$' || unicode.IsLetter(r) -} - var ( newlineNormalizer = strings.NewReplacer("\r\n", "\n", "\r", "\n") ) @@ -44,7 +32,11 @@ func unescape(value string) (string, error) { // The string contains escape characters. // The following logic is adapted from `strconv/quote.go` var runeTmp [utf8.UTFMax]byte - buf := make([]byte, 0, 3*n/2) + size := 3 * uint64(n) / 2 + if size >= math.MaxInt { + return "", fmt.Errorf("too large string") + } + buf := make([]byte, 0, size) for len(value) > 0 { c, multibyte, rest, err := unescapeChar(value) if err != nil { @@ -63,10 +55,10 @@ func unescape(value string) (string, error) { // unescapeChar takes a string input and returns the following info: // -// value - the escaped unicode rune at the front of the string. -// multibyte - whether the rune value might require multiple bytes to represent. -// tail - the remainder of the input string. -// err - error value, if the character could not be unescaped. +// value - the escaped unicode rune at the front of the string. +// multibyte - whether the rune value might require multiple bytes to represent. +// tail - the remainder of the input string. +// err - error value, if the character could not be unescaped. // // When multibyte is true the return value may still fit within a single byte, // but a multibyte conversion is attempted which is more expensive than when the diff --git a/vendor/github.com/antonmedv/expr/parser/operator/operator.go b/vendor/github.com/antonmedv/expr/parser/operator/operator.go new file mode 100644 index 0000000000..455c06f17c --- /dev/null +++ b/vendor/github.com/antonmedv/expr/parser/operator/operator.go @@ -0,0 +1,52 @@ +package operator + +type Associativity int + +const ( + Left Associativity = iota + 1 + Right +) + +type Operator struct { + Precedence int + Associativity Associativity +} + +func Less(a, b string) bool { + return Binary[a].Precedence < Binary[b].Precedence +} + +var Unary = map[string]Operator{ + "not": {50, Left}, + "!": {50, Left}, + "-": {90, Left}, + "+": {90, Left}, +} + +var Binary = map[string]Operator{ + "|": {0, Left}, + "or": {10, Left}, + "||": {10, Left}, + "and": {15, Left}, + "&&": {15, Left}, + "==": {20, Left}, + "!=": {20, Left}, + "<": {20, Left}, + ">": {20, Left}, + ">=": {20, Left}, + "<=": {20, Left}, + "in": {20, Left}, + "matches": {20, Left}, + "contains": {20, Left}, + "startsWith": {20, Left}, + "endsWith": {20, Left}, + "..": {25, Left}, + "+": {30, Left}, + "-": {30, Left}, + "*": {60, Left}, + "/": {60, Left}, + "%": {60, Left}, + "**": {100, Right}, + "^": {100, Right}, + "??": {500, Left}, +} diff --git a/vendor/github.com/antonmedv/expr/parser/parser.go b/vendor/github.com/antonmedv/expr/parser/parser.go index fd26fe18bd..d4a870f715 100644 --- a/vendor/github.com/antonmedv/expr/parser/parser.go +++ b/vendor/github.com/antonmedv/expr/parser/parser.go @@ -2,73 +2,35 @@ package parser import ( "fmt" + "math" "strconv" "strings" - "unicode/utf8" . "github.com/antonmedv/expr/ast" + "github.com/antonmedv/expr/builtin" + "github.com/antonmedv/expr/conf" "github.com/antonmedv/expr/file" . "github.com/antonmedv/expr/parser/lexer" + "github.com/antonmedv/expr/parser/operator" + "github.com/antonmedv/expr/parser/utils" ) -type associativity int - -const ( - left associativity = iota + 1 - right -) - -type operator struct { - precedence int - associativity associativity -} - -type builtin struct { +var predicates = map[string]struct { arity int -} - -var unaryOperators = map[string]operator{ - "not": {50, left}, - "!": {50, left}, - "-": {90, left}, - "+": {90, left}, -} - -var binaryOperators = map[string]operator{ - "or": {10, left}, - "||": {10, left}, - "and": {15, left}, - "&&": {15, left}, - "==": {20, left}, - "!=": {20, left}, - "<": {20, left}, - ">": {20, left}, - ">=": {20, left}, - "<=": {20, left}, - "in": {20, left}, - "matches": {20, left}, - "contains": {20, left}, - "startsWith": {20, left}, - "endsWith": {20, left}, - "..": {25, left}, - "+": {30, left}, - "-": {30, left}, - "*": {60, left}, - "/": {60, left}, - "%": {60, left}, - "**": {100, right}, - "^": {100, right}, - "??": {500, left}, -} - -var builtins = map[string]builtin{ - "all": {2}, - "none": {2}, - "any": {2}, - "one": {2}, - "filter": {2}, - "map": {2}, - "count": {2}, +}{ + "all": {2}, + "none": {2}, + "any": {2}, + "one": {2}, + "filter": {2}, + "map": {2}, + "count": {2}, + "find": {2}, + "findIndex": {2}, + "findLast": {2}, + "findLastIndex": {2}, + "groupBy": {2}, + "reduce": {3}, } type parser struct { @@ -77,6 +39,7 @@ type parser struct { pos int err *file.Error depth int // closure call depth + config *conf.Config } type Tree struct { @@ -85,6 +48,12 @@ type Tree struct { } func Parse(input string) (*Tree, error) { + return ParseWithConfig(input, &conf.Config{ + Disabled: map[string]bool{}, + }) +} + +func ParseWithConfig(input string, config *conf.Config) (*Tree, error) { source := file.NewSource(input) tokens, err := Lex(source) @@ -95,6 +64,7 @@ func Parse(input string) (*Tree, error) { p := &parser{ tokens: tokens, current: tokens[0], + config: config, } node := p.parseExpression(0) @@ -113,11 +83,11 @@ func Parse(input string) (*Tree, error) { }, nil } -func (p *parser) error(format string, args ...interface{}) { +func (p *parser) error(format string, args ...any) { p.errorAt(p.current, format, args...) } -func (p *parser) errorAt(token Token, format string, args ...interface{}) { +func (p *parser) errorAt(token Token, format string, args ...any) { if p.err == nil { // show first error p.err = &file.Error{ Location: token.Location, @@ -146,14 +116,21 @@ func (p *parser) expect(kind Kind, values ...string) { // parse functions func (p *parser) parseExpression(precedence int) Node { + if precedence == 0 { + if p.current.Is(Operator, "let") { + return p.parseVariableDeclaration() + } + } + nodeLeft := p.parsePrimary() - lastOperator := "" + prevOperator := "" opToken := p.current for opToken.Is(Operator) && p.err == nil { negate := false var notToken Token + // Handle "not *" operator, like "not in" or "not contains". if opToken.Is(Operator, "not") { p.next() notToken = p.current @@ -161,20 +138,25 @@ func (p *parser) parseExpression(precedence int) Node { opToken = p.current } - if op, ok := binaryOperators[opToken.Value]; ok { - if op.precedence >= precedence { + if op, ok := operator.Binary[opToken.Value]; ok { + if op.Precedence >= precedence { p.next() - if lastOperator == "??" && opToken.Value != "??" && !opToken.Is(Bracket, "(") { + if opToken.Value == "|" { + nodeLeft = p.parsePipe(nodeLeft) + goto next + } + + if prevOperator == "??" && opToken.Value != "??" && !opToken.Is(Bracket, "(") { p.errorAt(opToken, "Operator (%v) and coalesce expressions (??) cannot be mixed. Wrap either by parentheses.", opToken.Value) break } var nodeRight Node - if op.associativity == left { - nodeRight = p.parseExpression(op.precedence + 1) + if op.Associativity == operator.Left { + nodeRight = p.parseExpression(op.Precedence + 1) } else { - nodeRight = p.parseExpression(op.precedence) + nodeRight = p.parseExpression(op.Precedence) } nodeLeft = &BinaryNode{ @@ -192,28 +174,71 @@ func (p *parser) parseExpression(precedence int) Node { nodeLeft.SetLocation(notToken.Location) } - lastOperator = opToken.Value - opToken = p.current - continue + goto next } } break + + next: + prevOperator = opToken.Value + opToken = p.current } if precedence == 0 { - nodeLeft = p.parseConditionalExpression(nodeLeft) + nodeLeft = p.parseConditional(nodeLeft) } return nodeLeft } +func (p *parser) parseVariableDeclaration() Node { + p.expect(Operator, "let") + variableName := p.current + p.expect(Identifier) + p.expect(Operator, "=") + value := p.parseExpression(0) + p.expect(Operator, ";") + node := p.parseExpression(0) + let := &VariableDeclaratorNode{ + Name: variableName.Value, + Value: value, + Expr: node, + } + let.SetLocation(variableName.Location) + return let +} + +func (p *parser) parseConditional(node Node) Node { + var expr1, expr2 Node + for p.current.Is(Operator, "?") && p.err == nil { + p.next() + + if !p.current.Is(Operator, ":") { + expr1 = p.parseExpression(0) + p.expect(Operator, ":") + expr2 = p.parseExpression(0) + } else { + p.next() + expr1 = node + expr2 = p.parseExpression(0) + } + + node = &ConditionalNode{ + Cond: node, + Exp1: expr1, + Exp2: expr2, + } + } + return node +} + func (p *parser) parsePrimary() Node { token := p.current if token.Is(Operator) { - if op, ok := unaryOperators[token.Value]; ok { + if op, ok := operator.Unary[token.Value]; ok { p.next() - expr := p.parseExpression(op.precedence) + expr := p.parseExpression(op.Precedence) node := &UnaryNode{ Operator: token.Value, Node: expr, @@ -232,10 +257,15 @@ func (p *parser) parsePrimary() Node { if p.depth > 0 { if token.Is(Operator, "#") || token.Is(Operator, ".") { + name := "" if token.Is(Operator, "#") { p.next() + if p.current.Is(Identifier) { + name = p.current.Value + p.next() + } } - node := &PointerNode{} + node := &PointerNode{Name: name} node.SetLocation(token.Location) return p.parsePostfixExpression(node) } @@ -245,34 +275,10 @@ func (p *parser) parsePrimary() Node { } } - return p.parsePrimaryExpression() -} - -func (p *parser) parseConditionalExpression(node Node) Node { - var expr1, expr2 Node - for p.current.Is(Operator, "?") && p.err == nil { - p.next() - - if !p.current.Is(Operator, ":") { - expr1 = p.parseExpression(0) - p.expect(Operator, ":") - expr2 = p.parseExpression(0) - } else { - p.next() - expr1 = node - expr2 = p.parseExpression(0) - } - - node = &ConditionalNode{ - Cond: node, - Exp1: expr1, - Exp2: expr2, - } - } - return node + return p.parseSecondary() } -func (p *parser) parsePrimaryExpression() Node { +func (p *parser) parseSecondary() Node { var node Node token := p.current @@ -294,7 +300,7 @@ func (p *parser) parsePrimaryExpression() Node { node.SetLocation(token.Location) return node default: - node = p.parseIdentifierExpression(token) + node = p.parseCall(token) } case Number: @@ -305,6 +311,10 @@ func (p *parser) parsePrimaryExpression() Node { if err != nil { p.error("invalid hex literal: %v", err) } + if number > math.MaxInt { + p.error("integer literal is too large") + return nil + } node := &IntegerNode{Value: int(number)} node.SetLocation(token.Location) return node @@ -321,6 +331,10 @@ func (p *parser) parsePrimaryExpression() Node { if err != nil { p.error("invalid integer literal: %v", err) } + if number > math.MaxInt { + p.error("integer literal is too large") + return nil + } node := &IntegerNode{Value: int(number)} node.SetLocation(token.Location) return node @@ -345,14 +359,16 @@ func (p *parser) parsePrimaryExpression() Node { return p.parsePostfixExpression(node) } -func (p *parser) parseIdentifierExpression(token Token) Node { +func (p *parser) parseCall(token Token) Node { var node Node if p.current.Is(Bracket, "(") { var arguments []Node - if b, ok := builtins[token.Value]; ok { + if b, ok := predicates[token.Value]; ok { p.expect(Bracket, "(") - // TODO: Add builtins signatures. + + // TODO: Refactor parser to use builtin.Builtins instead of predicates map. + if b.arity == 1 { arguments = make([]Node, 1) arguments[0] = p.parseExpression(0) @@ -362,6 +378,18 @@ func (p *parser) parseIdentifierExpression(token Token) Node { p.expect(Operator, ",") arguments[1] = p.parseClosure() } + + if token.Value == "reduce" { + arguments = make([]Node, 2) + arguments[0] = p.parseExpression(0) + p.expect(Operator, ",") + arguments[1] = p.parseClosure() + if p.current.Is(Operator, ",") { + p.next() + arguments = append(arguments, p.parseExpression(0)) + } + } + p.expect(Bracket, ")") node = &BuiltinNode{ @@ -369,6 +397,12 @@ func (p *parser) parseIdentifierExpression(token Token) Node { Arguments: arguments, } node.SetLocation(token.Location) + } else if _, ok := builtin.Index[token.Value]; ok && !p.config.Disabled[token.Value] { + node = &BuiltinNode{ + Name: token.Value, + Arguments: p.parseArguments(), + } + node.SetLocation(token.Location) } else { callee := &IdentifierNode{Value: token.Value} callee.SetLocation(token.Location) @@ -487,7 +521,7 @@ func (p *parser) parsePostfixExpression(node Node) Node { if propertyToken.Kind != Identifier && // Operators like "not" and "matches" are valid methods or property names. - (propertyToken.Kind != Operator || !isValidIdentifier(propertyToken.Value)) { + (propertyToken.Kind != Operator || !utils.IsValidIdentifier(propertyToken.Value)) { p.error("expected name") } @@ -578,20 +612,58 @@ func (p *parser) parsePostfixExpression(node Node) Node { return node } -func isValidIdentifier(str string) bool { - if len(str) == 0 { - return false - } - h, w := utf8.DecodeRuneInString(str) - if !IsAlphabetic(h) { - return false - } - for _, r := range str[w:] { - if !IsAlphaNumeric(r) { - return false +func (p *parser) parsePipe(node Node) Node { + identifier := p.current + p.expect(Identifier) + + arguments := []Node{node} + + if b, ok := predicates[identifier.Value]; ok { + p.expect(Bracket, "(") + + // TODO: Refactor parser to use builtin.Builtins instead of predicates map. + + if b.arity == 2 { + arguments = append(arguments, p.parseClosure()) + } + + if identifier.Value == "reduce" { + arguments = append(arguments, p.parseClosure()) + if p.current.Is(Operator, ",") { + p.next() + arguments = append(arguments, p.parseExpression(0)) + } + } + + p.expect(Bracket, ")") + + node = &BuiltinNode{ + Name: identifier.Value, + Arguments: arguments, + } + node.SetLocation(identifier.Location) + } else if _, ok := builtin.Index[identifier.Value]; ok { + arguments = append(arguments, p.parseArguments()...) + + node = &BuiltinNode{ + Name: identifier.Value, + Arguments: arguments, } + node.SetLocation(identifier.Location) + } else { + callee := &IdentifierNode{Value: identifier.Value} + callee.SetLocation(identifier.Location) + + arguments = append(arguments, p.parseArguments()...) + + node = &CallNode{ + Callee: callee, + Arguments: arguments, + } + node.SetLocation(identifier.Location) } - return true + + return node } func (p *parser) parseArguments() []Node { diff --git a/vendor/github.com/antonmedv/expr/parser/utils/utils.go b/vendor/github.com/antonmedv/expr/parser/utils/utils.go new file mode 100644 index 0000000000..947f9a4008 --- /dev/null +++ b/vendor/github.com/antonmedv/expr/parser/utils/utils.go @@ -0,0 +1,34 @@ +package utils + +import ( + "unicode" + "unicode/utf8" +) + +func IsValidIdentifier(str string) bool { + if len(str) == 0 { + return false + } + h, w := utf8.DecodeRuneInString(str) + if !IsAlphabetic(h) { + return false + } + for _, r := range str[w:] { + if !IsAlphaNumeric(r) { + return false + } + } + return true +} + +func IsSpace(r rune) bool { + return unicode.IsSpace(r) +} + +func IsAlphaNumeric(r rune) bool { + return IsAlphabetic(r) || unicode.IsDigit(r) +} + +func IsAlphabetic(r rune) bool { + return r == '_' || r == '$' || unicode.IsLetter(r) +} diff --git a/vendor/github.com/antonmedv/expr/vm/generated.go b/vendor/github.com/antonmedv/expr/vm/generated.go index 9fc7883e2d..1a0b365718 100644 --- a/vendor/github.com/antonmedv/expr/vm/generated.go +++ b/vendor/github.com/antonmedv/expr/vm/generated.go @@ -7,20 +7,20 @@ import ( "time" ) -var FuncTypes = []interface{}{ +var FuncTypes = []any{ 1: new(func() time.Duration), 2: new(func() time.Month), 3: new(func() time.Time), 4: new(func() time.Weekday), 5: new(func() []uint8), - 6: new(func() []interface{}), + 6: new(func() []any), 7: new(func() bool), 8: new(func() uint8), 9: new(func() float64), 10: new(func() int), 11: new(func() int64), - 12: new(func() interface{}), - 13: new(func() map[string]interface{}), + 12: new(func() any), + 13: new(func() map[string]any), 14: new(func() int32), 15: new(func() string), 16: new(func() uint), @@ -29,7 +29,7 @@ var FuncTypes = []interface{}{ 19: new(func(time.Duration) time.Time), 20: new(func(time.Time) time.Duration), 21: new(func(time.Time) bool), - 22: new(func([]interface{}, string) string), + 22: new(func([]any, string) string), 23: new(func([]string, string) string), 24: new(func(bool) bool), 25: new(func(bool) float64), @@ -56,23 +56,23 @@ var FuncTypes = []interface{}{ 46: new(func(string, int32) int), 47: new(func(string, string) bool), 48: new(func(string, string) string), - 49: new(func(interface{}) bool), - 50: new(func(interface{}) float64), - 51: new(func(interface{}) int), - 52: new(func(interface{}) string), - 53: new(func(interface{}) interface{}), - 54: new(func(interface{}) []interface{}), - 55: new(func(interface{}) map[string]interface{}), - 56: new(func([]interface{}) interface{}), - 57: new(func([]interface{}) []interface{}), - 58: new(func([]interface{}) map[string]interface{}), - 59: new(func(interface{}, interface{}) bool), - 60: new(func(interface{}, interface{}) string), - 61: new(func(interface{}, interface{}) interface{}), - 62: new(func(interface{}, interface{}) []interface{}), + 49: new(func(any) bool), + 50: new(func(any) float64), + 51: new(func(any) int), + 52: new(func(any) string), + 53: new(func(any) any), + 54: new(func(any) []any), + 55: new(func(any) map[string]any), + 56: new(func([]any) any), + 57: new(func([]any) []any), + 58: new(func([]any) map[string]any), + 59: new(func(any, any) bool), + 60: new(func(any, any) string), + 61: new(func(any, any) any), + 62: new(func(any, any) []any), } -func (vm *VM) call(fn interface{}, kind int) interface{} { +func (vm *VM) call(fn any, kind int) any { switch kind { case 1: return fn.(func() time.Duration)() @@ -85,7 +85,7 @@ func (vm *VM) call(fn interface{}, kind int) interface{} { case 5: return fn.(func() []uint8)() case 6: - return fn.(func() []interface{})() + return fn.(func() []any)() case 7: return fn.(func() bool)() case 8: @@ -97,9 +97,9 @@ func (vm *VM) call(fn interface{}, kind int) interface{} { case 11: return fn.(func() int64)() case 12: - return fn.(func() interface{})() + return fn.(func() any)() case 13: - return fn.(func() map[string]interface{})() + return fn.(func() map[string]any)() case 14: return fn.(func() int32)() case 15: @@ -122,8 +122,8 @@ func (vm *VM) call(fn interface{}, kind int) interface{} { return fn.(func(time.Time) bool)(arg1) case 22: arg2 := vm.pop().(string) - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}, string) string)(arg1, arg2) + arg1 := vm.pop().([]any) + return fn.(func([]any, string) string)(arg1, arg2) case 23: arg2 := vm.pop().(string) arg1 := vm.pop().([]string) @@ -212,50 +212,50 @@ func (vm *VM) call(fn interface{}, kind int) interface{} { return fn.(func(string, string) string)(arg1, arg2) case 49: arg1 := vm.pop() - return fn.(func(interface{}) bool)(arg1) + return fn.(func(any) bool)(arg1) case 50: arg1 := vm.pop() - return fn.(func(interface{}) float64)(arg1) + return fn.(func(any) float64)(arg1) case 51: arg1 := vm.pop() - return fn.(func(interface{}) int)(arg1) + return fn.(func(any) int)(arg1) case 52: arg1 := vm.pop() - return fn.(func(interface{}) string)(arg1) + return fn.(func(any) string)(arg1) case 53: arg1 := vm.pop() - return fn.(func(interface{}) interface{})(arg1) + return fn.(func(any) any)(arg1) case 54: arg1 := vm.pop() - return fn.(func(interface{}) []interface{})(arg1) + return fn.(func(any) []any)(arg1) case 55: arg1 := vm.pop() - return fn.(func(interface{}) map[string]interface{})(arg1) + return fn.(func(any) map[string]any)(arg1) case 56: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) interface{})(arg1) + arg1 := vm.pop().([]any) + return fn.(func([]any) any)(arg1) case 57: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) []interface{})(arg1) + arg1 := vm.pop().([]any) + return fn.(func([]any) []any)(arg1) case 58: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) map[string]interface{})(arg1) + arg1 := vm.pop().([]any) + return fn.(func([]any) map[string]any)(arg1) case 59: arg2 := vm.pop() arg1 := vm.pop() - return fn.(func(interface{}, interface{}) bool)(arg1, arg2) + return fn.(func(any, any) bool)(arg1, arg2) case 60: arg2 := vm.pop() arg1 := vm.pop() - return fn.(func(interface{}, interface{}) string)(arg1, arg2) + return fn.(func(any, any) string)(arg1, arg2) case 61: arg2 := vm.pop() arg1 := vm.pop() - return fn.(func(interface{}, interface{}) interface{})(arg1, arg2) + return fn.(func(any, any) any)(arg1, arg2) case 62: arg2 := vm.pop() arg1 := vm.pop() - return fn.(func(interface{}, interface{}) []interface{})(arg1, arg2) + return fn.(func(any, any) []any)(arg1, arg2) } panic(fmt.Sprintf("unknown function kind (%v)", kind)) diff --git a/vendor/github.com/antonmedv/expr/vm/opcodes.go b/vendor/github.com/antonmedv/expr/vm/opcodes.go index b3117e73c2..1106cd3f05 100644 --- a/vendor/github.com/antonmedv/expr/vm/opcodes.go +++ b/vendor/github.com/antonmedv/expr/vm/opcodes.go @@ -3,14 +3,18 @@ package vm type Opcode byte const ( - OpPush Opcode = iota - OpPushInt + OpInvalid Opcode = iota + OpPush + OpInt OpPop + OpStore + OpLoadVar OpLoadConst OpLoadField OpLoadFast OpLoadMethod OpLoadFunc + OpLoadEnv OpFetch OpFetchField OpMethod @@ -55,17 +59,25 @@ const ( OpCallN OpCallFast OpCallTyped - OpBuiltin + OpCallBuiltin1 OpArray OpMap OpLen OpCast OpDeref - OpIncrementIt + OpIncrementIndex + OpDecrementIndex OpIncrementCount + OpGetIndex + OpSetIndex OpGetCount OpGetLen + OpGetGroupBy + OpGetAcc OpPointer + OpThrow + OpGroupBy + OpSetAcc OpBegin OpEnd // This opcode must be at the end of this list. ) diff --git a/vendor/github.com/antonmedv/expr/vm/program.go b/vendor/github.com/antonmedv/expr/vm/program.go index d424df14f4..c45a2bff23 100644 --- a/vendor/github.com/antonmedv/expr/vm/program.go +++ b/vendor/github.com/antonmedv/expr/vm/program.go @@ -3,6 +3,7 @@ package vm import ( "bytes" "fmt" + "io" "reflect" "regexp" "strings" @@ -18,15 +19,23 @@ type Program struct { Node ast.Node Source *file.Source Locations []file.Location - Constants []interface{} + Variables []any + Constants []any Bytecode []Opcode Arguments []int Functions []Function + DebugInfo map[string]string } func (program *Program) Disassemble() string { var buf bytes.Buffer w := tabwriter.NewWriter(&buf, 0, 0, 2, ' ', 0) + program.Opcodes(w) + _ = w.Flush() + return buf.String() +} + +func (program *Program) Opcodes(w io.Writer) { ip := 0 for ip < len(program.Bytecode) { pp := ip @@ -46,8 +55,11 @@ func (program *Program) Disassemble() string { argument := func(label string) { _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\n", pp, label, arg) } + argumentWithInfo := func(label string, prefix string) { + _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, program.DebugInfo[fmt.Sprintf("%s_%d", prefix, arg)]) + } constant := func(label string) { - var c interface{} + var c any if arg < len(program.Constants) { c = program.Constants[arg] } else { @@ -64,24 +76,29 @@ func (program *Program) Disassemble() string { } _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, c) } - builtIn := func(label string) { - f, ok := builtin.Builtins[arg] - if !ok { - panic(fmt.Sprintf("unknown builtin %v", arg)) - } - _, _ = fmt.Fprintf(w, "%v\t%v\t%v\n", pp, "OpBuiltin", f.Name) + builtinArg := func(label string) { + _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, builtin.Builtins[arg].Name) } switch op { + case OpInvalid: + code("OpInvalid") + case OpPush: constant("OpPush") - case OpPushInt: - argument("OpPushInt") + case OpInt: + argument("OpInt") case OpPop: code("OpPop") + case OpStore: + argumentWithInfo("OpStore", "var") + + case OpLoadVar: + argumentWithInfo("OpLoadVar", "var") + case OpLoadConst: constant("OpLoadConst") @@ -97,6 +114,9 @@ func (program *Program) Disassemble() string { case OpLoadFunc: argument("OpLoadFunc") + case OpLoadEnv: + code("OpLoadEnv") + case OpFetch: code("OpFetch") @@ -209,16 +229,16 @@ func (program *Program) Disassemble() string { argument("OpCall") case OpCall0: - argument("OpCall0") + argumentWithInfo("OpCall0", "func") case OpCall1: - argument("OpCall1") + argumentWithInfo("OpCall1", "func") case OpCall2: - argument("OpCall2") + argumentWithInfo("OpCall2", "func") case OpCall3: - argument("OpCall3") + argumentWithInfo("OpCall3", "func") case OpCallN: argument("OpCallN") @@ -230,8 +250,8 @@ func (program *Program) Disassemble() string { signature := reflect.TypeOf(FuncTypes[arg]).Elem().String() _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, "OpCallTyped", arg, signature) - case OpBuiltin: - builtIn("OpBuiltin") + case OpCallBuiltin1: + builtinArg("OpCallBuiltin1") case OpArray: code("OpArray") @@ -248,21 +268,45 @@ func (program *Program) Disassemble() string { case OpDeref: code("OpDeref") - case OpIncrementIt: - code("OpIncrementIt") + case OpIncrementIndex: + code("OpIncrementIndex") + + case OpDecrementIndex: + code("OpDecrementIndex") case OpIncrementCount: code("OpIncrementCount") + case OpGetIndex: + code("OpGetIndex") + + case OpSetIndex: + code("OpSetIndex") + case OpGetCount: code("OpGetCount") case OpGetLen: code("OpGetLen") + case OpGetGroupBy: + code("OpGetGroupBy") + + case OpGetAcc: + code("OpGetAcc") + case OpPointer: code("OpPointer") + case OpThrow: + code("OpThrow") + + case OpGroupBy: + code("OpGroupBy") + + case OpSetAcc: + code("OpSetAcc") + case OpBegin: code("OpBegin") @@ -270,9 +314,7 @@ func (program *Program) Disassemble() string { code("OpEnd") default: - _, _ = fmt.Fprintf(w, "%v\t%#x\n", ip, op) + _, _ = fmt.Fprintf(w, "%v\t%#x (unknown)\n", ip, op) } } - _ = w.Flush() - return buf.String() } diff --git a/vendor/github.com/antonmedv/expr/vm/runtime/generated.go b/vendor/github.com/antonmedv/expr/vm/runtime/generated.go index 09a4a200ed..720feb4554 100644 --- a/vendor/github.com/antonmedv/expr/vm/runtime/generated.go +++ b/vendor/github.com/antonmedv/expr/vm/runtime/generated.go @@ -344,6 +344,11 @@ func Equal(a, b interface{}) bool { case time.Time: return x.Equal(y) } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x == y + } } if IsNil(a) && IsNil(b) { return true @@ -687,6 +692,11 @@ func Less(a, b interface{}) bool { case time.Time: return x.Before(y) } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x < y + } } panic(fmt.Sprintf("invalid operation: %T < %T", a, b)) } @@ -1027,6 +1037,11 @@ func More(a, b interface{}) bool { case time.Time: return x.After(y) } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x > y + } } panic(fmt.Sprintf("invalid operation: %T > %T", a, b)) } @@ -1367,6 +1382,11 @@ func LessOrEqual(a, b interface{}) bool { case time.Time: return x.Before(y) || x.Equal(y) } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x <= y + } } panic(fmt.Sprintf("invalid operation: %T <= %T", a, b)) } @@ -1707,6 +1727,11 @@ func MoreOrEqual(a, b interface{}) bool { case time.Time: return x.After(y) || x.Equal(y) } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x >= y + } } panic(fmt.Sprintf("invalid operation: %T >= %T", a, b)) } @@ -2051,6 +2076,8 @@ func Add(a, b interface{}) interface{} { switch y := b.(type) { case time.Time: return y.Add(x) + case time.Duration: + return x + y } } panic(fmt.Sprintf("invalid operation: %T + %T", a, b)) @@ -2386,6 +2413,13 @@ func Subtract(a, b interface{}) interface{} { switch y := b.(type) { case time.Time: return x.Sub(y) + case time.Duration: + return x.Add(-y) + } + case time.Duration: + switch y := b.(type) { + case time.Duration: + return x - y } } panic(fmt.Sprintf("invalid operation: %T - %T", a, b)) @@ -2419,6 +2453,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case uint8: switch y := b.(type) { @@ -2446,6 +2482,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case uint16: switch y := b.(type) { @@ -2473,6 +2511,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case uint32: switch y := b.(type) { @@ -2500,6 +2540,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case uint64: switch y := b.(type) { @@ -2527,6 +2569,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case int: switch y := b.(type) { @@ -2554,6 +2598,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case int8: switch y := b.(type) { @@ -2581,6 +2627,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case int16: switch y := b.(type) { @@ -2608,6 +2656,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case int32: switch y := b.(type) { @@ -2635,6 +2685,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case int64: switch y := b.(type) { @@ -2662,6 +2714,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } case float32: switch y := b.(type) { @@ -2689,6 +2743,8 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return float64(x) * float64(y) } case float64: switch y := b.(type) { @@ -2716,6 +2772,37 @@ func Multiply(a, b interface{}) interface{} { return float64(x) * float64(y) case float64: return float64(x) * float64(y) + case time.Duration: + return float64(x) * float64(y) + } + case time.Duration: + switch y := b.(type) { + case uint: + return time.Duration(x) * time.Duration(y) + case uint8: + return time.Duration(x) * time.Duration(y) + case uint16: + return time.Duration(x) * time.Duration(y) + case uint32: + return time.Duration(x) * time.Duration(y) + case uint64: + return time.Duration(x) * time.Duration(y) + case int: + return time.Duration(x) * time.Duration(y) + case int8: + return time.Duration(x) * time.Duration(y) + case int16: + return time.Duration(x) * time.Duration(y) + case int32: + return time.Duration(x) * time.Duration(y) + case int64: + return time.Duration(x) * time.Duration(y) + case float32: + return float64(x) * float64(y) + case float64: + return float64(x) * float64(y) + case time.Duration: + return time.Duration(x) * time.Duration(y) } } panic(fmt.Sprintf("invalid operation: %T * %T", a, b)) diff --git a/vendor/github.com/antonmedv/expr/vm/runtime/runtime.go b/vendor/github.com/antonmedv/expr/vm/runtime/runtime.go index b2eeb65d83..b03714e0fc 100644 --- a/vendor/github.com/antonmedv/expr/vm/runtime/runtime.go +++ b/vendor/github.com/antonmedv/expr/vm/runtime/runtime.go @@ -6,10 +6,9 @@ import ( "fmt" "math" "reflect" - "strconv" ) -func Fetch(from, i interface{}) interface{} { +func Fetch(from, i any) any { v := reflect.ValueOf(from) kind := v.Kind() if kind == reflect.Invalid { @@ -82,7 +81,7 @@ type Field struct { Path []string } -func FetchField(from interface{}, field *Field) interface{} { +func FetchField(from any, field *Field) any { v := reflect.ValueOf(from) kind := v.Kind() if kind != reflect.Invalid { @@ -126,7 +125,7 @@ type Method struct { Name string } -func FetchMethod(from interface{}, method *Method) interface{} { +func FetchMethod(from any, method *Method) any { v := reflect.ValueOf(from) kind := v.Kind() if kind != reflect.Invalid { @@ -139,7 +138,7 @@ func FetchMethod(from interface{}, method *Method) interface{} { panic(fmt.Sprintf("cannot fetch %v from %T", method.Name, from)) } -func Deref(i interface{}) interface{} { +func Deref(i any) any { if i == nil { return nil } @@ -153,13 +152,15 @@ func Deref(i interface{}) interface{} { v = v.Elem() } - if v.Kind() == reflect.Ptr { +loop: + for v.Kind() == reflect.Ptr { if v.IsNil() { return i } indirect := reflect.Indirect(v) switch indirect.Kind() { case reflect.Struct, reflect.Map, reflect.Array, reflect.Slice: + break loop default: v = v.Elem() } @@ -172,7 +173,7 @@ func Deref(i interface{}) interface{} { panic(fmt.Sprintf("cannot dereference %v", i)) } -func Slice(array, from, to interface{}) interface{} { +func Slice(array, from, to any) any { v := reflect.ValueOf(array) switch v.Kind() { @@ -182,9 +183,15 @@ func Slice(array, from, to interface{}) interface{} { if a < 0 { a = length + a } + if a < 0 { + a = 0 + } if b < 0 { b = length + b } + if b < 0 { + b = 0 + } if b > length { b = length } @@ -206,7 +213,7 @@ func Slice(array, from, to interface{}) interface{} { panic(fmt.Sprintf("cannot slice %v", from)) } -func In(needle interface{}, array interface{}) bool { +func In(needle any, array any) bool { if array == nil { return false } @@ -260,10 +267,10 @@ func In(needle interface{}, array interface{}) bool { return false } - panic(fmt.Sprintf(`operator "in"" not defined on %T`, array)) + panic(fmt.Sprintf(`operator "in" not defined on %T`, array)) } -func Len(a interface{}) interface{} { +func Len(a any) int { v := reflect.ValueOf(a) switch v.Kind() { case reflect.Array, reflect.Slice, reflect.Map, reflect.String: @@ -273,7 +280,7 @@ func Len(a interface{}) interface{} { } } -func Negate(i interface{}) interface{} { +func Negate(i any) any { switch v := i.(type) { case float32: return -v @@ -304,7 +311,7 @@ func Negate(i interface{}) interface{} { } } -func Exponent(a, b interface{}) float64 { +func Exponent(a, b any) float64 { return math.Pow(ToFloat64(a), ToFloat64(b)) } @@ -320,7 +327,7 @@ func MakeRange(min, max int) []int { return rng } -func ToInt(a interface{}) int { +func ToInt(a any) int { switch x := a.(type) { case float32: return int(x) @@ -346,18 +353,12 @@ func ToInt(a interface{}) int { return int(x) case uint64: return int(x) - case string: - i, err := strconv.Atoi(x) - if err != nil { - panic(fmt.Sprintf("invalid operation: int(%s)", x)) - } - return i default: panic(fmt.Sprintf("invalid operation: int(%T)", x)) } } -func ToInt64(a interface{}) int64 { +func ToInt64(a any) int64 { switch x := a.(type) { case float32: return int64(x) @@ -388,7 +389,7 @@ func ToInt64(a interface{}) int64 { } } -func ToFloat64(a interface{}) float64 { +func ToFloat64(a any) float64 { switch x := a.(type) { case float32: return float64(x) @@ -414,18 +415,12 @@ func ToFloat64(a interface{}) float64 { return float64(x) case uint64: return float64(x) - case string: - f, err := strconv.ParseFloat(x, 64) - if err != nil { - panic(fmt.Sprintf("invalid operation: float(%s)", x)) - } - return f default: panic(fmt.Sprintf("invalid operation: float(%T)", x)) } } -func IsNil(v interface{}) bool { +func IsNil(v any) bool { if v == nil { return true } @@ -437,81 +432,3 @@ func IsNil(v interface{}) bool { return false } } - -func Abs(x interface{}) interface{} { - switch x.(type) { - case float32: - if x.(float32) < 0 { - return -x.(float32) - } else { - return x - } - case float64: - if x.(float64) < 0 { - return -x.(float64) - } else { - return x - } - case int: - if x.(int) < 0 { - return -x.(int) - } else { - return x - } - case int8: - if x.(int8) < 0 { - return -x.(int8) - } else { - return x - } - case int16: - if x.(int16) < 0 { - return -x.(int16) - } else { - return x - } - case int32: - if x.(int32) < 0 { - return -x.(int32) - } else { - return x - } - case int64: - if x.(int64) < 0 { - return -x.(int64) - } else { - return x - } - case uint: - if x.(uint) < 0 { - return -x.(uint) - } else { - return x - } - case uint8: - if x.(uint8) < 0 { - return -x.(uint8) - } else { - return x - } - case uint16: - if x.(uint16) < 0 { - return -x.(uint16) - } else { - return x - } - case uint32: - if x.(uint32) < 0 { - return -x.(uint32) - } else { - return x - } - case uint64: - if x.(uint64) < 0 { - return -x.(uint64) - } else { - return x - } - } - panic(fmt.Sprintf("invalid argument for abs (type %T)", x)) -} diff --git a/vendor/github.com/antonmedv/expr/vm/vm.go b/vendor/github.com/antonmedv/expr/vm/vm.go index af4fc5bf75..d020a31a84 100644 --- a/vendor/github.com/antonmedv/expr/vm/vm.go +++ b/vendor/github.com/antonmedv/expr/vm/vm.go @@ -13,12 +13,12 @@ import ( "github.com/antonmedv/expr/vm/runtime" ) -var MemoryBudget int = 1e6 +var MemoryBudget uint = 1e6 var errorType = reflect.TypeOf((*error)(nil)).Elem() -type Function = func(params ...interface{}) (interface{}, error) +type Function = func(params ...any) (any, error) -func Run(program *Program, env interface{}) (interface{}, error) { +func Run(program *Program, env any) (any, error) { if program == nil { return nil, fmt.Errorf("program is nil") } @@ -28,21 +28,23 @@ func Run(program *Program, env interface{}) (interface{}, error) { } type VM struct { - stack []interface{} + stack []any ip int scopes []*Scope debug bool step chan struct{} curr chan int - memory int - memoryBudget int + memory uint + memoryBudget uint } type Scope struct { - Array reflect.Value - It int - Len int - Count int + Array reflect.Value + Index int + Len int + Count int + GroupBy map[any][]any + Acc any } func Debug() *VM { @@ -54,7 +56,7 @@ func Debug() *VM { return vm } -func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) { +func (vm *VM) Run(program *Program, env any) (_ any, err error) { defer func() { if r := recover(); r != nil { f := &file.Error{ @@ -69,7 +71,7 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) }() if vm.stack == nil { - vm.stack = make([]interface{}, 0, 2) + vm.stack = make([]any, 0, 2) } else { vm.stack = vm.stack[0:0] } @@ -93,12 +95,24 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) switch op { + case OpInvalid: + panic("invalid opcode") + case OpPush: vm.push(program.Constants[arg]) + case OpInt: + vm.push(arg) + case OpPop: vm.pop() + case OpStore: + program.Variables[arg] = vm.pop() + + case OpLoadVar: + vm.push(program.Variables[arg]) + case OpLoadConst: vm.push(runtime.Fetch(env, program.Constants[arg])) @@ -106,7 +120,7 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) vm.push(runtime.FetchField(env, program.Constants[arg].(*runtime.Field))) case OpLoadFast: - vm.push(env.(map[string]interface{})[program.Constants[arg].(string)]) + vm.push(env.(map[string]any)[program.Constants[arg].(string)]) case OpLoadMethod: vm.push(runtime.FetchMethod(env, program.Constants[arg].(*runtime.Method))) @@ -123,6 +137,9 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) a := vm.pop() vm.push(runtime.FetchField(a, program.Constants[arg].(*runtime.Field))) + case OpLoadEnv: + vm.push(env) + case OpMethod: a := vm.pop() vm.push(runtime.FetchMethod(a, program.Constants[arg].(*runtime.Method))) @@ -184,7 +201,7 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) case OpJumpIfEnd: scope := vm.Scope() - if scope.It >= scope.Len { + if scope.Index >= scope.Len { vm.ip += arg } @@ -252,11 +269,11 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) min := runtime.ToInt(a) max := runtime.ToInt(b) size := max - min + 1 - if vm.memory+size >= vm.memoryBudget { - panic("memory budget exceeded") + if size <= 0 { + size = 0 } + vm.memGrow(uint(size)) vm.push(runtime.MakeRange(min, max)) - vm.memory += size case OpMatches: b := vm.pop() @@ -351,7 +368,7 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) case OpCallN: fn := vm.pop().(Function) size := arg - in := make([]interface{}, size) + in := make([]any, size) for i := int(size) - 1; i >= 0; i-- { in[i] = vm.pop() } @@ -362,51 +379,45 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) vm.push(out) case OpCallFast: - fn := vm.pop().(func(...interface{}) interface{}) + fn := vm.pop().(func(...any) any) size := arg - in := make([]interface{}, size) + in := make([]any, size) for i := int(size) - 1; i >= 0; i-- { in[i] = vm.pop() } vm.push(fn(in...)) case OpCallTyped: - fn := vm.pop() - out := vm.call(fn, arg) - vm.push(out) + vm.push(vm.call(vm.pop(), arg)) + + case OpCallBuiltin1: + vm.push(builtin.Builtins[arg].Fast(vm.pop())) case OpArray: size := vm.pop().(int) - array := make([]interface{}, size) + vm.memGrow(uint(size)) + array := make([]any, size) for i := size - 1; i >= 0; i-- { array[i] = vm.pop() } vm.push(array) - vm.memory += size - if vm.memory >= vm.memoryBudget { - panic("memory budget exceeded") - } case OpMap: size := vm.pop().(int) - m := make(map[string]interface{}) + vm.memGrow(uint(size)) + m := make(map[string]any) for i := size - 1; i >= 0; i-- { value := vm.pop() key := vm.pop() m[key.(string)] = value } vm.push(m) - vm.memory += size - if vm.memory >= vm.memoryBudget { - panic("memory budget exceeded") - } case OpLen: vm.push(runtime.Len(vm.current())) case OpCast: - t := arg - switch t { + switch arg { case 0: vm.push(runtime.ToInt(vm.pop())) case 1: @@ -419,14 +430,24 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) a := vm.pop() vm.push(runtime.Deref(a)) - case OpIncrementIt: + case OpIncrementIndex: + vm.Scope().Index++ + + case OpDecrementIndex: scope := vm.Scope() - scope.It++ + scope.Index-- case OpIncrementCount: scope := vm.Scope() scope.Count++ + case OpGetIndex: + vm.push(vm.Scope().Index) + + case OpSetIndex: + scope := vm.Scope() + scope.Index = vm.pop().(int) + case OpGetCount: scope := vm.Scope() vm.push(scope.Count) @@ -435,9 +456,30 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) scope := vm.Scope() vm.push(scope.Len) + case OpGetGroupBy: + vm.push(vm.Scope().GroupBy) + + case OpGetAcc: + vm.push(vm.Scope().Acc) + + case OpSetAcc: + vm.Scope().Acc = vm.pop() + case OpPointer: scope := vm.Scope() - vm.push(scope.Array.Index(scope.It).Interface()) + vm.push(scope.Array.Index(scope.Index).Interface()) + + case OpThrow: + panic(vm.pop().(error)) + + case OpGroupBy: + scope := vm.Scope() + if scope.GroupBy == nil { + scope.GroupBy = make(map[any][]any) + } + it := scope.Array.Index(scope.Index).Interface() + key := vm.pop() + scope.GroupBy[key] = append(scope.GroupBy[key], it) case OpBegin: a := vm.pop() @@ -450,24 +492,6 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) case OpEnd: vm.scopes = vm.scopes[:len(vm.scopes)-1] - case OpBuiltin: - switch arg { - case builtin.Len: - vm.push(runtime.Len(vm.pop())) - - case builtin.Abs: - vm.push(runtime.Abs(vm.pop())) - - case builtin.Int: - vm.push(runtime.ToInt(vm.pop())) - - case builtin.Float: - vm.push(runtime.ToFloat64(vm.pop())) - - default: - panic(fmt.Sprintf("unknown builtin %v", arg)) - } - default: panic(fmt.Sprintf("unknown bytecode %#x", op)) } @@ -489,21 +513,28 @@ func (vm *VM) Run(program *Program, env interface{}) (_ interface{}, err error) return nil, nil } -func (vm *VM) push(value interface{}) { +func (vm *VM) push(value any) { vm.stack = append(vm.stack, value) } -func (vm *VM) current() interface{} { +func (vm *VM) current() any { return vm.stack[len(vm.stack)-1] } -func (vm *VM) pop() interface{} { +func (vm *VM) pop() any { value := vm.stack[len(vm.stack)-1] vm.stack = vm.stack[:len(vm.stack)-1] return value } -func (vm *VM) Stack() []interface{} { +func (vm *VM) memGrow(size uint) { + vm.memory += size + if vm.memory >= vm.memoryBudget { + panic("memory budget exceeded") + } +} + +func (vm *VM) Stack() []any { return vm.stack } diff --git a/vendor/github.com/argoproj/argo-cd/assets/badge.svg b/vendor/github.com/argoproj/argo-cd/assets/badge.svg deleted file mode 100644 index a3234cfdf5..0000000000 --- a/vendor/github.com/argoproj/argo-cd/assets/badge.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/argoproj/argo-cd/assets/builtin-policy.csv b/vendor/github.com/argoproj/argo-cd/assets/builtin-policy.csv deleted file mode 100644 index f74c5b8002..0000000000 --- a/vendor/github.com/argoproj/argo-cd/assets/builtin-policy.csv +++ /dev/null @@ -1,34 +0,0 @@ -# Built-in policy which defines two roles: role:readonly and role:admin, -# and additionally assigns the admin user to the role:admin role. -# There are two policy formats: -# 1. Applications (which belong to a project): -# p, , , , / -# 2. All other resources: -# p, , , , - -p, role:readonly, applications, get, */*, allow -p, role:readonly, certificates, get, *, allow -p, role:readonly, clusters, get, *, allow -p, role:readonly, repositories, get, *, allow -p, role:readonly, projects, get, *, allow - -p, role:admin, applications, create, */*, allow -p, role:admin, applications, update, */*, allow -p, role:admin, applications, delete, */*, allow -p, role:admin, applications, sync, */*, allow -p, role:admin, applications, override, */*, allow -p, role:admin, certificates, create, *, allow -p, role:admin, certificates, update, *, allow -p, role:admin, certificates, delete, *, allow -p, role:admin, clusters, create, *, allow -p, role:admin, clusters, update, *, allow -p, role:admin, clusters, delete, *, allow -p, role:admin, repositories, create, *, allow -p, role:admin, repositories, update, *, allow -p, role:admin, repositories, delete, *, allow -p, role:admin, projects, create, *, allow -p, role:admin, projects, update, *, allow -p, role:admin, projects, delete, *, allow - -g, role:admin, role:readonly -g, admin, role:admin \ No newline at end of file diff --git a/vendor/github.com/argoproj/argo-cd/assets/model.conf b/vendor/github.com/argoproj/argo-cd/assets/model.conf deleted file mode 100644 index 240a9180d3..0000000000 --- a/vendor/github.com/argoproj/argo-cd/assets/model.conf +++ /dev/null @@ -1,14 +0,0 @@ -[request_definition] -r = sub, res, act, obj - -[policy_definition] -p = sub, res, act, obj, eft - -[role_definition] -g = _, _ - -[policy_effect] -e = some(where (p.eft == allow)) && !some(where (p.eft == deny)) - -[matchers] -m = g(r.sub, p.sub) && keyMatch(r.res, p.res) && keyMatch(r.act, p.act) && keyMatch(r.obj, p.obj) \ No newline at end of file diff --git a/vendor/github.com/argoproj/argo-cd/assets/swagger.json b/vendor/github.com/argoproj/argo-cd/assets/swagger.json deleted file mode 100644 index 0ad53c18de..0000000000 --- a/vendor/github.com/argoproj/argo-cd/assets/swagger.json +++ /dev/null @@ -1,3887 +0,0 @@ -{ - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "http", - "https" - ], - "swagger": "2.0", - "info": { - "description": "Description of all APIs", - "title": "Consolidate Services", - "version": "version not set" - }, - "paths": { - "/api/v1/account/password": { - "put": { - "tags": [ - "AccountService" - ], - "summary": "UpdatePassword updates an account's password to a new value", - "operationId": "UpdatePassword", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/accountUpdatePasswordRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/accountUpdatePasswordResponse" - } - } - } - } - }, - "/api/v1/applications": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "List returns list of applications", - "operationId": "ListMixin6", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "string", - "name": "refresh", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "project", - "in": "query" - }, - { - "type": "string", - "name": "resourceVersion", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1ApplicationList" - } - } - } - }, - "post": { - "tags": [ - "ApplicationService" - ], - "summary": "Create creates an application", - "operationId": "CreateMixin6", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - } - }, - "/api/v1/applications/{application.metadata.name}": { - "put": { - "tags": [ - "ApplicationService" - ], - "summary": "Update updates an application", - "operationId": "UpdateMixin6", - "parameters": [ - { - "type": "string", - "name": "application.metadata.name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - } - }, - "/api/v1/applications/{applicationName}/managed-resources": { - "get": { - "tags": [ - "ApplicationService" - ], - "operationId": "ManagedResources", - "parameters": [ - { - "type": "string", - "name": "applicationName", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationManagedResourcesResponse" - } - } - } - } - }, - "/api/v1/applications/{applicationName}/resource-tree": { - "get": { - "tags": [ - "ApplicationService" - ], - "operationId": "ResourceTree", - "parameters": [ - { - "type": "string", - "name": "applicationName", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1ApplicationTree" - } - } - } - } - }, - "/api/v1/applications/{name}": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "Get returns an application by name", - "operationId": "GetMixin6", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "refresh", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "project", - "in": "query" - }, - { - "type": "string", - "name": "resourceVersion", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - }, - "delete": { - "tags": [ - "ApplicationService" - ], - "summary": "Delete deletes an application", - "operationId": "DeleteMixin6", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationApplicationResponse" - } - } - } - }, - "patch": { - "tags": [ - "ApplicationService" - ], - "summary": "Patch patch an application", - "operationId": "Patch", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/applicationApplicationPatchRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - } - }, - "/api/v1/applications/{name}/events": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "ListResourceEvents returns a list of event resources", - "operationId": "ListResourceEvents", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceNamespace", - "in": "query" - }, - { - "type": "string", - "name": "resourceName", - "in": "query" - }, - { - "type": "string", - "name": "resourceUID", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1EventList" - } - } - } - } - }, - "/api/v1/applications/{name}/manifests": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "GetManifests returns application manifests", - "operationId": "GetManifests", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "revision", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/repositoryManifestResponse" - } - } - } - } - }, - "/api/v1/applications/{name}/operation": { - "delete": { - "tags": [ - "ApplicationService" - ], - "summary": "TerminateOperation terminates the currently running operation", - "operationId": "TerminateOperation", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationOperationTerminateResponse" - } - } - } - } - }, - "/api/v1/applications/{name}/pods/{podName}/logs": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "PodLogs returns stream of log entries for the specified pod. Pod", - "operationId": "PodLogs", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "podName", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "namespace", - "in": "query" - }, - { - "type": "string", - "name": "container", - "in": "query" - }, - { - "type": "string", - "format": "int64", - "name": "sinceSeconds", - "in": "query" - }, - { - "type": "string", - "format": "int64", - "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", - "name": "sinceTime.seconds", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", - "name": "sinceTime.nanos", - "in": "query" - }, - { - "type": "string", - "format": "int64", - "name": "tailLines", - "in": "query" - }, - { - "type": "boolean", - "format": "boolean", - "name": "follow", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(streaming responses)", - "schema": { - "$ref": "#/definitions/applicationLogEntry" - } - } - } - } - }, - "/api/v1/applications/{name}/resource": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "GetResource returns single application resource", - "operationId": "GetResource", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "namespace", - "in": "query" - }, - { - "type": "string", - "name": "resourceName", - "in": "query" - }, - { - "type": "string", - "name": "version", - "in": "query" - }, - { - "type": "string", - "name": "group", - "in": "query" - }, - { - "type": "string", - "name": "kind", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationApplicationResourceResponse" - } - } - } - }, - "post": { - "tags": [ - "ApplicationService" - ], - "summary": "PatchResource patch single application resource", - "operationId": "PatchResource", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationApplicationResourceResponse" - } - } - } - }, - "delete": { - "tags": [ - "ApplicationService" - ], - "summary": "DeleteResource deletes a single application resource", - "operationId": "DeleteResource", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationApplicationResponse" - } - } - } - } - }, - "/api/v1/applications/{name}/resource/actions": { - "get": { - "tags": [ - "ApplicationService" - ], - "operationId": "ListResourceActions", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "namespace", - "in": "query" - }, - { - "type": "string", - "name": "resourceName", - "in": "query" - }, - { - "type": "string", - "name": "version", - "in": "query" - }, - { - "type": "string", - "name": "group", - "in": "query" - }, - { - "type": "string", - "name": "kind", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationResourceActionsListResponse" - } - } - } - }, - "post": { - "tags": [ - "ApplicationService" - ], - "operationId": "RunResourceAction", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/applicationApplicationResponse" - } - } - } - } - }, - "/api/v1/applications/{name}/revisions/{revision}/metadata": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "Get the meta-data (author, date, tags, message) for a specific revision of the application", - "operationId": "RevisionMetadata", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "revision", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1RevisionMetadata" - } - } - } - } - }, - "/api/v1/applications/{name}/rollback": { - "post": { - "tags": [ - "ApplicationService" - ], - "summary": "Rollback syncs an application to its target state", - "operationId": "Rollback", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/applicationApplicationRollbackRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - } - }, - "/api/v1/applications/{name}/spec": { - "put": { - "tags": [ - "ApplicationService" - ], - "summary": "UpdateSpec updates an application spec", - "operationId": "UpdateSpec", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1ApplicationSpec" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1ApplicationSpec" - } - } - } - } - }, - "/api/v1/applications/{name}/sync": { - "post": { - "tags": [ - "ApplicationService" - ], - "summary": "Sync syncs an application to its target state", - "operationId": "Sync", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/applicationApplicationSyncRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Application" - } - } - } - } - }, - "/api/v1/certificates": { - "get": { - "tags": [ - "CertificateService" - ], - "summary": "List all available repository certificates", - "operationId": "ListCertificates", - "parameters": [ - { - "type": "string", - "description": "A file-glob pattern (not regular expression) the host name has to match.", - "name": "hostNamePattern", - "in": "query" - }, - { - "type": "string", - "description": "The type of the certificate to match (ssh or https).", - "name": "certType", - "in": "query" - }, - { - "type": "string", - "description": "The sub type of the certificate to match (protocol dependent, usually only used for ssh certs).", - "name": "certSubType", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1RepositoryCertificateList" - } - } - } - }, - "post": { - "tags": [ - "CertificateService" - ], - "summary": "Creates repository certificates on the server", - "operationId": "CreateCertificate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1RepositoryCertificateList" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1RepositoryCertificateList" - } - } - } - }, - "delete": { - "tags": [ - "CertificateService" - ], - "summary": "Delete the certificates that match the RepositoryCertificateQuery", - "operationId": "DeleteCertificate", - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1RepositoryCertificateList" - } - } - } - } - }, - "/api/v1/clusters": { - "get": { - "tags": [ - "ClusterService" - ], - "summary": "List returns list of clusters", - "operationId": "List", - "parameters": [ - { - "type": "string", - "name": "server", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1ClusterList" - } - } - } - }, - "post": { - "tags": [ - "ClusterService" - ], - "summary": "Create creates a cluster", - "operationId": "Create", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Cluster" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Cluster" - } - } - } - } - }, - "/api/v1/clusters/{cluster.server}": { - "put": { - "tags": [ - "ClusterService" - ], - "summary": "Update updates a cluster", - "operationId": "Update", - "parameters": [ - { - "type": "string", - "name": "cluster.server", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Cluster" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Cluster" - } - } - } - } - }, - "/api/v1/clusters/{server}": { - "get": { - "tags": [ - "ClusterService" - ], - "summary": "Get returns a cluster by server address", - "operationId": "GetMixin1", - "parameters": [ - { - "type": "string", - "name": "server", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Cluster" - } - } - } - }, - "delete": { - "tags": [ - "ClusterService" - ], - "summary": "Delete deletes a cluster", - "operationId": "Delete", - "parameters": [ - { - "type": "string", - "name": "server", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/clusterClusterResponse" - } - } - } - } - }, - "/api/v1/clusters/{server}/rotate-auth": { - "post": { - "tags": [ - "ClusterService" - ], - "summary": "RotateAuth returns a cluster by server address", - "operationId": "RotateAuth", - "parameters": [ - { - "type": "string", - "name": "server", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/clusterClusterResponse" - } - } - } - } - }, - "/api/v1/projects": { - "get": { - "tags": [ - "ProjectService" - ], - "summary": "List returns list of projects", - "operationId": "ListMixin4", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1AppProjectList" - } - } - } - }, - "post": { - "tags": [ - "ProjectService" - ], - "summary": "Create a new project.", - "operationId": "CreateMixin4", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/projectProjectCreateRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1AppProject" - } - } - } - } - }, - "/api/v1/projects/{name}": { - "get": { - "tags": [ - "ProjectService" - ], - "summary": "Get returns a project by name", - "operationId": "GetMixin4", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1AppProject" - } - } - } - }, - "delete": { - "tags": [ - "ProjectService" - ], - "summary": "Delete deletes a project", - "operationId": "DeleteMixin4", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/projectEmptyResponse" - } - } - } - } - }, - "/api/v1/projects/{name}/events": { - "get": { - "tags": [ - "ProjectService" - ], - "summary": "ListEvents returns a list of project events", - "operationId": "ListEvents", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1EventList" - } - } - } - } - }, - "/api/v1/projects/{project.metadata.name}": { - "put": { - "tags": [ - "ProjectService" - ], - "summary": "Update updates a project", - "operationId": "UpdateMixin4", - "parameters": [ - { - "type": "string", - "name": "project.metadata.name", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/projectProjectUpdateRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1AppProject" - } - } - } - } - }, - "/api/v1/projects/{project}/roles/{role}/token": { - "post": { - "tags": [ - "ProjectService" - ], - "summary": "Create a new project token.", - "operationId": "CreateToken", - "parameters": [ - { - "type": "string", - "name": "project", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "role", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/projectProjectTokenCreateRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/projectProjectTokenResponse" - } - } - } - } - }, - "/api/v1/projects/{project}/roles/{role}/token/{iat}": { - "delete": { - "tags": [ - "ProjectService" - ], - "summary": "Delete a new project token.", - "operationId": "DeleteToken", - "parameters": [ - { - "type": "string", - "name": "project", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "role", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "int64", - "name": "iat", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/projectEmptyResponse" - } - } - } - } - }, - "/api/v1/repositories": { - "get": { - "tags": [ - "RepositoryService" - ], - "summary": "List returns list of repos", - "operationId": "ListMixin2", - "parameters": [ - { - "type": "string", - "name": "repo", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1RepositoryList" - } - } - } - }, - "post": { - "tags": [ - "RepositoryService" - ], - "summary": "Create creates a repo", - "operationId": "CreateMixin2", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Repository" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Repository" - } - } - } - } - }, - "/api/v1/repositories/{repo.repo}": { - "put": { - "tags": [ - "RepositoryService" - ], - "summary": "Update updates a repo", - "operationId": "UpdateMixin2", - "parameters": [ - { - "type": "string", - "name": "repo.repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1Repository" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/v1alpha1Repository" - } - } - } - } - }, - "/api/v1/repositories/{repo}": { - "delete": { - "tags": [ - "RepositoryService" - ], - "summary": "Delete deletes a repo", - "operationId": "DeleteMixin2", - "parameters": [ - { - "type": "string", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/repositoryRepoResponse" - } - } - } - } - }, - "/api/v1/repositories/{repo}/apps": { - "get": { - "tags": [ - "RepositoryService" - ], - "summary": "ListApps returns list of apps in the repo", - "operationId": "ListApps", - "parameters": [ - { - "type": "string", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "revision", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/repositoryRepoAppsResponse" - } - } - } - } - }, - "/api/v1/repositories/{repo}/apps/{path}": { - "get": { - "tags": [ - "RepositoryService" - ], - "summary": "GetAppDetails returns application details by given path", - "operationId": "GetAppDetails", - "parameters": [ - { - "type": "string", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "path", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "revision", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "helm.valueFiles", - "in": "query" - }, - { - "type": "string", - "name": "ksonnet.environment", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/repositoryRepoAppDetailsResponse" - } - } - } - } - }, - "/api/v1/repositories/{repo}/validate": { - "post": { - "tags": [ - "RepositoryService" - ], - "summary": "ValidateAccess validates access to a repository with given parameters", - "operationId": "ValidateAccess", - "parameters": [ - { - "type": "string", - "name": "repo", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/repositoryRepoResponse" - } - } - } - } - }, - "/api/v1/session": { - "post": { - "tags": [ - "SessionService" - ], - "summary": "Create a new JWT for authentication and set a cookie if using HTTP.", - "operationId": "CreateMixin8", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sessionSessionCreateRequest" - } - } - ], - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/sessionSessionResponse" - } - } - } - }, - "delete": { - "tags": [ - "SessionService" - ], - "summary": "Delete an existing JWT cookie if using HTTP.", - "operationId": "DeleteMixin8", - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/sessionSessionResponse" - } - } - } - } - }, - "/api/v1/settings": { - "get": { - "tags": [ - "SettingsService" - ], - "summary": "Get returns Argo CD settings", - "operationId": "Get", - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/clusterSettings" - } - } - } - } - }, - "/api/v1/stream/applications": { - "get": { - "tags": [ - "ApplicationService" - ], - "summary": "Watch returns stream of application change events.", - "operationId": "Watch", - "parameters": [ - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "string", - "name": "refresh", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "project", - "in": "query" - }, - { - "type": "string", - "name": "resourceVersion", - "in": "query" - } - ], - "responses": { - "200": { - "description": "(streaming responses)", - "schema": { - "$ref": "#/definitions/v1alpha1ApplicationWatchEvent" - } - } - } - } - }, - "/api/version": { - "get": { - "tags": [ - "VersionService" - ], - "summary": "Version returns version information of the API server", - "operationId": "Version", - "responses": { - "200": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/versionVersionMessage" - } - } - } - } - } - }, - "definitions": { - "accountUpdatePasswordRequest": { - "type": "object", - "properties": { - "currentPassword": { - "type": "string" - }, - "newPassword": { - "type": "string" - } - } - }, - "accountUpdatePasswordResponse": { - "type": "object" - }, - "applicationApplicationPatchRequest": { - "type": "object", - "title": "ApplicationPatchRequest is a request to patch an application", - "properties": { - "name": { - "type": "string" - }, - "patch": { - "type": "string" - }, - "patchType": { - "type": "string" - } - } - }, - "applicationApplicationResourceResponse": { - "type": "object", - "properties": { - "manifest": { - "type": "string" - } - } - }, - "applicationApplicationResponse": { - "type": "object" - }, - "applicationApplicationRollbackRequest": { - "type": "object", - "properties": { - "dryRun": { - "type": "boolean", - "format": "boolean" - }, - "id": { - "type": "string", - "format": "int64" - }, - "name": { - "type": "string" - }, - "prune": { - "type": "boolean", - "format": "boolean" - } - } - }, - "applicationApplicationSyncRequest": { - "type": "object", - "title": "ApplicationSyncRequest is a request to apply the config state to live state", - "properties": { - "dryRun": { - "type": "boolean", - "format": "boolean" - }, - "manifests": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "prune": { - "type": "boolean", - "format": "boolean" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1SyncOperationResource" - } - }, - "revision": { - "type": "string" - }, - "strategy": { - "$ref": "#/definitions/v1alpha1SyncStrategy" - } - } - }, - "applicationLogEntry": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "timeStamp": { - "$ref": "#/definitions/v1Time" - } - } - }, - "applicationManagedResourcesResponse": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceDiff" - } - } - } - }, - "applicationOperationTerminateResponse": { - "type": "object" - }, - "applicationResourceActionsListResponse": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceAction" - } - } - } - }, - "clusterClusterResponse": { - "type": "object" - }, - "clusterConnector": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "clusterDexConfig": { - "type": "object", - "properties": { - "connectors": { - "type": "array", - "items": { - "$ref": "#/definitions/clusterConnector" - } - } - } - }, - "clusterGoogleAnalyticsConfig": { - "type": "object", - "properties": { - "anonymizeUsers": { - "type": "boolean", - "format": "boolean" - }, - "trackingID": { - "type": "string" - } - } - }, - "clusterHelp": { - "type": "object", - "title": "Help settings", - "properties": { - "chatText": { - "type": "string", - "title": "the text for getting chat help, defaults to \"Chat now!\"" - }, - "chatUrl": { - "type": "string", - "title": "the URL for getting chat help, this will typically be your Slack channel for support" - } - } - }, - "clusterOIDCConfig": { - "type": "object", - "properties": { - "cliClientID": { - "type": "string" - }, - "clientID": { - "type": "string" - }, - "issuer": { - "type": "string" - }, - "name": { - "type": "string" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "clusterSettings": { - "type": "object", - "properties": { - "appLabelKey": { - "type": "string" - }, - "dexConfig": { - "$ref": "#/definitions/clusterDexConfig" - }, - "googleAnalytics": { - "$ref": "#/definitions/clusterGoogleAnalyticsConfig" - }, - "help": { - "$ref": "#/definitions/clusterHelp" - }, - "kustomizeOptions": { - "$ref": "#/definitions/v1alpha1KustomizeOptions" - }, - "oidcConfig": { - "$ref": "#/definitions/clusterOIDCConfig" - }, - "resourceOverrides": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1alpha1ResourceOverride" - } - }, - "statusBadgeEnabled": { - "type": "boolean", - "format": "boolean" - }, - "url": { - "type": "string" - } - } - }, - "projectEmptyResponse": { - "type": "object" - }, - "projectProjectCreateRequest": { - "description": "ProjectCreateRequest defines project creation parameters.", - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/v1alpha1AppProject" - } - } - }, - "projectProjectTokenCreateRequest": { - "description": "ProjectTokenCreateRequest defines project token creation parameters.", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "expiresIn": { - "type": "string", - "format": "int64", - "title": "expiresIn represents a duration in seconds" - }, - "project": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "projectProjectTokenResponse": { - "description": "ProjectTokenResponse wraps the created token or returns an empty string if deleted.", - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - }, - "projectProjectUpdateRequest": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/v1alpha1AppProject" - } - } - }, - "repositoryAppInfo": { - "type": "object", - "title": "AppInfo contains application type and app file path", - "properties": { - "path": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "repositoryDirectoryAppSpec": { - "type": "object", - "title": "DirectoryAppSpec contains directory" - }, - "repositoryHelmAppDetailsQuery": { - "type": "object", - "properties": { - "valueFiles": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "repositoryHelmAppSpec": { - "type": "object", - "title": "HelmAppSpec contains helm app name and path in source repo", - "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1HelmParameter" - } - }, - "path": { - "type": "string" - }, - "valueFiles": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "repositoryKsonnetAppDetailsQuery": { - "type": "object", - "properties": { - "environment": { - "type": "string" - } - } - }, - "repositoryKsonnetAppSpec": { - "type": "object", - "title": "KsonnetAppSpec contains Ksonnet app response\nThis roughly reflects: ksonnet/ksonnet/metadata/app/schema.go", - "properties": { - "environments": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/repositoryKsonnetEnvironment" - } - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1KsonnetParameter" - } - }, - "path": { - "type": "string" - } - } - }, - "repositoryKsonnetEnvironment": { - "type": "object", - "properties": { - "destination": { - "$ref": "#/definitions/repositoryKsonnetEnvironmentDestination" - }, - "k8sVersion": { - "description": "KubernetesVersion is the kubernetes version the targetted cluster is running on.", - "type": "string" - }, - "name": { - "type": "string", - "title": "Name is the user defined name of an environment" - }, - "path": { - "description": "Path is the relative project path containing metadata for this environment.", - "type": "string" - } - } - }, - "repositoryKsonnetEnvironmentDestination": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "title": "Namespace is the namespace of the Kubernetes server that targets should be deployed to" - }, - "server": { - "description": "Server is the Kubernetes server that the cluster is running on.", - "type": "string" - } - } - }, - "repositoryKustomizeAppSpec": { - "type": "object", - "title": "KustomizeAppSpec contains kustomize app name and path in source repo", - "properties": { - "images": { - "description": "images is a list of available images.", - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "type": "string" - } - } - }, - "repositoryManifestResponse": { - "type": "object", - "properties": { - "manifests": { - "type": "array", - "items": { - "type": "string" - } - }, - "namespace": { - "type": "string" - }, - "revision": { - "type": "string" - }, - "server": { - "type": "string" - }, - "sourceType": { - "type": "string" - } - } - }, - "repositoryRepoAppDetailsResponse": { - "type": "object", - "title": "RepoAppDetailsResponse application details", - "properties": { - "directory": { - "$ref": "#/definitions/repositoryDirectoryAppSpec" - }, - "helm": { - "$ref": "#/definitions/repositoryHelmAppSpec" - }, - "ksonnet": { - "$ref": "#/definitions/repositoryKsonnetAppSpec" - }, - "kustomize": { - "$ref": "#/definitions/repositoryKustomizeAppSpec" - }, - "type": { - "type": "string" - } - } - }, - "repositoryRepoAppsResponse": { - "type": "object", - "title": "RepoAppsResponse contains applications of specified repository", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/repositoryAppInfo" - } - } - } - }, - "repositoryRepoResponse": { - "type": "object" - }, - "sessionSessionCreateRequest": { - "description": "SessionCreateRequest is for logging in.", - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "token": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "sessionSessionResponse": { - "description": "SessionResponse wraps the created token or returns an empty string if deleted.", - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - }, - "v1Event": { - "description": "Event is a report of an event somewhere in the cluster.", - "type": "object", - "properties": { - "action": { - "type": "string", - "title": "What action was taken/failed regarding to the Regarding object.\n+optional" - }, - "count": { - "type": "integer", - "format": "int32", - "title": "The number of times this event has occurred.\n+optional" - }, - "eventTime": { - "$ref": "#/definitions/v1MicroTime" - }, - "firstTimestamp": { - "$ref": "#/definitions/v1Time" - }, - "involvedObject": { - "$ref": "#/definitions/v1ObjectReference" - }, - "lastTimestamp": { - "$ref": "#/definitions/v1Time" - }, - "message": { - "type": "string", - "title": "A human-readable description of the status of this operation.\nTODO: decide on maximum length.\n+optional" - }, - "metadata": { - "$ref": "#/definitions/v1ObjectMeta" - }, - "reason": { - "type": "string", - "title": "This should be a short, machine understandable string that gives the reason\nfor the transition into the object's current status.\nTODO: provide exact specification for format.\n+optional" - }, - "related": { - "$ref": "#/definitions/v1ObjectReference" - }, - "reportingComponent": { - "type": "string", - "title": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.\n+optional" - }, - "reportingInstance": { - "type": "string", - "title": "ID of the controller instance, e.g. `kubelet-xyzf`.\n+optional" - }, - "series": { - "$ref": "#/definitions/v1EventSeries" - }, - "source": { - "$ref": "#/definitions/v1EventSource" - }, - "type": { - "type": "string", - "title": "Type of this event (Normal, Warning), new types could be added in the future\n+optional" - } - } - }, - "v1EventList": { - "description": "EventList is a list of events.", - "type": "object", - "properties": { - "items": { - "type": "array", - "title": "List of events", - "items": { - "$ref": "#/definitions/v1Event" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1EventSeries": { - "description": "EventSeries contain information on series of events, i.e. thing that was/is happening\ncontinuously for some time.", - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int32", - "title": "Number of occurrences in this series up to the last heartbeat time" - }, - "lastObservedTime": { - "$ref": "#/definitions/v1MicroTime" - }, - "state": { - "type": "string", - "title": "State of this Series: Ongoing or Finished" - } - } - }, - "v1EventSource": { - "description": "EventSource contains information for an event.", - "type": "object", - "properties": { - "component": { - "type": "string", - "title": "Component from which the event is generated.\n+optional" - }, - "host": { - "type": "string", - "title": "Node name on which the event is generated.\n+optional" - } - } - }, - "v1Fields": { - "type": "object", - "title": "Fields stores a set of fields in a data structure like a Trie.\nTo understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff", - "properties": { - "map": { - "description": "Map stores a set of fields in a data structure like a Trie.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set,\nor a string representing a sub-field or item. The string will follow one of these four formats:\n'f:', where is the name of a field in a struct, or key in a map\n'v:', where is the exact json formatted value of a list item\n'i:', where is position of a item in a list\n'k:', where is a map of a list item's key fields to their unique values\nIf a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1Fields" - } - } - } - }, - "v1GroupKind": { - "description": "+protobuf.options.(gogoproto.goproto_stringer)=false", - "type": "object", - "title": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types", - "properties": { - "group": { - "type": "string" - }, - "kind": { - "type": "string" - } - } - }, - "v1Initializer": { - "description": "Initializer is information about an initializer that has not yet completed.", - "type": "object", - "properties": { - "name": { - "description": "name of the process that is responsible for initializing this object.", - "type": "string" - } - } - }, - "v1Initializers": { - "description": "Initializers tracks the progress of initialization.", - "type": "object", - "properties": { - "pending": { - "type": "array", - "title": "Pending is a list of initializers that must execute in order before this object is visible.\nWhen the last pending initializer is removed, and no failing result is set, the initializers\nstruct will be set to nil and the object is considered as initialized and visible to all\nclients.\n+patchMergeKey=name\n+patchStrategy=merge", - "items": { - "$ref": "#/definitions/v1Initializer" - } - }, - "result": { - "$ref": "#/definitions/v1Status" - } - } - }, - "v1ListMeta": { - "description": "ListMeta describes metadata that synthetic resources must have, including lists and\nvarious status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "type": "object", - "properties": { - "continue": { - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage.", - "type": "string" - }, - "resourceVersion": { - "type": "string", - "title": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency\n+optional" - }, - "selfLink": { - "type": "string", - "title": "selfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n+optional" - } - } - }, - "v1LoadBalancerIngress": { - "description": "LoadBalancerIngress represents the status of a load-balancer ingress point:\ntraffic intended for the service should be sent to an ingress point.", - "type": "object", - "properties": { - "hostname": { - "type": "string", - "title": "Hostname is set for load-balancer ingress points that are DNS based\n(typically AWS load-balancers)\n+optional" - }, - "ip": { - "type": "string", - "title": "IP is set for load-balancer ingress points that are IP based\n(typically GCE or OpenStack load-balancers)\n+optional" - } - } - }, - "v1ManagedFieldsEntry": { - "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource\nthat the fieldset applies to.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted.", - "type": "string" - }, - "fields": { - "$ref": "#/definitions/v1Fields" - }, - "manager": { - "description": "Manager is an identifier of the workflow managing these fields.", - "type": "string" - }, - "operation": { - "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'.", - "type": "string" - }, - "time": { - "$ref": "#/definitions/v1Time" - } - } - }, - "v1MicroTime": { - "description": "MicroTime is version of Time with microsecond level precision.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false", - "type": "object", - "properties": { - "nanos": { - "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", - "type": "integer", - "format": "int32" - }, - "seconds": { - "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", - "type": "string", - "format": "int64" - } - } - }, - "v1ObjectMeta": { - "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects\nusers must create.", - "type": "object", - "properties": { - "annotations": { - "type": "object", - "title": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", - "additionalProperties": { - "type": "string" - } - }, - "clusterName": { - "type": "string", - "title": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional" - }, - "creationTimestamp": { - "$ref": "#/definitions/v1Time" - }, - "deletionGracePeriodSeconds": { - "type": "string", - "format": "int64", - "title": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional" - }, - "deletionTimestamp": { - "$ref": "#/definitions/v1Time" - }, - "finalizers": { - "type": "array", - "title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\n+optional\n+patchStrategy=merge", - "items": { - "type": "string" - } - }, - "generateName": { - "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency\n+optional", - "type": "string" - }, - "generation": { - "type": "string", - "format": "int64", - "title": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional" - }, - "initializers": { - "$ref": "#/definitions/v1Initializers" - }, - "labels": { - "type": "object", - "title": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", - "additionalProperties": { - "type": "string" - } - }, - "managedFields": { - "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\nThis field is alpha and can be changed or removed without notice.\n\n+optional", - "type": "array", - "items": { - "$ref": "#/definitions/v1ManagedFieldsEntry" - } - }, - "name": { - "type": "string", - "title": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional" - }, - "namespace": { - "description": "Namespace defines the space within each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", - "type": "string" - }, - "ownerReferences": { - "type": "array", - "title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", - "items": { - "$ref": "#/definitions/v1OwnerReference" - } - }, - "resourceVersion": { - "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency\n+optional", - "type": "string" - }, - "selfLink": { - "type": "string", - "title": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n+optional" - }, - "uid": { - "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", - "type": "string" - } - } - }, - "v1ObjectReference": { - "type": "object", - "title": "ObjectReference contains enough information to let you inspect or modify the referred object.\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "properties": { - "apiVersion": { - "type": "string", - "title": "API version of the referent.\n+optional" - }, - "fieldPath": { - "type": "string", - "title": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.\nTODO: this design is not final and this field is subject to change in the future.\n+optional" - }, - "kind": { - "type": "string", - "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\n+optional" - }, - "name": { - "type": "string", - "title": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n+optional" - }, - "namespace": { - "type": "string", - "title": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n+optional" - }, - "resourceVersion": { - "type": "string", - "title": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency\n+optional" - }, - "uid": { - "type": "string", - "title": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n+optional" - } - } - }, - "v1OwnerReference": { - "description": "OwnerReference contains enough information to let you identify an owning\nobject. An owning object must be in the same namespace as the dependent, or\nbe cluster-scoped, so there is no namespace field.", - "type": "object", - "properties": { - "apiVersion": { - "description": "API version of the referent.", - "type": "string" - }, - "blockOwnerDeletion": { - "type": "boolean", - "format": "boolean", - "title": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional" - }, - "controller": { - "type": "boolean", - "format": "boolean", - "title": "If true, this reference points to the managing controller.\n+optional" - }, - "kind": { - "type": "string", - "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - }, - "name": { - "type": "string", - "title": "Name of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names" - }, - "uid": { - "type": "string", - "title": "UID of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids" - } - } - }, - "v1Status": { - "description": "Status is a return value for calls that don't return other objects.", - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "title": "Suggested HTTP return code for this status, 0 if not set.\n+optional" - }, - "details": { - "$ref": "#/definitions/v1StatusDetails" - }, - "message": { - "type": "string", - "title": "A human-readable description of the status of this operation.\n+optional" - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - }, - "reason": { - "type": "string", - "title": "A machine-readable description of why this operation is in the\n\"Failure\" status. If this value is empty there\nis no information available. A Reason clarifies an HTTP status\ncode but does not override it.\n+optional" - }, - "status": { - "type": "string", - "title": "Status of the operation.\nOne of: \"Success\" or \"Failure\".\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status\n+optional" - } - } - }, - "v1StatusCause": { - "description": "StatusCause provides more information about an api.Status failure, including\ncases when multiple errors are encountered.", - "type": "object", - "properties": { - "field": { - "description": "The field of the resource that has caused this error, as named by its JSON\nserialization. May include dot and postfix notation for nested attributes.\nArrays are zero-indexed. Fields may appear more than once in an array of\ncauses due to fields having multiple errors.\nOptional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"\n+optional", - "type": "string" - }, - "message": { - "type": "string", - "title": "A human-readable description of the cause of the error. This field may be\npresented as-is to a reader.\n+optional" - }, - "reason": { - "type": "string", - "title": "A machine-readable description of the cause of the error. If this value is\nempty there is no information available.\n+optional" - } - } - }, - "v1StatusDetails": { - "description": "StatusDetails is a set of additional properties that MAY be set by the\nserver to provide additional information about a response. The Reason\nfield of a Status object defines what attributes will be set. Clients\nmust ignore fields that do not match the defined type of each attribute,\nand should assume that any attribute may be empty, invalid, or under\ndefined.", - "type": "object", - "properties": { - "causes": { - "type": "array", - "title": "The Causes array includes more details associated with the StatusReason\nfailure. Not all StatusReasons may provide detailed causes.\n+optional", - "items": { - "$ref": "#/definitions/v1StatusCause" - } - }, - "group": { - "type": "string", - "title": "The group attribute of the resource associated with the status StatusReason.\n+optional" - }, - "kind": { - "type": "string", - "title": "The kind attribute of the resource associated with the status StatusReason.\nOn some operations may differ from the requested resource Kind.\nMore info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\n+optional" - }, - "name": { - "type": "string", - "title": "The name attribute of the resource associated with the status StatusReason\n(when there is a single name which can be described).\n+optional" - }, - "retryAfterSeconds": { - "type": "integer", - "format": "int32", - "title": "If specified, the time in seconds before the operation should be retried. Some errors may indicate\nthe client must take an alternate action - for those errors this field may indicate how long to wait\nbefore taking the alternate action.\n+optional" - }, - "uid": { - "type": "string", - "title": "UID of the resource.\n(when there is a single resource which can be described).\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional" - } - } - }, - "v1Time": { - "description": "Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON. Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false", - "type": "object", - "properties": { - "nanos": { - "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context.", - "type": "integer", - "format": "int32" - }, - "seconds": { - "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", - "type": "string", - "format": "int64" - } - } - }, - "v1alpha1AWSAuthConfig": { - "type": "object", - "title": "AWSAuthConfig is an AWS IAM authentication configuration", - "properties": { - "clusterName": { - "type": "string", - "title": "ClusterName contains AWS cluster name" - }, - "roleARN": { - "description": "RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.", - "type": "string" - } - } - }, - "v1alpha1AppProject": { - "type": "object", - "title": "AppProject provides a logical grouping of applications, providing controls for:\n* where the apps may deploy to (cluster whitelist)\n* what may be deployed (repository whitelist, resource whitelist/blacklist)\n* who can access these applications (roles, OIDC group claims bindings)\n* and what they can do (RBAC policies)\n* automation access to these roles (JWT tokens)\n+genclient\n+genclient:noStatus\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:resource:path=appprojects,shortName=appproj;appprojs", - "properties": { - "metadata": { - "$ref": "#/definitions/v1ObjectMeta" - }, - "spec": { - "$ref": "#/definitions/v1alpha1AppProjectSpec" - } - } - }, - "v1alpha1AppProjectList": { - "type": "object", - "title": "AppProjectList is list of AppProject resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1AppProject" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1alpha1AppProjectSpec": { - "type": "object", - "title": "AppProjectSpec is the specification of an AppProject", - "properties": { - "clusterResourceWhitelist": { - "type": "array", - "title": "ClusterResourceWhitelist contains list of whitelisted cluster level resources", - "items": { - "$ref": "#/definitions/v1GroupKind" - } - }, - "description": { - "type": "string", - "title": "Description contains optional project description" - }, - "destinations": { - "type": "array", - "title": "Destinations contains list of destinations available for deployment", - "items": { - "$ref": "#/definitions/v1alpha1ApplicationDestination" - } - }, - "namespaceResourceBlacklist": { - "type": "array", - "title": "NamespaceResourceBlacklist contains list of blacklisted namespace level resources", - "items": { - "$ref": "#/definitions/v1GroupKind" - } - }, - "roles": { - "type": "array", - "title": "Roles are user defined RBAC roles associated with this project", - "items": { - "$ref": "#/definitions/v1alpha1ProjectRole" - } - }, - "sourceRepos": { - "type": "array", - "title": "SourceRepos contains list of git repository URLs which can be used for deployment", - "items": { - "type": "string" - } - } - } - }, - "v1alpha1Application": { - "type": "object", - "title": "Application is a definition of Application resource.\n+genclient\n+genclient:noStatus\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:resource:path=applications,shortName=app;apps", - "properties": { - "metadata": { - "$ref": "#/definitions/v1ObjectMeta" - }, - "operation": { - "$ref": "#/definitions/v1alpha1Operation" - }, - "spec": { - "$ref": "#/definitions/v1alpha1ApplicationSpec" - }, - "status": { - "$ref": "#/definitions/v1alpha1ApplicationStatus" - } - } - }, - "v1alpha1ApplicationCondition": { - "type": "object", - "title": "ApplicationCondition contains details about current application condition", - "properties": { - "message": { - "type": "string", - "title": "Message contains human-readable message indicating details about condition" - }, - "type": { - "type": "string", - "title": "Type is an application condition type" - } - } - }, - "v1alpha1ApplicationDestination": { - "type": "object", - "title": "ApplicationDestination contains deployment destination information", - "properties": { - "namespace": { - "type": "string", - "title": "Namespace overrides the environment namespace value in the ksonnet app.yaml" - }, - "server": { - "type": "string", - "title": "Server overrides the environment server value in the ksonnet app.yaml" - } - } - }, - "v1alpha1ApplicationList": { - "type": "object", - "title": "ApplicationList is list of Application resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1Application" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1alpha1ApplicationSource": { - "description": "ApplicationSource contains information about github repository, path within repository and target application environment.", - "type": "object", - "properties": { - "directory": { - "$ref": "#/definitions/v1alpha1ApplicationSourceDirectory" - }, - "helm": { - "$ref": "#/definitions/v1alpha1ApplicationSourceHelm" - }, - "ksonnet": { - "$ref": "#/definitions/v1alpha1ApplicationSourceKsonnet" - }, - "kustomize": { - "$ref": "#/definitions/v1alpha1ApplicationSourceKustomize" - }, - "path": { - "type": "string", - "title": "Path is a directory path within the repository containing a" - }, - "plugin": { - "$ref": "#/definitions/v1alpha1ApplicationSourcePlugin" - }, - "repoURL": { - "type": "string", - "title": "RepoURL is the git repository URL of the application manifests" - }, - "targetRevision": { - "type": "string", - "title": "TargetRevision defines the commit, tag, or branch in which to sync the application to.\nIf omitted, will sync to HEAD" - } - } - }, - "v1alpha1ApplicationSourceDirectory": { - "type": "object", - "properties": { - "jsonnet": { - "$ref": "#/definitions/v1alpha1ApplicationSourceJsonnet" - }, - "recurse": { - "type": "boolean", - "format": "boolean" - } - } - }, - "v1alpha1ApplicationSourceHelm": { - "type": "object", - "title": "ApplicationSourceHelm holds helm specific options", - "properties": { - "parameters": { - "type": "array", - "title": "Parameters are parameters to the helm template", - "items": { - "$ref": "#/definitions/v1alpha1HelmParameter" - } - }, - "releaseName": { - "type": "string", - "title": "The Helm release name. If omitted it will use the application name" - }, - "valueFiles": { - "type": "array", - "title": "ValuesFiles is a list of Helm value files to use when generating a template", - "items": { - "type": "string" - } - } - } - }, - "v1alpha1ApplicationSourceJsonnet": { - "type": "object", - "title": "ApplicationSourceJsonnet holds jsonnet specific options", - "properties": { - "extVars": { - "type": "array", - "title": "ExtVars is a list of Jsonnet External Variables", - "items": { - "$ref": "#/definitions/v1alpha1JsonnetVar" - } - }, - "tlas": { - "type": "array", - "title": "TLAS is a list of Jsonnet Top-level Arguments", - "items": { - "$ref": "#/definitions/v1alpha1JsonnetVar" - } - } - } - }, - "v1alpha1ApplicationSourceKsonnet": { - "type": "object", - "title": "ApplicationSourceKsonnet holds ksonnet specific options", - "properties": { - "environment": { - "type": "string", - "title": "Environment is a ksonnet application environment name" - }, - "parameters": { - "type": "array", - "title": "Parameters are a list of ksonnet component parameter override values", - "items": { - "$ref": "#/definitions/v1alpha1KsonnetParameter" - } - } - } - }, - "v1alpha1ApplicationSourceKustomize": { - "type": "object", - "title": "ApplicationSourceKustomize holds kustomize specific options", - "properties": { - "commonLabels": { - "type": "object", - "title": "CommonLabels adds additional kustomize commonLabels", - "additionalProperties": { - "type": "string" - } - }, - "images": { - "type": "array", - "title": "Images are kustomize image overrides", - "items": { - "type": "string" - } - }, - "namePrefix": { - "type": "string", - "title": "NamePrefix is a prefix appended to resources for kustomize apps" - } - } - }, - "v1alpha1ApplicationSourcePlugin": { - "type": "object", - "title": "ApplicationSourcePlugin holds config management plugin specific options", - "properties": { - "env": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1EnvEntry" - } - }, - "name": { - "type": "string" - } - } - }, - "v1alpha1ApplicationSpec": { - "description": "ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.", - "type": "object", - "properties": { - "destination": { - "$ref": "#/definitions/v1alpha1ApplicationDestination" - }, - "ignoreDifferences": { - "type": "array", - "title": "IgnoreDifferences controls resources fields which should be ignored during comparison", - "items": { - "$ref": "#/definitions/v1alpha1ResourceIgnoreDifferences" - } - }, - "info": { - "type": "array", - "title": "Infos contains a list of useful information (URLs, email addresses, and plain text) that relates to the application", - "items": { - "$ref": "#/definitions/v1alpha1Info" - } - }, - "project": { - "description": "Project is a application project name. Empty name means that application belongs to 'default' project.", - "type": "string" - }, - "source": { - "$ref": "#/definitions/v1alpha1ApplicationSource" - }, - "syncPolicy": { - "$ref": "#/definitions/v1alpha1SyncPolicy" - } - } - }, - "v1alpha1ApplicationStatus": { - "type": "object", - "title": "ApplicationStatus contains information about application sync, health status", - "properties": { - "conditions": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ApplicationCondition" - } - }, - "health": { - "$ref": "#/definitions/v1alpha1HealthStatus" - }, - "history": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1RevisionHistory" - } - }, - "observedAt": { - "$ref": "#/definitions/v1Time" - }, - "operationState": { - "$ref": "#/definitions/v1alpha1OperationState" - }, - "reconciledAt": { - "$ref": "#/definitions/v1Time" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceStatus" - } - }, - "sourceType": { - "type": "string" - }, - "summary": { - "$ref": "#/definitions/v1alpha1ApplicationSummary" - }, - "sync": { - "$ref": "#/definitions/v1alpha1SyncStatus" - } - } - }, - "v1alpha1ApplicationSummary": { - "type": "object", - "properties": { - "externalURLs": { - "description": "ExternalURLs holds all external URLs of application child resources.", - "type": "array", - "items": { - "type": "string" - } - }, - "images": { - "description": "Images holds all images of application child resources.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v1alpha1ApplicationTree": { - "type": "object", - "title": "ApplicationTree holds nodes which belongs to the application", - "properties": { - "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceNode" - } - } - } - }, - "v1alpha1ApplicationWatchEvent": { - "description": "ApplicationWatchEvent contains information about application change.", - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/v1alpha1Application" - }, - "type": { - "type": "string" - } - } - }, - "v1alpha1Cluster": { - "type": "object", - "title": "Cluster is the definition of a cluster resource", - "properties": { - "config": { - "$ref": "#/definitions/v1alpha1ClusterConfig" - }, - "connectionState": { - "$ref": "#/definitions/v1alpha1ConnectionState" - }, - "name": { - "type": "string", - "title": "Name of the cluster. If omitted, will use the server address" - }, - "server": { - "type": "string", - "title": "Server is the API server URL of the Kubernetes cluster" - } - } - }, - "v1alpha1ClusterConfig": { - "description": "ClusterConfig is the configuration attributes. This structure is subset of the go-client\nrest.Config with annotations added for marshalling.", - "type": "object", - "properties": { - "awsAuthConfig": { - "$ref": "#/definitions/v1alpha1AWSAuthConfig" - }, - "bearerToken": { - "description": "Server requires Bearer authentication. This client will not attempt to use\nrefresh tokens for an OAuth2 flow.\nTODO: demonstrate an OAuth2 compatible client.", - "type": "string" - }, - "password": { - "type": "string" - }, - "tlsClientConfig": { - "$ref": "#/definitions/v1alpha1TLSClientConfig" - }, - "username": { - "type": "string", - "title": "Server requires Basic authentication" - } - } - }, - "v1alpha1ClusterList": { - "description": "ClusterList is a collection of Clusters.", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1Cluster" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1alpha1ComparedTo": { - "type": "object", - "title": "ComparedTo contains application source and target which was used for resources comparison", - "properties": { - "destination": { - "$ref": "#/definitions/v1alpha1ApplicationDestination" - }, - "source": { - "$ref": "#/definitions/v1alpha1ApplicationSource" - } - } - }, - "v1alpha1ConnectionState": { - "type": "object", - "title": "ConnectionState contains information about remote resource connection state", - "properties": { - "attemptedAt": { - "$ref": "#/definitions/v1Time" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "v1alpha1EnvEntry": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "the name, usually uppercase" - }, - "value": { - "type": "string", - "title": "the value" - } - } - }, - "v1alpha1HealthStatus": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "v1alpha1HelmParameter": { - "type": "object", - "title": "HelmParameter is a parameter to a helm template", - "properties": { - "forceString": { - "type": "boolean", - "format": "boolean", - "title": "ForceString determines whether to tell Helm to interpret booleans and numbers as strings" - }, - "name": { - "type": "string", - "title": "Name is the name of the helm parameter" - }, - "value": { - "type": "string", - "title": "Value is the value for the helm parameter" - } - } - }, - "v1alpha1Info": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "v1alpha1InfoItem": { - "type": "object", - "title": "InfoItem contains human readable information about object", - "properties": { - "name": { - "description": "Name is a human readable title for this piece of information.", - "type": "string" - }, - "value": { - "description": "Value is human readable content.", - "type": "string" - } - } - }, - "v1alpha1JWTToken": { - "type": "object", - "title": "JWTToken holds the issuedAt and expiresAt values of a token", - "properties": { - "exp": { - "type": "string", - "format": "int64" - }, - "iat": { - "type": "string", - "format": "int64" - } - } - }, - "v1alpha1JsonnetVar": { - "type": "object", - "title": "JsonnetVar is a jsonnet variable", - "properties": { - "code": { - "type": "boolean", - "format": "boolean" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "v1alpha1KsonnetParameter": { - "type": "object", - "title": "KsonnetParameter is a ksonnet component parameter", - "properties": { - "component": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "v1alpha1KustomizeOptions": { - "type": "object", - "title": "KustomizeOptions are options for kustomize to use when building manifests", - "properties": { - "buildOptions": { - "type": "string", - "title": "BuildOptions is a string of build parameters to use when calling `kustomize build`" - } - } - }, - "v1alpha1Operation": { - "description": "Operation contains requested operation parameters.", - "type": "object", - "properties": { - "sync": { - "$ref": "#/definitions/v1alpha1SyncOperation" - } - } - }, - "v1alpha1OperationState": { - "description": "OperationState contains information about state of currently performing operation on application.", - "type": "object", - "properties": { - "finishedAt": { - "$ref": "#/definitions/v1Time" - }, - "message": { - "description": "Message hold any pertinent messages when attempting to perform operation (typically errors).", - "type": "string" - }, - "operation": { - "$ref": "#/definitions/v1alpha1Operation" - }, - "phase": { - "type": "string", - "title": "Phase is the current phase of the operation" - }, - "startedAt": { - "$ref": "#/definitions/v1Time" - }, - "syncResult": { - "$ref": "#/definitions/v1alpha1SyncOperationResult" - } - } - }, - "v1alpha1ProjectRole": { - "type": "object", - "title": "ProjectRole represents a role that has access to a project", - "properties": { - "description": { - "type": "string", - "title": "Description is a description of the role" - }, - "groups": { - "type": "array", - "title": "Groups are a list of OIDC group claims bound to this role", - "items": { - "type": "string" - } - }, - "jwtTokens": { - "type": "array", - "title": "JWTTokens are a list of generated JWT tokens bound to this role", - "items": { - "$ref": "#/definitions/v1alpha1JWTToken" - } - }, - "name": { - "type": "string", - "title": "Name is a name for this role" - }, - "policies": { - "type": "array", - "title": "Policies Stores a list of casbin formated strings that define access policies for the role in the project", - "items": { - "type": "string" - } - } - } - }, - "v1alpha1Repository": { - "type": "object", - "title": "Repository is a Git repository holding application configurations", - "properties": { - "connectionState": { - "$ref": "#/definitions/v1alpha1ConnectionState" - }, - "enableLfs": { - "type": "boolean", - "format": "boolean", - "title": "Whether git-lfs support should be enabled for this repo" - }, - "insecure": { - "type": "boolean", - "format": "boolean", - "title": "Whether the repo is insecure" - }, - "insecureIgnoreHostKey": { - "type": "boolean", - "format": "boolean", - "title": "InsecureIgnoreHostKey should not be used anymore, Insecure is favoured" - }, - "password": { - "type": "string", - "title": "Password for authenticating at the repo server" - }, - "repo": { - "type": "string", - "title": "URL of the repo" - }, - "sshPrivateKey": { - "type": "string", - "title": "SSH private key data for authenticating at the repo server" - }, - "tlsClientCertData": { - "type": "string", - "title": "TLS client cert data for authenticating at the repo server" - }, - "tlsClientCertKey": { - "type": "string", - "title": "TLS client cert key for authenticating at the repo server" - }, - "username": { - "type": "string", - "title": "Username for authenticating at the repo server" - } - } - }, - "v1alpha1RepositoryCertificate": { - "type": "object", - "title": "A RepositoryCertificate is either SSH known hosts entry or TLS certificate", - "properties": { - "certData": { - "type": "string", - "format": "byte", - "title": "Actual certificate data, protocol dependent" - }, - "certInfo": { - "type": "string", - "title": "Additional certificate info (e.g. SSH fingerprint, X509 CommonName)" - }, - "certSubType": { - "type": "string", - "title": "The sub type of the cert, i.e. \"ssh-rsa\"" - }, - "certType": { - "type": "string", - "title": "Type of certificate - currently \"https\" or \"ssh\"" - }, - "serverName": { - "type": "string", - "title": "Name of the server the certificate is intended for" - } - } - }, - "v1alpha1RepositoryCertificateList": { - "type": "object", - "title": "RepositoryCertificateList is a collection of RepositoryCertificates", - "properties": { - "items": { - "type": "array", - "title": "List of certificates to be processed", - "items": { - "$ref": "#/definitions/v1alpha1RepositoryCertificate" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1alpha1RepositoryList": { - "description": "RepositoryList is a collection of Repositories.", - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1Repository" - } - }, - "metadata": { - "$ref": "#/definitions/v1ListMeta" - } - } - }, - "v1alpha1ResourceAction": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceActionParam" - } - } - } - }, - "v1alpha1ResourceActionParam": { - "type": "object", - "properties": { - "default": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "v1alpha1ResourceDiff": { - "type": "object", - "title": "ResourceDiff holds the diff of a live and target resource object", - "properties": { - "diff": { - "type": "string" - }, - "group": { - "type": "string" - }, - "hook": { - "type": "boolean", - "format": "boolean" - }, - "kind": { - "type": "string" - }, - "liveState": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "targetState": { - "type": "string" - } - } - }, - "v1alpha1ResourceIgnoreDifferences": { - "description": "ResourceIgnoreDifferences contains resource filter and list of json paths which should be ignored during comparison with live state.", - "type": "object", - "properties": { - "group": { - "type": "string" - }, - "jsonPointers": { - "type": "array", - "items": { - "type": "string" - } - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - } - }, - "v1alpha1ResourceNetworkingInfo": { - "type": "object", - "title": "ResourceNetworkingInfo holds networking resource related information", - "properties": { - "externalURLs": { - "description": "ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames.", - "type": "array", - "items": { - "type": "string" - } - }, - "ingress": { - "type": "array", - "items": { - "$ref": "#/definitions/v1LoadBalancerIngress" - } - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "targetLabels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "targetRefs": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceRef" - } - } - } - }, - "v1alpha1ResourceNode": { - "type": "object", - "title": "ResourceNode contains information about live resource and its children", - "properties": { - "health": { - "$ref": "#/definitions/v1alpha1HealthStatus" - }, - "images": { - "type": "array", - "items": { - "type": "string" - } - }, - "info": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1InfoItem" - } - }, - "networkingInfo": { - "$ref": "#/definitions/v1alpha1ResourceNetworkingInfo" - }, - "parentRefs": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1ResourceRef" - } - }, - "resourceRef": { - "$ref": "#/definitions/v1alpha1ResourceRef" - }, - "resourceVersion": { - "type": "string" - } - } - }, - "v1alpha1ResourceOverride": { - "type": "object", - "title": "ResourceOverride holds configuration to customize resource diffing and health assessment", - "properties": { - "actions": { - "type": "string" - }, - "healthLua": { - "type": "string" - }, - "ignoreDifferences": { - "type": "string" - } - } - }, - "v1alpha1ResourceRef": { - "type": "object", - "title": "ResourceRef includes fields which unique identify resource", - "properties": { - "group": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "v1alpha1ResourceResult": { - "type": "object", - "title": "ResourceResult holds the operation result details of a specific resource", - "properties": { - "group": { - "type": "string" - }, - "hookPhase": { - "type": "string", - "title": "the state of any operation associated with this resource OR hook\nnote: can contain values for non-hook resources" - }, - "hookType": { - "type": "string", - "title": "the type of the hook, empty for non-hook resources" - }, - "kind": { - "type": "string" - }, - "message": { - "type": "string", - "title": "message for the last sync OR operation" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "status": { - "type": "string", - "title": "the final result of the sync, this is be empty if the resources is yet to be applied/pruned and is always zero-value for hooks" - }, - "syncPhase": { - "type": "string", - "title": "indicates the particular phase of the sync that this is for" - }, - "version": { - "type": "string" - } - } - }, - "v1alpha1ResourceStatus": { - "type": "object", - "title": "ResourceStatus holds the current sync and health status of a resource", - "properties": { - "group": { - "type": "string" - }, - "health": { - "$ref": "#/definitions/v1alpha1HealthStatus" - }, - "hook": { - "type": "boolean", - "format": "boolean" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "requiresPruning": { - "type": "boolean", - "format": "boolean" - }, - "status": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "v1alpha1RevisionHistory": { - "type": "object", - "title": "RevisionHistory contains information relevant to an application deployment", - "properties": { - "deployedAt": { - "$ref": "#/definitions/v1Time" - }, - "id": { - "type": "string", - "format": "int64" - }, - "revision": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/v1alpha1ApplicationSource" - } - } - }, - "v1alpha1RevisionMetadata": { - "type": "object", - "title": "data about a specific revision within a repo", - "properties": { - "author": { - "type": "string", - "title": "who authored this revision,\ntypically their name and email, e.g. \"John Doe \",\nbut might not match this example" - }, - "date": { - "$ref": "#/definitions/v1Time" - }, - "message": { - "type": "string", - "title": "the message associated with the revision,\nprobably the commit message,\nthis is truncated to the first newline or 64 characters (which ever comes first)" - }, - "tags": { - "type": "array", - "title": "tags on the revision,\nnote - tags can move from one revision to another", - "items": { - "type": "string" - } - } - } - }, - "v1alpha1SyncOperation": { - "description": "SyncOperation contains sync operation details.", - "type": "object", - "properties": { - "dryRun": { - "type": "boolean", - "format": "boolean", - "title": "DryRun will perform a `kubectl apply --dry-run` without actually performing the sync" - }, - "manifests": { - "type": "array", - "title": "Manifests is an optional field that overrides sync source with a local directory for development", - "items": { - "type": "string" - } - }, - "prune": { - "type": "boolean", - "format": "boolean", - "title": "Prune deletes resources that are no longer tracked in git" - }, - "resources": { - "type": "array", - "title": "Resources describes which resources to sync", - "items": { - "$ref": "#/definitions/v1alpha1SyncOperationResource" - } - }, - "revision": { - "description": "Revision is the git revision in which to sync the application to.\nIf omitted, will use the revision specified in app spec.", - "type": "string" - }, - "source": { - "$ref": "#/definitions/v1alpha1ApplicationSource" - }, - "syncStrategy": { - "$ref": "#/definitions/v1alpha1SyncStrategy" - } - } - }, - "v1alpha1SyncOperationResource": { - "description": "SyncOperationResource contains resources to sync.", - "type": "object", - "properties": { - "group": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "v1alpha1SyncOperationResult": { - "type": "object", - "title": "SyncOperationResult represent result of sync operation", - "properties": { - "resources": { - "type": "array", - "title": "Resources holds the sync result of each individual resource", - "items": { - "$ref": "#/definitions/v1alpha1ResourceResult" - } - }, - "revision": { - "type": "string", - "title": "Revision holds the git commit SHA of the sync" - }, - "source": { - "$ref": "#/definitions/v1alpha1ApplicationSource" - } - } - }, - "v1alpha1SyncPolicy": { - "type": "object", - "title": "SyncPolicy controls when a sync will be performed in response to updates in git", - "properties": { - "automated": { - "$ref": "#/definitions/v1alpha1SyncPolicyAutomated" - } - } - }, - "v1alpha1SyncPolicyAutomated": { - "type": "object", - "title": "SyncPolicyAutomated controls the behavior of an automated sync", - "properties": { - "prune": { - "type": "boolean", - "format": "boolean", - "title": "Prune will prune resources automatically as part of automated sync (default: false)" - }, - "selfHeal": { - "type": "boolean", - "format": "boolean", - "title": "SelfHeal enables auto-syncing if (default: false)" - } - } - }, - "v1alpha1SyncStatus": { - "description": "SyncStatus is a comparison result of application spec and deployed application.", - "type": "object", - "properties": { - "comparedTo": { - "$ref": "#/definitions/v1alpha1ComparedTo" - }, - "revision": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "v1alpha1SyncStrategy": { - "type": "object", - "title": "SyncStrategy controls the manner in which a sync is performed", - "properties": { - "apply": { - "$ref": "#/definitions/v1alpha1SyncStrategyApply" - }, - "hook": { - "$ref": "#/definitions/v1alpha1SyncStrategyHook" - } - } - }, - "v1alpha1SyncStrategyApply": { - "type": "object", - "title": "SyncStrategyApply uses `kubectl apply` to perform the apply", - "properties": { - "force": { - "description": "Force indicates whether or not to supply the --force flag to `kubectl apply`.\nThe --force flag deletes and re-create the resource, when PATCH encounters conflict and has\nretried for 5 times.", - "type": "boolean", - "format": "boolean" - } - } - }, - "v1alpha1SyncStrategyHook": { - "description": "SyncStrategyHook will perform a sync using hooks annotations.\nIf no hook annotation is specified falls back to `kubectl apply`.", - "type": "object", - "properties": { - "syncStrategyApply": { - "$ref": "#/definitions/v1alpha1SyncStrategyApply" - } - } - }, - "v1alpha1TLSClientConfig": { - "type": "object", - "title": "TLSClientConfig contains settings to enable transport layer security", - "properties": { - "caData": { - "type": "string", - "format": "byte", - "title": "CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\nCAData takes precedence over CAFile" - }, - "certData": { - "type": "string", - "format": "byte", - "title": "CertData holds PEM-encoded bytes (typically read from a client certificate file).\nCertData takes precedence over CertFile" - }, - "insecure": { - "description": "Server should be accessed without verifying the TLS certificate. For testing only.", - "type": "boolean", - "format": "boolean" - }, - "keyData": { - "type": "string", - "format": "byte", - "title": "KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\nKeyData takes precedence over KeyFile" - }, - "serverName": { - "description": "ServerName is passed to the server for SNI and is used in the client to check server\ncertificates against. If ServerName is empty, the hostname used to contact the\nserver is used.", - "type": "string" - } - } - }, - "versionVersionMessage": { - "type": "object", - "title": "VersionMessage represents version of the Argo CD API server", - "properties": { - "BuildDate": { - "type": "string" - }, - "Compiler": { - "type": "string" - }, - "GitCommit": { - "type": "string" - }, - "GitTag": { - "type": "string" - }, - "GitTreeState": { - "type": "string" - }, - "GoVersion": { - "type": "string" - }, - "KsonnetVersion": { - "type": "string" - }, - "Platform": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/vendor/github.com/argoproj/argo-cd/v2/common/common.go b/vendor/github.com/argoproj/argo-cd/v2/common/common.go index b52fc85990..d7c2d24738 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/common/common.go +++ b/vendor/github.com/argoproj/argo-cd/v2/common/common.go @@ -12,6 +12,11 @@ import ( "google.golang.org/grpc/status" ) +// Component names +const ( + ApplicationController = "argocd-application-controller" +) + // Default service addresses and URLS of Argo CD internal services const ( // DefaultRepoServerAddr is the gRPC address of the Argo CD repo server @@ -34,6 +39,8 @@ const ( // ArgoCDTLSCertsConfigMapName contains TLS certificate data for connecting repositories. Will get mounted as volume to pods ArgoCDTLSCertsConfigMapName = "argocd-tls-certs-cm" ArgoCDGPGKeysConfigMapName = "argocd-gpg-keys-cm" + // ArgoCDAppControllerShardConfigMapName contains the application controller to shard mapping + ArgoCDAppControllerShardConfigMapName = "argocd-app-controller-shard-cm" ) // Some default configurables @@ -109,6 +116,8 @@ const ( // RoundRobinShardingAlgorithm is a flag value that can be opted for Sharding Algorithm it uses an equal distribution accross all shards RoundRobinShardingAlgorithm = "round-robin" DefaultShardingAlgorithm = LegacyShardingAlgorithm + // AppControllerHeartbeatUpdateRetryCount is the retry count for updating the Shard Mapping to the Shard Mapping ConfigMap used by Application Controller + AppControllerHeartbeatUpdateRetryCount = 3 ) // Dex related constants @@ -138,6 +147,8 @@ const ( // LabelKeyAppInstance is the label key to use to uniquely identify the instance of an application // The Argo CD application name is used as the instance name LabelKeyAppInstance = "app.kubernetes.io/instance" + // LabelKeyAppName is the label key to use to uniquely identify the name of the Kubernetes application + LabelKeyAppName = "app.kubernetes.io/name" // LabelKeyLegacyApplicationName is the legacy label (v0.10 and below) and is superseded by 'app.kubernetes.io/instance' LabelKeyLegacyApplicationName = "applications.argoproj.io/app-name" // LabelKeySecretType contains the type of argocd secret (currently: 'cluster', 'repository', 'repo-config' or 'repo-creds') @@ -207,10 +218,14 @@ const ( EnvPauseGenerationRequests = "ARGOCD_PAUSE_GEN_REQUESTS" // EnvControllerReplicas is the number of controller replicas EnvControllerReplicas = "ARGOCD_CONTROLLER_REPLICAS" + // EnvControllerHeartbeatTime will update the heartbeat for application controller to claim shard + EnvControllerHeartbeatTime = "ARGOCD_CONTROLLER_HEARTBEAT_TIME" // EnvControllerShard is the shard number that should be handled by controller EnvControllerShard = "ARGOCD_CONTROLLER_SHARD" // EnvControllerShardingAlgorithm is the distribution sharding algorithm to be used: legacy or round-robin EnvControllerShardingAlgorithm = "ARGOCD_CONTROLLER_SHARDING_ALGORITHM" + //EnvEnableDynamicClusterDistribution enables dynamic sharding (ALPHA) + EnvEnableDynamicClusterDistribution = "ARGOCD_ENABLE_DYNAMIC_CLUSTER_DISTRIBUTION" // EnvEnableGRPCTimeHistogramEnv enables gRPC metrics collection EnvEnableGRPCTimeHistogramEnv = "ARGOCD_ENABLE_GRPC_TIME_HISTOGRAM" // EnvGithubAppCredsExpirationDuration controls the caching of Github app credentials. This value is in minutes (default: 60) @@ -233,6 +248,16 @@ const ( EnvCMPWorkDir = "ARGOCD_CMP_WORKDIR" // EnvGPGDataPath overrides the location where GPG keyring for signature verification is stored EnvGPGDataPath = "ARGOCD_GPG_DATA_PATH" + // EnvServerName is the name of the Argo CD server component, as specified by the value under the LabelKeyAppName label key. + EnvServerName = "ARGOCD_SERVER_NAME" + // EnvRepoServerName is the name of the Argo CD repo server component, as specified by the value under the LabelKeyAppName label key. + EnvRepoServerName = "ARGOCD_REPO_SERVER_NAME" + // EnvAppControllerName is the name of the Argo CD application controller component, as specified by the value under the LabelKeyAppName label key. + EnvAppControllerName = "ARGOCD_APPLICATION_CONTROLLER_NAME" + // EnvRedisName is the name of the Argo CD redis component, as specified by the value under the LabelKeyAppName label key. + EnvRedisName = "ARGOCD_REDIS_NAME" + // EnvRedisHaProxyName is the name of the Argo CD Redis HA proxy component, as specified by the value under the LabelKeyAppName label key. + EnvRedisHaProxyName = "ARGOCD_REDIS_HAPROXY_NAME" ) // Config Management Plugin related constants @@ -268,6 +293,16 @@ const ( DefaultGitRetryFactor = int64(2) ) +// Constants represent the pod selector labels of the Argo CD component names. These values are determined by the +// installation manifests. +const ( + DefaultServerName = "argocd-server" + DefaultRepoServerName = "argocd-repo-server" + DefaultApplicationControllerName = "argocd-application-controller" + DefaultRedisName = "argocd-redis" + DefaultRedisHaProxyName = "argocd-redis-ha-haproxy" +) + // GetGnuPGHomePath retrieves the path to use for GnuPG home directory, which is either taken from GNUPGHOME environment or a default value func GetGnuPGHomePath() string { if gnuPgHome := os.Getenv(EnvGnuPGHome); gnuPgHome == "" { diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/applicationset_types.go b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/applicationset_types.go index b2e4e5d87a..7a7cc971f9 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/applicationset_types.go +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/applicationset_types.go @@ -63,11 +63,13 @@ type ApplicationSetSpec struct { PreservedFields *ApplicationPreservedFields `json:"preservedFields,omitempty" protobuf:"bytes,6,opt,name=preservedFields"` GoTemplateOptions []string `json:"goTemplateOptions,omitempty" protobuf:"bytes,7,opt,name=goTemplateOptions"` // ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators - ApplyNestedSelectors bool `json:"applyNestedSelectors,omitempty" protobuf:"bytes,8,name=applyNestedSelectors"` + ApplyNestedSelectors bool `json:"applyNestedSelectors,omitempty" protobuf:"bytes,8,name=applyNestedSelectors"` + IgnoreApplicationDifferences ApplicationSetIgnoreDifferences `json:"ignoreApplicationDifferences,omitempty" protobuf:"bytes,9,name=ignoreApplicationDifferences"` } type ApplicationPreservedFields struct { Annotations []string `json:"annotations,omitempty" protobuf:"bytes,1,name=annotations"` + Labels []string `json:"labels,omitempty" protobuf:"bytes,2,name=labels"` } // ApplicationSetStrategy configures how generated Applications are updated in sequence. @@ -126,6 +128,39 @@ type ApplicationSetSyncPolicy struct { ApplicationsSync *ApplicationsSyncPolicy `json:"applicationsSync,omitempty" protobuf:"bytes,2,opt,name=applicationsSync,casttype=ApplicationsSyncPolicy"` } +// ApplicationSetIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live +// applications when applying changes from generated applications. +type ApplicationSetIgnoreDifferences []ApplicationSetResourceIgnoreDifferences + +func (a ApplicationSetIgnoreDifferences) ToApplicationIgnoreDifferences() []ResourceIgnoreDifferences { + var result []ResourceIgnoreDifferences + for _, item := range a { + result = append(result, item.ToApplicationResourceIgnoreDifferences()) + } + return result +} + +// ApplicationSetResourceIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live +// applications when applying changes from generated applications. +type ApplicationSetResourceIgnoreDifferences struct { + // Name is the name of the application to ignore differences for. If not specified, the rule applies to all applications. + Name string `json:"name,omitempty" protobuf:"bytes,1,name=name"` + // JSONPointers is a list of JSON pointers to fields to ignore differences for. + JSONPointers []string `json:"jsonPointers,omitempty" protobuf:"bytes,2,name=jsonPointers"` + // JQPathExpressions is a list of JQ path expressions to fields to ignore differences for. + JQPathExpressions []string `json:"jqPathExpressions,omitempty" protobuf:"bytes,3,name=jqExpressions"` +} + +func (a *ApplicationSetResourceIgnoreDifferences) ToApplicationResourceIgnoreDifferences() ResourceIgnoreDifferences { + return ResourceIgnoreDifferences{ + Kind: ApplicationSchemaGroupVersionKind.Kind, + Group: ApplicationSchemaGroupVersionKind.Group, + Name: a.Name, + JSONPointers: a.JSONPointers, + JQPathExpressions: a.JQPathExpressions, + } +} + // ApplicationSetTemplate represents argocd ApplicationSpec type ApplicationSetTemplate struct { ApplicationSetTemplateMeta `json:"metadata" protobuf:"bytes,1,name=metadata"` @@ -442,6 +477,14 @@ type SCMProviderGeneratorGitlab struct { AllBranches bool `json:"allBranches,omitempty" protobuf:"varint,5,opt,name=allBranches"` // Skips validating the SCM provider's TLS certificate - useful for self-signed certificates.; default: false Insecure bool `json:"insecure,omitempty" protobuf:"varint,6,opt,name=insecure"` + // When recursing through subgroups, also include shared Projects (true) or scan only the subgroups under same path (false). Defaults to "true" + IncludeSharedProjects *bool `json:"includeSharedProjects,omitempty" protobuf:"varint,7,opt,name=includeSharedProjects"` + // Filter repos list based on Gitlab Topic. + Topic string `json:"topic,omitempty" protobuf:"bytes,8,opt,name=topic"` +} + +func (s *SCMProviderGeneratorGitlab) WillIncludeSharedProjects() bool { + return s.IncludeSharedProjects == nil || *s.IncludeSharedProjects } // SCMProviderGeneratorBitbucket defines connection info specific to Bitbucket Cloud (API version 2). diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.pb.go b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.pb.go index 532ed95f9f..13d8d44466 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.pb.go +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.pb.go @@ -515,10 +515,40 @@ func (m *ApplicationSetNestedGenerator) XXX_DiscardUnknown() { var xxx_messageInfo_ApplicationSetNestedGenerator proto.InternalMessageInfo +func (m *ApplicationSetResourceIgnoreDifferences) Reset() { + *m = ApplicationSetResourceIgnoreDifferences{} +} +func (*ApplicationSetResourceIgnoreDifferences) ProtoMessage() {} +func (*ApplicationSetResourceIgnoreDifferences) Descriptor() ([]byte, []int) { + return fileDescriptor_030104ce3b95bcac, []int{17} +} +func (m *ApplicationSetResourceIgnoreDifferences) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplicationSetResourceIgnoreDifferences) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ApplicationSetResourceIgnoreDifferences) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationSetResourceIgnoreDifferences.Merge(m, src) +} +func (m *ApplicationSetResourceIgnoreDifferences) XXX_Size() int { + return m.Size() +} +func (m *ApplicationSetResourceIgnoreDifferences) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationSetResourceIgnoreDifferences.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationSetResourceIgnoreDifferences proto.InternalMessageInfo + func (m *ApplicationSetRolloutStep) Reset() { *m = ApplicationSetRolloutStep{} } func (*ApplicationSetRolloutStep) ProtoMessage() {} func (*ApplicationSetRolloutStep) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{17} + return fileDescriptor_030104ce3b95bcac, []int{18} } func (m *ApplicationSetRolloutStep) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -546,7 +576,7 @@ var xxx_messageInfo_ApplicationSetRolloutStep proto.InternalMessageInfo func (m *ApplicationSetRolloutStrategy) Reset() { *m = ApplicationSetRolloutStrategy{} } func (*ApplicationSetRolloutStrategy) ProtoMessage() {} func (*ApplicationSetRolloutStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{18} + return fileDescriptor_030104ce3b95bcac, []int{19} } func (m *ApplicationSetRolloutStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -574,7 +604,7 @@ var xxx_messageInfo_ApplicationSetRolloutStrategy proto.InternalMessageInfo func (m *ApplicationSetSpec) Reset() { *m = ApplicationSetSpec{} } func (*ApplicationSetSpec) ProtoMessage() {} func (*ApplicationSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{19} + return fileDescriptor_030104ce3b95bcac, []int{20} } func (m *ApplicationSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -602,7 +632,7 @@ var xxx_messageInfo_ApplicationSetSpec proto.InternalMessageInfo func (m *ApplicationSetStatus) Reset() { *m = ApplicationSetStatus{} } func (*ApplicationSetStatus) ProtoMessage() {} func (*ApplicationSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{20} + return fileDescriptor_030104ce3b95bcac, []int{21} } func (m *ApplicationSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -630,7 +660,7 @@ var xxx_messageInfo_ApplicationSetStatus proto.InternalMessageInfo func (m *ApplicationSetStrategy) Reset() { *m = ApplicationSetStrategy{} } func (*ApplicationSetStrategy) ProtoMessage() {} func (*ApplicationSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{21} + return fileDescriptor_030104ce3b95bcac, []int{22} } func (m *ApplicationSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -658,7 +688,7 @@ var xxx_messageInfo_ApplicationSetStrategy proto.InternalMessageInfo func (m *ApplicationSetSyncPolicy) Reset() { *m = ApplicationSetSyncPolicy{} } func (*ApplicationSetSyncPolicy) ProtoMessage() {} func (*ApplicationSetSyncPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{22} + return fileDescriptor_030104ce3b95bcac, []int{23} } func (m *ApplicationSetSyncPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -686,7 +716,7 @@ var xxx_messageInfo_ApplicationSetSyncPolicy proto.InternalMessageInfo func (m *ApplicationSetTemplate) Reset() { *m = ApplicationSetTemplate{} } func (*ApplicationSetTemplate) ProtoMessage() {} func (*ApplicationSetTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{23} + return fileDescriptor_030104ce3b95bcac, []int{24} } func (m *ApplicationSetTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,7 +744,7 @@ var xxx_messageInfo_ApplicationSetTemplate proto.InternalMessageInfo func (m *ApplicationSetTemplateMeta) Reset() { *m = ApplicationSetTemplateMeta{} } func (*ApplicationSetTemplateMeta) ProtoMessage() {} func (*ApplicationSetTemplateMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{24} + return fileDescriptor_030104ce3b95bcac, []int{25} } func (m *ApplicationSetTemplateMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -742,7 +772,7 @@ var xxx_messageInfo_ApplicationSetTemplateMeta proto.InternalMessageInfo func (m *ApplicationSetTerminalGenerator) Reset() { *m = ApplicationSetTerminalGenerator{} } func (*ApplicationSetTerminalGenerator) ProtoMessage() {} func (*ApplicationSetTerminalGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{25} + return fileDescriptor_030104ce3b95bcac, []int{26} } func (m *ApplicationSetTerminalGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -770,7 +800,7 @@ var xxx_messageInfo_ApplicationSetTerminalGenerator proto.InternalMessageInfo func (m *ApplicationSource) Reset() { *m = ApplicationSource{} } func (*ApplicationSource) ProtoMessage() {} func (*ApplicationSource) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{26} + return fileDescriptor_030104ce3b95bcac, []int{27} } func (m *ApplicationSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -798,7 +828,7 @@ var xxx_messageInfo_ApplicationSource proto.InternalMessageInfo func (m *ApplicationSourceDirectory) Reset() { *m = ApplicationSourceDirectory{} } func (*ApplicationSourceDirectory) ProtoMessage() {} func (*ApplicationSourceDirectory) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{27} + return fileDescriptor_030104ce3b95bcac, []int{28} } func (m *ApplicationSourceDirectory) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -826,7 +856,7 @@ var xxx_messageInfo_ApplicationSourceDirectory proto.InternalMessageInfo func (m *ApplicationSourceHelm) Reset() { *m = ApplicationSourceHelm{} } func (*ApplicationSourceHelm) ProtoMessage() {} func (*ApplicationSourceHelm) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{28} + return fileDescriptor_030104ce3b95bcac, []int{29} } func (m *ApplicationSourceHelm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -854,7 +884,7 @@ var xxx_messageInfo_ApplicationSourceHelm proto.InternalMessageInfo func (m *ApplicationSourceJsonnet) Reset() { *m = ApplicationSourceJsonnet{} } func (*ApplicationSourceJsonnet) ProtoMessage() {} func (*ApplicationSourceJsonnet) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{29} + return fileDescriptor_030104ce3b95bcac, []int{30} } func (m *ApplicationSourceJsonnet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -882,7 +912,7 @@ var xxx_messageInfo_ApplicationSourceJsonnet proto.InternalMessageInfo func (m *ApplicationSourceKustomize) Reset() { *m = ApplicationSourceKustomize{} } func (*ApplicationSourceKustomize) ProtoMessage() {} func (*ApplicationSourceKustomize) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{30} + return fileDescriptor_030104ce3b95bcac, []int{31} } func (m *ApplicationSourceKustomize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -910,7 +940,7 @@ var xxx_messageInfo_ApplicationSourceKustomize proto.InternalMessageInfo func (m *ApplicationSourcePlugin) Reset() { *m = ApplicationSourcePlugin{} } func (*ApplicationSourcePlugin) ProtoMessage() {} func (*ApplicationSourcePlugin) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{31} + return fileDescriptor_030104ce3b95bcac, []int{32} } func (m *ApplicationSourcePlugin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -938,7 +968,7 @@ var xxx_messageInfo_ApplicationSourcePlugin proto.InternalMessageInfo func (m *ApplicationSourcePluginParameter) Reset() { *m = ApplicationSourcePluginParameter{} } func (*ApplicationSourcePluginParameter) ProtoMessage() {} func (*ApplicationSourcePluginParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{32} + return fileDescriptor_030104ce3b95bcac, []int{33} } func (m *ApplicationSourcePluginParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -966,7 +996,7 @@ var xxx_messageInfo_ApplicationSourcePluginParameter proto.InternalMessageInfo func (m *ApplicationSpec) Reset() { *m = ApplicationSpec{} } func (*ApplicationSpec) ProtoMessage() {} func (*ApplicationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{33} + return fileDescriptor_030104ce3b95bcac, []int{34} } func (m *ApplicationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -994,7 +1024,7 @@ var xxx_messageInfo_ApplicationSpec proto.InternalMessageInfo func (m *ApplicationStatus) Reset() { *m = ApplicationStatus{} } func (*ApplicationStatus) ProtoMessage() {} func (*ApplicationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{34} + return fileDescriptor_030104ce3b95bcac, []int{35} } func (m *ApplicationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1022,7 +1052,7 @@ var xxx_messageInfo_ApplicationStatus proto.InternalMessageInfo func (m *ApplicationSummary) Reset() { *m = ApplicationSummary{} } func (*ApplicationSummary) ProtoMessage() {} func (*ApplicationSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{35} + return fileDescriptor_030104ce3b95bcac, []int{36} } func (m *ApplicationSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1050,7 +1080,7 @@ var xxx_messageInfo_ApplicationSummary proto.InternalMessageInfo func (m *ApplicationTree) Reset() { *m = ApplicationTree{} } func (*ApplicationTree) ProtoMessage() {} func (*ApplicationTree) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{36} + return fileDescriptor_030104ce3b95bcac, []int{37} } func (m *ApplicationTree) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1078,7 +1108,7 @@ var xxx_messageInfo_ApplicationTree proto.InternalMessageInfo func (m *ApplicationWatchEvent) Reset() { *m = ApplicationWatchEvent{} } func (*ApplicationWatchEvent) ProtoMessage() {} func (*ApplicationWatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{37} + return fileDescriptor_030104ce3b95bcac, []int{38} } func (m *ApplicationWatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1106,7 +1136,7 @@ var xxx_messageInfo_ApplicationWatchEvent proto.InternalMessageInfo func (m *Backoff) Reset() { *m = Backoff{} } func (*Backoff) ProtoMessage() {} func (*Backoff) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{38} + return fileDescriptor_030104ce3b95bcac, []int{39} } func (m *Backoff) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1134,7 +1164,7 @@ var xxx_messageInfo_Backoff proto.InternalMessageInfo func (m *BasicAuthBitbucketServer) Reset() { *m = BasicAuthBitbucketServer{} } func (*BasicAuthBitbucketServer) ProtoMessage() {} func (*BasicAuthBitbucketServer) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{39} + return fileDescriptor_030104ce3b95bcac, []int{40} } func (m *BasicAuthBitbucketServer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1192,7 @@ var xxx_messageInfo_BasicAuthBitbucketServer proto.InternalMessageInfo func (m *BearerTokenBitbucketCloud) Reset() { *m = BearerTokenBitbucketCloud{} } func (*BearerTokenBitbucketCloud) ProtoMessage() {} func (*BearerTokenBitbucketCloud) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{40} + return fileDescriptor_030104ce3b95bcac, []int{41} } func (m *BearerTokenBitbucketCloud) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1190,7 +1220,7 @@ var xxx_messageInfo_BearerTokenBitbucketCloud proto.InternalMessageInfo func (m *ChartDetails) Reset() { *m = ChartDetails{} } func (*ChartDetails) ProtoMessage() {} func (*ChartDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{41} + return fileDescriptor_030104ce3b95bcac, []int{42} } func (m *ChartDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,7 +1248,7 @@ var xxx_messageInfo_ChartDetails proto.InternalMessageInfo func (m *Cluster) Reset() { *m = Cluster{} } func (*Cluster) ProtoMessage() {} func (*Cluster) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{42} + return fileDescriptor_030104ce3b95bcac, []int{43} } func (m *Cluster) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1246,7 +1276,7 @@ var xxx_messageInfo_Cluster proto.InternalMessageInfo func (m *ClusterCacheInfo) Reset() { *m = ClusterCacheInfo{} } func (*ClusterCacheInfo) ProtoMessage() {} func (*ClusterCacheInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{43} + return fileDescriptor_030104ce3b95bcac, []int{44} } func (m *ClusterCacheInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1274,7 +1304,7 @@ var xxx_messageInfo_ClusterCacheInfo proto.InternalMessageInfo func (m *ClusterConfig) Reset() { *m = ClusterConfig{} } func (*ClusterConfig) ProtoMessage() {} func (*ClusterConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{44} + return fileDescriptor_030104ce3b95bcac, []int{45} } func (m *ClusterConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1302,7 +1332,7 @@ var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo func (m *ClusterGenerator) Reset() { *m = ClusterGenerator{} } func (*ClusterGenerator) ProtoMessage() {} func (*ClusterGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{45} + return fileDescriptor_030104ce3b95bcac, []int{46} } func (m *ClusterGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1330,7 +1360,7 @@ var xxx_messageInfo_ClusterGenerator proto.InternalMessageInfo func (m *ClusterInfo) Reset() { *m = ClusterInfo{} } func (*ClusterInfo) ProtoMessage() {} func (*ClusterInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{46} + return fileDescriptor_030104ce3b95bcac, []int{47} } func (m *ClusterInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1358,7 +1388,7 @@ var xxx_messageInfo_ClusterInfo proto.InternalMessageInfo func (m *ClusterList) Reset() { *m = ClusterList{} } func (*ClusterList) ProtoMessage() {} func (*ClusterList) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{47} + return fileDescriptor_030104ce3b95bcac, []int{48} } func (m *ClusterList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1386,7 +1416,7 @@ var xxx_messageInfo_ClusterList proto.InternalMessageInfo func (m *Command) Reset() { *m = Command{} } func (*Command) ProtoMessage() {} func (*Command) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{48} + return fileDescriptor_030104ce3b95bcac, []int{49} } func (m *Command) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1414,7 +1444,7 @@ var xxx_messageInfo_Command proto.InternalMessageInfo func (m *ComparedTo) Reset() { *m = ComparedTo{} } func (*ComparedTo) ProtoMessage() {} func (*ComparedTo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{49} + return fileDescriptor_030104ce3b95bcac, []int{50} } func (m *ComparedTo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1442,7 +1472,7 @@ var xxx_messageInfo_ComparedTo proto.InternalMessageInfo func (m *ComponentParameter) Reset() { *m = ComponentParameter{} } func (*ComponentParameter) ProtoMessage() {} func (*ComponentParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{50} + return fileDescriptor_030104ce3b95bcac, []int{51} } func (m *ComponentParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1470,7 +1500,7 @@ var xxx_messageInfo_ComponentParameter proto.InternalMessageInfo func (m *ConfigManagementPlugin) Reset() { *m = ConfigManagementPlugin{} } func (*ConfigManagementPlugin) ProtoMessage() {} func (*ConfigManagementPlugin) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{51} + return fileDescriptor_030104ce3b95bcac, []int{52} } func (m *ConfigManagementPlugin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1498,7 +1528,7 @@ var xxx_messageInfo_ConfigManagementPlugin proto.InternalMessageInfo func (m *ConnectionState) Reset() { *m = ConnectionState{} } func (*ConnectionState) ProtoMessage() {} func (*ConnectionState) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{52} + return fileDescriptor_030104ce3b95bcac, []int{53} } func (m *ConnectionState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1526,7 +1556,7 @@ var xxx_messageInfo_ConnectionState proto.InternalMessageInfo func (m *DuckTypeGenerator) Reset() { *m = DuckTypeGenerator{} } func (*DuckTypeGenerator) ProtoMessage() {} func (*DuckTypeGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{53} + return fileDescriptor_030104ce3b95bcac, []int{54} } func (m *DuckTypeGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1554,7 +1584,7 @@ var xxx_messageInfo_DuckTypeGenerator proto.InternalMessageInfo func (m *EnvEntry) Reset() { *m = EnvEntry{} } func (*EnvEntry) ProtoMessage() {} func (*EnvEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{54} + return fileDescriptor_030104ce3b95bcac, []int{55} } func (m *EnvEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1582,7 +1612,7 @@ var xxx_messageInfo_EnvEntry proto.InternalMessageInfo func (m *ErrApplicationNotAllowedToUseProject) Reset() { *m = ErrApplicationNotAllowedToUseProject{} } func (*ErrApplicationNotAllowedToUseProject) ProtoMessage() {} func (*ErrApplicationNotAllowedToUseProject) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{55} + return fileDescriptor_030104ce3b95bcac, []int{56} } func (m *ErrApplicationNotAllowedToUseProject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1610,7 +1640,7 @@ var xxx_messageInfo_ErrApplicationNotAllowedToUseProject proto.InternalMessageIn func (m *ExecProviderConfig) Reset() { *m = ExecProviderConfig{} } func (*ExecProviderConfig) ProtoMessage() {} func (*ExecProviderConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{56} + return fileDescriptor_030104ce3b95bcac, []int{57} } func (m *ExecProviderConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1638,7 +1668,7 @@ var xxx_messageInfo_ExecProviderConfig proto.InternalMessageInfo func (m *GitDirectoryGeneratorItem) Reset() { *m = GitDirectoryGeneratorItem{} } func (*GitDirectoryGeneratorItem) ProtoMessage() {} func (*GitDirectoryGeneratorItem) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{57} + return fileDescriptor_030104ce3b95bcac, []int{58} } func (m *GitDirectoryGeneratorItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1666,7 +1696,7 @@ var xxx_messageInfo_GitDirectoryGeneratorItem proto.InternalMessageInfo func (m *GitFileGeneratorItem) Reset() { *m = GitFileGeneratorItem{} } func (*GitFileGeneratorItem) ProtoMessage() {} func (*GitFileGeneratorItem) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{58} + return fileDescriptor_030104ce3b95bcac, []int{59} } func (m *GitFileGeneratorItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1694,7 +1724,7 @@ var xxx_messageInfo_GitFileGeneratorItem proto.InternalMessageInfo func (m *GitGenerator) Reset() { *m = GitGenerator{} } func (*GitGenerator) ProtoMessage() {} func (*GitGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{59} + return fileDescriptor_030104ce3b95bcac, []int{60} } func (m *GitGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1722,7 +1752,7 @@ var xxx_messageInfo_GitGenerator proto.InternalMessageInfo func (m *GnuPGPublicKey) Reset() { *m = GnuPGPublicKey{} } func (*GnuPGPublicKey) ProtoMessage() {} func (*GnuPGPublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{60} + return fileDescriptor_030104ce3b95bcac, []int{61} } func (m *GnuPGPublicKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1750,7 +1780,7 @@ var xxx_messageInfo_GnuPGPublicKey proto.InternalMessageInfo func (m *GnuPGPublicKeyList) Reset() { *m = GnuPGPublicKeyList{} } func (*GnuPGPublicKeyList) ProtoMessage() {} func (*GnuPGPublicKeyList) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{61} + return fileDescriptor_030104ce3b95bcac, []int{62} } func (m *GnuPGPublicKeyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1778,7 +1808,7 @@ var xxx_messageInfo_GnuPGPublicKeyList proto.InternalMessageInfo func (m *HealthStatus) Reset() { *m = HealthStatus{} } func (*HealthStatus) ProtoMessage() {} func (*HealthStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{62} + return fileDescriptor_030104ce3b95bcac, []int{63} } func (m *HealthStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1806,7 +1836,7 @@ var xxx_messageInfo_HealthStatus proto.InternalMessageInfo func (m *HelmFileParameter) Reset() { *m = HelmFileParameter{} } func (*HelmFileParameter) ProtoMessage() {} func (*HelmFileParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{63} + return fileDescriptor_030104ce3b95bcac, []int{64} } func (m *HelmFileParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1834,7 +1864,7 @@ var xxx_messageInfo_HelmFileParameter proto.InternalMessageInfo func (m *HelmOptions) Reset() { *m = HelmOptions{} } func (*HelmOptions) ProtoMessage() {} func (*HelmOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{64} + return fileDescriptor_030104ce3b95bcac, []int{65} } func (m *HelmOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1862,7 +1892,7 @@ var xxx_messageInfo_HelmOptions proto.InternalMessageInfo func (m *HelmParameter) Reset() { *m = HelmParameter{} } func (*HelmParameter) ProtoMessage() {} func (*HelmParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{65} + return fileDescriptor_030104ce3b95bcac, []int{66} } func (m *HelmParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1890,7 +1920,7 @@ var xxx_messageInfo_HelmParameter proto.InternalMessageInfo func (m *HostInfo) Reset() { *m = HostInfo{} } func (*HostInfo) ProtoMessage() {} func (*HostInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{66} + return fileDescriptor_030104ce3b95bcac, []int{67} } func (m *HostInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1918,7 +1948,7 @@ var xxx_messageInfo_HostInfo proto.InternalMessageInfo func (m *HostResourceInfo) Reset() { *m = HostResourceInfo{} } func (*HostResourceInfo) ProtoMessage() {} func (*HostResourceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{67} + return fileDescriptor_030104ce3b95bcac, []int{68} } func (m *HostResourceInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1946,7 +1976,7 @@ var xxx_messageInfo_HostResourceInfo proto.InternalMessageInfo func (m *Info) Reset() { *m = Info{} } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{68} + return fileDescriptor_030104ce3b95bcac, []int{69} } func (m *Info) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1974,7 +2004,7 @@ var xxx_messageInfo_Info proto.InternalMessageInfo func (m *InfoItem) Reset() { *m = InfoItem{} } func (*InfoItem) ProtoMessage() {} func (*InfoItem) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{69} + return fileDescriptor_030104ce3b95bcac, []int{70} } func (m *InfoItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2002,7 +2032,7 @@ var xxx_messageInfo_InfoItem proto.InternalMessageInfo func (m *JWTToken) Reset() { *m = JWTToken{} } func (*JWTToken) ProtoMessage() {} func (*JWTToken) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{70} + return fileDescriptor_030104ce3b95bcac, []int{71} } func (m *JWTToken) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2030,7 +2060,7 @@ var xxx_messageInfo_JWTToken proto.InternalMessageInfo func (m *JWTTokens) Reset() { *m = JWTTokens{} } func (*JWTTokens) ProtoMessage() {} func (*JWTTokens) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{71} + return fileDescriptor_030104ce3b95bcac, []int{72} } func (m *JWTTokens) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2058,7 +2088,7 @@ var xxx_messageInfo_JWTTokens proto.InternalMessageInfo func (m *JsonnetVar) Reset() { *m = JsonnetVar{} } func (*JsonnetVar) ProtoMessage() {} func (*JsonnetVar) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{72} + return fileDescriptor_030104ce3b95bcac, []int{73} } func (m *JsonnetVar) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2086,7 +2116,7 @@ var xxx_messageInfo_JsonnetVar proto.InternalMessageInfo func (m *KnownTypeField) Reset() { *m = KnownTypeField{} } func (*KnownTypeField) ProtoMessage() {} func (*KnownTypeField) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{73} + return fileDescriptor_030104ce3b95bcac, []int{74} } func (m *KnownTypeField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2111,10 +2141,38 @@ func (m *KnownTypeField) XXX_DiscardUnknown() { var xxx_messageInfo_KnownTypeField proto.InternalMessageInfo +func (m *KustomizeGvk) Reset() { *m = KustomizeGvk{} } +func (*KustomizeGvk) ProtoMessage() {} +func (*KustomizeGvk) Descriptor() ([]byte, []int) { + return fileDescriptor_030104ce3b95bcac, []int{75} +} +func (m *KustomizeGvk) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KustomizeGvk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *KustomizeGvk) XXX_Merge(src proto.Message) { + xxx_messageInfo_KustomizeGvk.Merge(m, src) +} +func (m *KustomizeGvk) XXX_Size() int { + return m.Size() +} +func (m *KustomizeGvk) XXX_DiscardUnknown() { + xxx_messageInfo_KustomizeGvk.DiscardUnknown(m) +} + +var xxx_messageInfo_KustomizeGvk proto.InternalMessageInfo + func (m *KustomizeOptions) Reset() { *m = KustomizeOptions{} } func (*KustomizeOptions) ProtoMessage() {} func (*KustomizeOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{74} + return fileDescriptor_030104ce3b95bcac, []int{76} } func (m *KustomizeOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2139,10 +2197,38 @@ func (m *KustomizeOptions) XXX_DiscardUnknown() { var xxx_messageInfo_KustomizeOptions proto.InternalMessageInfo +func (m *KustomizePatch) Reset() { *m = KustomizePatch{} } +func (*KustomizePatch) ProtoMessage() {} +func (*KustomizePatch) Descriptor() ([]byte, []int) { + return fileDescriptor_030104ce3b95bcac, []int{77} +} +func (m *KustomizePatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KustomizePatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *KustomizePatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_KustomizePatch.Merge(m, src) +} +func (m *KustomizePatch) XXX_Size() int { + return m.Size() +} +func (m *KustomizePatch) XXX_DiscardUnknown() { + xxx_messageInfo_KustomizePatch.DiscardUnknown(m) +} + +var xxx_messageInfo_KustomizePatch proto.InternalMessageInfo + func (m *KustomizeReplica) Reset() { *m = KustomizeReplica{} } func (*KustomizeReplica) ProtoMessage() {} func (*KustomizeReplica) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{75} + return fileDescriptor_030104ce3b95bcac, []int{78} } func (m *KustomizeReplica) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2167,10 +2253,66 @@ func (m *KustomizeReplica) XXX_DiscardUnknown() { var xxx_messageInfo_KustomizeReplica proto.InternalMessageInfo +func (m *KustomizeResId) Reset() { *m = KustomizeResId{} } +func (*KustomizeResId) ProtoMessage() {} +func (*KustomizeResId) Descriptor() ([]byte, []int) { + return fileDescriptor_030104ce3b95bcac, []int{79} +} +func (m *KustomizeResId) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KustomizeResId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *KustomizeResId) XXX_Merge(src proto.Message) { + xxx_messageInfo_KustomizeResId.Merge(m, src) +} +func (m *KustomizeResId) XXX_Size() int { + return m.Size() +} +func (m *KustomizeResId) XXX_DiscardUnknown() { + xxx_messageInfo_KustomizeResId.DiscardUnknown(m) +} + +var xxx_messageInfo_KustomizeResId proto.InternalMessageInfo + +func (m *KustomizeSelector) Reset() { *m = KustomizeSelector{} } +func (*KustomizeSelector) ProtoMessage() {} +func (*KustomizeSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_030104ce3b95bcac, []int{80} +} +func (m *KustomizeSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KustomizeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *KustomizeSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_KustomizeSelector.Merge(m, src) +} +func (m *KustomizeSelector) XXX_Size() int { + return m.Size() +} +func (m *KustomizeSelector) XXX_DiscardUnknown() { + xxx_messageInfo_KustomizeSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_KustomizeSelector proto.InternalMessageInfo + func (m *ListGenerator) Reset() { *m = ListGenerator{} } func (*ListGenerator) ProtoMessage() {} func (*ListGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{76} + return fileDescriptor_030104ce3b95bcac, []int{81} } func (m *ListGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2198,7 +2340,7 @@ var xxx_messageInfo_ListGenerator proto.InternalMessageInfo func (m *ManagedNamespaceMetadata) Reset() { *m = ManagedNamespaceMetadata{} } func (*ManagedNamespaceMetadata) ProtoMessage() {} func (*ManagedNamespaceMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{77} + return fileDescriptor_030104ce3b95bcac, []int{82} } func (m *ManagedNamespaceMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2226,7 +2368,7 @@ var xxx_messageInfo_ManagedNamespaceMetadata proto.InternalMessageInfo func (m *MatrixGenerator) Reset() { *m = MatrixGenerator{} } func (*MatrixGenerator) ProtoMessage() {} func (*MatrixGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{78} + return fileDescriptor_030104ce3b95bcac, []int{83} } func (m *MatrixGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2254,7 +2396,7 @@ var xxx_messageInfo_MatrixGenerator proto.InternalMessageInfo func (m *MergeGenerator) Reset() { *m = MergeGenerator{} } func (*MergeGenerator) ProtoMessage() {} func (*MergeGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{79} + return fileDescriptor_030104ce3b95bcac, []int{84} } func (m *MergeGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2282,7 +2424,7 @@ var xxx_messageInfo_MergeGenerator proto.InternalMessageInfo func (m *NestedMatrixGenerator) Reset() { *m = NestedMatrixGenerator{} } func (*NestedMatrixGenerator) ProtoMessage() {} func (*NestedMatrixGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{80} + return fileDescriptor_030104ce3b95bcac, []int{85} } func (m *NestedMatrixGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2310,7 +2452,7 @@ var xxx_messageInfo_NestedMatrixGenerator proto.InternalMessageInfo func (m *NestedMergeGenerator) Reset() { *m = NestedMergeGenerator{} } func (*NestedMergeGenerator) ProtoMessage() {} func (*NestedMergeGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{81} + return fileDescriptor_030104ce3b95bcac, []int{86} } func (m *NestedMergeGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2338,7 +2480,7 @@ var xxx_messageInfo_NestedMergeGenerator proto.InternalMessageInfo func (m *Operation) Reset() { *m = Operation{} } func (*Operation) ProtoMessage() {} func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{82} + return fileDescriptor_030104ce3b95bcac, []int{87} } func (m *Operation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2366,7 +2508,7 @@ var xxx_messageInfo_Operation proto.InternalMessageInfo func (m *OperationInitiator) Reset() { *m = OperationInitiator{} } func (*OperationInitiator) ProtoMessage() {} func (*OperationInitiator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{83} + return fileDescriptor_030104ce3b95bcac, []int{88} } func (m *OperationInitiator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2394,7 +2536,7 @@ var xxx_messageInfo_OperationInitiator proto.InternalMessageInfo func (m *OperationState) Reset() { *m = OperationState{} } func (*OperationState) ProtoMessage() {} func (*OperationState) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{84} + return fileDescriptor_030104ce3b95bcac, []int{89} } func (m *OperationState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2422,7 +2564,7 @@ var xxx_messageInfo_OperationState proto.InternalMessageInfo func (m *OptionalArray) Reset() { *m = OptionalArray{} } func (*OptionalArray) ProtoMessage() {} func (*OptionalArray) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{85} + return fileDescriptor_030104ce3b95bcac, []int{90} } func (m *OptionalArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2450,7 +2592,7 @@ var xxx_messageInfo_OptionalArray proto.InternalMessageInfo func (m *OptionalMap) Reset() { *m = OptionalMap{} } func (*OptionalMap) ProtoMessage() {} func (*OptionalMap) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{86} + return fileDescriptor_030104ce3b95bcac, []int{91} } func (m *OptionalMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2478,7 +2620,7 @@ var xxx_messageInfo_OptionalMap proto.InternalMessageInfo func (m *OrphanedResourceKey) Reset() { *m = OrphanedResourceKey{} } func (*OrphanedResourceKey) ProtoMessage() {} func (*OrphanedResourceKey) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{87} + return fileDescriptor_030104ce3b95bcac, []int{92} } func (m *OrphanedResourceKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2506,7 +2648,7 @@ var xxx_messageInfo_OrphanedResourceKey proto.InternalMessageInfo func (m *OrphanedResourcesMonitorSettings) Reset() { *m = OrphanedResourcesMonitorSettings{} } func (*OrphanedResourcesMonitorSettings) ProtoMessage() {} func (*OrphanedResourcesMonitorSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{88} + return fileDescriptor_030104ce3b95bcac, []int{93} } func (m *OrphanedResourcesMonitorSettings) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2534,7 +2676,7 @@ var xxx_messageInfo_OrphanedResourcesMonitorSettings proto.InternalMessageInfo func (m *OverrideIgnoreDiff) Reset() { *m = OverrideIgnoreDiff{} } func (*OverrideIgnoreDiff) ProtoMessage() {} func (*OverrideIgnoreDiff) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{89} + return fileDescriptor_030104ce3b95bcac, []int{94} } func (m *OverrideIgnoreDiff) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2562,7 +2704,7 @@ var xxx_messageInfo_OverrideIgnoreDiff proto.InternalMessageInfo func (m *PluginConfigMapRef) Reset() { *m = PluginConfigMapRef{} } func (*PluginConfigMapRef) ProtoMessage() {} func (*PluginConfigMapRef) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{90} + return fileDescriptor_030104ce3b95bcac, []int{95} } func (m *PluginConfigMapRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2590,7 +2732,7 @@ var xxx_messageInfo_PluginConfigMapRef proto.InternalMessageInfo func (m *PluginGenerator) Reset() { *m = PluginGenerator{} } func (*PluginGenerator) ProtoMessage() {} func (*PluginGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{91} + return fileDescriptor_030104ce3b95bcac, []int{96} } func (m *PluginGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2618,7 +2760,7 @@ var xxx_messageInfo_PluginGenerator proto.InternalMessageInfo func (m *PluginInput) Reset() { *m = PluginInput{} } func (*PluginInput) ProtoMessage() {} func (*PluginInput) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{92} + return fileDescriptor_030104ce3b95bcac, []int{97} } func (m *PluginInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2646,7 +2788,7 @@ var xxx_messageInfo_PluginInput proto.InternalMessageInfo func (m *ProjectRole) Reset() { *m = ProjectRole{} } func (*ProjectRole) ProtoMessage() {} func (*ProjectRole) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{93} + return fileDescriptor_030104ce3b95bcac, []int{98} } func (m *ProjectRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2674,7 +2816,7 @@ var xxx_messageInfo_ProjectRole proto.InternalMessageInfo func (m *PullRequestGenerator) Reset() { *m = PullRequestGenerator{} } func (*PullRequestGenerator) ProtoMessage() {} func (*PullRequestGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{94} + return fileDescriptor_030104ce3b95bcac, []int{99} } func (m *PullRequestGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2702,7 +2844,7 @@ var xxx_messageInfo_PullRequestGenerator proto.InternalMessageInfo func (m *PullRequestGeneratorAzureDevOps) Reset() { *m = PullRequestGeneratorAzureDevOps{} } func (*PullRequestGeneratorAzureDevOps) ProtoMessage() {} func (*PullRequestGeneratorAzureDevOps) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{95} + return fileDescriptor_030104ce3b95bcac, []int{100} } func (m *PullRequestGeneratorAzureDevOps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2730,7 +2872,7 @@ var xxx_messageInfo_PullRequestGeneratorAzureDevOps proto.InternalMessageInfo func (m *PullRequestGeneratorBitbucket) Reset() { *m = PullRequestGeneratorBitbucket{} } func (*PullRequestGeneratorBitbucket) ProtoMessage() {} func (*PullRequestGeneratorBitbucket) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{96} + return fileDescriptor_030104ce3b95bcac, []int{101} } func (m *PullRequestGeneratorBitbucket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2758,7 +2900,7 @@ var xxx_messageInfo_PullRequestGeneratorBitbucket proto.InternalMessageInfo func (m *PullRequestGeneratorBitbucketServer) Reset() { *m = PullRequestGeneratorBitbucketServer{} } func (*PullRequestGeneratorBitbucketServer) ProtoMessage() {} func (*PullRequestGeneratorBitbucketServer) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{97} + return fileDescriptor_030104ce3b95bcac, []int{102} } func (m *PullRequestGeneratorBitbucketServer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2786,7 +2928,7 @@ var xxx_messageInfo_PullRequestGeneratorBitbucketServer proto.InternalMessageInf func (m *PullRequestGeneratorFilter) Reset() { *m = PullRequestGeneratorFilter{} } func (*PullRequestGeneratorFilter) ProtoMessage() {} func (*PullRequestGeneratorFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{98} + return fileDescriptor_030104ce3b95bcac, []int{103} } func (m *PullRequestGeneratorFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2814,7 +2956,7 @@ var xxx_messageInfo_PullRequestGeneratorFilter proto.InternalMessageInfo func (m *PullRequestGeneratorGitLab) Reset() { *m = PullRequestGeneratorGitLab{} } func (*PullRequestGeneratorGitLab) ProtoMessage() {} func (*PullRequestGeneratorGitLab) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{99} + return fileDescriptor_030104ce3b95bcac, []int{104} } func (m *PullRequestGeneratorGitLab) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2842,7 +2984,7 @@ var xxx_messageInfo_PullRequestGeneratorGitLab proto.InternalMessageInfo func (m *PullRequestGeneratorGitea) Reset() { *m = PullRequestGeneratorGitea{} } func (*PullRequestGeneratorGitea) ProtoMessage() {} func (*PullRequestGeneratorGitea) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{100} + return fileDescriptor_030104ce3b95bcac, []int{105} } func (m *PullRequestGeneratorGitea) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2870,7 +3012,7 @@ var xxx_messageInfo_PullRequestGeneratorGitea proto.InternalMessageInfo func (m *PullRequestGeneratorGithub) Reset() { *m = PullRequestGeneratorGithub{} } func (*PullRequestGeneratorGithub) ProtoMessage() {} func (*PullRequestGeneratorGithub) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{101} + return fileDescriptor_030104ce3b95bcac, []int{106} } func (m *PullRequestGeneratorGithub) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2898,7 +3040,7 @@ var xxx_messageInfo_PullRequestGeneratorGithub proto.InternalMessageInfo func (m *RefTarget) Reset() { *m = RefTarget{} } func (*RefTarget) ProtoMessage() {} func (*RefTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{102} + return fileDescriptor_030104ce3b95bcac, []int{107} } func (m *RefTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2926,7 +3068,7 @@ var xxx_messageInfo_RefTarget proto.InternalMessageInfo func (m *RepoCreds) Reset() { *m = RepoCreds{} } func (*RepoCreds) ProtoMessage() {} func (*RepoCreds) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{103} + return fileDescriptor_030104ce3b95bcac, []int{108} } func (m *RepoCreds) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2954,7 +3096,7 @@ var xxx_messageInfo_RepoCreds proto.InternalMessageInfo func (m *RepoCredsList) Reset() { *m = RepoCredsList{} } func (*RepoCredsList) ProtoMessage() {} func (*RepoCredsList) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{104} + return fileDescriptor_030104ce3b95bcac, []int{109} } func (m *RepoCredsList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2982,7 +3124,7 @@ var xxx_messageInfo_RepoCredsList proto.InternalMessageInfo func (m *Repository) Reset() { *m = Repository{} } func (*Repository) ProtoMessage() {} func (*Repository) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{105} + return fileDescriptor_030104ce3b95bcac, []int{110} } func (m *Repository) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3010,7 +3152,7 @@ var xxx_messageInfo_Repository proto.InternalMessageInfo func (m *RepositoryCertificate) Reset() { *m = RepositoryCertificate{} } func (*RepositoryCertificate) ProtoMessage() {} func (*RepositoryCertificate) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{106} + return fileDescriptor_030104ce3b95bcac, []int{111} } func (m *RepositoryCertificate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3038,7 +3180,7 @@ var xxx_messageInfo_RepositoryCertificate proto.InternalMessageInfo func (m *RepositoryCertificateList) Reset() { *m = RepositoryCertificateList{} } func (*RepositoryCertificateList) ProtoMessage() {} func (*RepositoryCertificateList) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{107} + return fileDescriptor_030104ce3b95bcac, []int{112} } func (m *RepositoryCertificateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3066,7 +3208,7 @@ var xxx_messageInfo_RepositoryCertificateList proto.InternalMessageInfo func (m *RepositoryList) Reset() { *m = RepositoryList{} } func (*RepositoryList) ProtoMessage() {} func (*RepositoryList) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{108} + return fileDescriptor_030104ce3b95bcac, []int{113} } func (m *RepositoryList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3094,7 +3236,7 @@ var xxx_messageInfo_RepositoryList proto.InternalMessageInfo func (m *ResourceAction) Reset() { *m = ResourceAction{} } func (*ResourceAction) ProtoMessage() {} func (*ResourceAction) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{109} + return fileDescriptor_030104ce3b95bcac, []int{114} } func (m *ResourceAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3122,7 +3264,7 @@ var xxx_messageInfo_ResourceAction proto.InternalMessageInfo func (m *ResourceActionDefinition) Reset() { *m = ResourceActionDefinition{} } func (*ResourceActionDefinition) ProtoMessage() {} func (*ResourceActionDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{110} + return fileDescriptor_030104ce3b95bcac, []int{115} } func (m *ResourceActionDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3150,7 +3292,7 @@ var xxx_messageInfo_ResourceActionDefinition proto.InternalMessageInfo func (m *ResourceActionParam) Reset() { *m = ResourceActionParam{} } func (*ResourceActionParam) ProtoMessage() {} func (*ResourceActionParam) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{111} + return fileDescriptor_030104ce3b95bcac, []int{116} } func (m *ResourceActionParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3178,7 +3320,7 @@ var xxx_messageInfo_ResourceActionParam proto.InternalMessageInfo func (m *ResourceActions) Reset() { *m = ResourceActions{} } func (*ResourceActions) ProtoMessage() {} func (*ResourceActions) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{112} + return fileDescriptor_030104ce3b95bcac, []int{117} } func (m *ResourceActions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3206,7 +3348,7 @@ var xxx_messageInfo_ResourceActions proto.InternalMessageInfo func (m *ResourceDiff) Reset() { *m = ResourceDiff{} } func (*ResourceDiff) ProtoMessage() {} func (*ResourceDiff) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{113} + return fileDescriptor_030104ce3b95bcac, []int{118} } func (m *ResourceDiff) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3234,7 +3376,7 @@ var xxx_messageInfo_ResourceDiff proto.InternalMessageInfo func (m *ResourceIgnoreDifferences) Reset() { *m = ResourceIgnoreDifferences{} } func (*ResourceIgnoreDifferences) ProtoMessage() {} func (*ResourceIgnoreDifferences) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{114} + return fileDescriptor_030104ce3b95bcac, []int{119} } func (m *ResourceIgnoreDifferences) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3262,7 +3404,7 @@ var xxx_messageInfo_ResourceIgnoreDifferences proto.InternalMessageInfo func (m *ResourceNetworkingInfo) Reset() { *m = ResourceNetworkingInfo{} } func (*ResourceNetworkingInfo) ProtoMessage() {} func (*ResourceNetworkingInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{115} + return fileDescriptor_030104ce3b95bcac, []int{120} } func (m *ResourceNetworkingInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3290,7 +3432,7 @@ var xxx_messageInfo_ResourceNetworkingInfo proto.InternalMessageInfo func (m *ResourceNode) Reset() { *m = ResourceNode{} } func (*ResourceNode) ProtoMessage() {} func (*ResourceNode) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{116} + return fileDescriptor_030104ce3b95bcac, []int{121} } func (m *ResourceNode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3318,7 +3460,7 @@ var xxx_messageInfo_ResourceNode proto.InternalMessageInfo func (m *ResourceOverride) Reset() { *m = ResourceOverride{} } func (*ResourceOverride) ProtoMessage() {} func (*ResourceOverride) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{117} + return fileDescriptor_030104ce3b95bcac, []int{122} } func (m *ResourceOverride) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3346,7 +3488,7 @@ var xxx_messageInfo_ResourceOverride proto.InternalMessageInfo func (m *ResourceRef) Reset() { *m = ResourceRef{} } func (*ResourceRef) ProtoMessage() {} func (*ResourceRef) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{118} + return fileDescriptor_030104ce3b95bcac, []int{123} } func (m *ResourceRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3374,7 +3516,7 @@ var xxx_messageInfo_ResourceRef proto.InternalMessageInfo func (m *ResourceResult) Reset() { *m = ResourceResult{} } func (*ResourceResult) ProtoMessage() {} func (*ResourceResult) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{119} + return fileDescriptor_030104ce3b95bcac, []int{124} } func (m *ResourceResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3402,7 +3544,7 @@ var xxx_messageInfo_ResourceResult proto.InternalMessageInfo func (m *ResourceStatus) Reset() { *m = ResourceStatus{} } func (*ResourceStatus) ProtoMessage() {} func (*ResourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{120} + return fileDescriptor_030104ce3b95bcac, []int{125} } func (m *ResourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3430,7 +3572,7 @@ var xxx_messageInfo_ResourceStatus proto.InternalMessageInfo func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } func (*RetryStrategy) ProtoMessage() {} func (*RetryStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{121} + return fileDescriptor_030104ce3b95bcac, []int{126} } func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3458,7 +3600,7 @@ var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo func (m *RevisionHistory) Reset() { *m = RevisionHistory{} } func (*RevisionHistory) ProtoMessage() {} func (*RevisionHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{122} + return fileDescriptor_030104ce3b95bcac, []int{127} } func (m *RevisionHistory) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3486,7 +3628,7 @@ var xxx_messageInfo_RevisionHistory proto.InternalMessageInfo func (m *RevisionMetadata) Reset() { *m = RevisionMetadata{} } func (*RevisionMetadata) ProtoMessage() {} func (*RevisionMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{123} + return fileDescriptor_030104ce3b95bcac, []int{128} } func (m *RevisionMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3514,7 +3656,7 @@ var xxx_messageInfo_RevisionMetadata proto.InternalMessageInfo func (m *SCMProviderGenerator) Reset() { *m = SCMProviderGenerator{} } func (*SCMProviderGenerator) ProtoMessage() {} func (*SCMProviderGenerator) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{124} + return fileDescriptor_030104ce3b95bcac, []int{129} } func (m *SCMProviderGenerator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3542,7 +3684,7 @@ var xxx_messageInfo_SCMProviderGenerator proto.InternalMessageInfo func (m *SCMProviderGeneratorAWSCodeCommit) Reset() { *m = SCMProviderGeneratorAWSCodeCommit{} } func (*SCMProviderGeneratorAWSCodeCommit) ProtoMessage() {} func (*SCMProviderGeneratorAWSCodeCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{125} + return fileDescriptor_030104ce3b95bcac, []int{130} } func (m *SCMProviderGeneratorAWSCodeCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3570,7 +3712,7 @@ var xxx_messageInfo_SCMProviderGeneratorAWSCodeCommit proto.InternalMessageInfo func (m *SCMProviderGeneratorAzureDevOps) Reset() { *m = SCMProviderGeneratorAzureDevOps{} } func (*SCMProviderGeneratorAzureDevOps) ProtoMessage() {} func (*SCMProviderGeneratorAzureDevOps) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{126} + return fileDescriptor_030104ce3b95bcac, []int{131} } func (m *SCMProviderGeneratorAzureDevOps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3598,7 +3740,7 @@ var xxx_messageInfo_SCMProviderGeneratorAzureDevOps proto.InternalMessageInfo func (m *SCMProviderGeneratorBitbucket) Reset() { *m = SCMProviderGeneratorBitbucket{} } func (*SCMProviderGeneratorBitbucket) ProtoMessage() {} func (*SCMProviderGeneratorBitbucket) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{127} + return fileDescriptor_030104ce3b95bcac, []int{132} } func (m *SCMProviderGeneratorBitbucket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3626,7 +3768,7 @@ var xxx_messageInfo_SCMProviderGeneratorBitbucket proto.InternalMessageInfo func (m *SCMProviderGeneratorBitbucketServer) Reset() { *m = SCMProviderGeneratorBitbucketServer{} } func (*SCMProviderGeneratorBitbucketServer) ProtoMessage() {} func (*SCMProviderGeneratorBitbucketServer) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{128} + return fileDescriptor_030104ce3b95bcac, []int{133} } func (m *SCMProviderGeneratorBitbucketServer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3654,7 +3796,7 @@ var xxx_messageInfo_SCMProviderGeneratorBitbucketServer proto.InternalMessageInf func (m *SCMProviderGeneratorFilter) Reset() { *m = SCMProviderGeneratorFilter{} } func (*SCMProviderGeneratorFilter) ProtoMessage() {} func (*SCMProviderGeneratorFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{129} + return fileDescriptor_030104ce3b95bcac, []int{134} } func (m *SCMProviderGeneratorFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3682,7 +3824,7 @@ var xxx_messageInfo_SCMProviderGeneratorFilter proto.InternalMessageInfo func (m *SCMProviderGeneratorGitea) Reset() { *m = SCMProviderGeneratorGitea{} } func (*SCMProviderGeneratorGitea) ProtoMessage() {} func (*SCMProviderGeneratorGitea) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{130} + return fileDescriptor_030104ce3b95bcac, []int{135} } func (m *SCMProviderGeneratorGitea) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3710,7 +3852,7 @@ var xxx_messageInfo_SCMProviderGeneratorGitea proto.InternalMessageInfo func (m *SCMProviderGeneratorGithub) Reset() { *m = SCMProviderGeneratorGithub{} } func (*SCMProviderGeneratorGithub) ProtoMessage() {} func (*SCMProviderGeneratorGithub) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{131} + return fileDescriptor_030104ce3b95bcac, []int{136} } func (m *SCMProviderGeneratorGithub) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3738,7 +3880,7 @@ var xxx_messageInfo_SCMProviderGeneratorGithub proto.InternalMessageInfo func (m *SCMProviderGeneratorGitlab) Reset() { *m = SCMProviderGeneratorGitlab{} } func (*SCMProviderGeneratorGitlab) ProtoMessage() {} func (*SCMProviderGeneratorGitlab) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{132} + return fileDescriptor_030104ce3b95bcac, []int{137} } func (m *SCMProviderGeneratorGitlab) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3766,7 +3908,7 @@ var xxx_messageInfo_SCMProviderGeneratorGitlab proto.InternalMessageInfo func (m *SecretRef) Reset() { *m = SecretRef{} } func (*SecretRef) ProtoMessage() {} func (*SecretRef) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{133} + return fileDescriptor_030104ce3b95bcac, []int{138} } func (m *SecretRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3794,7 +3936,7 @@ var xxx_messageInfo_SecretRef proto.InternalMessageInfo func (m *SignatureKey) Reset() { *m = SignatureKey{} } func (*SignatureKey) ProtoMessage() {} func (*SignatureKey) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{134} + return fileDescriptor_030104ce3b95bcac, []int{139} } func (m *SignatureKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3822,7 +3964,7 @@ var xxx_messageInfo_SignatureKey proto.InternalMessageInfo func (m *SyncOperation) Reset() { *m = SyncOperation{} } func (*SyncOperation) ProtoMessage() {} func (*SyncOperation) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{135} + return fileDescriptor_030104ce3b95bcac, []int{140} } func (m *SyncOperation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3850,7 +3992,7 @@ var xxx_messageInfo_SyncOperation proto.InternalMessageInfo func (m *SyncOperationResource) Reset() { *m = SyncOperationResource{} } func (*SyncOperationResource) ProtoMessage() {} func (*SyncOperationResource) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{136} + return fileDescriptor_030104ce3b95bcac, []int{141} } func (m *SyncOperationResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3878,7 +4020,7 @@ var xxx_messageInfo_SyncOperationResource proto.InternalMessageInfo func (m *SyncOperationResult) Reset() { *m = SyncOperationResult{} } func (*SyncOperationResult) ProtoMessage() {} func (*SyncOperationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{137} + return fileDescriptor_030104ce3b95bcac, []int{142} } func (m *SyncOperationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3906,7 +4048,7 @@ var xxx_messageInfo_SyncOperationResult proto.InternalMessageInfo func (m *SyncPolicy) Reset() { *m = SyncPolicy{} } func (*SyncPolicy) ProtoMessage() {} func (*SyncPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{138} + return fileDescriptor_030104ce3b95bcac, []int{143} } func (m *SyncPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3934,7 +4076,7 @@ var xxx_messageInfo_SyncPolicy proto.InternalMessageInfo func (m *SyncPolicyAutomated) Reset() { *m = SyncPolicyAutomated{} } func (*SyncPolicyAutomated) ProtoMessage() {} func (*SyncPolicyAutomated) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{139} + return fileDescriptor_030104ce3b95bcac, []int{144} } func (m *SyncPolicyAutomated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3962,7 +4104,7 @@ var xxx_messageInfo_SyncPolicyAutomated proto.InternalMessageInfo func (m *SyncStatus) Reset() { *m = SyncStatus{} } func (*SyncStatus) ProtoMessage() {} func (*SyncStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{140} + return fileDescriptor_030104ce3b95bcac, []int{145} } func (m *SyncStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3990,7 +4132,7 @@ var xxx_messageInfo_SyncStatus proto.InternalMessageInfo func (m *SyncStrategy) Reset() { *m = SyncStrategy{} } func (*SyncStrategy) ProtoMessage() {} func (*SyncStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{141} + return fileDescriptor_030104ce3b95bcac, []int{146} } func (m *SyncStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4018,7 +4160,7 @@ var xxx_messageInfo_SyncStrategy proto.InternalMessageInfo func (m *SyncStrategyApply) Reset() { *m = SyncStrategyApply{} } func (*SyncStrategyApply) ProtoMessage() {} func (*SyncStrategyApply) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{142} + return fileDescriptor_030104ce3b95bcac, []int{147} } func (m *SyncStrategyApply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4046,7 +4188,7 @@ var xxx_messageInfo_SyncStrategyApply proto.InternalMessageInfo func (m *SyncStrategyHook) Reset() { *m = SyncStrategyHook{} } func (*SyncStrategyHook) ProtoMessage() {} func (*SyncStrategyHook) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{143} + return fileDescriptor_030104ce3b95bcac, []int{148} } func (m *SyncStrategyHook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4074,7 +4216,7 @@ var xxx_messageInfo_SyncStrategyHook proto.InternalMessageInfo func (m *SyncWindow) Reset() { *m = SyncWindow{} } func (*SyncWindow) ProtoMessage() {} func (*SyncWindow) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{144} + return fileDescriptor_030104ce3b95bcac, []int{149} } func (m *SyncWindow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4102,7 +4244,7 @@ var xxx_messageInfo_SyncWindow proto.InternalMessageInfo func (m *TLSClientConfig) Reset() { *m = TLSClientConfig{} } func (*TLSClientConfig) ProtoMessage() {} func (*TLSClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{145} + return fileDescriptor_030104ce3b95bcac, []int{150} } func (m *TLSClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4130,7 +4272,7 @@ var xxx_messageInfo_TLSClientConfig proto.InternalMessageInfo func (m *TagFilter) Reset() { *m = TagFilter{} } func (*TagFilter) ProtoMessage() {} func (*TagFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_030104ce3b95bcac, []int{146} + return fileDescriptor_030104ce3b95bcac, []int{151} } func (m *TagFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4174,6 +4316,7 @@ func init() { proto.RegisterType((*ApplicationSetGenerator)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetGenerator") proto.RegisterType((*ApplicationSetList)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetList") proto.RegisterType((*ApplicationSetNestedGenerator)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetNestedGenerator") + proto.RegisterType((*ApplicationSetResourceIgnoreDifferences)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetResourceIgnoreDifferences") proto.RegisterType((*ApplicationSetRolloutStep)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetRolloutStep") proto.RegisterType((*ApplicationSetRolloutStrategy)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetRolloutStrategy") proto.RegisterType((*ApplicationSetSpec)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ApplicationSetSpec") @@ -4241,8 +4384,13 @@ func init() { proto.RegisterType((*JWTTokens)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.JWTTokens") proto.RegisterType((*JsonnetVar)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.JsonnetVar") proto.RegisterType((*KnownTypeField)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KnownTypeField") + proto.RegisterType((*KustomizeGvk)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizeGvk") proto.RegisterType((*KustomizeOptions)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizeOptions") + proto.RegisterType((*KustomizePatch)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizePatch") + proto.RegisterMapType((map[string]bool)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizePatch.OptionsEntry") proto.RegisterType((*KustomizeReplica)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizeReplica") + proto.RegisterType((*KustomizeResId)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizeResId") + proto.RegisterType((*KustomizeSelector)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.KustomizeSelector") proto.RegisterType((*ListGenerator)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ListGenerator") proto.RegisterType((*ManagedNamespaceMetadata)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ManagedNamespaceMetadata") proto.RegisterMapType((map[string]string)(nil), "github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ManagedNamespaceMetadata.AnnotationsEntry") @@ -4329,672 +4477,693 @@ func init() { } var fileDescriptor_030104ce3b95bcac = []byte{ - // 10635 bytes of a gzipped FileDescriptorProto - 0x1f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c5, 0x53, 0x1a, 0x07, 0x85, 0x30, 0xe6, 0x3b, 0x49, 0xca, 0x24, 0xa0, 0x3b, 0xea, - 0x43, 0xe6, 0x8b, 0xb3, 0xf8, 0xf1, 0x85, 0x3c, 0x21, 0xdc, 0x4d, 0xdb, 0xfe, 0x76, 0x05, 0x4e, - 0x64, 0x34, 0xe3, 0x01, 0x17, 0xe9, 0x67, 0xa1, 0x26, 0xd7, 0xcd, 0x7c, 0xd5, 0x0a, 0xb5, 0xb8, - 0x2a, 0x0c, 0xba, 0x68, 0xad, 0xe9, 0x55, 0x35, 0x6f, 0x54, 0x18, 0x0b, 0x2e, 0x36, 0xf1, 0x98, - 0x52, 0x4e, 0xfd, 0x64, 0xc6, 0xf7, 0x48, 0x90, 0x72, 0x31, 0x8b, 0x51, 0xca, 0xab, 0x0b, 0x2b, - 0x26, 0x51, 0xad, 0x94, 0x73, 0x00, 0x9c, 0x67, 0x8f, 0x7e, 0xda, 0x82, 0x13, 0xce, 0x9d, 0x44, - 0x17, 0x8d, 0x14, 0x11, 0x6b, 0x47, 0x5c, 0xa4, 0x32, 0x75, 0x28, 0xb9, 0xcb, 0x37, 0xd3, 0x84, - 0xb3, 0x4c, 0xd1, 0x57, 0x2d, 0x40, 0x64, 0x9b, 0xb8, 0x32, 0xa6, 0x4e, 0xc8, 0x32, 0x54, 0xc4, - 0x4e, 0xf3, 0x52, 0x17, 0x5d, 0xae, 0xd5, 0xbb, 0xdb, 0x71, 0x0f, 0x19, 0xec, 0x7f, 0x54, 0x56, - 0x13, 0x4a, 0x87, 0x71, 0x3a, 0x46, 0x38, 0x99, 0x75, 0xf8, 0x70, 0x32, 0x7d, 0x2c, 0xdf, 0x9d, - 0x86, 0x96, 0x49, 0xbf, 0x29, 0x3d, 0xa0, 0xf4, 0x9b, 0x9f, 0xb2, 0x32, 0xf5, 0x59, 0x46, 0x2e, - 0xbe, 0x5a, 0x6c, 0x08, 0xe9, 0x24, 0x0f, 0x19, 0xc8, 0x69, 0xf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, 0xce, 0x02, 0x44, 0x07, 0x4d, 0x18, 0x90, 0x20, 0xd5, 0x07, 0xda, 0x53, 0x50, 0x77, 0x65, - 0xab, 0x30, 0xac, 0xb4, 0x8a, 0x90, 0x00, 0xac, 0x71, 0x06, 0xd8, 0x21, 0x3f, 0x25, 0xf5, 0x77, - 0x39, 0x1b, 0x9c, 0xca, 0xb4, 0xbe, 0x50, 0xe7, 0xf6, 0x6f, 0x97, 0xe0, 0x11, 0xbe, 0x24, 0x2f, - 0x3a, 0x81, 0xd3, 0x22, 0x6d, 0x2a, 0xd5, 0xa0, 0x21, 0x0a, 0x2e, 0xdd, 0x9a, 0x79, 0x32, 0xd8, - 0xf4, 0xa8, 0x73, 0x97, 0xcf, 0x39, 0x3e, 0xcb, 0xe6, 0x03, 0x2f, 0xc5, 0x8c, 0x38, 0x4a, 0xa0, - 0x26, 0x4b, 0x72, 0x0b, 0x5d, 0x5c, 0x10, 0x23, 0xa5, 0x96, 0xc4, 0xba, 0x49, 0xb0, 0x62, 0x44, - 0x0d, 0x57, 0x3f, 0x74, 0x37, 0x31, 0x89, 0x42, 0xa6, 0x77, 0x8d, 0x58, 0xbf, 0x05, 0xd1, 0x8e, - 0x15, 0x86, 0xfd, 0xdb, 0x16, 0xe4, 0x57, 0x24, 0xa3, 0x5c, 0x95, 0x75, 0xcf, 0x72, 0x55, 0x07, - 0xa8, 0x17, 0xf5, 0xe3, 0x30, 0xe2, 0xa4, 0xd4, 0x88, 0xe0, 0xdb, 0xee, 0xf2, 0xe1, 0x8e, 0x35, - 0x16, 0xc3, 0xa6, 0xb7, 0xee, 0xb1, 0xed, 0xb6, 0x49, 0xce, 0xfe, 0xaf, 0x15, 0x18, 0xeb, 0x4a, - 0x89, 0x40, 0x2f, 0xc1, 0xa8, 0x2b, 0x86, 0x47, 0x24, 0x1d, 0x5a, 0x75, 0x33, 0x36, 0x4c, 0xc3, - 0x70, 0x06, 0x73, 0x80, 0x01, 0x3a, 0x0f, 0x67, 0x62, 0x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, 0x1b, 0xdf, 0xfe, 0xbc, 0x05, 0x27, - 0x32, 0x69, 0x66, 0x05, 0x19, 0x4b, 0x6c, 0xa6, 0x85, 0x2c, 0x4a, 0x90, 0x85, 0x4a, 0x97, 0xd9, - 0x62, 0xaa, 0x67, 0x9a, 0x06, 0x61, 0x13, 0xcf, 0xfe, 0x72, 0x09, 0x6a, 0x32, 0xd2, 0x62, 0x00, - 0x51, 0x3e, 0x6b, 0xc1, 0x09, 0x75, 0xf6, 0xc1, 0x9c, 0x6a, 0xa5, 0x22, 0x72, 0x02, 0xa8, 0x04, - 0x6a, 0x5b, 0x1e, 0xac, 0x87, 0xda, 0x72, 0xc7, 0x26, 0x33, 0x9c, 0xe5, 0x8d, 0x6e, 0x02, 0x24, - 0x3b, 0x49, 0x4a, 0xda, 0x86, 0x7b, 0xcf, 0x36, 0x66, 0xdc, 0xa4, 0x1b, 0xc6, 0x84, 0xce, 0xaf, - 0xeb, 0x61, 0x93, 0xac, 0x28, 0x4c, 0x6d, 0x42, 0xe9, 0x36, 0x6c, 0x50, 0xb2, 0xff, 0x4e, 0x09, - 0x4e, 0xe7, 0x45, 0x42, 0x1f, 0x86, 0x51, 0xc9, 0xdd, 0xb8, 0x2d, 0x4a, 0x86, 0x97, 0x8c, 0x62, - 0x03, 0x76, 0x77, 0x77, 0x62, 0xa2, 0xfb, 0xb6, 0xae, 0x49, 0x13, 0x05, 0x67, 0x88, 0xf1, 0x03, - 0x28, 0x71, 0x52, 0xda, 0xd8, 0x99, 0x8e, 0x22, 0x71, 0x8a, 0x64, 0x1c, 0x40, 0x99, 0x50, 0x9c, - 0xc3, 0x46, 0xcb, 0x70, 0xd6, 0x68, 0xb9, 0x4e, 0xbc, 0xd6, 0xc6, 0x5a, 0x18, 0xcb, 0x1d, 0xd8, - 0xe3, 0x3a, 0x00, 0xac, 0x1b, 0x07, 0xf7, 0x7c, 0x92, 0xae, 0xf6, 0xae, 0x13, 0x39, 0xae, 0x97, - 0xee, 0x08, 0x7f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6, 0x67, 0x8e, 0x62, 0x4a, 0x07, 0xaa, 0x20, - 0x50, 0xde, 0xb7, 0x82, 0xc0, 0xcb, 0x70, 0x22, 0x49, 0x36, 0x96, 0x63, 0x6f, 0xcb, 0x49, 0xc9, - 0x35, 0xb2, 0x23, 0xac, 0x2c, 0x9d, 0xf5, 0xbb, 0x72, 0x45, 0x03, 0x71, 0x16, 0x17, 0xcd, 0xc1, - 0x98, 0xce, 0xe3, 0x27, 0x71, 0xca, 0x62, 0x7a, 0xf9, 0x48, 0x50, 0x29, 0x7e, 0x3a, 0xf3, 0x5f, - 0x20, 0xe0, 0xee, 0x67, 0xa8, 0x7e, 0xcb, 0x34, 0x52, 0x41, 0x86, 0xb2, 0xfa, 0x2d, 0x43, 0x87, - 0xca, 0xd2, 0xf5, 0x04, 0x5a, 0x84, 0x33, 0x7c, 0x60, 0x4c, 0x47, 0x91, 0xf1, 0x46, 0xc3, 0xd9, - 0x2a, 0x67, 0x73, 0xdd, 0x28, 0xb8, 0xd7, 0x73, 0xe8, 0x45, 0x18, 0x51, 0xcd, 0xf3, 0xb3, 0xe2, - 0x14, 0x41, 0x79, 0x31, 0x14, 0x99, 0xf9, 0x26, 0x36, 0xf1, 0xd0, 0x87, 0xe0, 0x51, 0xfd, 0x97, - 0x27, 0x7e, 0xf0, 0xa3, 0xb5, 0x59, 0x51, 0x22, 0x45, 0xd5, 0xd3, 0x9f, 0xeb, 0x89, 0xd6, 0xc4, - 0xfd, 0x9e, 0x47, 0x6b, 0x70, 0x5e, 0x81, 0x2e, 0x05, 0x29, 0x8b, 0xe2, 0x4e, 0x48, 0xc3, 0x49, - 0xc8, 0x8d, 0xd8, 0x67, 0x45, 0x55, 0xea, 0xfa, 0xaa, 0xb3, 0x39, 0x2f, 0xbd, 0xd2, 0x0b, 0x13, - 0x2f, 0xe0, 0x7b, 0x50, 0x41, 0x53, 0x50, 0x27, 0x81, 0xb3, 0xe6, 0x93, 0xa5, 0x99, 0x79, 0x56, - 0x6a, 0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0x95, 0xf4, - 0x78, 0x25, 0x10, 0xf5, 0x97, 0x1d, 0x00, 0xc8, 0xdf, 0x2c, 0x96, 0x31, 0xf4, 0xbb, 0xaa, 0x1e, - 0xe2, 0xd0, 0x27, 0x98, 0x41, 0xe8, 0xf2, 0x1f, 0x93, 0x96, 0xbe, 0x93, 0x55, 0x7d, 0x3e, 0xcc, - 0x5a, 0xb1, 0x80, 0xa2, 0x17, 0x61, 0xc4, 0xf1, 0x7d, 0x9e, 0x95, 0x42, 0x12, 0x71, 0xc7, 0x85, - 0xae, 0xdc, 0xa6, 0x41, 0xd8, 0xc4, 0xb3, 0xff, 0xb8, 0x04, 0x13, 0xfb, 0xe8, 0x94, 0xae, 0x3c, - 0xbb, 0xea, 0xc0, 0x79, 0x76, 0x22, 0x33, 0x60, 0xa8, 0x4f, 0x66, 0xc0, 0x8b, 0x30, 0x92, 0x12, - 0xa7, 0x2d, 0xc2, 0xa0, 0xc4, 0xfe, 0x5b, 0x9f, 0xbb, 0x6a, 0x10, 0x36, 0xf1, 0xa8, 0x16, 0x3b, - 0xe9, 0xb8, 0x2e, 0x49, 0x12, 0x19, 0xfa, 0x2f, 0x7c, 0x98, 0x85, 0xe5, 0x15, 0x30, 0xd7, 0xf0, - 0x74, 0x86, 0x05, 0xce, 0xb1, 0xcc, 0x77, 0x78, 0x7d, 0xc0, 0x0e, 0xff, 0x46, 0x09, 0x9e, 0xb8, - 0xe7, 0xea, 0x36, 0x70, 0x56, 0x46, 0x27, 0x21, 0x71, 0x7e, 0xe0, 0xdc, 0x48, 0x48, 0x8c, 0x19, - 0x84, 0xf7, 0x52, 0x14, 0x19, 0x77, 0xde, 0x16, 0x9d, 0x32, 0xc4, 0x7b, 0x29, 0xc3, 0x02, 0xe7, - 0x58, 0x1e, 0x76, 0x58, 0xfe, 0xed, 0x12, 0x3c, 0x35, 0x80, 0x0d, 0x50, 0x60, 0x6a, 0x55, 0x36, - 0xc1, 0xad, 0xfc, 0x80, 0xf2, 0x10, 0x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, 0x47, 0xa0, 0xae, 0x24, - 0xe1, 0x61, 0xcd, 0xea, 0xf3, 0x77, 0x85, 0x35, 0xab, 0x6f, 0x6f, 0x60, 0xd1, 0x7e, 0xa3, 0xc6, - 0x69, 0x6e, 0x1c, 0x5f, 0x23, 0x3b, 0xcc, 0x52, 0xb5, 0xdf, 0x0b, 0xa3, 0xca, 0xe3, 0x31, 0xe8, - 0xf5, 0x19, 0xf6, 0x97, 0x87, 0xe0, 0x44, 0xa6, 0x38, 0x5e, 0xc6, 0xc1, 0x68, 0xed, 0xeb, 0x60, - 0x64, 0x61, 0xea, 0x9d, 0x40, 0xde, 0xad, 0x63, 0x84, 0xa9, 0x77, 0x02, 0x82, 0x39, 0x8c, 0x1a, - 0x9a, 0xcd, 0x78, 0x07, 0x77, 0x02, 0x11, 0x4e, 0xaa, 0x0c, 0xcd, 0x59, 0xd6, 0x8a, 0x05, 0x14, - 0x7d, 0xd2, 0x82, 0xd1, 0x84, 0x79, 0xaf, 0xb9, 0x7b, 0x56, 0x7c, 0xfe, 0xab, 0x47, 0xaf, 0xfd, - 0xa7, 0x0a, 0x41, 0xb2, 0x08, 0x11, 0xb3, 0x05, 0x67, 0x38, 0xa2, 0x9f, 0xb6, 0xa0, 0xae, 0xae, - 0x00, 0x10, 0x17, 0x65, 0xad, 0x14, 0x5b, 0x7b, 0x90, 0xfb, 0xf5, 0xd4, 0x41, 0x80, 0xbe, 0xfb, - 0x5b, 0x33, 0x46, 0x89, 0xf2, 0x9d, 0x0e, 0x1f, 0x8f, 0xef, 0x14, 0x7a, 0xf8, 0x4d, 0xdf, 0x03, - 0xf5, 0xb6, 0x13, 0x78, 0xeb, 0x24, 0x49, 0xb9, 0x3b, 0x53, 0x96, 0x44, 0x95, 0x8d, 0x58, 0xc3, - 0xe9, 0xd2, 0x98, 0xb0, 0x17, 0x4b, 0x0d, 0xff, 0x23, 0x5b, 0x1a, 0x57, 0x74, 0x33, 0x36, 0x71, - 0x4c, 0x67, 0x29, 0x3c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xe3, 0x0f, 0xbe, 0xfb, 0xe4, 0x3b, 0x3e, 0xb9, 0xf7, 0xa4, 0xf5, 0xcd, 0xbd, - 0x27, 0xad, 0xdf, 0xdd, 0x7b, 0xd2, 0xfa, 0x83, 0xbd, 0x27, 0xad, 0xef, 0xec, 0x3d, 0x69, 0x7d, - 0xe9, 0xdf, 0x3f, 0xf9, 0x8e, 0x57, 0x7b, 0x06, 0xea, 0xd1, 0x1f, 0xcf, 0xb9, 0xcd, 0xa9, 0xad, - 0x8b, 0x2c, 0x56, 0x8c, 0x4e, 0xaf, 0x29, 0x63, 0x4c, 0x4d, 0xc9, 0xe9, 0xf5, 0xff, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x36, 0x27, 0x29, 0x3c, 0xac, 0xd9, 0x00, 0x00, + // 10965 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x1c, 0xc9, + 0x75, 0x98, 0x66, 0x3f, 0x80, 0xdd, 0x07, 0x10, 0x24, 0x9b, 0xe4, 0x1d, 0x48, 0xdd, 0x1d, 0xe8, + 0x39, 0xfb, 0x74, 0x8e, 0xee, 0x00, 0x1f, 0x7d, 0xa7, 0x5c, 0x74, 0xb6, 0x64, 0x7c, 0x90, 0x20, + 0x48, 0x80, 0xc0, 0x35, 0x40, 0x52, 0x3a, 0xf9, 0x74, 0x1a, 0xec, 0x36, 0x16, 0x43, 0xcc, 0xce, + 0xcc, 0xcd, 0xcc, 0x82, 0xc0, 0x59, 0x92, 0x25, 0x4b, 0xb6, 0x95, 0xe8, 0xe3, 0x14, 0x29, 0x29, + 0x9f, 0x93, 0xc8, 0x91, 0x2d, 0x27, 0x15, 0x57, 0xa2, 0x8a, 0x93, 0xfc, 0x88, 0x13, 0x27, 0xe5, + 0xb2, 0x9d, 0x4a, 0x29, 0xa5, 0xa4, 0xec, 0x4a, 0xb9, 0x2c, 0x27, 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0xad, 0x21, 0xad, + 0xed, 0x52, 0x11, 0x7e, 0x29, 0x61, 0x6b, 0x6b, 0x8e, 0xc3, 0x54, 0x5e, 0x2b, 0x13, 0x5d, 0x71, + 0x43, 0x04, 0xca, 0x2d, 0x37, 0x11, 0x9f, 0xf5, 0x88, 0xfb, 0xa9, 0x59, 0xd7, 0x78, 0xc5, 0x41, + 0xaa, 0x44, 0x66, 0xdd, 0x04, 0x53, 0xfa, 0xe8, 0xa7, 0x2d, 0x18, 0x8a, 0x1b, 0xed, 0xa5, 0x28, + 0xd8, 0x74, 0x9b, 0x24, 0x12, 0xd6, 0xd4, 0x11, 0x45, 0xd3, 0xf2, 0xf4, 0x82, 0x24, 0xa8, 0xf9, + 0xf2, 0xfd, 0xad, 0x86, 0x60, 0x93, 0x2f, 0xdd, 0x65, 0x3c, 0x2a, 0xde, 0x7d, 0x86, 0x34, 0x5c, + 0xaa, 0xff, 0xe4, 0xa6, 0x8a, 0xcd, 0x94, 0x23, 0x5b, 0x97, 0x33, 0x9d, 0xc6, 0x06, 0x5d, 0x6f, + 0xba, 0x43, 0xef, 0xdc, 0xdd, 0x19, 0x7b, 0x74, 0x3a, 0x9f, 0x27, 0xee, 0xd5, 0x19, 0x36, 0x60, + 0x61, 0xc7, 0xf3, 0x30, 0x79, 0xbd, 0x43, 0x98, 0xcb, 0xa4, 0x80, 0x01, 0x5b, 0xd2, 0x04, 0x33, + 0x03, 0x66, 0x40, 0xb0, 0xc9, 0x17, 0xbd, 0x0e, 0x03, 0x6d, 0x27, 0x89, 0xdc, 0x2d, 0xe1, 0x27, + 0x39, 0xa2, 0xbd, 0xbf, 0xc0, 0x68, 0x69, 0xe6, 0x4c, 0x53, 0xf3, 0x46, 0x2c, 0x18, 0xa1, 0x36, + 0x54, 0xdb, 0x24, 0x6a, 0x91, 0xd1, 0x5a, 0x11, 0x3e, 0xe1, 0x05, 0x4a, 0x4a, 0x33, 0xac, 0x53, + 0xeb, 0x88, 0xb5, 0x61, 0xce, 0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, 0x66, 0x1c, 0xae, 0x94, 0xef, 0xf3, 0xe1, 0x4a, 0x8f, 0xf3, 0xb2, 0xca, 0x43, 0x74, + 0x5e, 0x66, 0x7f, 0xce, 0x02, 0x44, 0x27, 0x4d, 0xe0, 0x13, 0x3f, 0xd1, 0x07, 0xda, 0x13, 0x50, + 0x6f, 0xc8, 0x56, 0x61, 0x58, 0x69, 0x11, 0x21, 0x01, 0x58, 0xe3, 0xf4, 0xb1, 0x43, 0x7e, 0x52, + 0xca, 0xef, 0x72, 0x3a, 0x2a, 0x96, 0x49, 0x7d, 0x21, 0xce, 0xed, 0xdf, 0x2a, 0xc1, 0x23, 0x5c, + 0x25, 0x2f, 0x38, 0xbe, 0xd3, 0x22, 0x6d, 0xda, 0xab, 0x7e, 0x43, 0x14, 0x1a, 0x74, 0x6b, 0xe6, + 0xca, 0x28, 0xd7, 0xa3, 0xae, 0x5d, 0xbe, 0xe6, 0xf8, 0x2a, 0x9b, 0xf3, 0xdd, 0x04, 0x33, 0xe2, + 0x28, 0x86, 0x9a, 0x2c, 0xe5, 0x2e, 0x64, 0x71, 0x41, 0x8c, 0x94, 0x58, 0x12, 0x7a, 0x93, 0x60, + 0xc5, 0x88, 0x1a, 0xae, 0x5e, 0xd0, 0xd8, 0xc0, 0x24, 0x0c, 0x98, 0xdc, 0x35, 0x82, 0x0c, 0xe7, + 0x45, 0x3b, 0x56, 0x18, 0xf6, 0x6f, 0x59, 0x90, 0xd5, 0x48, 0x46, 0x09, 0x33, 0x6b, 0xcf, 0x12, + 0x66, 0x07, 0xa8, 0x21, 0xf6, 0xe3, 0x30, 0xe4, 0x24, 0xd4, 0x88, 0xe0, 0xdb, 0xee, 0xf2, 0xe1, + 0x8e, 0x35, 0x16, 0x82, 0xa6, 0xbb, 0xe6, 0xb2, 0xed, 0xb6, 0x49, 0xce, 0xfe, 0x9f, 0x15, 0x38, + 0xdd, 0x95, 0x8b, 0x81, 0x5e, 0x84, 0xe1, 0x86, 0x98, 0x1e, 0x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0x39, + 0x23, 0x3b, 0x06, 0xd4, 0x3d, 0x16, 0x07, 0x0c, 0x60, 0x9d, 0x80, 0xba, 0xd3, 0x49, 0x82, 0x36, + 0x1d, 0x26, 0x71, 0xd4, 0xa4, 0x43, 0x74, 0x25, 0x00, 0x6b, 0x1c, 0xfb, 0xcd, 0x2a, 0x64, 0x92, + 0x13, 0xd1, 0x96, 0x79, 0xf1, 0xa5, 0x55, 0xec, 0xc5, 0x97, 0xaa, 0x33, 0x79, 0x97, 0x5f, 0xa2, + 0x16, 0x54, 0xc3, 0x75, 0x27, 0x96, 0x66, 0xf5, 0xcb, 0x6a, 0x1f, 0x47, 0x1b, 0xef, 0xed, 0x8c, + 0xfd, 0x58, 0x7f, 0x5e, 0x57, 0x3a, 0x57, 0x27, 0x78, 0x91, 0x11, 0xcd, 0x9a, 0xd1, 0xc0, 0x9c, + 0xfe, 0x41, 0xae, 0x76, 0xfb, 0xa4, 0xa8, 0xe2, 0x8e, 0x49, 0xdc, 0xf1, 0x12, 0x31, 0x1b, 0x5e, + 0x2e, 0x70, 0x95, 0x71, 0xc2, 0x3a, 0xad, 0x9e, 0xff, 0xc7, 0x06, 0x53, 0xf4, 0x21, 0xa8, 0xc7, + 0x89, 0x13, 0x25, 0x87, 0x4c, 0x84, 0x55, 0x83, 0xbe, 0x2c, 0x89, 0x60, 0x4d, 0x0f, 0xbd, 0xc2, + 0x6a, 0xba, 0xba, 0xf1, 0xfa, 0x21, 0x73, 0x23, 0x64, 0xfd, 0x57, 0x41, 0x01, 0x1b, 0xd4, 0xd0, + 0x25, 0x00, 0x36, 0xb7, 0x79, 0x40, 0x60, 0x8d, 0x79, 0x99, 0x94, 0x28, 0xc4, 0x0a, 0x82, 0x0d, + 0x2c, 0xfb, 0x87, 0x20, 0x5d, 0x17, 0x02, 0x8d, 0xc9, 0x32, 0x14, 0xdc, 0x0b, 0xcd, 0x72, 0x1c, + 0x52, 0x15, 0x23, 0x7e, 0xcd, 0x02, 0xb3, 0x78, 0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x0e, 0x0b, 0x81, 0x52, 0x18, 0xf6, 0xff, 0xb2, 0xe0, 0x7c, 0xee, + 0x50, 0xdc, 0x07, 0xe5, 0xbb, 0x95, 0x56, 0xbe, 0xcb, 0x45, 0x6d, 0x37, 0x8c, 0xb7, 0xe8, 0xa1, + 0x88, 0xff, 0x83, 0x05, 0x23, 0x1a, 0xff, 0x3e, 0xbc, 0xaa, 0x9b, 0x7e, 0xd5, 0xe2, 0x76, 0x56, + 0xf5, 0xae, 0x77, 0xfb, 0xed, 0x12, 0xa8, 0x42, 0x8f, 0x93, 0x0d, 0x59, 0x46, 0x77, 0x9f, 0x93, + 0xc4, 0x6d, 0x18, 0x60, 0x07, 0xa1, 0x71, 0x31, 0x41, 0x1e, 0x69, 0xfe, 0xec, 0x50, 0x55, 0x1f, + 0x32, 0xb3, 0xbf, 0x31, 0x16, 0x0c, 0x59, 0x31, 0x68, 0x37, 0xa6, 0xd2, 0xbc, 0x29, 0xd2, 0xb2, + 0x74, 0x31, 0x68, 0xd1, 0x8e, 0x15, 0x06, 0x55, 0x0f, 0x6e, 0x23, 0xf0, 0xa7, 0x3d, 0x27, 0x96, + 0x77, 0x1e, 0x2a, 0xf5, 0x30, 0x27, 0x01, 0x58, 0xe3, 0xb0, 0x33, 0x52, 0x37, 0x0e, 0x3d, 0x67, + 0xdb, 0xd8, 0x3f, 0x1b, 0xf5, 0x09, 0x14, 0x08, 0x9b, 0x78, 0x76, 0x1b, 0x46, 0xd3, 0x2f, 0x31, + 0x43, 0xd6, 0x58, 0x80, 0x62, 0x5f, 0xc3, 0x39, 0x01, 0x75, 0x87, 0x3d, 0x35, 0xdf, 0x71, 0xb2, + 0x57, 0x95, 0x4f, 0x4a, 0x00, 0xd6, 0x38, 0xf6, 0xaf, 0x58, 0x70, 0x26, 0x67, 0xd0, 0x0a, 0x4c, + 0x7b, 0x4b, 0xb4, 0xb4, 0xc9, 0x53, 0xec, 0x3f, 0x08, 0x83, 0x4d, 0xb2, 0xe6, 0xc8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 0x86, 0x3a, 0xfd, 0xcd, 0xd2, 0xf3, 0xc4, 0xe6, 0xee, + 0xa6, 0x92, 0x99, 0x12, 0x50, 0x48, 0xee, 0x9f, 0xe6, 0x83, 0x7c, 0xa8, 0xb3, 0x5b, 0x6b, 0x19, + 0x53, 0xbe, 0x07, 0x5c, 0x52, 0x49, 0x72, 0x12, 0x70, 0x6f, 0x67, 0xec, 0xa5, 0x83, 0x33, 0x55, + 0x8f, 0x63, 0xcd, 0xc2, 0xfe, 0x52, 0x45, 0xcf, 0x5d, 0x51, 0x63, 0xee, 0x7b, 0x62, 0xee, 0xbe, + 0x98, 0x99, 0xbb, 0x17, 0xbb, 0xe6, 0xee, 0x88, 0xbe, 0x5d, 0x35, 0x35, 0x1b, 0xef, 0xb7, 0x21, + 0xb0, 0xbf, 0xbf, 0x81, 0x59, 0x40, 0xaf, 0x77, 0xdc, 0x88, 0xc4, 0x4b, 0x51, 0xc7, 0x77, 0xfd, + 0x16, 0x9b, 0x8e, 0x35, 0xd3, 0x02, 0x4a, 0x81, 0x71, 0x16, 0x9f, 0x6e, 0xea, 0xe9, 0x37, 0xbf, + 0xed, 0x6c, 0xf2, 0x59, 0x65, 0x94, 0xdd, 0x5a, 0x16, 0xed, 0x58, 0x61, 0xd8, 0x5f, 0x67, 0x67, + 0xd9, 0x46, 0x5e, 0x30, 0x9d, 0x13, 0x1e, 0xbb, 0x26, 0x98, 0xd7, 0xec, 0x52, 0x73, 0x82, 0xdf, + 0x0d, 0xcc, 0x61, 0xe8, 0x2e, 0x0c, 0xae, 0xf2, 0x7b, 0xf2, 0x8a, 0xa9, 0x63, 0x2e, 0x2e, 0xdd, + 0x63, 0xb7, 0xa1, 0xc8, 0x1b, 0xf8, 0xee, 0xe9, 0x9f, 0x58, 0x72, 0xb3, 0xbf, 0x51, 0x81, 0x93, + 0x99, 0x8b, 0x64, 0x53, 0xd5, 0x52, 0x4b, 0xfb, 0x56, 0x4b, 0xfd, 0x30, 0x40, 0x93, 0x84, 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9e, 0x91, 0xab, 0x94, 0x4e, 0x1c, 0x29, 0x17, 0x91, 0x38, 0x92, + 0xd7, 0x83, 0x7e, 0x12, 0x47, 0x8e, 0x2d, 0x79, 0x69, 0xcf, 0x0e, 0x1d, 0x28, 0x79, 0x49, 0x65, + 0x76, 0x15, 0x12, 0xd2, 0xdf, 0xe3, 0x53, 0xe5, 0x66, 0x76, 0xa9, 0xac, 0x1a, 0x9e, 0xae, 0x22, + 0x04, 0xec, 0xab, 0xc5, 0x77, 0xa0, 0x8f, 0xac, 0x1a, 0x91, 0x31, 0x63, 0x66, 0x72, 0x0d, 0x16, + 0x91, 0xc9, 0x95, 0xd7, 0x9d, 0x7d, 0x33, 0xb9, 0x5e, 0x82, 0x13, 0x0d, 0x2f, 0xf0, 0xc9, 0x52, + 0x14, 0x24, 0x41, 0x23, 0xf0, 0x84, 0x31, 0xad, 0x44, 0xc2, 0xb4, 0x09, 0xc4, 0x69, 0xdc, 0x5e, + 0x69, 0x60, 0xf5, 0xa3, 0xa6, 0x81, 0xc1, 0x03, 0x4a, 0x03, 0xfb, 0x19, 0x9d, 0xb0, 0x3c, 0xc4, + 0xbe, 0xc8, 0x87, 0x8b, 0xff, 0x22, 0xfd, 0x64, 0x2d, 0xa3, 0xb7, 0xf8, 0x65, 0x77, 0xd4, 0x1c, + 0x9d, 0x0e, 0xda, 0xd4, 0xdc, 0x1a, 0x66, 0x43, 0xf2, 0xda, 0x31, 0x4c, 0xd8, 0xdb, 0xcb, 0x9a, + 0x8d, 0xba, 0x00, 0x4f, 0x37, 0xe1, 0x74, 0x47, 0x8e, 0x92, 0x50, 0xfd, 0x95, 0x12, 0x7c, 0xdf, + 0xbe, 0x5d, 0x40, 0x77, 0x01, 0x12, 0xa7, 0x25, 0x26, 0xaa, 0x38, 0xa6, 0x38, 0x62, 0x50, 0xe3, + 0x8a, 0xa4, 0xc7, 0x2b, 0x81, 0xa8, 0xbf, 0xec, 0x00, 0x40, 0xfe, 0x66, 0xb1, 0x8c,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, + 0x49, 0x40, 0xec, 0x45, 0xa8, 0xab, 0xd3, 0x0f, 0xb9, 0x51, 0xb5, 0xf2, 0x37, 0xaa, 0x7d, 0xa5, + 0xe5, 0x4d, 0xad, 0x7e, 0xe3, 0x3b, 0x4f, 0xbc, 0xe3, 0x77, 0xbf, 0xf3, 0xc4, 0x3b, 0xfe, 0xe0, + 0x3b, 0x4f, 0xbc, 0xe3, 0x13, 0xbb, 0x4f, 0x58, 0xdf, 0xd8, 0x7d, 0xc2, 0xfa, 0xdd, 0xdd, 0x27, + 0xac, 0x3f, 0xd8, 0x7d, 0xc2, 0xfa, 0xf6, 0xee, 0x13, 0xd6, 0x17, 0xff, 0xcb, 0x13, 0xef, 0x78, + 0x25, 0x37, 0x3c, 0x90, 0xfe, 0x78, 0xb6, 0xd1, 0x9c, 0xd8, 0xbc, 0xc4, 0x22, 0xd4, 0xe8, 0xf2, + 0x9a, 0x30, 0xe6, 0xd4, 0x84, 0x5c, 0x5e, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x13, 0x68, 0x38, + 0x58, 0x64, 0xe0, 0x00, 0x00, } func (m *AWSAuthConfig) Marshal() (dAtA []byte, err error) { @@ -5617,6 +5786,15 @@ func (m *ApplicationPreservedFields) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if len(m.Labels) > 0 { + for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Labels[iNdEx]) + copy(dAtA[i:], m.Labels[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Labels[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } if len(m.Annotations) > 0 { for iNdEx := len(m.Annotations) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Annotations[iNdEx]) @@ -6125,6 +6303,52 @@ func (m *ApplicationSetNestedGenerator) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *ApplicationSetResourceIgnoreDifferences) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationSetResourceIgnoreDifferences) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ApplicationSetResourceIgnoreDifferences) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.JQPathExpressions) > 0 { + for iNdEx := len(m.JQPathExpressions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.JQPathExpressions[iNdEx]) + copy(dAtA[i:], m.JQPathExpressions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JQPathExpressions[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.JSONPointers) > 0 { + for iNdEx := len(m.JSONPointers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.JSONPointers[iNdEx]) + copy(dAtA[i:], m.JSONPointers[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPointers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ApplicationSetRolloutStep) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6231,6 +6455,20 @@ func (m *ApplicationSetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.IgnoreApplicationDifferences) > 0 { + for iNdEx := len(m.IgnoreApplicationDifferences) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IgnoreApplicationDifferences[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } i-- if m.ApplyNestedSelectors { dAtA[i] = 1 @@ -7038,6 +7276,20 @@ func (m *ApplicationSourceKustomize) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if len(m.Patches) > 0 { + for iNdEx := len(m.Patches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Patches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if len(m.Replicas) > 0 { for iNdEx := len(m.Replicas) - 1; iNdEx >= 0; iNdEx-- { { @@ -9446,6 +9698,44 @@ func (m *KnownTypeField) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *KustomizeGvk) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KustomizeGvk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KustomizeGvk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x1a + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *KustomizeOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -9479,6 +9769,78 @@ func (m *KustomizeOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *KustomizePatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KustomizePatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KustomizePatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Options) > 0 { + keysForOptions := make([]string, 0, len(m.Options)) + for k := range m.Options { + keysForOptions = append(keysForOptions, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + for iNdEx := len(keysForOptions) - 1; iNdEx >= 0; iNdEx-- { + v := m.Options[string(keysForOptions[iNdEx])] + baseI := i + i-- + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + i -= len(keysForOptions[iNdEx]) + copy(dAtA[i:], keysForOptions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForOptions[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 + } + } + if m.Target != nil { + { + size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.Patch) + copy(dAtA[i:], m.Patch) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Patch))) + i-- + dAtA[i] = 0x12 + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *KustomizeReplica) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -9517,6 +9879,92 @@ func (m *KustomizeReplica) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *KustomizeResId) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KustomizeResId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KustomizeResId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + { + size, err := m.KustomizeGvk.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *KustomizeSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KustomizeSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KustomizeSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.LabelSelector) + copy(dAtA[i:], m.LabelSelector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector))) + i-- + dAtA[i] = 0x1a + i -= len(m.AnnotationSelector) + copy(dAtA[i:], m.AnnotationSelector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AnnotationSelector))) + i-- + dAtA[i] = 0x12 + { + size, err := m.KustomizeResId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ListGenerator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -13089,6 +13537,21 @@ func (m *SCMProviderGeneratorGitlab) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + i -= len(m.Topic) + copy(dAtA[i:], m.Topic) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Topic))) + i-- + dAtA[i] = 0x42 + if m.IncludeSharedProjects != nil { + i-- + if *m.IncludeSharedProjects { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } i-- if m.Insecure { dAtA[i] = 1 @@ -14147,6 +14610,12 @@ func (m *ApplicationPreservedFields) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if len(m.Labels) > 0 { + for _, s := range m.Labels { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -14322,6 +14791,29 @@ func (m *ApplicationSetNestedGenerator) Size() (n int) { return n } +func (m *ApplicationSetResourceIgnoreDifferences) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.JSONPointers) > 0 { + for _, s := range m.JSONPointers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.JQPathExpressions) > 0 { + for _, s := range m.JQPathExpressions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *ApplicationSetRolloutStep) Size() (n int) { if m == nil { return 0 @@ -14390,6 +14882,12 @@ func (m *ApplicationSetSpec) Size() (n int) { } } n += 2 + if len(m.IgnoreApplicationDifferences) > 0 { + for _, e := range m.IgnoreApplicationDifferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -14695,6 +15193,12 @@ func (m *ApplicationSourceKustomize) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if len(m.Patches) > 0 { + for _, e := range m.Patches { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -15565,6 +16069,21 @@ func (m *KnownTypeField) Size() (n int) { return n } +func (m *KustomizeGvk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *KustomizeOptions) Size() (n int) { if m == nil { return 0 @@ -15578,6 +16097,31 @@ func (m *KustomizeOptions) Size() (n int) { return n } +func (m *KustomizePatch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Patch) + n += 1 + l + sovGenerated(uint64(l)) + if m.Target != nil { + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Options) > 0 { + for k, v := range m.Options { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + 1 + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + func (m *KustomizeReplica) Size() (n int) { if m == nil { return 0 @@ -15591,6 +16135,36 @@ func (m *KustomizeReplica) Size() (n int) { return n } +func (m *KustomizeResId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.KustomizeGvk.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *KustomizeSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.KustomizeResId.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.AnnotationSelector) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.LabelSelector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ListGenerator) Size() (n int) { if m == nil { return 0 @@ -16935,6 +17509,11 @@ func (m *SCMProviderGeneratorGitlab) Size() (n int) { } n += 2 n += 2 + if m.IncludeSharedProjects != nil { + n += 2 + } + l = len(m.Topic) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -17434,6 +18013,7 @@ func (this *ApplicationPreservedFields) String() string { } s := strings.Join([]string{`&ApplicationPreservedFields{`, `Annotations:` + fmt.Sprintf("%v", this.Annotations) + `,`, + `Labels:` + fmt.Sprintf("%v", this.Labels) + `,`, `}`, }, "") return s @@ -17532,6 +18112,18 @@ func (this *ApplicationSetNestedGenerator) String() string { }, "") return s } +func (this *ApplicationSetResourceIgnoreDifferences) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ApplicationSetResourceIgnoreDifferences{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `JSONPointers:` + fmt.Sprintf("%v", this.JSONPointers) + `,`, + `JQPathExpressions:` + fmt.Sprintf("%v", this.JQPathExpressions) + `,`, + `}`, + }, "") + return s +} func (this *ApplicationSetRolloutStep) String() string { if this == nil { return "nil" @@ -17572,6 +18164,11 @@ func (this *ApplicationSetSpec) String() string { repeatedStringForGenerators += strings.Replace(strings.Replace(f.String(), "ApplicationSetGenerator", "ApplicationSetGenerator", 1), `&`, ``, 1) + "," } repeatedStringForGenerators += "}" + repeatedStringForIgnoreApplicationDifferences := "[]ApplicationSetResourceIgnoreDifferences{" + for _, f := range this.IgnoreApplicationDifferences { + repeatedStringForIgnoreApplicationDifferences += strings.Replace(strings.Replace(f.String(), "ApplicationSetResourceIgnoreDifferences", "ApplicationSetResourceIgnoreDifferences", 1), `&`, ``, 1) + "," + } + repeatedStringForIgnoreApplicationDifferences += "}" s := strings.Join([]string{`&ApplicationSetSpec{`, `GoTemplate:` + fmt.Sprintf("%v", this.GoTemplate) + `,`, `Generators:` + repeatedStringForGenerators + `,`, @@ -17581,6 +18178,7 @@ func (this *ApplicationSetSpec) String() string { `PreservedFields:` + strings.Replace(this.PreservedFields.String(), "ApplicationPreservedFields", "ApplicationPreservedFields", 1) + `,`, `GoTemplateOptions:` + fmt.Sprintf("%v", this.GoTemplateOptions) + `,`, `ApplyNestedSelectors:` + fmt.Sprintf("%v", this.ApplyNestedSelectors) + `,`, + `IgnoreApplicationDifferences:` + repeatedStringForIgnoreApplicationDifferences + `,`, `}`, }, "") return s @@ -17781,6 +18379,11 @@ func (this *ApplicationSourceKustomize) String() string { repeatedStringForReplicas += strings.Replace(strings.Replace(f.String(), "KustomizeReplica", "KustomizeReplica", 1), `&`, ``, 1) + "," } repeatedStringForReplicas += "}" + repeatedStringForPatches := "[]KustomizePatch{" + for _, f := range this.Patches { + repeatedStringForPatches += strings.Replace(strings.Replace(f.String(), "KustomizePatch", "KustomizePatch", 1), `&`, ``, 1) + "," + } + repeatedStringForPatches += "}" keysForCommonLabels := make([]string, 0, len(this.CommonLabels)) for k := range this.CommonLabels { keysForCommonLabels = append(keysForCommonLabels, k) @@ -17813,6 +18416,7 @@ func (this *ApplicationSourceKustomize) String() string { `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, `CommonAnnotationsEnvsubst:` + fmt.Sprintf("%v", this.CommonAnnotationsEnvsubst) + `,`, `Replicas:` + repeatedStringForReplicas + `,`, + `Patches:` + repeatedStringForPatches + `,`, `}`, }, "") return s @@ -18511,6 +19115,18 @@ func (this *KnownTypeField) String() string { }, "") return s } +func (this *KustomizeGvk) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KustomizeGvk{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `}`, + }, "") + return s +} func (this *KustomizeOptions) String() string { if this == nil { return "nil" @@ -18522,6 +19138,29 @@ func (this *KustomizeOptions) String() string { }, "") return s } +func (this *KustomizePatch) String() string { + if this == nil { + return "nil" + } + keysForOptions := make([]string, 0, len(this.Options)) + for k := range this.Options { + keysForOptions = append(keysForOptions, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + mapStringForOptions := "map[string]bool{" + for _, k := range keysForOptions { + mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) + } + mapStringForOptions += "}" + s := strings.Join([]string{`&KustomizePatch{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Patch:` + fmt.Sprintf("%v", this.Patch) + `,`, + `Target:` + strings.Replace(this.Target.String(), "KustomizeSelector", "KustomizeSelector", 1) + `,`, + `Options:` + mapStringForOptions + `,`, + `}`, + }, "") + return s +} func (this *KustomizeReplica) String() string { if this == nil { return "nil" @@ -18533,6 +19172,30 @@ func (this *KustomizeReplica) String() string { }, "") return s } +func (this *KustomizeResId) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KustomizeResId{`, + `KustomizeGvk:` + strings.Replace(strings.Replace(this.KustomizeGvk.String(), "KustomizeGvk", "KustomizeGvk", 1), `&`, ``, 1) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func (this *KustomizeSelector) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KustomizeSelector{`, + `KustomizeResId:` + strings.Replace(strings.Replace(this.KustomizeResId.String(), "KustomizeResId", "KustomizeResId", 1), `&`, ``, 1) + `,`, + `AnnotationSelector:` + fmt.Sprintf("%v", this.AnnotationSelector) + `,`, + `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, + `}`, + }, "") + return s +} func (this *ListGenerator) String() string { if this == nil { return "nil" @@ -19515,6 +20178,8 @@ func (this *SCMProviderGeneratorGitlab) String() string { `TokenRef:` + strings.Replace(this.TokenRef.String(), "SecretRef", "SecretRef", 1) + `,`, `AllBranches:` + fmt.Sprintf("%v", this.AllBranches) + `,`, `Insecure:` + fmt.Sprintf("%v", this.Insecure) + `,`, + `IncludeSharedProjects:` + valueToStringGenerated(this.IncludeSharedProjects) + `,`, + `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, `}`, }, "") return s @@ -21564,6 +22229,38 @@ func (m *ApplicationPreservedFields) Unmarshal(dAtA []byte) error { } m.Annotations = append(m.Annotations, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Labels = append(m.Labels, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -23099,7 +23796,7 @@ func (m *ApplicationSetNestedGenerator) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { +func (m *ApplicationSetResourceIgnoreDifferences) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -23122,17 +23819,17 @@ func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSetRolloutStep: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSetResourceIgnoreDifferences: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSetRolloutStep: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSetResourceIgnoreDifferences: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -23142,31 +23839,29 @@ func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchExpressions = append(m.MatchExpressions, ApplicationMatchExpression{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUpdate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JSONPointers", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -23176,27 +23871,55 @@ func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.MaxUpdate == nil { - m.MaxUpdate = &intstr.IntOrString{} + m.JSONPointers = append(m.JSONPointers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JQPathExpressions", wireType) } - if err := m.MaxUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JQPathExpressions = append(m.JQPathExpressions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -23219,7 +23942,7 @@ func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSetRolloutStrategy) Unmarshal(dAtA []byte) error { +func (m *ApplicationSetRolloutStep) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -23242,15 +23965,135 @@ func (m *ApplicationSetRolloutStrategy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSetRolloutStrategy: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSetRolloutStep: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSetRolloutStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSetRolloutStep: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchExpressions = append(m.MatchExpressions, ApplicationMatchExpression{}) + if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxUpdate == nil { + m.MaxUpdate = &intstr.IntOrString{} + } + if err := m.MaxUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationSetRolloutStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationSetRolloutStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationSetRolloutStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -23579,93 +24422,9 @@ func (m *ApplicationSetSpec) Unmarshal(dAtA []byte) error { } } m.ApplyNestedSelectors = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ApplicationSetStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ApplicationSetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, ApplicationSetCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplicationStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IgnoreApplicationDifferences", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -23692,8 +24451,8 @@ func (m *ApplicationSetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ApplicationStatus = append(m.ApplicationStatus, ApplicationSetApplicationStatus{}) - if err := m.ApplicationStatus[len(m.ApplicationStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.IgnoreApplicationDifferences = append(m.IgnoreApplicationDifferences, ApplicationSetResourceIgnoreDifferences{}) + if err := m.IgnoreApplicationDifferences[len(m.IgnoreApplicationDifferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -23718,7 +24477,7 @@ func (m *ApplicationSetStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { +func (m *ApplicationSetStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -23741,17 +24500,17 @@ func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSetStrategy: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSetStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -23761,27 +24520,29 @@ func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.Conditions = append(m.Conditions, ApplicationSetCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RollingSync", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -23808,10 +24569,8 @@ func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RollingSync == nil { - m.RollingSync = &ApplicationSetRolloutStrategy{} - } - if err := m.RollingSync.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ApplicationStatus = append(m.ApplicationStatus, ApplicationSetApplicationStatus{}) + if err := m.ApplicationStatus[len(m.ApplicationStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -23836,7 +24595,7 @@ func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSetSyncPolicy) Unmarshal(dAtA []byte) error { +func (m *ApplicationSetStrategy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -23859,35 +24618,153 @@ func (m *ApplicationSetSyncPolicy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSetSyncPolicy: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSetStrategy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSetSyncPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreserveResourcesOnDeletion", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PreserveResourcesOnDeletion = bool(v != 0) - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplicationsSync", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollingSync", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RollingSync == nil { + m.RollingSync = &ApplicationSetRolloutStrategy{} + } + if err := m.RollingSync.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationSetSyncPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationSetSyncPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationSetSyncPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreserveResourcesOnDeletion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PreserveResourcesOnDeletion = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationsSync", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -26343,125 +27220,9 @@ func (m *ApplicationSourceKustomize) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ApplicationSourcePlugin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ApplicationSourcePlugin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSourcePlugin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, &EnvEntry{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Patches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -26488,8 +27249,8 @@ func (m *ApplicationSourcePlugin) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Parameters = append(m.Parameters, ApplicationSourcePluginParameter{}) - if err := m.Parameters[len(m.Parameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Patches = append(m.Patches, KustomizePatch{}) + if err := m.Patches[len(m.Patches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -26514,7 +27275,7 @@ func (m *ApplicationSourcePlugin) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { +func (m *ApplicationSourcePlugin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -26537,10 +27298,10 @@ func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSourcePluginParameter: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSourcePlugin: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSourcePluginParameter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSourcePlugin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -26575,9 +27336,9 @@ func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalMap", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -26604,16 +27365,14 @@ func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OptionalMap == nil { - m.OptionalMap = &OptionalMap{} - } - if err := m.OptionalMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Env = append(m.Env, &EnvEntry{}) + if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalArray", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -26640,46 +27399,11 @@ func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OptionalArray == nil { - m.OptionalArray = &OptionalArray{} - } - if err := m.OptionalArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Parameters = append(m.Parameters, ApplicationSourcePluginParameter{}) + if err := m.Parameters[len(m.Parameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -26701,7 +27425,7 @@ func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { +func (m *ApplicationSourcePluginParameter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -26724,84 +27448,15 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSourcePluginParameter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSourcePluginParameter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &ApplicationSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Project", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -26829,11 +27484,11 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Project = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncPolicy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalMap", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -26860,16 +27515,16 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SyncPolicy == nil { - m.SyncPolicy = &SyncPolicy{} + if m.OptionalMap == nil { + m.OptionalMap = &OptionalMap{} } - if err := m.SyncPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.OptionalMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDifferences", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OptionalArray", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -26896,70 +27551,18 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IgnoreDifferences = append(m.IgnoreDifferences, ResourceIgnoreDifferences{}) - if err := m.IgnoreDifferences[len(m.IgnoreDifferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.OptionalArray == nil { + m.OptionalArray = &OptionalArray{} } - m.Info = append(m.Info, Info{}) - if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.OptionalArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RevisionHistoryLimit = &v - case 8: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -26969,25 +27572,24 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Sources = append(m.Sources, ApplicationSource{}) - if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s iNdEx = postIndex default: iNdEx = preIndex @@ -27010,7 +27612,7 @@ func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { +func (m *ApplicationSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -27033,15 +27635,15 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ApplicationStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ApplicationSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ApplicationSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -27068,14 +27670,16 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Resources = append(m.Resources, ResourceStatus{}) - if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Source == nil { + m.Source = &ApplicationSource{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -27102,15 +27706,15 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Sync.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Project", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -27120,28 +27724,27 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Health.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Project = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SyncPolicy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -27168,14 +27771,16 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.History = append(m.History, RevisionHistory{}) - if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.SyncPolicy == nil { + m.SyncPolicy = &SyncPolicy{} + } + if err := m.SyncPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDifferences", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -27202,14 +27807,320 @@ func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Conditions = append(m.Conditions, ApplicationCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.IgnoreDifferences = append(m.IgnoreDifferences, ResourceIgnoreDifferences{}) + if err := m.IgnoreDifferences[len(m.IgnoreDifferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReconciledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = append(m.Info, Info{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RevisionHistoryLimit = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sources = append(m.Sources, ApplicationSource{}) + if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, ResourceStatus{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Sync.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Health.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.History = append(m.History, RevisionHistory{}) + if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, ApplicationCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReconciledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -33845,6 +34756,152 @@ func (m *KnownTypeField) Unmarshal(dAtA []byte) error { } return nil } +func (m *KustomizeGvk) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KustomizeGvk: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KustomizeGvk: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *KustomizeOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -33936,7 +34993,387 @@ func (m *KustomizeOptions) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BinaryPath = string(dAtA[iNdEx:postIndex]) + m.BinaryPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KustomizePatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KustomizePatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KustomizePatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Patch = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Target == nil { + m.Target = &KustomizeSelector{} + } + if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Options == nil { + m.Options = make(map[string]bool) + } + var mapkey string + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Options[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KustomizeReplica) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KustomizeReplica: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KustomizeReplica: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Count.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -33959,7 +35396,7 @@ func (m *KustomizeOptions) Unmarshal(dAtA []byte) error { } return nil } -func (m *KustomizeReplica) Unmarshal(dAtA []byte) error { +func (m *KustomizeResId) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -33982,13 +35419,46 @@ func (m *KustomizeReplica) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: KustomizeReplica: wiretype end group for non-group") + return fmt.Errorf("proto: KustomizeResId: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: KustomizeReplica: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: KustomizeResId: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KustomizeGvk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.KustomizeGvk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } @@ -34020,9 +35490,91 @@ func (m *KustomizeReplica) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KustomizeSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KustomizeSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KustomizeSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KustomizeResId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -34049,10 +35601,74 @@ func (m *KustomizeReplica) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Count.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.KustomizeResId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnnotationSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnnotationSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -46460,6 +48076,59 @@ func (m *SCMProviderGeneratorGitlab) Unmarshal(dAtA []byte) error { } } m.Insecure = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeSharedProjects", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.IncludeSharedProjects = &b + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Topic = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto index 9794adad75..ec6363dbd0 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto @@ -130,14 +130,14 @@ message ApplicationCondition { // ApplicationDestination holds information about the application's destination message ApplicationDestination { - // Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API + // Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set. optional string server = 1; // Namespace specifies the target namespace for the application's resources. // The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace optional string namespace = 2; - // Name is an alternate way of specifying the target cluster by its symbolic name + // Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set. optional string name = 3; } @@ -159,6 +159,8 @@ message ApplicationMatchExpression { message ApplicationPreservedFields { repeated string annotations = 1; + + repeated string labels = 2; } // ApplicationSet is a set of Application resources @@ -271,6 +273,19 @@ message ApplicationSetNestedGenerator { optional PluginGenerator plugin = 10; } +// ApplicationSetResourceIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live +// applications when applying changes from generated applications. +message ApplicationSetResourceIgnoreDifferences { + // Name is the name of the application to ignore differences for. If not specified, the rule applies to all applications. + optional string name = 1; + + // JSONPointers is a list of JSON pointers to fields to ignore differences for. + repeated string jsonPointers = 2; + + // JQPathExpressions is a list of JQ path expressions to fields to ignore differences for. + repeated string jqPathExpressions = 3; +} + message ApplicationSetRolloutStep { repeated ApplicationMatchExpression matchExpressions = 1; @@ -299,6 +314,8 @@ message ApplicationSetSpec { // ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators optional bool applyNestedSelectors = 8; + + repeated ApplicationSetResourceIgnoreDifferences ignoreApplicationDifferences = 9; } // ApplicationSetStatus defines the observed state of ApplicationSet @@ -501,6 +518,9 @@ message ApplicationSourceKustomize { // Replicas is a list of Kustomize Replicas override specifications repeated KustomizeReplica replicas = 11; + + // Patches is a list of Kustomize patches + repeated KustomizePatch patches = 12; } // ApplicationSourcePlugin holds options specific to config management plugins @@ -1056,6 +1076,14 @@ message KnownTypeField { optional string type = 2; } +message KustomizeGvk { + optional string group = 1; + + optional string version = 2; + + optional string kind = 3; +} + // KustomizeOptions are options for kustomize to use when building manifests message KustomizeOptions { // BuildOptions is a string of build parameters to use when calling `kustomize build` @@ -1065,6 +1093,16 @@ message KustomizeOptions { optional string binaryPath = 2; } +message KustomizePatch { + optional string path = 1; + + optional string patch = 2; + + optional KustomizeSelector target = 3; + + map options = 4; +} + message KustomizeReplica { // Name of Deployment or StatefulSet optional string name = 1; @@ -1073,6 +1111,22 @@ message KustomizeReplica { optional k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 2; } +message KustomizeResId { + optional KustomizeGvk gvk = 1; + + optional string name = 2; + + optional string namespace = 3; +} + +message KustomizeSelector { + optional KustomizeResId resId = 1; + + optional string annotationSelector = 2; + + optional string labelSelector = 3; +} + // ListGenerator include items info message ListGenerator { // +kubebuilder:validation:Optional @@ -2036,6 +2090,12 @@ message SCMProviderGeneratorGitlab { // Skips validating the SCM provider's TLS certificate - useful for self-signed certificates.; default: false optional bool insecure = 6; + + // When recursing through subgroups, also include shared Projects (true) or scan only the subgroups under same path (false). Defaults to "true" + optional bool includeSharedProjects = 7; + + // Filter repos list based on Gitlab Topic. + optional string topic = 8; } // Utility struct for a reference to a secret key. @@ -2153,6 +2213,7 @@ message SyncStatus { optional string status = 1; // ComparedTo contains information about what has been compared + // +patchStrategy=replace optional ComparedTo comparedTo = 2; // Revision contains information about the revision the comparison has been performed to diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/openapi_generated.go b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/openapi_generated.go index 3696b2935c..faaec52bbb 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/openapi_generated.go +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/openapi_generated.go @@ -14,155 +14,160 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AWSAuthConfig": schema_pkg_apis_application_v1alpha1_AWSAuthConfig(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProject": schema_pkg_apis_application_v1alpha1_AppProject(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectList": schema_pkg_apis_application_v1alpha1_AppProjectList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectSpec": schema_pkg_apis_application_v1alpha1_AppProjectSpec(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectStatus": schema_pkg_apis_application_v1alpha1_AppProjectStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Application": schema_pkg_apis_application_v1alpha1_Application(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationCondition": schema_pkg_apis_application_v1alpha1_ApplicationCondition(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationDestination": schema_pkg_apis_application_v1alpha1_ApplicationDestination(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationList": schema_pkg_apis_application_v1alpha1_ApplicationList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationMatchExpression": schema_pkg_apis_application_v1alpha1_ApplicationMatchExpression(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationPreservedFields": schema_pkg_apis_application_v1alpha1_ApplicationPreservedFields(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSet": schema_pkg_apis_application_v1alpha1_ApplicationSet(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetApplicationStatus": schema_pkg_apis_application_v1alpha1_ApplicationSetApplicationStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetCondition": schema_pkg_apis_application_v1alpha1_ApplicationSetCondition(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetList": schema_pkg_apis_application_v1alpha1_ApplicationSetList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetNestedGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetNestedGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetRolloutStep": schema_pkg_apis_application_v1alpha1_ApplicationSetRolloutStep(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetRolloutStrategy": schema_pkg_apis_application_v1alpha1_ApplicationSetRolloutStrategy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSpec": schema_pkg_apis_application_v1alpha1_ApplicationSetSpec(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStatus": schema_pkg_apis_application_v1alpha1_ApplicationSetStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStrategy": schema_pkg_apis_application_v1alpha1_ApplicationSetStrategy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSyncPolicy": schema_pkg_apis_application_v1alpha1_ApplicationSetSyncPolicy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplate": schema_pkg_apis_application_v1alpha1_ApplicationSetTemplate(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplateMeta": schema_pkg_apis_application_v1alpha1_ApplicationSetTemplateMeta(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTerminalGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetTerminalGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSource": schema_pkg_apis_application_v1alpha1_ApplicationSource(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceDirectory": schema_pkg_apis_application_v1alpha1_ApplicationSourceDirectory(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceHelm": schema_pkg_apis_application_v1alpha1_ApplicationSourceHelm(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceJsonnet": schema_pkg_apis_application_v1alpha1_ApplicationSourceJsonnet(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceKustomize": schema_pkg_apis_application_v1alpha1_ApplicationSourceKustomize(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePlugin": schema_pkg_apis_application_v1alpha1_ApplicationSourcePlugin(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePluginParameter": schema_pkg_apis_application_v1alpha1_ApplicationSourcePluginParameter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSpec": schema_pkg_apis_application_v1alpha1_ApplicationSpec(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationStatus": schema_pkg_apis_application_v1alpha1_ApplicationStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSummary": schema_pkg_apis_application_v1alpha1_ApplicationSummary(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationTree": schema_pkg_apis_application_v1alpha1_ApplicationTree(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationWatchEvent": schema_pkg_apis_application_v1alpha1_ApplicationWatchEvent(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Backoff": schema_pkg_apis_application_v1alpha1_Backoff(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.BasicAuthBitbucketServer": schema_pkg_apis_application_v1alpha1_BasicAuthBitbucketServer(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.BearerTokenBitbucketCloud": schema_pkg_apis_application_v1alpha1_BearerTokenBitbucketCloud(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ChartDetails": schema_pkg_apis_application_v1alpha1_ChartDetails(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Cluster": schema_pkg_apis_application_v1alpha1_Cluster(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterCacheInfo": schema_pkg_apis_application_v1alpha1_ClusterCacheInfo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterConfig": schema_pkg_apis_application_v1alpha1_ClusterConfig(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterGenerator": schema_pkg_apis_application_v1alpha1_ClusterGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterInfo": schema_pkg_apis_application_v1alpha1_ClusterInfo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterList": schema_pkg_apis_application_v1alpha1_ClusterList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Command": schema_pkg_apis_application_v1alpha1_Command(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ComparedTo": schema_pkg_apis_application_v1alpha1_ComparedTo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ComponentParameter": schema_pkg_apis_application_v1alpha1_ComponentParameter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ConfigManagementPlugin": schema_pkg_apis_application_v1alpha1_ConfigManagementPlugin(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ConnectionState": schema_pkg_apis_application_v1alpha1_ConnectionState(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.DuckTypeGenerator": schema_pkg_apis_application_v1alpha1_DuckTypeGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.EnvEntry": schema_pkg_apis_application_v1alpha1_EnvEntry(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ErrApplicationNotAllowedToUseProject": schema_pkg_apis_application_v1alpha1_ErrApplicationNotAllowedToUseProject(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ExecProviderConfig": schema_pkg_apis_application_v1alpha1_ExecProviderConfig(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitDirectoryGeneratorItem": schema_pkg_apis_application_v1alpha1_GitDirectoryGeneratorItem(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitFileGeneratorItem": schema_pkg_apis_application_v1alpha1_GitFileGeneratorItem(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitGenerator": schema_pkg_apis_application_v1alpha1_GitGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GnuPGPublicKey": schema_pkg_apis_application_v1alpha1_GnuPGPublicKey(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GnuPGPublicKeyList": schema_pkg_apis_application_v1alpha1_GnuPGPublicKeyList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HealthStatus": schema_pkg_apis_application_v1alpha1_HealthStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmFileParameter": schema_pkg_apis_application_v1alpha1_HelmFileParameter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmOptions": schema_pkg_apis_application_v1alpha1_HelmOptions(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmParameter": schema_pkg_apis_application_v1alpha1_HelmParameter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HostInfo": schema_pkg_apis_application_v1alpha1_HostInfo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HostResourceInfo": schema_pkg_apis_application_v1alpha1_HostResourceInfo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Info": schema_pkg_apis_application_v1alpha1_Info(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.InfoItem": schema_pkg_apis_application_v1alpha1_InfoItem(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JWTToken": schema_pkg_apis_application_v1alpha1_JWTToken(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JWTTokens": schema_pkg_apis_application_v1alpha1_JWTTokens(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JsonnetVar": schema_pkg_apis_application_v1alpha1_JsonnetVar(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KnownTypeField": schema_pkg_apis_application_v1alpha1_KnownTypeField(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeOptions": schema_pkg_apis_application_v1alpha1_KustomizeOptions(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeReplica": schema_pkg_apis_application_v1alpha1_KustomizeReplica(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ListGenerator": schema_pkg_apis_application_v1alpha1_ListGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ManagedNamespaceMetadata": schema_pkg_apis_application_v1alpha1_ManagedNamespaceMetadata(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.MatrixGenerator": schema_pkg_apis_application_v1alpha1_MatrixGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.MergeGenerator": schema_pkg_apis_application_v1alpha1_MergeGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.NestedMatrixGenerator": schema_pkg_apis_application_v1alpha1_NestedMatrixGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.NestedMergeGenerator": schema_pkg_apis_application_v1alpha1_NestedMergeGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Operation": schema_pkg_apis_application_v1alpha1_Operation(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OperationInitiator": schema_pkg_apis_application_v1alpha1_OperationInitiator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OperationState": schema_pkg_apis_application_v1alpha1_OperationState(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OptionalArray": schema_pkg_apis_application_v1alpha1_OptionalArray(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OptionalMap": schema_pkg_apis_application_v1alpha1_OptionalMap(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OrphanedResourceKey": schema_pkg_apis_application_v1alpha1_OrphanedResourceKey(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OrphanedResourcesMonitorSettings": schema_pkg_apis_application_v1alpha1_OrphanedResourcesMonitorSettings(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OverrideIgnoreDiff": schema_pkg_apis_application_v1alpha1_OverrideIgnoreDiff(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginConfigMapRef": schema_pkg_apis_application_v1alpha1_PluginConfigMapRef(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginGenerator": schema_pkg_apis_application_v1alpha1_PluginGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginInput": schema_pkg_apis_application_v1alpha1_PluginInput(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ProjectRole": schema_pkg_apis_application_v1alpha1_ProjectRole(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGenerator": schema_pkg_apis_application_v1alpha1_PullRequestGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorAzureDevOps": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorAzureDevOps(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorBitbucket": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorBitbucket(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorBitbucketServer": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorBitbucketServer(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorFilter": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorFilter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGitLab": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGitLab(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGitea": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGitea(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGithub": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGithub(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RefTarget": schema_pkg_apis_application_v1alpha1_RefTarget(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepoCreds": schema_pkg_apis_application_v1alpha1_RepoCreds(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepoCredsList": schema_pkg_apis_application_v1alpha1_RepoCredsList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Repository": schema_pkg_apis_application_v1alpha1_Repository(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryCertificate": schema_pkg_apis_application_v1alpha1_RepositoryCertificate(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryCertificateList": schema_pkg_apis_application_v1alpha1_RepositoryCertificateList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryList": schema_pkg_apis_application_v1alpha1_RepositoryList(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceAction": schema_pkg_apis_application_v1alpha1_ResourceAction(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActionDefinition": schema_pkg_apis_application_v1alpha1_ResourceActionDefinition(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActionParam": schema_pkg_apis_application_v1alpha1_ResourceActionParam(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActions": schema_pkg_apis_application_v1alpha1_ResourceActions(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceDiff": schema_pkg_apis_application_v1alpha1_ResourceDiff(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceIgnoreDifferences": schema_pkg_apis_application_v1alpha1_ResourceIgnoreDifferences(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceNetworkingInfo": schema_pkg_apis_application_v1alpha1_ResourceNetworkingInfo(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceNode": schema_pkg_apis_application_v1alpha1_ResourceNode(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceOverride": schema_pkg_apis_application_v1alpha1_ResourceOverride(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceRef": schema_pkg_apis_application_v1alpha1_ResourceRef(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceResult": schema_pkg_apis_application_v1alpha1_ResourceResult(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceStatus": schema_pkg_apis_application_v1alpha1_ResourceStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RetryStrategy": schema_pkg_apis_application_v1alpha1_RetryStrategy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RevisionHistory": schema_pkg_apis_application_v1alpha1_RevisionHistory(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RevisionMetadata": schema_pkg_apis_application_v1alpha1_RevisionMetadata(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGenerator": schema_pkg_apis_application_v1alpha1_SCMProviderGenerator(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorAWSCodeCommit": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorAWSCodeCommit(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorAzureDevOps": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorAzureDevOps(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorBitbucket": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorBitbucket(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorBitbucketServer": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorBitbucketServer(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorFilter": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorFilter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGitea": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGitea(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGithub": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGithub(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGitlab": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGitlab(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SecretRef": schema_pkg_apis_application_v1alpha1_SecretRef(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SignatureKey": schema_pkg_apis_application_v1alpha1_SignatureKey(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperation": schema_pkg_apis_application_v1alpha1_SyncOperation(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperationResource": schema_pkg_apis_application_v1alpha1_SyncOperationResource(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperationResult": schema_pkg_apis_application_v1alpha1_SyncOperationResult(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncPolicy": schema_pkg_apis_application_v1alpha1_SyncPolicy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncPolicyAutomated": schema_pkg_apis_application_v1alpha1_SyncPolicyAutomated(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStatus": schema_pkg_apis_application_v1alpha1_SyncStatus(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategy": schema_pkg_apis_application_v1alpha1_SyncStrategy(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategyApply": schema_pkg_apis_application_v1alpha1_SyncStrategyApply(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategyHook": schema_pkg_apis_application_v1alpha1_SyncStrategyHook(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncWindow": schema_pkg_apis_application_v1alpha1_SyncWindow(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.TLSClientConfig": schema_pkg_apis_application_v1alpha1_TLSClientConfig(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.TagFilter": schema_pkg_apis_application_v1alpha1_TagFilter(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.objectMeta": schema_pkg_apis_application_v1alpha1_objectMeta(ref), - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.rawResourceOverride": schema_pkg_apis_application_v1alpha1_rawResourceOverride(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AWSAuthConfig": schema_pkg_apis_application_v1alpha1_AWSAuthConfig(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProject": schema_pkg_apis_application_v1alpha1_AppProject(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectList": schema_pkg_apis_application_v1alpha1_AppProjectList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectSpec": schema_pkg_apis_application_v1alpha1_AppProjectSpec(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.AppProjectStatus": schema_pkg_apis_application_v1alpha1_AppProjectStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Application": schema_pkg_apis_application_v1alpha1_Application(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationCondition": schema_pkg_apis_application_v1alpha1_ApplicationCondition(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationDestination": schema_pkg_apis_application_v1alpha1_ApplicationDestination(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationList": schema_pkg_apis_application_v1alpha1_ApplicationList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationMatchExpression": schema_pkg_apis_application_v1alpha1_ApplicationMatchExpression(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationPreservedFields": schema_pkg_apis_application_v1alpha1_ApplicationPreservedFields(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSet": schema_pkg_apis_application_v1alpha1_ApplicationSet(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetApplicationStatus": schema_pkg_apis_application_v1alpha1_ApplicationSetApplicationStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetCondition": schema_pkg_apis_application_v1alpha1_ApplicationSetCondition(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetList": schema_pkg_apis_application_v1alpha1_ApplicationSetList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetNestedGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetNestedGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetResourceIgnoreDifferences": schema_pkg_apis_application_v1alpha1_ApplicationSetResourceIgnoreDifferences(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetRolloutStep": schema_pkg_apis_application_v1alpha1_ApplicationSetRolloutStep(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetRolloutStrategy": schema_pkg_apis_application_v1alpha1_ApplicationSetRolloutStrategy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSpec": schema_pkg_apis_application_v1alpha1_ApplicationSetSpec(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStatus": schema_pkg_apis_application_v1alpha1_ApplicationSetStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStrategy": schema_pkg_apis_application_v1alpha1_ApplicationSetStrategy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSyncPolicy": schema_pkg_apis_application_v1alpha1_ApplicationSetSyncPolicy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplate": schema_pkg_apis_application_v1alpha1_ApplicationSetTemplate(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplateMeta": schema_pkg_apis_application_v1alpha1_ApplicationSetTemplateMeta(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTerminalGenerator": schema_pkg_apis_application_v1alpha1_ApplicationSetTerminalGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSource": schema_pkg_apis_application_v1alpha1_ApplicationSource(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceDirectory": schema_pkg_apis_application_v1alpha1_ApplicationSourceDirectory(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceHelm": schema_pkg_apis_application_v1alpha1_ApplicationSourceHelm(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceJsonnet": schema_pkg_apis_application_v1alpha1_ApplicationSourceJsonnet(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourceKustomize": schema_pkg_apis_application_v1alpha1_ApplicationSourceKustomize(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePlugin": schema_pkg_apis_application_v1alpha1_ApplicationSourcePlugin(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePluginParameter": schema_pkg_apis_application_v1alpha1_ApplicationSourcePluginParameter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSpec": schema_pkg_apis_application_v1alpha1_ApplicationSpec(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationStatus": schema_pkg_apis_application_v1alpha1_ApplicationStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSummary": schema_pkg_apis_application_v1alpha1_ApplicationSummary(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationTree": schema_pkg_apis_application_v1alpha1_ApplicationTree(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationWatchEvent": schema_pkg_apis_application_v1alpha1_ApplicationWatchEvent(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Backoff": schema_pkg_apis_application_v1alpha1_Backoff(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.BasicAuthBitbucketServer": schema_pkg_apis_application_v1alpha1_BasicAuthBitbucketServer(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.BearerTokenBitbucketCloud": schema_pkg_apis_application_v1alpha1_BearerTokenBitbucketCloud(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ChartDetails": schema_pkg_apis_application_v1alpha1_ChartDetails(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Cluster": schema_pkg_apis_application_v1alpha1_Cluster(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterCacheInfo": schema_pkg_apis_application_v1alpha1_ClusterCacheInfo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterConfig": schema_pkg_apis_application_v1alpha1_ClusterConfig(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterGenerator": schema_pkg_apis_application_v1alpha1_ClusterGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterInfo": schema_pkg_apis_application_v1alpha1_ClusterInfo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ClusterList": schema_pkg_apis_application_v1alpha1_ClusterList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Command": schema_pkg_apis_application_v1alpha1_Command(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ComparedTo": schema_pkg_apis_application_v1alpha1_ComparedTo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ComponentParameter": schema_pkg_apis_application_v1alpha1_ComponentParameter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ConfigManagementPlugin": schema_pkg_apis_application_v1alpha1_ConfigManagementPlugin(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ConnectionState": schema_pkg_apis_application_v1alpha1_ConnectionState(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.DuckTypeGenerator": schema_pkg_apis_application_v1alpha1_DuckTypeGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.EnvEntry": schema_pkg_apis_application_v1alpha1_EnvEntry(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ErrApplicationNotAllowedToUseProject": schema_pkg_apis_application_v1alpha1_ErrApplicationNotAllowedToUseProject(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ExecProviderConfig": schema_pkg_apis_application_v1alpha1_ExecProviderConfig(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitDirectoryGeneratorItem": schema_pkg_apis_application_v1alpha1_GitDirectoryGeneratorItem(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitFileGeneratorItem": schema_pkg_apis_application_v1alpha1_GitFileGeneratorItem(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GitGenerator": schema_pkg_apis_application_v1alpha1_GitGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GnuPGPublicKey": schema_pkg_apis_application_v1alpha1_GnuPGPublicKey(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.GnuPGPublicKeyList": schema_pkg_apis_application_v1alpha1_GnuPGPublicKeyList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HealthStatus": schema_pkg_apis_application_v1alpha1_HealthStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmFileParameter": schema_pkg_apis_application_v1alpha1_HelmFileParameter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmOptions": schema_pkg_apis_application_v1alpha1_HelmOptions(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HelmParameter": schema_pkg_apis_application_v1alpha1_HelmParameter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HostInfo": schema_pkg_apis_application_v1alpha1_HostInfo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.HostResourceInfo": schema_pkg_apis_application_v1alpha1_HostResourceInfo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Info": schema_pkg_apis_application_v1alpha1_Info(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.InfoItem": schema_pkg_apis_application_v1alpha1_InfoItem(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JWTToken": schema_pkg_apis_application_v1alpha1_JWTToken(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JWTTokens": schema_pkg_apis_application_v1alpha1_JWTTokens(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.JsonnetVar": schema_pkg_apis_application_v1alpha1_JsonnetVar(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KnownTypeField": schema_pkg_apis_application_v1alpha1_KnownTypeField(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeGvk": schema_pkg_apis_application_v1alpha1_KustomizeGvk(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeOptions": schema_pkg_apis_application_v1alpha1_KustomizeOptions(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizePatch": schema_pkg_apis_application_v1alpha1_KustomizePatch(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeReplica": schema_pkg_apis_application_v1alpha1_KustomizeReplica(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeResId": schema_pkg_apis_application_v1alpha1_KustomizeResId(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeSelector": schema_pkg_apis_application_v1alpha1_KustomizeSelector(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ListGenerator": schema_pkg_apis_application_v1alpha1_ListGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ManagedNamespaceMetadata": schema_pkg_apis_application_v1alpha1_ManagedNamespaceMetadata(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.MatrixGenerator": schema_pkg_apis_application_v1alpha1_MatrixGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.MergeGenerator": schema_pkg_apis_application_v1alpha1_MergeGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.NestedMatrixGenerator": schema_pkg_apis_application_v1alpha1_NestedMatrixGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.NestedMergeGenerator": schema_pkg_apis_application_v1alpha1_NestedMergeGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Operation": schema_pkg_apis_application_v1alpha1_Operation(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OperationInitiator": schema_pkg_apis_application_v1alpha1_OperationInitiator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OperationState": schema_pkg_apis_application_v1alpha1_OperationState(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OptionalArray": schema_pkg_apis_application_v1alpha1_OptionalArray(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OptionalMap": schema_pkg_apis_application_v1alpha1_OptionalMap(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OrphanedResourceKey": schema_pkg_apis_application_v1alpha1_OrphanedResourceKey(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OrphanedResourcesMonitorSettings": schema_pkg_apis_application_v1alpha1_OrphanedResourcesMonitorSettings(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.OverrideIgnoreDiff": schema_pkg_apis_application_v1alpha1_OverrideIgnoreDiff(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginConfigMapRef": schema_pkg_apis_application_v1alpha1_PluginConfigMapRef(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginGenerator": schema_pkg_apis_application_v1alpha1_PluginGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PluginInput": schema_pkg_apis_application_v1alpha1_PluginInput(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ProjectRole": schema_pkg_apis_application_v1alpha1_ProjectRole(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGenerator": schema_pkg_apis_application_v1alpha1_PullRequestGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorAzureDevOps": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorAzureDevOps(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorBitbucket": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorBitbucket(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorBitbucketServer": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorBitbucketServer(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorFilter": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorFilter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGitLab": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGitLab(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGitea": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGitea(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.PullRequestGeneratorGithub": schema_pkg_apis_application_v1alpha1_PullRequestGeneratorGithub(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RefTarget": schema_pkg_apis_application_v1alpha1_RefTarget(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepoCreds": schema_pkg_apis_application_v1alpha1_RepoCreds(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepoCredsList": schema_pkg_apis_application_v1alpha1_RepoCredsList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.Repository": schema_pkg_apis_application_v1alpha1_Repository(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryCertificate": schema_pkg_apis_application_v1alpha1_RepositoryCertificate(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryCertificateList": schema_pkg_apis_application_v1alpha1_RepositoryCertificateList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RepositoryList": schema_pkg_apis_application_v1alpha1_RepositoryList(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceAction": schema_pkg_apis_application_v1alpha1_ResourceAction(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActionDefinition": schema_pkg_apis_application_v1alpha1_ResourceActionDefinition(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActionParam": schema_pkg_apis_application_v1alpha1_ResourceActionParam(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceActions": schema_pkg_apis_application_v1alpha1_ResourceActions(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceDiff": schema_pkg_apis_application_v1alpha1_ResourceDiff(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceIgnoreDifferences": schema_pkg_apis_application_v1alpha1_ResourceIgnoreDifferences(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceNetworkingInfo": schema_pkg_apis_application_v1alpha1_ResourceNetworkingInfo(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceNode": schema_pkg_apis_application_v1alpha1_ResourceNode(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceOverride": schema_pkg_apis_application_v1alpha1_ResourceOverride(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceRef": schema_pkg_apis_application_v1alpha1_ResourceRef(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceResult": schema_pkg_apis_application_v1alpha1_ResourceResult(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ResourceStatus": schema_pkg_apis_application_v1alpha1_ResourceStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RetryStrategy": schema_pkg_apis_application_v1alpha1_RetryStrategy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RevisionHistory": schema_pkg_apis_application_v1alpha1_RevisionHistory(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.RevisionMetadata": schema_pkg_apis_application_v1alpha1_RevisionMetadata(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGenerator": schema_pkg_apis_application_v1alpha1_SCMProviderGenerator(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorAWSCodeCommit": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorAWSCodeCommit(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorAzureDevOps": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorAzureDevOps(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorBitbucket": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorBitbucket(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorBitbucketServer": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorBitbucketServer(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorFilter": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorFilter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGitea": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGitea(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGithub": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGithub(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SCMProviderGeneratorGitlab": schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGitlab(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SecretRef": schema_pkg_apis_application_v1alpha1_SecretRef(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SignatureKey": schema_pkg_apis_application_v1alpha1_SignatureKey(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperation": schema_pkg_apis_application_v1alpha1_SyncOperation(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperationResource": schema_pkg_apis_application_v1alpha1_SyncOperationResource(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncOperationResult": schema_pkg_apis_application_v1alpha1_SyncOperationResult(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncPolicy": schema_pkg_apis_application_v1alpha1_SyncPolicy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncPolicyAutomated": schema_pkg_apis_application_v1alpha1_SyncPolicyAutomated(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStatus": schema_pkg_apis_application_v1alpha1_SyncStatus(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategy": schema_pkg_apis_application_v1alpha1_SyncStrategy(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategyApply": schema_pkg_apis_application_v1alpha1_SyncStrategyApply(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncStrategyHook": schema_pkg_apis_application_v1alpha1_SyncStrategyHook(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.SyncWindow": schema_pkg_apis_application_v1alpha1_SyncWindow(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.TLSClientConfig": schema_pkg_apis_application_v1alpha1_TLSClientConfig(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.TagFilter": schema_pkg_apis_application_v1alpha1_TagFilter(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.objectMeta": schema_pkg_apis_application_v1alpha1_objectMeta(ref), + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.rawResourceOverride": schema_pkg_apis_application_v1alpha1_rawResourceOverride(ref), } } @@ -596,7 +601,7 @@ func schema_pkg_apis_application_v1alpha1_ApplicationDestination(ref common.Refe Properties: map[string]spec.Schema{ "server": { SchemaProps: spec.SchemaProps{ - Description: "Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API", + Description: "Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set.", Type: []string{"string"}, Format: "", }, @@ -610,7 +615,7 @@ func schema_pkg_apis_application_v1alpha1_ApplicationDestination(ref common.Refe }, "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is an alternate way of specifying the target cluster by its symbolic name", + Description: "Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.", Type: []string{"string"}, Format: "", }, @@ -728,6 +733,20 @@ func schema_pkg_apis_application_v1alpha1_ApplicationPreservedFields(ref common. }, }, }, + "labels": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, }, }, @@ -1073,6 +1092,56 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSetNestedGenerator(ref comm } } +func schema_pkg_apis_application_v1alpha1_ApplicationSetResourceIgnoreDifferences(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ApplicationSetResourceIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live applications when applying changes from generated applications.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the application to ignore differences for. If not specified, the rule applies to all applications.", + Type: []string{"string"}, + Format: "", + }, + }, + "jsonPointers": { + SchemaProps: spec.SchemaProps{ + Description: "JSONPointers is a list of JSON pointers to fields to ignore differences for.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "jqPathExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "JQPathExpressions is a list of JQ path expressions to fields to ignore differences for.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_application_v1alpha1_ApplicationSetRolloutStep(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1200,12 +1269,25 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSetSpec(ref common.Referenc Format: "", }, }, + "ignoreApplicationDifferences": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetResourceIgnoreDifferences"), + }, + }, + }, + }, + }, }, Required: []string{"generators", "template"}, }, }, Dependencies: []string{ - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationPreservedFields", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetGenerator", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStrategy", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSyncPolicy", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplate"}, + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationPreservedFields", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetGenerator", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetResourceIgnoreDifferences", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetStrategy", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetSyncPolicy", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplate"}, } } @@ -1862,11 +1944,25 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSourceKustomize(ref common. }, }, }, + "patches": { + SchemaProps: spec.SchemaProps{ + Description: "Patches is a list of Kustomize patches", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizePatch"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeReplica"}, + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizePatch", "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeReplica"}, } } @@ -3783,6 +3879,36 @@ func schema_pkg_apis_application_v1alpha1_KnownTypeField(ref common.ReferenceCal } } +func schema_pkg_apis_application_v1alpha1_KustomizeGvk(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_application_v1alpha1_KustomizeOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -3813,6 +3939,52 @@ func schema_pkg_apis_application_v1alpha1_KustomizeOptions(ref common.ReferenceC } } +func schema_pkg_apis_application_v1alpha1_KustomizePatch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "patch": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeSelector"), + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.KustomizeSelector"}, + } +} + func schema_pkg_apis_application_v1alpha1_KustomizeReplica(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -3843,6 +4015,102 @@ func schema_pkg_apis_application_v1alpha1_KustomizeReplica(ref common.ReferenceC } } +func schema_pkg_apis_application_v1alpha1_KustomizeResId(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_application_v1alpha1_KustomizeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "annotationSelector": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_application_v1alpha1_ListGenerator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6984,6 +7252,20 @@ func schema_pkg_apis_application_v1alpha1_SCMProviderGeneratorGitlab(ref common. Format: "", }, }, + "includeSharedProjects": { + SchemaProps: spec.SchemaProps{ + Description: "When recursing through subgroups, also include shared Projects (true) or scan only the subgroups under same path (false). Defaults to \"true\"", + Type: []string{"boolean"}, + Format: "", + }, + }, + "topic": { + SchemaProps: spec.SchemaProps{ + Description: "Filter repos list based on Gitlab Topic.", + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"group"}, }, @@ -7381,6 +7663,11 @@ func schema_pkg_apis_application_v1alpha1_SyncStatus(ref common.ReferenceCallbac }, }, "comparedTo": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "replace", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ComparedTo contains information about what has been compared", Default: map[string]interface{}{}, diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/types.go b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/types.go index 2eb5166c7d..614cca979a 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/types.go +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/types.go @@ -465,6 +465,8 @@ type ApplicationSourceKustomize struct { CommonAnnotationsEnvsubst bool `json:"commonAnnotationsEnvsubst,omitempty" protobuf:"bytes,10,opt,name=commonAnnotationsEnvsubst"` // Replicas is a list of Kustomize Replicas override specifications Replicas KustomizeReplicas `json:"replicas,omitempty" protobuf:"bytes,11,opt,name=replicas"` + // Patches is a list of Kustomize patches + Patches KustomizePatches `json:"patches,omitempty" protobuf:"bytes,12,opt,name=patches"` } type KustomizeReplica struct { @@ -509,6 +511,43 @@ func NewKustomizeReplica(text string) (*KustomizeReplica, error) { return kr, nil } +type KustomizePatches []KustomizePatch + +type KustomizePatch struct { + Path string `json:"path,omitempty" yaml:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + Patch string `json:"patch,omitempty" yaml:"patch,omitempty" protobuf:"bytes,2,opt,name=patch"` + Target *KustomizeSelector `json:"target,omitempty" yaml:"target,omitempty" protobuf:"bytes,3,opt,name=target"` + Options map[string]bool `json:"options,omitempty" yaml:"options,omitempty" protobuf:"bytes,4,opt,name=options"` +} + +// Copied from: https://github.com/kubernetes-sigs/kustomize/blob/cd7ba1744eadb793ab7cd056a76ee8a5ca725db9/api/types/patch.go +func (p *KustomizePatch) Equals(o KustomizePatch) bool { + targetEqual := (p.Target == o.Target) || + (p.Target != nil && o.Target != nil && *p.Target == *o.Target) + return p.Path == o.Path && + p.Patch == o.Patch && + targetEqual && + reflect.DeepEqual(p.Options, o.Options) +} + +type KustomizeSelector struct { + KustomizeResId `json:",inline,omitempty" yaml:",inline,omitempty" protobuf:"bytes,1,opt,name=resId"` + AnnotationSelector string `json:"annotationSelector,omitempty" yaml:"annotationSelector,omitempty" protobuf:"bytes,2,opt,name=annotationSelector"` + LabelSelector string `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty" protobuf:"bytes,3,opt,name=labelSelector"` +} + +type KustomizeResId struct { + KustomizeGvk `json:",inline,omitempty" yaml:",inline,omitempty" protobuf:"bytes,1,opt,name=gvk"` + Name string `json:"name,omitempty" yaml:"name,omitempty" protobuf:"bytes,2,opt,name=name"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` +} + +type KustomizeGvk struct { + Group string `json:"group,omitempty" yaml:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + Version string `json:"version,omitempty" yaml:"version,omitempty" protobuf:"bytes,2,opt,name=version"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"` +} + // AllowsConcurrentProcessing returns true if multiple processes can run Kustomize builds on the same source at the same time func (k *ApplicationSourceKustomize) AllowsConcurrentProcessing() bool { return len(k.Images) == 0 && @@ -516,7 +555,8 @@ func (k *ApplicationSourceKustomize) AllowsConcurrentProcessing() bool { len(k.CommonAnnotations) == 0 && k.NamePrefix == "" && k.Namespace == "" && - k.NameSuffix == "" + k.NameSuffix == "" && + len(k.Patches) == 0 } // IsZero returns true when the Kustomize options are considered empty @@ -529,7 +569,8 @@ func (k *ApplicationSourceKustomize) IsZero() bool { len(k.Images) == 0 && len(k.Replicas) == 0 && len(k.CommonLabels) == 0 && - len(k.CommonAnnotations) == 0 + len(k.CommonAnnotations) == 0 && + len(k.Patches) == 0 } // MergeImage merges a new Kustomize image identifier in to a list of images @@ -860,12 +901,12 @@ func (c *ApplicationSourcePlugin) RemoveEnvEntry(key string) error { // ApplicationDestination holds information about the application's destination type ApplicationDestination struct { - // Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API + // Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set. Server string `json:"server,omitempty" protobuf:"bytes,1,opt,name=server"` // Namespace specifies the target namespace for the application's resources. // The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` - // Name is an alternate way of specifying the target cluster by its symbolic name + // Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set. Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` // nolint:govet @@ -910,6 +951,35 @@ type ApplicationStatus struct { ControllerNamespace string `json:"controllerNamespace,omitempty" protobuf:"bytes,13,opt,name=controllerNamespace"` } +// GetRevisions will return the current revision associated with the Application. +// If app has multisources, it will return all corresponding revisions preserving +// order from the app.spec.sources. If app has only one source, it will return a +// single revision in the list. +func (a *ApplicationStatus) GetRevisions() []string { + revisions := []string{} + if len(a.Sync.Revisions) > 0 { + revisions = a.Sync.Revisions + } else if a.Sync.Revision != "" { + revisions = append(revisions, a.Sync.Revision) + } + return revisions +} + +// BuildComparedToStatus will build a ComparedTo object based on the current +// Application state. +func (app *Application) BuildComparedToStatus() ComparedTo { + ct := ComparedTo{ + Destination: app.Spec.Destination, + IgnoreDifferences: app.Spec.IgnoreDifferences, + } + if app.Spec.HasMultipleSources() { + ct.Sources = app.Spec.Sources + } else { + ct.Source = app.Spec.GetSource() + } + return ct +} + // JWTTokens represents a list of JWT tokens type JWTTokens struct { Items []JWTToken `json:"items,omitempty" protobuf:"bytes,1,opt,name=items"` @@ -1094,11 +1164,12 @@ type SyncPolicy struct { Retry *RetryStrategy `json:"retry,omitempty" protobuf:"bytes,3,opt,name=retry"` // ManagedNamespaceMetadata controls metadata in the given namespace (if CreateNamespace=true) ManagedNamespaceMetadata *ManagedNamespaceMetadata `json:"managedNamespaceMetadata,omitempty" protobuf:"bytes,4,opt,name=managedNamespaceMetadata"` + // If you add a field here, be sure to update IsZero. } // IsZero returns true if the sync policy is empty func (p *SyncPolicy) IsZero() bool { - return p == nil || (p.Automated == nil && len(p.SyncOptions) == 0 && p.Retry == nil) + return p == nil || (p.Automated == nil && len(p.SyncOptions) == 0 && p.Retry == nil && p.ManagedNamespaceMetadata == nil) } // RetryStrategy contains information about the strategy to apply when a sync failed @@ -1422,7 +1493,8 @@ type SyncStatus struct { // Status is the sync state of the comparison Status SyncStatusCode `json:"status" protobuf:"bytes,1,opt,name=status,casttype=SyncStatusCode"` // ComparedTo contains information about what has been compared - ComparedTo ComparedTo `json:"comparedTo,omitempty" protobuf:"bytes,2,opt,name=comparedTo"` + // +patchStrategy=replace + ComparedTo ComparedTo `json:"comparedTo,omitempty" protobuf:"bytes,2,opt,name=comparedTo" patchStrategy:"replace"` // Revision contains information about the revision the comparison has been performed to Revision string `json:"revision,omitempty" protobuf:"bytes,3,opt,name=revision"` // Revisions contains information about the revisions of multiple sources the comparison has been performed to @@ -2862,7 +2934,12 @@ func (c *Cluster) RawRestConfig() *rest.Config { if exists { config, err = clientcmd.BuildConfigFromFlags("", conf) } else { - config, err = clientcmd.BuildConfigFromFlags("", filepath.Join(os.Getenv("HOME"), ".kube", "config")) + var homeDir string + homeDir, err = os.UserHomeDir() + if err != nil { + homeDir = "" + } + config, err = clientcmd.BuildConfigFromFlags("", filepath.Join(homeDir, ".kube", "config")) } } else if c.Server == KubernetesInternalAPIServerAddr && c.Config.Username == "" && c.Config.Password == "" && c.Config.BearerToken == "" { config, err = rest.InClusterConfig() diff --git a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go index 82d405118c..e7245069b9 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go @@ -323,6 +323,11 @@ func (in *ApplicationPreservedFields) DeepCopyInto(out *ApplicationPreservedFiel *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 } @@ -470,6 +475,28 @@ func (in *ApplicationSetGenerator) DeepCopy() *ApplicationSetGenerator { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ApplicationSetIgnoreDifferences) DeepCopyInto(out *ApplicationSetIgnoreDifferences) { + { + in := &in + *out = make(ApplicationSetIgnoreDifferences, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSetIgnoreDifferences. +func (in ApplicationSetIgnoreDifferences) DeepCopy() ApplicationSetIgnoreDifferences { + if in == nil { + return nil + } + out := new(ApplicationSetIgnoreDifferences) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplicationSetList) DeepCopyInto(out *ApplicationSetList) { *out = *in @@ -591,6 +618,32 @@ func (in ApplicationSetNestedGenerators) DeepCopy() ApplicationSetNestedGenerato return *out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationSetResourceIgnoreDifferences) DeepCopyInto(out *ApplicationSetResourceIgnoreDifferences) { + *out = *in + if in.JSONPointers != nil { + in, out := &in.JSONPointers, &out.JSONPointers + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.JQPathExpressions != nil { + in, out := &in.JQPathExpressions, &out.JQPathExpressions + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSetResourceIgnoreDifferences. +func (in *ApplicationSetResourceIgnoreDifferences) DeepCopy() *ApplicationSetResourceIgnoreDifferences { + if in == nil { + return nil + } + out := new(ApplicationSetResourceIgnoreDifferences) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplicationSetRolloutStep) DeepCopyInto(out *ApplicationSetRolloutStep) { *out = *in @@ -673,6 +726,13 @@ func (in *ApplicationSetSpec) DeepCopyInto(out *ApplicationSetSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.IgnoreApplicationDifferences != nil { + in, out := &in.IgnoreApplicationDifferences, &out.IgnoreApplicationDifferences + *out = make(ApplicationSetIgnoreDifferences, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -1036,6 +1096,13 @@ func (in *ApplicationSourceKustomize) DeepCopyInto(out *ApplicationSourceKustomi *out = make(KustomizeReplicas, len(*in)) copy(*out, *in) } + if in.Patches != nil { + in, out := &in.Patches, &out.Patches + *out = make(KustomizePatches, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -2168,6 +2235,22 @@ func (in *KnownTypeField) DeepCopy() *KnownTypeField { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KustomizeGvk) DeepCopyInto(out *KustomizeGvk) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizeGvk. +func (in *KustomizeGvk) DeepCopy() *KustomizeGvk { + if in == nil { + return nil + } + out := new(KustomizeGvk) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in KustomizeImages) DeepCopyInto(out *KustomizeImages) { { @@ -2204,6 +2287,56 @@ func (in *KustomizeOptions) DeepCopy() *KustomizeOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KustomizePatch) DeepCopyInto(out *KustomizePatch) { + *out = *in + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(KustomizeSelector) + **out = **in + } + if in.Options != nil { + in, out := &in.Options, &out.Options + *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 KustomizePatch. +func (in *KustomizePatch) DeepCopy() *KustomizePatch { + if in == nil { + return nil + } + out := new(KustomizePatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in KustomizePatches) DeepCopyInto(out *KustomizePatches) { + { + in := &in + *out = make(KustomizePatches, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizePatches. +func (in KustomizePatches) DeepCopy() KustomizePatches { + if in == nil { + return nil + } + out := new(KustomizePatches) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KustomizeReplica) DeepCopyInto(out *KustomizeReplica) { *out = *in @@ -2241,6 +2374,40 @@ func (in KustomizeReplicas) DeepCopy() KustomizeReplicas { return *out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KustomizeResId) DeepCopyInto(out *KustomizeResId) { + *out = *in + out.KustomizeGvk = in.KustomizeGvk + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizeResId. +func (in *KustomizeResId) DeepCopy() *KustomizeResId { + if in == nil { + return nil + } + out := new(KustomizeResId) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KustomizeSelector) DeepCopyInto(out *KustomizeSelector) { + *out = *in + out.KustomizeResId = in.KustomizeResId + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizeSelector. +func (in *KustomizeSelector) DeepCopy() *KustomizeSelector { + if in == nil { + return nil + } + out := new(KustomizeSelector) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ListGenerator) DeepCopyInto(out *ListGenerator) { *out = *in @@ -3815,6 +3982,11 @@ func (in *SCMProviderGeneratorGitlab) DeepCopyInto(out *SCMProviderGeneratorGitl *out = new(SecretRef) **out = **in } + if in.IncludeSharedProjects != nil { + in, out := &in.IncludeSharedProjects, &out.IncludeSharedProjects + *out = new(bool) + **out = **in + } return } diff --git a/vendor/github.com/argoproj/argo-cd/v2/reposerver/apiclient/repository.pb.go b/vendor/github.com/argoproj/argo-cd/v2/reposerver/apiclient/repository.pb.go index dd5a4559ac..914a967db3 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/reposerver/apiclient/repository.pb.go +++ b/vendor/github.com/argoproj/argo-cd/v2/reposerver/apiclient/repository.pb.go @@ -46,17 +46,21 @@ type ManifestRequest struct { KubeVersion string `protobuf:"bytes,14,opt,name=kubeVersion,proto3" json:"kubeVersion,omitempty"` ApiVersions []string `protobuf:"bytes,15,rep,name=apiVersions,proto3" json:"apiVersions,omitempty"` // Request to verify the signature when generating the manifests (only for Git repositories) - VerifySignature bool `protobuf:"varint,16,opt,name=verifySignature,proto3" json:"verifySignature,omitempty"` - HelmRepoCreds []*v1alpha1.RepoCreds `protobuf:"bytes,17,rep,name=helmRepoCreds,proto3" json:"helmRepoCreds,omitempty"` - NoRevisionCache bool `protobuf:"varint,18,opt,name=noRevisionCache,proto3" json:"noRevisionCache,omitempty"` - TrackingMethod string `protobuf:"bytes,19,opt,name=trackingMethod,proto3" json:"trackingMethod,omitempty"` - EnabledSourceTypes map[string]bool `protobuf:"bytes,20,rep,name=enabledSourceTypes,proto3" json:"enabledSourceTypes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - HelmOptions *v1alpha1.HelmOptions `protobuf:"bytes,21,opt,name=helmOptions,proto3" json:"helmOptions,omitempty"` - HasMultipleSources bool `protobuf:"varint,22,opt,name=hasMultipleSources,proto3" json:"hasMultipleSources,omitempty"` - RefSources map[string]*v1alpha1.RefTarget `protobuf:"bytes,23,rep,name=refSources,proto3" json:"refSources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + VerifySignature bool `protobuf:"varint,16,opt,name=verifySignature,proto3" json:"verifySignature,omitempty"` + HelmRepoCreds []*v1alpha1.RepoCreds `protobuf:"bytes,17,rep,name=helmRepoCreds,proto3" json:"helmRepoCreds,omitempty"` + NoRevisionCache bool `protobuf:"varint,18,opt,name=noRevisionCache,proto3" json:"noRevisionCache,omitempty"` + TrackingMethod string `protobuf:"bytes,19,opt,name=trackingMethod,proto3" json:"trackingMethod,omitempty"` + EnabledSourceTypes map[string]bool `protobuf:"bytes,20,rep,name=enabledSourceTypes,proto3" json:"enabledSourceTypes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + HelmOptions *v1alpha1.HelmOptions `protobuf:"bytes,21,opt,name=helmOptions,proto3" json:"helmOptions,omitempty"` + HasMultipleSources bool `protobuf:"varint,22,opt,name=hasMultipleSources,proto3" json:"hasMultipleSources,omitempty"` + RefSources map[string]*v1alpha1.RefTarget `protobuf:"bytes,23,rep,name=refSources,proto3" json:"refSources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // This is used to surface "source not permitted" errors for Helm repositories + ProjectSourceRepos []string `protobuf:"bytes,24,rep,name=projectSourceRepos,proto3" json:"projectSourceRepos,omitempty"` + // This is used to surface "source not permitted" errors for Helm repositories + ProjectName string `protobuf:"bytes,25,opt,name=projectName,proto3" json:"projectName,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ManifestRequest) Reset() { *m = ManifestRequest{} } @@ -232,6 +236,20 @@ func (m *ManifestRequest) GetRefSources() map[string]*v1alpha1.RefTarget { return nil } +func (m *ManifestRequest) GetProjectSourceRepos() []string { + if m != nil { + return m.ProjectSourceRepos + } + return nil +} + +func (m *ManifestRequest) GetProjectName() string { + if m != nil { + return m.ProjectName + } + return "" +} + type ManifestRequestWithFiles struct { // Types that are valid to be assigned to Part: // *ManifestRequestWithFiles_Request @@ -2187,138 +2205,140 @@ func init() { } var fileDescriptor_dd8723cfcc820480 = []byte{ - // 2096 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xdb, 0x6e, 0x1b, 0xc7, - 0xf9, 0xe7, 0x92, 0x94, 0x44, 0x7e, 0x92, 0x25, 0x6a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, 0x4e, 0xec, 0xba, 0xeb, 0x72, - 0xff, 0xc4, 0x2c, 0x61, 0x87, 0xc6, 0x30, 0x2f, 0xec, 0x88, 0x43, 0x61, 0x55, 0x86, 0xc2, 0xfd, - 0xe9, 0x7c, 0x74, 0x90, 0x32, 0x34, 0xb3, 0xdc, 0x51, 0x07, 0xd0, 0x08, 0x07, 0x87, 0xa1, 0xcd, - 0x29, 0xb3, 0x49, 0xa4, 0x46, 0xa0, 0xaf, 0x49, 0x37, 0x95, 0xac, 0xa0, 0x07, 0x00, 0x3e, 0x19, - 0xc4, 0x74, 0xeb, 0xd2, 0xf2, 0x9b, 0x67, 0x59, 0x6e, 0x26, 0xd4, 0x91, 0xc5, 0x99, 0xed, 0xed, - 0xbb, 0xb0, 0x7e, 0x8a, 0x63, 0x50, 0x0b, 0x6a, 0x63, 0x72, 0x22, 0x0b, 0x6a, 0xd3, 0x14, 0x9f, - 0x68, 0x05, 0x66, 0x8e, 0xb1, 0x1d, 0x12, 0x59, 0x02, 0x1b, 0x66, 0x34, 0xb8, 0x53, 0xfd, 0xb6, - 0xd6, 0xfe, 0xb5, 0x06, 0x4b, 0x05, 0x31, 0x25, 0xfb, 0x7f, 0x92, 0xdd, 0x7f, 0x0e, 0x41, 0x37, - 0x78, 0x8a, 0xfd, 0x21, 0xe1, 0x19, 0x45, 0x8c, 0xbf, 0x6b, 0xa0, 0x17, 0xec, 0xff, 0x21, 0xe5, - 0xa3, 0x7b, 0xd4, 0x26, 0x01, 0xba, 0x0d, 0x73, 0x7e, 0x34, 0xa7, 0xda, 0xc4, 0x5b, 0x67, 0xb8, - 0xed, 0xa0, 0x62, 0xc6, 0xd4, 0xe8, 0x63, 0x68, 0x38, 0x84, 0xe3, 0x3e, 0xe6, 0x58, 0xe9, 0xbe, - 0x59, 0xb6, 0x53, 0x48, 0x39, 0x54, 0x74, 0x07, 0x15, 0x33, 0xd9, 0x83, 0xde, 0x87, 0x19, 0x6b, - 0x14, 0xba, 0x63, 0xd9, 0x20, 0xe6, 0x77, 0xde, 0x3e, 0x6d, 0xf3, 0x9e, 0x20, 0x3a, 0xa8, 0x98, - 0x11, 0xf5, 0x27, 0xb3, 0x50, 0x67, 0xd8, 0xe7, 0xc6, 0x3d, 0x58, 0x29, 0x13, 0x21, 0xba, 0x92, - 0x35, 0x22, 0xd6, 0x38, 0x08, 0x1d, 0xe5, 0xe6, 0x64, 0x8c, 0x10, 0xd4, 0x03, 0xfa, 0x22, 0x72, - 0x75, 0xcd, 0x94, 0xdf, 0xc6, 0xb7, 0x60, 0x79, 0x42, 0x9a, 0x38, 0xd4, 0x48, 0x37, 0xc1, 0x61, - 0x41, 0x89, 0x36, 0x42, 0x58, 0x7d, 0x2a, 0x7d, 0x91, 0x94, 0xe6, 0x8b, 0xe8, 0xb3, 0xc6, 0x01, - 0xac, 0x15, 0xc5, 0x06, 0xcc, 0x73, 0x03, 0x22, 0xb2, 0x44, 0xd6, 0x32, 0x4a, 0xfa, 0xe9, 0xaa, - 0xd4, 0xa2, 0x61, 0x96, 0xac, 0x18, 0xbf, 0xa8, 0xc2, 0x9a, 0x49, 0x02, 0xcf, 0x3e, 0x26, 0x71, - 0xa1, 0xb9, 0x18, 0xa8, 0xf0, 0x63, 0xa8, 0x61, 0xc6, 0x54, 0x98, 0xdc, 0x3f, 0xb7, 0x66, 0x6c, - 0x0a, 0xae, 0xe8, 0x5d, 0x58, 0xc6, 0x4e, 0x8f, 0x0e, 0x43, 0x2f, 0x0c, 0x62, 0xb3, 0x64, 0x50, - 0x35, 0xcd, 0xc9, 0x05, 0xc3, 0x82, 0xf5, 0x09, 0x17, 0x28, 0x77, 0x66, 0x01, 0x8d, 0x56, 0x00, - 0x34, 0xa5, 0x42, 0xaa, 0xa7, 0x09, 0xf9, 0x8b, 0x06, 0xad, 0x34, 0x75, 0x14, 0xfb, 0xab, 0xd0, - 0x74, 0xd4, 0x5c, 0xa0, 0x6b, 0xb2, 0x61, 0xa5, 0x13, 0x79, 0x6c, 0x53, 0x2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- 0x4c, 0x9d, 0xca, 0xe7, 0x6a, 0x69, 0xb1, 0xce, 0x47, 0x4c, 0x79, 0x99, 0x33, 0x2a, 0x9f, 0xec, - 0xfe, 0xed, 0xe5, 0x86, 0xf6, 0xd5, 0xcb, 0x0d, 0xed, 0x9f, 0x2f, 0x37, 0xb4, 0x1f, 0xdd, 0x7a, - 0xc5, 0xdf, 0x10, 0x64, 0xfe, 0x2c, 0x01, 0x33, 0x6a, 0xd9, 0x94, 0xb8, 0xbc, 0x37, 0x2b, 0x83, - 0xff, 0xd6, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x9f, 0xd1, 0x75, 0xb5, 0x20, 0x00, 0x00, + // 2127 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0x5b, 0x6f, 0x1b, 0xc7, + 0xf5, 0xe7, 0x92, 0x94, 0x44, 0x1e, 0xd9, 0x12, 0x35, 0xd6, 0x65, 0xc5, 0x38, 0x82, 0xb2, 0xff, + 0xbf, 0x0d, 0xd5, 0x4e, 0x48, 0x48, 0x46, 0xe2, 0xc2, 0x49, 0x53, 0x28, 0x8a, 0x2d, 0x39, 0xb6, + 0x6c, 0x75, 0xed, 0xb6, 0x48, 0xeb, 0xb6, 0x18, 0x2e, 0x87, 0xe4, 0x86, 0x7b, 0x19, 0xef, 0xce, + 0x2a, 0x90, 0x81, 0x3e, 0x14, 0x2d, 0xfa, 0x11, 0xfa, 0xd0, 0xaf, 0x51, 0x14, 0x7d, 0xec, 0x53, + 0x2f, 0x8f, 0x41, 0xbf, 0x40, 0x0b, 0xbf, 0x14, 0xe8, 0xa7, 0x28, 0xe6, 0xb2, 0x57, 0xae, 0x64, + 0xa7, 0x94, 0x15, 0xb4, 0x2f, 0xf6, 0xce, 0x99, 0x33, 0xe7, 0x9c, 0x39, 0x73, 0x2e, 0xbf, 0x19, + 0x0a, 0xae, 0x07, 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0x87, 0x1e, 0x66, 0x51, 0x40, 0xf4, 0x96, 0x08, 0xc5, 0x22, 0x19, 0xb9, 0x70, 0x79, 0x44, 0x1c, + 0x97, 0xbb, 0x7c, 0x2f, 0x20, 0xfd, 0x50, 0x5f, 0x12, 0xfe, 0xdd, 0x9f, 0xfe, 0x04, 0x85, 0x38, + 0x33, 0x2f, 0x9d, 0x1b, 0xe6, 0xf9, 0xa6, 0xca, 0x14, 0x99, 0x23, 0x48, 0x1a, 0x56, 0x20, 0xa3, + 0xeb, 0xb0, 0xc0, 0x02, 0x6c, 0x8d, 0x6d, 0x6f, 0x78, 0x48, 0xd8, 0xc8, 0xef, 0xeb, 0x57, 0x84, + 0x27, 0x0a, 0x54, 0x64, 0x01, 0x22, 0x1e, 0xee, 0x39, 0xa4, 0x2f, 0x63, 0xf1, 0xe9, 0x09, 0x25, + 0xa1, 0xbe, 0x2c, 0x76, 0x71, 0xab, 0x93, 0xa9, 0x50, 0x85, 0x02, 0xd1, 0xb9, 0x3b, 0xb1, 0xea, + 0xae, 0xc7, 0x82, 0x13, 0xb3, 0x44, 0x1c, 0x1a, 0xc3, 0x3c, 0xdf, 0x47, 0x1c, 0x0a, 0x2b, 0x22, + 0x14, 0xee, 0x4f, 0xe7, 0xa3, 0x83, 0x54, 0xa0, 0x99, 0x95, 0x8e, 0x3a, 0x80, 0x46, 0x38, 0x3c, + 0x8c, 0x1c, 0x66, 0x53, 0x87, 0x48, 0x33, 0x42, 0x7d, 0x55, 0xb8, 0xa9, 0x64, 0x06, 0x3d, 0x00, + 0x08, 0xc8, 0x20, 0xe6, 0x5b, 0x13, 0x3b, 0xbf, 0x79, 0xd6, 0xce, 0xcd, 0x84, 0x5b, 0xee, 0x38, + 0xb3, 0x9c, 0x2b, 0xe7, 0xdb, 0x20, 0x16, 0x53, 0xd9, 0x2e, 0xd2, 0x5a, 0x17, 0x21, 0x56, 0x32, + 0xc3, 0x63, 0x51, 0x51, 0x45, 0xd1, 0x5a, 0x97, 0xd1, 0x9a, 0x21, 0xb5, 0xef, 0xc2, 0xda, 0x29, + 0xae, 0x46, 0x2d, 0xa8, 0x8d, 0xc9, 0x89, 0x28, 0xd1, 0x4d, 0x93, 0x7f, 0xa2, 0x65, 0x98, 0x39, + 0xc6, 0x4e, 0x44, 0x44, 0x51, 0x6d, 0x98, 0x72, 0x70, 0xa7, 0xfa, 0x6d, 0xad, 0xfd, 0x6b, 0x0d, + 0x16, 0x0b, 0x86, 0x97, 0xac, 0xff, 0x49, 0x76, 0xfd, 0x39, 0x84, 0xf1, 0xe0, 0x29, 0x0e, 0x86, + 0x84, 0x65, 0x0c, 0x31, 0xfe, 0xa6, 0x81, 0x5e, 0xf0, 0xe8, 0x0f, 0x6d, 0x36, 0xba, 0x67, 0x3b, + 0x24, 0x44, 0xb7, 0x61, 0x2e, 0x90, 0x34, 0xd5, 0x78, 0xde, 0x3a, 0xe3, 0x20, 0x0e, 0x2a, 0x66, + 0xcc, 0x8d, 0x3e, 0x86, 0x86, 0x4b, 0x18, 0xee, 0x63, 0x86, 0x95, 0xed, 0x9b, 0x65, 0x2b, 0xb9, + 0x96, 0x43, 0xc5, 0x77, 0x50, 0x31, 0x93, 0x35, 0xe8, 0x7d, 0x98, 0xb1, 0x46, 0x91, 0x37, 0x16, + 0x2d, 0x67, 0x7e, 0xe7, 0xed, 0xd3, 0x16, 0xef, 0x71, 0xa6, 0x83, 0x8a, 0x29, 0xb9, 0x3f, 0x99, + 0x85, 0x3a, 0xc5, 0x01, 0x33, 0xee, 0xc1, 0x72, 0x99, 0x0a, 0xde, 0xe7, 0xac, 0x11, 0xb1, 0xc6, + 0x61, 0xe4, 0x2a, 0x37, 0x27, 0x63, 0x84, 0xa0, 0x1e, 0xda, 0x2f, 0xa4, 0xab, 0x6b, 0xa6, 0xf8, + 0x36, 0xbe, 0x05, 0x4b, 0x13, 0xda, 0xf8, 0xa1, 0x4a, 0xdb, 0xb8, 0x84, 0x4b, 0x4a, 0xb5, 0x11, + 0xc1, 0xca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, 0x3e, 0x13, 0x40, 0x65, 0x0d, 0x93, 0x03, 0x3e, 0x11, 0xb7, 0xe2, 0x62, + 0x27, 0x9a, 0x42, 0xd3, 0xcc, 0x50, 0xd0, 0x18, 0x80, 0xe2, 0x00, 0xbb, 0x84, 0x91, 0x80, 0x57, + 0x72, 0x9e, 0xf1, 0x0f, 0xa6, 0xaf, 0x2e, 0x47, 0xb1, 0x4c, 0x33, 0x23, 0x9e, 0x23, 0x56, 0xa1, + 0x3a, 0x54, 0xf5, 0x5b, 0x8d, 0xd0, 0x97, 0xb0, 0x30, 0xb0, 0x1d, 0x72, 0x94, 0x1a, 0x32, 0x2b, + 0x0c, 0x79, 0x3c, 0xbd, 0x21, 0xf7, 0xb2, 0x72, 0xcd, 0x82, 0x1a, 0xe3, 0x06, 0xb4, 0x8a, 0xf9, + 0xc4, 0x8d, 0xb4, 0x5d, 0x3c, 0x4c, 0xbc, 0xa5, 0x46, 0x06, 0x82, 0x56, 0x31, 0x7f, 0x8c, 0xbf, + 0x57, 0x61, 0x25, 0x11, 0xb7, 0xeb, 0x79, 0x7e, 0xe4, 0x59, 0xe2, 0x29, 0xae, 0xf4, 0x2c, 0x96, + 0x61, 0x86, 0xd9, 0xcc, 0x49, 0x80, 0x8f, 0x18, 0xf0, 0xde, 0xc5, 0x7c, 0xdf, 0x61, 0x36, 0x55, + 0x07, 0x1c, 0x0f, 0xe5, 0xd9, 0x3f, 0x8f, 0xec, 0x80, 0xf4, 0x45, 0x25, 0x68, 0x98, 0xc9, 0x98, + 0xcf, 0x71, 0x54, 0x23, 0x60, 0xbc, 0x74, 0x66, 0x32, 0x16, 0x71, 0xef, 0x3b, 0x0e, 0xb1, 0xb8, + 0x3b, 0x32, 0x40, 0xbf, 0x40, 0x15, 0x17, 0x08, 0x16, 0xd8, 0xde, 0x50, 0xc1, 0x7c, 0x35, 0xe2, + 0x76, 0xe2, 0x20, 0xc0, 0x27, 0x7a, 0x43, 0x38, 0x40, 0x0e, 0xd0, 0x47,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, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2918,6 +2938,26 @@ func (m *ManifestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.ProjectName) > 0 { + i -= len(m.ProjectName) + copy(dAtA[i:], m.ProjectName) + i = encodeVarintRepository(dAtA, i, uint64(len(m.ProjectName))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + if len(m.ProjectSourceRepos) > 0 { + for iNdEx := len(m.ProjectSourceRepos) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ProjectSourceRepos[iNdEx]) + copy(dAtA[i:], m.ProjectSourceRepos[iNdEx]) + i = encodeVarintRepository(dAtA, i, uint64(len(m.ProjectSourceRepos[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + } if len(m.RefSources) > 0 { for k := range m.RefSources { v := m.RefSources[k] @@ -4978,6 +5018,16 @@ func (m *ManifestRequest) Size() (n int) { n += mapEntrySize + 2 + sovRepository(uint64(mapEntrySize)) } } + if len(m.ProjectSourceRepos) > 0 { + for _, s := range m.ProjectSourceRepos { + l = len(s) + n += 2 + l + sovRepository(uint64(l)) + } + } + l = len(m.ProjectName) + if l > 0 { + n += 2 + l + sovRepository(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6578,6 +6628,70 @@ func (m *ManifestRequest) Unmarshal(dAtA []byte) error { } m.RefSources[mapkey] = mapvalue iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectSourceRepos", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProjectSourceRepos = append(m.ProjectSourceRepos, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProjectName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRepository(dAtA[iNdEx:]) diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/collections/maps.go b/vendor/github.com/argoproj/argo-cd/v2/util/collections/maps.go index a615f810c4..d7a4294367 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/collections/maps.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/collections/maps.go @@ -21,3 +21,16 @@ func StringMapsEqual(first map[string]string, second map[string]string) bool { } return reflect.DeepEqual(first, second) } + +func MergeStringMaps(items ...map[string]string) map[string]string { + res := make(map[string]string) + for _, m := range items { + if m == nil { + continue + } + for k, v := range m { + res[k] = v + } + } + return res +} diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/config/reader.go b/vendor/github.com/argoproj/argo-cd/v2/util/config/reader.go index 4f643a2895..61df13b0a3 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/config/reader.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/config/reader.go @@ -30,13 +30,7 @@ func unmarshalObject(data []byte, obj interface{}) error { if err != nil { return err } - - err = json.Unmarshal(jsonData, &obj) - if err != nil { - return err - } - - return err + return json.Unmarshal(jsonData, &obj) } // MarshalLocalYAMLFile writes JSON or YAML to a file on disk. diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/git/git.go b/vendor/github.com/argoproj/argo-cd/v2/util/git/git.go index b925789453..d5a8652f7c 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/git/git.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/git/git.go @@ -14,14 +14,6 @@ func ensurePrefix(s, prefix string) string { return s } -// removeSuffix idempotently removes a given suffix -func removeSuffix(s, suffix string) string { - if strings.HasSuffix(s, suffix) { - return s[0 : len(s)-len(suffix)] - } - return s -} - var ( commitSHARegex = regexp.MustCompile("^[0-9A-Fa-f]{40}$") sshURLRegex = regexp.MustCompile("^(ssh://)?([^/:]*?)@[^@]+$") @@ -62,7 +54,7 @@ func NormalizeGitURL(repo string) string { repo = ensurePrefix(repo, "ssh://") } } - repo = removeSuffix(repo, ".git") + repo = strings.TrimSuffix(repo, ".git") repoURL, err := url.Parse(repo) if err != nil { return "" diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/helm/client.go b/vendor/github.com/argoproj/argo-cd/v2/util/helm/client.go index e4021602ea..8b99cd67c6 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/helm/client.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/helm/client.go @@ -318,8 +318,8 @@ func (c *nativeHelmChart) loadRepoIndex(maxIndexSize int64) ([]byte, error) { } tr := &http.Transport{ - Proxy: proxy.GetCallback(c.proxy), - TLSClientConfig: tlsConf, + Proxy: proxy.GetCallback(c.proxy), + TLSClientConfig: tlsConf, DisableKeepAlives: true, } client := http.Client{Transport: tr} @@ -431,8 +431,8 @@ func (c *nativeHelmChart) GetTags(chart string, noCache bool) (*TagsList, error) return nil, fmt.Errorf("failed setup tlsConfig: %v", err) } client := &http.Client{Transport: &http.Transport{ - Proxy: proxy.GetCallback(c.proxy), - TLSClientConfig: tlsConf, + Proxy: proxy.GetCallback(c.proxy), + TLSClientConfig: tlsConf, DisableKeepAlives: true, }} diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/helm/cmd.go b/vendor/github.com/argoproj/argo-cd/v2/util/helm/cmd.go index e61dfa8e7a..cc2a1388d6 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/helm/cmd.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/helm/cmd.go @@ -1,6 +1,7 @@ package helm import ( + "errors" "fmt" "os" "os/exec" @@ -90,6 +91,28 @@ func (c *Cmd) RegistryLogin(repo string, creds Creds) (string, error) { args = append(args, "--password", creds.Password) } + if creds.CAPath != "" { + args = append(args, "--ca-file", creds.CAPath) + } + + if len(creds.CertData) > 0 { + filePath, closer, err := writeToTmp(creds.CertData) + if err != nil { + return "", err + } + defer argoio.Close(closer) + args = append(args, "--cert-file", filePath) + } + + if len(creds.KeyData) > 0 { + filePath, closer, err := writeToTmp(creds.KeyData) + if err != nil { + return "", err + } + defer argoio.Close(closer) + args = append(args, "--key-file", filePath) + } + if creds.InsecureSkipVerify { args = append(args, "--insecure") } @@ -237,6 +260,25 @@ func (c *Cmd) PullOCI(repo string, chart string, version string, destination str if creds.CAPath != "" { args = append(args, "--ca-file", creds.CAPath) } + + if len(creds.CertData) > 0 { + filePath, closer, err := writeToTmp(creds.CertData) + if err != nil { + return "", err + } + defer argoio.Close(closer) + args = append(args, "--cert-file", filePath) + } + + if len(creds.KeyData) > 0 { + filePath, closer, err := writeToTmp(creds.KeyData) + if err != nil { + return "", err + } + defer argoio.Close(closer) + args = append(args, "--key-file", filePath) + } + if creds.InsecureSkipVerify && c.insecureSkipVerifySupported { args = append(args, "--insecure-skip-tls-verify") } @@ -268,7 +310,8 @@ type TemplateOpts struct { } var ( - re = regexp.MustCompile(`([^\\]),`) + re = regexp.MustCompile(`([^\\]),`) + apiVersionsRemover = regexp.MustCompile(`(--api-versions [^ ]+ )+`) ) func cleanSetParameters(val string) string { @@ -315,7 +358,16 @@ func (c *Cmd) template(chartPath string, opts *TemplateOpts) (string, error) { args = append(args, "--include-crds") } - return c.run(args...) + out, err := c.run(args...) + if err != nil { + msg := err.Error() + if strings.Contains(msg, "--api-versions") { + log.Debug(msg) + msg = apiVersionsRemover.ReplaceAllString(msg, " ") + } + return "", errors.New(msg) + } + return out, nil } func (c *Cmd) Freestyle(args ...string) (string, error) { diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/io/files/util.go b/vendor/github.com/argoproj/argo-cd/v2/util/io/files/util.go index 6bbcaa751d..741f224c3c 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/io/files/util.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/io/files/util.go @@ -20,19 +20,22 @@ var RelativeOutOfBoundErr = errors.New("full path does not contain base path") // does not match (example 2). // // Example 1: -// fullPath: /home/test/app/readme.md -// basePath: /home/test -// return: app/readme.md +// +// fullPath: /home/test/app/readme.md +// basePath: /home/test +// return: app/readme.md // // Example 2: -// fullPath: /home/test/app/readme.md -// basePath: /somewhere/else -// return: "", RelativeOutOfBoundErr +// +// fullPath: /home/test/app/readme.md +// basePath: /somewhere/else +// return: "", RelativeOutOfBoundErr // // Example 3: -// fullPath: /home/test/app/readme.md -// basePath: /home/test/app/readme.md -// return: . +// +// fullPath: /home/test/app/readme.md +// basePath: /home/test/app/readme.md +// return: . func RelativePath(fullPath, basePath string) (string, error) { fp := filepath.Clean(fullPath) if !strings.HasPrefix(fp, filepath.Clean(basePath)) { diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/kube/kube.go b/vendor/github.com/argoproj/argo-cd/v2/util/kube/kube.go index 35bab0314b..5ea4394b72 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/kube/kube.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/kube/kube.go @@ -23,7 +23,7 @@ func IsValidResourceName(name string) bool { func SetAppInstanceLabel(target *unstructured.Unstructured, key, val string) error { labels, _, err := nestedNullableStringMap(target.Object, "metadata", "labels") if err != nil { - return err + return fmt.Errorf("failed to get labels from target object %s %s/%s: %w", target.GroupVersionKind().String(), target.GetNamespace(), target.GetName(), err) } if labels == nil { labels = make(map[string]string) @@ -129,7 +129,7 @@ func GetAppInstanceAnnotation(un *unstructured.Unstructured, key string) (string func GetAppInstanceLabel(un *unstructured.Unstructured, key string) (string, error) { labels, _, err := nestedNullableStringMap(un.Object, "metadata", "labels") if err != nil { - return "", err + return "", fmt.Errorf("failed to get labels for %s %s/%s: %w", un.GroupVersionKind().String(), un.GetNamespace(), un.GetName(), err) } if labels != nil { return labels[key], nil @@ -141,7 +141,7 @@ func GetAppInstanceLabel(un *unstructured.Unstructured, key string) (string, err func RemoveLabel(un *unstructured.Unstructured, key string) error { labels, _, err := nestedNullableStringMap(un.Object, "metadata", "labels") if err != nil { - return err + return fmt.Errorf("failed to get labels for %s %s/%s: %w", un.GroupVersionKind().String(), un.GetNamespace(), un.GetName(), err) } if labels == nil { return nil diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/kube/portforwarder.go b/vendor/github.com/argoproj/argo-cd/v2/util/kube/portforwarder.go index 1ea6e0fdad..f08f783208 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/kube/portforwarder.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/kube/portforwarder.go @@ -56,7 +56,7 @@ func PortForward(targetPort int, namespace string, overrides *clientcmd.ConfigOv } if pod == nil { - return -1, fmt.Errorf("cannot find pod with selector: %v", podSelectors) + return -1, fmt.Errorf("cannot find pod with selector: %v - use the --{component}-name flag in this command or set the environmental variable (Refer to https://argo-cd.readthedocs.io/en/stable/user-guide/environment-variables), to change the Argo CD component name in the CLI", podSelectors) } url := clientSet.CoreV1().RESTClient().Post(). diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/settings/resources_filter.go b/vendor/github.com/argoproj/argo-cd/v2/util/settings/resources_filter.go index 86f95cbfc7..7e656eabba 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/settings/resources_filter.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/settings/resources_filter.go @@ -62,7 +62,6 @@ func (rf *ResourcesFilter) isExcludedResource(apiGroup, kind, cluster string) bo // +-------------+-------------+-------------+ // | Present | Present | Not Allowed | // +-------------+-------------+-------------+ -// func (rf *ResourcesFilter) IsExcludedResource(apiGroup, kind, cluster string) bool { // if excluded, do not allow if rf.isExcludedResource(apiGroup, kind, cluster) { diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/settings/settings.go b/vendor/github.com/argoproj/argo-cd/v2/util/settings/settings.go index e01e950ca2..ad4238eb12 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/settings/settings.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/settings/settings.go @@ -17,7 +17,6 @@ import ( "sync" "time" - timeutil "github.com/argoproj/pkg/time" log "github.com/sirupsen/logrus" apiv1 "k8s.io/api/core/v1" apierr "k8s.io/apimachinery/pkg/api/errors" @@ -39,6 +38,8 @@ import ( "github.com/argoproj/argo-cd/v2/util/kube" "github.com/argoproj/argo-cd/v2/util/password" tlsutil "github.com/argoproj/argo-cd/v2/util/tls" + enginecache "github.com/argoproj/gitops-engine/pkg/cache" + timeutil "github.com/argoproj/pkg/time" ) // ArgoCDSettings holds in-memory runtime configuration options. @@ -71,6 +72,10 @@ type ArgoCDSettings struct { WebhookBitbucketServerSecret string `json:"webhookBitbucketServerSecret,omitempty"` // WebhookGogsSecret holds the shared secret for authenticating Gogs webhook events WebhookGogsSecret string `json:"webhookGogsSecret,omitempty"` + // WebhookAzureDevOpsUsername holds the username for authenticating Azure DevOps webhook events + WebhookAzureDevOpsUsername string `json:"webhookAzureDevOpsUsername,omitempty"` + // WebhookAzureDevOpsPassword holds the password for authenticating Azure DevOps webhook events + WebhookAzureDevOpsPassword string `json:"webhookAzureDevOpsPassword,omitempty"` // Secrets holds all secrets in argocd-secret as a map[string]string Secrets map[string]string `json:"secrets,omitempty"` // KustomizeBuildOptions is a string of kustomize build parameters @@ -411,6 +416,12 @@ const ( settingsWebhookBitbucketServerSecretKey = "webhook.bitbucketserver.secret" // settingsWebhookGogsSecret is the key for Gogs webhook secret settingsWebhookGogsSecretKey = "webhook.gogs.secret" + // settingsWebhookAzureDevOpsUsernameKey is the key for Azure DevOps webhook username + settingsWebhookAzureDevOpsUsernameKey = "webhook.azuredevops.username" + // settingsWebhookAzureDevOpsPasswordKey is the key for Azure DevOps webhook password + settingsWebhookAzureDevOpsPasswordKey = "webhook.azuredevops.password" + // settingsWebhookMaxPayloadSize is the key for the maximum payload size for webhooks in MB + settingsWebhookMaxPayloadSizeMB = "webhook.maxPayloadSizeMB" // settingsApplicationInstanceLabelKey is the key to configure injected app instance label key settingsApplicationInstanceLabelKey = "application.instanceLabelKey" // settingsResourceTrackingMethodKey is the key to configure tracking method for application resources @@ -482,16 +493,23 @@ const ( // ResourceDeepLinks is the resource deep link key ResourceDeepLinks = "resource.links" extensionConfig = "extension.config" + // RespectRBAC is the key to configure argocd to respect rbac while watching for resources + RespectRBAC = "resource.respectRBAC" + RespectRBACValueStrict = "strict" + RespectRBACValueNormal = "normal" ) -var ( - sourceTypeToEnableGenerationKey = map[v1alpha1.ApplicationSourceType]string{ - v1alpha1.ApplicationSourceTypeKustomize: "kustomize.enable", - v1alpha1.ApplicationSourceTypeHelm: "helm.enable", - v1alpha1.ApplicationSourceTypeDirectory: "jsonnet.enable", - } +const ( + // default max webhook payload size is 1GB + defaultMaxWebhookPayloadSize = int64(1) * 1024 * 1024 * 1024 ) +var sourceTypeToEnableGenerationKey = map[v1alpha1.ApplicationSourceType]string{ + v1alpha1.ApplicationSourceTypeKustomize: "kustomize.enable", + v1alpha1.ApplicationSourceTypeHelm: "helm.enable", + v1alpha1.ApplicationSourceTypeDirectory: "jsonnet.enable", +} + // SettingsManager holds config info for a new manager with which to access Kubernetes ConfigMaps. type SettingsManager struct { ctx context.Context @@ -545,6 +563,24 @@ func (mgr *SettingsManager) onRepoOrClusterChanged() { } } +func (mgr *SettingsManager) RespectRBAC() (int, error) { + cm, err := mgr.getConfigMap() + if err != nil { + return enginecache.RespectRbacDisabled, err + } + if cm.Data[RespectRBAC] != "" { + switch cm.Data[RespectRBAC] { + case RespectRBACValueNormal: + return enginecache.RespectRbacNormal, nil + case RespectRBACValueStrict: + return enginecache.RespectRbacStrict, nil + default: + return enginecache.RespectRbacDisabled, fmt.Errorf("invalid value for %s: %s", RespectRBAC, cm.Data[RespectRBAC]) + } + } + return enginecache.RespectRbacDisabled, nil +} + func (mgr *SettingsManager) GetSecretsLister() (v1listers.SecretLister, error) { err := mgr.ensureSynced(false) if err != nil { @@ -556,7 +592,7 @@ func (mgr *SettingsManager) GetSecretsLister() (v1listers.SecretLister, error) { func (mgr *SettingsManager) GetSecretsInformer() (cache.SharedIndexInformer, error) { err := mgr.ensureSynced(false) if err != nil { - return nil, err + return nil, fmt.Errorf("error ensuring that the secrets manager is synced: %w", err) } return mgr.secretsInformer, nil } @@ -680,14 +716,14 @@ func (mgr *SettingsManager) GetConfigMapByName(configMapName string) (*apiv1.Con func (mgr *SettingsManager) GetResourcesFilter() (*ResourcesFilter, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-cm: %w", err) } rf := &ResourcesFilter{} if value, ok := argoCDCM.Data[resourceInclusionsKey]; ok { includedResources := make([]FilteredResource, 0) err := yaml.Unmarshal([]byte(value), &includedResources) if err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshalling included resources %w", err) } rf.ResourceInclusions = includedResources } @@ -696,7 +732,7 @@ func (mgr *SettingsManager) GetResourcesFilter() (*ResourcesFilter, error) { excludedResources := make([]FilteredResource, 0) err := yaml.Unmarshal([]byte(value), &excludedResources) if err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshalling excluded resources %w", err) } rf.ResourceExclusions = excludedResources } @@ -751,13 +787,13 @@ func (mgr *SettingsManager) GetServerRBACLogEnforceEnable() (bool, error) { func (mgr *SettingsManager) GetDeepLinks(deeplinkType string) ([]DeepLink, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-cm: %w", err) } deepLinks := make([]DeepLink, 0) if value, ok := argoCDCM.Data[deeplinkType]; ok { err := yaml.Unmarshal([]byte(value), &deepLinks) if err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshalling deep links %w", err) } } return deepLinks, nil @@ -820,7 +856,7 @@ func (mgr *SettingsManager) GetIgnoreResourceUpdatesOverrides() (map[string]v1al func (mgr *SettingsManager) GetIsIgnoreResourceUpdatesEnabled() (bool, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return false, err + return false, fmt.Errorf("error retrieving config map: %w", err) } if argoCDCM.Data[resourceIgnoreResourceUpdatesEnabledKey] == "" { @@ -834,7 +870,7 @@ func (mgr *SettingsManager) GetIsIgnoreResourceUpdatesEnabled() (bool, error) { func (mgr *SettingsManager) GetResourceOverrides() (map[string]v1alpha1.ResourceOverride, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving config map: %w", err) } resourceOverrides := map[string]v1alpha1.ResourceOverride{} if value, ok := argoCDCM.Data[resourceCustomizationsKey]; ok && value != "" { @@ -1028,7 +1064,7 @@ func (mgr *SettingsManager) GetHelmSettings() (*v1alpha1.HelmOptions, error) { func (mgr *SettingsManager) GetKustomizeSettings() (*KustomizeSettings, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-cm: %w", err) } kustomizeVersionsMap := map[string]KustomizeVersion{} buildOptions := map[string]string{} @@ -1088,14 +1124,14 @@ func addKustomizeVersion(prefix, name, path string, kvMap map[string]KustomizeVe func (mgr *SettingsManager) GetHelmRepositories() ([]HelmRepoCredentials, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving config map: %w", err) } helmRepositories := make([]HelmRepoCredentials, 0) helmRepositoriesStr := argoCDCM.Data[helmRepositoriesKey] if helmRepositoriesStr != "" { err := yaml.Unmarshal([]byte(helmRepositoriesStr), &helmRepositories) if err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshalling helm repositories: %w", err) } } return helmRepositories, nil @@ -1173,7 +1209,7 @@ func (mgr *SettingsManager) GetRepositoryCredentials() ([]RepositoryCredentials, // Get the config map outside of the lock argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving config map: %w", err) } mgr.mutex.Lock() @@ -1194,7 +1230,7 @@ func (mgr *SettingsManager) GetRepositoryCredentials() ([]RepositoryCredentials, func (mgr *SettingsManager) GetGoogleAnalytics() (*GoogleAnalytics, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving config map: %w", err) } return &GoogleAnalytics{ TrackingID: argoCDCM.Data[gaTrackingID], @@ -1205,7 +1241,7 @@ func (mgr *SettingsManager) GetGoogleAnalytics() (*GoogleAnalytics, error) { func (mgr *SettingsManager) GetHelp() (*Help, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving config map: %w", err) } chatText, ok := argoCDCM.Data[helpChatText] if !ok { @@ -1230,15 +1266,15 @@ func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error) { } argoCDCM, err := mgr.configmaps.ConfigMaps(mgr.namespace).Get(common.ArgoCDConfigMapName) if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-cm: %w", err) } argoCDSecret, err := mgr.secrets.Secrets(mgr.namespace).Get(common.ArgoCDSecretName) if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-secret: %w", err) } selector, err := labels.Parse(partOfArgoCDSelector) if err != nil { - return nil, err + return nil, fmt.Errorf("error parsing Argo CD selector %w", err) } secrets, err := mgr.secrets.Secrets(mgr.namespace).List(selector) if err != nil { @@ -1457,6 +1493,12 @@ func (mgr *SettingsManager) updateSettingsFromSecret(settings *ArgoCDSettings, a if gogsWebhookSecret := argoCDSecret.Data[settingsWebhookGogsSecretKey]; len(gogsWebhookSecret) > 0 { settings.WebhookGogsSecret = string(gogsWebhookSecret) } + if azureDevOpsUsername := argoCDSecret.Data[settingsWebhookAzureDevOpsUsernameKey]; len(azureDevOpsUsername) > 0 { + settings.WebhookAzureDevOpsUsername = string(azureDevOpsUsername) + } + if azureDevOpsPassword := argoCDSecret.Data[settingsWebhookAzureDevOpsPasswordKey]; len(azureDevOpsPassword) > 0 { + settings.WebhookAzureDevOpsPassword = string(azureDevOpsPassword) + } // The TLS certificate may be externally managed. We try to load it from an // external secret first. If the external secret doesn't exist, we either @@ -1576,6 +1618,12 @@ func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error { if settings.WebhookGogsSecret != "" { argoCDSecret.Data[settingsWebhookGogsSecretKey] = []byte(settings.WebhookGogsSecret) } + if settings.WebhookAzureDevOpsUsername != "" { + argoCDSecret.Data[settingsWebhookAzureDevOpsUsernameKey] = []byte(settings.WebhookAzureDevOpsUsername) + } + if settings.WebhookAzureDevOpsPassword != "" { + argoCDSecret.Data[settingsWebhookAzureDevOpsPasswordKey] = []byte(settings.WebhookAzureDevOpsPassword) + } // we only write the certificate to the secret if it's not externally // managed. if settings.Certificate != nil && !settings.CertificateIsExternal { @@ -1957,7 +2005,7 @@ func (mgr *SettingsManager) InitializeSettings(insecureModeEnabled bool) (*ArgoC // set JWT signature signature, err := util.MakeSignature(32) if err != nil { - return nil, err + return nil, fmt.Errorf("error setting JWT signature: %w", err) } cdSettings.ServerSignature = signature log.Info("Initialized server signature") @@ -2087,14 +2135,14 @@ func ReplaceStringSecret(val string, secretValues map[string]string) string { func (mgr *SettingsManager) GetGlobalProjectsSettings() ([]GlobalProjectSettings, error) { argoCDCM, err := mgr.getConfigMap() if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving argocd-cm: %w", err) } globalProjectSettings := make([]GlobalProjectSettings, 0) if value, ok := argoCDCM.Data[globalProjectsKey]; ok { if value != "" { err := yaml.Unmarshal([]byte(value), &globalProjectSettings) if err != nil { - return nil, err + return nil, fmt.Errorf("error unmarshalling global project settings: %w", err) } } } @@ -2116,3 +2164,22 @@ func (mgr *SettingsManager) GetResourceCustomLabels() ([]string, error) { } return []string{}, nil } + +func (mgr *SettingsManager) GetMaxWebhookPayloadSize() int64 { + argoCDCM, err := mgr.getConfigMap() + if err != nil { + return defaultMaxWebhookPayloadSize + } + + if argoCDCM.Data[settingsWebhookMaxPayloadSizeMB] == "" { + return defaultMaxWebhookPayloadSize + } + + maxPayloadSizeMB, err := strconv.ParseInt(argoCDCM.Data[settingsWebhookMaxPayloadSizeMB], 10, 64) + if err != nil { + log.Warnf("Failed to parse '%s' key: %v", settingsWebhookMaxPayloadSizeMB, err) + return defaultMaxWebhookPayloadSize + } + + return maxPayloadSizeMB * 1024 * 1024 +} diff --git a/vendor/github.com/argoproj/argo-cd/v2/util/tls/tls.go b/vendor/github.com/argoproj/argo-cd/v2/util/tls/tls.go index d963eed55c..5e18c8eb75 100644 --- a/vendor/github.com/argoproj/argo-cd/v2/util/tls/tls.go +++ b/vendor/github.com/argoproj/argo-cd/v2/util/tls/tls.go @@ -123,11 +123,11 @@ func tlsVersionsToStr(versions []uint16) []string { func getTLSConfigCustomizer(minVersionStr, maxVersionStr, tlsCiphersStr string) (ConfigCustomizer, error) { minVersion, err := getTLSVersionByString(minVersionStr) if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving TLS version by min version %q: %w", minVersionStr, err) } maxVersion, err := getTLSVersionByString(maxVersionStr) if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving TLS version by max version %q: %w", maxVersionStr, err) } if minVersion > maxVersion { return nil, fmt.Errorf("Minimum TLS version %s must not be higher than maximum TLS version %s", minVersionStr, maxVersionStr) @@ -153,7 +153,7 @@ func getTLSConfigCustomizer(minVersionStr, maxVersionStr, tlsCiphersStr string) if tlsCiphersStr != "" { cipherSuites, err = getTLSCipherSuitesByString(tlsCiphersStr) if err != nil { - return nil, err + return nil, fmt.Errorf("error retrieving TLS cipher suites: %w", err) } } else { cipherSuites = make([]uint16, 0) @@ -309,7 +309,7 @@ func generatePEM(opts CertOptions) ([]byte, []byte, error) { func GenerateX509KeyPair(opts CertOptions) (*tls.Certificate, error) { certpem, keypem, err := generatePEM(opts) if err != nil { - return nil, err + return nil, fmt.Errorf("error generating X509 key pair: %w", err) } cert, err := tls.X509KeyPair(certpem, keypem) if err != nil { @@ -420,7 +420,7 @@ func CreateServerTLSConfig(tlsCertPath, tlsKeyPath string, hosts []string) (*tls IsCA: false, }) if err != nil { - return nil, err + return nil, fmt.Errorf("error generating X509 key pair: %w", err) } cert = c } else { diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/cluster.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/cluster.go new file mode 100644 index 0000000000..70a365c7a1 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/cluster.go @@ -0,0 +1,1185 @@ +package cache + +import ( + "context" + "fmt" + "runtime/debug" + "sort" + "strings" + "sync" + "time" + + "github.com/go-logr/logr" + "golang.org/x/sync/semaphore" + authorizationv1 "k8s.io/api/authorization/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/api/errors" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/managedfields" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/kubernetes" + authType1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/pager" + watchutil "k8s.io/client-go/tools/watch" + "k8s.io/client-go/util/retry" + "k8s.io/klog/v2/klogr" + "k8s.io/kubectl/pkg/util/openapi" + + "github.com/argoproj/gitops-engine/pkg/utils/kube" + "github.com/argoproj/gitops-engine/pkg/utils/tracing" +) + +const ( + watchResourcesRetryTimeout = 1 * time.Second + ClusterRetryTimeout = 10 * time.Second + + // default duration before we invalidate entire cluster cache. Can be set to 0 to never invalidate cache + defaultClusterResyncTimeout = 24 * time.Hour + + // default duration before restarting individual resource watch + defaultWatchResyncTimeout = 10 * time.Minute + + // Same page size as in k8s.io/client-go/tools/pager/pager.go + defaultListPageSize = 500 + // Prefetch only a single page + defaultListPageBufferSize = 1 + // listSemaphore is used to limit the number of concurrent memory consuming operations on the + // k8s list queries results. + // Limit is required to avoid memory spikes during cache initialization. + // The default limit of 50 is chosen based on experiments. + defaultListSemaphoreWeight = 50 +) + +const ( + // RespectRbacDisabled default value for respectRbac + RespectRbacDisabled = iota + // RespectRbacNormal checks only api response for forbidden/unauthorized errors + RespectRbacNormal + // RespectRbacStrict checks both api response for forbidden/unauthorized errors and SelfSubjectAccessReview + RespectRbacStrict +) + +type apiMeta struct { + namespaced bool + watchCancel context.CancelFunc +} + +// ClusterInfo holds cluster cache stats +type ClusterInfo struct { + // Server holds cluster API server URL + Server string + // K8SVersion holds Kubernetes version + K8SVersion string + // ResourcesCount holds number of observed Kubernetes resources + ResourcesCount int + // APIsCount holds number of observed Kubernetes API count + APIsCount int + // LastCacheSyncTime holds time of most recent cache synchronization + LastCacheSyncTime *time.Time + // SyncError holds most recent cache synchronization error + SyncError error + // APIResources holds list of API resources supported by the cluster + APIResources []kube.APIResourceInfo +} + +// OnEventHandler is a function that handles Kubernetes event +type OnEventHandler func(event watch.EventType, un *unstructured.Unstructured) + +// OnPopulateResourceInfoHandler returns additional resource metadata that should be stored in cache +type OnPopulateResourceInfoHandler func(un *unstructured.Unstructured, isRoot bool) (info interface{}, cacheManifest bool) + +// OnResourceUpdatedHandler handlers resource update event +type OnResourceUpdatedHandler func(newRes *Resource, oldRes *Resource, namespaceResources map[kube.ResourceKey]*Resource) +type Unsubscribe func() + +type ClusterCache interface { + // EnsureSynced checks cache state and synchronizes it if necessary + EnsureSynced() error + // GetServerVersion returns observed cluster version + GetServerVersion() string + // GetAPIResources returns information about observed API resources + GetAPIResources() []kube.APIResourceInfo + // GetOpenAPISchema returns open API schema of supported API resources + GetOpenAPISchema() openapi.Resources + // GetGVKParser returns a parser able to build a TypedValue used in + // structured merge diffs. + GetGVKParser() *managedfields.GvkParser + // Invalidate cache and executes callback that optionally might update cache settings + Invalidate(opts ...UpdateSettingsFunc) + // FindResources returns resources that matches given list of predicates from specified namespace or everywhere if specified namespace is empty + FindResources(namespace string, predicates ...func(r *Resource) bool) map[kube.ResourceKey]*Resource + // IterateHierarchy iterates resource tree starting from the specified top level resource and executes callback for each resource in the tree. + // The action callback returns true if iteration should continue and false otherwise. + IterateHierarchy(key kube.ResourceKey, action func(resource *Resource, namespaceResources map[kube.ResourceKey]*Resource) bool) + // IsNamespaced answers if specified group/kind is a namespaced resource API or not + IsNamespaced(gk schema.GroupKind) (bool, error) + // GetManagedLiveObjs helps finding matching live K8S resources for a given resources list. + // The function returns all resources from cache for those `isManaged` function returns true and resources + // specified in targetObjs list. + GetManagedLiveObjs(targetObjs []*unstructured.Unstructured, isManaged func(r *Resource) bool) (map[kube.ResourceKey]*unstructured.Unstructured, error) + // GetClusterInfo returns cluster cache statistics + GetClusterInfo() ClusterInfo + // OnResourceUpdated register event handler that is executed every time when resource get's updated in the cache + OnResourceUpdated(handler OnResourceUpdatedHandler) Unsubscribe + // OnEvent register event handler that is executed every time when new K8S event received + OnEvent(handler OnEventHandler) Unsubscribe +} + +type WeightedSemaphore interface { + Acquire(ctx context.Context, n int64) error + TryAcquire(n int64) bool + Release(n int64) +} + +type ListRetryFunc func(err error) bool + +// NewClusterCache creates new instance of cluster cache +func NewClusterCache(config *rest.Config, opts ...UpdateSettingsFunc) *clusterCache { + log := klogr.New() + cache := &clusterCache{ + settings: Settings{ResourceHealthOverride: &noopSettings{}, ResourcesFilter: &noopSettings{}}, + apisMeta: make(map[schema.GroupKind]*apiMeta), + listPageSize: defaultListPageSize, + listPageBufferSize: defaultListPageBufferSize, + listSemaphore: semaphore.NewWeighted(defaultListSemaphoreWeight), + resources: make(map[kube.ResourceKey]*Resource), + nsIndex: make(map[string]map[kube.ResourceKey]*Resource), + config: config, + kubectl: &kube.KubectlCmd{ + Log: log, + Tracer: tracing.NopTracer{}, + }, + syncStatus: clusterCacheSync{ + resyncTimeout: defaultClusterResyncTimeout, + syncTime: nil, + }, + watchResyncTimeout: defaultWatchResyncTimeout, + clusterSyncRetryTimeout: ClusterRetryTimeout, + resourceUpdatedHandlers: map[uint64]OnResourceUpdatedHandler{}, + eventHandlers: map[uint64]OnEventHandler{}, + log: log, + listRetryLimit: 1, + listRetryUseBackoff: false, + listRetryFunc: ListRetryFuncNever, + } + for i := range opts { + opts[i](cache) + } + return cache +} + +type clusterCache struct { + syncStatus clusterCacheSync + + apisMeta map[schema.GroupKind]*apiMeta + serverVersion string + apiResources []kube.APIResourceInfo + // namespacedResources is a simple map which indicates a groupKind is namespaced + namespacedResources map[schema.GroupKind]bool + + // maximum time we allow watches to run before relisting the group/kind and restarting the watch + watchResyncTimeout time.Duration + // sync retry timeout for cluster when sync error happens + clusterSyncRetryTimeout time.Duration + + // size of a page for list operations pager. + listPageSize int64 + // number of pages to prefetch for list pager. + listPageBufferSize int32 + listSemaphore WeightedSemaphore + + // retry options for list operations + listRetryLimit int32 + listRetryUseBackoff bool + listRetryFunc ListRetryFunc + + // lock is a rw lock which protects the fields of clusterInfo + lock sync.RWMutex + resources map[kube.ResourceKey]*Resource + nsIndex map[string]map[kube.ResourceKey]*Resource + + kubectl kube.Kubectl + log logr.Logger + config *rest.Config + namespaces []string + clusterResources bool + settings Settings + + handlersLock sync.Mutex + handlerKey uint64 + populateResourceInfoHandler OnPopulateResourceInfoHandler + resourceUpdatedHandlers map[uint64]OnResourceUpdatedHandler + eventHandlers map[uint64]OnEventHandler + openAPISchema openapi.Resources + gvkParser *managedfields.GvkParser + + respectRBAC int +} + +type clusterCacheSync struct { + // When using this struct: + // 1) 'lock' mutex should be acquired when reading/writing from fields of this struct. + // 2) The parent 'clusterCache.lock' does NOT need to be owned to r/w from fields of this struct (if it is owned, that is fine, but see below) + // 3) To prevent deadlocks, do not acquire parent 'clusterCache.lock' after acquiring this lock; if you need both locks, always acquire the parent lock first + lock sync.Mutex + syncTime *time.Time + syncError error + resyncTimeout time.Duration +} + +// ListRetryFuncNever never retries on errors +func ListRetryFuncNever(err error) bool { + return false +} + +// ListRetryFuncAlways always retries on errors +func ListRetryFuncAlways(err error) bool { + return true +} + +// OnResourceUpdated register event handler that is executed every time when resource get's updated in the cache +func (c *clusterCache) OnResourceUpdated(handler OnResourceUpdatedHandler) Unsubscribe { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + key := c.handlerKey + c.handlerKey++ + c.resourceUpdatedHandlers[key] = handler + return func() { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + delete(c.resourceUpdatedHandlers, key) + } +} + +func (c *clusterCache) getResourceUpdatedHandlers() []OnResourceUpdatedHandler { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + var handlers []OnResourceUpdatedHandler + for _, h := range c.resourceUpdatedHandlers { + handlers = append(handlers, h) + } + return handlers +} + +// OnEvent register event handler that is executed every time when new K8S event received +func (c *clusterCache) OnEvent(handler OnEventHandler) Unsubscribe { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + key := c.handlerKey + c.handlerKey++ + c.eventHandlers[key] = handler + return func() { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + delete(c.eventHandlers, key) + } +} + +func (c *clusterCache) getEventHandlers() []OnEventHandler { + c.handlersLock.Lock() + defer c.handlersLock.Unlock() + handlers := make([]OnEventHandler, 0, len(c.eventHandlers)) + for _, h := range c.eventHandlers { + handlers = append(handlers, h) + } + return handlers +} + +// GetServerVersion returns observed cluster version +func (c *clusterCache) GetServerVersion() string { + return c.serverVersion +} + +// GetAPIResources returns information about observed API resources +func (c *clusterCache) GetAPIResources() []kube.APIResourceInfo { + c.lock.RLock() + defer c.lock.RUnlock() + + return c.apiResources +} + +// GetOpenAPISchema returns open API schema of supported API resources +func (c *clusterCache) GetOpenAPISchema() openapi.Resources { + return c.openAPISchema +} + +// GetGVKParser returns a parser able to build a TypedValue used in +// structured merge diffs. +func (c *clusterCache) GetGVKParser() *managedfields.GvkParser { + return c.gvkParser +} + +func (c *clusterCache) appendAPIResource(info kube.APIResourceInfo) { + exists := false + for i := range c.apiResources { + if c.apiResources[i].GroupKind == info.GroupKind && c.apiResources[i].GroupVersionResource.Version == info.GroupVersionResource.Version { + exists = true + break + } + } + if !exists { + c.apiResources = append(c.apiResources, info) + } +} + +func (c *clusterCache) deleteAPIResource(info kube.APIResourceInfo) { + for i := range c.apiResources { + if c.apiResources[i].GroupKind == info.GroupKind && c.apiResources[i].GroupVersionResource.Version == info.GroupVersionResource.Version { + c.apiResources[i] = c.apiResources[len(c.apiResources)-1] + c.apiResources = c.apiResources[:len(c.apiResources)-1] + break + } + } +} + +func (c *clusterCache) replaceResourceCache(gk schema.GroupKind, resources []*Resource, ns string) { + objByKey := make(map[kube.ResourceKey]*Resource) + for i := range resources { + objByKey[resources[i].ResourceKey()] = resources[i] + } + + // update existing nodes + for i := range resources { + res := resources[i] + oldRes := c.resources[res.ResourceKey()] + if oldRes == nil || oldRes.ResourceVersion != res.ResourceVersion { + c.onNodeUpdated(oldRes, res) + } + } + + for key := range c.resources { + if key.Kind != gk.Kind || key.Group != gk.Group || ns != "" && key.Namespace != ns { + continue + } + + if _, ok := objByKey[key]; !ok { + c.onNodeRemoved(key) + } + } +} + +func (c *clusterCache) newResource(un *unstructured.Unstructured) *Resource { + ownerRefs, isInferredParentOf := c.resolveResourceReferences(un) + + cacheManifest := false + var info interface{} + if c.populateResourceInfoHandler != nil { + info, cacheManifest = c.populateResourceInfoHandler(un, len(ownerRefs) == 0) + } + var creationTimestamp *metav1.Time + ct := un.GetCreationTimestamp() + if !ct.IsZero() { + creationTimestamp = &ct + } + resource := &Resource{ + ResourceVersion: un.GetResourceVersion(), + Ref: kube.GetObjectRef(un), + OwnerRefs: ownerRefs, + Info: info, + CreationTimestamp: creationTimestamp, + isInferredParentOf: isInferredParentOf, + } + if cacheManifest { + resource.Resource = un + } + + return resource +} + +func (c *clusterCache) setNode(n *Resource) { + key := n.ResourceKey() + c.resources[key] = n + ns, ok := c.nsIndex[key.Namespace] + if !ok { + ns = make(map[kube.ResourceKey]*Resource) + c.nsIndex[key.Namespace] = ns + } + ns[key] = n + + // update inferred parent references + if n.isInferredParentOf != nil || mightHaveInferredOwner(n) { + for k, v := range ns { + // update child resource owner references + if n.isInferredParentOf != nil && mightHaveInferredOwner(v) { + v.setOwnerRef(n.toOwnerRef(), n.isInferredParentOf(k)) + } + if mightHaveInferredOwner(n) && v.isInferredParentOf != nil { + n.setOwnerRef(v.toOwnerRef(), v.isInferredParentOf(n.ResourceKey())) + } + } + } +} + +// Invalidate cache and executes callback that optionally might update cache settings +func (c *clusterCache) Invalidate(opts ...UpdateSettingsFunc) { + c.lock.Lock() + defer c.lock.Unlock() + + c.syncStatus.lock.Lock() + c.syncStatus.syncTime = nil + c.syncStatus.lock.Unlock() + + for i := range c.apisMeta { + c.apisMeta[i].watchCancel() + } + for i := range opts { + opts[i](c) + } + c.apisMeta = nil + c.namespacedResources = nil + c.log.Info("Invalidated cluster") +} + +// clusterCacheSync's lock should be held before calling this method +func (syncStatus *clusterCacheSync) synced(clusterRetryTimeout time.Duration) bool { + syncTime := syncStatus.syncTime + + if syncTime == nil { + return false + } + if syncStatus.syncError != nil { + return time.Now().Before(syncTime.Add(clusterRetryTimeout)) + } + if syncStatus.resyncTimeout == 0 { + // cluster resync timeout has been disabled + return true + } + return time.Now().Before(syncTime.Add(syncStatus.resyncTimeout)) +} + +func (c *clusterCache) stopWatching(gk schema.GroupKind, ns string) { + c.lock.Lock() + defer c.lock.Unlock() + if info, ok := c.apisMeta[gk]; ok { + info.watchCancel() + delete(c.apisMeta, gk) + c.replaceResourceCache(gk, nil, ns) + c.log.Info(fmt.Sprintf("Stop watching: %s not found", gk)) + } +} + +// startMissingWatches lists supported cluster resources and start watching for changes unless watch is already running +func (c *clusterCache) startMissingWatches() error { + apis, err := c.kubectl.GetAPIResources(c.config, true, c.settings.ResourcesFilter) + if err != nil { + return err + } + client, err := c.kubectl.NewDynamicClient(c.config) + if err != nil { + return err + } + clientset, err := kubernetes.NewForConfig(c.config) + if err != nil { + return err + } + namespacedResources := make(map[schema.GroupKind]bool) + for i := range apis { + api := apis[i] + namespacedResources[api.GroupKind] = api.Meta.Namespaced + if _, ok := c.apisMeta[api.GroupKind]; !ok { + ctx, cancel := context.WithCancel(context.Background()) + c.apisMeta[api.GroupKind] = &apiMeta{namespaced: api.Meta.Namespaced, watchCancel: cancel} + + err := c.processApi(client, api, func(resClient dynamic.ResourceInterface, ns string) error { + resourceVersion, err := c.loadInitialState(ctx, api, resClient, ns, false) // don't lock here, we are already in a lock before startMissingWatches is called inside watchEvents + if err != nil && c.isRestrictedResource(err) { + keep := false + if c.respectRBAC == RespectRbacStrict { + k, permErr := c.checkPermission(ctx, clientset.AuthorizationV1().SelfSubjectAccessReviews(), api) + if permErr != nil { + return fmt.Errorf("failed to check permissions for resource %s: %w, original error=%v", api.GroupKind.String(), permErr, err.Error()) + } + keep = k + } + // if we are not allowed to list the resource, remove it from the watch list + if !keep { + delete(c.apisMeta, api.GroupKind) + delete(namespacedResources, api.GroupKind) + return nil + } + } + go c.watchEvents(ctx, api, resClient, ns, resourceVersion) + return nil + }) + if err != nil { + return err + } + } + } + c.namespacedResources = namespacedResources + return nil +} + +func runSynced(lock sync.Locker, action func() error) error { + lock.Lock() + defer lock.Unlock() + return action() +} + +// listResources creates list pager and enforces number of concurrent list requests +func (c *clusterCache) listResources(ctx context.Context, resClient dynamic.ResourceInterface, callback func(*pager.ListPager) error) (string, error) { + if err := c.listSemaphore.Acquire(ctx, 1); err != nil { + return "", err + } + defer c.listSemaphore.Release(1) + var retryCount int64 = 0 + resourceVersion := "" + listPager := pager.New(func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { + var res *unstructured.UnstructuredList + var listRetry wait.Backoff + + if c.listRetryUseBackoff { + listRetry = retry.DefaultBackoff + } else { + listRetry = retry.DefaultRetry + } + + listRetry.Steps = int(c.listRetryLimit) + err := retry.OnError(listRetry, c.listRetryFunc, func() error { + var ierr error + res, ierr = resClient.List(ctx, opts) + if ierr != nil { + // Log out a retry + if c.listRetryLimit > 1 && c.listRetryFunc(ierr) { + retryCount += 1 + c.log.Info(fmt.Sprintf("Error while listing resources: %v (try %d/%d)", ierr, retryCount, c.listRetryLimit)) + } + return ierr + } + resourceVersion = res.GetResourceVersion() + return nil + }) + return res, err + }) + listPager.PageBufferSize = c.listPageBufferSize + listPager.PageSize = c.listPageSize + + return resourceVersion, callback(listPager) +} + +func (c *clusterCache) loadInitialState(ctx context.Context, api kube.APIResourceInfo, resClient dynamic.ResourceInterface, ns string, lock bool) (string, error) { + return c.listResources(ctx, resClient, func(listPager *pager.ListPager) error { + var items []*Resource + err := listPager.EachListItem(ctx, metav1.ListOptions{}, func(obj runtime.Object) error { + if un, ok := obj.(*unstructured.Unstructured); !ok { + return fmt.Errorf("object %s/%s has an unexpected type", un.GroupVersionKind().String(), un.GetName()) + } else { + items = append(items, c.newResource(un)) + } + return nil + }) + + if err != nil { + return fmt.Errorf("failed to load initial state of resource %s: %w", api.GroupKind.String(), err) + } + if lock { + return runSynced(&c.lock, func() error { + c.replaceResourceCache(api.GroupKind, items, ns) + return nil + }) + } else { + c.replaceResourceCache(api.GroupKind, items, ns) + return nil + } + }) +} + +func (c *clusterCache) watchEvents(ctx context.Context, api kube.APIResourceInfo, resClient dynamic.ResourceInterface, ns string, resourceVersion string) { + kube.RetryUntilSucceed(ctx, watchResourcesRetryTimeout, fmt.Sprintf("watch %s on %s", api.GroupKind, c.config.Host), c.log, func() (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("Recovered from panic: %+v\n%s", r, debug.Stack()) + } + }() + + // load API initial state if no resource version provided + if resourceVersion == "" { + resourceVersion, err = c.loadInitialState(ctx, api, resClient, ns, true) + if err != nil { + return err + } + } + + w, err := watchutil.NewRetryWatcher(resourceVersion, &cache.ListWatch{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + res, err := resClient.Watch(ctx, options) + if errors.IsNotFound(err) { + c.stopWatching(api.GroupKind, ns) + } + return res, err + }, + }) + if err != nil { + return err + } + + defer func() { + w.Stop() + resourceVersion = "" + }() + + var watchResyncTimeoutCh <-chan time.Time + if c.watchResyncTimeout > 0 { + shouldResync := time.NewTimer(c.watchResyncTimeout) + defer shouldResync.Stop() + watchResyncTimeoutCh = shouldResync.C + } + + for { + select { + // stop watching when parent context got cancelled + case <-ctx.Done(): + return nil + + // re-synchronize API state and restart watch periodically + case <-watchResyncTimeoutCh: + return fmt.Errorf("Resyncing %s on %s due to timeout", api.GroupKind, c.config.Host) + + // re-synchronize API state and restart watch if retry watcher failed to continue watching using provided resource version + case <-w.Done(): + return fmt.Errorf("Watch %s on %s has closed", api.GroupKind, c.config.Host) + + case event, ok := <-w.ResultChan(): + if !ok { + return fmt.Errorf("Watch %s on %s has closed", api.GroupKind, c.config.Host) + } + + obj, ok := event.Object.(*unstructured.Unstructured) + if !ok { + return fmt.Errorf("Failed to convert to *unstructured.Unstructured: %v", event.Object) + } + + c.processEvent(event.Type, obj) + if kube.IsCRD(obj) { + var resources []kube.APIResourceInfo + crd := v1.CustomResourceDefinition{} + err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &crd) + if err != nil { + c.log.Error(err, "Failed to extract CRD resources") + } + for _, v := range crd.Spec.Versions { + resources = append(resources, kube.APIResourceInfo{ + GroupKind: schema.GroupKind{ + Group: crd.Spec.Group, Kind: crd.Spec.Names.Kind}, + GroupVersionResource: schema.GroupVersionResource{ + Group: crd.Spec.Group, Version: v.Name, Resource: crd.Spec.Names.Plural}, + Meta: metav1.APIResource{ + Group: crd.Spec.Group, + SingularName: crd.Spec.Names.Singular, + Namespaced: crd.Spec.Scope == v1.NamespaceScoped, + Name: crd.Spec.Names.Plural, + Kind: crd.Spec.Names.Singular, + Version: v.Name, + ShortNames: crd.Spec.Names.ShortNames, + }, + }) + } + + if event.Type == watch.Deleted { + for i := range resources { + c.deleteAPIResource(resources[i]) + } + } else { + // add new CRD's groupkind to c.apigroups + if event.Type == watch.Added { + for i := range resources { + c.appendAPIResource(resources[i]) + } + } + err = runSynced(&c.lock, func() error { + return c.startMissingWatches() + }) + if err != nil { + c.log.Error(err, "Failed to start missing watch") + } + } + err = runSynced(&c.lock, func() error { + openAPISchema, gvkParser, err := c.kubectl.LoadOpenAPISchema(c.config) + if err != nil { + return fmt.Errorf("failed to load open api schema while handling CRD change: %w", err) + } + if gvkParser != nil { + c.gvkParser = gvkParser + } + c.openAPISchema = openAPISchema + return nil + }) + if err != nil { + c.log.Error(err, "Failed to reload open api schema") + } + } + } + } + }) +} + +func (c *clusterCache) processApi(client dynamic.Interface, api kube.APIResourceInfo, callback func(resClient dynamic.ResourceInterface, ns string) error) error { + resClient := client.Resource(api.GroupVersionResource) + switch { + // if manage whole cluster or resource is cluster level and cluster resources enabled + case len(c.namespaces) == 0 || (!api.Meta.Namespaced && c.clusterResources): + return callback(resClient, "") + // if manage some namespaces and resource is namespaced + case len(c.namespaces) != 0 && api.Meta.Namespaced: + for _, ns := range c.namespaces { + err := callback(resClient.Namespace(ns), ns) + if err != nil { + return err + } + } + } + + return nil +} + +// isRestrictedResource checks if the kube api call is unauthorized or forbidden +func (c *clusterCache) isRestrictedResource(err error) bool { + return c.respectRBAC != RespectRbacDisabled && (k8sErrors.IsForbidden(err) || k8sErrors.IsUnauthorized(err)) +} + +// checkPermission runs a self subject access review to check if the controller has permissions to list the resource +func (c *clusterCache) checkPermission(ctx context.Context, reviewInterface authType1.SelfSubjectAccessReviewInterface, api kube.APIResourceInfo) (keep bool, err error) { + sar := &authorizationv1.SelfSubjectAccessReview{ + Spec: authorizationv1.SelfSubjectAccessReviewSpec{ + ResourceAttributes: &authorizationv1.ResourceAttributes{ + Namespace: "*", + Verb: "list", // uses list verb to check for permissions + Resource: api.GroupVersionResource.Resource, + }, + }, + } + + switch { + // if manage whole cluster or resource is cluster level and cluster resources enabled + case len(c.namespaces) == 0 || (!api.Meta.Namespaced && c.clusterResources): + resp, err := reviewInterface.Create(ctx, sar, metav1.CreateOptions{}) + if err != nil { + return false, err + } + if resp != nil && resp.Status.Allowed { + return true, nil + } + // unsupported, remove from watch list + return false, nil + // if manage some namespaces and resource is namespaced + case len(c.namespaces) != 0 && api.Meta.Namespaced: + for _, ns := range c.namespaces { + sar.Spec.ResourceAttributes.Namespace = ns + resp, err := reviewInterface.Create(ctx, sar, metav1.CreateOptions{}) + if err != nil { + return false, err + } + if resp != nil && resp.Status.Allowed { + return true, nil + } else { + // unsupported, remove from watch list + return false, nil + } + } + } + // checkPermission follows the same logic of determining namespace/cluster resource as the processApi function + // so if neither of the cases match it means the controller will not watch for it so it is safe to return true. + return true, nil +} + +func (c *clusterCache) sync() error { + c.log.Info("Start syncing cluster") + + for i := range c.apisMeta { + c.apisMeta[i].watchCancel() + } + c.apisMeta = make(map[schema.GroupKind]*apiMeta) + c.resources = make(map[kube.ResourceKey]*Resource) + c.namespacedResources = make(map[schema.GroupKind]bool) + config := c.config + version, err := c.kubectl.GetServerVersion(config) + + if err != nil { + return err + } + c.serverVersion = version + apiResources, err := c.kubectl.GetAPIResources(config, false, NewNoopSettings()) + if err != nil { + return err + } + c.apiResources = apiResources + + openAPISchema, gvkParser, err := c.kubectl.LoadOpenAPISchema(config) + if err != nil { + return fmt.Errorf("failed to load open api schema while syncing cluster cache: %w", err) + } + + if gvkParser != nil { + c.gvkParser = gvkParser + } + + c.openAPISchema = openAPISchema + + apis, err := c.kubectl.GetAPIResources(c.config, true, c.settings.ResourcesFilter) + + if err != nil { + return err + } + client, err := c.kubectl.NewDynamicClient(c.config) + if err != nil { + return err + } + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return err + } + lock := sync.Mutex{} + err = kube.RunAllAsync(len(apis), func(i int) error { + api := apis[i] + + lock.Lock() + ctx, cancel := context.WithCancel(context.Background()) + info := &apiMeta{namespaced: api.Meta.Namespaced, watchCancel: cancel} + c.apisMeta[api.GroupKind] = info + c.namespacedResources[api.GroupKind] = api.Meta.Namespaced + lock.Unlock() + + return c.processApi(client, api, func(resClient dynamic.ResourceInterface, ns string) error { + resourceVersion, err := c.listResources(ctx, resClient, func(listPager *pager.ListPager) error { + return listPager.EachListItem(context.Background(), metav1.ListOptions{}, func(obj runtime.Object) error { + if un, ok := obj.(*unstructured.Unstructured); !ok { + return fmt.Errorf("object %s/%s has an unexpected type", un.GroupVersionKind().String(), un.GetName()) + } else { + lock.Lock() + c.setNode(c.newResource(un)) + lock.Unlock() + } + return nil + }) + }) + if err != nil { + if c.isRestrictedResource(err) { + keep := false + if c.respectRBAC == RespectRbacStrict { + k, permErr := c.checkPermission(ctx, clientset.AuthorizationV1().SelfSubjectAccessReviews(), api) + if permErr != nil { + return fmt.Errorf("failed to check permissions for resource %s: %w, original error=%v", api.GroupKind.String(), permErr, err.Error()) + } + keep = k + } + // if we are not allowed to list the resource, remove it from the watch list + if !keep { + lock.Lock() + delete(c.apisMeta, api.GroupKind) + delete(c.namespacedResources, api.GroupKind) + lock.Unlock() + return nil + } + } + return fmt.Errorf("failed to load initial state of resource %s: %w", api.GroupKind.String(), err) + } + + go c.watchEvents(ctx, api, resClient, ns, resourceVersion) + + return nil + }) + }) + + if err != nil { + return fmt.Errorf("failed to sync cluster %s: %v", c.config.Host, err) + } + + c.log.Info("Cluster successfully synced") + return nil +} + +// EnsureSynced checks cache state and synchronizes it if necessary +func (c *clusterCache) EnsureSynced() error { + syncStatus := &c.syncStatus + + // first check if cluster is synced *without acquiring the full clusterCache lock* + syncStatus.lock.Lock() + if syncStatus.synced(c.clusterSyncRetryTimeout) { + syncError := syncStatus.syncError + syncStatus.lock.Unlock() + return syncError + } + syncStatus.lock.Unlock() // release the lock, so that we can acquire the parent lock (see struct comment re: lock acquisition ordering) + + c.lock.Lock() + defer c.lock.Unlock() + syncStatus.lock.Lock() + defer syncStatus.lock.Unlock() + + // before doing any work, check once again now that we have the lock, to see if it got + // synced between the first check and now + if syncStatus.synced(c.clusterSyncRetryTimeout) { + return syncStatus.syncError + } + err := c.sync() + syncTime := time.Now() + syncStatus.syncTime = &syncTime + syncStatus.syncError = err + return syncStatus.syncError +} + +func (c *clusterCache) FindResources(namespace string, predicates ...func(r *Resource) bool) map[kube.ResourceKey]*Resource { + c.lock.RLock() + defer c.lock.RUnlock() + result := map[kube.ResourceKey]*Resource{} + resources := map[kube.ResourceKey]*Resource{} + if namespace != "" { + if ns, ok := c.nsIndex[namespace]; ok { + resources = ns + } + } else { + resources = c.resources + } + + for k := range resources { + r := resources[k] + matches := true + for i := range predicates { + if !predicates[i](r) { + matches = false + break + } + } + + if matches { + result[k] = r + } + } + return result +} + +// IterateHierarchy iterates resource tree starting from the specified top level resource and executes callback for each resource in the tree +func (c *clusterCache) IterateHierarchy(key kube.ResourceKey, action func(resource *Resource, namespaceResources map[kube.ResourceKey]*Resource) bool) { + c.lock.RLock() + defer c.lock.RUnlock() + if res, ok := c.resources[key]; ok { + nsNodes := c.nsIndex[key.Namespace] + if !action(res, nsNodes) { + return + } + childrenByUID := make(map[types.UID][]*Resource) + for _, child := range nsNodes { + if res.isParentOf(child) { + childrenByUID[child.Ref.UID] = append(childrenByUID[child.Ref.UID], child) + } + } + // make sure children has no duplicates + for _, children := range childrenByUID { + if len(children) > 0 { + // The object might have multiple children with the same UID (e.g. replicaset from apps and extensions group). It is ok to pick any object but we need to make sure + // we pick the same child after every refresh. + sort.Slice(children, func(i, j int) bool { + key1 := children[i].ResourceKey() + key2 := children[j].ResourceKey() + return strings.Compare(key1.String(), key2.String()) < 0 + }) + child := children[0] + if action(child, nsNodes) { + child.iterateChildren(nsNodes, map[kube.ResourceKey]bool{res.ResourceKey(): true}, func(err error, child *Resource, namespaceResources map[kube.ResourceKey]*Resource) bool { + if err != nil { + c.log.V(2).Info(err.Error()) + return false + } + return action(child, namespaceResources) + }) + } + } + } + } +} + +// IsNamespaced answers if specified group/kind is a namespaced resource API or not +func (c *clusterCache) IsNamespaced(gk schema.GroupKind) (bool, error) { + if isNamespaced, ok := c.namespacedResources[gk]; ok { + return isNamespaced, nil + } + return false, errors.NewNotFound(schema.GroupResource{Group: gk.Group}, "") +} + +func (c *clusterCache) managesNamespace(namespace string) bool { + for _, ns := range c.namespaces { + if ns == namespace { + return true + } + } + return false +} + +// GetManagedLiveObjs helps finding matching live K8S resources for a given resources list. +// The function returns all resources from cache for those `isManaged` function returns true and resources +// specified in targetObjs list. +func (c *clusterCache) GetManagedLiveObjs(targetObjs []*unstructured.Unstructured, isManaged func(r *Resource) bool) (map[kube.ResourceKey]*unstructured.Unstructured, error) { + c.lock.RLock() + defer c.lock.RUnlock() + + for _, o := range targetObjs { + if len(c.namespaces) > 0 { + if o.GetNamespace() == "" && !c.clusterResources { + return nil, fmt.Errorf("Cluster level %s %q can not be managed when in namespaced mode", o.GetKind(), o.GetName()) + } else if o.GetNamespace() != "" && !c.managesNamespace(o.GetNamespace()) { + return nil, fmt.Errorf("Namespace %q for %s %q is not managed", o.GetNamespace(), o.GetKind(), o.GetName()) + } + } + } + + managedObjs := make(map[kube.ResourceKey]*unstructured.Unstructured) + // iterate all objects in live state cache to find ones associated with app + for key, o := range c.resources { + if isManaged(o) && o.Resource != nil && len(o.OwnerRefs) == 0 { + managedObjs[key] = o.Resource + } + } + // but are simply missing our label + lock := &sync.Mutex{} + err := kube.RunAllAsync(len(targetObjs), func(i int) error { + targetObj := targetObjs[i] + key := kube.GetResourceKey(targetObj) + lock.Lock() + managedObj := managedObjs[key] + lock.Unlock() + + if managedObj == nil { + if existingObj, exists := c.resources[key]; exists { + if existingObj.Resource != nil { + managedObj = existingObj.Resource + } else { + var err error + managedObj, err = c.kubectl.GetResource(context.TODO(), c.config, targetObj.GroupVersionKind(), existingObj.Ref.Name, existingObj.Ref.Namespace) + if err != nil { + if errors.IsNotFound(err) { + return nil + } + return err + } + } + } else if _, watched := c.apisMeta[key.GroupKind()]; !watched { + var err error + managedObj, err = c.kubectl.GetResource(context.TODO(), c.config, targetObj.GroupVersionKind(), targetObj.GetName(), targetObj.GetNamespace()) + if err != nil { + if errors.IsNotFound(err) { + return nil + } + return err + } + } + } + + if managedObj != nil { + converted, err := c.kubectl.ConvertToVersion(managedObj, targetObj.GroupVersionKind().Group, targetObj.GroupVersionKind().Version) + if err != nil { + // fallback to loading resource from kubernetes if conversion fails + c.log.V(1).Info(fmt.Sprintf("Failed to convert resource: %v", err)) + managedObj, err = c.kubectl.GetResource(context.TODO(), c.config, targetObj.GroupVersionKind(), managedObj.GetName(), managedObj.GetNamespace()) + if err != nil { + if errors.IsNotFound(err) { + return nil + } + return err + } + } else { + managedObj = converted + } + lock.Lock() + managedObjs[key] = managedObj + lock.Unlock() + } + return nil + }) + if err != nil { + return nil, err + } + + return managedObjs, nil +} + +func (c *clusterCache) processEvent(event watch.EventType, un *unstructured.Unstructured) { + for _, h := range c.getEventHandlers() { + h(event, un) + } + key := kube.GetResourceKey(un) + if event == watch.Modified && skipAppRequeuing(key) { + return + } + + c.lock.Lock() + defer c.lock.Unlock() + existingNode, exists := c.resources[key] + if event == watch.Deleted { + if exists { + c.onNodeRemoved(key) + } + } else if event != watch.Deleted { + c.onNodeUpdated(existingNode, c.newResource(un)) + } +} + +func (c *clusterCache) onNodeUpdated(oldRes *Resource, newRes *Resource) { + c.setNode(newRes) + for _, h := range c.getResourceUpdatedHandlers() { + h(newRes, oldRes, c.nsIndex[newRes.Ref.Namespace]) + } +} + +func (c *clusterCache) onNodeRemoved(key kube.ResourceKey) { + existing, ok := c.resources[key] + if ok { + delete(c.resources, key) + ns, ok := c.nsIndex[key.Namespace] + if ok { + delete(ns, key) + if len(ns) == 0 { + delete(c.nsIndex, key.Namespace) + } + // remove ownership references from children with inferred references + if existing.isInferredParentOf != nil { + for k, v := range ns { + if mightHaveInferredOwner(v) && existing.isInferredParentOf(k) { + v.setOwnerRef(existing.toOwnerRef(), false) + } + } + } + } + for _, h := range c.getResourceUpdatedHandlers() { + h(nil, existing, ns) + } + } +} + +var ( + ignoredRefreshResources = map[string]bool{ + "/" + kube.EndpointsKind: true, + } +) + +// GetClusterInfo returns cluster cache statistics +func (c *clusterCache) GetClusterInfo() ClusterInfo { + c.lock.RLock() + defer c.lock.RUnlock() + c.syncStatus.lock.Lock() + defer c.syncStatus.lock.Unlock() + + return ClusterInfo{ + APIsCount: len(c.apisMeta), + K8SVersion: c.serverVersion, + ResourcesCount: len(c.resources), + Server: c.config.Host, + LastCacheSyncTime: c.syncStatus.syncTime, + SyncError: c.syncStatus.syncError, + APIResources: c.apiResources, + } +} + +// skipAppRequeuing checks if the object is an API type which we want to skip requeuing against. +// We ignore API types which have a high churn rate, and/or whose updates are irrelevant to the app +func skipAppRequeuing(key kube.ResourceKey) bool { + return ignoredRefreshResources[key.Group+"/"+key.Kind] +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/doc.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/doc.go new file mode 100644 index 0000000000..b45bd352c1 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/doc.go @@ -0,0 +1,9 @@ +/* +Package cache implements lightweight Kubernetes cluster caching that stores only resource references and ownership +references. In addition to references cache might be configured to store custom metadata and whole body of selected +resources. + +The library uses Kubernetes watch API to maintain cache up to date. This approach reduces number of Kubernetes +API requests and provides instant access to the required Kubernetes resources. +*/ +package cache diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/predicates.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/predicates.go new file mode 100644 index 0000000000..53c05529d7 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/predicates.go @@ -0,0 +1,14 @@ +package cache + +// TopLevelResource returns true if resource has no parents +func TopLevelResource(r *Resource) bool { + return len(r.OwnerRefs) == 0 +} + +// ResourceOfGroupKind returns predicate that matches resource by specified group and kind +func ResourceOfGroupKind(group string, kind string) func(r *Resource) bool { + return func(r *Resource) bool { + key := r.ResourceKey() + return key.Group == group && key.Kind == kind + } +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/references.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/references.go new file mode 100644 index 0000000000..2189836555 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/references.go @@ -0,0 +1,109 @@ +package cache + +import ( + "encoding/json" + "fmt" + "strings" + + v1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/types" + + "github.com/argoproj/gitops-engine/pkg/utils/kube" +) + +// mightHaveInferredOwner returns true of given resource might have inferred owners +func mightHaveInferredOwner(r *Resource) bool { + return r.Ref.GroupVersionKind().Group == "" && r.Ref.Kind == kube.PersistentVolumeClaimKind +} + +func (c *clusterCache) resolveResourceReferences(un *unstructured.Unstructured) ([]metav1.OwnerReference, func(kube.ResourceKey) bool) { + var isInferredParentOf func(_ kube.ResourceKey) bool + ownerRefs := un.GetOwnerReferences() + gvk := un.GroupVersionKind() + + switch { + + // Special case for endpoint. Remove after https://github.com/kubernetes/kubernetes/issues/28483 is fixed + case gvk.Group == "" && gvk.Kind == kube.EndpointsKind && len(un.GetOwnerReferences()) == 0: + ownerRefs = append(ownerRefs, metav1.OwnerReference{ + Name: un.GetName(), + Kind: kube.ServiceKind, + APIVersion: "v1", + }) + + // Special case for Operator Lifecycle Manager ClusterServiceVersion: + case un.GroupVersionKind().Group == "operators.coreos.com" && un.GetKind() == "ClusterServiceVersion": + if un.GetAnnotations()["olm.operatorGroup"] != "" { + ownerRefs = append(ownerRefs, metav1.OwnerReference{ + Name: un.GetAnnotations()["olm.operatorGroup"], + Kind: "OperatorGroup", + APIVersion: "operators.coreos.com/v1", + }) + } + + // Edge case: consider auto-created service account tokens as a child of service account objects + case un.GetKind() == kube.SecretKind && un.GroupVersionKind().Group == "": + if yes, ref := isServiceAccountTokenSecret(un); yes { + ownerRefs = append(ownerRefs, ref) + } + + case (un.GroupVersionKind().Group == "apps" || un.GroupVersionKind().Group == "extensions") && un.GetKind() == kube.StatefulSetKind: + if refs, err := isStatefulSetChild(un); err != nil { + c.log.Error(err, fmt.Sprintf("Failed to extract StatefulSet %s/%s PVC references", un.GetNamespace(), un.GetName())) + } else { + isInferredParentOf = refs + } + } + + return ownerRefs, isInferredParentOf +} + +func isStatefulSetChild(un *unstructured.Unstructured) (func(kube.ResourceKey) bool, error) { + sts := v1.StatefulSet{} + data, err := json.Marshal(un) + if err != nil { + return nil, err + } + err = json.Unmarshal(data, &sts) + if err != nil { + return nil, err + } + + templates := sts.Spec.VolumeClaimTemplates + return func(key kube.ResourceKey) bool { + if key.Kind == kube.PersistentVolumeClaimKind && key.GroupKind().Group == "" { + for _, templ := range templates { + if strings.HasPrefix(key.Name, fmt.Sprintf("%s-%s-", templ.Name, un.GetName())) { + return true + } + } + } + return false + }, nil +} + +func isServiceAccountTokenSecret(un *unstructured.Unstructured) (bool, metav1.OwnerReference) { + ref := metav1.OwnerReference{ + APIVersion: "v1", + Kind: kube.ServiceAccountKind, + } + + if typeVal, ok, err := unstructured.NestedString(un.Object, "type"); !ok || err != nil || typeVal != "kubernetes.io/service-account-token" { + return false, ref + } + + annotations := un.GetAnnotations() + if annotations == nil { + return false, ref + } + + id, okId := annotations["kubernetes.io/service-account.uid"] + name, okName := annotations["kubernetes.io/service-account.name"] + if okId && okName { + ref.Name = name + ref.UID = types.UID(id) + } + return ref.Name != "" && ref.UID != "", ref +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/resource.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/resource.go new file mode 100644 index 0000000000..4097f4dcaf --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/resource.go @@ -0,0 +1,101 @@ +package cache + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/argoproj/gitops-engine/pkg/utils/kube" +) + +// Resource holds the information about Kubernetes resource, ownership references and optional information +type Resource struct { + // ResourceVersion holds most recent observed resource version + ResourceVersion string + // Resource reference + Ref v1.ObjectReference + // References to resource owners + OwnerRefs []metav1.OwnerReference + // Optional creation timestamp of the resource + CreationTimestamp *metav1.Time + // Optional additional information about the resource + Info interface{} + // Optional whole resource manifest + Resource *unstructured.Unstructured + + // answers if resource is inferred parent of provided resource + isInferredParentOf func(key kube.ResourceKey) bool +} + +func (r *Resource) ResourceKey() kube.ResourceKey { + return kube.NewResourceKey(r.Ref.GroupVersionKind().Group, r.Ref.Kind, r.Ref.Namespace, r.Ref.Name) +} + +func (r *Resource) isParentOf(child *Resource) bool { + for i, ownerRef := range child.OwnerRefs { + + // backfill UID of inferred owner child references + if ownerRef.UID == "" && r.Ref.Kind == ownerRef.Kind && r.Ref.APIVersion == ownerRef.APIVersion && r.Ref.Name == ownerRef.Name { + ownerRef.UID = r.Ref.UID + child.OwnerRefs[i] = ownerRef + return true + } + + if r.Ref.UID == ownerRef.UID { + return true + } + } + + return false +} + +// setOwnerRef adds or removes specified owner reference +func (r *Resource) setOwnerRef(ref metav1.OwnerReference, add bool) { + index := -1 + for i, item := range r.OwnerRefs { + if item.UID == ref.UID { + index = i + break + } + } + added := index > -1 + if add != added { + if add { + r.OwnerRefs = append(r.OwnerRefs, ref) + } else { + r.OwnerRefs = append(r.OwnerRefs[:index], r.OwnerRefs[index+1:]...) + } + } +} + +func (r *Resource) toOwnerRef() metav1.OwnerReference { + return metav1.OwnerReference{UID: r.Ref.UID, Name: r.Ref.Name, Kind: r.Ref.Kind, APIVersion: r.Ref.APIVersion} +} + +func newResourceKeySet(set map[kube.ResourceKey]bool, keys ...kube.ResourceKey) map[kube.ResourceKey]bool { + newSet := make(map[kube.ResourceKey]bool) + for k, v := range set { + newSet[k] = v + } + for i := range keys { + newSet[keys[i]] = true + } + return newSet +} + +func (r *Resource) iterateChildren(ns map[kube.ResourceKey]*Resource, parents map[kube.ResourceKey]bool, action func(err error, child *Resource, namespaceResources map[kube.ResourceKey]*Resource) bool) { + for childKey, child := range ns { + if r.isParentOf(ns[childKey]) { + if parents[childKey] { + key := r.ResourceKey() + _ = action(fmt.Errorf("circular dependency detected. %s is child and parent of %s", childKey.String(), key.String()), child, ns) + } else { + if action(nil, child, ns) { + child.iterateChildren(ns, newResourceKeySet(parents, r.ResourceKey()), action) + } + } + } + } +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/cache/settings.go b/vendor/github.com/argoproj/gitops-engine/pkg/cache/settings.go new file mode 100644 index 0000000000..a7194d0ca4 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/cache/settings.go @@ -0,0 +1,172 @@ +package cache + +import ( + "time" + + "github.com/go-logr/logr" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/client-go/rest" + + "github.com/argoproj/gitops-engine/pkg/health" + "github.com/argoproj/gitops-engine/pkg/utils/kube" + "github.com/argoproj/gitops-engine/pkg/utils/tracing" +) + +// NewNoopSettings returns cache settings that has not health customizations and don't filter any resources +func NewNoopSettings() *noopSettings { + return &noopSettings{} +} + +type noopSettings struct { +} + +func (f *noopSettings) GetResourceHealth(_ *unstructured.Unstructured) (*health.HealthStatus, error) { + return nil, nil +} + +func (f *noopSettings) IsExcludedResource(_, _, _ string) bool { + return false +} + +// Settings caching customizations +type Settings struct { + // ResourceHealthOverride contains health assessment overrides + ResourceHealthOverride health.HealthOverride + // ResourcesFilter holds filter that excludes resources + ResourcesFilter kube.ResourceFilter +} + +type UpdateSettingsFunc func(cache *clusterCache) + +// SetKubectl allows to override kubectl wrapper implementation +func SetKubectl(kubectl kube.Kubectl) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.kubectl = kubectl + } +} + +// SetPopulateResourceInfoHandler updates handler that populates resource info +func SetPopulateResourceInfoHandler(handler OnPopulateResourceInfoHandler) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.populateResourceInfoHandler = handler + } +} + +// SetSettings updates caching settings +func SetSettings(settings Settings) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.settings = Settings{settings.ResourceHealthOverride, settings.ResourcesFilter} + } +} + +// SetNamespaces updates list of monitored namespaces +func SetNamespaces(namespaces []string) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.namespaces = namespaces + } +} + +// SetClusterResources specifies if cluster level resource included or not. +// Flag is used only if cluster is changed to namespaced mode using SetNamespaces setting +func SetClusterResources(val bool) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.clusterResources = val + } +} + +// SetConfig updates cluster rest config +func SetConfig(config *rest.Config) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.config = config + } +} + +// SetListPageSize sets the page size for list pager. +func SetListPageSize(listPageSize int64) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.listPageSize = listPageSize + } +} + +// SetListPageBufferSize sets the number of pages to prefetch for list pager. +func SetListPageBufferSize(listPageBufferSize int32) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.listPageBufferSize = listPageBufferSize + } +} + +// SetListSemaphore sets the semaphore for list operations. +// Taking an object rather than a number allows to share a semaphore among multiple caches if necessary. +func SetListSemaphore(listSemaphore WeightedSemaphore) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.listSemaphore = listSemaphore + } +} + +// SetResyncTimeout updates cluster re-sync timeout +func SetResyncTimeout(timeout time.Duration) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.syncStatus.lock.Lock() + defer cache.syncStatus.lock.Unlock() + + cache.syncStatus.resyncTimeout = timeout + } +} + +// SetWatchResyncTimeout updates cluster re-sync timeout +func SetWatchResyncTimeout(timeout time.Duration) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.watchResyncTimeout = timeout + } +} + +// SetClusterSyncRetryTimeout updates cluster sync retry timeout when sync error happens +func SetClusterSyncRetryTimeout(timeout time.Duration) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.clusterSyncRetryTimeout = timeout + } +} + +// SetLogr sets the logger to use. +func SetLogr(log logr.Logger) UpdateSettingsFunc { + return func(cache *clusterCache) { + cache.log = log + if kcmd, ok := cache.kubectl.(*kube.KubectlCmd); ok { + kcmd.Log = log + } + } +} + +// SetTracer sets the tracer to use. +func SetTracer(tracer tracing.Tracer) UpdateSettingsFunc { + return func(cache *clusterCache) { + if kcmd, ok := cache.kubectl.(*kube.KubectlCmd); ok { + kcmd.Tracer = tracer + } + } +} + +// SetRetryOptions sets cluster list retry options +func SetRetryOptions(maxRetries int32, useBackoff bool, retryFunc ListRetryFunc) UpdateSettingsFunc { + return func(cache *clusterCache) { + // Max retries must be at least one + if maxRetries < 1 { + maxRetries = 1 + } + cache.listRetryLimit = maxRetries + cache.listRetryUseBackoff = useBackoff + cache.listRetryFunc = retryFunc + } +} + +// SetRespectRBAC allows to set whether to respect the controller rbac in list/watches +func SetRespectRBAC(respectRBAC int) UpdateSettingsFunc { + return func(cache *clusterCache) { + // if invalid value is provided disable respect rbac + if respectRBAC < RespectRbacDisabled || respectRBAC > RespectRbacStrict { + cache.respectRBAC = RespectRbacDisabled + } else { + cache.respectRBAC = respectRBAC + } + } +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go index 4a93ef51aa..8918150f05 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go @@ -118,20 +118,6 @@ func isSupportedVerb(apiResource *metav1.APIResource, verb string) bool { return false } -type CreateGVKParserError struct { - err error -} - -func NewCreateGVKParserError(err error) *CreateGVKParserError { - return &CreateGVKParserError{ - err: err, - } -} - -func (e *CreateGVKParserError) Error() string { - return fmt.Sprintf("error creating gvk parser: %s", e.err) -} - // LoadOpenAPISchema will load all existing resource schemas from the cluster // and return: // - openapi.Resources: used for getting the proto.Schema from a GVK @@ -148,17 +134,14 @@ func (k *KubectlCmd) LoadOpenAPISchema(config *rest.Config) (openapi.Resources, if err != nil { return nil, nil, fmt.Errorf("error getting openapi resources: %s", err) } - gvkParser, err := newGVKParser(oapiGetter) + gvkParser, err := k.newGVKParser(oapiGetter) if err != nil { - // return a specific error type to allow gracefully handle - // creating GVK Parser bug: - // https://github.com/kubernetes/kubernetes/issues/103597 - return oapiResources, nil, NewCreateGVKParserError(err) + return oapiResources, nil, fmt.Errorf("error getting gvk parser: %s", err) } return oapiResources, gvkParser, nil } -func newGVKParser(oapiGetter *openapi.CachedOpenAPIGetter) (*managedfields.GvkParser, error) { +func (k *KubectlCmd) newGVKParser(oapiGetter discovery.OpenAPISchemaInterface) (*managedfields.GvkParser, error) { doc, err := oapiGetter.OpenAPISchema() if err != nil { return nil, fmt.Errorf("error getting openapi schema: %s", err) @@ -167,6 +150,11 @@ func newGVKParser(oapiGetter *openapi.CachedOpenAPIGetter) (*managedfields.GvkPa if err != nil { return nil, fmt.Errorf("error getting openapi data: %s", err) } + var taintedGVKs []schema.GroupVersionKind + models, taintedGVKs = newUniqueModels(models) + if len(taintedGVKs) > 0 { + k.Log.Info("Duplicate GVKs detected in OpenAPI schema. This could cause inaccurate diffs.", "gvks", taintedGVKs) + } gvkParser, err := managedfields.NewGVKParser(models, false) if err != nil { return nil, err diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/testdata/openapi_v2.json b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/testdata/openapi_v2.json new file mode 100644 index 0000000000..77b8246072 --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/testdata/openapi_v2.json @@ -0,0 +1,516 @@ +{ + "definitions": { + "additional_properties": [ + { + "name": "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource", + "value": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "singularName", + "namespaced", + "kind", + "verbs" + ], + "type": { + "value": [ + "object" + ] + }, + "properties": { + "additional_properties": [ + { + "name": "categories", + "value": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + }, + "vendor_extension": [ + { + "name": "x-kubernetes-list-type", + "value": { + "yaml": "atomic\n" + } + } + ] + } + }, + { + "name": "group", + "value": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "kind", + "value": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "name", + "value": { + "description": "name is the plural name of the resource.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "namespaced", + "value": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": { + "value": [ + "boolean" + ] + } + } + }, + { + "name": "shortNames", + "value": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + }, + "vendor_extension": [ + { + "name": "x-kubernetes-list-type", + "value": { + "yaml": "atomic\n" + } + } + ] + } + }, + { + "name": "singularName", + "value": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "storageVersionHash", + "value": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "verbs", + "value": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + } + } + }, + { + "name": "version", + "value": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": { + "value": [ + "string" + ] + } + } + } + ] + } + } + }, + { + "name": "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList", + "value": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "type": { + "value": [ + "object" + ] + }, + "properties": { + "additional_properties": [ + { + "name": "apiVersion", + "value": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "groupVersion", + "value": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "kind", + "value": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "resources", + "value": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "_ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" + } + ] + }, + "vendor_extension": [ + { + "name": "x-kubernetes-list-type", + "value": { + "yaml": "atomic\n" + } + } + ] + } + } + ] + }, + "vendor_extension": [ + { + "name": "x-kubernetes-group-version-kind", + "value": { + "yaml": "- group: \"\"\n kind: APIResourceList\n version: v1\n" + } + } + ] + } + }, + { + "name": "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList_v2", + "value": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "type": { + "value": [ + "object" + ] + }, + "properties": { + "additional_properties": [ + { + "name": "apiVersion", + "value": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "groupVersion", + "value": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "kind", + "value": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "resources", + "value": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "_ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource_v2" + } + ] + } + } + } + ] + }, + "vendor_extension": [ + { + "name": "x-kubernetes-group-version-kind", + "value": { + "yaml": "- group: \"\"\n kind: APIResourceList\n version: v1\n" + } + } + ] + } + }, + { + "name": "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource_v2", + "value": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "singularName", + "namespaced", + "kind", + "verbs" + ], + "type": { + "value": [ + "object" + ] + }, + "properties": { + "additional_properties": [ + { + "name": "categories", + "value": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + } + } + }, + { + "name": "group", + "value": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "kind", + "value": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "name", + "value": { + "description": "name is the plural name of the resource.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "namespaced", + "value": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": { + "value": [ + "boolean" + ] + } + } + }, + { + "name": "shortNames", + "value": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + } + } + }, + { + "name": "singularName", + "value": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "storageVersionHash", + "value": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": { + "value": [ + "string" + ] + } + } + }, + { + "name": "verbs", + "value": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": { + "value": [ + "array" + ] + }, + "items": { + "schema": [ + { + "type": { + "value": [ + "string" + ] + } + } + ] + } + } + }, + { + "name": "version", + "value": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": { + "value": [ + "string" + ] + } + } + } + ] + } + } + } + ] + } +} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go new file mode 100644 index 0000000000..31d2e98e9e --- /dev/null +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go @@ -0,0 +1,190 @@ +package kube + +import ( + "fmt" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/kube-openapi/pkg/util/proto" + "sort" +) + +/** +The upstream Kubernetes NewGVKParser method causes problems for Argo CD. +https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L73 + +The function fails in instances where it is probably more desirable for Argo CD to simply ignore the error and move on. +But since the upstream implementation doesn't offer the option to ignore the error, we have to mutate the input to the +function to completely avoid the case that can produce the error. + +When encountering the error from NewGVKParser, we used to just set the internal GVKParser instance to nil, log the +error as info, and move on. + +But Argo CD increasingly relies on the GVKParser to produce reliable diffs, especially with server-side diffing. And +we're better off with an incorrectly-initialized GVKParser than no GVKParser at all. + +To understand why NewGVKParser fails, we need to understand how Kubernetes constructs its OpenAPI models. + +Kubernetes contains a built-in OpenAPI document containing the `definitions` for every built-in Kubernetes API. This +document includes shared structs like APIResourceList. Some of these definitions include an +x-kubernetes-group-version-kind extension. + +Aggregated APIs produce their own OpenAPI documents, which are merged with the built-in OpenAPI document. The aggregated +API documents generally include all the definitions of all the structs which are used anywhere by the API. This often +includes some of the same structs as the built-in OpenAPI document. + +So when Kubernetes constructs the complete OpenAPI document (the one served at /openapi/v2), it merges the built-in +OpenAPI document with the aggregated API OpenAPI documents. + +When the aggregator encounters two different definitions for the same struct (as determined by a deep compare) with the +same GVK (as determined by the value in the x-kubernetes-group-version-kind extension), it appends a `_vX` suffix to the +definition name in the OpenAPI document (where X is the count of the number of times the aggregator has seen the same +definition). Basically, it's communicating "different APIs have different opinions about the structure of structs with +this GVK, so I'm going to give them different names and let you sort it out." +https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/aggregator/aggregator.go#L238-L279 + +This behavior is fine from the perspective of a typical Kubernetes API user. They download the OpenAPI document, they +see that there are two different "opinions" about the structure of a struct, and they can choose which one they want to +rely on. + +But Argo CD has to be generic. We need to take the provided OpenAPI document and use it to construct a GVKParser. And +the GVKParser (reasonably) rejects the OpenAPI document if it contains two definitions for the same struct. + +So we have to do some work to make the OpenAPI document palatable to the GVKParser. We have to remove the duplicate +definitions. Specifically, we take the first one and log a warning for each subsequent definition with the same GVK. + +In practice, this probably generally appears when a common aggregated API was built at a time significantly before the +current Kubernetes version. The most common case is that the metrics server is built against an older version of the +Kubernetes libraries, using old versions of the structs. When the metrics server is updated to use the latest version of +the Kubernetes libraries, the problems go away, because the aggregated API and Kubernetes agree about the shape of the +struct. + +Using the first encountered definition is imperfect and could result in unreliable diffs. But it's better than +constructing completely-wrong diffs due to the lack of a GVKParser. +*/ + +// uniqueModels is a model provider that ensures that no two models share the same gvk. Use newUniqueModels to +// initialize it and enforce uniqueness. +type uniqueModels struct { + models map[string]proto.Schema +} + +// LookupModel is public through the interface of Models. It +// returns a visitable schema from the given model name. +// Copied verbatim from here: https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/util/proto/document.go#L322-L326 +func (d *uniqueModels) LookupModel(model string) proto.Schema { + return d.models[model] +} + +// Copied verbatim from here: https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/util/proto/document.go#L328-L337 +func (d *uniqueModels) ListModels() []string { + models := []string{} + + for model := range d.models { + models = append(models, model) + } + + sort.Strings(models) + return models +} + +// newUniqueModels returns a new uniqueModels instance and a list of warnings for models that share the same gvk. +func newUniqueModels(models proto.Models) (proto.Models, []schema.GroupVersionKind) { + var taintedGVKs []schema.GroupVersionKind + gvks := map[schema.GroupVersionKind]string{} + um := &uniqueModels{models: map[string]proto.Schema{}} + for _, modelName := range models.ListModels() { + model := models.LookupModel(modelName) + if model == nil { + panic(fmt.Sprintf("ListModels returns a model that can't be looked-up for: %v", modelName)) + } + gvkList := parseGroupVersionKind(model) + gvk, wasProcessed := modelGvkWasAlreadyProcessed(model, gvks) + if !wasProcessed { + um.models[modelName] = model + + // Add GVKs to the map, so we can detect a duplicate GVK later. + for _, gvk := range gvkList { + if len(gvk.Kind) > 0 { + gvks[gvk] = modelName + } + } + } else { + taintedGVKs = append(taintedGVKs, gvk) + } + } + return um, taintedGVKs +} + +// modelGvkWasAlreadyProcessed inspects a model to determine if it would trigger a duplicate GVK error. The gvks map +// holds the GVKs of all the models that have already been processed. If the model would trigger a duplicate GVK error, +// the function returns the GVK that would trigger the error and true. Otherwise, it returns an empty GVK and false. +func modelGvkWasAlreadyProcessed(model proto.Schema, gvks map[schema.GroupVersionKind]string) (schema.GroupVersionKind, bool) { + gvkList := parseGroupVersionKind(model) + // Not every model has a GVK extension specified. For those models, this loop will be skipped. + for _, gvk := range gvkList { + // The kind length check is copied from managedfields.NewGVKParser. It's unclear what edge case it's handling, + // but the behavior of this function should match NewGVKParser. + if len(gvk.Kind) > 0 { + _, ok := gvks[gvk] + if ok { + // This is the only condition under which NewGVKParser would return a duplicate GVK error. + return gvk, true + } + } + } + return schema.GroupVersionKind{}, false +} + +// groupVersionKindExtensionKey is the key used to lookup the +// GroupVersionKind value for an object definition from the +// definition's "extensions" map. +// Copied verbatim from: https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L29-L32 +const groupVersionKindExtensionKey = "x-kubernetes-group-version-kind" + +// parseGroupVersionKind gets and parses GroupVersionKind from the extension. Returns empty if it doesn't have one. +// Copied verbatim from: https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L82-L128 +func parseGroupVersionKind(s proto.Schema) []schema.GroupVersionKind { + extensions := s.GetExtensions() + + gvkListResult := []schema.GroupVersionKind{} + + // Get the extensions + gvkExtension, ok := extensions[groupVersionKindExtensionKey] + if !ok { + return []schema.GroupVersionKind{} + } + + // gvk extension must be a list of at least 1 element. + gvkList, ok := gvkExtension.([]interface{}) + if !ok { + return []schema.GroupVersionKind{} + } + + for _, gvk := range gvkList { + // gvk extension list must be a map with group, version, and + // kind fields + gvkMap, ok := gvk.(map[interface{}]interface{}) + if !ok { + continue + } + group, ok := gvkMap["group"].(string) + if !ok { + continue + } + version, ok := gvkMap["version"].(string) + if !ok { + continue + } + kind, ok := gvkMap["kind"].(string) + if !ok { + continue + } + + gvkListResult = append(gvkListResult, schema.GroupVersionKind{ + Group: group, + Version: version, + Kind: kind, + }) + } + + return gvkListResult +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/auth/bearer/token.go b/vendor/github.com/aws/aws-sdk-go/aws/auth/bearer/token.go new file mode 100644 index 0000000000..dd950a286f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/auth/bearer/token.go @@ -0,0 +1,50 @@ +package bearer + +import ( + "github.com/aws/aws-sdk-go/aws" + "time" +) + +// Token provides a type wrapping a bearer token and expiration metadata. +type Token struct { + Value string + + CanExpire bool + Expires time.Time +} + +// Expired returns if the token's Expires time is before or equal to the time +// provided. If CanExpire is false, Expired will always return false. +func (t Token) Expired(now time.Time) bool { + if !t.CanExpire { + return false + } + now = now.Round(0) + return now.Equal(t.Expires) || now.After(t.Expires) +} + +// TokenProvider provides interface for retrieving bearer tokens. +type TokenProvider interface { + RetrieveBearerToken(aws.Context) (Token, error) +} + +// TokenProviderFunc provides a helper utility to wrap a function as a type +// that implements the TokenProvider interface. +type TokenProviderFunc func(aws.Context) (Token, error) + +// RetrieveBearerToken calls the wrapped function, returning the Token or +// error. +func (fn TokenProviderFunc) RetrieveBearerToken(ctx aws.Context) (Token, error) { + return fn(ctx) +} + +// StaticTokenProvider provides a utility for wrapping a static bearer token +// value within an implementation of a token provider. +type StaticTokenProvider struct { + Token Token +} + +// RetrieveBearerToken returns the static token specified. +func (s StaticTokenProvider) RetrieveBearerToken(aws.Context) (Token, error) { + return s.Token, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go index 6eda2a5557..4138e725dd 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go @@ -4,13 +4,13 @@ import ( "crypto/sha1" "encoding/hex" "encoding/json" - "fmt" "io/ioutil" "path/filepath" "strings" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/auth/bearer" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" @@ -55,6 +55,19 @@ type Provider struct { // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal. StartURL string + + // The filepath the cached token will be retrieved from. If unset Provider will + // use the startURL to determine the filepath at. + // + // ~/.aws/sso/cache/.json + // + // If custom cached token filepath is used, the Provider's startUrl + // parameter will be ignored. + CachedTokenFilepath string + + // Used by the SSOCredentialProvider if a token configuration + // profile is used in the shared config + TokenProvider bearer.TokenProvider } // NewCredentials returns a new AWS Single Sign-On (AWS SSO) credential provider. The ConfigProvider is expected to be configured @@ -89,13 +102,31 @@ func (p *Provider) Retrieve() (credentials.Value, error) { // RetrieveWithContext retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal // by exchanging the accessToken present in ~/.aws/sso/cache. func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { - tokenFile, err := loadTokenFile(p.StartURL) - if err != nil { - return credentials.Value{}, err + var accessToken *string + if p.TokenProvider != nil { + token, err := p.TokenProvider.RetrieveBearerToken(ctx) + if err != nil { + return credentials.Value{}, err + } + accessToken = &token.Value + } else { + if p.CachedTokenFilepath == "" { + cachedTokenFilePath, err := getCachedFilePath(p.StartURL) + if err != nil { + return credentials.Value{}, err + } + p.CachedTokenFilepath = cachedTokenFilePath + } + + tokenFile, err := loadTokenFile(p.CachedTokenFilepath) + if err != nil { + return credentials.Value{}, err + } + accessToken = &tokenFile.AccessToken } output, err := p.Client.GetRoleCredentialsWithContext(ctx, &sso.GetRoleCredentialsInput{ - AccessToken: &tokenFile.AccessToken, + AccessToken: accessToken, AccountId: &p.AccountID, RoleName: &p.RoleName, }) @@ -114,32 +145,13 @@ func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Val }, nil } -func getCacheFileName(url string) (string, error) { +func getCachedFilePath(startUrl string) (string, error) { hash := sha1.New() - _, err := hash.Write([]byte(url)) + _, err := hash.Write([]byte(startUrl)) if err != nil { return "", err } - return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil -} - -type rfc3339 time.Time - -func (r *rfc3339) UnmarshalJSON(bytes []byte) error { - var value string - - if err := json.Unmarshal(bytes, &value); err != nil { - return err - } - - parse, err := time.Parse(time.RFC3339, value) - if err != nil { - return fmt.Errorf("expected RFC3339 timestamp: %v", err) - } - - *r = rfc3339(parse) - - return nil + return filepath.Join(defaultCacheLocation(), strings.ToLower(hex.EncodeToString(hash.Sum(nil)))+".json"), nil } type token struct { @@ -153,13 +165,8 @@ func (t token) Expired() bool { return nowTime().Round(0).After(time.Time(t.ExpiresAt)) } -func loadTokenFile(startURL string) (t token, err error) { - key, err := getCacheFileName(startURL) - if err != nil { - return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) - } - - fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key)) +func loadTokenFile(cachedTokenPath string) (t token, err error) { + fileBytes, err := ioutil.ReadFile(cachedTokenPath) if err != nil { return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/sso_cached_token.go new file mode 100644 index 0000000000..f6fa88451a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/sso_cached_token.go @@ -0,0 +1,237 @@ +package ssocreds + +import ( + "crypto/sha1" + "encoding/hex" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go/internal/shareddefaults" + "io/ioutil" + "os" + "path/filepath" + "strconv" + "strings" + "time" +) + +var resolvedOsUserHomeDir = shareddefaults.UserHomeDir + +// StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or +// error if unable get derive the path. Key that will be used to compute a SHA1 +// value that is hex encoded. +// +// Derives the filepath using the Key as: +// +// ~/.aws/sso/cache/.json +func StandardCachedTokenFilepath(key string) (string, error) { + homeDir := resolvedOsUserHomeDir() + if len(homeDir) == 0 { + return "", fmt.Errorf("unable to get USER's home directory for cached token") + } + hash := sha1.New() + if _, err := hash.Write([]byte(key)); err != nil { + return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %v", err) + } + + cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json" + + return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil +} + +type tokenKnownFields struct { + AccessToken string `json:"accessToken,omitempty"` + ExpiresAt *rfc3339 `json:"expiresAt,omitempty"` + + RefreshToken string `json:"refreshToken,omitempty"` + ClientID string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` +} + +type cachedToken struct { + tokenKnownFields + UnknownFields map[string]interface{} `json:"-"` +} + +// MarshalJSON provides custom marshalling because the standard library Go marshaller ignores unknown/unspecified fields +// when marshalling from a struct: https://pkg.go.dev/encoding/json#Marshal +// This function adds some extra validation to the known fields and captures unknown fields. +func (t cachedToken) MarshalJSON() ([]byte, error) { + fields := map[string]interface{}{} + + setTokenFieldString(fields, "accessToken", t.AccessToken) + setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt) + + setTokenFieldString(fields, "refreshToken", t.RefreshToken) + setTokenFieldString(fields, "clientId", t.ClientID) + setTokenFieldString(fields, "clientSecret", t.ClientSecret) + + for k, v := range t.UnknownFields { + if _, ok := fields[k]; ok { + return nil, fmt.Errorf("unknown token field %v, duplicates known field", k) + } + fields[k] = v + } + + return json.Marshal(fields) +} + +func setTokenFieldString(fields map[string]interface{}, key, value string) { + if value == "" { + return + } + fields[key] = value +} +func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) { + if value == nil { + return + } + fields[key] = value +} + +// UnmarshalJSON provides custom unmarshalling because the standard library Go unmarshaller ignores unknown/unspecified +// fields when unmarshalling from a struct: https://pkg.go.dev/encoding/json#Unmarshal +// This function adds some extra validation to the known fields and captures unknown fields. +func (t *cachedToken) UnmarshalJSON(b []byte) error { + var fields map[string]interface{} + if err := json.Unmarshal(b, &fields); err != nil { + return nil + } + + t.UnknownFields = map[string]interface{}{} + + for k, v := range fields { + var err error + switch k { + case "accessToken": + err = getTokenFieldString(v, &t.AccessToken) + case "expiresAt": + err = getTokenFieldRFC3339(v, &t.ExpiresAt) + case "refreshToken": + err = getTokenFieldString(v, &t.RefreshToken) + case "clientId": + err = getTokenFieldString(v, &t.ClientID) + case "clientSecret": + err = getTokenFieldString(v, &t.ClientSecret) + default: + t.UnknownFields[k] = v + } + + if err != nil { + return fmt.Errorf("field %q, %v", k, err) + } + } + + return nil +} + +func getTokenFieldString(v interface{}, value *string) error { + var ok bool + *value, ok = v.(string) + if !ok { + return fmt.Errorf("expect value to be string, got %T", v) + } + return nil +} + +func getTokenFieldRFC3339(v interface{}, value **rfc3339) error { + var stringValue string + if err := getTokenFieldString(v, &stringValue); err != nil { + return err + } + + timeValue, err := parseRFC3339(stringValue) + if err != nil { + return err + } + + *value = &timeValue + return nil +} + +func loadCachedToken(filename string) (cachedToken, error) { + fileBytes, err := ioutil.ReadFile(filename) + if err != nil { + return cachedToken{}, fmt.Errorf("failed to read cached SSO token file, %v", err) + } + + var t cachedToken + if err := json.Unmarshal(fileBytes, &t); err != nil { + return cachedToken{}, fmt.Errorf("failed to parse cached SSO token file, %v", err) + } + + if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() { + return cachedToken{}, fmt.Errorf( + "cached SSO token must contain accessToken and expiresAt fields") + } + + return t, nil +} + +func storeCachedToken(filename string, t cachedToken, fileMode os.FileMode) (err error) { + tmpFilename := filename + ".tmp-" + strconv.FormatInt(nowTime().UnixNano(), 10) + if err := writeCacheFile(tmpFilename, fileMode, t); err != nil { + return err + } + + if err := os.Rename(tmpFilename, filename); err != nil { + return fmt.Errorf("failed to replace old cached SSO token file, %v", err) + } + + return nil +} + +func writeCacheFile(filename string, fileMode os.FileMode, t cachedToken) (err error) { + var f *os.File + f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode) + if err != nil { + return fmt.Errorf("failed to create cached SSO token file %v", err) + } + + defer func() { + closeErr := f.Close() + if err == nil && closeErr != nil { + err = fmt.Errorf("failed to close cached SSO token file, %v", closeErr) + } + }() + + encoder := json.NewEncoder(f) + + if err = encoder.Encode(t); err != nil { + return fmt.Errorf("failed to serialize cached SSO token, %v", err) + } + + return nil +} + +type rfc3339 time.Time + +// UnmarshalJSON decode rfc3339 from JSON format +func (r *rfc3339) UnmarshalJSON(bytes []byte) error { + var value string + var err error + + if err = json.Unmarshal(bytes, &value); err != nil { + return err + } + + *r, err = parseRFC3339(value) + return err +} + +func parseRFC3339(v string) (rfc3339, error) { + parsed, err := time.Parse(time.RFC3339, v) + if err != nil { + return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %v", err) + } + + return rfc3339(parsed), nil +} + +// MarshalJSON encode rfc3339 to JSON format time +func (r *rfc3339) MarshalJSON() ([]byte, error) { + value := time.Time(*r).Format(time.RFC3339) + + // Use JSON unmarshal to unescape the quoted value making use of JSON's + // quoting rules. + return json.Marshal(value) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/token_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/token_provider.go new file mode 100644 index 0000000000..7562cd0135 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/token_provider.go @@ -0,0 +1,139 @@ +package ssocreds + +import ( + "fmt" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/auth/bearer" + "github.com/aws/aws-sdk-go/service/ssooidc" +) + +// CreateTokenAPIClient provides the interface for the SSOTokenProvider's API +// client for calling CreateToken operation to refresh the SSO token. +type CreateTokenAPIClient interface { + CreateToken(input *ssooidc.CreateTokenInput) (*ssooidc.CreateTokenOutput, error) +} + +// SSOTokenProviderOptions provides the options for configuring the +// SSOTokenProvider. +type SSOTokenProviderOptions struct { + // Client that can be overridden + Client CreateTokenAPIClient + + // The path the file containing the cached SSO token will be read from. + // Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter. + CachedTokenFilepath string +} + +// SSOTokenProvider provides a utility for refreshing SSO AccessTokens for +// Bearer Authentication. The SSOTokenProvider can only be used to refresh +// already cached SSO Tokens. This utility cannot perform the initial SSO +// create token. +// +// The initial SSO create token should be preformed with the AWS CLI before the +// Go application using the SSOTokenProvider will need to retrieve the SSO +// token. If the AWS CLI has not created the token cache file, this provider +// will return an error when attempting to retrieve the cached token. +// +// This provider will attempt to refresh the cached SSO token periodically if +// needed when RetrieveBearerToken is called. +// +// A utility such as the AWS CLI must be used to initially create the SSO +// session and cached token file. +// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html +type SSOTokenProvider struct { + options SSOTokenProviderOptions +} + +// NewSSOTokenProvider returns an initialized SSOTokenProvider that will +// periodically refresh the SSO token cached stored in the cachedTokenFilepath. +// The cachedTokenFilepath file's content will be rewritten by the token +// provider when the token is refreshed. +// +// The client must be configured for the AWS region the SSO token was created for. +func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider { + options := SSOTokenProviderOptions{ + Client: client, + CachedTokenFilepath: cachedTokenFilepath, + } + for _, fn := range optFns { + fn(&options) + } + + provider := &SSOTokenProvider{ + options: options, + } + + return provider +} + +// RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath +// the SSOTokenProvider was created with. If the token has expired +// RetrieveBearerToken will attempt to refresh it. If the token cannot be +// refreshed or is not present an error will be returned. +// +// A utility such as the AWS CLI must be used to initially create the SSO +// session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html +func (p *SSOTokenProvider) RetrieveBearerToken(ctx aws.Context) (bearer.Token, error) { + cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath) + if err != nil { + return bearer.Token{}, err + } + + if cachedToken.ExpiresAt != nil && nowTime().After(time.Time(*cachedToken.ExpiresAt)) { + cachedToken, err = p.refreshToken(cachedToken) + if err != nil { + return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %v", err) + } + } + + expiresAt := toTime((*time.Time)(cachedToken.ExpiresAt)) + return bearer.Token{ + Value: cachedToken.AccessToken, + CanExpire: !expiresAt.IsZero(), + Expires: expiresAt, + }, nil +} + +func (p *SSOTokenProvider) refreshToken(token cachedToken) (cachedToken, error) { + if token.ClientSecret == "" || token.ClientID == "" || token.RefreshToken == "" { + return cachedToken{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed") + } + + createResult, err := p.options.Client.CreateToken(&ssooidc.CreateTokenInput{ + ClientId: &token.ClientID, + ClientSecret: &token.ClientSecret, + RefreshToken: &token.RefreshToken, + GrantType: aws.String("refresh_token"), + }) + if err != nil { + return cachedToken{}, fmt.Errorf("unable to refresh SSO token, %v", err) + } + + expiresAt := nowTime().Add(time.Duration(*createResult.ExpiresIn) * time.Second) + + token.AccessToken = *createResult.AccessToken + token.ExpiresAt = (*rfc3339)(&expiresAt) + token.RefreshToken = *createResult.RefreshToken + + fileInfo, err := os.Stat(p.options.CachedTokenFilepath) + if err != nil { + return cachedToken{}, fmt.Errorf("failed to stat cached SSO token file %v", err) + } + + if err = storeCachedToken(p.options.CachedTokenFilepath, token, fileInfo.Mode()); err != nil { + return cachedToken{}, fmt.Errorf("unable to cache refreshed SSO token, %v", err) + } + + return token, nil +} + +func toTime(p *time.Time) (v time.Time) { + if p == nil { + return v + } + + return *p +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 9943af744b..6027df1e18 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -39,6 +39,7 @@ const ( EuWest1RegionID = "eu-west-1" // Europe (Ireland). EuWest2RegionID = "eu-west-2" // Europe (London). EuWest3RegionID = "eu-west-3" // Europe (Paris). + IlCentral1RegionID = "il-central-1" // Israel (Tel Aviv). MeCentral1RegionID = "me-central-1" // Middle East (UAE). MeSouth1RegionID = "me-south-1" // Middle East (Bahrain). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). @@ -117,7 +118,7 @@ var awsPartition = partition{ DNSSuffix: "amazonaws.com", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { - reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$") + reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$") return reg }(), }, @@ -213,6 +214,9 @@ var awsPartition = partition{ "eu-west-3": region{ Description: "Europe (Paris)", }, + "il-central-1": region{ + Description: "Israel (Tel Aviv)", + }, "me-central-1": region{ Description: "Middle East (UAE)", }, @@ -356,6 +360,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -494,6 +501,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -1439,6 +1449,14 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "api.ecr.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, endpointKey{ Region: "me-central-1", }: endpoint{ @@ -1907,6 +1925,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -2247,6 +2268,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -2390,6 +2414,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -2475,6 +2502,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -2617,6 +2647,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -2660,6 +2693,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -2675,12 +2711,18 @@ var awsPartition = partition{ endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -2690,6 +2732,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -3375,6 +3420,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -3454,6 +3502,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "athena.ap-south-1.api.aws", }, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.ap-south-2.api.aws", + }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -3481,6 +3538,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "athena.ap-southeast-3.api.aws", }, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.ap-southeast-4.api.aws", + }, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -3499,6 +3565,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "athena.eu-central-1.api.aws", }, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.eu-central-2.api.aws", + }, endpointKey{ Region: "eu-north-1", }: endpoint{}, @@ -3517,6 +3592,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "athena.eu-south-1.api.aws", }, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.eu-south-2.api.aws", + }, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -3580,6 +3664,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.me-central-1.api.aws", + }, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -3791,6 +3884,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -4043,15 +4139,84 @@ var awsPartition = partition{ }, "backupstorage": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-east-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, + endpointKey{ + Region: "eu-west-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-3", + }: endpoint{}, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-south-1", + }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, + endpointKey{ + Region: "us-west-1", + }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, @@ -4645,6 +4810,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -4785,6 +4953,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -4950,6 +5121,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -5105,6 +5279,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -5327,6 +5504,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -5643,6 +5823,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -6761,6 +6944,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -6929,6 +7115,12 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, @@ -8026,6 +8218,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -8118,6 +8313,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -8269,6 +8467,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -8488,6 +8689,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -8497,18 +8701,27 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -8518,6 +8731,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -8651,6 +8867,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -8780,6 +8999,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "local", }: endpoint{ @@ -8985,6 +9207,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -9162,6 +9387,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -9331,6 +9559,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -9509,6 +9740,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -9627,6 +9861,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -9796,6 +10033,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -10433,6 +10673,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -10601,6 +10844,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -10778,6 +11024,9 @@ var awsPartition = partition{ }, "emr-containers": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, @@ -10811,6 +11060,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-north-1", }: endpoint{}, + endpointKey{ + Region: "eu-south-1", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -11127,6 +11379,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -11308,6 +11563,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -11540,6 +11798,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -12727,6 +12988,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -12736,6 +13000,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -12799,6 +13066,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -13808,11 +14078,21 @@ var awsPartition = partition{ }: endpoint{ Hostname: "internetmonitor.ap-northeast-2.api.aws", }, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{ + Hostname: "internetmonitor.ap-northeast-3.api.aws", + }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "internetmonitor.ap-south-1.api.aws", }, + endpointKey{ + Region: "ap-south-2", + }: endpoint{ + Hostname: "internetmonitor.ap-south-2.api.aws", + }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ @@ -13823,16 +14103,37 @@ var awsPartition = partition{ }: endpoint{ Hostname: "internetmonitor.ap-southeast-2.api.aws", }, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{ + Hostname: "internetmonitor.ap-southeast-3.api.aws", + }, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{ + Hostname: "internetmonitor.ap-southeast-4.api.aws", + }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "internetmonitor.ca-central-1.api.aws", }, + endpointKey{ + Region: "ca-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "internetmonitor-fips.ca-central-1.api.aws", + }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "internetmonitor.eu-central-1.api.aws", }, + endpointKey{ + Region: "eu-central-2", + }: endpoint{ + Hostname: "internetmonitor.eu-central-2.api.aws", + }, endpointKey{ Region: "eu-north-1", }: endpoint{ @@ -13843,6 +14144,11 @@ var awsPartition = partition{ }: endpoint{ Hostname: "internetmonitor.eu-south-1.api.aws", }, + endpointKey{ + Region: "eu-south-2", + }: endpoint{ + Hostname: "internetmonitor.eu-south-2.api.aws", + }, endpointKey{ Region: "eu-west-1", }: endpoint{ @@ -13858,6 +14164,16 @@ var awsPartition = partition{ }: endpoint{ Hostname: "internetmonitor.eu-west-3.api.aws", }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "internetmonitor.il-central-1.api.aws", + }, + endpointKey{ + Region: "me-central-1", + }: endpoint{ + Hostname: "internetmonitor.me-central-1.api.aws", + }, endpointKey{ Region: "me-south-1", }: endpoint{ @@ -13873,21 +14189,45 @@ var awsPartition = partition{ }: endpoint{ Hostname: "internetmonitor.us-east-1.api.aws", }, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "internetmonitor-fips.us-east-1.api.aws", + }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "internetmonitor.us-east-2.api.aws", }, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "internetmonitor-fips.us-east-2.api.aws", + }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "internetmonitor.us-west-1.api.aws", }, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "internetmonitor-fips.us-west-1.api.aws", + }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "internetmonitor.us-west-2.api.aws", }, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "internetmonitor-fips.us-west-2.api.aws", + }, }, }, "iot": service{ @@ -14611,12 +14951,140 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "api-ap-southeast-1", + }: endpoint{ + Hostname: "api.iottwinmaker.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + endpointKey{ + Region: "api-ap-southeast-2", + }: endpoint{ + Hostname: "api.iottwinmaker.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + endpointKey{ + Region: "api-eu-central-1", + }: endpoint{ + Hostname: "api.iottwinmaker.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + endpointKey{ + Region: "api-eu-west-1", + }: endpoint{ + Hostname: "api.iottwinmaker.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + endpointKey{ + Region: "api-us-east-1", + }: endpoint{ + Hostname: "api.iottwinmaker.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "api-us-west-2", + }: endpoint{ + Hostname: "api.iottwinmaker.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + endpointKey{ + Region: "data-ap-southeast-1", + }: endpoint{ + Hostname: "data.iottwinmaker.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + endpointKey{ + Region: "data-ap-southeast-2", + }: endpoint{ + Hostname: "data.iottwinmaker.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + endpointKey{ + Region: "data-eu-central-1", + }: endpoint{ + Hostname: "data.iottwinmaker.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + endpointKey{ + Region: "data-eu-west-1", + }: endpoint{ + Hostname: "data.iottwinmaker.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + endpointKey{ + Region: "data-us-east-1", + }: endpoint{ + Hostname: "data.iottwinmaker.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "data-us-west-2", + }: endpoint{ + Hostname: "data.iottwinmaker.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, + endpointKey{ + Region: "fips-api-us-east-1", + }: endpoint{ + Hostname: "api.iottwinmaker-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "fips-api-us-west-2", + }: endpoint{ + Hostname: "api.iottwinmaker-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + endpointKey{ + Region: "fips-data-us-east-1", + }: endpoint{ + Hostname: "data.iottwinmaker-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "fips-data-us-west-2", + }: endpoint{ + Hostname: "data.iottwinmaker-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ @@ -15174,6 +15642,11 @@ var awsPartition = partition{ }: endpoint{ Hostname: "kendra-ranking.eu-west-3.api.aws", }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "kendra-ranking.il-central-1.api.aws", + }, endpointKey{ Region: "me-central-1", }: endpoint{ @@ -15327,6 +15800,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -15882,6 +16358,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "kms-fips.il-central-1.amazonaws.com", + }, endpointKey{ Region: "il-central-1-fips", }: endpoint{ @@ -15889,6 +16374,7 @@ var awsPartition = partition{ CredentialScope: credentialScope{ Region: "il-central-1", }, + Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", @@ -16038,6 +16524,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -16047,6 +16536,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -16110,6 +16602,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -16375,6 +16870,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "lambda.il-central-1.api.aws", + }, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -17010,6 +17514,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -17479,6 +17986,9 @@ var awsPartition = partition{ }, "mediaconnect": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, @@ -17488,6 +17998,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, @@ -17497,6 +18010,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -17767,6 +18283,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -17816,6 +18335,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -17865,6 +18387,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -18134,6 +18659,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -18219,6 +18747,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -18682,6 +19213,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -19055,6 +19589,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -19064,6 +19601,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -19076,12 +19616,18 @@ var awsPartition = partition{ endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -19296,6 +19842,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -20041,6 +20590,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -20980,6 +21532,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -21140,6 +21695,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -21264,6 +21822,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -21704,6 +22265,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -22205,6 +22769,11 @@ var awsPartition = partition{ }: endpoint{ Hostname: "resource-explorer-2.eu-west-3.api.aws", }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "resource-explorer-2.il-central-1.api.aws", + }, endpointKey{ Region: "sa-east-1", }: endpoint{ @@ -22330,6 +22899,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -22590,6 +23162,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -22827,6 +23402,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -23198,6 +23776,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "s3.dualstack.il-central-1.amazonaws.com", + }, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -24235,6 +24822,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -24770,6 +25360,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-south-1", }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -24779,6 +25372,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -24791,12 +25387,18 @@ var awsPartition = partition{ endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -24907,7 +25509,7 @@ var awsPartition = partition{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.af-south-1.amazonaws.com", + Hostname: "servicediscovery.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", @@ -24916,7 +25518,7 @@ var awsPartition = partition{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-east-1.amazonaws.com", + Hostname: "servicediscovery.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", @@ -24925,7 +25527,7 @@ var awsPartition = partition{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-northeast-1.amazonaws.com", + Hostname: "servicediscovery.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", @@ -24934,7 +25536,7 @@ var awsPartition = partition{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-northeast-2.amazonaws.com", + Hostname: "servicediscovery.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", @@ -24943,7 +25545,7 @@ var awsPartition = partition{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-northeast-3.amazonaws.com", + Hostname: "servicediscovery.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", @@ -24952,7 +25554,7 @@ var awsPartition = partition{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-south-1.amazonaws.com", + Hostname: "servicediscovery.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", @@ -24961,7 +25563,7 @@ var awsPartition = partition{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-south-2.amazonaws.com", + Hostname: "servicediscovery.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", @@ -24970,7 +25572,7 @@ var awsPartition = partition{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-southeast-1.amazonaws.com", + Hostname: "servicediscovery.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", @@ -24979,7 +25581,7 @@ var awsPartition = partition{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-southeast-2.amazonaws.com", + Hostname: "servicediscovery.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", @@ -24988,7 +25590,7 @@ var awsPartition = partition{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-southeast-3.amazonaws.com", + Hostname: "servicediscovery.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", @@ -24997,7 +25599,7 @@ var awsPartition = partition{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ap-southeast-4.amazonaws.com", + Hostname: "servicediscovery.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", @@ -25006,7 +25608,7 @@ var awsPartition = partition{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.ca-central-1.amazonaws.com", + Hostname: "servicediscovery.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", @@ -25014,6 +25616,12 @@ var awsPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", }, + endpointKey{ + Region: "ca-central-1", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.ca-central-1.api.aws", + }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ @@ -25030,7 +25638,7 @@ var awsPartition = partition{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-central-1.amazonaws.com", + Hostname: "servicediscovery.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", @@ -25039,7 +25647,7 @@ var awsPartition = partition{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-central-2.amazonaws.com", + Hostname: "servicediscovery.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", @@ -25048,7 +25656,7 @@ var awsPartition = partition{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-north-1.amazonaws.com", + Hostname: "servicediscovery.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", @@ -25057,7 +25665,7 @@ var awsPartition = partition{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-south-1.amazonaws.com", + Hostname: "servicediscovery.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", @@ -25066,7 +25674,7 @@ var awsPartition = partition{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-south-2.amazonaws.com", + Hostname: "servicediscovery.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", @@ -25075,7 +25683,7 @@ var awsPartition = partition{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-west-1.amazonaws.com", + Hostname: "servicediscovery.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", @@ -25084,7 +25692,7 @@ var awsPartition = partition{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-west-2.amazonaws.com", + Hostname: "servicediscovery.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", @@ -25093,7 +25701,16 @@ var awsPartition = partition{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.eu-west-3.amazonaws.com", + Hostname: "servicediscovery.eu-west-3.api.aws", + }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", @@ -25102,7 +25719,7 @@ var awsPartition = partition{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.me-central-1.amazonaws.com", + Hostname: "servicediscovery.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", @@ -25111,7 +25728,7 @@ var awsPartition = partition{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.me-south-1.amazonaws.com", + Hostname: "servicediscovery.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", @@ -25120,34 +25737,7 @@ var awsPartition = partition{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.sa-east-1.amazonaws.com", - }, - endpointKey{ - Region: "servicediscovery", - }: endpoint{ - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - Deprecated: boxedTrue, - }, - endpointKey{ - Region: "servicediscovery", - Variant: fipsVariant, - }: endpoint{ - Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - Deprecated: boxedTrue, - }, - endpointKey{ - Region: "servicediscovery-fips", - }: endpoint{ - Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - Deprecated: boxedTrue, + Hostname: "servicediscovery.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", @@ -25156,7 +25746,7 @@ var awsPartition = partition{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.us-east-1.amazonaws.com", + Hostname: "servicediscovery.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", @@ -25164,6 +25754,12 @@ var awsPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-east-1.amazonaws.com", }, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-east-1.api.aws", + }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ @@ -25180,7 +25776,7 @@ var awsPartition = partition{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.us-east-2.amazonaws.com", + Hostname: "servicediscovery.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", @@ -25188,6 +25784,12 @@ var awsPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-east-2.amazonaws.com", }, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-east-2.api.aws", + }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ @@ -25204,7 +25806,7 @@ var awsPartition = partition{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.us-west-1.amazonaws.com", + Hostname: "servicediscovery.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", @@ -25212,6 +25814,12 @@ var awsPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-west-1.amazonaws.com", }, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-west-1.api.aws", + }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ @@ -25228,7 +25836,7 @@ var awsPartition = partition{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.us-west-2.amazonaws.com", + Hostname: "servicediscovery.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", @@ -25236,6 +25844,12 @@ var awsPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-west-2.amazonaws.com", }, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-west-2.api.aws", + }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ @@ -25611,75 +26225,6 @@ var awsPartition = partition{ }, "sms": service{ Endpoints: serviceEndpoints{ - endpointKey{ - Region: "af-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-east-1", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-1", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-2", - }: endpoint{}, - endpointKey{ - Region: "ap-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-1", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-2", - }: endpoint{}, - endpointKey{ - Region: "ca-central-1", - }: endpoint{}, - endpointKey{ - Region: "eu-central-1", - }: endpoint{}, - endpointKey{ - Region: "eu-north-1", - }: endpoint{}, - endpointKey{ - Region: "eu-south-1", - }: endpoint{}, - endpointKey{ - Region: "eu-west-1", - }: endpoint{}, - endpointKey{ - Region: "eu-west-2", - }: endpoint{}, - endpointKey{ - Region: "eu-west-3", - }: endpoint{}, - endpointKey{ - Region: "fips-us-east-1", - }: endpoint{ - Hostname: "sms-fips.us-east-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-east-1", - }, - Deprecated: boxedTrue, - }, - endpointKey{ - Region: "fips-us-east-2", - }: endpoint{ - Hostname: "sms-fips.us-east-2.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-east-2", - }, - Deprecated: boxedTrue, - }, - endpointKey{ - Region: "fips-us-west-1", - }: endpoint{ - Hostname: "sms-fips.us-west-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-west-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ @@ -25689,39 +26234,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "me-south-1", - }: endpoint{}, - endpointKey{ - Region: "sa-east-1", - }: endpoint{}, - endpointKey{ - Region: "us-east-1", - }: endpoint{}, - endpointKey{ - Region: "us-east-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "sms-fips.us-east-1.amazonaws.com", - }, - endpointKey{ - Region: "us-east-2", - }: endpoint{}, - endpointKey{ - Region: "us-east-2", - Variant: fipsVariant, - }: endpoint{ - Hostname: "sms-fips.us-east-2.amazonaws.com", - }, - endpointKey{ - Region: "us-west-1", - }: endpoint{}, - endpointKey{ - Region: "us-west-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "sms-fips.us-west-1.amazonaws.com", - }, endpointKey{ Region: "us-west-2", }: endpoint{}, @@ -26225,6 +26737,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -26343,7 +26858,173 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-east-1", }: endpoint{ - Hostname: "sqs-fips.us-east-1.amazonaws.com", + Hostname: "sqs-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-2", + }: endpoint{ + Hostname: "sqs-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-1", + }: endpoint{ + Hostname: "sqs-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-2", + }: endpoint{ + Hostname: "sqs-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-south-1", + }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + }: endpoint{ + SSLCommonName: "queue.{dnsSuffix}", + }, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "sqs-fips.us-east-1.amazonaws.com", + SSLCommonName: "queue.{dnsSuffix}", + }, + endpointKey{ + Region: "us-east-2", + }: endpoint{}, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "sqs-fips.us-east-2.amazonaws.com", + }, + endpointKey{ + Region: "us-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "sqs-fips.us-west-1.amazonaws.com", + }, + endpointKey{ + Region: "us-west-2", + }: endpoint{}, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "sqs-fips.us-west-2.amazonaws.com", + }, + }, + }, + "ssm": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-east-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-fips.ca-central-1.amazonaws.com", + }, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-3", + }: endpoint{}, + endpointKey{ + Region: "fips-ca-central-1", + }: endpoint{ + Hostname: "ssm-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-1", + }: endpoint{ + Hostname: "ssm-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, @@ -26352,7 +27033,7 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-east-2", }: endpoint{ - Hostname: "sqs-fips.us-east-2.amazonaws.com", + Hostname: "ssm-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, @@ -26361,7 +27042,7 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-west-1", }: endpoint{ - Hostname: "sqs-fips.us-west-1.amazonaws.com", + Hostname: "ssm-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, @@ -26370,12 +27051,15 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-west-2", }: endpoint{ - Hostname: "sqs-fips.us-west-2.amazonaws.com", + Hostname: "ssm-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -26387,15 +27071,12 @@ var awsPartition = partition{ }: endpoint{}, endpointKey{ Region: "us-east-1", - }: endpoint{ - SSLCommonName: "queue.{dnsSuffix}", - }, + }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ - Hostname: "sqs-fips.us-east-1.amazonaws.com", - SSLCommonName: "queue.{dnsSuffix}", + Hostname: "ssm-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", @@ -26404,7 +27085,7 @@ var awsPartition = partition{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ - Hostname: "sqs-fips.us-east-2.amazonaws.com", + Hostname: "ssm-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", @@ -26413,7 +27094,7 @@ var awsPartition = partition{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ - Hostname: "sqs-fips.us-west-1.amazonaws.com", + Hostname: "ssm-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", @@ -26422,69 +27103,36 @@ var awsPartition = partition{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ - Hostname: "sqs-fips.us-west-2.amazonaws.com", + Hostname: "ssm-fips.us-west-2.amazonaws.com", }, }, }, - "ssm": service{ + "ssm-contacts": service{ Endpoints: serviceEndpoints{ - endpointKey{ - Region: "af-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-east-1", - }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, - endpointKey{ - Region: "ap-northeast-3", - }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, - endpointKey{ - Region: "ap-south-2", - }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, - endpointKey{ - Region: "ap-southeast-3", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-4", - }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, - endpointKey{ - Region: "ca-central-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "ssm-fips.ca-central-1.amazonaws.com", - }, endpointKey{ Region: "eu-central-1", }: endpoint{}, - endpointKey{ - Region: "eu-central-2", - }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, - endpointKey{ - Region: "eu-south-1", - }: endpoint{}, - endpointKey{ - Region: "eu-south-2", - }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -26494,19 +27142,10 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, - endpointKey{ - Region: "fips-ca-central-1", - }: endpoint{ - Hostname: "ssm-fips.ca-central-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ - Hostname: "ssm-fips.us-east-1.amazonaws.com", + Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, @@ -26515,7 +27154,7 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-east-2", }: endpoint{ - Hostname: "ssm-fips.us-east-2.amazonaws.com", + Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, @@ -26524,7 +27163,7 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-west-1", }: endpoint{ - Hostname: "ssm-fips.us-west-1.amazonaws.com", + Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, @@ -26533,18 +27172,12 @@ var awsPartition = partition{ endpointKey{ Region: "fips-us-west-2", }: endpoint{ - Hostname: "ssm-fips.us-west-2.amazonaws.com", + Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "me-central-1", - }: endpoint{}, - endpointKey{ - Region: "me-south-1", - }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, @@ -26555,7 +27188,7 @@ var awsPartition = partition{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ - Hostname: "ssm-fips.us-east-1.amazonaws.com", + Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", @@ -26564,7 +27197,7 @@ var awsPartition = partition{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ - Hostname: "ssm-fips.us-east-2.amazonaws.com", + Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", @@ -26573,7 +27206,7 @@ var awsPartition = partition{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ - Hostname: "ssm-fips.us-west-1.amazonaws.com", + Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", @@ -26582,7 +27215,7 @@ var awsPartition = partition{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ - Hostname: "ssm-fips.us-west-2.amazonaws.com", + Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", }, }, }, @@ -26606,6 +27239,12 @@ var awsPartition = partition{ endpointKey{ Region: "ca-central-1", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com", + }, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -26621,21 +27260,90 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "fips-ca-central-1", + }: endpoint{ + Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-1", + }: endpoint{ + Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-2", + }: endpoint{ + Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-1", + }: endpoint{ + Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-2", + }: endpoint{ + Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com", + }, endpointKey{ Region: "us-east-2", }: endpoint{}, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com", + }, endpointKey{ Region: "us-west-1", }: endpoint{}, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com", + }, endpointKey{ Region: "us-west-2", }: endpoint{}, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com", + }, }, }, "ssm-sap": service{ @@ -26951,6 +27659,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -27075,15 +27786,6 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, - endpointKey{ - Region: "fips", - }: endpoint{ - Hostname: "storagegateway-fips.ca-central-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "ca-central-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -27238,107 +27940,113 @@ var awsPartition = partition{ Region: "eu-west-3", }: endpoint{}, endpointKey{ - Region: "local", - }: endpoint{ - Hostname: "localhost:8000", - Protocols: []string{"http"}, - CredentialScope: credentialScope{ - Region: "us-east-1", - }, - }, - endpointKey{ - Region: "me-central-1", - }: endpoint{}, - endpointKey{ - Region: "me-south-1", - }: endpoint{}, - endpointKey{ - Region: "sa-east-1", - }: endpoint{}, - endpointKey{ - Region: "us-east-1", - }: endpoint{}, - endpointKey{ - Region: "us-east-2", - }: endpoint{}, - endpointKey{ - Region: "us-west-1", - }: endpoint{}, - endpointKey{ - Region: "us-west-2", - }: endpoint{}, - }, - }, - "sts": service{ - PartitionEndpoint: "aws-global", - Endpoints: serviceEndpoints{ - endpointKey{ - Region: "af-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-east-1", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-1", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-2", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-3", - }: endpoint{}, - endpointKey{ - Region: "ap-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-south-2", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-1", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-2", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-3", - }: endpoint{}, - endpointKey{ - Region: "ap-southeast-4", - }: endpoint{}, - endpointKey{ - Region: "aws-global", - }: endpoint{ - Hostname: "sts.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-east-1", - }, - }, - endpointKey{ - Region: "ca-central-1", - }: endpoint{}, - endpointKey{ - Region: "eu-central-1", - }: endpoint{}, - endpointKey{ - Region: "eu-central-2", - }: endpoint{}, - endpointKey{ - Region: "eu-north-1", - }: endpoint{}, - endpointKey{ - Region: "eu-south-1", - }: endpoint{}, - endpointKey{ - Region: "eu-south-2", - }: endpoint{}, - endpointKey{ - Region: "eu-west-1", - }: endpoint{}, - endpointKey{ - Region: "eu-west-2", - }: endpoint{}, - endpointKey{ - Region: "eu-west-3", + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "local", + }: endpoint{ + Hostname: "localhost:8000", + Protocols: []string{"http"}, + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-south-1", + }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-2", + }: endpoint{}, + endpointKey{ + Region: "us-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-west-2", + }: endpoint{}, + }, + }, + "sts": service{ + PartitionEndpoint: "aws-global", + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-east-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-south-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, + endpointKey{ + Region: "aws-global", + }: endpoint{ + Hostname: "sts.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-3", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", @@ -27547,6 +28255,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -27692,6 +28403,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -27801,6 +28515,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -28275,6 +28992,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-3", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -29349,6 +30069,7 @@ var awsPartition = partition{ CredentialScope: credentialScope{ Region: "il-central-1", }, + Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-central-1", @@ -29413,6 +30134,23 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "waf-regional.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, + endpointKey{ + Region: "il-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "waf-regional-fips.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, endpointKey{ Region: "me-central-1", }: endpoint{ @@ -30063,6 +30801,7 @@ var awsPartition = partition{ CredentialScope: credentialScope{ Region: "il-central-1", }, + Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-central-1", @@ -30127,6 +30866,23 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "wafv2.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, + endpointKey{ + Region: "il-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "wafv2-fips.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, endpointKey{ Region: "me-central-1", }: endpoint{ @@ -30641,6 +31397,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -30979,6 +31738,16 @@ var awscnPartition = partition{ }: endpoint{}, }, }, + "backupstorage": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-north-1", + }: endpoint{}, + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{}, + }, + }, "batch": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -32162,6 +32931,27 @@ var awscnPartition = partition{ }, }, }, + "savingsplans": service{ + IsRegionalized: boxedTrue, + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-north-1", + }: endpoint{ + Hostname: "savingsplans.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{ + Hostname: "savingsplans.cn-northwest-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -32220,7 +33010,7 @@ var awscnPartition = partition{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.cn-north-1.amazonaws.com.cn", + Hostname: "servicediscovery.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", @@ -32229,7 +33019,7 @@ var awscnPartition = partition{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ - Hostname: "servicediscovery.cn-northwest-1.amazonaws.com.cn", + Hostname: "servicediscovery.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, @@ -32263,9 +33053,6 @@ var awscnPartition = partition{ endpointKey{ Region: "cn-north-1", }: endpoint{}, - endpointKey{ - Region: "cn-northwest-1", - }: endpoint{}, }, }, "snowball": service{ @@ -33395,6 +34182,16 @@ var awsusgovPartition = partition{ }: endpoint{}, }, }, + "backupstorage": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-gov-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-west-1", + }: endpoint{}, + }, + }, "batch": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, @@ -33820,6 +34617,15 @@ var awsusgovPartition = partition{ }, "codepipeline": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "fips-us-gov-east-1", + }: endpoint{ + Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ @@ -33832,6 +34638,12 @@ var awsusgovPartition = partition{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, + endpointKey{ + Region: "us-gov-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com", + }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, @@ -35700,6 +36512,38 @@ var awsusgovPartition = partition{ }, "iottwinmaker": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "api-us-gov-west-1", + }: endpoint{ + Hostname: "api.iottwinmaker.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + endpointKey{ + Region: "data-us-gov-west-1", + }: endpoint{ + Hostname: "data.iottwinmaker.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + endpointKey{ + Region: "fips-api-us-gov-west-1", + }: endpoint{ + Hostname: "api.iottwinmaker-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + endpointKey{ + Region: "fips-data-us-gov-west-1", + }: endpoint{ + Hostname: "data.iottwinmaker-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ @@ -37575,6 +38419,12 @@ var awsusgovPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com", }, + endpointKey{ + Region: "us-gov-east-1", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com", + }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ @@ -37599,6 +38449,12 @@ var awsusgovPartition = partition{ }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", }, + endpointKey{ + Region: "us-gov-west-1", + Variant: fipsVariant | dualStackVariant, + }: endpoint{ + Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", + }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ @@ -37673,15 +38529,6 @@ var awsusgovPartition = partition{ }, "sms": service{ Endpoints: serviceEndpoints{ - endpointKey{ - Region: "fips-us-gov-east-1", - }: endpoint{ - Hostname: "sms-fips.us-gov-east-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-gov-east-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ @@ -37691,15 +38538,6 @@ var awsusgovPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "us-gov-east-1", - }: endpoint{}, - endpointKey{ - Region: "us-gov-east-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "sms-fips.us-gov-east-1.amazonaws.com", - }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, @@ -39269,6 +40107,15 @@ var awsisoPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "fips-us-iso-west-1", + }: endpoint{ + Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, @@ -39278,6 +40125,15 @@ var awsisoPartition = partition{ }: endpoint{ Hostname: "rbin-fips.us-iso-east-1.c2s.ic.gov", }, + endpointKey{ + Region: "us-iso-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-iso-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov", + }, }, }, "rds": service{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go index 1d3f4c3adc..ea8e353765 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go @@ -14,6 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/shareddefaults" + "github.com/aws/aws-sdk-go/service/ssooidc" "github.com/aws/aws-sdk-go/service/sts" ) @@ -23,6 +24,10 @@ type CredentialsProviderOptions struct { // WebIdentityRoleProviderOptions configures a WebIdentityRoleProvider, // such as setting its ExpiryWindow. WebIdentityRoleProviderOptions func(*stscreds.WebIdentityRoleProvider) + + // ProcessProviderOptions configures a ProcessProvider, + // such as setting its Timeout. + ProcessProviderOptions func(*processcreds.ProcessProvider) } func resolveCredentials(cfg *aws.Config, @@ -33,7 +38,7 @@ func resolveCredentials(cfg *aws.Config, switch { case len(sessOpts.Profile) != 0: - // User explicitly provided an Profile in the session's configuration + // User explicitly provided a Profile in the session's configuration // so load that profile from shared config first. // Github(aws/aws-sdk-go#2727) return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts) @@ -134,7 +139,11 @@ func resolveCredsFromProfile(cfg *aws.Config, case len(sharedCfg.CredentialProcess) != 0: // Get credentials from CredentialProcess - creds = processcreds.NewCredentials(sharedCfg.CredentialProcess) + var optFns []func(*processcreds.ProcessProvider) + if sessOpts.CredentialsProviderOptions != nil && sessOpts.CredentialsProviderOptions.ProcessProviderOptions != nil { + optFns = append(optFns, sessOpts.CredentialsProviderOptions.ProcessProviderOptions) + } + creds = processcreds.NewCredentials(sharedCfg.CredentialProcess, optFns...) default: // Fallback to default credentials provider, include mock errors for @@ -173,8 +182,28 @@ func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers req return nil, err } + var optFns []func(provider *ssocreds.Provider) cfgCopy := cfg.Copy() - cfgCopy.Region = &sharedCfg.SSORegion + + if sharedCfg.SSOSession != nil { + cfgCopy.Region = &sharedCfg.SSOSession.SSORegion + cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedCfg.SSOSession.Name) + if err != nil { + return nil, err + } + // create oidcClient with AnonymousCredentials to avoid recursively resolving credentials + mySession := Must(NewSession(&aws.Config{ + Credentials: credentials.AnonymousCredentials, + })) + oidcClient := ssooidc.New(mySession, cfgCopy) + tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath) + optFns = append(optFns, func(p *ssocreds.Provider) { + p.TokenProvider = tokenProvider + p.CachedTokenFilepath = cachedPath + }) + } else { + cfgCopy.Region = &sharedCfg.SSORegion + } return ssocreds.NewCredentials( &Session{ @@ -184,6 +213,7 @@ func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers req sharedCfg.SSOAccountID, sharedCfg.SSORoleName, sharedCfg.SSOStartURL, + optFns..., ), nil } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index cbccb60bbe..8127c99a9a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -37,7 +37,7 @@ const ( // ErrSharedConfigSourceCollision will be returned if a section contains both // source_profile and credential_source -var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso", nil) +var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token", nil) // ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment // variables are empty and Environment was set as the credential source diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index 424c82b4d3..ea3ac0d031 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -26,6 +26,13 @@ const ( roleSessionNameKey = `role_session_name` // optional roleDurationSecondsKey = "duration_seconds" // optional + // Prefix to be used for SSO sections. These are supposed to only exist in + // the shared config file, not the credentials file. + ssoSectionPrefix = `sso-session ` + + // AWS Single Sign-On (AWS SSO) group + ssoSessionNameKey = "sso_session" + // AWS Single Sign-On (AWS SSO) group ssoAccountIDKey = "sso_account_id" ssoRegionKey = "sso_region" @@ -99,6 +106,10 @@ type sharedConfig struct { CredentialProcess string WebIdentityTokenFile string + // SSO session options + SSOSessionName string + SSOSession *ssoSession + SSOAccountID string SSORegion string SSORoleName string @@ -186,6 +197,20 @@ type sharedConfigFile struct { IniData ini.Sections } +// SSOSession provides the shared configuration parameters of the sso-session +// section. +type ssoSession struct { + Name string + SSORegion string + SSOStartURL string +} + +func (s *ssoSession) setFromIniSection(section ini.Section) { + updateString(&s.Name, section, ssoSessionNameKey) + updateString(&s.SSORegion, section, ssoRegionKey) + updateString(&s.SSOStartURL, section, ssoStartURL) +} + // loadSharedConfig retrieves the configuration from the list of files using // the profile provided. The order the files are listed will determine // precedence. Values in subsequent files will overwrite values defined in @@ -266,13 +291,13 @@ func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile s // profile only have credential provider options. cfg.clearAssumeRoleOptions() } else { - // First time a profile has been seen, It must either be a assume role - // credentials, or SSO. Assert if the credential type requires a role ARN, - // the ARN is also set, or validate that the SSO configuration is complete. + // First time a profile has been seen. Assert if the credential type + // requires a role ARN, the ARN is also set if err := cfg.validateCredentialsConfig(profile); err != nil { return err } } + profiles[profile] = struct{}{} if err := cfg.validateCredentialType(); err != nil { @@ -308,6 +333,30 @@ func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile s cfg.SourceProfile = srcCfg } + // If the profile contains an SSO session parameter, the session MUST exist + // as a section in the config file. Load the SSO session using the name + // provided. If the session section is not found or incomplete an error + // will be returned. + if cfg.hasSSOTokenProviderConfiguration() { + skippedFiles = 0 + for _, f := range files { + section, ok := f.IniData.GetSection(fmt.Sprintf(ssoSectionPrefix + strings.TrimSpace(cfg.SSOSessionName))) + if ok { + var ssoSession ssoSession + ssoSession.setFromIniSection(section) + ssoSession.Name = cfg.SSOSessionName + cfg.SSOSession = &ssoSession + break + } + skippedFiles++ + } + if skippedFiles == len(files) { + // If all files were skipped because the sso session section is not found, return + // the sso section not found error. + return fmt.Errorf("failed to find SSO session section, %v", cfg.SSOSessionName) + } + } + return nil } @@ -363,6 +412,10 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e cfg.S3UsEast1RegionalEndpoint = sre } + // AWS Single Sign-On (AWS SSO) + // SSO session options + updateString(&cfg.SSOSessionName, section, ssoSessionNameKey) + // AWS Single Sign-On (AWS SSO) updateString(&cfg.SSOAccountID, section, ssoAccountIDKey) updateString(&cfg.SSORegion, section, ssoRegionKey) @@ -461,32 +514,20 @@ func (cfg *sharedConfig) validateCredentialType() error { } func (cfg *sharedConfig) validateSSOConfiguration() error { - if !cfg.hasSSOConfiguration() { + if cfg.hasSSOTokenProviderConfiguration() { + err := cfg.validateSSOTokenProviderConfiguration() + if err != nil { + return err + } return nil } - var missing []string - if len(cfg.SSOAccountID) == 0 { - missing = append(missing, ssoAccountIDKey) - } - - if len(cfg.SSORegion) == 0 { - missing = append(missing, ssoRegionKey) - } - - if len(cfg.SSORoleName) == 0 { - missing = append(missing, ssoRoleNameKey) - } - - if len(cfg.SSOStartURL) == 0 { - missing = append(missing, ssoStartURL) - } - - if len(missing) > 0 { - return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", - cfg.Profile, strings.Join(missing, ", ")) + if cfg.hasLegacySSOConfiguration() { + err := cfg.validateLegacySSOConfiguration() + if err != nil { + return err + } } - return nil } @@ -525,15 +566,76 @@ func (cfg *sharedConfig) clearAssumeRoleOptions() { } func (cfg *sharedConfig) hasSSOConfiguration() bool { - switch { - case len(cfg.SSOAccountID) != 0: - case len(cfg.SSORegion) != 0: - case len(cfg.SSORoleName) != 0: - case len(cfg.SSOStartURL) != 0: - default: - return false + return cfg.hasSSOTokenProviderConfiguration() || cfg.hasLegacySSOConfiguration() +} + +func (c *sharedConfig) hasSSOTokenProviderConfiguration() bool { + return len(c.SSOSessionName) > 0 +} + +func (c *sharedConfig) hasLegacySSOConfiguration() bool { + return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0 +} + +func (c *sharedConfig) validateSSOTokenProviderConfiguration() error { + var missing []string + + if len(c.SSOSessionName) == 0 { + missing = append(missing, ssoSessionNameKey) } - return true + + if c.SSOSession == nil { + missing = append(missing, ssoSectionPrefix) + } else { + if len(c.SSOSession.SSORegion) == 0 { + missing = append(missing, ssoRegionKey) + } + + if len(c.SSOSession.SSOStartURL) == 0 { + missing = append(missing, ssoStartURL) + } + } + + if len(missing) > 0 { + return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", + c.Profile, strings.Join(missing, ", ")) + } + + if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix) + } + + if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURL, c.Profile, ssoStartURL, ssoSectionPrefix) + } + + return nil +} + +func (c *sharedConfig) validateLegacySSOConfiguration() error { + var missing []string + + if len(c.SSORegion) == 0 { + missing = append(missing, ssoRegionKey) + } + + if len(c.SSOStartURL) == 0 { + missing = append(missing, ssoStartURL) + } + + if len(c.SSOAccountID) == 0 { + missing = append(missing, ssoAccountIDKey) + } + + if len(c.SSORoleName) == 0 { + missing = append(missing, ssoRoleNameKey) + } + + if len(missing) > 0 { + return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", + c.Profile, strings.Join(missing, ", ")) + } + return nil } func oneOrNone(bs ...bool) bool { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 0240bd0be3..41386bab12 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -8,7 +8,7 @@ // Generally using the signer outside of the SDK should not require any additional // logic when using Go v1.5 or higher. The signer does this by taking advantage // of the URL.EscapedPath method. If your request URI requires additional escaping -// you many need to use the URL.Opaque to define what the raw URI should be sent +// you may need to use the URL.Opaque to define what the raw URI should be sent // to the service as. // // The signer will first check the URL.Opaque field, and use its value if set. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 25fce95a3e..0e5f95c1c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.44.290" +const SDKVersion = "1.44.317" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index 1d273ff0ec..ecc521f88f 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -287,6 +287,10 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) if tag.Get("location") != "header" || tag.Get("enum") == "" { return "", fmt.Errorf("%T is only supported with location header and enum shapes", value) } + if len(value) == 0 { + return "", errValueNotSet + } + buff := &bytes.Buffer{} for i, sv := range value { if sv == nil || len(*sv) == 0 { diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index b98e7076e3..b4d7de3c3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -769,7 +769,7 @@ func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleAct // If you finish before the timeout period ends, send a callback by using the // CompleteLifecycleAction API call. // -// For more information, see Amazon EC2 Auto Scaling lifecycle hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) +// For more information, see Complete a lifecycle action (https://docs.aws.amazon.com/autoscaling/ec2/userguide/completing-lifecycle-hooks.html) // in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4167,6 +4167,12 @@ func (c *AutoScaling) DescribeWarmPoolRequest(input *DescribeWarmPoolInput) (req Name: opDescribeWarmPool, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { @@ -4229,6 +4235,57 @@ func (c *AutoScaling) DescribeWarmPoolWithContext(ctx aws.Context, input *Descri return out, req.Send() } +// DescribeWarmPoolPages iterates over the pages of a DescribeWarmPool operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeWarmPool method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeWarmPool operation. +// pageNum := 0 +// err := client.DescribeWarmPoolPages(params, +// func(page *autoscaling.DescribeWarmPoolOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *AutoScaling) DescribeWarmPoolPages(input *DescribeWarmPoolInput, fn func(*DescribeWarmPoolOutput, bool) bool) error { + return c.DescribeWarmPoolPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeWarmPoolPagesWithContext same as DescribeWarmPoolPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AutoScaling) DescribeWarmPoolPagesWithContext(ctx aws.Context, input *DescribeWarmPoolInput, fn func(*DescribeWarmPoolOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeWarmPoolInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeWarmPoolRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeWarmPoolOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a "aws/request.Request" representing the @@ -4560,7 +4617,7 @@ func (c *AutoScaling) DetachTrafficSourcesRequest(input *DetachTrafficSourcesInp // // Detaches one or more traffic sources from the specified Auto Scaling group. // -// When you detach a taffic, it enters the Removing state while deregistering +// When you detach a traffic source, it enters the Removing state while deregistering // the instances in the group. When all instances are deregistered, then you // can no longer describe the traffic source using the DescribeTrafficSources // API call. The instances continue to run. @@ -6981,6 +7038,39 @@ func (s *Alarm) SetAlarmName(v string) *Alarm { return s } +// Specifies the CloudWatch alarm specification to use in an instance refresh. +type AlarmSpecification struct { + _ struct{} `type:"structure"` + + // The names of one or more CloudWatch alarms to monitor for the instance refresh. + // You can specify up to 10 alarms. + Alarms []*string `type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AlarmSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AlarmSpecification) GoString() string { + return s.String() +} + +// SetAlarms sets the Alarms field's value. +func (s *AlarmSpecification) SetAlarms(v []*string) *AlarmSpecification { + s.Alarms = v + return s +} + type AttachInstancesInput struct { _ struct{} `type:"structure"` @@ -18014,7 +18104,7 @@ type PutScalingPolicyInput struct { // The amount by which to scale, based on the specified adjustment type. A positive // value adds to the current capacity while a negative number removes from the - // current capacity. For exact capacity, you must specify a positive value. + // current capacity. For exact capacity, you must specify a non-negative value. // // Required if the policy type is SimpleScaling. (Not used with any other policy // type.) @@ -18687,8 +18777,13 @@ func (s RecordLifecycleActionHeartbeatOutput) GoString() string { type RefreshPreferences struct { _ struct{} `type:"structure"` + // (Optional) The CloudWatch alarm specification. CloudWatch alarms can be used + // to identify any issues and fail the operation if an alarm threshold is met. + AlarmSpecification *AlarmSpecification `type:"structure"` + // (Optional) Indicates whether to roll back the Auto Scaling group to its previous - // configuration if the instance refresh fails. The default is false. + // configuration if the instance refresh fails or a CloudWatch alarm threshold + // is met. The default is false. // // A rollback is not supported in the following situations: // @@ -18700,6 +18795,9 @@ type RefreshPreferences struct { // // * The Auto Scaling group uses the launch template's $Latest or $Default // version. + // + // For more information, see Undo changes with a rollback (https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-refresh-rollback.html) + // in the Amazon EC2 Auto Scaling User Guide. AutoRollback *bool `type:"boolean"` // (Optional) The amount of time, in seconds, to wait after a checkpoint before @@ -18812,6 +18910,12 @@ func (s RefreshPreferences) GoString() string { return s.String() } +// SetAlarmSpecification sets the AlarmSpecification field's value. +func (s *RefreshPreferences) SetAlarmSpecification(v *AlarmSpecification) *RefreshPreferences { + s.AlarmSpecification = v + return s +} + // SetAutoRollback sets the AutoRollback field's value. func (s *RefreshPreferences) SetAutoRollback(v bool) *RefreshPreferences { s.AutoRollback = &v @@ -18957,7 +19061,9 @@ type RollbackInstanceRefreshInput struct { _ struct{} `type:"structure"` // The name of the Auto Scaling group. - AutoScalingGroupName *string `min:"1" type:"string"` + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -18981,6 +19087,9 @@ func (s RollbackInstanceRefreshInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *RollbackInstanceRefreshInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RollbackInstanceRefreshInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) } @@ -19899,6 +20008,8 @@ type StartInstanceRefreshInput struct { // // * Checkpoints // + // * CloudWatch alarms + // // * Skip matching Preferences *RefreshPreferences `type:"structure"` @@ -20052,12 +20163,7 @@ type StepAdjustment struct { // The amount by which to scale, based on the specified adjustment type. A positive // value adds to the current capacity while a negative number removes from the - // current capacity. - // - // The amount by which to scale. The adjustment is based on the value that you - // specified in the AdjustmentType property (either an absolute number or a - // percentage). A positive value adds to the current capacity and a negative - // number subtracts from the current capacity. + // current capacity. For exact capacity, you must specify a non-negative value. // // ScalingAdjustment is a required field ScalingAdjustment *int64 `type:"integer" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 5bb86ce04d..2882d45568 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -346,8 +346,9 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // to read the entire body. // // The copy request charge is based on the storage class and Region that you -// specify for the destination object. For pricing information, see Amazon S3 -// pricing (http://aws.amazon.com/s3/pricing/). +// specify for the destination object. The request can also result in a data +// retrieval charge for the source if the source storage class bills for data +// retrieval. For pricing information, see Amazon S3 pricing (http://aws.amazon.com/s3/pricing/). // // Amazon S3 transfer acceleration does not support cross-Region copies. If // you request a cross-Region copy using a transfer acceleration endpoint, you @@ -6489,7 +6490,7 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req // use request parameters as selection criteria to return metadata about a subset // of all the object versions. // -// To use this operation, you must have permissions to perform the s3:ListBucketVersions +// To use this operation, you must have permission to perform the s3:ListBucketVersions // action. Be aware of the name difference. // // A 200 OK response can contain valid or invalid XML. Make sure to design your @@ -6800,20 +6801,22 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque // and handle it appropriately. Objects are returned sorted in an ascending // order of the respective key names in the list. For more information about // listing objects, see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html) +// in the Amazon S3 User Guide. // // To use this operation, you must have READ access to the bucket. // // To use this action in an Identity and Access Management (IAM) policy, you -// must have permissions to perform the s3:ListBucket action. The bucket owner +// must have permission to perform the s3:ListBucket action. The bucket owner // has this permission by default and can grant this permission to others. For // more information about permissions, see Permissions Related to Bucket Subresource // Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). +// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) +// in the Amazon S3 User Guide. // // This section describes the latest revision of this action. We recommend that -// you use this revised API for application development. For backward compatibility, -// Amazon S3 continues to support the prior version of this API, ListObjects -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). +// you use this revised API operation for application development. For backward +// compatibility, Amazon S3 continues to support the prior version of this API +// operation, ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). // // To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). // @@ -10706,6 +10709,7 @@ func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObject } var _ awserr.Error +var _ time.Time // SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent. // @@ -11378,7 +11382,7 @@ type AbortMultipartUploadInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -12767,7 +12771,7 @@ type CompleteMultipartUploadInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -13029,7 +13033,7 @@ type CompleteMultipartUploadOutput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Bucket *string `type:"string"` @@ -13473,7 +13477,7 @@ type CopyObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -14617,7 +14621,7 @@ type CreateMultipartUploadInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -15064,7 +15068,7 @@ type CreateMultipartUploadOutput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Bucket *string `locationName:"Bucket" type:"string"` @@ -17034,7 +17038,7 @@ type DeleteObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -17257,7 +17261,7 @@ type DeleteObjectTaggingInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -17424,7 +17428,7 @@ type DeleteObjectsInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -21694,7 +21698,7 @@ type GetObjectAttributesInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -21713,8 +21717,8 @@ type GetObjectAttributesInput struct { // Sets the maximum number of parts to return. MaxParts *int64 `location:"header" locationName:"x-amz-max-parts" type:"integer"` - // An XML header that specifies the fields at the root level that you want returned - // in the response. Fields that you do not specify are not returned. + // Specifies the fields at the root level that you want returned in the response. + // Fields that you do not specify are not returned. // // ObjectAttributes is a required field ObjectAttributes []*string `location:"header" locationName:"x-amz-object-attributes" type:"list" required:"true" enum:"ObjectAttributes"` @@ -22113,7 +22117,7 @@ type GetObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -23310,7 +23314,7 @@ type GetObjectTaggingInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -24008,7 +24012,7 @@ type HeadBucketInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -24139,7 +24143,7 @@ type HeadObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -27051,7 +27055,7 @@ type ListMultipartUploadsInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -27068,8 +27072,8 @@ type ListMultipartUploadsInput struct { Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key may contain any Unicode character; - // however, XML 1.0 parser cannot parse some characters, such as characters + // the encoding method to use. An object key can contain any Unicode character; + // however, the XML 1.0 parser cannot parse some characters, such as characters // with an ASCII value from 0 to 10. For characters that are not supported in // XML 1.0, you can add this parameter to request that Amazon S3 encode the // keys in the response. @@ -27098,8 +27102,8 @@ type ListMultipartUploadsInput struct { // Lists in-progress uploads only for those keys that begin with the specified // prefix. You can use prefixes to separate a bucket into different grouping - // of keys. (You can think of using prefix to make groups in the same way you'd - // use a folder in a file system.) + // of keys. (You can think of using prefix to make groups in the same way that + // you'd use a folder in a file system.) Prefix *string `location:"querystring" locationName:"prefix" type:"string"` // Confirms that the requester knows that they will be charged for the request. @@ -27257,9 +27261,9 @@ type ListMultipartUploadsOutput struct { // Encoding type used by Amazon S3 to encode object keys in the response. // - // If you specify encoding-type request parameter, Amazon S3 includes this element - // in the response, and returns encoded key name values in the following response - // elements: + // If you specify the encoding-type request parameter, Amazon S3 includes this + // element in the response, and returns encoded key name values in the following + // response elements: // // Delimiter, KeyMarker, Prefix, NextKeyMarker, Key. EncodingType *string `type:"string" enum:"EncodingType"` @@ -27420,8 +27424,8 @@ type ListObjectVersionsInput struct { Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key may contain any Unicode character; - // however, XML 1.0 parser cannot parse some characters, such as characters + // the encoding method to use. An object key can contain any Unicode character; + // however, the XML 1.0 parser cannot parse some characters, such as characters // with an ASCII value from 0 to 10. For characters that are not supported in // XML 1.0, you can add this parameter to request that Amazon S3 encode the // keys in the response. @@ -27435,7 +27439,7 @@ type ListObjectVersionsInput struct { // Specifies the key to start with when listing objects in a bucket. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` - // Sets the maximum number of keys returned in the response. By default the + // Sets the maximum number of keys returned in the response. By default, the // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. If additional keys satisfy the search criteria, // but were not returned because max-keys was exceeded, the response contains @@ -27443,11 +27447,15 @@ type ListObjectVersionsInput struct { // and version-id-marker. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` + // Specifies the optional fields that you want returned in the response. Fields + // that you do not specify are not returned. + OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` + // Use this parameter to select only those keys that begin with the specified // prefix. You can use prefixes to separate a bucket into different groupings - // of keys. (You can think of using prefix to make groups in the same way you'd - // use a folder in a file system.) You can use prefix with delimiter to roll - // up numerous objects into a single result under CommonPrefixes. + // of keys. (You can think of using prefix to make groups in the same way that + // you'd use a folder in a file system.) You can use prefix with delimiter to + // roll up numerous objects into a single result under CommonPrefixes. Prefix *string `location:"querystring" locationName:"prefix" type:"string"` // Confirms that the requester knows that they will be charged for the request. @@ -27538,6 +27546,12 @@ func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput { return s } +// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. +func (s *ListObjectVersionsInput) SetOptionalObjectAttributes(v []*string) *ListObjectVersionsInput { + s.OptionalObjectAttributes = v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput { s.Prefix = &v @@ -27603,16 +27617,16 @@ type ListObjectVersionsOutput struct { // Encoding type used by Amazon S3 to encode object key names in the XML response. // - // If you specify encoding-type request parameter, Amazon S3 includes this element - // in the response, and returns encoded key name values in the following response - // elements: + // If you specify the encoding-type request parameter, Amazon S3 includes this + // element in the response, and returns encoded key name values in the following + // response elements: // // KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter. EncodingType *string `type:"string" enum:"EncodingType"` // A flag that indicates whether Amazon S3 returned all of the results that // satisfied the search criteria. If your results were truncated, you can make - // a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker + // a follow-up paginated request by using the NextKeyMarker and NextVersionIdMarker // response parameters as a starting place in another request to return the // rest of the results. IsTruncated *bool `type:"boolean"` @@ -27770,18 +27784,18 @@ type ListObjectsInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // A delimiter is a character you use to group keys. + // A delimiter is a character that you use to group keys. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key may contain any Unicode character; - // however, XML 1.0 parser cannot parse some characters, such as characters + // the encoding method to use. An object key can contain any Unicode character; + // however, the XML 1.0 parser cannot parse some characters, such as characters // with an ASCII value from 0 to 10. For characters that are not supported in // XML 1.0, you can add this parameter to request that Amazon S3 encode the // keys in the response. @@ -27796,11 +27810,15 @@ type ListObjectsInput struct { // listing after this specified key. Marker can be any key in the bucket. Marker *string `location:"querystring" locationName:"marker" type:"string"` - // Sets the maximum number of keys returned in the response. By default the + // Sets the maximum number of keys returned in the response. By default, the // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` + // Specifies the optional fields that you want returned in the response. Fields + // that you do not specify are not returned. + OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` + // Limits the response to keys that begin with the specified prefix. Prefix *string `location:"querystring" locationName:"prefix" type:"string"` @@ -27887,6 +27905,12 @@ func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput { return s } +// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. +func (s *ListObjectsInput) SetOptionalObjectAttributes(v []*string) *ListObjectsInput { + s.OptionalObjectAttributes = v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput { s.Prefix = &v @@ -27940,7 +27964,7 @@ type ListObjectsOutput struct { // CommonPrefixes lists keys that act like subdirectories in the directory specified // by Prefix. // - // For example, if the prefix is notes/ and the delimiter is a slash (/) as + // For example, if the prefix is notes/ and the delimiter is a slash (/), as // in notes/summer/july, the common prefix is notes/summer/. All of the keys // that roll up into a common prefix count as a single return when calculating // the number of returns. @@ -27973,13 +27997,16 @@ type ListObjectsOutput struct { // The bucket name. Name *string `type:"string"` - // When response is truncated (the IsTruncated element value in the response - // is true), you can use the key name in this field as marker in the subsequent - // request to get next set of objects. Amazon S3 lists objects in alphabetical - // order Note: This element is returned only if you have delimiter request parameter - // specified. If response does not include the NextMarker and it is truncated, - // you can use the value of the last Key in the response as the marker in the - // subsequent request to get the next set of object keys. + // When the response is truncated (the IsTruncated element value in the response + // is true), you can use the key name in this field as the marker parameter + // in the subsequent request to get the next set of objects. Amazon S3 lists + // objects in alphabetical order. + // + // This element is returned only if you have the delimiter request parameter + // specified. If the response does not include the NextMarker element and it + // is truncated, you can use the value of the last Key element in the response + // as the marker parameter in the subsequent request to get the next set of + // object keys. NextMarker *string `type:"string"` // Keys that begin with the indicated prefix. @@ -28091,18 +28118,18 @@ type ListObjectsV2Input struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // ContinuationToken indicates Amazon S3 that the list is being continued on - // this bucket with a token. ContinuationToken is obfuscated and is not a real - // key. + // ContinuationToken indicates to Amazon S3 that the list is being continued + // on this bucket with a token. ContinuationToken is obfuscated and is not a + // real key. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - // A delimiter is a character you use to group keys. + // A delimiter is a character that you use to group keys. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` // Encoding type used by Amazon S3 to encode object keys in the response. @@ -28113,16 +28140,20 @@ type ListObjectsV2Input struct { // (access denied). ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - // The owner field is not present in listV2 by default, if you want to return - // owner field with each key in the result then set the fetch owner field to - // true. + // The owner field is not present in ListObjectsV2 by default. If you want to + // return the owner field with each key in the result, then set the FetchOwner + // field to true. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"` - // Sets the maximum number of keys returned in the response. By default the + // Sets the maximum number of keys returned in the response. By default, the // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` + // Specifies the optional fields that you want returned in the response. Fields + // that you do not specify are not returned. + OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` + // Limits the response to keys that begin with the specified prefix. Prefix *string `location:"querystring" locationName:"prefix" type:"string"` @@ -28219,6 +28250,12 @@ func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input { return s } +// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. +func (s *ListObjectsV2Input) SetOptionalObjectAttributes(v []*string) *ListObjectsV2Input { + s.OptionalObjectAttributes = v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input { s.Prefix = &v @@ -28312,11 +28349,11 @@ type ListObjectsV2Output struct { IsTruncated *bool `type:"boolean"` // KeyCount is the number of keys returned with this request. KeyCount will - // always be less than or equal to the MaxKeys field. Say you ask for 50 keys, - // your result will include 50 keys or fewer. + // always be less than or equal to the MaxKeys field. For example, if you ask + // for 50 keys, your result will include 50 keys or fewer. KeyCount *int64 `type:"integer"` - // Sets the maximum number of keys returned in the response. By default the + // Sets the maximum number of keys returned in the response. By default, the // action returns up to 1,000 key names. The response might contain fewer keys // but will never contain more. MaxKeys *int64 `type:"integer"` @@ -28335,7 +28372,7 @@ type ListObjectsV2Output struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. Name *string `type:"string"` @@ -28469,7 +28506,7 @@ type ListPartsInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -29095,10 +29132,10 @@ func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { type MetadataEntry struct { _ struct{} `type:"structure"` - // Name of the Object. + // Name of the object. Name *string `type:"string"` - // Value of the Object. + // Value of the object. Value *string `type:"string"` } @@ -29848,6 +29885,13 @@ type Object struct { // The owner of the object Owner *Owner `type:"structure"` + // Specifies the restoration status of an object. Objects in certain storage + // classes must be restored before they can be retrieved. For more information + // about these storage classes and how to work with archived objects, see Working + // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) + // in the Amazon S3 User Guide. + RestoreStatus *RestoreStatus `type:"structure"` + // Size in bytes of the object Size *int64 `type:"integer"` @@ -29903,6 +29947,12 @@ func (s *Object) SetOwner(v *Owner) *Object { return s } +// SetRestoreStatus sets the RestoreStatus field's value. +func (s *Object) SetRestoreStatus(v *RestoreStatus) *Object { + s.RestoreStatus = v + return s +} + // SetSize sets the Size field's value. func (s *Object) SetSize(v int64) *Object { s.Size = &v @@ -30251,6 +30301,13 @@ type ObjectVersion struct { // Specifies the owner of the object. Owner *Owner `type:"structure"` + // Specifies the restoration status of an object. Objects in certain storage + // classes must be restored before they can be retrieved. For more information + // about these storage classes and how to work with archived objects, see Working + // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) + // in the Amazon S3 User Guide. + RestoreStatus *RestoreStatus `type:"structure"` + // Size in bytes of the object. Size *int64 `type:"integer"` @@ -30315,6 +30372,12 @@ func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion { return s } +// SetRestoreStatus sets the RestoreStatus field's value. +func (s *ObjectVersion) SetRestoreStatus(v *RestoreStatus) *ObjectVersion { + s.RestoreStatus = v + return s +} + // SetSize sets the Size field's value. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion { s.Size = &v @@ -34254,7 +34317,7 @@ type PutObjectAclInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Key is a required field @@ -34486,7 +34549,7 @@ type PutObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -35845,7 +35908,7 @@ type PutObjectTaggingInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -37232,7 +37295,7 @@ type RestoreObjectInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -37558,6 +37621,64 @@ func (s *RestoreRequest) SetType(v string) *RestoreRequest { return s } +// Specifies the restoration status of an object. Objects in certain storage +// classes must be restored before they can be retrieved. For more information +// about these storage classes and how to work with archived objects, see Working +// with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) +// in the Amazon S3 User Guide. +type RestoreStatus struct { + _ struct{} `type:"structure"` + + // Specifies whether the object is currently being restored. If the object restoration + // is in progress, the header returns the value TRUE. For example: + // + // x-amz-optional-object-attributes: IsRestoreInProgress="true" + // + // If the object restoration has completed, the header returns the value FALSE. + // For example: + // + // x-amz-optional-object-attributes: IsRestoreInProgress="false", RestoreExpiryDate="2012-12-21T00:00:00.000Z" + // + // If the object hasn't been restored, there is no header response. + IsRestoreInProgress *bool `type:"boolean"` + + // Indicates when the restored copy will expire. This value is populated only + // if the object has already been restored. For example: + // + // x-amz-optional-object-attributes: IsRestoreInProgress="false", RestoreExpiryDate="2012-12-21T00:00:00.000Z" + RestoreExpiryDate *time.Time `type:"timestamp"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RestoreStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RestoreStatus) GoString() string { + return s.String() +} + +// SetIsRestoreInProgress sets the IsRestoreInProgress field's value. +func (s *RestoreStatus) SetIsRestoreInProgress(v bool) *RestoreStatus { + s.IsRestoreInProgress = &v + return s +} + +// SetRestoreExpiryDate sets the RestoreExpiryDate field's value. +func (s *RestoreStatus) SetRestoreExpiryDate(v time.Time) *RestoreStatus { + s.RestoreExpiryDate = &v + return s +} + // Specifies the redirect behavior and when a redirect is applied. For more // information about routing rules, see Configuring advanced conditional redirects // (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects) @@ -39477,7 +39598,7 @@ type UploadPartCopyInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -39947,7 +40068,7 @@ type UploadPartInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field @@ -41233,6 +41354,12 @@ const ( // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value BucketLocationConstraintUsWest2 = "us-west-2" + + // BucketLocationConstraintApSouth2 is a BucketLocationConstraint enum value + BucketLocationConstraintApSouth2 = "ap-south-2" + + // BucketLocationConstraintEuSouth2 is a BucketLocationConstraint enum value + BucketLocationConstraintEuSouth2 = "eu-south-2" ) // BucketLocationConstraint_Values returns all elements of the BucketLocationConstraint enum @@ -41264,6 +41391,8 @@ func BucketLocationConstraint_Values() []string { BucketLocationConstraintUsGovWest1, BucketLocationConstraintUsWest1, BucketLocationConstraintUsWest2, + BucketLocationConstraintApSouth2, + BucketLocationConstraintEuSouth2, } } @@ -41376,8 +41505,8 @@ func DeleteMarkerReplicationStatus_Values() []string { } // Requests Amazon S3 to encode the object keys in the response and specifies -// the encoding method to use. An object key may contain any Unicode character; -// however, XML 1.0 parser cannot parse some characters, such as characters +// the encoding method to use. An object key can contain any Unicode character; +// however, the XML 1.0 parser cannot parse some characters, such as characters // with an ASCII value from 0 to 10. For characters that are not supported in // XML 1.0, you can add this parameter to request that Amazon S3 encode the // keys in the response. @@ -41713,6 +41842,12 @@ const ( // InventoryOptionalFieldChecksumAlgorithm is a InventoryOptionalField enum value InventoryOptionalFieldChecksumAlgorithm = "ChecksumAlgorithm" + + // InventoryOptionalFieldObjectAccessControlList is a InventoryOptionalField enum value + InventoryOptionalFieldObjectAccessControlList = "ObjectAccessControlList" + + // InventoryOptionalFieldObjectOwner is a InventoryOptionalField enum value + InventoryOptionalFieldObjectOwner = "ObjectOwner" ) // InventoryOptionalField_Values returns all elements of the InventoryOptionalField enum @@ -41731,6 +41866,8 @@ func InventoryOptionalField_Values() []string { InventoryOptionalFieldIntelligentTieringAccessTier, InventoryOptionalFieldBucketKeyStatus, InventoryOptionalFieldChecksumAlgorithm, + InventoryOptionalFieldObjectAccessControlList, + InventoryOptionalFieldObjectOwner, } } @@ -42032,6 +42169,18 @@ func ObjectVersionStorageClass_Values() []string { } } +const ( + // OptionalObjectAttributesRestoreStatus is a OptionalObjectAttributes enum value + OptionalObjectAttributesRestoreStatus = "RestoreStatus" +) + +// OptionalObjectAttributes_Values returns all elements of the OptionalObjectAttributes enum +func OptionalObjectAttributes_Values() []string { + return []string{ + OptionalObjectAttributesRestoreStatus, + } +} + const ( // OwnerOverrideDestination is a OwnerOverride enum value OwnerOverrideDestination = "Destination" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go index deeee90c7e..0086334985 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go @@ -45,7 +45,7 @@ type UploadInput struct { // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When // you use this action with S3 on Outposts through the Amazon Web Services SDKs, // you provide the Outposts access point ARN in place of the bucket name. For - // more information about S3 on Outposts ARNs, see What is S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) + // more information about S3 on Outposts ARNs, see What is S3 on Outposts? (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) // in the Amazon S3 User Guide. // // Bucket is a required field diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go new file mode 100644 index 0000000000..c743913c57 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go @@ -0,0 +1,1682 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ssooidc + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" +) + +const opCreateToken = "CreateToken" + +// CreateTokenRequest generates a "aws/request.Request" representing the +// client's request for the CreateToken operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateToken for more information on using the CreateToken +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the CreateTokenRequest method. +// req, resp := client.CreateTokenRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken +func (c *SSOOIDC) CreateTokenRequest(input *CreateTokenInput) (req *request.Request, output *CreateTokenOutput) { + op := &request.Operation{ + Name: opCreateToken, + HTTPMethod: "POST", + HTTPPath: "/token", + } + + if input == nil { + input = &CreateTokenInput{} + } + + output = &CreateTokenOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// CreateToken API operation for AWS SSO OIDC. +// +// Creates and returns an access token for the authorized client. The access +// token issued will be used to fetch short-term credentials for the assigned +// roles in the AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS SSO OIDC's +// API operation CreateToken for usage and error information. +// +// Returned Error Types: +// +// - InvalidRequestException +// Indicates that something is wrong with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// - InvalidClientException +// Indicates that the clientId or clientSecret in the request is invalid. For +// example, this can occur when a client sends an incorrect clientId or an expired +// clientSecret. +// +// - InvalidGrantException +// Indicates that a request contains an invalid grant. This can occur if a client +// makes a CreateToken request with an invalid grant type. +// +// - UnauthorizedClientException +// Indicates that the client is not currently authorized to make the request. +// This can happen when a clientId is not issued for a public client. +// +// - UnsupportedGrantTypeException +// Indicates that the grant type in the request is not supported by the service. +// +// - InvalidScopeException +// Indicates that the scope provided in the request is invalid. +// +// - AuthorizationPendingException +// Indicates that a request to authorize a client with an access user session +// token is pending. +// +// - SlowDownException +// Indicates that the client is making the request too frequently and is more +// than the service can handle. +// +// - AccessDeniedException +// You do not have sufficient access to perform this action. +// +// - ExpiredTokenException +// Indicates that the token issued by the service is expired and is no longer +// valid. +// +// - InternalServerException +// Indicates that an error from the service occurred while trying to process +// a request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken +func (c *SSOOIDC) CreateToken(input *CreateTokenInput) (*CreateTokenOutput, error) { + req, out := c.CreateTokenRequest(input) + return out, req.Send() +} + +// CreateTokenWithContext is the same as CreateToken with the addition of +// the ability to pass a context and additional request options. +// +// See CreateToken for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSOOIDC) CreateTokenWithContext(ctx aws.Context, input *CreateTokenInput, opts ...request.Option) (*CreateTokenOutput, error) { + req, out := c.CreateTokenRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterClient = "RegisterClient" + +// RegisterClientRequest generates a "aws/request.Request" representing the +// client's request for the RegisterClient operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterClient for more information on using the RegisterClient +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the RegisterClientRequest method. +// req, resp := client.RegisterClientRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient +func (c *SSOOIDC) RegisterClientRequest(input *RegisterClientInput) (req *request.Request, output *RegisterClientOutput) { + op := &request.Operation{ + Name: opRegisterClient, + HTTPMethod: "POST", + HTTPPath: "/client/register", + } + + if input == nil { + input = &RegisterClientInput{} + } + + output = &RegisterClientOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// RegisterClient API operation for AWS SSO OIDC. +// +// Registers a client with IAM Identity Center. This allows clients to initiate +// device authorization. The output should be persisted for reuse through many +// authentication requests. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS SSO OIDC's +// API operation RegisterClient for usage and error information. +// +// Returned Error Types: +// +// - InvalidRequestException +// Indicates that something is wrong with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// - InvalidScopeException +// Indicates that the scope provided in the request is invalid. +// +// - InvalidClientMetadataException +// Indicates that the client information sent in the request during registration +// is invalid. +// +// - InternalServerException +// Indicates that an error from the service occurred while trying to process +// a request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient +func (c *SSOOIDC) RegisterClient(input *RegisterClientInput) (*RegisterClientOutput, error) { + req, out := c.RegisterClientRequest(input) + return out, req.Send() +} + +// RegisterClientWithContext is the same as RegisterClient with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterClient for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSOOIDC) RegisterClientWithContext(ctx aws.Context, input *RegisterClientInput, opts ...request.Option) (*RegisterClientOutput, error) { + req, out := c.RegisterClientRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartDeviceAuthorization = "StartDeviceAuthorization" + +// StartDeviceAuthorizationRequest generates a "aws/request.Request" representing the +// client's request for the StartDeviceAuthorization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartDeviceAuthorization for more information on using the StartDeviceAuthorization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the StartDeviceAuthorizationRequest method. +// req, resp := client.StartDeviceAuthorizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization +func (c *SSOOIDC) StartDeviceAuthorizationRequest(input *StartDeviceAuthorizationInput) (req *request.Request, output *StartDeviceAuthorizationOutput) { + op := &request.Operation{ + Name: opStartDeviceAuthorization, + HTTPMethod: "POST", + HTTPPath: "/device_authorization", + } + + if input == nil { + input = &StartDeviceAuthorizationInput{} + } + + output = &StartDeviceAuthorizationOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// StartDeviceAuthorization API operation for AWS SSO OIDC. +// +// Initiates device authorization by requesting a pair of verification codes +// from the authorization service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS SSO OIDC's +// API operation StartDeviceAuthorization for usage and error information. +// +// Returned Error Types: +// +// - InvalidRequestException +// Indicates that something is wrong with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// - InvalidClientException +// Indicates that the clientId or clientSecret in the request is invalid. For +// example, this can occur when a client sends an incorrect clientId or an expired +// clientSecret. +// +// - UnauthorizedClientException +// Indicates that the client is not currently authorized to make the request. +// This can happen when a clientId is not issued for a public client. +// +// - SlowDownException +// Indicates that the client is making the request too frequently and is more +// than the service can handle. +// +// - InternalServerException +// Indicates that an error from the service occurred while trying to process +// a request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization +func (c *SSOOIDC) StartDeviceAuthorization(input *StartDeviceAuthorizationInput) (*StartDeviceAuthorizationOutput, error) { + req, out := c.StartDeviceAuthorizationRequest(input) + return out, req.Send() +} + +// StartDeviceAuthorizationWithContext is the same as StartDeviceAuthorization with the addition of +// the ability to pass a context and additional request options. +// +// See StartDeviceAuthorization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSOOIDC) StartDeviceAuthorizationWithContext(ctx aws.Context, input *StartDeviceAuthorizationInput, opts ...request.Option) (*StartDeviceAuthorizationOutput, error) { + req, out := c.StartDeviceAuthorizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// You do not have sufficient access to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that a request to authorize a client with an access user session +// token is pending. +type AuthorizationPendingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AuthorizationPendingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AuthorizationPendingException) GoString() string { + return s.String() +} + +func newErrorAuthorizationPendingException(v protocol.ResponseMetadata) error { + return &AuthorizationPendingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AuthorizationPendingException) Code() string { + return "AuthorizationPendingException" +} + +// Message returns the exception's message. +func (s *AuthorizationPendingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AuthorizationPendingException) OrigErr() error { + return nil +} + +func (s *AuthorizationPendingException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AuthorizationPendingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AuthorizationPendingException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateTokenInput struct { + _ struct{} `type:"structure"` + + // The unique identifier string for each client. This value should come from + // the persisted result of the RegisterClient API. + // + // ClientId is a required field + ClientId *string `locationName:"clientId" type:"string" required:"true"` + + // A secret string generated for the client. This value should come from the + // persisted result of the RegisterClient API. + // + // ClientSecret is a required field + ClientSecret *string `locationName:"clientSecret" type:"string" required:"true"` + + // The authorization code received from the authorization service. This parameter + // is required to perform an authorization grant request to get access to a + // token. + Code *string `locationName:"code" type:"string"` + + // Used only when calling this API for the device code grant type. This short-term + // code is used to identify this authentication attempt. This should come from + // an in-memory reference to the result of the StartDeviceAuthorization API. + DeviceCode *string `locationName:"deviceCode" type:"string"` + + // Supports grant types for the authorization code, refresh token, and device + // code request. For device code requests, specify the following value: + // + // urn:ietf:params:oauth:grant-type:device_code + // + // For information about how to obtain the device code, see the StartDeviceAuthorization + // topic. + // + // GrantType is a required field + GrantType *string `locationName:"grantType" type:"string" required:"true"` + + // The location of the application that will receive the authorization code. + // Users authorize the service to send the request to this location. + RedirectUri *string `locationName:"redirectUri" type:"string"` + + // Currently, refreshToken is not yet implemented and is not supported. For + // more information about the features and limitations of the current IAM Identity + // Center OIDC implementation, see Considerations for Using this Guide in the + // IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). + // + // The token used to obtain an access token in the event that the access token + // is invalid or expired. + RefreshToken *string `locationName:"refreshToken" type:"string"` + + // The list of scopes that is defined by the client. Upon authorization, this + // list is used to restrict permissions when granting an access token. + Scope []*string `locationName:"scope" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateTokenInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateTokenInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTokenInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTokenInput"} + if s.ClientId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientId")) + } + if s.ClientSecret == nil { + invalidParams.Add(request.NewErrParamRequired("ClientSecret")) + } + if s.GrantType == nil { + invalidParams.Add(request.NewErrParamRequired("GrantType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientId sets the ClientId field's value. +func (s *CreateTokenInput) SetClientId(v string) *CreateTokenInput { + s.ClientId = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *CreateTokenInput) SetClientSecret(v string) *CreateTokenInput { + s.ClientSecret = &v + return s +} + +// SetCode sets the Code field's value. +func (s *CreateTokenInput) SetCode(v string) *CreateTokenInput { + s.Code = &v + return s +} + +// SetDeviceCode sets the DeviceCode field's value. +func (s *CreateTokenInput) SetDeviceCode(v string) *CreateTokenInput { + s.DeviceCode = &v + return s +} + +// SetGrantType sets the GrantType field's value. +func (s *CreateTokenInput) SetGrantType(v string) *CreateTokenInput { + s.GrantType = &v + return s +} + +// SetRedirectUri sets the RedirectUri field's value. +func (s *CreateTokenInput) SetRedirectUri(v string) *CreateTokenInput { + s.RedirectUri = &v + return s +} + +// SetRefreshToken sets the RefreshToken field's value. +func (s *CreateTokenInput) SetRefreshToken(v string) *CreateTokenInput { + s.RefreshToken = &v + return s +} + +// SetScope sets the Scope field's value. +func (s *CreateTokenInput) SetScope(v []*string) *CreateTokenInput { + s.Scope = v + return s +} + +type CreateTokenOutput struct { + _ struct{} `type:"structure"` + + // An opaque token to access IAM Identity Center resources assigned to a user. + AccessToken *string `locationName:"accessToken" type:"string"` + + // Indicates the time in seconds when an access token will expire. + ExpiresIn *int64 `locationName:"expiresIn" type:"integer"` + + // Currently, idToken is not yet implemented and is not supported. For more + // information about the features and limitations of the current IAM Identity + // Center OIDC implementation, see Considerations for Using this Guide in the + // IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). + // + // The identifier of the user that associated with the access token, if present. + IdToken *string `locationName:"idToken" type:"string"` + + // Currently, refreshToken is not yet implemented and is not supported. For + // more information about the features and limitations of the current IAM Identity + // Center OIDC implementation, see Considerations for Using this Guide in the + // IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). + // + // A token that, if present, can be used to refresh a previously issued access + // token that might have expired. + RefreshToken *string `locationName:"refreshToken" type:"string"` + + // Used to notify the client that the returned token is an access token. The + // supported type is BearerToken. + TokenType *string `locationName:"tokenType" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateTokenOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateTokenOutput) GoString() string { + return s.String() +} + +// SetAccessToken sets the AccessToken field's value. +func (s *CreateTokenOutput) SetAccessToken(v string) *CreateTokenOutput { + s.AccessToken = &v + return s +} + +// SetExpiresIn sets the ExpiresIn field's value. +func (s *CreateTokenOutput) SetExpiresIn(v int64) *CreateTokenOutput { + s.ExpiresIn = &v + return s +} + +// SetIdToken sets the IdToken field's value. +func (s *CreateTokenOutput) SetIdToken(v string) *CreateTokenOutput { + s.IdToken = &v + return s +} + +// SetRefreshToken sets the RefreshToken field's value. +func (s *CreateTokenOutput) SetRefreshToken(v string) *CreateTokenOutput { + s.RefreshToken = &v + return s +} + +// SetTokenType sets the TokenType field's value. +func (s *CreateTokenOutput) SetTokenType(v string) *CreateTokenOutput { + s.TokenType = &v + return s +} + +// Indicates that the token issued by the service is expired and is no longer +// valid. +type ExpiredTokenException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ExpiredTokenException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ExpiredTokenException) GoString() string { + return s.String() +} + +func newErrorExpiredTokenException(v protocol.ResponseMetadata) error { + return &ExpiredTokenException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ExpiredTokenException) Code() string { + return "ExpiredTokenException" +} + +// Message returns the exception's message. +func (s *ExpiredTokenException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ExpiredTokenException) OrigErr() error { + return nil +} + +func (s *ExpiredTokenException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ExpiredTokenException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ExpiredTokenException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that an error from the service occurred while trying to process +// a request. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that the clientId or clientSecret in the request is invalid. For +// example, this can occur when a client sends an incorrect clientId or an expired +// clientSecret. +type InvalidClientException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidClientException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidClientException) GoString() string { + return s.String() +} + +func newErrorInvalidClientException(v protocol.ResponseMetadata) error { + return &InvalidClientException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidClientException) Code() string { + return "InvalidClientException" +} + +// Message returns the exception's message. +func (s *InvalidClientException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidClientException) OrigErr() error { + return nil +} + +func (s *InvalidClientException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidClientException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidClientException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that the client information sent in the request during registration +// is invalid. +type InvalidClientMetadataException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidClientMetadataException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidClientMetadataException) GoString() string { + return s.String() +} + +func newErrorInvalidClientMetadataException(v protocol.ResponseMetadata) error { + return &InvalidClientMetadataException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidClientMetadataException) Code() string { + return "InvalidClientMetadataException" +} + +// Message returns the exception's message. +func (s *InvalidClientMetadataException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidClientMetadataException) OrigErr() error { + return nil +} + +func (s *InvalidClientMetadataException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidClientMetadataException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidClientMetadataException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that a request contains an invalid grant. This can occur if a client +// makes a CreateToken request with an invalid grant type. +type InvalidGrantException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidGrantException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidGrantException) GoString() string { + return s.String() +} + +func newErrorInvalidGrantException(v protocol.ResponseMetadata) error { + return &InvalidGrantException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidGrantException) Code() string { + return "InvalidGrantException" +} + +// Message returns the exception's message. +func (s *InvalidGrantException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidGrantException) OrigErr() error { + return nil +} + +func (s *InvalidGrantException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidGrantException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidGrantException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that something is wrong with the input to the request. For example, +// a required parameter might be missing or out of range. +type InvalidRequestException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidRequestException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidRequestException) GoString() string { + return s.String() +} + +func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { + return &InvalidRequestException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidRequestException) Code() string { + return "InvalidRequestException" +} + +// Message returns the exception's message. +func (s *InvalidRequestException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidRequestException) OrigErr() error { + return nil +} + +func (s *InvalidRequestException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that the scope provided in the request is invalid. +type InvalidScopeException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidScopeException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvalidScopeException) GoString() string { + return s.String() +} + +func newErrorInvalidScopeException(v protocol.ResponseMetadata) error { + return &InvalidScopeException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidScopeException) Code() string { + return "InvalidScopeException" +} + +// Message returns the exception's message. +func (s *InvalidScopeException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidScopeException) OrigErr() error { + return nil +} + +func (s *InvalidScopeException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidScopeException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidScopeException) RequestID() string { + return s.RespMetadata.RequestID +} + +type RegisterClientInput struct { + _ struct{} `type:"structure"` + + // The friendly name of the client. + // + // ClientName is a required field + ClientName *string `locationName:"clientName" type:"string" required:"true"` + + // The type of client. The service supports only public as a client type. Anything + // other than public will be rejected by the service. + // + // ClientType is a required field + ClientType *string `locationName:"clientType" type:"string" required:"true"` + + // The list of scopes that are defined by the client. Upon authorization, this + // list is used to restrict permissions when granting an access token. + Scopes []*string `locationName:"scopes" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterClientInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterClientInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterClientInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterClientInput"} + if s.ClientName == nil { + invalidParams.Add(request.NewErrParamRequired("ClientName")) + } + if s.ClientType == nil { + invalidParams.Add(request.NewErrParamRequired("ClientType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientName sets the ClientName field's value. +func (s *RegisterClientInput) SetClientName(v string) *RegisterClientInput { + s.ClientName = &v + return s +} + +// SetClientType sets the ClientType field's value. +func (s *RegisterClientInput) SetClientType(v string) *RegisterClientInput { + s.ClientType = &v + return s +} + +// SetScopes sets the Scopes field's value. +func (s *RegisterClientInput) SetScopes(v []*string) *RegisterClientInput { + s.Scopes = v + return s +} + +type RegisterClientOutput struct { + _ struct{} `type:"structure"` + + // The endpoint where the client can request authorization. + AuthorizationEndpoint *string `locationName:"authorizationEndpoint" type:"string"` + + // The unique identifier string for each client. This client uses this identifier + // to get authenticated by the service in subsequent calls. + ClientId *string `locationName:"clientId" type:"string"` + + // Indicates the time at which the clientId and clientSecret were issued. + ClientIdIssuedAt *int64 `locationName:"clientIdIssuedAt" type:"long"` + + // A secret string generated for the client. The client will use this string + // to get authenticated by the service in subsequent calls. + ClientSecret *string `locationName:"clientSecret" type:"string"` + + // Indicates the time at which the clientId and clientSecret will become invalid. + ClientSecretExpiresAt *int64 `locationName:"clientSecretExpiresAt" type:"long"` + + // The endpoint where the client can get an access token. + TokenEndpoint *string `locationName:"tokenEndpoint" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterClientOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterClientOutput) GoString() string { + return s.String() +} + +// SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value. +func (s *RegisterClientOutput) SetAuthorizationEndpoint(v string) *RegisterClientOutput { + s.AuthorizationEndpoint = &v + return s +} + +// SetClientId sets the ClientId field's value. +func (s *RegisterClientOutput) SetClientId(v string) *RegisterClientOutput { + s.ClientId = &v + return s +} + +// SetClientIdIssuedAt sets the ClientIdIssuedAt field's value. +func (s *RegisterClientOutput) SetClientIdIssuedAt(v int64) *RegisterClientOutput { + s.ClientIdIssuedAt = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *RegisterClientOutput) SetClientSecret(v string) *RegisterClientOutput { + s.ClientSecret = &v + return s +} + +// SetClientSecretExpiresAt sets the ClientSecretExpiresAt field's value. +func (s *RegisterClientOutput) SetClientSecretExpiresAt(v int64) *RegisterClientOutput { + s.ClientSecretExpiresAt = &v + return s +} + +// SetTokenEndpoint sets the TokenEndpoint field's value. +func (s *RegisterClientOutput) SetTokenEndpoint(v string) *RegisterClientOutput { + s.TokenEndpoint = &v + return s +} + +// Indicates that the client is making the request too frequently and is more +// than the service can handle. +type SlowDownException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SlowDownException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SlowDownException) GoString() string { + return s.String() +} + +func newErrorSlowDownException(v protocol.ResponseMetadata) error { + return &SlowDownException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *SlowDownException) Code() string { + return "SlowDownException" +} + +// Message returns the exception's message. +func (s *SlowDownException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *SlowDownException) OrigErr() error { + return nil +} + +func (s *SlowDownException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *SlowDownException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *SlowDownException) RequestID() string { + return s.RespMetadata.RequestID +} + +type StartDeviceAuthorizationInput struct { + _ struct{} `type:"structure"` + + // The unique identifier string for the client that is registered with IAM Identity + // Center. This value should come from the persisted result of the RegisterClient + // API operation. + // + // ClientId is a required field + ClientId *string `locationName:"clientId" type:"string" required:"true"` + + // A secret string that is generated for the client. This value should come + // from the persisted result of the RegisterClient API operation. + // + // ClientSecret is a required field + ClientSecret *string `locationName:"clientSecret" type:"string" required:"true"` + + // The URL for the AWS access portal. For more information, see Using the AWS + // access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html) + // in the IAM Identity Center User Guide. + // + // StartUrl is a required field + StartUrl *string `locationName:"startUrl" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartDeviceAuthorizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartDeviceAuthorizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartDeviceAuthorizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartDeviceAuthorizationInput"} + if s.ClientId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientId")) + } + if s.ClientSecret == nil { + invalidParams.Add(request.NewErrParamRequired("ClientSecret")) + } + if s.StartUrl == nil { + invalidParams.Add(request.NewErrParamRequired("StartUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientId sets the ClientId field's value. +func (s *StartDeviceAuthorizationInput) SetClientId(v string) *StartDeviceAuthorizationInput { + s.ClientId = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *StartDeviceAuthorizationInput) SetClientSecret(v string) *StartDeviceAuthorizationInput { + s.ClientSecret = &v + return s +} + +// SetStartUrl sets the StartUrl field's value. +func (s *StartDeviceAuthorizationInput) SetStartUrl(v string) *StartDeviceAuthorizationInput { + s.StartUrl = &v + return s +} + +type StartDeviceAuthorizationOutput struct { + _ struct{} `type:"structure"` + + // The short-lived code that is used by the device when polling for a session + // token. + DeviceCode *string `locationName:"deviceCode" type:"string"` + + // Indicates the number of seconds in which the verification code will become + // invalid. + ExpiresIn *int64 `locationName:"expiresIn" type:"integer"` + + // Indicates the number of seconds the client must wait between attempts when + // polling for a session. + Interval *int64 `locationName:"interval" type:"integer"` + + // A one-time user verification code. This is needed to authorize an in-use + // device. + UserCode *string `locationName:"userCode" type:"string"` + + // The URI of the verification page that takes the userCode to authorize the + // device. + VerificationUri *string `locationName:"verificationUri" type:"string"` + + // An alternate URL that the client can use to automatically launch a browser. + // This process skips the manual step in which the user visits the verification + // page and enters their code. + VerificationUriComplete *string `locationName:"verificationUriComplete" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartDeviceAuthorizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartDeviceAuthorizationOutput) GoString() string { + return s.String() +} + +// SetDeviceCode sets the DeviceCode field's value. +func (s *StartDeviceAuthorizationOutput) SetDeviceCode(v string) *StartDeviceAuthorizationOutput { + s.DeviceCode = &v + return s +} + +// SetExpiresIn sets the ExpiresIn field's value. +func (s *StartDeviceAuthorizationOutput) SetExpiresIn(v int64) *StartDeviceAuthorizationOutput { + s.ExpiresIn = &v + return s +} + +// SetInterval sets the Interval field's value. +func (s *StartDeviceAuthorizationOutput) SetInterval(v int64) *StartDeviceAuthorizationOutput { + s.Interval = &v + return s +} + +// SetUserCode sets the UserCode field's value. +func (s *StartDeviceAuthorizationOutput) SetUserCode(v string) *StartDeviceAuthorizationOutput { + s.UserCode = &v + return s +} + +// SetVerificationUri sets the VerificationUri field's value. +func (s *StartDeviceAuthorizationOutput) SetVerificationUri(v string) *StartDeviceAuthorizationOutput { + s.VerificationUri = &v + return s +} + +// SetVerificationUriComplete sets the VerificationUriComplete field's value. +func (s *StartDeviceAuthorizationOutput) SetVerificationUriComplete(v string) *StartDeviceAuthorizationOutput { + s.VerificationUriComplete = &v + return s +} + +// Indicates that the client is not currently authorized to make the request. +// This can happen when a clientId is not issued for a public client. +type UnauthorizedClientException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UnauthorizedClientException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UnauthorizedClientException) GoString() string { + return s.String() +} + +func newErrorUnauthorizedClientException(v protocol.ResponseMetadata) error { + return &UnauthorizedClientException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *UnauthorizedClientException) Code() string { + return "UnauthorizedClientException" +} + +// Message returns the exception's message. +func (s *UnauthorizedClientException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *UnauthorizedClientException) OrigErr() error { + return nil +} + +func (s *UnauthorizedClientException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *UnauthorizedClientException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *UnauthorizedClientException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that the grant type in the request is not supported by the service. +type UnsupportedGrantTypeException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Error_ *string `locationName:"error" type:"string"` + + Error_description *string `locationName:"error_description" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UnsupportedGrantTypeException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UnsupportedGrantTypeException) GoString() string { + return s.String() +} + +func newErrorUnsupportedGrantTypeException(v protocol.ResponseMetadata) error { + return &UnsupportedGrantTypeException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *UnsupportedGrantTypeException) Code() string { + return "UnsupportedGrantTypeException" +} + +// Message returns the exception's message. +func (s *UnsupportedGrantTypeException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *UnsupportedGrantTypeException) OrigErr() error { + return nil +} + +func (s *UnsupportedGrantTypeException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *UnsupportedGrantTypeException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *UnsupportedGrantTypeException) RequestID() string { + return s.RespMetadata.RequestID +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/doc.go new file mode 100644 index 0000000000..8b5ee6019a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/doc.go @@ -0,0 +1,66 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package ssooidc provides the client and types for making API +// requests to AWS SSO OIDC. +// +// AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect +// (OIDC) is a web service that enables a client (such as AWS CLI or a native +// application) to register with IAM Identity Center. The service also enables +// the client to fetch the user’s access token upon successful authentication +// and authorization with IAM Identity Center. +// +// Although AWS Single Sign-On was renamed, the sso and identitystore API namespaces +// will continue to retain their original name for backward compatibility purposes. +// For more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed). +// +// # Considerations for Using This Guide +// +// Before you begin using this guide, we recommend that you first review the +// following important information about how the IAM Identity Center OIDC service +// works. +// +// - The IAM Identity Center OIDC service currently implements only the portions +// of the OAuth 2.0 Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628 +// (https://tools.ietf.org/html/rfc8628)) that are necessary to enable single +// sign-on authentication with the AWS CLI. Support for other OIDC flows +// frequently needed for native applications, such as Authorization Code +// Flow (+ PKCE), will be addressed in future releases. +// +// - The service emits only OIDC access tokens, such that obtaining a new +// token (For example, token refresh) requires explicit user re-authentication. +// +// - The access tokens provided by this service grant access to all AWS account +// entitlements assigned to an IAM Identity Center user, not just a particular +// application. +// +// - The documentation in this guide does not describe the mechanism to convert +// the access token into AWS Auth (“sigv4”) credentials for use with +// IAM-protected AWS service endpoints. For more information, see GetRoleCredentials +// (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html) +// in the IAM Identity Center Portal API Reference Guide. +// +// For general information about IAM Identity Center, see What is IAM Identity +// Center? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) +// in the IAM Identity Center User Guide. +// +// See https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10 for more information on this service. +// +// See ssooidc package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/ssooidc/ +// +// # Using the Client +// +// To contact AWS SSO OIDC with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS SSO OIDC client SSOOIDC for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/ssooidc/#New +package ssooidc diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go new file mode 100644 index 0000000000..6983770126 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go @@ -0,0 +1,107 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ssooidc + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeAuthorizationPendingException for service response error code + // "AuthorizationPendingException". + // + // Indicates that a request to authorize a client with an access user session + // token is pending. + ErrCodeAuthorizationPendingException = "AuthorizationPendingException" + + // ErrCodeExpiredTokenException for service response error code + // "ExpiredTokenException". + // + // Indicates that the token issued by the service is expired and is no longer + // valid. + ErrCodeExpiredTokenException = "ExpiredTokenException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // Indicates that an error from the service occurred while trying to process + // a request. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeInvalidClientException for service response error code + // "InvalidClientException". + // + // Indicates that the clientId or clientSecret in the request is invalid. For + // example, this can occur when a client sends an incorrect clientId or an expired + // clientSecret. + ErrCodeInvalidClientException = "InvalidClientException" + + // ErrCodeInvalidClientMetadataException for service response error code + // "InvalidClientMetadataException". + // + // Indicates that the client information sent in the request during registration + // is invalid. + ErrCodeInvalidClientMetadataException = "InvalidClientMetadataException" + + // ErrCodeInvalidGrantException for service response error code + // "InvalidGrantException". + // + // Indicates that a request contains an invalid grant. This can occur if a client + // makes a CreateToken request with an invalid grant type. + ErrCodeInvalidGrantException = "InvalidGrantException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // Indicates that something is wrong with the input to the request. For example, + // a required parameter might be missing or out of range. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeInvalidScopeException for service response error code + // "InvalidScopeException". + // + // Indicates that the scope provided in the request is invalid. + ErrCodeInvalidScopeException = "InvalidScopeException" + + // ErrCodeSlowDownException for service response error code + // "SlowDownException". + // + // Indicates that the client is making the request too frequently and is more + // than the service can handle. + ErrCodeSlowDownException = "SlowDownException" + + // ErrCodeUnauthorizedClientException for service response error code + // "UnauthorizedClientException". + // + // Indicates that the client is not currently authorized to make the request. + // This can happen when a clientId is not issued for a public client. + ErrCodeUnauthorizedClientException = "UnauthorizedClientException" + + // ErrCodeUnsupportedGrantTypeException for service response error code + // "UnsupportedGrantTypeException". + // + // Indicates that the grant type in the request is not supported by the service. + ErrCodeUnsupportedGrantTypeException = "UnsupportedGrantTypeException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "AuthorizationPendingException": newErrorAuthorizationPendingException, + "ExpiredTokenException": newErrorExpiredTokenException, + "InternalServerException": newErrorInternalServerException, + "InvalidClientException": newErrorInvalidClientException, + "InvalidClientMetadataException": newErrorInvalidClientMetadataException, + "InvalidGrantException": newErrorInvalidGrantException, + "InvalidRequestException": newErrorInvalidRequestException, + "InvalidScopeException": newErrorInvalidScopeException, + "SlowDownException": newErrorSlowDownException, + "UnauthorizedClientException": newErrorUnauthorizedClientException, + "UnsupportedGrantTypeException": newErrorUnsupportedGrantTypeException, +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssooidc/service.go b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/service.go new file mode 100644 index 0000000000..969f33c37b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ssooidc/service.go @@ -0,0 +1,106 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ssooidc + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// SSOOIDC provides the API operation methods for making requests to +// AWS SSO OIDC. See this package's package overview docs +// for details on the service. +// +// SSOOIDC methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SSOOIDC struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "SSO OIDC" // Name of service. + EndpointsID = "oidc" // ID to lookup a service endpoint with. + ServiceID = "SSO OIDC" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the SSOOIDC client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// +// mySession := session.Must(session.NewSession()) +// +// // Create a SSOOIDC client from just a session. +// svc := ssooidc.New(mySession) +// +// // Create a SSOOIDC client with additional configuration +// svc := ssooidc.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSOOIDC { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "awsssooidc" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSOOIDC { + svc := &SSOOIDC{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2019-06-10", + ResolvedRegion: resolvedRegion, + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a SSOOIDC operation and runs any +// custom request initialization. +func (c *SSOOIDC) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index 7ac6b93f44..11af63b4d8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -1460,6 +1460,9 @@ type AssumeRoleInput struct { // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` + // Reserved for future use. + ProvidedContexts []*ProvidedContext `type:"list"` + // The Amazon Resource Name (ARN) of the role to assume. // // RoleArn is a required field @@ -1633,6 +1636,16 @@ func (s *AssumeRoleInput) Validate() error { } } } + if s.ProvidedContexts != nil { + for i, v := range s.ProvidedContexts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvidedContexts", i), err.(request.ErrInvalidParams)) + } + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -1674,6 +1687,12 @@ func (s *AssumeRoleInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleIn return s } +// SetProvidedContexts sets the ProvidedContexts field's value. +func (s *AssumeRoleInput) SetProvidedContexts(v []*ProvidedContext) *AssumeRoleInput { + s.ProvidedContexts = v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput { s.RoleArn = &v @@ -2266,7 +2285,8 @@ type AssumeRoleWithWebIdentityInput struct { // The OAuth 2.0 access token or OpenID Connect ID token that is provided by // the identity provider. Your application must get this token by authenticating // the user who is using your application with a web identity provider before - // the application makes an AssumeRoleWithWebIdentity call. + // the application makes an AssumeRoleWithWebIdentity call. Only tokens with + // RSA algorithms (RS256) are supported. // // WebIdentityToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by AssumeRoleWithWebIdentityInput's @@ -3385,6 +3405,63 @@ func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType { return s } +// Reserved for future use. +type ProvidedContext struct { + _ struct{} `type:"structure"` + + // Reserved for future use. + ContextAssertion *string `min:"4" type:"string"` + + // Reserved for future use. + ProviderArn *string `min:"20" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ProvidedContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ProvidedContext) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvidedContext) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvidedContext"} + if s.ContextAssertion != nil && len(*s.ContextAssertion) < 4 { + invalidParams.Add(request.NewErrParamMinLen("ContextAssertion", 4)) + } + if s.ProviderArn != nil && len(*s.ProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContextAssertion sets the ContextAssertion field's value. +func (s *ProvidedContext) SetContextAssertion(v string) *ProvidedContext { + s.ContextAssertion = &v + return s +} + +// SetProviderArn sets the ProviderArn field's value. +func (s *ProvidedContext) SetProviderArn(v string) *ProvidedContext { + s.ProviderArn = &v + return s +} + // You can pass custom key-value pair attributes when you assume a role or federate // a user. These are called session tags. You can then use the session tags // to control access to resources. For more information, see Tagging Amazon diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/appsTransport.go b/vendor/github.com/bradleyfalzon/ghinstallation/v2/appsTransport.go index 317de76fc1..a67510c1c6 100644 --- a/vendor/github.com/bradleyfalzon/ghinstallation/v2/appsTransport.go +++ b/vendor/github.com/bradleyfalzon/ghinstallation/v2/appsTransport.go @@ -106,6 +106,11 @@ func (t *AppsTransport) RoundTrip(req *http.Request) (*http.Response, error) { return resp, err } +// AppID returns the appID of the transport +func (t *AppsTransport) AppID() int64 { + return t.appID +} + type AppsTransportOption func(*AppsTransport) // WithSigner configures the AppsTransport to use the given Signer for generating JWT tokens. diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go index 015ebe4b65..84012a00df 100644 --- a/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go +++ b/vendor/github.com/bradleyfalzon/ghinstallation/v2/transport.go @@ -191,6 +191,16 @@ func (t *Transport) Expiry() (expiresAt time.Time, refreshAt time.Time, err erro return t.token.ExpiresAt, t.token.getRefreshTime(), nil } +// AppID returns the app ID associated with the transport +func (t *Transport) AppID() int64 { + return t.appID +} + +// InstallationID returns the installation ID associated with the transport +func (t *Transport) InstallationID() int64 { + return t.installationID +} + func (t *Transport) refreshToken(ctx context.Context) error { // Convert InstallationTokenOptions into a ReadWriter to pass as an argument to http.NewRequest. body, err := GetReadWriter(t.InstallationTokenOptions) diff --git a/vendor/github.com/google/go-github/v53/github/actions_runners.go b/vendor/github.com/google/go-github/v53/github/actions_runners.go index 40c6be3a92..3990a5a90f 100644 --- a/vendor/github.com/google/go-github/v53/github/actions_runners.go +++ b/vendor/github.com/google/go-github/v53/github/actions_runners.go @@ -45,6 +45,60 @@ func (s *ActionsService) ListRunnerApplicationDownloads(ctx context.Context, own return rads, resp, nil } +// GenerateJITConfigRequest specifies body parameters to GenerateRepoJITConfig. +type GenerateJITConfigRequest struct { + Name string `json:"name"` + RunnerGroupID int64 `json:"runner_group_id"` + WorkFolder *string `json:"work_folder,omitempty"` + + // Labels represents the names of the custom labels to add to the runner. + // Minimum items: 1. Maximum items: 100. + Labels []string `json:"labels"` +} + +// JITRunnerConfig represents encoded JIT configuration that can be used to bootstrap a self-hosted runner. +type JITRunnerConfig struct { + EncodedJITConfig *string `json:"encoded_jit_config,omitempty"` +} + +// GenerateOrgJITConfig generate a just-in-time configuration for an organization. +// +// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-configuration-for-a-just-in-time-runner-for-an-organization +func (s *ActionsService) GenerateOrgJITConfig(ctx context.Context, owner string, request *GenerateJITConfigRequest) (*JITRunnerConfig, *Response, error) { + u := fmt.Sprintf("orgs/%v/actions/runners/generate-jitconfig", owner) + req, err := s.client.NewRequest("POST", u, request) + if err != nil { + return nil, nil, err + } + + jitConfig := new(JITRunnerConfig) + resp, err := s.client.Do(ctx, req, jitConfig) + if err != nil { + return nil, resp, err + } + + return jitConfig, resp, nil +} + +// GenerateRepoJITConfig generates a just-in-time configuration for a repository. +// +// GitHub API docs: https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-configuration-for-a-just-in-time-runner-for-a-repository +func (s *ActionsService) GenerateRepoJITConfig(ctx context.Context, owner, repo string, request *GenerateJITConfigRequest) (*JITRunnerConfig, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/actions/runners/generate-jitconfig", owner, repo) + req, err := s.client.NewRequest("POST", u, request) + if err != nil { + return nil, nil, err + } + + jitConfig := new(JITRunnerConfig) + resp, err := s.client.Do(ctx, req, jitConfig) + if err != nil { + return nil, resp, err + } + + return jitConfig, resp, nil +} + // RegistrationToken represents a token that can be used to add a self-hosted runner to a repository. type RegistrationToken struct { Token *string `json:"token,omitempty"` diff --git a/vendor/github.com/google/go-github/v53/github/code-scanning.go b/vendor/github.com/google/go-github/v53/github/code-scanning.go index 6717348ed7..e4a6abeba3 100644 --- a/vendor/github.com/google/go-github/v53/github/code-scanning.go +++ b/vendor/github.com/google/go-github/v53/github/code-scanning.go @@ -378,3 +378,76 @@ func (s *CodeScanningService) GetAnalysis(ctx context.Context, owner, repo strin return analysis, resp, nil } + +// DefaultSetupConfiguration represents a code scanning default setup configuration. +type DefaultSetupConfiguration struct { + State *string `json:"state,omitempty"` + Languages []string `json:"languages,omitempty"` + QuerySuite *string `json:"query_suite,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` +} + +// GetDefaultSetupConfiguration gets a code scanning default setup configuration. +// +// You must use an access token with the repo scope to use this +// endpoint with private repos or the public_repo scope for public repos. GitHub Apps must have the repo write +// permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/code-scanning#get-a-code-scanning-default-setup-configuration +func (s *CodeScanningService) GetDefaultSetupConfiguration(ctx context.Context, owner, repo string) (*DefaultSetupConfiguration, *Response, error) { + u := fmt.Sprintf("repos/%s/%s/code-scanning/default-setup", owner, repo) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + cfg := new(DefaultSetupConfiguration) + resp, err := s.client.Do(ctx, req, cfg) + if err != nil { + return nil, resp, err + } + + return cfg, resp, nil +} + +// UpdateDefaultSetupConfigurationOptions specifies parameters to the CodeScanningService.UpdateDefaultSetupConfiguration +// method. +type UpdateDefaultSetupConfigurationOptions struct { + State string `json:"state"` + QuerySuite *string `json:"query_suite,omitempty"` + Languages []string `json:"languages,omitempty"` +} + +// UpdateDefaultSetupConfigurationResponse represents a response from updating a code scanning default setup configuration. +type UpdateDefaultSetupConfigurationResponse struct { + RunID *int64 `json:"run_id,omitempty"` + RunURL *string `json:"run_url,omitempty"` +} + +// UpdateDefaultSetupConfiguration updates a code scanning default setup configuration. +// +// You must use an access token with the repo scope to use this +// endpoint with private repos or the public_repo scope for public repos. GitHub Apps must have the repo write +// permission to use this endpoint. +// +// This method might return an AcceptedError and a status code of 202. This is because this is the status that GitHub +// returns to signify that it has now scheduled the update of the pull request branch in a background task. +// +// GitHub API docs: https://docs.github.com/en/rest/code-scanning#update-a-code-scanning-default-setup-configuration +func (s *CodeScanningService) UpdateDefaultSetupConfiguration(ctx context.Context, owner, repo string, options *UpdateDefaultSetupConfigurationOptions) (*UpdateDefaultSetupConfigurationResponse, *Response, error) { + u := fmt.Sprintf("repos/%s/%s/code-scanning/default-setup", owner, repo) + + req, err := s.client.NewRequest("PATCH", u, options) + if err != nil { + return nil, nil, err + } + + a := new(UpdateDefaultSetupConfigurationResponse) + resp, err := s.client.Do(ctx, req, a) + if err != nil { + return nil, resp, err + } + + return a, resp, nil +} diff --git a/vendor/github.com/google/go-github/v53/github/codespaces.go b/vendor/github.com/google/go-github/v53/github/codespaces.go new file mode 100644 index 0000000000..a260c227de --- /dev/null +++ b/vendor/github.com/google/go-github/v53/github/codespaces.go @@ -0,0 +1,254 @@ +// Copyright 2023 The go-github 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 github + +import ( + "context" + "fmt" +) + +// CodespacesService handles communication with the Codespaces related +// methods of the GitHub API. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/ +type CodespacesService service + +// Codespace represents a codespace. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces +type Codespace struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + DisplayName *string `json:"display_name,omitempty"` + EnvironmentID *string `json:"environment_id,omitempty"` + Owner *User `json:"owner,omitempty"` + BillableOwner *User `json:"billable_owner,omitempty"` + Repository *Repository `json:"repository,omitempty"` + Machine *CodespacesMachine `json:"machine,omitempty"` + DevcontainerPath *string `json:"devcontainer_path,omitempty"` + Prebuild *bool `json:"prebuild,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + LastUsedAt *Timestamp `json:"last_used_at,omitempty"` + State *string `json:"state,omitempty"` + URL *string `json:"url,omitempty"` + GitStatus *CodespacesGitStatus `json:"git_status,omitempty"` + Location *string `json:"location,omitempty"` + IdleTimeoutMinutes *int `json:"idle_timeout_minutes,omitempty"` + WebURL *string `json:"web_url,omitempty"` + MachinesURL *string `json:"machines_url,omitempty"` + StartURL *string `json:"start_url,omitempty"` + StopURL *string `json:"stop_url,omitempty"` + PullsURL *string `json:"pulls_url,omitempty"` + RecentFolders []string `json:"recent_folders,omitempty"` + RuntimeConstraints *CodespacesRuntimeConstraints `json:"runtime_constraints,omitempty"` + PendingOperation *bool `json:"pending_operation,omitempty"` + PendingOperationDisabledReason *string `json:"pending_operation_disabled_reason,omitempty"` + IdleTimeoutNotice *string `json:"idle_timeout_notice,omitempty"` + RetentionPeriodMinutes *int `json:"retention_period_minutes,omitempty"` + RetentionExpiresAt *Timestamp `json:"retention_expires_at,omitempty"` + LastKnownStopNotice *string `json:"last_known_stop_notice,omitempty"` +} + +// CodespacesGitStatus represents the git status of a codespace. +type CodespacesGitStatus struct { + Ahead *int `json:"ahead,omitempty"` + Behind *int `json:"behind,omitempty"` + HasUnpushedChanges *bool `json:"has_unpushed_changes,omitempty"` + HasUncommittedChanges *bool `json:"has_uncommitted_changes,omitempty"` + Ref *string `json:"ref,omitempty"` +} + +// CodespacesMachine represents the machine type of a codespace. +type CodespacesMachine struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"display_name,omitempty"` + OperatingSystem *string `json:"operating_system,omitempty"` + StorageInBytes *int64 `json:"storage_in_bytes,omitempty"` + MemoryInBytes *int64 `json:"memory_in_bytes,omitempty"` + CPUs *int `json:"cpus,omitempty"` + PrebuildAvailability *string `json:"prebuild_availability,omitempty"` +} + +// CodespacesRuntimeConstraints represents the runtime constraints of a codespace. +type CodespacesRuntimeConstraints struct { + AllowedPortPrivacySettings []string `json:"allowed_port_privacy_settings,omitempty"` +} + +// ListCodespaces represents the response from the list codespaces endpoints. +type ListCodespaces struct { + TotalCount *int `json:"total_count,omitempty"` + Codespaces []*Codespace `json:"codespaces"` +} + +// ListInRepo lists codespaces for a user in a repository. +// +// Lists the codespaces associated with a specified repository and the authenticated user. +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have read access to the codespaces repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#list-codespaces-in-a-repository-for-the-authenticated-user +func (s *CodespacesService) ListInRepo(ctx context.Context, owner, repo string, opts *ListOptions) (*ListCodespaces, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces", owner, repo) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var codespaces *ListCodespaces + resp, err := s.client.Do(ctx, req, &codespaces) + if err != nil { + return nil, resp, err + } + + return codespaces, resp, nil +} + +// ListOptions represents the options for listing codespaces for a user. +type ListCodespacesOptions struct { + ListOptions + RepositoryID int64 `url:"repository_id,omitempty"` +} + +// List lists codespaces for an authenticated user. +// +// Lists the authenticated user's codespaces. +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have read access to the codespaces repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#list-codespaces-for-the-authenticated-user +func (s *CodespacesService) List(ctx context.Context, opts *ListCodespacesOptions) (*ListCodespaces, *Response, error) { + u := fmt.Sprint("user/codespaces") + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var codespaces *ListCodespaces + resp, err := s.client.Do(ctx, req, &codespaces) + if err != nil { + return nil, resp, err + } + + return codespaces, resp, nil +} + +// CreateCodespaceOptions represents options for the creation of a codespace in a repository. +type CreateCodespaceOptions struct { + Ref *string `json:"ref,omitempty"` + // Geo represents the geographic area for this codespace. + // If not specified, the value is assigned by IP. + // This property replaces location, which is being deprecated. + // Geo can be one of: `EuropeWest`, `SoutheastAsia`, `UsEast`, `UsWest`. + Geo *string `json:"geo,omitempty"` + ClientIP *string `json:"client_ip,omitempty"` + Machine *string `json:"machine,omitempty"` + DevcontainerPath *string `json:"devcontainer_path,omitempty"` + MultiRepoPermissionsOptOut *bool `json:"multi_repo_permissions_opt_out,omitempty"` + WorkingDirectory *string `json:"working_directory,omitempty"` + IdleTimeoutMinutes *int `json:"idle_timeout_minutes,omitempty"` + DisplayName *string `json:"display_name,omitempty"` + // RetentionPeriodMinutes represents the duration in minutes after codespace has gone idle in which it will be deleted. + // Must be integer minutes between 0 and 43200 (30 days). + RetentionPeriodMinutes *int `json:"retention_period_minutes,omitempty"` +} + +// CreateInRepo creates a codespace in a repository. +// +// Creates a codespace owned by the authenticated user in the specified repository. +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have write access to the codespaces repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#create-a-codespace-in-a-repository +func (s *CodespacesService) CreateInRepo(ctx context.Context, owner, repo string, request *CreateCodespaceOptions) (*Codespace, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces", owner, repo) + + req, err := s.client.NewRequest("POST", u, request) + if err != nil { + return nil, nil, err + } + + var codespace *Codespace + resp, err := s.client.Do(ctx, req, &codespace) + if err != nil { + return nil, resp, err + } + + return codespace, resp, nil +} + +// Start starts a codespace. +// +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#start-a-codespace-for-the-authenticated-user +func (s *CodespacesService) Start(ctx context.Context, codespaceName string) (*Codespace, *Response, error) { + u := fmt.Sprintf("user/codespaces/%v/start", codespaceName) + + req, err := s.client.NewRequest("POST", u, nil) + if err != nil { + return nil, nil, err + } + + var codespace *Codespace + resp, err := s.client.Do(ctx, req, &codespace) + if err != nil { + return nil, resp, err + } + + return codespace, resp, nil +} + +// Stop stops a codespace. +// +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#stop-a-codespace-for-the-authenticated-user +func (s *CodespacesService) Stop(ctx context.Context, codespaceName string) (*Codespace, *Response, error) { + u := fmt.Sprintf("user/codespaces/%v/stop", codespaceName) + + req, err := s.client.NewRequest("POST", u, nil) + if err != nil { + return nil, nil, err + } + + var codespace *Codespace + resp, err := s.client.Do(ctx, req, &codespace) + if err != nil { + return nil, resp, err + } + + return codespace, resp, nil +} + +// Delete deletes a codespace. +// +// You must authenticate using an access token with the codespace scope to use this endpoint. +// GitHub Apps must have write access to the codespaces repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#delete-a-codespace-for-the-authenticated-user +func (s *CodespacesService) Delete(ctx context.Context, codespaceName string) (*Response, error) { + u := fmt.Sprintf("user/codespaces/%v", codespaceName) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/v53/github/codespaces_secrets.go b/vendor/github.com/google/go-github/v53/github/codespaces_secrets.go new file mode 100644 index 0000000000..e11c679c66 --- /dev/null +++ b/vendor/github.com/google/go-github/v53/github/codespaces_secrets.go @@ -0,0 +1,405 @@ +// Copyright 2023 The go-github 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 github + +import ( + "context" + "fmt" +) + +// ListUserSecrets list all secrets available for a users codespace +// +// Lists all secrets available for a user's Codespaces without revealing their encrypted values +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint +// GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#list-secrets-for-the-authenticated-user +func (s *CodespacesService) ListUserSecrets(ctx context.Context, opts *ListOptions) (*Secrets, *Response, error) { + u, err := addOptions("user/codespaces/secrets", opts) + if err != nil { + return nil, nil, err + } + return s.listSecrets(ctx, u) +} + +// ListOrgSecrets list all secrets available to an org +// +// Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#list-organization-secrets +func (s *CodespacesService) ListOrgSecrets(ctx context.Context, org string, opts *ListOptions) (*Secrets, *Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + return s.listSecrets(ctx, u) +} + +// ListRepoSecrets list all secrets available to a repo +// +// Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#list-repository-secrets +func (s *CodespacesService) ListRepoSecrets(ctx context.Context, owner, repo string, opts *ListOptions) (*Secrets, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces/secrets", owner, repo) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + return s.listSecrets(ctx, u) +} + +func (s *CodespacesService) listSecrets(ctx context.Context, url string) (*Secrets, *Response, error) { + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return nil, nil, err + } + + var secrets *Secrets + resp, err := s.client.Do(ctx, req, &secrets) + if err != nil { + return nil, resp, err + } + + return secrets, resp, nil +} + +// GetUserPublicKey gets the users public key for encrypting codespace secrets +// +// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. +// GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#get-public-key-for-the-authenticated-user +func (s *CodespacesService) GetUserPublicKey(ctx context.Context) (*PublicKey, *Response, error) { + return s.getPublicKey(ctx, "user/codespaces/secrets/public-key") +} + +// GetOrgPublicKey gets the org public key for encrypting codespace secrets +// +// Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-public-key +func (s *CodespacesService) GetOrgPublicKey(ctx context.Context, org string) (*PublicKey, *Response, error) { + return s.getPublicKey(ctx, fmt.Sprintf("orgs/%v/codespaces/secrets/public-key", org)) +} + +// GetRepoPublicKey gets the repo public key for encrypting codespace secrets +// +// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#get-a-repository-public-key +func (s *CodespacesService) GetRepoPublicKey(ctx context.Context, owner, repo string) (*PublicKey, *Response, error) { + return s.getPublicKey(ctx, fmt.Sprintf("repos/%v/%v/codespaces/secrets/public-key", owner, repo)) +} + +func (s *CodespacesService) getPublicKey(ctx context.Context, url string) (*PublicKey, *Response, error) { + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return nil, nil, err + } + + var publicKey *PublicKey + resp, err := s.client.Do(ctx, req, &publicKey) + if err != nil { + return nil, resp, err + } + + return publicKey, resp, nil +} + +// GetUserSecret gets a users codespace secret +// +// Gets a secret available to a user's codespaces without revealing its encrypted value. +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. +// GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#get-a-secret-for-the-authenticated-user +func (s *CodespacesService) GetUserSecret(ctx context.Context, name string) (*Secret, *Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v", name) + return s.getSecret(ctx, u) +} + +// GetOrgSecret gets an org codespace secret +// +// Gets an organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-secret +func (s *CodespacesService) GetOrgSecret(ctx context.Context, org, name string) (*Secret, *Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v", org, name) + return s.getSecret(ctx, u) +} + +// GetRepoSecret gets a repo codespace secret +// +// Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#get-a-repository-secret +func (s *CodespacesService) GetRepoSecret(ctx context.Context, owner, repo, name string) (*Secret, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces/secrets/%v", owner, repo, name) + return s.getSecret(ctx, u) +} + +func (s *CodespacesService) getSecret(ctx context.Context, url string) (*Secret, *Response, error) { + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return nil, nil, err + } + + var secret *Secret + resp, err := s.client.Do(ctx, req, &secret) + if err != nil { + return nil, resp, err + } + + return secret, resp, nil +} + +// CreateOrUpdateUserSecret creates or updates a users codespace secret +// +// Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using LibSodium. +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must also have Codespaces access to use this endpoint. +// GitHub Apps must have write access to the codespaces_user_secrets user permission and codespaces_secrets repository permission on all referenced repositories to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#create-or-update-a-secret-for-the-authenticated-user +func (s *CodespacesService) CreateOrUpdateUserSecret(ctx context.Context, eSecret *EncryptedSecret) (*Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v", eSecret.Name) + return s.createOrUpdateSecret(ctx, u, eSecret) +} + +// CreateOrUpdateOrgSecret creates or updates an orgs codespace secret +// +// Creates or updates an organization secret with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret +func (s *CodespacesService) CreateOrUpdateOrgSecret(ctx context.Context, org string, eSecret *EncryptedSecret) (*Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v", org, eSecret.Name) + return s.createOrUpdateSecret(ctx, u, eSecret) +} + +// CreateOrUpdateRepoSecret creates or updates a repos codespace secret +// +// Creates or updates a repository secret with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret +func (s *CodespacesService) CreateOrUpdateRepoSecret(ctx context.Context, owner, repo string, eSecret *EncryptedSecret) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces/secrets/%v", owner, repo, eSecret.Name) + return s.createOrUpdateSecret(ctx, u, eSecret) +} + +func (s *CodespacesService) createOrUpdateSecret(ctx context.Context, url string, eSecret *EncryptedSecret) (*Response, error) { + req, err := s.client.NewRequest("PUT", url, eSecret) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} + +// DeleteUserSecret deletes a users codespace secret +// +// Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. +// GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#delete-a-secret-for-the-authenticated-user +func (s *CodespacesService) DeleteUserSecret(ctx context.Context, name string) (*Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v", name) + return s.deleteSecret(ctx, u) +} + +// DeleteOrgSecret deletes an orgs codespace secret +// +// Deletes an organization secret using the secret name. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#delete-an-organization-secret +func (s *CodespacesService) DeleteOrgSecret(ctx context.Context, org, name string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v", org, name) + return s.deleteSecret(ctx, u) +} + +// DeleteRepoSecret deletes a repos codespace secret +// +// Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/repository-secrets?apiVersion=2022-11-28#delete-a-repository-secret +func (s *CodespacesService) DeleteRepoSecret(ctx context.Context, owner, repo, name string) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/codespaces/secrets/%v", owner, repo, name) + return s.deleteSecret(ctx, u) +} + +func (s *CodespacesService) deleteSecret(ctx context.Context, url string) (*Response, error) { + req, err := s.client.NewRequest("DELETE", url, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} + +// ListSelectedReposForUserSecret lists the repositories that have been granted the ability to use a user's codespace secret. +// +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. +// GitHub Apps must have read access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#list-selected-repositories-for-a-user-secret +func (s *CodespacesService) ListSelectedReposForUserSecret(ctx context.Context, name string, opts *ListOptions) (*SelectedReposList, *Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v/repositories", name) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + return s.listSelectedReposForSecret(ctx, u) +} + +// ListSelectedReposForOrgSecret lists the repositories that have been granted the ability to use an organization's codespace secret. +// +// Lists all repositories that have been selected when the visibility for repository access to a secret is set to selected. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// GitHub API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#list-selected-repositories-for-an-organization-secret +func (s *CodespacesService) ListSelectedReposForOrgSecret(ctx context.Context, org, name string, opts *ListOptions) (*SelectedReposList, *Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v/repositories", org, name) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + return s.listSelectedReposForSecret(ctx, u) +} + +func (s *CodespacesService) listSelectedReposForSecret(ctx context.Context, url string) (*SelectedReposList, *Response, error) { + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return nil, nil, err + } + + var repositories *SelectedReposList + resp, err := s.client.Do(ctx, req, &repositories) + if err != nil { + return nil, resp, err + } + + return repositories, resp, nil +} + +// SetSelectedReposForUserSecret sets the repositories that have been granted the ability to use a user's codespace secret. +// +// You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. +// GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#set-selected-repositories-for-a-user-secret +func (s *CodespacesService) SetSelectedReposForUserSecret(ctx context.Context, name string, ids SelectedRepoIDs) (*Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v/repositories", name) + return s.setSelectedRepoForSecret(ctx, u, ids) +} + +// SetSelectedReposForOrgSecret sets the repositories that have been granted the ability to use a user's codespace secret. +// +// Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#set-selected-repositories-for-a-user-secret +func (s *CodespacesService) SetSelectedReposForOrgSecret(ctx context.Context, org, name string, ids SelectedRepoIDs) (*Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v/repositories", org, name) + return s.setSelectedRepoForSecret(ctx, u, ids) +} + +func (s *CodespacesService) setSelectedRepoForSecret(ctx context.Context, url string, ids SelectedRepoIDs) (*Response, error) { + type repoIDs struct { + SelectedIDs SelectedRepoIDs `json:"selected_repository_ids"` + } + + req, err := s.client.NewRequest("PUT", url, repoIDs{SelectedIDs: ids}) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} + +// AddSelectedRepoToUserSecret adds a repository to the list of repositories that have been granted the ability to use a user's codespace secret. +// +// Adds a repository to the selected repositories for a user's codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on the referenced repository to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#add-a-selected-repository-to-a-user-secret +func (s *CodespacesService) AddSelectedRepoToUserSecret(ctx context.Context, name string, repo *Repository) (*Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v/repositories/%v", name, *repo.ID) + return s.addSelectedRepoToSecret(ctx, u) +} + +// AddSelectedRepoToOrgSecret adds a repository to the list of repositories that have been granted the ability to use an organization's codespace secret. +// +// Adds a repository to an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#add-selected-repository-to-an-organization-secret +func (s *CodespacesService) AddSelectedRepoToOrgSecret(ctx context.Context, org, name string, repo *Repository) (*Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v/repositories/%v", org, name, *repo.ID) + return s.addSelectedRepoToSecret(ctx, u) +} + +func (s *CodespacesService) addSelectedRepoToSecret(ctx context.Context, url string) (*Response, error) { + req, err := s.client.NewRequest("PUT", url, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} + +// RemoveSelectedRepoFromUserSecret removes a repository from the list of repositories that have been granted the ability to use a user's codespace secret. +// +// Removes a repository from the selected repositories for a user's codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/secrets?apiVersion=2022-11-28#remove-a-selected-repository-from-a-user-secret +func (s *CodespacesService) RemoveSelectedRepoFromUserSecret(ctx context.Context, name string, repo *Repository) (*Response, error) { + u := fmt.Sprintf("user/codespaces/secrets/%v/repositories/%v", name, *repo.ID) + return s.removeSelectedRepoFromSecret(ctx, u) +} + +// RemoveSelectedRepoFromOrgSecret removes a repository from the list of repositories that have been granted the ability to use an organization's codespace secret. +// +// Removes a repository from an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. +// +// Github API docs: https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#remove-selected-repository-from-an-organization-secret +func (s *CodespacesService) RemoveSelectedRepoFromOrgSecret(ctx context.Context, org, name string, repo *Repository) (*Response, error) { + u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v/repositories/%v", org, name, *repo.ID) + return s.removeSelectedRepoFromSecret(ctx, u) +} + +func (s *CodespacesService) removeSelectedRepoFromSecret(ctx context.Context, url string) (*Response, error) { + req, err := s.client.NewRequest("DELETE", url, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} diff --git a/vendor/github.com/google/go-github/v53/github/event.go b/vendor/github.com/google/go-github/v53/github/event.go index 20907a9932..4ee25603a8 100644 --- a/vendor/github.com/google/go-github/v53/github/event.go +++ b/vendor/github.com/google/go-github/v53/github/event.go @@ -127,6 +127,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) { payload = &RepositoryVulnerabilityAlertEvent{} case "SecretScanningAlertEvent": payload = &SecretScanningAlertEvent{} + case "SecurityAdvisoryEvent": + payload = &SecurityAdvisoryEvent{} case "StarEvent": payload = &StarEvent{} case "StatusEvent": diff --git a/vendor/github.com/google/go-github/v53/github/github-accessors.go b/vendor/github.com/google/go-github/v53/github/github-accessors.go index a9aaee814a..8acb72b042 100644 --- a/vendor/github.com/google/go-github/v53/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v53/github/github-accessors.go @@ -2222,6 +2222,22 @@ func (b *BranchProtectionRuleEvent) GetSender() *User { return b.Sender } +// GetActorID returns the ActorID field if it's non-nil, zero value otherwise. +func (b *BypassActor) GetActorID() int64 { + if b == nil || b.ActorID == nil { + return 0 + } + return *b.ActorID +} + +// GetActorType returns the ActorType field if it's non-nil, zero value otherwise. +func (b *BypassActor) GetActorType() string { + if b == nil || b.ActorType == nil { + return "" + } + return *b.ActorType +} + // GetApp returns the App field. func (c *CheckRun) GetApp() *App { if c == nil { @@ -2886,6 +2902,342 @@ func (c *CodeSearchResult) GetTotal() int { return *c.Total } +// GetBillableOwner returns the BillableOwner field. +func (c *Codespace) GetBillableOwner() *User { + if c == nil { + return nil + } + return c.BillableOwner +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (c *Codespace) GetCreatedAt() Timestamp { + if c == nil || c.CreatedAt == nil { + return Timestamp{} + } + return *c.CreatedAt +} + +// GetDevcontainerPath returns the DevcontainerPath field if it's non-nil, zero value otherwise. +func (c *Codespace) GetDevcontainerPath() string { + if c == nil || c.DevcontainerPath == nil { + return "" + } + return *c.DevcontainerPath +} + +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (c *Codespace) GetDisplayName() string { + if c == nil || c.DisplayName == nil { + return "" + } + return *c.DisplayName +} + +// GetEnvironmentID returns the EnvironmentID field if it's non-nil, zero value otherwise. +func (c *Codespace) GetEnvironmentID() string { + if c == nil || c.EnvironmentID == nil { + return "" + } + return *c.EnvironmentID +} + +// GetGitStatus returns the GitStatus field. +func (c *Codespace) GetGitStatus() *CodespacesGitStatus { + if c == nil { + return nil + } + return c.GitStatus +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *Codespace) GetID() int64 { + if c == nil || c.ID == nil { + return 0 + } + return *c.ID +} + +// GetIdleTimeoutMinutes returns the IdleTimeoutMinutes field if it's non-nil, zero value otherwise. +func (c *Codespace) GetIdleTimeoutMinutes() int { + if c == nil || c.IdleTimeoutMinutes == nil { + return 0 + } + return *c.IdleTimeoutMinutes +} + +// GetIdleTimeoutNotice returns the IdleTimeoutNotice field if it's non-nil, zero value otherwise. +func (c *Codespace) GetIdleTimeoutNotice() string { + if c == nil || c.IdleTimeoutNotice == nil { + return "" + } + return *c.IdleTimeoutNotice +} + +// GetLastKnownStopNotice returns the LastKnownStopNotice field if it's non-nil, zero value otherwise. +func (c *Codespace) GetLastKnownStopNotice() string { + if c == nil || c.LastKnownStopNotice == nil { + return "" + } + return *c.LastKnownStopNotice +} + +// GetLastUsedAt returns the LastUsedAt field if it's non-nil, zero value otherwise. +func (c *Codespace) GetLastUsedAt() Timestamp { + if c == nil || c.LastUsedAt == nil { + return Timestamp{} + } + return *c.LastUsedAt +} + +// GetLocation returns the Location field if it's non-nil, zero value otherwise. +func (c *Codespace) GetLocation() string { + if c == nil || c.Location == nil { + return "" + } + return *c.Location +} + +// GetMachine returns the Machine field. +func (c *Codespace) GetMachine() *CodespacesMachine { + if c == nil { + return nil + } + return c.Machine +} + +// GetMachinesURL returns the MachinesURL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetMachinesURL() string { + if c == nil || c.MachinesURL == nil { + return "" + } + return *c.MachinesURL +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *Codespace) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetOwner returns the Owner field. +func (c *Codespace) GetOwner() *User { + if c == nil { + return nil + } + return c.Owner +} + +// GetPendingOperation returns the PendingOperation field if it's non-nil, zero value otherwise. +func (c *Codespace) GetPendingOperation() bool { + if c == nil || c.PendingOperation == nil { + return false + } + return *c.PendingOperation +} + +// GetPendingOperationDisabledReason returns the PendingOperationDisabledReason field if it's non-nil, zero value otherwise. +func (c *Codespace) GetPendingOperationDisabledReason() string { + if c == nil || c.PendingOperationDisabledReason == nil { + return "" + } + return *c.PendingOperationDisabledReason +} + +// GetPrebuild returns the Prebuild field if it's non-nil, zero value otherwise. +func (c *Codespace) GetPrebuild() bool { + if c == nil || c.Prebuild == nil { + return false + } + return *c.Prebuild +} + +// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetPullsURL() string { + if c == nil || c.PullsURL == nil { + return "" + } + return *c.PullsURL +} + +// GetRepository returns the Repository field. +func (c *Codespace) GetRepository() *Repository { + if c == nil { + return nil + } + return c.Repository +} + +// GetRetentionExpiresAt returns the RetentionExpiresAt field if it's non-nil, zero value otherwise. +func (c *Codespace) GetRetentionExpiresAt() Timestamp { + if c == nil || c.RetentionExpiresAt == nil { + return Timestamp{} + } + return *c.RetentionExpiresAt +} + +// GetRetentionPeriodMinutes returns the RetentionPeriodMinutes field if it's non-nil, zero value otherwise. +func (c *Codespace) GetRetentionPeriodMinutes() int { + if c == nil || c.RetentionPeriodMinutes == nil { + return 0 + } + return *c.RetentionPeriodMinutes +} + +// GetRuntimeConstraints returns the RuntimeConstraints field. +func (c *Codespace) GetRuntimeConstraints() *CodespacesRuntimeConstraints { + if c == nil { + return nil + } + return c.RuntimeConstraints +} + +// GetStartURL returns the StartURL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetStartURL() string { + if c == nil || c.StartURL == nil { + return "" + } + return *c.StartURL +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (c *Codespace) GetState() string { + if c == nil || c.State == nil { + return "" + } + return *c.State +} + +// GetStopURL returns the StopURL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetStopURL() string { + if c == nil || c.StopURL == nil { + return "" + } + return *c.StopURL +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (c *Codespace) GetUpdatedAt() Timestamp { + if c == nil || c.UpdatedAt == nil { + return Timestamp{} + } + return *c.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetWebURL returns the WebURL field if it's non-nil, zero value otherwise. +func (c *Codespace) GetWebURL() string { + if c == nil || c.WebURL == nil { + return "" + } + return *c.WebURL +} + +// GetAhead returns the Ahead field if it's non-nil, zero value otherwise. +func (c *CodespacesGitStatus) GetAhead() int { + if c == nil || c.Ahead == nil { + return 0 + } + return *c.Ahead +} + +// GetBehind returns the Behind field if it's non-nil, zero value otherwise. +func (c *CodespacesGitStatus) GetBehind() int { + if c == nil || c.Behind == nil { + return 0 + } + return *c.Behind +} + +// GetHasUncommittedChanges returns the HasUncommittedChanges field if it's non-nil, zero value otherwise. +func (c *CodespacesGitStatus) GetHasUncommittedChanges() bool { + if c == nil || c.HasUncommittedChanges == nil { + return false + } + return *c.HasUncommittedChanges +} + +// GetHasUnpushedChanges returns the HasUnpushedChanges field if it's non-nil, zero value otherwise. +func (c *CodespacesGitStatus) GetHasUnpushedChanges() bool { + if c == nil || c.HasUnpushedChanges == nil { + return false + } + return *c.HasUnpushedChanges +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (c *CodespacesGitStatus) GetRef() string { + if c == nil || c.Ref == nil { + return "" + } + return *c.Ref +} + +// GetCPUs returns the CPUs field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetCPUs() int { + if c == nil || c.CPUs == nil { + return 0 + } + return *c.CPUs +} + +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetDisplayName() string { + if c == nil || c.DisplayName == nil { + return "" + } + return *c.DisplayName +} + +// GetMemoryInBytes returns the MemoryInBytes field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetMemoryInBytes() int64 { + if c == nil || c.MemoryInBytes == nil { + return 0 + } + return *c.MemoryInBytes +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetOperatingSystem returns the OperatingSystem field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetOperatingSystem() string { + if c == nil || c.OperatingSystem == nil { + return "" + } + return *c.OperatingSystem +} + +// GetPrebuildAvailability returns the PrebuildAvailability field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetPrebuildAvailability() string { + if c == nil || c.PrebuildAvailability == nil { + return "" + } + return *c.PrebuildAvailability +} + +// GetStorageInBytes returns the StorageInBytes field if it's non-nil, zero value otherwise. +func (c *CodespacesMachine) GetStorageInBytes() int64 { + if c == nil || c.StorageInBytes == nil { + return 0 + } + return *c.StorageInBytes +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (c *CollaboratorInvitation) GetCreatedAt() Timestamp { if c == nil || c.CreatedAt == nil { @@ -4006,6 +4358,86 @@ func (c *CreateCheckSuiteOptions) GetHeadBranch() string { return *c.HeadBranch } +// GetClientIP returns the ClientIP field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetClientIP() string { + if c == nil || c.ClientIP == nil { + return "" + } + return *c.ClientIP +} + +// GetDevcontainerPath returns the DevcontainerPath field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetDevcontainerPath() string { + if c == nil || c.DevcontainerPath == nil { + return "" + } + return *c.DevcontainerPath +} + +// GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetDisplayName() string { + if c == nil || c.DisplayName == nil { + return "" + } + return *c.DisplayName +} + +// GetGeo returns the Geo field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetGeo() string { + if c == nil || c.Geo == nil { + return "" + } + return *c.Geo +} + +// GetIdleTimeoutMinutes returns the IdleTimeoutMinutes field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetIdleTimeoutMinutes() int { + if c == nil || c.IdleTimeoutMinutes == nil { + return 0 + } + return *c.IdleTimeoutMinutes +} + +// GetMachine returns the Machine field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetMachine() string { + if c == nil || c.Machine == nil { + return "" + } + return *c.Machine +} + +// GetMultiRepoPermissionsOptOut returns the MultiRepoPermissionsOptOut field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetMultiRepoPermissionsOptOut() bool { + if c == nil || c.MultiRepoPermissionsOptOut == nil { + return false + } + return *c.MultiRepoPermissionsOptOut +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetRef() string { + if c == nil || c.Ref == nil { + return "" + } + return *c.Ref +} + +// GetRetentionPeriodMinutes returns the RetentionPeriodMinutes field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetRetentionPeriodMinutes() int { + if c == nil || c.RetentionPeriodMinutes == nil { + return 0 + } + return *c.RetentionPeriodMinutes +} + +// GetWorkingDirectory returns the WorkingDirectory field if it's non-nil, zero value otherwise. +func (c *CreateCodespaceOptions) GetWorkingDirectory() string { + if c == nil || c.WorkingDirectory == nil { + return "" + } + return *c.WorkingDirectory +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (c *CreateEvent) GetDescription() string { if c == nil || c.Description == nil { @@ -4262,6 +4694,30 @@ func (c *CustomRepoRoles) GetName() string { return *c.Name } +// GetQuerySuite returns the QuerySuite field if it's non-nil, zero value otherwise. +func (d *DefaultSetupConfiguration) GetQuerySuite() string { + if d == nil || d.QuerySuite == nil { + return "" + } + return *d.QuerySuite +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (d *DefaultSetupConfiguration) GetState() string { + if d == nil || d.State == nil { + return "" + } + return *d.State +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (d *DefaultSetupConfiguration) GetUpdatedAt() Timestamp { + if d == nil || d.UpdatedAt == nil { + return Timestamp{} + } + return *d.UpdatedAt +} + // GetInstallation returns the Installation field. func (d *DeleteEvent) GetInstallation() *Installation { if d == nil { @@ -6310,6 +6766,14 @@ func (f *ForkEvent) GetSender() *User { return f.Sender } +// GetWorkFolder returns the WorkFolder field if it's non-nil, zero value otherwise. +func (g *GenerateJITConfigRequest) GetWorkFolder() string { + if g == nil || g.WorkFolder == nil { + return "" + } + return *g.WorkFolder +} + // GetPreviousTagName returns the PreviousTagName field if it's non-nil, zero value otherwise. func (g *GenerateNotesOptions) GetPreviousTagName() string { if g == nil || g.PreviousTagName == nil { @@ -8934,6 +9398,14 @@ func (i *IssueStats) GetTotalIssues() int { return *i.TotalIssues } +// GetEncodedJITConfig returns the EncodedJITConfig field if it's non-nil, zero value otherwise. +func (j *JITRunnerConfig) GetEncodedJITConfig() string { + if j == nil || j.EncodedJITConfig == nil { + return "" + } + return *j.EncodedJITConfig +} + // GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. func (j *Jobs) GetTotalCount() int { if j == nil || j.TotalCount == nil { @@ -9454,6 +9926,14 @@ func (l *ListCheckSuiteResults) GetTotal() int { return *l.Total } +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (l *ListCodespaces) GetTotalCount() int { + if l == nil || l.TotalCount == nil { + return 0 + } + return *l.TotalCount +} + // GetAffiliation returns the Affiliation field if it's non-nil, zero value otherwise. func (l *ListCollaboratorOptions) GetAffiliation() string { if l == nil || l.Affiliation == nil { @@ -17918,6 +18398,14 @@ func (r *RepositoryRelease) GetZipballURL() string { return *r.ZipballURL } +// GetParameters returns the Parameters field if it's non-nil, zero value otherwise. +func (r *RepositoryRule) GetParameters() json.RawMessage { + if r == nil || r.Parameters == nil { + return json.RawMessage{} + } + return *r.Parameters +} + // GetCommit returns the Commit field. func (r *RepositoryTag) GetCommit() *Commit { if r == nil { @@ -18366,6 +18854,118 @@ func (r *Rule) GetSeverity() string { return *r.Severity } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *RulePatternParameters) GetName() string { + if r == nil || r.Name == nil { + return "" + } + return *r.Name +} + +// GetNegate returns the Negate field if it's non-nil, zero value otherwise. +func (r *RulePatternParameters) GetNegate() bool { + if r == nil || r.Negate == nil { + return false + } + return *r.Negate +} + +// GetIntegrationID returns the IntegrationID field if it's non-nil, zero value otherwise. +func (r *RuleRequiredStatusChecks) GetIntegrationID() int64 { + if r == nil || r.IntegrationID == nil { + return 0 + } + return *r.IntegrationID +} + +// GetBypassMode returns the BypassMode field if it's non-nil, zero value otherwise. +func (r *Ruleset) GetBypassMode() string { + if r == nil || r.BypassMode == nil { + return "" + } + return *r.BypassMode +} + +// GetConditions returns the Conditions field. +func (r *Ruleset) GetConditions() *RulesetConditions { + if r == nil { + return nil + } + return r.Conditions +} + +// GetLinks returns the Links field. +func (r *Ruleset) GetLinks() *RulesetLinks { + if r == nil { + return nil + } + return r.Links +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Ruleset) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetSourceType returns the SourceType field if it's non-nil, zero value otherwise. +func (r *Ruleset) GetSourceType() string { + if r == nil || r.SourceType == nil { + return "" + } + return *r.SourceType +} + +// GetTarget returns the Target field if it's non-nil, zero value otherwise. +func (r *Ruleset) GetTarget() string { + if r == nil || r.Target == nil { + return "" + } + return *r.Target +} + +// GetRefName returns the RefName field. +func (r *RulesetConditions) GetRefName() *RulesetRefConditionParameters { + if r == nil { + return nil + } + return r.RefName +} + +// GetRepositoryName returns the RepositoryName field. +func (r *RulesetConditions) GetRepositoryName() *RulesetRepositoryConditionParameters { + if r == nil { + return nil + } + return r.RepositoryName +} + +// GetHRef returns the HRef field if it's non-nil, zero value otherwise. +func (r *RulesetLink) GetHRef() string { + if r == nil || r.HRef == nil { + return "" + } + return *r.HRef +} + +// GetSelf returns the Self field. +func (r *RulesetLinks) GetSelf() *RulesetLink { + if r == nil { + return nil + } + return r.Self +} + +// GetProtected returns the Protected field if it's non-nil, zero value otherwise. +func (r *RulesetRepositoryConditionParameters) GetProtected() bool { + if r == nil || r.Protected == nil { + return false + } + return *r.Protected +} + // GetBusy returns the Busy field if it's non-nil, zero value otherwise. func (r *Runner) GetBusy() bool { if r == nil || r.Busy == nil { @@ -20998,6 +21598,30 @@ func (u *UpdateCheckRunOptions) GetStatus() string { return *u.Status } +// GetQuerySuite returns the QuerySuite field if it's non-nil, zero value otherwise. +func (u *UpdateDefaultSetupConfigurationOptions) GetQuerySuite() string { + if u == nil || u.QuerySuite == nil { + return "" + } + return *u.QuerySuite +} + +// GetRunID returns the RunID field if it's non-nil, zero value otherwise. +func (u *UpdateDefaultSetupConfigurationResponse) GetRunID() int64 { + if u == nil || u.RunID == nil { + return 0 + } + return *u.RunID +} + +// GetRunURL returns the RunURL field if it's non-nil, zero value otherwise. +func (u *UpdateDefaultSetupConfigurationResponse) GetRunURL() string { + if u == nil || u.RunURL == nil { + return "" + } + return *u.RunURL +} + // GetAllowsPublicRepositories returns the AllowsPublicRepositories field if it's non-nil, zero value otherwise. func (u *UpdateRunnerGroupRequest) GetAllowsPublicRepositories() bool { if u == nil || u.AllowsPublicRepositories == nil { diff --git a/vendor/github.com/google/go-github/v53/github/github.go b/vendor/github.com/google/go-github/v53/github/github.go index 7d8aef5302..34a27282f0 100644 --- a/vendor/github.com/google/go-github/v53/github/github.go +++ b/vendor/github.com/google/go-github/v53/github/github.go @@ -28,7 +28,7 @@ import ( ) const ( - Version = "v53.0.0" + Version = "v53.2.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" @@ -187,6 +187,7 @@ type Client struct { Billing *BillingService Checks *ChecksService CodeScanning *CodeScanningService + Codespaces *CodespacesService Dependabot *DependabotService Enterprise *EnterpriseService Gists *GistsService @@ -325,6 +326,7 @@ func NewClient(httpClient *http.Client) *Client { c.Billing = (*BillingService)(&c.common) c.Checks = (*ChecksService)(&c.common) c.CodeScanning = (*CodeScanningService)(&c.common) + c.Codespaces = (*CodespacesService)(&c.common) c.Dependabot = (*DependabotService)(&c.common) c.Enterprise = (*EnterpriseService)(&c.common) c.Gists = (*GistsService)(&c.common) diff --git a/vendor/github.com/google/go-github/v53/github/messages.go b/vendor/github.com/google/go-github/v53/github/messages.go index 8547b8810f..bb5ae3f389 100644 --- a/vendor/github.com/google/go-github/v53/github/messages.go +++ b/vendor/github.com/google/go-github/v53/github/messages.go @@ -93,6 +93,7 @@ var ( "repository_vulnerability_alert": "RepositoryVulnerabilityAlertEvent", "release": "ReleaseEvent", "secret_scanning_alert": "SecretScanningAlertEvent", + "security_advisory": "SecurityAdvisoryEvent", "star": "StarEvent", "status": "StatusEvent", "team": "TeamEvent", diff --git a/vendor/github.com/google/go-github/v53/github/orgs_rules.go b/vendor/github.com/google/go-github/v53/github/orgs_rules.go new file mode 100644 index 0000000000..a3905af8fb --- /dev/null +++ b/vendor/github.com/google/go-github/v53/github/orgs_rules.go @@ -0,0 +1,105 @@ +// Copyright 2023 The go-github 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 github + +import ( + "context" + "fmt" +) + +// GetAllOrganizationRulesets gets all the rulesets for the specified organization. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#get-all-organization-repository-rulesets +func (s *OrganizationsService) GetAllOrganizationRulesets(ctx context.Context, org string) ([]*Ruleset, *Response, error) { + u := fmt.Sprintf("orgs/%v/rulesets", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var rulesets []*Ruleset + resp, err := s.client.Do(ctx, req, &rulesets) + if err != nil { + return nil, resp, err + } + + return rulesets, resp, nil +} + +// CreateOrganizationRuleset creates a ruleset for the specified organization. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#create-an-organization-repository-ruleset +func (s *OrganizationsService) CreateOrganizationRuleset(ctx context.Context, org string, rs *Ruleset) (*Ruleset, *Response, error) { + u := fmt.Sprintf("orgs/%v/rulesets", org) + + req, err := s.client.NewRequest("POST", u, rs) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// GetOrganizationRuleset gets a ruleset from the specified organization. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#get-an-organization-repository-ruleset +func (s *OrganizationsService) GetOrganizationRuleset(ctx context.Context, org string, rulesetID int64) (*Ruleset, *Response, error) { + u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// UpdateOrganizationRuleset updates a ruleset from the specified organization. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#update-an-organization-repository-ruleset +func (s *OrganizationsService) UpdateOrganizationRuleset(ctx context.Context, org string, rulesetID int64, rs *Ruleset) (*Ruleset, *Response, error) { + u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID) + + req, err := s.client.NewRequest("PUT", u, rs) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// DeleteOrganizationRuleset deletes a ruleset from the specified organization. +// +// GitHub API docs: https://docs.github.com/en/rest/orgs/rules#delete-an-organization-repository-ruleset +func (s *OrganizationsService) DeleteOrganizationRuleset(ctx context.Context, org string, rulesetID int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/v53/github/repos_contents.go b/vendor/github.com/google/go-github/v53/github/repos_contents.go index be58fd52f6..874a327728 100644 --- a/vendor/github.com/google/go-github/v53/github/repos_contents.go +++ b/vendor/github.com/google/go-github/v53/github/repos_contents.go @@ -192,8 +192,15 @@ func (s *RepositoriesService) DownloadContentsWithMeta(ctx context.Context, owne // as possible, both result types will be returned but only one will contain a // value and the other will be nil. // +// Due to an auth vulnerability issue in the GitHub v3 API, ".." is not allowed +// to appear anywhere in the "path" or this method will return an error. +// // GitHub API docs: https://docs.github.com/en/rest/repos/contents#get-repository-content func (s *RepositoriesService) GetContents(ctx context.Context, owner, repo, path string, opts *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error) { + if strings.Contains(path, "..") { + return nil, nil, nil, errors.New("path must not contain '..' due to auth vulnerability issue") + } + escapedPath := (&url.URL{Path: strings.TrimSuffix(path, "/")}).String() u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, escapedPath) u, err = addOptions(u, opts) diff --git a/vendor/github.com/google/go-github/v53/github/repos_rules.go b/vendor/github.com/google/go-github/v53/github/repos_rules.go new file mode 100644 index 0000000000..9299d3e7f3 --- /dev/null +++ b/vendor/github.com/google/go-github/v53/github/repos_rules.go @@ -0,0 +1,447 @@ +// Copyright 2023 The go-github 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 github + +import ( + "context" + "encoding/json" + "fmt" +) + +// BypassActor represents the bypass actors from a ruleset. +type BypassActor struct { + ActorID *int64 `json:"actor_id,omitempty"` + // Possible values for ActorType are: Team, Integration + ActorType *string `json:"actor_type,omitempty"` +} + +// RulesetLink represents a single link object from GitHub ruleset request _links. +type RulesetLink struct { + HRef *string `json:"href,omitempty"` +} + +// RulesetLinks represents the "_links" object in a Ruleset. +type RulesetLinks struct { + Self *RulesetLink `json:"self,omitempty"` +} + +// RulesetRefConditionParameters represents the conditions object for ref_names. +type RulesetRefConditionParameters struct { + Include []string `json:"include"` + Exclude []string `json:"exclude"` +} + +// RulesetRepositoryConditionParameters represents the conditions object for repository_names. +type RulesetRepositoryConditionParameters struct { + Include []string `json:"include,omitempty"` + Exclude []string `json:"exclude,omitempty"` + Protected *bool `json:"protected,omitempty"` +} + +// RulesetCondition represents the conditions object in a ruleset. +type RulesetConditions struct { + RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"` + RepositoryName *RulesetRepositoryConditionParameters `json:"repository_name,omitempty"` +} + +// RulePatternParameters represents the rule pattern parameters. +type RulePatternParameters struct { + Name *string `json:"name,omitempty"` + // If Negate is true, the rule will fail if the pattern matches. + Negate *bool `json:"negate,omitempty"` + // Possible values for Operator are: starts_with, ends_with, contains, regex + Operator string `json:"operator"` + Pattern string `json:"pattern"` +} + +// UpdateAllowsFetchAndMergeRuleParameters represents the update rule parameters. +type UpdateAllowsFetchAndMergeRuleParameters struct { + UpdateAllowsFetchAndMerge bool `json:"update_allows_fetch_and_merge"` +} + +// RequiredDeploymentEnvironmentsRuleParameters represents the required_deployments rule parameters. +type RequiredDeploymentEnvironmentsRuleParameters struct { + RequiredDeploymentEnvironments []string `json:"required_deployment_environments"` +} + +// PullRequestRuleParameters represents the pull_request rule parameters. +type PullRequestRuleParameters struct { + DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"` + RequireCodeOwnerReview bool `json:"require_code_owner_review"` + RequireLastPushApproval bool `json:"require_last_push_approval"` + RequiredApprovingReviewCount int `json:"required_approving_review_count"` + RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"` +} + +// RuleRequiredStatusChecks represents the RequiredStatusChecks for the RequiredStatusChecksRuleParameters object. +type RuleRequiredStatusChecks struct { + Context string `json:"context"` + IntegrationID *int64 `json:"integration_id,omitempty"` +} + +// RequiredStatusChecksRuleParameters represents the required_status_checks rule parameters. +type RequiredStatusChecksRuleParameters struct { + RequiredStatusChecks []RuleRequiredStatusChecks `json:"required_status_checks"` + StrictRequiredStatusChecksPolicy bool `json:"strict_required_status_checks_policy"` +} + +// RepositoryRule represents a GitHub Rule. +type RepositoryRule struct { + Type string `json:"type"` + Parameters *json.RawMessage `json:"parameters,omitempty"` +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +// This helps us handle the fact that RepositoryRule parameter field can be of numerous types. +func (r *RepositoryRule) UnmarshalJSON(data []byte) error { + type rule RepositoryRule + var RepositoryRule rule + if err := json.Unmarshal(data, &RepositoryRule); err != nil { + return err + } + + r.Type = RepositoryRule.Type + + switch RepositoryRule.Type { + case "creation", "deletion", "required_linear_history", "required_signatures", "non_fast_forward": + r.Parameters = nil + case "update": + params := UpdateAllowsFetchAndMergeRuleParameters{} + if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + return err + } + + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + case "required_deployments": + params := RequiredDeploymentEnvironmentsRuleParameters{} + if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + return err + } + + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + case "commit_message_pattern", "commit_author_email_pattern", "committer_email_pattern", "branch_name_pattern", "tag_name_pattern": + params := RulePatternParameters{} + if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + return err + } + + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + case "pull_request": + params := PullRequestRuleParameters{} + if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + return err + } + + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + case "required_status_checks": + params := RequiredStatusChecksRuleParameters{} + if err := json.Unmarshal(*RepositoryRule.Parameters, ¶ms); err != nil { + return err + } + + bytes, _ := json.Marshal(params) + rawParams := json.RawMessage(bytes) + + r.Parameters = &rawParams + default: + r.Type = "" + r.Parameters = nil + return fmt.Errorf("RepositoryRule.Type %T is not yet implemented, unable to unmarshal", RepositoryRule.Type) + } + + return nil +} + +// NewCreationRule creates a rule to only allow users with bypass permission to create matching refs. +func NewCreationRule() (rule *RepositoryRule) { + return &RepositoryRule{ + Type: "creation", + } +} + +// NewUpdateRule creates a rule to only allow users with bypass permission to update matching refs. +func NewUpdateRule(params *UpdateAllowsFetchAndMergeRuleParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "update", + Parameters: &rawParams, + } +} + +// NewDeletionRule creates a rule to only allow users with bypass permissions to delete matching refs. +func NewDeletionRule() (rule *RepositoryRule) { + return &RepositoryRule{ + Type: "deletion", + } +} + +// NewRequiredLinearHistoryRule creates a rule to prevent merge commits from being pushed to matching branches. +func NewRequiredLinearHistoryRule() (rule *RepositoryRule) { + return &RepositoryRule{ + Type: "required_linear_history", + } +} + +// NewRequiredDeploymentsRule creates a rule to require environments to be successfully deployed before they can be merged into the matching branches. +func NewRequiredDeploymentsRule(params *RequiredDeploymentEnvironmentsRuleParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "required_deployments", + Parameters: &rawParams, + } +} + +// NewRequiredSignaturesRule creates a rule a to require commits pushed to matching branches to have verified signatures. +func NewRequiredSignaturesRule() (rule *RepositoryRule) { + return &RepositoryRule{ + Type: "required_signatures", + } +} + +// NewPullRequestRule creates a rule to require all commits be made to a non-target branch and submitted via a pull request before they can be merged. +func NewPullRequestRule(params *PullRequestRuleParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "pull_request", + Parameters: &rawParams, + } +} + +// NewRequiredStatusChecksRule creates a rule to require which status checks must pass before branches can be merged into a branch rule. +func NewRequiredStatusChecksRule(params *RequiredStatusChecksRuleParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "required_status_checks", + Parameters: &rawParams, + } +} + +// NewNonFastForwardRule creates a rule as part to prevent users with push access from force pushing to matching branches. +func NewNonFastForwardRule() (rule *RepositoryRule) { + return &RepositoryRule{ + Type: "non_fast_forward", + } +} + +// NewCommitMessagePatternRule creates a rule to restrict commit message patterns being pushed to matching branches. +func NewCommitMessagePatternRule(params *RulePatternParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "commit_message_pattern", + Parameters: &rawParams, + } +} + +// NewCommitAuthorEmailPatternRule creates a rule to restrict commits with author email patterns being merged into matching branches. +func NewCommitAuthorEmailPatternRule(params *RulePatternParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "commit_author_email_pattern", + Parameters: &rawParams, + } +} + +// NewCommitterEmailPatternRule creates a rule to restrict commits with committer email patterns being merged into matching branches. +func NewCommitterEmailPatternRule(params *RulePatternParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "committer_email_pattern", + Parameters: &rawParams, + } +} + +// NewBranchNamePatternRule creates a rule to restrict branch patterns from being merged into matching branches. +func NewBranchNamePatternRule(params *RulePatternParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "branch_name_pattern", + Parameters: &rawParams, + } +} + +// NewTagNamePatternRule creates a rule to restrict tag patterns contained in non-target branches from being merged into matching branches. +func NewTagNamePatternRule(params *RulePatternParameters) (rule *RepositoryRule) { + bytes, _ := json.Marshal(params) + + rawParams := json.RawMessage(bytes) + + return &RepositoryRule{ + Type: "tag_name_pattern", + Parameters: &rawParams, + } +} + +// Ruleset represents a GitHub ruleset object. +type Ruleset struct { + ID int64 `json:"id"` + Name string `json:"name"` + // Possible values for Target are branch, tag + Target *string `json:"target,omitempty"` + // Possible values for SourceType are: Repository, Organization + SourceType *string `json:"source_type,omitempty"` + Source string `json:"source"` + // Possible values for Enforcement are: disabled, active, evaluate + Enforcement string `json:"enforcement"` + // Possible values for BypassMode are: none, repository, organization + BypassMode *string `json:"bypass_mode,omitempty"` + BypassActors []*BypassActor `json:"bypass_actors,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Links *RulesetLinks `json:"_links,omitempty"` + Conditions *RulesetConditions `json:"conditions,omitempty"` + Rules []*RepositoryRule `json:"rules,omitempty"` +} + +// GetRulesForBranch gets all the rules that apply to the specified branch. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-rules-for-a-branch +func (s *RepositoriesService) GetRulesForBranch(ctx context.Context, owner, repo, branch string) ([]*RepositoryRule, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/rules/branches/%v", owner, repo, branch) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var rules []*RepositoryRule + resp, err := s.client.Do(ctx, req, &rules) + if err != nil { + return nil, resp, err + } + + return rules, resp, nil +} + +// GetAllRulesets gets all the rules that apply to the specified repository. +// If includesParents is true, rulesets configured at the organization level that apply to the repository will be returned. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-all-repository-rulesets +func (s *RepositoriesService) GetAllRulesets(ctx context.Context, owner, repo string, includesParents bool) ([]*Ruleset, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/rulesets?includes_parents=%v", owner, repo, includesParents) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var ruleset []*Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// CreateRuleset creates a ruleset for the specified repository. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#create-a-repository-ruleset +func (s *RepositoriesService) CreateRuleset(ctx context.Context, owner, repo string, rs *Ruleset) (*Ruleset, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/rulesets", owner, repo) + + req, err := s.client.NewRequest("POST", u, rs) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// GetRuleset gets a ruleset for the specified repository. +// If includesParents is true, rulesets configured at the organization level that apply to the repository will be returned. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#get-a-repository-ruleset +func (s *RepositoriesService) GetRuleset(ctx context.Context, owner, repo string, rulesetID int64, includesParents bool) (*Ruleset, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/rulesets/%v?includes_parents=%v", owner, repo, rulesetID, includesParents) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// UpdateRuleset updates a ruleset for the specified repository. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#update-a-repository-ruleset +func (s *RepositoriesService) UpdateRuleset(ctx context.Context, owner, repo string, rulesetID int64, rs *Ruleset) (*Ruleset, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/rulesets/%v", owner, repo, rulesetID) + + req, err := s.client.NewRequest("PUT", u, rs) + if err != nil { + return nil, nil, err + } + + var ruleset *Ruleset + resp, err := s.client.Do(ctx, req, &ruleset) + if err != nil { + return nil, resp, err + } + + return ruleset, resp, nil +} + +// DeleteRuleset deletes a ruleset for the specified repository. +// +// GitHub API docs: https://docs.github.com/en/rest/repos/rules#delete-a-repository-ruleset +func (s *RepositoriesService) DeleteRuleset(ctx context.Context, owner, repo string, rulesetID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/rulesets/%v", owner, repo, rulesetID) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/skeema/knownhosts/NOTICE b/vendor/github.com/skeema/knownhosts/NOTICE index 619a5a7ea7..a92cb34d67 100644 --- a/vendor/github.com/skeema/knownhosts/NOTICE +++ b/vendor/github.com/skeema/knownhosts/NOTICE @@ -1,4 +1,4 @@ -Copyright 2023 Skeema LLC and the Skeema Knownhosts authors +Copyright 2024 Skeema LLC and the Skeema Knownhosts authors 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/skeema/knownhosts/README.md b/vendor/github.com/skeema/knownhosts/README.md index 85339bc03b..36b847614c 100644 --- a/vendor/github.com/skeema/knownhosts/README.md +++ b/vendor/github.com/skeema/knownhosts/README.md @@ -100,7 +100,7 @@ config := &ssh.ClientConfig{ ## License -**Source code copyright 2023 Skeema LLC and the Skeema Knownhosts authors** +**Source code copyright 2024 Skeema LLC and the Skeema Knownhosts authors** ```text Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/skeema/knownhosts/knownhosts.go b/vendor/github.com/skeema/knownhosts/knownhosts.go index c2fb516057..4dad7771b8 100644 --- a/vendor/github.com/skeema/knownhosts/knownhosts.go +++ b/vendor/github.com/skeema/knownhosts/knownhosts.go @@ -76,13 +76,23 @@ func (hkcb HostKeyCallback) HostKeyAlgorithms(hostWithPort string) (algos []stri // example by https://github.com/golang/crypto/pull/254. hostKeys := hkcb.HostKeys(hostWithPort) seen := make(map[string]struct{}, len(hostKeys)) - for _, key := range hostKeys { - typ := key.Type() + addAlgo := func(typ string) { if _, already := seen[typ]; !already { algos = append(algos, typ) seen[typ] = struct{}{} } } + for _, key := range hostKeys { + typ := key.Type() + if typ == ssh.KeyAlgoRSA { + // KeyAlgoRSASHA256 and KeyAlgoRSASHA512 are only public key algorithms, + // not public key formats, so they can't appear as a PublicKey.Type. + // The corresponding PublicKey.Type is KeyAlgoRSA. See RFC 8332, Section 2. + addAlgo(ssh.KeyAlgoRSASHA512) + addAlgo(ssh.KeyAlgoRSASHA256) + } + addAlgo(typ) + } return algos } diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md index 120a573426..58141f02f1 100644 --- a/vendor/github.com/spf13/cast/README.md +++ b/vendor/github.com/spf13/cast/README.md @@ -1,7 +1,8 @@ -cast -==== -[![GoDoc](https://godoc.org/github.com/spf13/cast?status.svg)](https://godoc.org/github.com/spf13/cast) -[![Build Status](https://github.com/spf13/cast/actions/workflows/go.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/go.yml) +# cast + +[![Build Status](https://github.com/spf13/cast/actions/workflows/ci.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/ci.yml) +[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) +![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast)](https://goreportcard.com/report/github.com/spf13/cast) Easy and safe casting from one type to another in Go @@ -17,7 +18,7 @@ interface into a bool, etc. Cast does this intelligently when an obvious conversion is possible. It doesn’t make any attempts to guess what you meant, for example you can only convert a string to an int when it is a string representation of an int such as “8”. Cast was developed for use in -[Hugo](http://hugo.spf13.com), a website engine which uses YAML, TOML or JSON +[Hugo](https://gohugo.io), a website engine which uses YAML, TOML or JSON for meta data. ## Why use Cast? @@ -72,4 +73,3 @@ the code for a complete set. var eight interface{} = 8 cast.ToInt(eight) // 8 cast.ToInt(nil) // 0 - diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go index 514d759bfb..d49bbf83ec 100644 --- a/vendor/github.com/spf13/cast/caste.go +++ b/vendor/github.com/spf13/cast/caste.go @@ -98,10 +98,31 @@ func ToBoolE(i interface{}) (bool, error) { case nil: return false, nil case int: - if i.(int) != 0 { - return true, nil - } - return false, nil + return b != 0, nil + case int64: + return b != 0, nil + case int32: + return b != 0, nil + case int16: + return b != 0, nil + case int8: + return b != 0, nil + case uint: + return b != 0, nil + case uint64: + return b != 0, nil + case uint32: + return b != 0, nil + case uint16: + return b != 0, nil + case uint8: + return b != 0, nil + case float64: + return b != 0, nil + case float32: + return b != 0, nil + case time.Duration: + return b != 0, nil case string: return strconv.ParseBool(i.(string)) case json.Number: @@ -1385,6 +1406,8 @@ func (f timeFormat) hasTimezone() bool { var ( timeFormats = []timeFormat{ + // Keep common formats at the top. + {"2006-01-02", timeFormatNoTimezone}, {time.RFC3339, timeFormatNumericTimezone}, {"2006-01-02T15:04:05", timeFormatNoTimezone}, // iso8601 without timezone {time.RFC1123Z, timeFormatNumericTimezone}, @@ -1400,7 +1423,6 @@ var ( {time.UnixDate, timeFormatNamedTimezone}, {time.RubyDate, timeFormatNumericTimezone}, {"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, - {"2006-01-02", timeFormatNoTimezone}, {"02 Jan 2006", timeFormatNoTimezone}, {"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, {"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, diff --git a/vendor/github.com/tidwall/gjson/README.md b/vendor/github.com/tidwall/gjson/README.md index 00b4c9621b..c8db11f147 100644 --- a/vendor/github.com/tidwall/gjson/README.md +++ b/vendor/github.com/tidwall/gjson/README.md @@ -176,7 +176,7 @@ The `result.Int()` and `result.Uint()` calls are capable of reading all 64 bits, ```go result.Int() int64 // -9223372036854775808 to 9223372036854775807 -result.Uint() int64 // 0 to 18446744073709551615 +result.Uint() uint64 // 0 to 18446744073709551615 ``` ## Modifiers and path chaining diff --git a/vendor/github.com/tidwall/gjson/gjson.go b/vendor/github.com/tidwall/gjson/gjson.go index 330218d4ae..53cbd2363f 100644 --- a/vendor/github.com/tidwall/gjson/gjson.go +++ b/vendor/github.com/tidwall/gjson/gjson.go @@ -1009,8 +1009,8 @@ func parseObjectPath(path string) (r objectPathResult) { r.piped = true } else { r.path = path[i+1:] + r.more = true } - r.more = true return } else if path[i] == '|' { r.part = string(epart) diff --git a/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md b/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md index ec4ed485db..32bd822745 100644 --- a/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md +++ b/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md @@ -4,8 +4,7 @@ We want to make contributing to this project as easy as possible. ## Reporting Issues -If you have an issue, please report it on the [issue tracker]( -https://github.com/xanzy/go-gitlab/issues). +If you have an issue, please report it on the [issue tracker](https://github.com/xanzy/go-gitlab/issues). When you are up for writing a PR to solve the issue you encountered, it's not needed to first open a separate issue. In that case only opening a PR with a @@ -13,8 +12,8 @@ description of the issue you are trying to solve is just fine. ## Contributing Code -Pull requests are always welcome. When in doubt if your contribution fits in with -the rest of the project, free to first open an issue to discuss your idea. +Pull requests are always welcome. When in doubt if your contribution fits within +the rest of the project, feel free to first open an issue to discuss your idea. This is not needed when fixing a bug or adding an enhancement, as long as the enhancement you are trying to add can be found in the public GitLab API docs as @@ -22,8 +21,10 @@ this project only supports what is in the public API docs. ## Coding style -We try to follow the Go best practices, where it makes sense, and use [`gofumpt`]( -https://github.com/mvdan/gofumpt) to format code in this project. +We try to follow the Go best practices, where it makes sense, and use +[`gofumpt`](https://github.com/mvdan/gofumpt) to format code in this project. +As a general rule of thumb we prefer to keep line width for comments below 80 +chars and for code (where possible and sensible) below 100 chars. Before making a PR, please look at the rest this package and try to make sure your contribution is consistent with the rest of the coding style. @@ -35,18 +36,18 @@ easier to find things. ### Setting up your local development environment to Contribute to `go-gitlab` 1. [Fork](https://github.com/xanzy/go-gitlab/fork), then clone the repository. - ```sh - git clone https://github.com//go-gitlab.git - # or via ssh - git clone git@github.com:/go-gitlab.git - ``` + ```sh + git clone https://github.com//go-gitlab.git + # or via ssh + git clone git@github.com:/go-gitlab.git + ``` 1. Install dependencies: - ```sh - make setup - ``` + ```sh + make setup + ``` 1. Make your changes on your feature branch 1. Run the tests and `gofumpt` - ```sh - make test && make fmt - ``` + ```sh + make test && make fmt + ``` 1. Open up your pull request diff --git a/vendor/github.com/xanzy/go-gitlab/README.md b/vendor/github.com/xanzy/go-gitlab/README.md index 06ddb255d0..1652705af2 100644 --- a/vendor/github.com/xanzy/go-gitlab/README.md +++ b/vendor/github.com/xanzy/go-gitlab/README.md @@ -74,6 +74,7 @@ to add new and/or missing endpoints. Currently, the following services are suppo - [x] Project Import/export - [x] Project Members - [x] Project Milestones +- [x] Project Repository Storage Moves - [x] Project Snippets - [x] Project Vulnerabilities - [x] Project-Level Variables diff --git a/vendor/github.com/xanzy/go-gitlab/commits.go b/vendor/github.com/xanzy/go-gitlab/commits.go index 7c724c2b0e..0c597d863e 100644 --- a/vendor/github.com/xanzy/go-gitlab/commits.go +++ b/vendor/github.com/xanzy/go-gitlab/commits.go @@ -571,10 +571,10 @@ type GPGSignature struct { KeySubkeyID int `json:"gpg_key_subkey_id"` } -// GetGPGSiganature gets a GPG signature of a commit. +// GetGPGSignature gets a GPG signature of a commit. // // GitLab API docs: https://docs.gitlab.com/ee/api/commits.html#get-gpg-signature-of-a-commit -func (s *CommitsService) GetGPGSiganature(pid interface{}, sha string, options ...RequestOptionFunc) (*GPGSignature, *Response, error) { +func (s *CommitsService) GetGPGSignature(pid interface{}, sha string, options ...RequestOptionFunc) (*GPGSignature, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err diff --git a/vendor/github.com/xanzy/go-gitlab/deployments.go b/vendor/github.com/xanzy/go-gitlab/deployments.go index 40ac4ed513..3ce8ec40fc 100644 --- a/vendor/github.com/xanzy/go-gitlab/deployments.go +++ b/vendor/github.com/xanzy/go-gitlab/deployments.go @@ -201,3 +201,21 @@ func (s *DeploymentsService) UpdateProjectDeployment(pid interface{}, deployment return d, resp, nil } + +// DeleteProjectDeployment delete a project deployment. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/deployments.html#delete-a-specific-deployment +func (s *DeploymentsService) DeleteProjectDeployment(pid interface{}, deployment int, options ...RequestOptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/deployments/%d", PathEscape(project), deployment) + + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go index b90f4fa3ed..f66511517c 100644 --- a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go +++ b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go @@ -652,6 +652,7 @@ type MergeEvent struct { } `json:"last_commit"` BlockingDiscussionsResolved bool `json:"blocking_discussions_resolved"` WorkInProgress bool `json:"work_in_progress"` + Draft bool `json:"draft"` TotalTimeSpent int `json:"total_time_spent"` TimeChange int `json:"time_change"` HumanTotalTimeSpent string `json:"human_total_time_spent"` @@ -679,6 +680,10 @@ type MergeEvent struct { Previous string `json:"previous"` Current string `json:"current"` } `json:"description"` + Draft struct { + Previous bool `json:"previous"` + Current bool `json:"current"` + } `json:"draft"` Labels struct { Previous []*EventLabel `json:"previous"` Current []*EventLabel `json:"current"` @@ -801,6 +806,7 @@ type PipelineEvent struct { FinishedAt string `json:"finished_at"` Duration int `json:"duration"` QueuedDuration int `json:"queued_duration"` + URL string `json:"url"` Variables []struct { Key string `json:"key"` Value string `json:"value"` diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/github.com/xanzy/go-gitlab/gitlab.go index 81cf3ff9e6..6586288819 100644 --- a/vendor/github.com/xanzy/go-gitlab/gitlab.go +++ b/vendor/github.com/xanzy/go-gitlab/gitlab.go @@ -33,8 +33,9 @@ import ( "sync" "time" - "github.com/google/go-querystring/query" "github.com/hashicorp/go-cleanhttp" + + "github.com/google/go-querystring/query" retryablehttp "github.com/hashicorp/go-retryablehttp" "golang.org/x/oauth2" "golang.org/x/time/rate" @@ -103,115 +104,122 @@ type Client struct { UserAgent string // Services used for talking to different parts of the GitLab API. - AccessRequests *AccessRequestsService - Applications *ApplicationsService - AuditEvents *AuditEventsService - Avatar *AvatarRequestsService - AwardEmoji *AwardEmojiService - Boards *IssueBoardsService - Branches *BranchesService - BroadcastMessage *BroadcastMessagesService - CIYMLTemplate *CIYMLTemplatesService - ClusterAgents *ClusterAgentsService - Commits *CommitsService - ContainerRegistry *ContainerRegistryService - CustomAttribute *CustomAttributesService - DeployKeys *DeployKeysService - DeployTokens *DeployTokensService - DeploymentMergeRequests *DeploymentMergeRequestsService - Deployments *DeploymentsService - Discussions *DiscussionsService - DockerfileTemplate *DockerfileTemplatesService - Environments *EnvironmentsService - EpicIssues *EpicIssuesService - Epics *EpicsService - ErrorTracking *ErrorTrackingService - Events *EventsService - ExternalStatusChecks *ExternalStatusChecksService - Features *FeaturesService - FreezePeriods *FreezePeriodsService - GenericPackages *GenericPackagesService - GeoNodes *GeoNodesService - GitIgnoreTemplates *GitIgnoreTemplatesService - GroupAccessTokens *GroupAccessTokensService - GroupBadges *GroupBadgesService - GroupCluster *GroupClustersService - GroupImportExport *GroupImportExportService - GroupIssueBoards *GroupIssueBoardsService - GroupIterations *GroupIterationsService - GroupLabels *GroupLabelsService - GroupMembers *GroupMembersService - GroupMilestones *GroupMilestonesService - GroupVariables *GroupVariablesService - GroupWikis *GroupWikisService - Groups *GroupsService - InstanceCluster *InstanceClustersService - InstanceVariables *InstanceVariablesService - Invites *InvitesService - IssueLinks *IssueLinksService - Issues *IssuesService - IssuesStatistics *IssuesStatisticsService - Jobs *JobsService - Keys *KeysService - Labels *LabelsService - License *LicenseService - LicenseTemplates *LicenseTemplatesService - ManagedLicenses *ManagedLicensesService - Markdown *MarkdownService - MergeRequestApprovals *MergeRequestApprovalsService - MergeRequests *MergeRequestsService - Metadata *MetadataService - Milestones *MilestonesService - Namespaces *NamespacesService - Notes *NotesService - NotificationSettings *NotificationSettingsService - Packages *PackagesService - Pages *PagesService - PagesDomains *PagesDomainsService - PersonalAccessTokens *PersonalAccessTokensService - PipelineSchedules *PipelineSchedulesService - PipelineTriggers *PipelineTriggersService - Pipelines *PipelinesService - PlanLimits *PlanLimitsService - ProjectAccessTokens *ProjectAccessTokensService - ProjectBadges *ProjectBadgesService - ProjectCluster *ProjectClustersService - ProjectFeatureFlags *ProjectFeatureFlagService - ProjectImportExport *ProjectImportExportService - ProjectIterations *ProjectIterationsService - ProjectMembers *ProjectMembersService - ProjectMirrors *ProjectMirrorService - ProjectSnippets *ProjectSnippetsService - ProjectTemplates *ProjectTemplatesService - ProjectVariables *ProjectVariablesService - ProjectVulnerabilities *ProjectVulnerabilitiesService - Projects *ProjectsService - ProtectedBranches *ProtectedBranchesService - ProtectedEnvironments *ProtectedEnvironmentsService - ProtectedTags *ProtectedTagsService - ReleaseLinks *ReleaseLinksService - Releases *ReleasesService - Repositories *RepositoriesService - RepositoryFiles *RepositoryFilesService - RepositorySubmodules *RepositorySubmodulesService - ResourceLabelEvents *ResourceLabelEventsService - ResourceMilestoneEvents *ResourceMilestoneEventsService - ResourceStateEvents *ResourceStateEventsService - ResourceWeightEvents *ResourceWeightEventsService - Runners *RunnersService - Search *SearchService - Services *ServicesService - Settings *SettingsService - Sidekiq *SidekiqService - Snippets *SnippetsService - SystemHooks *SystemHooksService - Tags *TagsService - Todos *TodosService - Topics *TopicsService - Users *UsersService - Validate *ValidateService - Version *VersionService - Wikis *WikisService + AccessRequests *AccessRequestsService + Applications *ApplicationsService + AuditEvents *AuditEventsService + Avatar *AvatarRequestsService + AwardEmoji *AwardEmojiService + Boards *IssueBoardsService + Branches *BranchesService + BroadcastMessage *BroadcastMessagesService + CIYMLTemplate *CIYMLTemplatesService + ClusterAgents *ClusterAgentsService + Commits *CommitsService + ContainerRegistry *ContainerRegistryService + CustomAttribute *CustomAttributesService + DeployKeys *DeployKeysService + DeployTokens *DeployTokensService + DeploymentMergeRequests *DeploymentMergeRequestsService + Deployments *DeploymentsService + Discussions *DiscussionsService + DockerfileTemplate *DockerfileTemplatesService + Environments *EnvironmentsService + EpicIssues *EpicIssuesService + Epics *EpicsService + ErrorTracking *ErrorTrackingService + Events *EventsService + ExternalStatusChecks *ExternalStatusChecksService + Features *FeaturesService + FreezePeriods *FreezePeriodsService + GenericPackages *GenericPackagesService + GeoNodes *GeoNodesService + GitIgnoreTemplates *GitIgnoreTemplatesService + GroupAccessTokens *GroupAccessTokensService + GroupBadges *GroupBadgesService + GroupCluster *GroupClustersService + GroupEpicBoards *GroupEpicBoardsService + GroupImportExport *GroupImportExportService + GroupIssueBoards *GroupIssueBoardsService + GroupIterations *GroupIterationsService + GroupLabels *GroupLabelsService + GroupMembers *GroupMembersService + GroupMilestones *GroupMilestonesService + GroupProtectedEnvironments *GroupProtectedEnvironmentsService + GroupRepositoryStorageMove *GroupRepositoryStorageMoveService + GroupVariables *GroupVariablesService + GroupWikis *GroupWikisService + Groups *GroupsService + InstanceCluster *InstanceClustersService + InstanceVariables *InstanceVariablesService + Invites *InvitesService + IssueLinks *IssueLinksService + Issues *IssuesService + IssuesStatistics *IssuesStatisticsService + Jobs *JobsService + JobTokenScope *JobTokenScopeService + Keys *KeysService + Labels *LabelsService + License *LicenseService + LicenseTemplates *LicenseTemplatesService + ManagedLicenses *ManagedLicensesService + Markdown *MarkdownService + MergeRequestApprovals *MergeRequestApprovalsService + MergeRequests *MergeRequestsService + MergeTrains *MergeTrainsService + Metadata *MetadataService + Milestones *MilestonesService + Namespaces *NamespacesService + Notes *NotesService + NotificationSettings *NotificationSettingsService + Packages *PackagesService + Pages *PagesService + PagesDomains *PagesDomainsService + PersonalAccessTokens *PersonalAccessTokensService + PipelineSchedules *PipelineSchedulesService + PipelineTriggers *PipelineTriggersService + Pipelines *PipelinesService + PlanLimits *PlanLimitsService + ProjectAccessTokens *ProjectAccessTokensService + ProjectBadges *ProjectBadgesService + ProjectCluster *ProjectClustersService + ProjectFeatureFlags *ProjectFeatureFlagService + ProjectImportExport *ProjectImportExportService + ProjectIterations *ProjectIterationsService + ProjectMembers *ProjectMembersService + ProjectMirrors *ProjectMirrorService + ProjectRepositoryStorageMove *ProjectRepositoryStorageMoveService + ProjectSnippets *ProjectSnippetsService + ProjectTemplates *ProjectTemplatesService + ProjectVariables *ProjectVariablesService + ProjectVulnerabilities *ProjectVulnerabilitiesService + Projects *ProjectsService + ProtectedBranches *ProtectedBranchesService + ProtectedEnvironments *ProtectedEnvironmentsService + ProtectedTags *ProtectedTagsService + ReleaseLinks *ReleaseLinksService + Releases *ReleasesService + Repositories *RepositoriesService + RepositoryFiles *RepositoryFilesService + RepositorySubmodules *RepositorySubmodulesService + ResourceLabelEvents *ResourceLabelEventsService + ResourceMilestoneEvents *ResourceMilestoneEventsService + ResourceStateEvents *ResourceStateEventsService + ResourceWeightEvents *ResourceWeightEventsService + Runners *RunnersService + Search *SearchService + Services *ServicesService + Settings *SettingsService + Sidekiq *SidekiqService + SnippetRepositoryStorageMove *SnippetRepositoryStorageMoveService + Snippets *SnippetsService + SystemHooks *SystemHooksService + Tags *TagsService + Todos *TodosService + Topics *TopicsService + Users *UsersService + Validate *ValidateService + Version *VersionService + Wikis *WikisService } // ListOptions specifies the optional parameters to various List methods that @@ -352,12 +360,15 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.GroupAccessTokens = &GroupAccessTokensService{client: c} c.GroupBadges = &GroupBadgesService{client: c} c.GroupCluster = &GroupClustersService{client: c} + c.GroupEpicBoards = &GroupEpicBoardsService{client: c} c.GroupImportExport = &GroupImportExportService{client: c} c.GroupIssueBoards = &GroupIssueBoardsService{client: c} c.GroupIterations = &GroupIterationsService{client: c} c.GroupLabels = &GroupLabelsService{client: c} c.GroupMembers = &GroupMembersService{client: c} c.GroupMilestones = &GroupMilestonesService{client: c} + c.GroupProtectedEnvironments = &GroupProtectedEnvironmentsService{client: c} + c.GroupRepositoryStorageMove = &GroupRepositoryStorageMoveService{client: c} c.GroupVariables = &GroupVariablesService{client: c} c.GroupWikis = &GroupWikisService{client: c} c.Groups = &GroupsService{client: c} @@ -368,6 +379,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.Issues = &IssuesService{client: c, timeStats: timeStats} c.IssuesStatistics = &IssuesStatisticsService{client: c} c.Jobs = &JobsService{client: c} + c.JobTokenScope = &JobTokenScopeService{client: c} c.Keys = &KeysService{client: c} c.Labels = &LabelsService{client: c} c.License = &LicenseService{client: c} @@ -376,6 +388,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.Markdown = &MarkdownService{client: c} c.MergeRequestApprovals = &MergeRequestApprovalsService{client: c} c.MergeRequests = &MergeRequestsService{client: c, timeStats: timeStats} + c.MergeTrains = &MergeTrainsService{client: c} c.Metadata = &MetadataService{client: c} c.Milestones = &MilestonesService{client: c} c.Namespaces = &NamespacesService{client: c} @@ -397,6 +410,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.ProjectIterations = &ProjectIterationsService{client: c} c.ProjectMembers = &ProjectMembersService{client: c} c.ProjectMirrors = &ProjectMirrorService{client: c} + c.ProjectRepositoryStorageMove = &ProjectRepositoryStorageMoveService{client: c} c.ProjectSnippets = &ProjectSnippetsService{client: c} c.ProjectTemplates = &ProjectTemplatesService{client: c} c.ProjectVariables = &ProjectVariablesService{client: c} @@ -420,6 +434,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.Settings = &SettingsService{client: c} c.Sidekiq = &SidekiqService{client: c} c.Snippets = &SnippetsService{client: c} + c.SnippetRepositoryStorageMove = &SnippetRepositoryStorageMoveService{client: c} c.SystemHooks = &SystemHooksService{client: c} c.Tags = &TagsService{client: c} c.Todos = &TodosService{client: c} diff --git a/vendor/github.com/xanzy/go-gitlab/group_badges.go b/vendor/github.com/xanzy/go-gitlab/group_badges.go index 1ae3ebcc68..c648a74432 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_badges.go +++ b/vendor/github.com/xanzy/go-gitlab/group_badges.go @@ -44,6 +44,7 @@ const ( // https://docs.gitlab.com/ee/api/group_badges.html type GroupBadge struct { ID int `json:"id"` + Name string `json:"name"` LinkURL string `json:"link_url"` ImageURL string `json:"image_url"` RenderedLinkURL string `json:"rendered_link_url"` @@ -55,7 +56,10 @@ type GroupBadge struct { // // GitLab API docs: // https://docs.gitlab.com/ee/api/group_badges.html#list-all-badges-of-a-group -type ListGroupBadgesOptions ListOptions +type ListGroupBadgesOptions struct { + ListOptions + Name *string `url:"name,omitempty" json:"name,omitempty"` +} // ListGroupBadges gets a list of a group badges. // @@ -114,6 +118,7 @@ func (s *GroupBadgesService) GetGroupBadge(gid interface{}, badge int, options . type AddGroupBadgeOptions struct { LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` + Name *string `url:"name,omitempty" json:"name,omitempty"` } // AddGroupBadge adds a badge to a group. @@ -148,6 +153,7 @@ func (s *GroupBadgesService) AddGroupBadge(gid interface{}, opt *AddGroupBadgeOp type EditGroupBadgeOptions struct { LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` + Name *string `url:"name,omitempty" json:"name,omitempty"` } // EditGroupBadge updates a badge of a group. @@ -201,6 +207,7 @@ func (s *GroupBadgesService) DeleteGroupBadge(gid interface{}, badge int, option type GroupBadgePreviewOptions struct { LinkURL *string `url:"link_url,omitempty" json:"link_url,omitempty"` ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"` + Name *string `url:"name,omitempty" json:"name,omitempty"` } // PreviewGroupBadge returns how the link_url and image_url final URLs would be after diff --git a/vendor/github.com/xanzy/go-gitlab/group_epic_boards.go b/vendor/github.com/xanzy/go-gitlab/group_epic_boards.go new file mode 100644 index 0000000000..fd8cfd86d2 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/group_epic_boards.go @@ -0,0 +1,104 @@ +// +// Copyright 2021, Patrick Webster +// +// 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 gitlab + +import ( + "fmt" + "net/http" +) + +// GroupEpicBoardsService handles communication with the group epic board +// related methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_epic_boards.html +type GroupEpicBoardsService struct { + client *Client +} + +// GroupEpicBoard represents a GitLab group epic board. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_epic_boards.html +type GroupEpicBoard struct { + ID int `json:"id"` + Name string `json:"name"` + Group *Group `json:"group"` + Labels []*LabelDetails `json:"labels"` + Lists []*BoardList `json:"lists"` +} + +func (b GroupEpicBoard) String() string { + return Stringify(b) +} + +// ListGroupEpicBoardsOptions represents the available +// ListGroupEpicBoards() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_epic_boards.html#list-all-epic-boards-in-a-group +type ListGroupEpicBoardsOptions ListOptions + +// ListGroupEpicBoards gets a list of all epic boards in a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_epic_boards.html#list-all-epic-boards-in-a-group +func (s *GroupEpicBoardsService) ListGroupEpicBoards(gid interface{}, opt *ListGroupEpicBoardsOptions, options ...RequestOptionFunc) ([]*GroupEpicBoard, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epic_boards", PathEscape(group)) + + req, err := s.client.NewRequest(http.MethodGet, u, opt, options) + if err != nil { + return nil, nil, err + } + + var gs []*GroupEpicBoard + resp, err := s.client.Do(req, &gs) + if err != nil { + return nil, resp, err + } + + return gs, resp, nil +} + +// GetGroupEpicBoard gets a single epic board of a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_epic_boards.html#single-group-epic-board +func (s *GroupEpicBoardsService) GetGroupEpicBoard(gid interface{}, board int, options ...RequestOptionFunc) (*GroupEpicBoard, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/epic_boards/%d", PathEscape(group), board) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + gib := new(GroupEpicBoard) + resp, err := s.client.Do(req, gib) + if err != nil { + return nil, resp, err + } + + return gib, resp, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/group_protected_environments.go b/vendor/github.com/xanzy/go-gitlab/group_protected_environments.go new file mode 100644 index 0000000000..53bee7079f --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/group_protected_environments.go @@ -0,0 +1,278 @@ +// +// Copyright 2023, Sander van Harmelen +// +// 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 gitlab + +import ( + "fmt" + "net/http" +) + +// GroupProtectedEnvironmentsService handles communication with the group-level +// protected environment methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html +type GroupProtectedEnvironmentsService struct { + client *Client +} + +// GroupProtectedEnvironment represents a group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html +type GroupProtectedEnvironment struct { + Name string `json:"name"` + DeployAccessLevels []*GroupEnvironmentAccessDescription `json:"deploy_access_levels"` + RequiredApprovalCount int `json:"required_approval_count"` + ApprovalRules []*GroupEnvironmentApprovalRule `json:"approval_rules"` +} + +// GroupEnvironmentAccessDescription represents the access decription for a +// group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html +type GroupEnvironmentAccessDescription struct { + ID int `json:"id"` + AccessLevel AccessLevelValue `json:"access_level"` + AccessLevelDescription string `json:"access_level_description"` + UserID int `json:"user_id"` + GroupID int `json:"group_id"` +} + +// GroupEnvironmentApprovalRule represents the approval rules for a group-level +// protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#protect-a-single-environment +type GroupEnvironmentApprovalRule struct { + ID int `json:"id"` + UserID int `json:"user_id"` + GroupID int `json:"group_id"` + AccessLevel AccessLevelValue `json:"access_level"` + AccessLevelDescription string `json:"access_level_description"` + RequiredApprovalCount int `json:"required_approvals"` + GroupInheritanceType int `json:"group_inheritance_type"` +} + +// ListGroupProtectedEnvironmentsOptions represents the available +// ListGroupProtectedEnvironments() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#list-group-level-protected-environments +type ListGroupProtectedEnvironmentsOptions ListOptions + +// ListGroupProtectedEnvironments returns a list of protected environments from +// a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#list-group-level-protected-environments +func (s *GroupProtectedEnvironmentsService) ListGroupProtectedEnvironments(gid interface{}, opt *ListGroupProtectedEnvironmentsOptions, options ...RequestOptionFunc) ([]*GroupProtectedEnvironment, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/protected_environments", PathEscape(group)) + + req, err := s.client.NewRequest(http.MethodGet, u, opt, options) + if err != nil { + return nil, nil, err + } + + var pes []*GroupProtectedEnvironment + resp, err := s.client.Do(req, &pes) + if err != nil { + return nil, resp, err + } + + return pes, resp, nil +} + +// GetGroupProtectedEnvironment returns a single group-level protected +// environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#get-a-single-protected-environment +func (s *GroupProtectedEnvironmentsService) GetGroupProtectedEnvironment(gid interface{}, environment string, options ...RequestOptionFunc) (*GroupProtectedEnvironment, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/protected_environments/%s", PathEscape(group), environment) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + pe := new(GroupProtectedEnvironment) + resp, err := s.client.Do(req, pe) + if err != nil { + return nil, resp, err + } + + return pe, resp, nil +} + +// ProtectGroupEnvironmentOptions represents the available +// ProtectGroupEnvironment() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#protect-a-single-environment +type ProtectGroupEnvironmentOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + DeployAccessLevels *[]*GroupEnvironmentAccessOptions `url:"deploy_access_levels,omitempty" json:"deploy_access_levels,omitempty"` + RequiredApprovalCount *int `url:"required_approval_count,omitempty" json:"required_approval_count,omitempty"` + ApprovalRules *[]*GroupEnvironmentApprovalRuleOptions `url:"approval_rules,omitempty" json:"approval_rules,omitempty"` +} + +// GroupEnvironmentAccessOptions represents the options for an access decription +// for a group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#protect-a-single-environment +type GroupEnvironmentAccessOptions struct { + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` +} + +// GroupEnvironmentApprovalRuleOptions represents the approval rules for a +// group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#protect-a-single-environment +type GroupEnvironmentApprovalRuleOptions struct { + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + AccessLevelDescription *string `url:"access_level_description,omitempty" json:"access_level_description,omitempty"` + RequiredApprovalCount *int `url:"required_approvals,omitempty" json:"required_approvals,omitempty"` + GroupInheritanceType *int `url:"group_inheritance_type,omitempty" json:"group_inheritance_type,omitempty"` +} + +// ProtectGroupEnvironment protects a single group-level environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#protect-a-single-environment +func (s *GroupProtectedEnvironmentsService) ProtectGroupEnvironment(gid interface{}, opt *ProtectGroupEnvironmentOptions, options ...RequestOptionFunc) (*GroupProtectedEnvironment, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/protected_environments", PathEscape(group)) + + req, err := s.client.NewRequest(http.MethodPost, u, opt, options) + if err != nil { + return nil, nil, err + } + + pe := new(GroupProtectedEnvironment) + resp, err := s.client.Do(req, pe) + if err != nil { + return nil, resp, err + } + + return pe, resp, nil +} + +// UpdateGroupProtectedEnvironmentOptions represents the available +// UpdateGroupProtectedEnvironment() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#update-a-protected-environment +type UpdateGroupProtectedEnvironmentOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + DeployAccessLevels *[]*UpdateGroupEnvironmentAccessOptions `url:"deploy_access_levels,omitempty" json:"deploy_access_levels,omitempty"` + RequiredApprovalCount *int `url:"required_approval_count,omitempty" json:"required_approval_count,omitempty"` + ApprovalRules *[]*UpdateGroupEnvironmentApprovalRuleOptions `url:"approval_rules,omitempty" json:"approval_rules,omitempty"` +} + +// UpdateGroupEnvironmentAccessOptions represents the options for updates to the +// access decription for a group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#update-a-protected-environment +type UpdateGroupEnvironmentAccessOptions struct { + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + ID *int `url:"id,omitempty" json:"id,omitempty"` + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + Destroy *bool `url:"_destroy,omitempty" json:"_destroy,omitempty"` +} + +// UpdateGroupEnvironmentApprovalRuleOptions represents the updates to the +// approval rules for a group-level protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#update-a-protected-environment +type UpdateGroupEnvironmentApprovalRuleOptions struct { + ID *int `url:"id,omitempty" json:"id,omitempty"` + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + AccessLevelDescription *string `url:"access_level_description,omitempty" json:"access_level_description,omitempty"` + RequiredApprovalCount *int `url:"required_approvals,omitempty" json:"required_approvals,omitempty"` + GroupInheritanceType *int `url:"group_inheritance_type,omitempty" json:"group_inheritance_type,omitempty"` + Destroy *bool `url:"_destroy,omitempty" json:"_destroy,omitempty"` +} + +// UpdateGroupProtectedEnvironment updates a single group-level protected +// environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#update-a-protected-environment +func (s *GroupProtectedEnvironmentsService) UpdateGroupProtectedEnvironment(gid interface{}, environment string, opt *UpdateGroupProtectedEnvironmentOptions, options ...RequestOptionFunc) (*GroupProtectedEnvironment, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/protected_environments/%s", PathEscape(group), environment) + + req, err := s.client.NewRequest(http.MethodPut, u, opt, options) + if err != nil { + return nil, nil, err + } + + pe := new(GroupProtectedEnvironment) + resp, err := s.client.Do(req, pe) + if err != nil { + return nil, resp, err + } + + return pe, resp, nil +} + +// UnprotectGroupEnvironment unprotects the given protected group-level +// environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_protected_environments.html#unprotect-a-single-environment +func (s *GroupProtectedEnvironmentsService) UnprotectGroupEnvironment(gid interface{}, environment string, options ...RequestOptionFunc) (*Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("groups/%s/protected_environments/%s", PathEscape(group), environment) + + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/group_repository_storage_move.go b/vendor/github.com/xanzy/go-gitlab/group_repository_storage_move.go new file mode 100644 index 0000000000..18951a1661 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/group_repository_storage_move.go @@ -0,0 +1,195 @@ +// +// Copyright 2023, Nick Westbury +// +// 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 gitlab + +import ( + "fmt" + "net/http" + "time" +) + +// GroupRepositoryStorageMoveService handles communication with the +// group repositories related methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html +type GroupRepositoryStorageMoveService struct { + client *Client +} + +// GroupRepositoryStorageMove represents the status of a repository move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html +type GroupRepositoryStorageMove struct { + ID int `json:"id"` + CreatedAt *time.Time `json:"created_at"` + State string `json:"state"` + SourceStorageName string `json:"source_storage_name"` + DestinationStorageName string `json:"destination_storage_name"` + Group *RepositoryGroup `json:"group"` +} + +type RepositoryGroup struct { + ID int `json:"id"` + Name string `json:"name"` + WebURL string `json:"web_url"` +} + +// RetrieveAllGroupStorageMovesOptions represents the available +// RetrieveAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#retrieve-all-group-repository-storage-moves +type RetrieveAllGroupStorageMovesOptions ListOptions + +// RetrieveAllStorageMoves retrieves all group repository storage moves +// accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#retrieve-all-group-repository-storage-moves +func (g GroupRepositoryStorageMoveService) RetrieveAllStorageMoves(opts RetrieveAllGroupStorageMovesOptions, options ...RequestOptionFunc) ([]*GroupRepositoryStorageMove, *Response, error) { + req, err := g.client.NewRequest(http.MethodGet, "group_repository_storage_moves", opts, options) + if err != nil { + return nil, nil, err + } + + var gsms []*GroupRepositoryStorageMove + resp, err := g.client.Do(req, &gsms) + if err != nil { + return nil, resp, err + } + + return gsms, resp, err +} + +// RetrieveAllStorageMovesForGroup retrieves all repository storage moves for +// a single group accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#retrieve-all-repository-storage-moves-for-a-single-group +func (g GroupRepositoryStorageMoveService) RetrieveAllStorageMovesForGroup(group int, opts RetrieveAllGroupStorageMovesOptions, options ...RequestOptionFunc) ([]*GroupRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("groups/%d/repository_storage_moves", group) + + req, err := g.client.NewRequest(http.MethodGet, u, opts, options) + if err != nil { + return nil, nil, err + } + + var gsms []*GroupRepositoryStorageMove + resp, err := g.client.Do(req, &gsms) + if err != nil { + return nil, resp, err + } + + return gsms, resp, err +} + +// GetStorageMove gets a single group repository storage move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#get-a-single-group-repository-storage-move +func (g GroupRepositoryStorageMoveService) GetStorageMove(repositoryStorage int, options ...RequestOptionFunc) (*GroupRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("group_repository_storage_moves/%d", repositoryStorage) + + req, err := g.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + gsm := new(GroupRepositoryStorageMove) + resp, err := g.client.Do(req, gsm) + if err != nil { + return nil, resp, err + } + + return gsm, resp, err +} + +// GetStorageMoveForGroup gets a single repository storage move for a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#get-a-single-repository-storage-move-for-a-group +func (g GroupRepositoryStorageMoveService) GetStorageMoveForGroup(group int, repositoryStorage int, options ...RequestOptionFunc) (*GroupRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("groups/%d/repository_storage_moves/%d", group, repositoryStorage) + + req, err := g.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + gsm := new(GroupRepositoryStorageMove) + resp, err := g.client.Do(req, gsm) + if err != nil { + return nil, resp, err + } + + return gsm, resp, err +} + +// ScheduleStorageMoveForGroupOptions represents the available +// ScheduleStorageMoveForGroup() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-group +type ScheduleStorageMoveForGroupOptions struct { + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleStorageMoveForGroup schedule a repository to be moved for a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-group +func (g GroupRepositoryStorageMoveService) ScheduleStorageMoveForGroup(group int, opts ScheduleStorageMoveForGroupOptions, options ...RequestOptionFunc) (*GroupRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("groups/%d/repository_storage_moves", group) + + req, err := g.client.NewRequest(http.MethodPost, u, opts, options) + if err != nil { + return nil, nil, err + } + + gsm := new(GroupRepositoryStorageMove) + resp, err := g.client.Do(req, gsm) + if err != nil { + return nil, resp, err + } + + return gsm, resp, err +} + +// ScheduleAllGroupStorageMovesOptions represents the available +// ScheduleAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#schedule-repository-storage-moves-for-all-groups-on-a-storage-shard +type ScheduleAllGroupStorageMovesOptions struct { + SourceStorageName *string `url:"source_storage_name,omitempty" json:"source_storage_name,omitempty"` + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleAllStorageMoves schedules all group repositories to be moved. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#schedule-repository-storage-moves-for-all-groups-on-a-storage-shard +func (g GroupRepositoryStorageMoveService) ScheduleAllStorageMoves(opts ScheduleAllGroupStorageMovesOptions, options ...RequestOptionFunc) (*Response, error) { + req, err := g.client.NewRequest(http.MethodPost, "group_repository_storage_moves", opts, options) + if err != nil { + return nil, err + } + + return g.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/groups.go b/vendor/github.com/xanzy/go-gitlab/groups.go index ceff074112..4a9a996d92 100644 --- a/vendor/github.com/xanzy/go-gitlab/groups.go +++ b/vendor/github.com/xanzy/go-gitlab/groups.go @@ -50,6 +50,7 @@ type Group struct { AvatarURL string `json:"avatar_url"` WebURL string `json:"web_url"` RequestAccessEnabled bool `json:"request_access_enabled"` + RepositoryStorage string `json:"repository_storage"` FullName string `json:"full_name"` FullPath string `json:"full_path"` FileTemplateProjectID int `json:"file_template_project_id"` @@ -75,16 +76,17 @@ type Group struct { GroupAccessLevel int `json:"group_access_level"` ExpiresAt *ISOTime `json:"expires_at"` } `json:"shared_with_groups"` - LDAPCN string `json:"ldap_cn"` - LDAPAccess AccessLevelValue `json:"ldap_access"` - LDAPGroupLinks []*LDAPGroupLink `json:"ldap_group_links"` - SAMLGroupLinks []*SAMLGroupLink `json:"saml_group_links"` - SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"` - ExtraSharedRunnersMinutesLimit int `json:"extra_shared_runners_minutes_limit"` - PreventForkingOutsideGroup bool `json:"prevent_forking_outside_group"` - MarkedForDeletionOn *ISOTime `json:"marked_for_deletion_on"` - CreatedAt *time.Time `json:"created_at"` - IPRestrictionRanges string `json:"ip_restriction_ranges"` + LDAPCN string `json:"ldap_cn"` + LDAPAccess AccessLevelValue `json:"ldap_access"` + LDAPGroupLinks []*LDAPGroupLink `json:"ldap_group_links"` + SAMLGroupLinks []*SAMLGroupLink `json:"saml_group_links"` + SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"` + ExtraSharedRunnersMinutesLimit int `json:"extra_shared_runners_minutes_limit"` + PreventForkingOutsideGroup bool `json:"prevent_forking_outside_group"` + MarkedForDeletionOn *ISOTime `json:"marked_for_deletion_on"` + CreatedAt *time.Time `json:"created_at"` + IPRestrictionRanges string `json:"ip_restriction_ranges"` + WikiAccessLevel AccessControlValue `json:"wiki_access_level"` } // GroupAvatar represents a GitLab group avatar. @@ -127,16 +129,17 @@ type SAMLGroupLink struct { // GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#list-groups type ListGroupsOptions struct { ListOptions + SkipGroups *[]int `url:"skip_groups,omitempty" del:"," json:"skip_groups,omitempty"` AllAvailable *bool `url:"all_available,omitempty" json:"all_available,omitempty"` - MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"` - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - Owned *bool `url:"owned,omitempty" json:"owned,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"` - SkipGroups *[]int `url:"skip_groups,omitempty" del:"," json:"skip_groups,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` Sort *string `url:"sort,omitempty" json:"sort,omitempty"` Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"` - TopLevelOnly *bool `url:"top_level_only,omitempty" json:"top_level_only,omitempty"` WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"` + Owned *bool `url:"owned,omitempty" json:"owned,omitempty"` + MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"` + TopLevelOnly *bool `url:"top_level_only,omitempty" json:"top_level_only,omitempty"` + RepositoryStorage *string `url:"repository_storage,omitempty" json:"repository_storage,omitempty"` } // ListGroups gets a list of groups (as user: my groups, as admin: all groups). @@ -353,6 +356,7 @@ type CreateGroupOptions struct { SharedRunnersMinutesLimit *int `url:"shared_runners_minutes_limit,omitempty" json:"shared_runners_minutes_limit,omitempty"` ExtraSharedRunnersMinutesLimit *int `url:"extra_shared_runners_minutes_limit,omitempty" json:"extra_shared_runners_minutes_limit,omitempty"` IPRestrictionRanges *string `url:"ip_restriction_ranges,omitempty" json:"ip_restriction_ranges,omitempty"` + WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` } // CreateGroup creates a new project group. Available only for users who can @@ -481,6 +485,7 @@ type UpdateGroupOptions struct { SharedRunnersSetting *SharedRunnersSettingValue `url:"shared_runners_setting,omitempty" json:"shared_runners_setting,omitempty"` PreventSharingGroupsOutsideHierarchy *bool `url:"prevent_sharing_groups_outside_hierarchy,omitempty" json:"prevent_sharing_groups_outside_hierarchy,omitempty"` IPRestrictionRanges *string `url:"ip_restriction_ranges,omitempty" json:"ip_restriction_ranges,omitempty"` + WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` } // UpdateGroup updates an existing group; only available to group owners and diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go index 45849293c7..42478c9f9d 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues.go +++ b/vendor/github.com/xanzy/go-gitlab/issues.go @@ -445,6 +445,7 @@ type CreateIssueOptions struct { Labels *Labels `url:"labels,comma,omitempty" json:"labels,omitempty"` CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"` DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"` + EpicID *int `url:"epic_id,omitempty" json:"epic_id,omitempty"` MergeRequestToResolveDiscussionsOf *int `url:"merge_request_to_resolve_discussions_of,omitempty" json:"merge_request_to_resolve_discussions_of,omitempty"` DiscussionToResolve *string `url:"discussion_to_resolve,omitempty" json:"discussion_to_resolve,omitempty"` Weight *int `url:"weight,omitempty" json:"weight,omitempty"` @@ -490,6 +491,7 @@ type UpdateIssueOptions struct { StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"` UpdatedAt *time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"` DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"` + EpicID *int `url:"epic_id,omitempty" json:"epic_id,omitempty"` Weight *int `url:"weight,omitempty" json:"weight,omitempty"` DiscussionLocked *bool `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"` IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/job_token_scope.go b/vendor/github.com/xanzy/go-gitlab/job_token_scope.go new file mode 100644 index 0000000000..ff96ba6984 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/job_token_scope.go @@ -0,0 +1,186 @@ +// Copyright 2021, Sander van Harmelen +// +// 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 gitlab + +import ( + "fmt" + "net/http" +) + +// JobTokenScopeService handles communication with project CI settings +// such as token permissions. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/project_job_token_scopes.html +type JobTokenScopeService struct { + client *Client +} + +// JobTokenAccessSettings represents job token access attributes for this project. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/project_job_token_scopes.html +type JobTokenAccessSettings struct { + InboundEnabled bool `json:"inbound_enabled"` + OutboundEnabled bool `json:"outbound_enabled"` +} + +// GetProjectJobTokenAccessSettings fetch the CI/CD job token access settings (job token scope) of a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#get-a-projects-cicd-job-token-access-settings +func (j *JobTokenScopeService) GetProjectJobTokenAccessSettings(pid interface{}, options ...RequestOptionFunc) (*JobTokenAccessSettings, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf(`projects/%s/job_token_scope`, PathEscape(project)) + + req, err := j.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + jt := new(JobTokenAccessSettings) + resp, err := j.client.Do(req, jt) + if err != nil { + return nil, resp, err + } + + return jt, resp, err +} + +// PatchProjectJobTokenAccessSettingsOptions represents the available +// PatchProjectJobTokenAccessSettings() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#patch-a-projects-cicd-job-token-access-settings +type PatchProjectJobTokenAccessSettingsOptions struct { + Enabled bool `json:"enabled"` +} + +// PatchProjectJobTokenAccessSettings patch the Limit access to this project setting (job token scope) of a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#patch-a-projects-cicd-job-token-access-settings +func (j *JobTokenScopeService) PatchProjectJobTokenAccessSettings(pid interface{}, opt *PatchProjectJobTokenAccessSettingsOptions, options ...RequestOptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf(`projects/%s/job_token_scope`, PathEscape(project)) + + req, err := j.client.NewRequest(http.MethodPatch, u, opt, options) + if err != nil { + return nil, err + } + + return j.client.Do(req, nil) +} + +// JobTokenInboundAllowItem represents a single job token inbound allowlist item. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/project_job_token_scopes.html +type JobTokenInboundAllowItem struct { + SourceProjectID int `json:"source_project_id"` + TargetProjectID int `json:"target_project_id"` +} + +// GetJobTokenInboundAllowListOptions represents the available +// GetJobTokenInboundAllowList() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#get-a-projects-cicd-job-token-inbound-allowlist +type GetJobTokenInboundAllowListOptions struct { + ListOptions +} + +// GetProjectJobTokenInboundAllowList fetches the CI/CD job token inbound +// allowlist (job token scope) of a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#get-a-projects-cicd-job-token-inbound-allowlist +func (j *JobTokenScopeService) GetProjectJobTokenInboundAllowList(pid interface{}, opt *GetJobTokenInboundAllowListOptions, options ...RequestOptionFunc) ([]*Project, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf(`projects/%s/job_token_scope/allowlist`, PathEscape(project)) + + req, err := j.client.NewRequest(http.MethodGet, u, opt, options) + if err != nil { + return nil, nil, err + } + + var ps []*Project + resp, err := j.client.Do(req, &ps) + if err != nil { + return nil, resp, err + } + + return ps, resp, nil +} + +// AddProjectToJobScopeAllowListOptions represents the available +// AddProjectToJobScopeAllowList() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#create-a-new-project-to-a-projects-cicd-job-token-inbound-allowlist +type JobTokenInboundAllowOptions struct { + TargetProjectID *int `url:"target_project_id,omitempty" json:"target_project_id,omitempty"` +} + +// AddProjectToJobScopeAllowList adds a new project to a project's job token +// inbound allow list. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#create-a-new-project-to-a-projects-cicd-job-token-inbound-allowlist +func (j *JobTokenScopeService) AddProjectToJobScopeAllowList(pid interface{}, opt *JobTokenInboundAllowOptions, options ...RequestOptionFunc) (*JobTokenInboundAllowItem, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf(`projects/%s/job_token_scope/allowlist`, PathEscape(project)) + + req, err := j.client.NewRequest(http.MethodPost, u, opt, options) + if err != nil { + return nil, nil, err + } + + jt := new(JobTokenInboundAllowItem) + resp, err := j.client.Do(req, jt) + if err != nil { + return nil, resp, err + } + + return jt, resp, nil +} + +// RemoveProjectFromJobScopeAllowList removes a project from a project's job +// token inbound allow list. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_job_token_scopes.html#remove-a-project-from-a-projects-cicd-job-token-inbound-allowlist +func (j *JobTokenScopeService) RemoveProjectFromJobScopeAllowList(pid interface{}, targetProject int, options ...RequestOptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf(`projects/%s/job_token_scope/allowlist/%d`, PathEscape(project), targetProject) + + req, err := j.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return j.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/keys.go b/vendor/github.com/xanzy/go-gitlab/keys.go index 0c03f5d6d6..d9cf598333 100644 --- a/vendor/github.com/xanzy/go-gitlab/keys.go +++ b/vendor/github.com/xanzy/go-gitlab/keys.go @@ -64,3 +64,34 @@ func (s *KeysService) GetKeyWithUser(key int, options ...RequestOptionFunc) (*Ke return k, resp, nil } + +// GetKeyByFingerprintOptions represents the available GetKeyByFingerprint() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/keys.html#get-user-by-fingerprint-of-ssh-key +// https://docs.gitlab.com/ee/api/keys.html#get-user-by-deploy-key-fingerprint +type GetKeyByFingerprintOptions struct { + Fingerprint string `url:"fingerprint" json:"fingerprint"` +} + +// GetKeyByFingerprint gets a specific SSH key or deploy key by fingerprint +// along with the associated user information. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/keys.html#get-user-by-fingerprint-of-ssh-key +// https://docs.gitlab.com/ee/api/keys.html#get-user-by-deploy-key-fingerprint +func (s *KeysService) GetKeyByFingerprint(opt *GetKeyByFingerprintOptions, options ...RequestOptionFunc) (*Key, *Response, error) { + req, err := s.client.NewRequest(http.MethodGet, "keys", opt, options) + if err != nil { + return nil, nil, err + } + + k := new(Key) + resp, err := s.client.Do(req, k) + if err != nil { + return nil, resp, err + } + + return k, resp, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/github.com/xanzy/go-gitlab/merge_requests.go index 34a244a1d2..822b0ded61 100644 --- a/vendor/github.com/xanzy/go-gitlab/merge_requests.go +++ b/vendor/github.com/xanzy/go-gitlab/merge_requests.go @@ -17,6 +17,7 @@ package gitlab import ( + "encoding/json" "fmt" "net/http" "time" @@ -53,6 +54,7 @@ type MergeRequest struct { SourceProjectID int `json:"source_project_id"` TargetProjectID int `json:"target_project_id"` Labels Labels `json:"labels"` + LabelDetails []*LabelDetails `json:"label_details"` Description string `json:"description"` Draft bool `json:"draft"` WorkInProgress bool `json:"work_in_progress"` @@ -116,6 +118,40 @@ func (m MergeRequest) String() string { return Stringify(m) } +func (m *MergeRequest) UnmarshalJSON(data []byte) error { + type alias MergeRequest + + raw := make(map[string]interface{}) + err := json.Unmarshal(data, &raw) + if err != nil { + return err + } + + labelDetails, ok := raw["labels"].([]interface{}) + if ok && len(labelDetails) > 0 { + // We only want to change anything if we got label details. + if _, ok := labelDetails[0].(map[string]interface{}); !ok { + return json.Unmarshal(data, (*alias)(m)) + } + + labels := make([]interface{}, len(labelDetails)) + for i, details := range labelDetails { + labels[i] = details.(map[string]interface{})["name"] + } + + // Set the correct values + raw["labels"] = labels + raw["label_details"] = labelDetails + + data, err = json.Marshal(raw) + if err != nil { + return err + } + } + + return json.Unmarshal(data, (*alias)(m)) +} + // MergeRequestDiffVersion represents Gitlab merge request version. // // Gitlab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/merge_trains.go b/vendor/github.com/xanzy/go-gitlab/merge_trains.go new file mode 100644 index 0000000000..e55917fa0c --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/merge_trains.go @@ -0,0 +1,170 @@ +package gitlab + +import ( + "fmt" + "net/http" + "time" +) + +// MergeTrainsService handles communication with the merge trains related +// methods of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/merge_trains.html +type MergeTrainsService struct { + client *Client +} + +// MergeTrain represents a Gitlab merge train. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/merge_trains.html +type MergeTrain struct { + ID int `json:"id"` + MergeRequest *MergeTrainMergeRequest `json:"merge_request"` + User *BasicUser `json:"user"` + Pipeline *Pipeline `json:"pipeline"` + CreatedAt *time.Time `json:"created_at"` + UpdatedAt *time.Time `json:"updated_at"` + TargetBranch string `json:"target_branch"` + Status string `json:"status"` + MergedAt *time.Time `json:"merged_at"` + Duration int `json:"duration"` +} + +// MergeTrainMergeRequest represents a Gitlab merge request inside merge train. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/merge_trains.html +type MergeTrainMergeRequest struct { + ID int `json:"id"` + IID int `json:"iid"` + ProjectID int `json:"project_id"` + Title string `json:"title"` + Description string `json:"description"` + State string `json:"state"` + CreatedAt *time.Time `json:"created_at"` + UpdatedAt *time.Time `json:"updated_at"` + WebURL string `json:"web_url"` +} + +// ListMergeTrainsOptions represents the available ListMergeTrain() options. +// +// Gitab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#list-merge-trains-for-a-project +type ListMergeTrainsOptions struct { + ListOptions + Scope *string `url:"scope,omitempty" json:"scope,omitempty"` + Sort *string `url:"sort,omitempty" json:"sort,omitempty"` +} + +// ListProjectMergeTrains get a list of merge trains in a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#list-merge-trains-for-a-project +func (s *MergeTrainsService) ListProjectMergeTrains(pid interface{}, opt *ListMergeTrainsOptions, options ...RequestOptionFunc) ([]*MergeTrain, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_trains", PathEscape(project)) + + req, err := s.client.NewRequest(http.MethodGet, u, opt, options) + if err != nil { + return nil, nil, err + } + + var mts []*MergeTrain + resp, err := s.client.Do(req, &mts) + if err != nil { + return nil, resp, err + } + + return mts, resp, nil +} + +// ListMergeRequestInMergeTrain gets a list of merge requests added to a merge +// train for the requested target branch. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#list-merge-requests-in-a-merge-train +func (s *MergeTrainsService) ListMergeRequestInMergeTrain(pid interface{}, targetBranch string, opts *ListMergeTrainsOptions, options ...RequestOptionFunc) ([]*MergeTrain, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_trains/%s", PathEscape(project), targetBranch) + + req, err := s.client.NewRequest(http.MethodGet, u, opts, options) + if err != nil { + return nil, nil, err + } + + var mts []*MergeTrain + resp, err := s.client.Do(req, &mts) + if err != nil { + return nil, resp, err + } + + return mts, resp, nil +} + +// GetMergeRequestOnAMergeTrain Get merge train information for the requested +// merge request. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#get-the-status-of-a-merge-request-on-a-merge-train +func (s *MergeTrainsService) GetMergeRequestOnAMergeTrain(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeTrain, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_trains/merge_requests/%d", PathEscape(project), mergeRequest) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + mt := new(MergeTrain) + resp, err := s.client.Do(req, mt) + if err != nil { + return nil, resp, err + } + + return mt, resp, nil +} + +// AddMergeRequestToMergeTrainOptions represents the available +// AddMergeRequestToMergeTrain() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#add-a-merge-request-to-a-merge-train +type AddMergeRequestToMergeTrainOptions struct { + WhenPipelineSucceeds *bool `url:"when_pipeline_succeeds,omitempty" json:"when_pipeline_succeeds,omitempty"` + SHA *string `url:"sha,omitempty" json:"sha,omitempty"` + Squash *bool `url:"squash,omitempty" json:"squash,omitempty"` +} + +// AddMergeRequestToMergeTrain Add a merge request to the merge train targeting +// the merge request’s target branch. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/merge_trains.html#add-a-merge-request-to-a-merge-train +func (s *MergeTrainsService) AddMergeRequestToMergeTrain(pid interface{}, mergeRequest int, opts *AddMergeRequestToMergeTrainOptions, options ...RequestOptionFunc) ([]*MergeTrain, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/merge_trains/merge_requests/%d", PathEscape(project), mergeRequest) + + req, err := s.client.NewRequest(http.MethodPost, u, opts, options) + if err != nil { + return nil, nil, err + } + + var mts []*MergeTrain + resp, err := s.client.Do(req, &mts) + if err != nil { + return nil, resp, err + } + + return mts, resp, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/milestones.go b/vendor/github.com/xanzy/go-gitlab/milestones.go index 095c9132dc..17c97e031a 100644 --- a/vendor/github.com/xanzy/go-gitlab/milestones.go +++ b/vendor/github.com/xanzy/go-gitlab/milestones.go @@ -36,6 +36,7 @@ type MilestonesService struct { type Milestone struct { ID int `json:"id"` IID int `json:"iid"` + GroupID int `json:"group_id"` ProjectID int `json:"project_id"` Title string `json:"title"` Description string `json:"description"` diff --git a/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go b/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go index bb27c7737d..63d294e6fa 100644 --- a/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go +++ b/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go @@ -120,6 +120,27 @@ func (s *PersonalAccessTokensService) GetSinglePersonalAccessToken(options ...Re return pat, resp, nil } +// RotatePersonalAccessToken revokes a token and returns a new token that +// expires in one week. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/personal_access_tokens.html#rotate-a-personal-access-token +func (s *PersonalAccessTokensService) RotatePersonalAccessToken(token int, options ...RequestOptionFunc) (*PersonalAccessToken, *Response, error) { + u := fmt.Sprintf("personal_access_tokens/%d/rotate", token) + req, err := s.client.NewRequest(http.MethodPost, u, nil, options) + if err != nil { + return nil, nil, err + } + + pat := new(PersonalAccessToken) + resp, err := s.client.Do(req, pat) + if err != nil { + return nil, resp, err + } + + return pat, resp, nil +} + // RevokePersonalAccessToken revokes a personal access token. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go index 1bba71e002..75a8b6cb5d 100644 --- a/vendor/github.com/xanzy/go-gitlab/pipelines.go +++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go @@ -115,7 +115,7 @@ type PipelineTestCases struct { Classname string `json:"classname"` File string `json:"file"` ExecutionTime float64 `json:"execution_time"` - SystemOutput string `json:"system_output"` + SystemOutput interface{} `json:"system_output"` StackTrace string `json:"stack_trace"` AttachmentURL string `json:"attachment_url"` RecentFailures *RecentFailures `json:"recent_failures"` @@ -135,6 +135,7 @@ func (p PipelineTestReport) String() string { // on other assets, like Commit. type PipelineInfo struct { ID int `json:"id"` + IID int `json:"iid"` ProjectID int `json:"project_id"` Status string `json:"status"` Source string `json:"source"` diff --git a/vendor/github.com/xanzy/go-gitlab/project_repository_storage_move.go b/vendor/github.com/xanzy/go-gitlab/project_repository_storage_move.go new file mode 100644 index 0000000000..3beecb1f75 --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/project_repository_storage_move.go @@ -0,0 +1,199 @@ +// +// Copyright 2023, Nick Westbury +// +// 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 gitlab + +import ( + "fmt" + "net/http" + "time" +) + +// ProjectRepositoryStorageMoveService handles communication with the +// repositories related methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html +type ProjectRepositoryStorageMoveService struct { + client *Client +} + +// ProjectRepositoryStorageMove represents the status of a repository move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html +type ProjectRepositoryStorageMove struct { + ID int `json:"id"` + CreatedAt *time.Time `json:"created_at"` + State string `json:"state"` + SourceStorageName string `json:"source_storage_name"` + DestinationStorageName string `json:"destination_storage_name"` + Project *RepositoryProject `json:"project"` +} + +type RepositoryProject struct { + ID int `json:"id"` + Description string `json:"description"` + Name string `json:"name"` + NameWithNamespace string `json:"name_with_namespace"` + Path string `json:"path"` + PathWithNamespace string `json:"path_with_namespace"` + CreatedAt *time.Time `json:"created_at"` +} + +// RetrieveAllProjectStorageMovesOptions represents the available +// RetrieveAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#retrieve-all-project-repository-storage-moves +type RetrieveAllProjectStorageMovesOptions ListOptions + +// RetrieveAllStorageMoves retrieves all project repository storage moves +// accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#retrieve-all-project-repository-storage-moves +func (p ProjectRepositoryStorageMoveService) RetrieveAllStorageMoves(opts RetrieveAllProjectStorageMovesOptions, options ...RequestOptionFunc) ([]*ProjectRepositoryStorageMove, *Response, error) { + req, err := p.client.NewRequest(http.MethodGet, "project_repository_storage_moves", opts, options) + if err != nil { + return nil, nil, err + } + + var psms []*ProjectRepositoryStorageMove + resp, err := p.client.Do(req, &psms) + if err != nil { + return nil, resp, err + } + + return psms, resp, err +} + +// RetrieveAllStorageMovesForProject retrieves all repository storage moves for +// a single project accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#retrieve-all-repository-storage-moves-for-a-project +func (p ProjectRepositoryStorageMoveService) RetrieveAllStorageMovesForProject(project int, opts RetrieveAllProjectStorageMovesOptions, options ...RequestOptionFunc) ([]*ProjectRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("projects/%d/repository_storage_moves", project) + + req, err := p.client.NewRequest(http.MethodGet, u, opts, options) + if err != nil { + return nil, nil, err + } + + var psms []*ProjectRepositoryStorageMove + resp, err := p.client.Do(req, &psms) + if err != nil { + return nil, resp, err + } + + return psms, resp, err +} + +// GetStorageMove gets a single project repository storage move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#get-a-single-project-repository-storage-move +func (p ProjectRepositoryStorageMoveService) GetStorageMove(repositoryStorage int, options ...RequestOptionFunc) (*ProjectRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("project_repository_storage_moves/%d", repositoryStorage) + + req, err := p.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + psm := new(ProjectRepositoryStorageMove) + resp, err := p.client.Do(req, psm) + if err != nil { + return nil, resp, err + } + + return psm, resp, err +} + +// GetStorageMoveForProject gets a single repository storage move for a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#get-a-single-repository-storage-move-for-a-project +func (p ProjectRepositoryStorageMoveService) GetStorageMoveForProject(project int, repositoryStorage int, options ...RequestOptionFunc) (*ProjectRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("projects/%d/repository_storage_moves/%d", project, repositoryStorage) + + req, err := p.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + psm := new(ProjectRepositoryStorageMove) + resp, err := p.client.Do(req, psm) + if err != nil { + return nil, resp, err + } + + return psm, resp, err +} + +// ScheduleStorageMoveForProjectOptions represents the available +// ScheduleStorageMoveForProject() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-project +type ScheduleStorageMoveForProjectOptions struct { + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleStorageMoveForProject schedule a repository to be moved for a project. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-project +func (p ProjectRepositoryStorageMoveService) ScheduleStorageMoveForProject(project int, opts ScheduleStorageMoveForProjectOptions, options ...RequestOptionFunc) (*ProjectRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("projects/%d/repository_storage_moves", project) + + req, err := p.client.NewRequest(http.MethodPost, u, opts, options) + if err != nil { + return nil, nil, err + } + + psm := new(ProjectRepositoryStorageMove) + resp, err := p.client.Do(req, psm) + if err != nil { + return nil, resp, err + } + + return psm, resp, err +} + +// ScheduleAllProjectStorageMovesOptions represents the available +// ScheduleAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#schedule-repository-storage-moves-for-all-projects-on-a-storage-shard +type ScheduleAllProjectStorageMovesOptions struct { + SourceStorageName *string `url:"source_storage_name,omitempty" json:"source_storage_name,omitempty"` + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleAllStorageMoves schedules all repositories to be moved. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#schedule-repository-storage-moves-for-all-projects-on-a-storage-shard +func (p ProjectRepositoryStorageMoveService) ScheduleAllStorageMoves(opts ScheduleAllProjectStorageMovesOptions, options ...RequestOptionFunc) (*Response, error) { + req, err := p.client.NewRequest(http.MethodPost, "project_repository_storage_moves", opts, options) + if err != nil { + return nil, err + } + + return p.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go index cbe67635bd..6d4cfe77ae 100644 --- a/vendor/github.com/xanzy/go-gitlab/projects.go +++ b/vendor/github.com/xanzy/go-gitlab/projects.go @@ -158,7 +158,7 @@ type Project struct { AutoDevopsDeployStrategy string `json:"auto_devops_deploy_strategy"` AutoDevopsEnabled bool `json:"auto_devops_enabled"` BuildGitStrategy string `json:"build_git_strategy"` - EmailsDisabled bool `json:"emails_disabled"` + EmailsEnabled bool `json:"emails_enabled"` ExternalAuthorizationClassificationLabel string `json:"external_authorization_classification_label"` RequirementsEnabled bool `json:"requirements_enabled"` RequirementsAccessLevel AccessControlValue `json:"requirements_access_level"` @@ -166,6 +166,8 @@ type Project struct { SecurityAndComplianceAccessLevel AccessControlValue `json:"security_and_compliance_access_level"` MergeRequestDefaultTargetSelf bool `json:"mr_default_target_self"` + // Deprecated: Use EmailsEnabled instead + EmailsDisabled bool `json:"emails_disabled"` // Deprecated: This parameter has been renamed to PublicJobs in GitLab 9.0. PublicBuilds bool `json:"public_builds"` } @@ -589,7 +591,7 @@ type CreateProjectOptions struct { ContainerRegistryAccessLevel *AccessControlValue `url:"container_registry_access_level,omitempty" json:"container_registry_access_level,omitempty"` DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"` - EmailsDisabled *bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"` + EmailsEnabled *bool `url:"emails_enabled,omitempty" json:"emails_enabled,omitempty"` EnforceAuthChecksOnUploads *bool `url:"enforce_auth_checks_on_uploads,omitempty" json:"enforce_auth_checks_on_uploads,omitempty"` ExternalAuthorizationClassificationLabel *string `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"` ForkingAccessLevel *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"` @@ -646,6 +648,8 @@ type CreateProjectOptions struct { CIForwardDeploymentEnabled *bool `url:"ci_forward_deployment_enabled,omitempty" json:"ci_forward_deployment_enabled,omitempty"` // Deprecated: Use ContainerRegistryAccessLevel instead. ContainerRegistryEnabled *bool `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"` + // Deprecated: Use EmailsEnabled instead + EmailsDisabled *bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"` // Deprecated: Use IssuesAccessLevel instead. IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"` // Deprecated: No longer supported in recent versions. @@ -812,7 +816,7 @@ type EditProjectOptions struct { ContainerRegistryAccessLevel *AccessControlValue `url:"container_registry_access_level,omitempty" json:"container_registry_access_level,omitempty"` DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"` - EmailsDisabled *bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"` + EmailsEnabled *bool `url:"emails_enabled,omitempty" json:"emails_enabled,omitempty"` EnforceAuthChecksOnUploads *bool `url:"enforce_auth_checks_on_uploads,omitempty" json:"enforce_auth_checks_on_uploads,omitempty"` ExternalAuthorizationClassificationLabel *string `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"` ForkingAccessLevel *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"` @@ -870,6 +874,8 @@ type EditProjectOptions struct { // Deprecated: Use ContainerRegistryAccessLevel instead. ContainerRegistryEnabled *bool `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"` + // Deprecated: Use EmailsEnabled instead + EmailsDisabled *bool `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"` // Deprecated: Use IssuesAccessLevel instead. IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"` // Deprecated: Use BuildsAccessLevel instead. diff --git a/vendor/github.com/xanzy/go-gitlab/protected_environments.go b/vendor/github.com/xanzy/go-gitlab/protected_environments.go index 21820ab39c..3dc7fbdfba 100644 --- a/vendor/github.com/xanzy/go-gitlab/protected_environments.go +++ b/vendor/github.com/xanzy/go-gitlab/protected_environments.go @@ -191,6 +191,73 @@ func (s *ProtectedEnvironmentsService) ProtectRepositoryEnvironments(pid interfa return pe, resp, nil } +// UpdateProtectedEnvironmentsOptions represents the available +// UpdateProtectedEnvironments() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/protected_environments.html#update-a-protected-environment +type UpdateProtectedEnvironmentsOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + DeployAccessLevels *[]*UpdateEnvironmentAccessOptions `url:"deploy_access_levels,omitempty" json:"deploy_access_levels,omitempty"` + RequiredApprovalCount *int `url:"required_approval_count,omitempty" json:"required_approval_count,omitempty"` + ApprovalRules *[]*UpdateEnvironmentApprovalRuleOptions `url:"approval_rules,omitempty" json:"approval_rules,omitempty"` +} + +// UpdateEnvironmentAccessOptions represents the options for updates to an +// access decription for a protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/protected_environments.html#update-a-protected-environment +type UpdateEnvironmentAccessOptions struct { + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + ID *int `url:"id,omitempty" json:"id,omitempty"` + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + Destroy *bool `url:"_destroy,omitempty" json:"_destroy,omitempty"` +} + +// UpdateEnvironmentApprovalRuleOptions represents the updates to the approval +// rules for a protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/protected_environments.html#update-a-protected-environment +type UpdateEnvironmentApprovalRuleOptions struct { + ID *int `url:"id,omitempty" json:"id,omitempty"` + UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` + AccessLevelDescription *string `url:"access_level_description,omitempty" json:"access_level_description,omitempty"` + RequiredApprovalCount *int `url:"required_approvals,omitempty" json:"required_approvals,omitempty"` + GroupInheritanceType *int `url:"group_inheritance_type,omitempty" json:"group_inheritance_type,omitempty"` + Destroy *bool `url:"_destroy,omitempty" json:"_destroy,omitempty"` +} + +// UpdateProtectedEnvironments updates a single repository environment or +// several project repository environments using wildcard protected environment. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/protected_environments.html#update-a-protected-environment +func (s *ProtectedEnvironmentsService) UpdateProtectedEnvironments(pid interface{}, environment string, opt *UpdateProtectedEnvironmentsOptions, options ...RequestOptionFunc) (*ProtectedEnvironment, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/protected_environments/%s", PathEscape(project), environment) + + req, err := s.client.NewRequest(http.MethodPut, u, opt, options) + if err != nil { + return nil, nil, err + } + + pe := new(ProtectedEnvironment) + resp, err := s.client.Do(req, pe) + if err != nil { + return nil, resp, err + } + + return pe, resp, nil +} + // UnprotectEnvironment unprotects the given protected environment or wildcard // protected environment. // diff --git a/vendor/github.com/xanzy/go-gitlab/protected_tags.go b/vendor/github.com/xanzy/go-gitlab/protected_tags.go index 62da5c4749..76e8ff4d2a 100644 --- a/vendor/github.com/xanzy/go-gitlab/protected_tags.go +++ b/vendor/github.com/xanzy/go-gitlab/protected_tags.go @@ -44,6 +44,7 @@ type ProtectedTag struct { // GitLab API docs: // https://docs.gitlab.com/ee/api/protected_tags.html type TagAccessDescription struct { + ID int `json:"id"` UserID int `json:"user_id"` GroupID int `json:"group_id"` AccessLevel AccessLevelValue `json:"access_level"` diff --git a/vendor/github.com/xanzy/go-gitlab/services.go b/vendor/github.com/xanzy/go-gitlab/services.go index e7acb9e981..69842aec14 100644 --- a/vendor/github.com/xanzy/go-gitlab/services.go +++ b/vendor/github.com/xanzy/go-gitlab/services.go @@ -44,6 +44,7 @@ type Service struct { Active bool `json:"active"` PushEvents bool `json:"push_events"` IssuesEvents bool `json:"issues_events"` + AlertEvents bool `json:"alert_events"` ConfidentialIssuesEvents bool `json:"confidential_issues_events"` CommitEvents bool `json:"commit_events"` MergeRequestsEvents bool `json:"merge_requests_events"` @@ -54,6 +55,7 @@ type Service struct { PipelineEvents bool `json:"pipeline_events"` JobEvents bool `json:"job_events"` WikiPageEvents bool `json:"wiki_page_events"` + VulnerabilityEvents bool `json:"vulnerability_events"` DeploymentEvents bool `json:"deployment_events"` } @@ -191,8 +193,8 @@ type DiscordService struct { // GitLab API docs: // https://docs.gitlab.com/ee/api/services.html#discord type DiscordServiceProperties struct { - NotifyOnlyBrokenPipelines bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` BranchesToBeNotified string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"` + NotifyOnlyBrokenPipelines bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` } // GetDiscordService gets Discord service settings for a project. @@ -226,7 +228,18 @@ func (s *ServicesService) GetDiscordService(pid interface{}, options ...RequestO // GitLab API docs: // https://docs.gitlab.com/ee/api/services.html#createedit-discord-service type SetDiscordServiceOptions struct { - WebHook *string `json:"webhook,omitempty"` + WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty"` + BranchesToBeNotified *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` } // SetDiscordService sets Discord service for a project. @@ -993,6 +1006,7 @@ type MattermostServiceProperties struct { TagPushChannel string `json:"tag_push_channel"` PipelineChannel string `json:"pipeline_channel"` PushChannel string `json:"push_channel"` + VulnerabilityChannel string `json:"vulnerability_channel"` WikiPageChannel string `json:"wiki_page_channel"` } @@ -1032,24 +1046,24 @@ type SetMattermostServiceOptions struct { Channel *string `url:"channel,omitempty" json:"channel,omitempty"` NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` BranchesToBeNotified *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"` - ConfidentialIssueChannel *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"` - ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - ConfidentialNoteChannel *string `json:"confidential_note_channel,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` - NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"` NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` + ConfidentialNoteChannel *string `url:"confidential_note_channel,omitempty" json:"confidential_note_channel,omitempty"` PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` PushChannel *string `url:"push_channel,omitempty" json:"push_channel,omitempty"` - PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` + ConfidentialIssueChannel *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"` + MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` + NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` + PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` WikiPageChannel *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"` - WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` } // SetMattermostService sets Mattermost service for a project. @@ -1409,6 +1423,7 @@ type SlackServiceProperties struct { NotifyOnlyBrokenPipelines BoolValue `json:"notify_only_broken_pipelines"` NotifyOnlyDefaultBranch BoolValue `json:"notify_only_default_branch"` BranchesToBeNotified string `json:"branches_to_be_notified"` + AlertChannel string `json:"alert_channel"` ConfidentialIssueChannel string `json:"confidential_issue_channel"` ConfidentialNoteChannel string `json:"confidential_note_channel"` DeploymentChannel string `json:"deployment_channel"` @@ -1418,6 +1433,7 @@ type SlackServiceProperties struct { TagPushChannel string `json:"tag_push_channel"` PipelineChannel string `json:"pipeline_channel"` PushChannel string `json:"push_channel"` + VulnerabilityChannel string `json:"vulnerability_channel"` WikiPageChannel string `json:"wiki_page_channel"` } @@ -1458,29 +1474,28 @@ type SetSlackServiceOptions struct { NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"` NotifyOnlyDefaultBranch *bool `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"` BranchesToBeNotified *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"` + AlertChannel *string `url:"alert_channel,omitempty" json:"alert_channel,omitempty"` + AlertEvents *bool `url:"alert_events,omitempty" json:"alert_events,omitempty"` ConfidentialIssueChannel *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"` ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - // TODO: Currently, GitLab ignores this option (not implemented yet?), so - // there is no way to set it. Uncomment when this is fixed. - // See: https://gitlab.com/gitlab-org/gitlab-ce/issues/49730 - // ConfidentialNoteChannel *string `json:"confidential_note_channel,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - DeploymentChannel *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"` - DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` - IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` - IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` - MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` - TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` - NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"` - NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` - PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` - PushChannel *string `url:"push_channel,omitempty" json:"push_channel,omitempty"` - PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` - WikiPageChannel *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"` - WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` + ConfidentialNoteChannel *string `url:"confidential_note_channel,omitempty" json:"confidential_note_channel,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + DeploymentChannel *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"` + DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` + IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + PushChannel *string `url:"push_channel,omitempty" json:"push_channel,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + WikiPageChannel *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` } // SetSlackService sets Slack service for a project diff --git a/vendor/github.com/xanzy/go-gitlab/settings.go b/vendor/github.com/xanzy/go-gitlab/settings.go index 3ac4eadb4f..92a1ef656f 100644 --- a/vendor/github.com/xanzy/go-gitlab/settings.go +++ b/vendor/github.com/xanzy/go-gitlab/settings.go @@ -189,6 +189,7 @@ type Settings struct { HousekeepingFullRepackPeriod int `json:"housekeeping_full_repack_period"` HousekeepingGcPeriod int `json:"housekeeping_gc_period"` HousekeepingIncrementalRepackPeriod int `json:"housekeeping_incremental_repack_period"` + HousekeepingOptimizeRepositoryPeriod int `json:"housekeeping_optimize_repository_period"` ImportSources []string `json:"import_sources"` InactiveProjectsDeleteAfterMonths int `json:"inactive_projects_delete_after_months"` InactiveProjectsMinSizeMB int `json:"inactive_projects_min_size_mb"` @@ -567,6 +568,7 @@ type UpdateSettingsOptions struct { HousekeepingFullRepackPeriod *int `url:"housekeeping_full_repack_period,omitempty" json:"housekeeping_full_repack_period,omitempty"` HousekeepingGcPeriod *int `url:"housekeeping_gc_period,omitempty" json:"housekeeping_gc_period,omitempty"` HousekeepingIncrementalRepackPeriod *int `url:"housekeeping_incremental_repack_period,omitempty" json:"housekeeping_incremental_repack_period,omitempty"` + HousekeepingOptimizedepositoryPeriod *int `url:"housekeeping_optimize_repository_period,omitempty" json:"housekeeping_optimize_repository_period,omitempty"` ImportSources *[]string `url:"import_sources,omitempty" json:"import_sources,omitempty"` InactiveProjectsDeleteAfterMonths *int `url:"inactive_projects_delete_after_months,omitempty" json:"inactive_projects_delete_after_months,omitempty"` InactiveProjectsMinSizeMB *int `url:"inactive_projects_min_size_mb,omitempty" json:"inactive_projects_min_size_mb,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/snippet_repository_storage_move.go b/vendor/github.com/xanzy/go-gitlab/snippet_repository_storage_move.go new file mode 100644 index 0000000000..00761ec2ed --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/snippet_repository_storage_move.go @@ -0,0 +1,203 @@ +// +// Copyright 2023, Nick Westbury +// +// 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 gitlab + +import ( + "fmt" + "net/http" + "time" +) + +// SnippetRepositoryStorageMoveService handles communication with the +// snippets related methods of the GitLab API. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html +type SnippetRepositoryStorageMoveService struct { + client *Client +} + +// SnippetRepositoryStorageMove represents the status of a repository move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html +type SnippetRepositoryStorageMove struct { + ID int `json:"id"` + CreatedAt *time.Time `json:"created_at"` + State string `json:"state"` + SourceStorageName string `json:"source_storage_name"` + DestinationStorageName string `json:"destination_storage_name"` + Snippet *RepositorySnippet `json:"snippet"` +} + +type RepositorySnippet struct { + ID int `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + Visibility VisibilityValue `json:"visibility"` + UpdatedAt *time.Time `json:"updated_at"` + CreatedAt *time.Time `json:"created_at"` + ProjectID int `json:"project_id"` + WebURL string `json:"web_url"` + RawURL string `json:"raw_url"` + SSHURLToRepo string `json:"ssh_url_to_repo"` + HTTPURLToRepo string `json:"http_url_to_repo"` +} + +// RetrieveAllSnippetStorageMovesOptions represents the available +// RetrieveAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#retrieve-all-repository-storage-moves-for-a-snippet +type RetrieveAllSnippetStorageMovesOptions ListOptions + +// RetrieveAllStorageMoves retrieves all snippet repository storage moves +// accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#retrieve-all-repository-storage-moves-for-a-snippet +func (s SnippetRepositoryStorageMoveService) RetrieveAllStorageMoves(opts RetrieveAllSnippetStorageMovesOptions, options ...RequestOptionFunc) ([]*SnippetRepositoryStorageMove, *Response, error) { + req, err := s.client.NewRequest(http.MethodGet, "snippet_repository_storage_moves", opts, options) + if err != nil { + return nil, nil, err + } + + var ssms []*SnippetRepositoryStorageMove + resp, err := s.client.Do(req, &ssms) + if err != nil { + return nil, resp, err + } + + return ssms, resp, err +} + +// RetrieveAllStorageMovesForSnippet retrieves all repository storage moves for +// a single snippet accessible by the authenticated user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#retrieve-all-repository-storage-moves-for-a-snippet +func (s SnippetRepositoryStorageMoveService) RetrieveAllStorageMovesForSnippet(snippet int, opts RetrieveAllSnippetStorageMovesOptions, options ...RequestOptionFunc) ([]*SnippetRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("snippets/%d/repository_storage_moves", snippet) + + req, err := s.client.NewRequest(http.MethodGet, u, opts, options) + if err != nil { + return nil, nil, err + } + + var ssms []*SnippetRepositoryStorageMove + resp, err := s.client.Do(req, &ssms) + if err != nil { + return nil, resp, err + } + + return ssms, resp, err +} + +// GetStorageMove gets a single snippet repository storage move. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#get-a-single-snippet-repository-storage-move +func (s SnippetRepositoryStorageMoveService) GetStorageMove(repositoryStorage int, options ...RequestOptionFunc) (*SnippetRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("snippet_repository_storage_moves/%d", repositoryStorage) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + ssm := new(SnippetRepositoryStorageMove) + resp, err := s.client.Do(req, ssm) + if err != nil { + return nil, resp, err + } + + return ssm, resp, err +} + +// GetStorageMoveForSnippet gets a single repository storage move for a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#get-a-single-repository-storage-move-for-a-snippet +func (s SnippetRepositoryStorageMoveService) GetStorageMoveForSnippet(snippet int, repositoryStorage int, options ...RequestOptionFunc) (*SnippetRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("snippets/%d/repository_storage_moves/%d", snippet, repositoryStorage) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + ssm := new(SnippetRepositoryStorageMove) + resp, err := s.client.Do(req, ssm) + if err != nil { + return nil, resp, err + } + + return ssm, resp, err +} + +// ScheduleStorageMoveForSnippetOptions represents the available +// ScheduleStorageMoveForSnippet() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-snippet +type ScheduleStorageMoveForSnippetOptions struct { + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleStorageMoveForSnippet schedule a repository to be moved for a snippet. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-snippet +func (s SnippetRepositoryStorageMoveService) ScheduleStorageMoveForSnippet(snippet int, opts ScheduleStorageMoveForSnippetOptions, options ...RequestOptionFunc) (*SnippetRepositoryStorageMove, *Response, error) { + u := fmt.Sprintf("snippets/%d/repository_storage_moves", snippet) + + req, err := s.client.NewRequest(http.MethodPost, u, opts, options) + if err != nil { + return nil, nil, err + } + + ssm := new(SnippetRepositoryStorageMove) + resp, err := s.client.Do(req, ssm) + if err != nil { + return nil, resp, err + } + + return ssm, resp, err +} + +// ScheduleAllSnippetStorageMovesOptions represents the available +// ScheduleAllStorageMoves() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#schedule-repository-storage-moves-for-all-snippets-on-a-storage-shard +type ScheduleAllSnippetStorageMovesOptions struct { + SourceStorageName *string `url:"source_storage_name,omitempty" json:"source_storage_name,omitempty"` + DestinationStorageName *string `url:"destination_storage_name,omitempty" json:"destination_storage_name,omitempty"` +} + +// ScheduleAllStorageMoves schedules all snippet repositories to be moved. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#schedule-repository-storage-moves-for-all-snippets-on-a-storage-shard +func (s SnippetRepositoryStorageMoveService) ScheduleAllStorageMoves(opts ScheduleAllSnippetStorageMovesOptions, options ...RequestOptionFunc) (*Response, error) { + req, err := s.client.NewRequest(http.MethodPost, "snippet_repository_storage_moves", opts, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/snippets.go b/vendor/github.com/xanzy/go-gitlab/snippets.go index 12687c3727..c25548b123 100644 --- a/vendor/github.com/xanzy/go-gitlab/snippets.go +++ b/vendor/github.com/xanzy/go-gitlab/snippets.go @@ -57,6 +57,7 @@ type Snippet struct { Path string `json:"path"` RawURL string `json:"raw_url"` } `json:"files"` + RepositoryStorage string `json:"repository_storage"` } func (s Snippet) String() string { @@ -281,3 +282,33 @@ func (s *SnippetsService) ExploreSnippets(opt *ExploreSnippetsOptions, options . return ps, resp, nil } + +// ListAllSnippetsOptions represents the available ListAllSnippets() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets +type ListAllSnippetsOptions struct { + ListOptions + CreatedAfter *ISOTime `url:"created_after,omitempty" json:"created_after,omitempty"` + CreatedBefore *ISOTime `url:"created_before,omitempty" json:"created_before,omitempty"` + RepositoryStorage *string `url:"repository_storage,omitempty" json:"repository_storage,omitempty"` +} + +// ListAllSnippets gets all snippets the current user has access to. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets +func (s *SnippetsService) ListAllSnippets(opt *ListAllSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error) { + req, err := s.client.NewRequest(http.MethodGet, "snippets/all", opt, options) + if err != nil { + return nil, nil, err + } + + var ps []*Snippet + resp, err := s.client.Do(req, &ps) + if err != nil { + return nil, resp, err + } + + return ps, resp, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/todos.go b/vendor/github.com/xanzy/go-gitlab/todos.go index 4e3c58dee5..7ea26d01b7 100644 --- a/vendor/github.com/xanzy/go-gitlab/todos.go +++ b/vendor/github.com/xanzy/go-gitlab/todos.go @@ -59,7 +59,7 @@ type TodoTarget struct { Description string `json:"description"` Downvotes int `json:"downvotes"` ID int `json:"id"` - IID int `json:"iid"` + IID interface{} `json:"iid"` Labels []string `json:"labels"` Milestone *Milestone `json:"milestone"` ProjectID int `json:"project_id"` diff --git a/vendor/github.com/xanzy/go-gitlab/users.go b/vendor/github.com/xanzy/go-gitlab/users.go index 68ddd6bd74..04a35ad52a 100644 --- a/vendor/github.com/xanzy/go-gitlab/users.go +++ b/vendor/github.com/xanzy/go-gitlab/users.go @@ -398,6 +398,36 @@ func (s *UsersService) SetUserStatus(opt *UserStatusOptions, options ...RequestO return status, resp, nil } +// UserAssociationsCount represents the user associations count. +// +// Gitlab API docs: https://docs.gitlab.com/ee/api/users.html#list-associations-count-for-user +type UserAssociationsCount struct { + GroupsCount int `json:"groups_count"` + ProjectsCount int `json:"projects_count"` + IssuesCount int `json:"issues_count"` + MergeRequestsCount int `json:"merge_requests_count"` +} + +// GetUserAssociationsCount gets a list of a specified user associations. +// +// Gitlab API docs: https://docs.gitlab.com/ee/api/users.html#list-associations-count-for-user +func (s *UsersService) GetUserAssociationsCount(user int, options ...RequestOptionFunc) (*UserAssociationsCount, *Response, error) { + u := fmt.Sprintf("users/%d/associations_count", user) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + uac := new(UserAssociationsCount) + resp, err := s.client.Do(req, uac) + if err != nil { + return nil, resp, err + } + + return uac, resp, nil +} + // SSHKey represents a SSH key. // // GitLab API docs: https://docs.gitlab.com/ee/api/users.html#list-ssh-keys @@ -409,11 +439,16 @@ type SSHKey struct { ExpiresAt *time.Time `json:"expires_at"` } +// ListSSHKeysOptions represents the available ListSSHKeys options. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/users.html#list-ssh-keys +type ListSSHKeysOptions ListOptions + // ListSSHKeys gets a list of currently authenticated user's SSH keys. // // GitLab API docs: https://docs.gitlab.com/ee/api/users.html#list-ssh-keys -func (s *UsersService) ListSSHKeys(options ...RequestOptionFunc) ([]*SSHKey, *Response, error) { - req, err := s.client.NewRequest(http.MethodGet, "user/keys", nil, options) +func (s *UsersService) ListSSHKeys(opt *ListSSHKeysOptions, options ...RequestOptionFunc) ([]*SSHKey, *Response, error) { + req, err := s.client.NewRequest(http.MethodGet, "user/keys", opt, options) if err != nil { return nil, nil, err } @@ -1124,14 +1159,15 @@ func (s *UsersService) RejectUser(user int, options ...RequestOptionFunc) error // GitLab API docs: // https://docs.gitlab.com/ee/api/users.html#get-all-impersonation-tokens-of-a-user type ImpersonationToken struct { - ID int `json:"id"` - Name string `json:"name"` - Active bool `json:"active"` - Token string `json:"token"` - Scopes []string `json:"scopes"` - Revoked bool `json:"revoked"` - CreatedAt *time.Time `json:"created_at"` - ExpiresAt *ISOTime `json:"expires_at"` + ID int `json:"id"` + Name string `json:"name"` + Active bool `json:"active"` + Token string `json:"token"` + Scopes []string `json:"scopes"` + Revoked bool `json:"revoked"` + CreatedAt *time.Time `json:"created_at"` + ExpiresAt *ISOTime `json:"expires_at"` + LastUsedAt *time.Time `json:"last_used_at"` } // GetAllImpersonationTokensOptions represents the available @@ -1373,3 +1409,50 @@ func (s *UsersService) DisableTwoFactor(user int, options ...RequestOptionFunc) return fmt.Errorf("Received unexpected result code: %d", resp.StatusCode) } } + +// UserRunner represents a GitLab runner linked to the current user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/users.html#create-a-runner +type UserRunner struct { + ID int `json:"id"` + Token string `json:"token"` + TokenExpiresAt *time.Time `json:"token_expires_at"` +} + +// CreateUserRunnerOptions represents the available CreateUserRunner() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/users.html#create-a-runner +type CreateUserRunnerOptions struct { + RunnerType *string `url:"runner_type,omitempty" json:"runner_type,omitempty"` + GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"` + ProjectID *int `url:"project_id,omitempty" json:"project_id,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + Paused *bool `url:"paused,omitempty" json:"paused,omitempty"` + Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` + RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` + TagList *[]string `url:"tag_list,omitempty" json:"tag_list,omitempty"` + AccessLevel *string `url:"access_level,omitempty" json:"access_level,omitempty"` + MaximumTimeout *int `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"` + MaintenanceNote *string `url:"maintenance_note,omitempty" json:"maintenance_note,omitempty"` +} + +// CreateUserRunner creates a runner linked to the current user. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/users.html#create-a-runner +func (s *UsersService) CreateUserRunner(opts *CreateUserRunnerOptions, options ...RequestOptionFunc) (*UserRunner, *Response, error) { + req, err := s.client.NewRequest(http.MethodPost, "user/runners", opts, options) + if err != nil { + return nil, nil, err + } + + r := new(UserRunner) + resp, err := s.client.Do(req, r) + if err != nil { + return nil, resp, err + } + + return r, resp, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index e40e0ac93f..6cfc3a8993 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -110,8 +110,8 @@ github.com/agext/levenshtein # github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df ## explicit; go 1.18 github.com/antlr/antlr4/runtime/Go/antlr/v4 -# github.com/antonmedv/expr v1.12.5 -## explicit; go 1.13 +# github.com/antonmedv/expr v1.15.2 +## explicit; go 1.18 github.com/antonmedv/expr github.com/antonmedv/expr/ast github.com/antonmedv/expr/builtin @@ -122,6 +122,8 @@ github.com/antonmedv/expr/file github.com/antonmedv/expr/optimizer github.com/antonmedv/expr/parser github.com/antonmedv/expr/parser/lexer +github.com/antonmedv/expr/parser/operator +github.com/antonmedv/expr/parser/utils github.com/antonmedv/expr/vm github.com/antonmedv/expr/vm/runtime # github.com/apparentlymart/go-textseg v1.0.0 @@ -130,7 +132,7 @@ github.com/apparentlymart/go-textseg/textseg # github.com/apparentlymart/go-textseg/v13 v13.0.0 ## explicit; go 1.16 github.com/apparentlymart/go-textseg/v13/textseg -# github.com/argoproj/argo-cd/v2 v2.8.17 +# github.com/argoproj/argo-cd/v2 v2.9.20 ## explicit; go 1.19 github.com/argoproj/argo-cd/v2/common github.com/argoproj/argo-cd/v2/pkg/apiclient/account @@ -207,10 +209,11 @@ github.com/argoproj/argo-workflows/v3/workflow/packer github.com/argoproj/argo-workflows/v3/workflow/templateresolution github.com/argoproj/argo-workflows/v3/workflow/util github.com/argoproj/argo-workflows/v3/workflow/validate -# github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814 -## explicit; go 1.19 +# github.com/argoproj/gitops-engine v0.7.1-0.20240715141028-c68bce0f979c +## explicit; go 1.17 github.com/argoproj/gitops-engine/internal/kubernetes_vendor/pkg/api/v1/endpoints github.com/argoproj/gitops-engine/internal/kubernetes_vendor/pkg/util/hash +github.com/argoproj/gitops-engine/pkg/cache github.com/argoproj/gitops-engine/pkg/diff github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager github.com/argoproj/gitops-engine/pkg/health @@ -232,10 +235,11 @@ github.com/argoproj/pkg/json github.com/argoproj/pkg/rand github.com/argoproj/pkg/sync github.com/argoproj/pkg/time -# github.com/aws/aws-sdk-go v1.44.290 +# github.com/aws/aws-sdk-go v1.44.317 ## explicit; go 1.11 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn +github.com/aws/aws-sdk-go/aws/auth/bearer github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/aws/awsutil github.com/aws/aws-sdk-go/aws/client @@ -285,6 +289,7 @@ github.com/aws/aws-sdk-go/service/s3/s3iface github.com/aws/aws-sdk-go/service/s3/s3manager github.com/aws/aws-sdk-go/service/sso github.com/aws/aws-sdk-go/service/sso/ssoiface +github.com/aws/aws-sdk-go/service/ssooidc github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/aws/aws-sdk-go-v2/service/ecr v1.20.0 @@ -306,7 +311,7 @@ github.com/bmatcuk/doublestar/v4 # github.com/bombsimon/logrusr/v2 v2.0.1 ## explicit; go 1.13 github.com/bombsimon/logrusr/v2 -# github.com/bradleyfalzon/ghinstallation/v2 v2.5.0 +# github.com/bradleyfalzon/ghinstallation/v2 v2.6.0 ## explicit; go 1.13 github.com/bradleyfalzon/ghinstallation/v2 # github.com/caarlos0/env v3.5.0+incompatible @@ -673,7 +678,7 @@ github.com/google/go-cmp/cmp/internal/value # github.com/google/go-github v17.0.0+incompatible ## explicit github.com/google/go-github/github -# github.com/google/go-github/v53 v53.0.0 +# github.com/google/go-github/v53 v53.2.0 ## explicit; go 1.17 github.com/google/go-github/v53/github # github.com/google/go-querystring v1.1.0 @@ -1009,10 +1014,10 @@ github.com/shopspring/decimal # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus -# github.com/skeema/knownhosts v1.2.1 +# github.com/skeema/knownhosts v1.2.2 ## explicit; go 1.17 github.com/skeema/knownhosts -# github.com/spf13/cast v1.5.0 +# github.com/spf13/cast v1.5.1 ## explicit; go 1.18 github.com/spf13/cast # github.com/spf13/cobra v1.8.0 @@ -1045,7 +1050,7 @@ github.com/syndtr/goleveldb/leveldb/opt github.com/syndtr/goleveldb/leveldb/storage github.com/syndtr/goleveldb/leveldb/table github.com/syndtr/goleveldb/leveldb/util -# github.com/tidwall/gjson v1.14.3 +# github.com/tidwall/gjson v1.14.4 ## explicit; go 1.12 github.com/tidwall/gjson # github.com/tidwall/match v1.1.1 @@ -1075,7 +1080,7 @@ github.com/vmihailenco/msgpack/v5/msgpcode github.com/vmihailenco/tagparser/v2 github.com/vmihailenco/tagparser/v2/internal github.com/vmihailenco/tagparser/v2/internal/parser -# github.com/xanzy/go-gitlab v0.86.0 +# github.com/xanzy/go-gitlab v0.91.1 ## explicit; go 1.18 github.com/xanzy/go-gitlab # github.com/xanzy/ssh-agent v0.3.3 @@ -2182,7 +2187,7 @@ k8s.io/utils/trace # mellium.im/sasl v0.3.1 ## explicit; go 1.18 mellium.im/sasl -# oras.land/oras-go/v2 v2.2.0 +# oras.land/oras-go/v2 v2.3.0 ## explicit; go 1.19 oras.land/oras-go/v2/content oras.land/oras-go/v2/errdef diff --git a/vendor/oras.land/oras-go/v2/content/graph.go b/vendor/oras.land/oras-go/v2/content/graph.go index fa2f9efe78..9ae837285e 100644 --- a/vendor/oras.land/oras-go/v2/content/graph.go +++ b/vendor/oras.land/oras-go/v2/content/graph.go @@ -75,18 +75,33 @@ func Successors(ctx context.Context, fetcher Fetcher, node ocispec.Descriptor) ( } nodes = append(nodes, manifest.Config) return append(nodes, manifest.Layers...), nil - case docker.MediaTypeManifestList, ocispec.MediaTypeImageIndex: + case docker.MediaTypeManifestList: content, err := FetchAll(ctx, fetcher, node) if err != nil { return nil, err } - // docker manifest list and oci index are equivalent for successors. + // OCI manifest index schema can be used to marshal docker manifest list var index ocispec.Index if err := json.Unmarshal(content, &index); err != nil { return nil, err } return index.Manifests, nil + case ocispec.MediaTypeImageIndex: + content, err := FetchAll(ctx, fetcher, node) + if err != nil { + return nil, err + } + + var index ocispec.Index + if err := json.Unmarshal(content, &index); err != nil { + return nil, err + } + var nodes []ocispec.Descriptor + if index.Subject != nil { + nodes = append(nodes, *index.Subject) + } + return append(nodes, index.Manifests...), nil case spec.MediaTypeArtifactManifest: content, err := FetchAll(ctx, fetcher, node) if err != nil { diff --git a/vendor/oras.land/oras-go/v2/content/reader.go b/vendor/oras.land/oras-go/v2/content/reader.go index 11d27b236e..e575378e31 100644 --- a/vendor/oras.land/oras-go/v2/content/reader.go +++ b/vendor/oras.land/oras-go/v2/content/reader.go @@ -70,7 +70,7 @@ func (vr *VerifyReader) Read(p []byte) (n int, err error) { return } -// Verify verifies the read content against the size and the digest. +// Verify checks for remaining unread content and verifies the read content against the digest func (vr *VerifyReader) Verify() error { if vr.verified { return nil @@ -120,7 +120,10 @@ func ReadAll(r io.Reader, desc ocispec.Descriptor) ([]byte, error) { buf := make([]byte, desc.Size) vr := NewVerifyReader(r, desc) - if _, err := io.ReadFull(vr, buf); err != nil { + if n, err := io.ReadFull(vr, buf); err != nil { + if errors.Is(err, io.ErrUnexpectedEOF) { + return nil, fmt.Errorf("read failed: expected content size of %d, got %d, for digest %s: %w", desc.Size, n, desc.Digest.String(), err) + } return nil, fmt.Errorf("read failed: %w", err) } if err := vr.Verify(); err != nil { diff --git a/vendor/oras.land/oras-go/v2/content/storage.go b/vendor/oras.land/oras-go/v2/content/storage.go index 971142cbf9..47c95d8769 100644 --- a/vendor/oras.land/oras-go/v2/content/storage.go +++ b/vendor/oras.land/oras-go/v2/content/storage.go @@ -31,7 +31,7 @@ type Fetcher interface { // Pusher pushes content. type Pusher interface { // Push pushes the content, matching the expected descriptor. - // Reader is perferred to Writer so that the suitable buffer size can be + // Reader is preferred to Writer so that the suitable buffer size can be // chosen by the underlying implementation. Furthermore, the implementation // can also do reflection on the Reader for more advanced I/O optimization. Push(ctx context.Context, expected ocispec.Descriptor, content io.Reader) error diff --git a/vendor/oras.land/oras-go/v2/errdef/errors.go b/vendor/oras.land/oras-go/v2/errdef/errors.go index 030360edb7..7adb44b173 100644 --- a/vendor/oras.land/oras-go/v2/errdef/errors.go +++ b/vendor/oras.land/oras-go/v2/errdef/errors.go @@ -22,6 +22,7 @@ var ( ErrAlreadyExists = errors.New("already exists") ErrInvalidDigest = errors.New("invalid digest") ErrInvalidReference = errors.New("invalid reference") + ErrInvalidMediaType = errors.New("invalid media type") ErrMissingReference = errors.New("missing reference") ErrNotFound = errors.New("not found") ErrSizeExceedsLimit = errors.New("size exceeds limit") diff --git a/vendor/oras.land/oras-go/v2/internal/spec/artifact.go b/vendor/oras.land/oras-go/v2/internal/spec/artifact.go index 8aa8e79ecc..7f801fd9ca 100644 --- a/vendor/oras.land/oras-go/v2/internal/spec/artifact.go +++ b/vendor/oras.land/oras-go/v2/internal/spec/artifact.go @@ -17,8 +17,16 @@ package spec import ocispec "github.com/opencontainers/image-spec/specs-go/v1" -// AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing. -const AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied" +const ( + // AnnotationArtifactCreated is the annotation key for the date and time on which the artifact was built, conforming to RFC 3339. + AnnotationArtifactCreated = "org.opencontainers.artifact.created" + + // AnnotationArtifactDescription is the annotation key for the human readable description for the artifact. + AnnotationArtifactDescription = "org.opencontainers.artifact.description" + + // AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing. + AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied" +) // MediaTypeArtifactManifest specifies the media type for a content descriptor. const MediaTypeArtifactManifest = "application/vnd.oci.artifact.manifest.v1+json" diff --git a/vendor/oras.land/oras-go/v2/registry/reference.go b/vendor/oras.land/oras-go/v2/registry/reference.go index cea579a141..7661a162bd 100644 --- a/vendor/oras.land/oras-go/v2/registry/reference.go +++ b/vendor/oras.land/oras-go/v2/registry/reference.go @@ -31,14 +31,16 @@ var ( // repository name set under OCI distribution spec is a subset of the docker // spec. For maximum compatability, the docker spec is verified client-side. // Further checks are left to the server-side. + // // References: - // - https://github.com/distribution/distribution/blob/v2.7.1/reference/regexp.go#L53 - // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pulling-manifests + // - https://github.com/distribution/distribution/blob/v2.7.1/reference/regexp.go#L53 + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pulling-manifests repositoryRegexp = regexp.MustCompile(`^[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*(?:/[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)*$`) // tagRegexp checks the tag name. // The docker and OCI spec have the same regular expression. - // Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pulling-manifests + // + // Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pulling-manifests tagRegexp = regexp.MustCompile(`^[\w][\w.-]{0,127}$`) ) diff --git a/vendor/oras.land/oras-go/v2/registry/remote/errcode/errors.go b/vendor/oras.land/oras-go/v2/registry/remote/errcode/errors.go index cf0018a018..fb192aa8a3 100644 --- a/vendor/oras.land/oras-go/v2/registry/remote/errcode/errors.go +++ b/vendor/oras.land/oras-go/v2/registry/remote/errcode/errors.go @@ -24,7 +24,7 @@ import ( ) // References: -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#error-codes +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#error-codes // - https://docs.docker.com/registry/spec/api/#errors-2 const ( ErrorCodeBlobUnknown = "BLOB_UNKNOWN" @@ -45,7 +45,7 @@ const ( // Error represents a response inner error returned by the remote // registry. // References: -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#error-codes +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#error-codes // - https://docs.docker.com/registry/spec/api/#errors-2 type Error struct { Code string `json:"code"` @@ -73,7 +73,7 @@ func (e Error) Error() string { // Errors represents a list of response inner errors returned by the remote // server. // References: -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#error-codes +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#error-codes // - https://docs.docker.com/registry/spec/api/#errors-2 type Errors []Error diff --git a/vendor/oras.land/oras-go/v2/registry/remote/referrers.go b/vendor/oras.land/oras-go/v2/registry/remote/referrers.go index a3ed08ca5b..191db9d179 100644 --- a/vendor/oras.land/oras-go/v2/registry/remote/referrers.go +++ b/vendor/oras.land/oras-go/v2/registry/remote/referrers.go @@ -22,7 +22,6 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" "oras.land/oras-go/v2/content" "oras.land/oras-go/v2/internal/descriptor" - "oras.land/oras-go/v2/internal/spec" ) // zeroDigest represents a digest that consists of zeros. zeroDigest is used @@ -103,17 +102,15 @@ func (e *ReferrersError) IsReferrersIndexDelete() bool { // buildReferrersTag builds the referrers tag for the given manifest descriptor. // Format: - -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#unavailable-referrers-api +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#unavailable-referrers-api func buildReferrersTag(desc ocispec.Descriptor) string { alg := desc.Digest.Algorithm().String() encoded := desc.Digest.Encoded() return alg + "-" + encoded } -// isReferrersFilterApplied checks annotations to see if requested is in the -// applied filter list. -func isReferrersFilterApplied(annotations map[string]string, requested string) bool { - applied := annotations[spec.AnnotationReferrersFiltersApplied] +// isReferrersFilterApplied checks if requsted is in the applied filter list. +func isReferrersFilterApplied(applied, requested string) bool { if applied == "" || requested == "" { return false } diff --git a/vendor/oras.land/oras-go/v2/registry/remote/registry.go b/vendor/oras.land/oras-go/v2/registry/remote/registry.go index c8c414f17f..8ae538d964 100644 --- a/vendor/oras.land/oras-go/v2/registry/remote/registry.go +++ b/vendor/oras.land/oras-go/v2/registry/remote/registry.go @@ -73,13 +73,28 @@ func (r *Registry) client() Client { return r.Client } +// do sends an HTTP request and returns an HTTP response using the HTTP client +// returned by r.client(). +func (r *Registry) do(req *http.Request) (*http.Response, error) { + if r.HandleWarning == nil { + return r.client().Do(req) + } + + resp, err := r.client().Do(req) + if err != nil { + return nil, err + } + handleWarningHeaders(resp.Header.Values(headerWarning), r.HandleWarning) + return resp, nil +} + // Ping checks whether or not the registry implement Docker Registry API V2 or // OCI Distribution Specification. // Ping can be used to check authentication when an auth client is configured. // // References: // - https://docs.docker.com/registry/spec/api/#base -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#api +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#api func (r *Registry) Ping(ctx context.Context) error { url := buildRegistryBaseURL(r.PlainHTTP, r.Reference) req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) @@ -87,7 +102,7 @@ func (r *Registry) Ping(ctx context.Context) error { return err } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return err } @@ -142,7 +157,7 @@ func (r *Registry) repositories(ctx context.Context, last string, fn func(repos } req.URL.RawQuery = q.Encode() } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return "", err } diff --git a/vendor/oras.land/oras-go/v2/registry/remote/repository.go b/vendor/oras.land/oras-go/v2/registry/remote/repository.go index 32ac347d63..0f8c6acd21 100644 --- a/vendor/oras.land/oras-go/v2/registry/remote/repository.go +++ b/vendor/oras.land/oras-go/v2/registry/remote/repository.go @@ -47,11 +47,37 @@ import ( "oras.land/oras-go/v2/registry/remote/internal/errutil" ) -// dockerContentDigestHeader - The Docker-Content-Digest header, if present -// on the response, returns the canonical digest of the uploaded blob. -// See https://docs.docker.com/registry/spec/api/#digest-header -// See https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pull -const dockerContentDigestHeader = "Docker-Content-Digest" +const ( + // headerDockerContentDigest is the "Docker-Content-Digest" header. + // If present on the response, it contains the canonical digest of the + // uploaded blob. + // + // References: + // - https://docs.docker.com/registry/spec/api/#digest-header + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pull + headerDockerContentDigest = "Docker-Content-Digest" + + // headerOCIFiltersApplied is the "OCI-Filters-Applied" header. + // If present on the response, it contains a comma-separated list of the + // applied filters. + // + // Reference: + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers + headerOCIFiltersApplied = "OCI-Filters-Applied" + + // headerOCISubject is the "OCI-Subject" header. + // If present on the response, it contains the digest of the subject, + // indicating that Referrers API is supported by the registry. + headerOCISubject = "OCI-Subject" +) + +// filterTypeArtifactType is the "artifactType" filter applied on the list of +// referrers. +// +// References: +// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers +// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +const filterTypeArtifactType = "artifactType" // Client is an interface for a HTTP client. type Client interface { @@ -93,7 +119,7 @@ type Repository struct { // ReferrerListPageSize specifies the page size when invoking the Referrers // API. // If zero, the page size is determined by the remote registry. - // Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers + // Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers ReferrerListPageSize int // MaxMetadataBytes specifies a limit on how many response bytes are allowed @@ -102,6 +128,25 @@ type Repository struct { // If less than or equal to zero, a default (currently 4MiB) is used. MaxMetadataBytes int64 + // SkipReferrersGC specifies whether to delete the dangling referrers + // index when referrers tag schema is utilized. + // - If false, the old referrers index will be deleted after the new one + // is successfully uploaded. + // - If true, the old referrers index is kept. + // By default, it is disabled (set to false). See also: + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#referrers-tag-schema + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pushing-manifests-with-subject + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#deleting-manifests + SkipReferrersGC bool + + // HandleWarning handles the warning returned by the remote server. + // Callers SHOULD deduplicate warnings from multiple associated responses. + // + // References: + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#warnings + // - https://www.rfc-editor.org/rfc/rfc7234#section-5.5 + HandleWarning func(warning Warning) + // NOTE: Must keep fields in sync with newRepositoryWithOptions function. // referrersState represents that if the repository supports Referrers API. @@ -145,6 +190,7 @@ func newRepositoryWithOptions(ref registry.Reference, opts *RepositoryOptions) ( Client: opts.Client, Reference: ref, PlainHTTP: opts.PlainHTTP, + SkipReferrersGC: opts.SkipReferrersGC, ManifestMediaTypes: slices.Clone(opts.ManifestMediaTypes), TagListPageSize: opts.TagListPageSize, ReferrerListPageSize: opts.ReferrerListPageSize, @@ -159,9 +205,9 @@ func newRepositoryWithOptions(ref registry.Reference, opts *RepositoryOptions) ( // SetReferrersCapability returns ErrReferrersCapabilityAlreadySet if the // Referrers API capability has been already set. // - When the capability is set to true, the Referrers() function will always -// request the Referrers API. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +// request the Referrers API. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers // - When the capability is set to false, the Referrers() function will always -// request the Referrers Tag. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#referrers-tag-schema +// request the Referrers Tag. Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#referrers-tag-schema // - When the capability is not set, the Referrers() function will automatically // determine which API to use. func (r *Repository) SetReferrersCapability(capable bool) error { @@ -196,6 +242,21 @@ func (r *Repository) client() Client { return r.Client } +// do sends an HTTP request and returns an HTTP response using the HTTP client +// returned by r.client(). +func (r *Repository) do(req *http.Request) (*http.Response, error) { + if r.HandleWarning == nil { + return r.client().Do(req) + } + + resp, err := r.client().Do(req) + if err != nil { + return nil, err + } + handleWarningHeaders(resp.Header.Values(headerWarning), r.HandleWarning) + return resp, nil +} + // blobStore detects the blob store for the given descriptor. func (r *Repository) blobStore(desc ocispec.Descriptor) registry.BlobStore { if isManifest(r.ManifestMediaTypes, desc) { @@ -320,7 +381,7 @@ func (r *Repository) ParseReference(reference string) (registry.Reference, error // of the Tags list. // // References: -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#content-discovery +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#content-discovery // - https://docs.docker.com/registry/spec/api/#tags func (r *Repository) Tags(ctx context.Context, last string, fn func(tags []string) error) error { ctx = registryutil.WithScopeHint(ctx, r.Reference, auth.ActionPull) @@ -353,7 +414,7 @@ func (r *Repository) tags(ctx context.Context, last string, fn func(tags []strin } req.URL.RawQuery = q.Encode() } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return "", err } @@ -379,7 +440,7 @@ func (r *Repository) tags(ctx context.Context, last string, fn func(tags []strin // Predecessors returns the descriptors of image or artifact manifests directly // referencing the given manifest descriptor. // Predecessors internally leverages Referrers. -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers func (r *Repository) Predecessors(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { var res []ocispec.Descriptor if err := r.Referrers(ctx, desc, "", func(referrers []ocispec.Descriptor) error { @@ -398,7 +459,7 @@ func (r *Repository) Predecessors(ctx context.Context, desc ocispec.Descriptor) // If artifactType is not empty, only referrers of the same artifact type are // fed to fn. // -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers func (r *Repository) Referrers(ctx context.Context, desc ocispec.Descriptor, artifactType string, fn func(referrers []ocispec.Descriptor) error) error { state := r.loadReferrersState() if state == referrersStateUnsupported { @@ -470,7 +531,7 @@ func (r *Repository) referrersPageByAPI(ctx context.Context, artifactType string req.URL.RawQuery = q.Encode() } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return "", err } @@ -485,10 +546,19 @@ func (r *Repository) referrersPageByAPI(ctx context.Context, artifactType string if err := json.NewDecoder(lr).Decode(&index); err != nil { return "", fmt.Errorf("%s %q: failed to decode response: %w", resp.Request.Method, resp.Request.URL, err) } + referrers := index.Manifests - if artifactType != "" && !isReferrersFilterApplied(index.Annotations, "artifactType") { - // perform client side filtering if the filter is not applied on the server side - referrers = filterReferrers(referrers, artifactType) + if artifactType != "" { + // check both filters header and filters annotations for compatibility + // latest spec for filters header: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers + // older spec for filters annotations: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers + filtersHeader := resp.Header.Get(headerOCIFiltersApplied) + filtersAnnotation := index.Annotations[spec.AnnotationReferrersFiltersApplied] + if !isReferrersFilterApplied(filtersHeader, filterTypeArtifactType) && + !isReferrersFilterApplied(filtersAnnotation, filterTypeArtifactType) { + // perform client side filtering if the filter is not applied on the server side + referrers = filterReferrers(referrers, artifactType) + } } if len(referrers) > 0 { if err := fn(referrers); err != nil { @@ -502,7 +572,7 @@ func (r *Repository) referrersPageByAPI(ctx context.Context, artifactType string // referencing the given manifest descriptor by requesting referrers tag. // fn is called for the referrers result. If artifactType is not empty, // only referrers of the same artifact type are fed to fn. -// reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#backwards-compatibility +// reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#backwards-compatibility func (r *Repository) referrersByTagSchema(ctx context.Context, desc ocispec.Descriptor, artifactType string, fn func(referrers []ocispec.Descriptor) error) error { referrersTag := buildReferrersTag(desc) _, referrers, err := r.referrersFromIndex(ctx, referrersTag) @@ -572,7 +642,7 @@ func (r *Repository) pingReferrers(ctx context.Context) (bool, error) { if err != nil { return false, err } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return false, err } @@ -610,7 +680,7 @@ func (r *Repository) delete(ctx context.Context, target ocispec.Descriptor, isMa return err } - resp, err := r.client().Do(req) + resp, err := r.do(req) if err != nil { return err } @@ -642,7 +712,7 @@ func (s *blobStore) Fetch(ctx context.Context, target ocispec.Descriptor) (rc io return nil, err } - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return nil, err } @@ -689,7 +759,7 @@ func (s *blobStore) Mount(ctx context.Context, desc ocispec.Descriptor, fromRepo if err != nil { return err } - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return err } @@ -715,7 +785,7 @@ func (s *blobStore) Mount(ctx context.Context, desc ocispec.Descriptor, fromRepo // push it. If the caller has provided a getContent function, we // can use that, otherwise pull the content from the source repository. // - // [spec]: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#mounting-a-blob-from-another-repository + // [spec]: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#mounting-a-blob-from-another-repository var r io.ReadCloser if getContent != nil { @@ -746,10 +816,11 @@ func (s *blobStore) sibling(otherRepoName string) *blobStore { // Push is done by conventional 2-step monolithic upload instead of a single // `POST` request for better overall performance. It also allows early fail on // authentication errors. +// // References: -// - https://docs.docker.com/registry/spec/api/#pushing-an-image -// - https://docs.docker.com/registry/spec/api/#initiate-blob-upload -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pushing-a-blob-monolithically +// - https://docs.docker.com/registry/spec/api/#pushing-an-image +// - https://docs.docker.com/registry/spec/api/#initiate-blob-upload +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pushing-a-blob-monolithically func (s *blobStore) Push(ctx context.Context, expected ocispec.Descriptor, content io.Reader) error { // start an upload // pushing usually requires both pull and push actions. @@ -761,7 +832,7 @@ func (s *blobStore) Push(ctx context.Context, expected ocispec.Descriptor, conte return err } - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return err } @@ -816,7 +887,7 @@ func (s *blobStore) completePushAfterInitialPost(ctx context.Context, req *http. if auth := resp.Request.Header.Get("Authorization"); auth != "" { req.Header.Set("Authorization", auth) } - resp, err = s.repo.client().Do(req) + resp, err = s.repo.do(req) if err != nil { return err } @@ -862,7 +933,7 @@ func (s *blobStore) Resolve(ctx context.Context, reference string) (ocispec.Desc return ocispec.Descriptor{}, err } - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return ocispec.Descriptor{}, err } @@ -897,7 +968,7 @@ func (s *blobStore) FetchReference(ctx context.Context, reference string) (desc return ocispec.Descriptor{}, nil, err } - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return ocispec.Descriptor{}, nil, err } @@ -973,7 +1044,7 @@ func (s *manifestStore) Fetch(ctx context.Context, target ocispec.Descriptor) (r } req.Header.Set("Accept", target.MediaType) - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return nil, err } @@ -1032,7 +1103,8 @@ func (s *manifestStore) Delete(ctx context.Context, target ocispec.Descriptor) e // deleteWithIndexing removes the manifest content identified by the descriptor, // and indexes referrers for the manifest when needed. func (s *manifestStore) deleteWithIndexing(ctx context.Context, target ocispec.Descriptor) error { - if target.MediaType == spec.MediaTypeArtifactManifest || target.MediaType == ocispec.MediaTypeImageManifest { + switch target.MediaType { + case spec.MediaTypeArtifactManifest, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex: if state := s.repo.loadReferrersState(); state == referrersStateSupported { // referrers API is available, no client-side indexing needed return s.repo.delete(ctx, target, true) @@ -1053,9 +1125,12 @@ func (s *manifestStore) deleteWithIndexing(ctx context.Context, target ocispec.D return s.repo.delete(ctx, target, true) } -// indexReferrersForDelete indexes referrers for image or artifact manifest with -// the subject field on manifest delete. -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#deleting-manifests +// indexReferrersForDelete indexes referrers for manifests with a subject field +// on manifest delete. +// +// References: +// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#deleting-manifests +// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#deleting-manifests func (s *manifestStore) indexReferrersForDelete(ctx context.Context, desc ocispec.Descriptor, manifestJSON []byte) error { var manifest struct { Subject *ocispec.Descriptor `json:"subject"` @@ -1095,7 +1170,7 @@ func (s *manifestStore) Resolve(ctx context.Context, reference string) (ocispec. } req.Header.Set("Accept", manifestAcceptHeader(s.repo.ManifestMediaTypes)) - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return ocispec.Descriptor{}, err } @@ -1127,7 +1202,7 @@ func (s *manifestStore) FetchReference(ctx context.Context, reference string) (d } req.Header.Set("Accept", manifestAcceptHeader(s.repo.ManifestMediaTypes)) - resp, err := s.repo.client().Do(req) + resp, err := s.repo.do(req) if err != nil { return ocispec.Descriptor{}, nil, err } @@ -1225,7 +1300,7 @@ func (s *manifestStore) push(ctx context.Context, expected ocispec.Descriptor, c return err } } - resp, err := client.Do(req) + resp, err := s.repo.do(req) if err != nil { return err } @@ -1234,14 +1309,26 @@ func (s *manifestStore) push(ctx context.Context, expected ocispec.Descriptor, c if resp.StatusCode != http.StatusCreated { return errutil.ParseErrorResponse(resp) } + s.checkOCISubjectHeader(resp) return verifyContentDigest(resp, expected.Digest) } +// checkOCISubjectHeader checks the "OCI-Subject" header in the response and +// sets referrers capability accordingly. +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pushing-manifests-with-subject +func (s *manifestStore) checkOCISubjectHeader(resp *http.Response) { + // Referrers capability is not set to false when the subject header is not + // present, as the server may still conform to an older version of the spec + if subjectHeader := resp.Header.Get(headerOCISubject); subjectHeader != "" { + s.repo.SetReferrersCapability(true) + } +} + // pushWithIndexing pushes the manifest content matching the expected descriptor, // and indexes referrers for the manifest when needed. func (s *manifestStore) pushWithIndexing(ctx context.Context, expected ocispec.Descriptor, r io.Reader, reference string) error { switch expected.MediaType { - case spec.MediaTypeArtifactManifest, ocispec.MediaTypeImageManifest: + case spec.MediaTypeArtifactManifest, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex: if state := s.repo.loadReferrersState(); state == referrersStateSupported { // referrers API is available, no client-side indexing needed return s.push(ctx, expected, r, reference) @@ -1257,15 +1344,22 @@ func (s *manifestStore) pushWithIndexing(ctx context.Context, expected ocispec.D if err := s.push(ctx, expected, bytes.NewReader(manifestJSON), reference); err != nil { return err } + // check referrers API availability again after push + if state := s.repo.loadReferrersState(); state == referrersStateSupported { + return nil + } return s.indexReferrersForPush(ctx, expected, manifestJSON) default: return s.push(ctx, expected, r, reference) } } -// indexReferrersForPush indexes referrers for image or artifact manifest with -// the subject field on manifest push. -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pushing-manifests-with-subject +// indexReferrersForPush indexes referrers for manifests with a subject field +// on manifest push. +// +// References: +// - Latest spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pushing-manifests-with-subject +// - Compatible spec: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pushing-manifests-with-subject func (s *manifestStore) indexReferrersForPush(ctx context.Context, desc ocispec.Descriptor, manifestJSON []byte) error { var subject ocispec.Descriptor switch desc.MediaType { @@ -1291,7 +1385,22 @@ func (s *manifestStore) indexReferrersForPush(ctx context.Context, desc ocispec. return nil } subject = *manifest.Subject - desc.ArtifactType = manifest.Config.MediaType + desc.ArtifactType = manifest.ArtifactType + if desc.ArtifactType == "" { + desc.ArtifactType = manifest.Config.MediaType + } + desc.Annotations = manifest.Annotations + case ocispec.MediaTypeImageIndex: + var manifest ocispec.Index + if err := json.Unmarshal(manifestJSON, &manifest); err != nil { + return fmt.Errorf("failed to decode manifest: %s: %s: %w", desc.Digest, desc.MediaType, err) + } + if manifest.Subject == nil { + // no subject, no indexing needed + return nil + } + subject = *manifest.Subject + desc.ArtifactType = manifest.ArtifactType desc.Annotations = manifest.Annotations default: return nil @@ -1311,12 +1420,12 @@ func (s *manifestStore) indexReferrersForPush(ctx context.Context, desc ocispec. // updateReferrersIndex updates the referrers index for desc referencing subject // on manifest push and manifest delete. // References: -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#pushing-manifests-with-subject -// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#deleting-manifests +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#pushing-manifests-with-subject +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#deleting-manifests func (s *manifestStore) updateReferrersIndex(ctx context.Context, subject ocispec.Descriptor, change referrerChange) (err error) { referrersTag := buildReferrersTag(subject) - var skipDelete bool + skipDelete := s.repo.SkipReferrersGC var oldIndexDesc ocispec.Descriptor var referrers []ocispec.Descriptor prepare := func() error { @@ -1408,13 +1517,13 @@ func (s *manifestStore) generateDescriptor(resp *http.Response, ref registry.Ref // 4. Validate Server Digest (if present) var serverHeaderDigest digest.Digest - if serverHeaderDigestStr := resp.Header.Get(dockerContentDigestHeader); serverHeaderDigestStr != "" { + if serverHeaderDigestStr := resp.Header.Get(headerDockerContentDigest); serverHeaderDigestStr != "" { if serverHeaderDigest, err = digest.Parse(serverHeaderDigestStr); err != nil { return ocispec.Descriptor{}, fmt.Errorf( "%s %q: invalid response header value: `%s: %s`; %w", resp.Request.Method, resp.Request.URL, - dockerContentDigestHeader, + headerDockerContentDigest, serverHeaderDigestStr, err, ) @@ -1431,7 +1540,7 @@ func (s *manifestStore) generateDescriptor(resp *http.Response, ref registry.Ref // immediate fail return ocispec.Descriptor{}, fmt.Errorf( "HTTP %s request missing required header %q", - httpMethod, dockerContentDigestHeader, + httpMethod, headerDockerContentDigest, ) } // Otherwise, just trust the client-supplied digest @@ -1453,7 +1562,7 @@ func (s *manifestStore) generateDescriptor(resp *http.Response, ref registry.Ref return ocispec.Descriptor{}, fmt.Errorf( "%s %q: invalid response; digest mismatch in %s: received %q when expecting %q", resp.Request.Method, resp.Request.URL, - dockerContentDigestHeader, contentDigest, + headerDockerContentDigest, contentDigest, refDigest, ) } @@ -1485,7 +1594,7 @@ func calculateDigestFromResponse(resp *http.Response, maxMetadataBytes int64) (d // OCI distribution-spec states the Docker-Content-Digest header is optional. // Reference: https://github.com/opencontainers/distribution-spec/blob/v1.0.1/spec.md#legacy-docker-support-http-headers func verifyContentDigest(resp *http.Response, expected digest.Digest) error { - digestStr := resp.Header.Get(dockerContentDigestHeader) + digestStr := resp.Header.Get(headerDockerContentDigest) if len(digestStr) == 0 { return nil @@ -1496,7 +1605,7 @@ func verifyContentDigest(resp *http.Response, expected digest.Digest) error { return fmt.Errorf( "%s %q: invalid response header: `%s: %s`", resp.Request.Method, resp.Request.URL, - dockerContentDigestHeader, digestStr, + headerDockerContentDigest, digestStr, ) } @@ -1504,7 +1613,7 @@ func verifyContentDigest(resp *http.Response, expected digest.Digest) error { return fmt.Errorf( "%s %q: invalid response; digest mismatch in %s: received %q when expecting %q", resp.Request.Method, resp.Request.URL, - dockerContentDigestHeader, contentDigest, + headerDockerContentDigest, contentDigest, expected, ) } diff --git a/vendor/oras.land/oras-go/v2/registry/remote/url.go b/vendor/oras.land/oras-go/v2/registry/remote/url.go index d3eee3eeab..74258de7ae 100644 --- a/vendor/oras.land/oras-go/v2/registry/remote/url.go +++ b/vendor/oras.land/oras-go/v2/registry/remote/url.go @@ -101,7 +101,7 @@ func buildRepositoryBlobMountURL(plainHTTP bool, ref registry.Reference, d diges // buildReferrersURL builds the URL for querying the Referrers API. // Format: :///v2//referrers/?artifactType= -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers func buildReferrersURL(plainHTTP bool, ref registry.Reference, artifactType string) string { var query string if artifactType != "" { diff --git a/vendor/oras.land/oras-go/v2/registry/remote/warning.go b/vendor/oras.land/oras-go/v2/registry/remote/warning.go new file mode 100644 index 0000000000..ff8f9c0292 --- /dev/null +++ b/vendor/oras.land/oras-go/v2/registry/remote/warning.go @@ -0,0 +1,100 @@ +/* +Copyright The ORAS 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 remote + +import ( + "errors" + "fmt" + "strconv" + "strings" +) + +const ( + // headerWarning is the "Warning" header. + // Reference: https://www.rfc-editor.org/rfc/rfc7234#section-5.5 + headerWarning = "Warning" + + // warnCode299 is the 299 warn-code. + // Reference: https://www.rfc-editor.org/rfc/rfc7234#section-5.5 + warnCode299 = 299 + + // warnAgentUnknown represents an unknown warn-agent. + // Reference: https://www.rfc-editor.org/rfc/rfc7234#section-5.5 + warnAgentUnknown = "-" +) + +// errUnexpectedWarningFormat is returned by parseWarningHeader when +// an unexpected warning format is encountered. +var errUnexpectedWarningFormat = errors.New("unexpected warning format") + +// WarningValue represents the value of the Warning header. +// +// References: +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#warnings +// - https://www.rfc-editor.org/rfc/rfc7234#section-5.5 +type WarningValue struct { + // Code is the warn-code. + Code int + // Agent is the warn-agent. + Agent string + // Text is the warn-text. + Text string +} + +// Warning contains the value of the warning header and may contain +// other information related to the warning. +// +// References: +// - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#warnings +// - https://www.rfc-editor.org/rfc/rfc7234#section-5.5 +type Warning struct { + // WarningValue is the value of the warning header. + WarningValue +} + +// parseWarningHeader parses the warning header into WarningValue. +func parseWarningHeader(header string) (WarningValue, error) { + if len(header) < 9 || !strings.HasPrefix(header, `299 - "`) || !strings.HasSuffix(header, `"`) { + // minimum header value: `299 - "x"` + return WarningValue{}, fmt.Errorf("%s: %w", header, errUnexpectedWarningFormat) + } + + // validate text only as code and agent are fixed + quotedText := header[6:] // behind `299 - `, quoted by " + text, err := strconv.Unquote(quotedText) + if err != nil { + return WarningValue{}, fmt.Errorf("%s: unexpected text: %w: %v", header, errUnexpectedWarningFormat, err) + } + + return WarningValue{ + Code: warnCode299, + Agent: warnAgentUnknown, + Text: text, + }, nil +} + +// handleWarningHeaders parses the warning headers and handles the parsed +// warnings using handleWarning. +func handleWarningHeaders(headers []string, handleWarning func(Warning)) { + for _, h := range headers { + if value, err := parseWarningHeader(h); err == nil { + // ignore warnings in unexpected formats + handleWarning(Warning{ + WarningValue: value, + }) + } + } +} diff --git a/vendor/oras.land/oras-go/v2/registry/repository.go b/vendor/oras.land/oras-go/v2/registry/repository.go index 2dd7ff994b..b75b7b8ea4 100644 --- a/vendor/oras.land/oras-go/v2/registry/repository.go +++ b/vendor/oras.land/oras-go/v2/registry/repository.go @@ -82,7 +82,7 @@ type ReferenceFetcher interface { } // ReferrerLister provides the Referrers API. -// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#listing-referrers +// Reference: https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#listing-referrers type ReferrerLister interface { Referrers(ctx context.Context, desc ocispec.Descriptor, artifactType string, fn func(referrers []ocispec.Descriptor) error) error } @@ -93,16 +93,19 @@ type TagLister interface { // Since the returned tag list may be paginated by the underlying // implementation, a function should be passed in to process the paginated // tag list. + // // `last` argument is the `last` parameter when invoking the tags API. // If `last` is NOT empty, the entries in the response start after the // tag specified by `last`. Otherwise, the response starts from the top // of the Tags list. + // // Note: When implemented by a remote registry, the tags API is called. // However, not all registries supports pagination or conforms the // specification. + // // References: - // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc1/spec.md#content-discovery - // - https://docs.docker.com/registry/spec/api/#tags + // - https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#content-discovery + // - https://docs.docker.com/registry/spec/api/#tags // See also `Tags()` in this package. Tags(ctx context.Context, last string, fn func(tags []string) error) error }