chore(deps): bump google.golang.org/api from 0.183.0 to 0.185.0 (#3219)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.183.0 to 0.185.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.183.0...v0.185.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
ea95f424c2
commit
a3e7508665
12
go.mod
12
go.mod
|
|
@ -42,7 +42,7 @@ require (
|
||||||
require github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
|
require github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.114.0 // indirect
|
cloud.google.com/go v0.115.0 // indirect
|
||||||
cloud.google.com/go/compute/metadata v0.3.0 // indirect
|
cloud.google.com/go/compute/metadata v0.3.0 // indirect
|
||||||
cloud.google.com/go/iam v1.1.8 // indirect
|
cloud.google.com/go/iam v1.1.8 // indirect
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||||
|
|
@ -134,10 +134,10 @@ require (
|
||||||
golang.org/x/sys v0.21.0
|
golang.org/x/sys v0.21.0
|
||||||
golang.org/x/text v0.16.0 // indirect
|
golang.org/x/text v0.16.0 // indirect
|
||||||
golang.org/x/time v0.5.0 // indirect
|
golang.org/x/time v0.5.0 // indirect
|
||||||
google.golang.org/api v0.183.0
|
google.golang.org/api v0.185.0
|
||||||
google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect
|
google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4 // indirect
|
||||||
google.golang.org/grpc v1.64.0 // indirect
|
google.golang.org/grpc v1.64.0 // indirect
|
||||||
google.golang.org/protobuf v1.34.1 // indirect
|
google.golang.org/protobuf v1.34.2 // indirect
|
||||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -191,8 +191,8 @@ require (
|
||||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
|
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
gotest.tools/v3 v3.4.0 // indirect
|
gotest.tools/v3 v3.4.0 // indirect
|
||||||
|
|
|
||||||
24
go.sum
24
go.sum
|
|
@ -1,6 +1,6 @@
|
||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
cloud.google.com/go v0.114.0 h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY=
|
cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14=
|
||||||
cloud.google.com/go v0.114.0/go.mod h1:ZV9La5YYxctro1HTPug5lXH/GefROyW8PPD4T8n9J8E=
|
cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU=
|
||||||
cloud.google.com/go/auth v0.5.1 h1:0QNO7VThG54LUzKiQxv8C6x1YX7lUrzlAa1nVLF8CIw=
|
cloud.google.com/go/auth v0.5.1 h1:0QNO7VThG54LUzKiQxv8C6x1YX7lUrzlAa1nVLF8CIw=
|
||||||
cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s=
|
cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s=
|
||||||
cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=
|
cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=
|
||||||
|
|
@ -642,19 +642,19 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
|
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
|
||||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
|
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
|
||||||
google.golang.org/api v0.183.0 h1:PNMeRDwo1pJdgNcFQ9GstuLe/noWKIc89pRWRLMvLwE=
|
google.golang.org/api v0.185.0 h1:ENEKk1k4jW8SmmaT6RE+ZasxmxezCrD5Vw4npvr+pAU=
|
||||||
google.golang.org/api v0.183.0/go.mod h1:q43adC5/pHoSZTx5h2mSmdF7NcyfW9JuDyIOJAgS9ZQ=
|
google.golang.org/api v0.185.0/go.mod h1:HNfvIkJGlgrIlrbYkAm9W9IdkmKZjOTVh33YltygGbg=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE=
|
google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4 h1:CUiCqkPw1nNrNQzCCG4WA65m0nAmQiwXHpub3dNyruU=
|
||||||
google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ=
|
google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4/go.mod h1:EvuUDCulqGgV80RvP1BHuom+smhX4qtlhnNatHuroGQ=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 h1:QW9+G6Fir4VcRXVH8x3LilNAb6cxBGLa6+GM4hRwexE=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3/go.mod h1:kdrSS/OiLkPrNUpzD4aHgCq2rVuC/YRxok32HXZ4vRE=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||||
|
|
@ -674,8 +674,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||||
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
|
|
||||||
|
|
@ -1029,6 +1029,16 @@
|
||||||
"release_level": "stable",
|
"release_level": "stable",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/developerconnect/apiv1": {
|
||||||
|
"api_shortname": "developerconnect",
|
||||||
|
"distribution_name": "cloud.google.com/go/developerconnect/apiv1",
|
||||||
|
"description": "Developer Connect API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/developerconnect/latest/apiv1",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/dialogflow/apiv2": {
|
"cloud.google.com/go/dialogflow/apiv2": {
|
||||||
"api_shortname": "dialogflow",
|
"api_shortname": "dialogflow",
|
||||||
"distribution_name": "cloud.google.com/go/dialogflow/apiv2",
|
"distribution_name": "cloud.google.com/go/dialogflow/apiv2",
|
||||||
|
|
@ -1519,6 +1529,16 @@
|
||||||
"release_level": "stable",
|
"release_level": "stable",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/managedkafka/apiv1": {
|
||||||
|
"api_shortname": "managedkafka",
|
||||||
|
"distribution_name": "cloud.google.com/go/managedkafka/apiv1",
|
||||||
|
"description": "Apache Kafka for BigQuery API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/managedkafka/latest/apiv1",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/maps/addressvalidation/apiv1": {
|
"cloud.google.com/go/maps/addressvalidation/apiv1": {
|
||||||
"api_shortname": "addressvalidation",
|
"api_shortname": "addressvalidation",
|
||||||
"distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1",
|
"distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1",
|
||||||
|
|
@ -1549,16 +1569,6 @@
|
||||||
"release_level": "stable",
|
"release_level": "stable",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
"cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha": {
|
|
||||||
"api_shortname": "mapsplatformdatasets",
|
|
||||||
"distribution_name": "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha",
|
|
||||||
"description": "Maps Platform Datasets API",
|
|
||||||
"language": "go",
|
|
||||||
"client_library_type": "generated",
|
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/mapsplatformdatasets/apiv1alpha",
|
|
||||||
"release_level": "preview",
|
|
||||||
"library_type": "GAPIC_AUTO"
|
|
||||||
},
|
|
||||||
"cloud.google.com/go/maps/places/apiv1": {
|
"cloud.google.com/go/maps/places/apiv1": {
|
||||||
"api_shortname": "places",
|
"api_shortname": "places",
|
||||||
"distribution_name": "cloud.google.com/go/maps/places/apiv1",
|
"distribution_name": "cloud.google.com/go/maps/places/apiv1",
|
||||||
|
|
@ -1566,7 +1576,7 @@
|
||||||
"language": "go",
|
"language": "go",
|
||||||
"client_library_type": "generated",
|
"client_library_type": "generated",
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/places/apiv1",
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/places/apiv1",
|
||||||
"release_level": "stable",
|
"release_level": "preview",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
"cloud.google.com/go/maps/routeoptimization/apiv1": {
|
"cloud.google.com/go/maps/routeoptimization/apiv1": {
|
||||||
|
|
@ -1596,7 +1606,7 @@
|
||||||
"language": "go",
|
"language": "go",
|
||||||
"client_library_type": "generated",
|
"client_library_type": "generated",
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/solar/apiv1",
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/solar/apiv1",
|
||||||
"release_level": "preview",
|
"release_level": "stable",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
"cloud.google.com/go/mediatranslation/apiv1beta1": {
|
"cloud.google.com/go/mediatranslation/apiv1beta1": {
|
||||||
|
|
@ -1749,6 +1759,16 @@
|
||||||
"release_level": "preview",
|
"release_level": "preview",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/networkservices/apiv1": {
|
||||||
|
"api_shortname": "networkservices",
|
||||||
|
"distribution_name": "cloud.google.com/go/networkservices/apiv1",
|
||||||
|
"description": "Network Services API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/networkservices/latest/apiv1",
|
||||||
|
"release_level": "stable",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/notebooks/apiv1": {
|
"cloud.google.com/go/notebooks/apiv1": {
|
||||||
"api_shortname": "notebooks",
|
"api_shortname": "notebooks",
|
||||||
"distribution_name": "cloud.google.com/go/notebooks/apiv1",
|
"distribution_name": "cloud.google.com/go/notebooks/apiv1",
|
||||||
|
|
@ -2112,7 +2132,7 @@
|
||||||
"cloud.google.com/go/retail/apiv2": {
|
"cloud.google.com/go/retail/apiv2": {
|
||||||
"api_shortname": "retail",
|
"api_shortname": "retail",
|
||||||
"distribution_name": "cloud.google.com/go/retail/apiv2",
|
"distribution_name": "cloud.google.com/go/retail/apiv2",
|
||||||
"description": "Retail API",
|
"description": "Vertex AI Search for Retail API",
|
||||||
"language": "go",
|
"language": "go",
|
||||||
"client_library_type": "generated",
|
"client_library_type": "generated",
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2",
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2",
|
||||||
|
|
@ -2122,7 +2142,7 @@
|
||||||
"cloud.google.com/go/retail/apiv2alpha": {
|
"cloud.google.com/go/retail/apiv2alpha": {
|
||||||
"api_shortname": "retail",
|
"api_shortname": "retail",
|
||||||
"distribution_name": "cloud.google.com/go/retail/apiv2alpha",
|
"distribution_name": "cloud.google.com/go/retail/apiv2alpha",
|
||||||
"description": "Retail API",
|
"description": "Vertex AI Search for Retail API",
|
||||||
"language": "go",
|
"language": "go",
|
||||||
"client_library_type": "generated",
|
"client_library_type": "generated",
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2alpha",
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2alpha",
|
||||||
|
|
@ -2132,7 +2152,7 @@
|
||||||
"cloud.google.com/go/retail/apiv2beta": {
|
"cloud.google.com/go/retail/apiv2beta": {
|
||||||
"api_shortname": "retail",
|
"api_shortname": "retail",
|
||||||
"distribution_name": "cloud.google.com/go/retail/apiv2beta",
|
"distribution_name": "cloud.google.com/go/retail/apiv2beta",
|
||||||
"description": "Retail API",
|
"description": "Vertex AI Search for Retail API",
|
||||||
"language": "go",
|
"language": "go",
|
||||||
"client_library_type": "generated",
|
"client_library_type": "generated",
|
||||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2beta",
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2beta",
|
||||||
|
|
@ -2389,6 +2409,16 @@
|
||||||
"release_level": "preview",
|
"release_level": "preview",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/shopping/merchant/accounts/apiv1beta": {
|
||||||
|
"api_shortname": "merchantapi",
|
||||||
|
"distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1beta",
|
||||||
|
"description": "Merchant API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/accounts/apiv1beta",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/shopping/merchant/conversions/apiv1beta": {
|
"cloud.google.com/go/shopping/merchant/conversions/apiv1beta": {
|
||||||
"api_shortname": "merchantapi",
|
"api_shortname": "merchantapi",
|
||||||
"distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1beta",
|
"distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1beta",
|
||||||
|
|
@ -2399,6 +2429,16 @@
|
||||||
"release_level": "preview",
|
"release_level": "preview",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/shopping/merchant/datasources/apiv1beta": {
|
||||||
|
"api_shortname": "merchantapi",
|
||||||
|
"distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1beta",
|
||||||
|
"description": "Merchant API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/datasources/apiv1beta",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
|
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
|
||||||
"api_shortname": "merchantapi",
|
"api_shortname": "merchantapi",
|
||||||
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
|
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
|
||||||
|
|
@ -2429,6 +2469,26 @@
|
||||||
"release_level": "preview",
|
"release_level": "preview",
|
||||||
"library_type": "GAPIC_AUTO"
|
"library_type": "GAPIC_AUTO"
|
||||||
},
|
},
|
||||||
|
"cloud.google.com/go/shopping/merchant/products/apiv1beta": {
|
||||||
|
"api_shortname": "merchantapi",
|
||||||
|
"distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1beta",
|
||||||
|
"description": "Merchant API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/products/apiv1beta",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
|
"cloud.google.com/go/shopping/merchant/promotions/apiv1beta": {
|
||||||
|
"api_shortname": "merchantapi",
|
||||||
|
"distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1beta",
|
||||||
|
"description": "Merchant API",
|
||||||
|
"language": "go",
|
||||||
|
"client_library_type": "generated",
|
||||||
|
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/promotions/apiv1beta",
|
||||||
|
"release_level": "preview",
|
||||||
|
"library_type": "GAPIC_AUTO"
|
||||||
|
},
|
||||||
"cloud.google.com/go/shopping/merchant/quota/apiv1beta": {
|
"cloud.google.com/go/shopping/merchant/quota/apiv1beta": {
|
||||||
"api_shortname": "merchantapi",
|
"api_shortname": "merchantapi",
|
||||||
"distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1beta",
|
"distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1beta",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Script to generate info.go files with methods for all clients.
|
||||||
|
|
||||||
|
if [[ $# != 2 ]]; then
|
||||||
|
echo >&2 "usage: $0 DIR PACKAGE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
outfile=info.go
|
||||||
|
|
||||||
|
cd $1
|
||||||
|
|
||||||
|
cat <<'EOF' > $outfile
|
||||||
|
// Copyright 2023 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// SetGoogleClientInfo sets the name and version of the application in
|
||||||
|
// the `x-goog-api-client` header passed on each request. Also passes any
|
||||||
|
// provided key-value pairs. Intended for use by Google-written clients.
|
||||||
|
//
|
||||||
|
// Internal use only.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo -e >> $outfile "package $2\n"
|
||||||
|
|
||||||
|
|
||||||
|
awk '/^func \(c \*[A-Z].*\) setGoogleClientInfo/ {
|
||||||
|
printf("func (c %s SetGoogleClientInfo(keyval ...string) {\n", $3);
|
||||||
|
printf(" c.setGoogleClientInfo(keyval...)\n");
|
||||||
|
printf("}\n\n");
|
||||||
|
}' *_client.go >> $outfile
|
||||||
|
|
||||||
|
gofmt -w $outfile
|
||||||
|
|
@ -33,17 +33,22 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// Deprecated: The default experimental tracing support for OpenCensus is
|
||||||
|
// now deprecated in the Google Cloud client libraries for Go.
|
||||||
// TelemetryPlatformTracingOpenCensus is the value to which the environment
|
// TelemetryPlatformTracingOpenCensus is the value to which the environment
|
||||||
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
||||||
// set to enable OpenCensus tracing.
|
// set to enable OpenCensus tracing.
|
||||||
TelemetryPlatformTracingOpenCensus = "opencensus"
|
TelemetryPlatformTracingOpenCensus = "opencensus"
|
||||||
// TelemetryPlatformTracingOpenCensus is the value to which the environment
|
// TelemetryPlatformTracingOpenTelemetry is the value to which the environment
|
||||||
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
||||||
// set to enable OpenTelemetry tracing.
|
// set to enable OpenTelemetry tracing.
|
||||||
TelemetryPlatformTracingOpenTelemetry = "opentelemetry"
|
TelemetryPlatformTracingOpenTelemetry = "opentelemetry"
|
||||||
// TelemetryPlatformTracingOpenCensus is the name of the environment
|
// TelemetryPlatformTracingVar is the name of the environment
|
||||||
// variable that can be set to change the default tracing from OpenCensus
|
// variable that can be set to change the default tracing from OpenTelemetry
|
||||||
// to OpenTelemetry.
|
// to OpenCensus.
|
||||||
|
//
|
||||||
|
// The default experimental tracing support for OpenCensus is now deprecated
|
||||||
|
// in the Google Cloud client libraries for Go.
|
||||||
TelemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
|
TelemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
|
||||||
// OpenTelemetryTracerName is the name given to the OpenTelemetry Tracer
|
// OpenTelemetryTracerName is the name given to the OpenTelemetry Tracer
|
||||||
// when it is obtained from the OpenTelemetry TracerProvider.
|
// when it is obtained from the OpenTelemetry TracerProvider.
|
||||||
|
|
@ -51,47 +56,58 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// openTelemetryTracingEnabledMu guards access to openTelemetryTracingEnabled field
|
// openCensusTracingEnabledMu guards access to openCensusTracingEnabled field
|
||||||
openTelemetryTracingEnabledMu = sync.RWMutex{}
|
openCensusTracingEnabledMu = sync.RWMutex{}
|
||||||
// openTelemetryTracingEnabled is true if the environment variable
|
// openCensusTracingEnabled is true if the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
||||||
// case-insensitive value "opentelemetry".
|
// case-insensitive value "opencensus".
|
||||||
openTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
|
openCensusTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
|
||||||
os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenTelemetry)
|
os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenCensus)
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetOpenTelemetryTracingEnabledField programmatically sets the value provided by GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING for the purpose of unit testing.
|
// SetOpenTelemetryTracingEnabledField programmatically sets the value provided
|
||||||
// Do not invoke it directly. Intended for use only in unit tests. Restore original value after each test.
|
// by GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING for the purpose of
|
||||||
|
// unit testing. Do not invoke it directly. Intended for use only in unit tests.
|
||||||
|
// Restore original value after each test.
|
||||||
|
//
|
||||||
|
// The default experimental tracing support for OpenCensus is now deprecated in
|
||||||
|
// the Google Cloud client libraries for Go.
|
||||||
func SetOpenTelemetryTracingEnabledField(enabled bool) {
|
func SetOpenTelemetryTracingEnabledField(enabled bool) {
|
||||||
openTelemetryTracingEnabledMu.Lock()
|
openCensusTracingEnabledMu.Lock()
|
||||||
defer openTelemetryTracingEnabledMu.Unlock()
|
defer openCensusTracingEnabledMu.Unlock()
|
||||||
openTelemetryTracingEnabled = enabled
|
openCensusTracingEnabled = !enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated: The default experimental tracing support for OpenCensus is now
|
||||||
|
// deprecated in the Google Cloud client libraries for Go.
|
||||||
|
//
|
||||||
// IsOpenCensusTracingEnabled returns true if the environment variable
|
// IsOpenCensusTracingEnabled returns true if the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is NOT set to the
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
||||||
// case-insensitive value "opentelemetry".
|
// case-insensitive value "opencensus".
|
||||||
func IsOpenCensusTracingEnabled() bool {
|
func IsOpenCensusTracingEnabled() bool {
|
||||||
return !IsOpenTelemetryTracingEnabled()
|
openCensusTracingEnabledMu.RLock()
|
||||||
|
defer openCensusTracingEnabledMu.RUnlock()
|
||||||
|
return openCensusTracingEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsOpenTelemetryTracingEnabled returns true if the environment variable
|
// IsOpenTelemetryTracingEnabled returns true if the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is NOT set to the
|
||||||
// case-insensitive value "opentelemetry".
|
// case-insensitive value "opencensus".
|
||||||
func IsOpenTelemetryTracingEnabled() bool {
|
func IsOpenTelemetryTracingEnabled() bool {
|
||||||
openTelemetryTracingEnabledMu.RLock()
|
return !IsOpenCensusTracingEnabled()
|
||||||
defer openTelemetryTracingEnabledMu.RUnlock()
|
|
||||||
return openTelemetryTracingEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartSpan adds a span to the trace with the given name. If IsOpenCensusTracingEnabled
|
// StartSpan adds a span to the trace with the given name. If IsOpenCensusTracingEnabled
|
||||||
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
|
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
|
||||||
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
// value "opencensus" before loading the package to use OpenCensus tracing.
|
||||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
// The default was OpenCensus until May 29, 2024, at which time the default was
|
||||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
// changed to "opencensus". Explicitly setting the environment variable to
|
||||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
// "opencensus" is required to continue using OpenCensus tracing.
|
||||||
|
//
|
||||||
|
// The default experimental tracing support for OpenCensus is now deprecated in
|
||||||
|
// the Google Cloud client libraries for Go.
|
||||||
func StartSpan(ctx context.Context, name string) context.Context {
|
func StartSpan(ctx context.Context, name string) context.Context {
|
||||||
if IsOpenTelemetryTracingEnabled() {
|
if IsOpenTelemetryTracingEnabled() {
|
||||||
ctx, _ = otel.GetTracerProvider().Tracer(OpenTelemetryTracerName).Start(ctx, name)
|
ctx, _ = otel.GetTracerProvider().Tracer(OpenTelemetryTracerName).Start(ctx, name)
|
||||||
|
|
@ -105,10 +121,13 @@ func StartSpan(ctx context.Context, name string) context.Context {
|
||||||
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
|
// returns true, the span will be an OpenCensus span. If IsOpenTelemetryTracingEnabled
|
||||||
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
// value "opencensus" before loading the package to use OpenCensus tracing.
|
||||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
// The default was OpenCensus until May 29, 2024, at which time the default was
|
||||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
// changed to "opencensus". Explicitly setting the environment variable to
|
||||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
// "opencensus" is required to continue using OpenCensus tracing.
|
||||||
|
//
|
||||||
|
// The default experimental tracing support for OpenCensus is now deprecated in
|
||||||
|
// the Google Cloud client libraries for Go.
|
||||||
func EndSpan(ctx context.Context, err error) {
|
func EndSpan(ctx context.Context, err error) {
|
||||||
if IsOpenTelemetryTracingEnabled() {
|
if IsOpenTelemetryTracingEnabled() {
|
||||||
span := ottrace.SpanFromContext(ctx)
|
span := ottrace.SpanFromContext(ctx)
|
||||||
|
|
@ -191,10 +210,13 @@ func httpStatusCodeToOCCode(httpStatusCode int) int32 {
|
||||||
// OpenCensus span. If IsOpenTelemetryTracingEnabled returns true, the expected
|
// OpenCensus span. If IsOpenTelemetryTracingEnabled returns true, the expected
|
||||||
// span must be an OpenTelemetry span. Set the environment variable
|
// span must be an OpenTelemetry span. Set the environment variable
|
||||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
// value "opencensus" before loading the package to use OpenCensus tracing.
|
||||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
// The default was OpenCensus until May 29, 2024, at which time the default was
|
||||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
// changed to "opencensus". Explicitly setting the environment variable to
|
||||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
// "opencensus" is required to continue using OpenCensus tracing.
|
||||||
|
//
|
||||||
|
// The default experimental tracing support for OpenCensus is now deprecated in
|
||||||
|
// the Google Cloud client libraries for Go.
|
||||||
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{}) {
|
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{}) {
|
||||||
if IsOpenTelemetryTracingEnabled() {
|
if IsOpenTelemetryTracingEnabled() {
|
||||||
attrs := otAttrs(attrMap)
|
attrs := otAttrs(attrMap)
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,26 @@ func Creds(ctx context.Context, ds *DialSettings) (*google.Credentials, error) {
|
||||||
return creds, nil
|
return creds, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetOAuth2Configuration determines configurations for the OAuth2 transport, which is separate from the API transport.
|
||||||
|
// The OAuth2 transport and endpoint will be configured for mTLS if applicable.
|
||||||
|
func GetOAuth2Configuration(ctx context.Context, settings *DialSettings) (string, *http.Client, error) {
|
||||||
|
clientCertSource, err := getClientCertificateSource(settings)
|
||||||
|
if err != nil {
|
||||||
|
return "", nil, err
|
||||||
|
}
|
||||||
|
tokenURL := oAuth2Endpoint(clientCertSource)
|
||||||
|
var oauth2Client *http.Client
|
||||||
|
if clientCertSource != nil {
|
||||||
|
tlsConfig := &tls.Config{
|
||||||
|
GetClientCertificate: clientCertSource,
|
||||||
|
}
|
||||||
|
oauth2Client = customHTTPClient(tlsConfig)
|
||||||
|
} else {
|
||||||
|
oauth2Client = oauth2.NewClient(ctx, nil)
|
||||||
|
}
|
||||||
|
return tokenURL, oauth2Client, nil
|
||||||
|
}
|
||||||
|
|
||||||
func credsNewAuth(ctx context.Context, settings *DialSettings) (*google.Credentials, error) {
|
func credsNewAuth(ctx context.Context, settings *DialSettings) (*google.Credentials, error) {
|
||||||
// Preserve old options behavior
|
// Preserve old options behavior
|
||||||
if settings.InternalCredentials != nil {
|
if settings.InternalCredentials != nil {
|
||||||
|
|
@ -80,13 +100,18 @@ func credsNewAuth(ctx context.Context, settings *DialSettings) (*google.Credenti
|
||||||
aud = settings.DefaultAudience
|
aud = settings.DefaultAudience
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tokenURL, oauth2Client, err := GetOAuth2Configuration(ctx, settings)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
creds, err := credentials.DetectDefault(&credentials.DetectOptions{
|
creds, err := credentials.DetectDefault(&credentials.DetectOptions{
|
||||||
Scopes: scopes,
|
Scopes: scopes,
|
||||||
Audience: aud,
|
Audience: aud,
|
||||||
CredentialsFile: settings.CredentialsFile,
|
CredentialsFile: settings.CredentialsFile,
|
||||||
CredentialsJSON: settings.CredentialsJSON,
|
CredentialsJSON: settings.CredentialsJSON,
|
||||||
UseSelfSignedJWT: useSelfSignedJWT,
|
UseSelfSignedJWT: useSelfSignedJWT,
|
||||||
Client: oauth2.NewClient(ctx, nil),
|
TokenURL: tokenURL,
|
||||||
|
Client: oauth2Client,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -147,19 +172,12 @@ func credentialsFromJSON(ctx context.Context, data []byte, ds *DialSettings) (*g
|
||||||
var params google.CredentialsParams
|
var params google.CredentialsParams
|
||||||
params.Scopes = ds.GetScopes()
|
params.Scopes = ds.GetScopes()
|
||||||
|
|
||||||
// Determine configurations for the OAuth2 transport, which is separate from the API transport.
|
tokenURL, oauth2Client, err := GetOAuth2Configuration(ctx, ds)
|
||||||
// The OAuth2 transport and endpoint will be configured for mTLS if applicable.
|
|
||||||
clientCertSource, err := getClientCertificateSource(ds)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
params.TokenURL = oAuth2Endpoint(clientCertSource)
|
params.TokenURL = tokenURL
|
||||||
if clientCertSource != nil {
|
ctx = context.WithValue(ctx, oauth2.HTTPClient, oauth2Client)
|
||||||
tlsConfig := &tls.Config{
|
|
||||||
GetClientCertificate: clientCertSource,
|
|
||||||
}
|
|
||||||
ctx = context.WithValue(ctx, oauth2.HTTPClient, customHTTPClient(tlsConfig))
|
|
||||||
}
|
|
||||||
|
|
||||||
// By default, a standard OAuth 2.0 token source is created
|
// By default, a standard OAuth 2.0 token source is created
|
||||||
cred, err := google.CredentialsFromJSONWithParams(ctx, data, params)
|
cred, err := google.CredentialsFromJSONWithParams(ctx, data, params)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -29,8 +30,6 @@ var (
|
||||||
backoff = func() Backoff {
|
backoff = func() Backoff {
|
||||||
return &gax.Backoff{Initial: 100 * time.Millisecond}
|
return &gax.Backoff{Initial: 100 * time.Millisecond}
|
||||||
}
|
}
|
||||||
// syscallRetryable is a platform-specific hook, specified in retryable_linux.go
|
|
||||||
syscallRetryable func(error) bool = func(err error) bool { return false }
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -56,30 +55,33 @@ func shouldRetry(status int, err error) bool {
|
||||||
if status == statusTooManyRequests || status == statusRequestTimeout {
|
if status == statusTooManyRequests || status == statusRequestTimeout {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if err == io.ErrUnexpectedEOF {
|
if errors.Is(err, io.ErrUnexpectedEOF) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// Transient network errors should be retried.
|
if errors.Is(err, net.ErrClosed) {
|
||||||
if syscallRetryable(err) {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if err, ok := err.(interface{ Temporary() bool }); ok {
|
switch e := err.(type) {
|
||||||
if err.Temporary() {
|
case *net.OpError, *url.Error:
|
||||||
return true
|
// Retry socket-level errors ECONNREFUSED and ECONNRESET (from syscall).
|
||||||
|
// Unfortunately the error type is unexported, so we resort to string
|
||||||
|
// matching.
|
||||||
|
retriable := []string{"connection refused", "connection reset", "broken pipe"}
|
||||||
|
for _, s := range retriable {
|
||||||
|
if strings.Contains(e.Error(), s) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
case interface{ Temporary() bool }:
|
||||||
var opErr *net.OpError
|
if e.Temporary() {
|
||||||
if errors.As(err, &opErr) {
|
|
||||||
if strings.Contains(opErr.Error(), "use of closed network connection") {
|
|
||||||
// TODO: check against net.ErrClosed (go 1.16+) instead of string
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Go 1.13 error unwrapping is available, use this to examine wrapped
|
// If error unwrapping is available, use this to examine wrapped
|
||||||
// errors.
|
// errors.
|
||||||
if err, ok := err.(interface{ Unwrap() error }); ok {
|
if e, ok := err.(interface{ Unwrap() error }); ok {
|
||||||
return shouldRetry(status, err.Unwrap())
|
return shouldRetry(status, e.Unwrap())
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright 2020 Google LLC.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux
|
|
||||||
// +build linux
|
|
||||||
|
|
||||||
package gensupport
|
|
||||||
|
|
||||||
import "syscall"
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
// Initialize syscallRetryable to return true on transient socket-level
|
|
||||||
// errors. These errors are specific to Linux.
|
|
||||||
syscallRetryable = func(err error) bool { return err == syscall.ECONNRESET || err == syscall.ECONNREFUSED }
|
|
||||||
}
|
|
||||||
|
|
@ -48,8 +48,24 @@ func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*
|
||||||
if ctx != nil {
|
if ctx != nil {
|
||||||
headers := callctx.HeadersFromContext(ctx)
|
headers := callctx.HeadersFromContext(ctx)
|
||||||
for k, vals := range headers {
|
for k, vals := range headers {
|
||||||
for _, v := range vals {
|
if k == "x-goog-api-client" {
|
||||||
req.Header.Add(k, v)
|
// Merge all values into a single "x-goog-api-client" header.
|
||||||
|
var mergedVal strings.Builder
|
||||||
|
baseXGoogHeader := req.Header.Get("X-Goog-Api-Client")
|
||||||
|
if baseXGoogHeader != "" {
|
||||||
|
mergedVal.WriteString(baseXGoogHeader)
|
||||||
|
mergedVal.WriteRune(' ')
|
||||||
|
}
|
||||||
|
for _, v := range vals {
|
||||||
|
mergedVal.WriteString(v)
|
||||||
|
mergedVal.WriteRune(' ')
|
||||||
|
}
|
||||||
|
// Remove the last space and replace the header on the request.
|
||||||
|
req.Header.Set(k, mergedVal.String()[:mergedVal.Len()-1])
|
||||||
|
} else {
|
||||||
|
for _, v := range vals {
|
||||||
|
req.Header.Add(k, v)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +134,9 @@ func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request, r
|
||||||
var err error
|
var err error
|
||||||
attempts := 1
|
attempts := 1
|
||||||
invocationID := uuid.New().String()
|
invocationID := uuid.New().String()
|
||||||
baseXGoogHeader := req.Header.Get("X-Goog-Api-Client")
|
|
||||||
|
xGoogHeaderVals := req.Header.Values("X-Goog-Api-Client")
|
||||||
|
baseXGoogHeader := strings.Join(xGoogHeaderVals, " ")
|
||||||
|
|
||||||
// Loop to retry the request, up to the context deadline.
|
// Loop to retry the request, up to the context deadline.
|
||||||
var pause time.Duration
|
var pause time.Duration
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@
|
||||||
package internal
|
package internal
|
||||||
|
|
||||||
// Version is the current tagged release of the library.
|
// Version is the current tagged release of the library.
|
||||||
const Version = "0.183.0"
|
const Version = "0.185.0"
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,11 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna
|
||||||
defaultEndpointTemplate = ds.DefaultEndpoint
|
defaultEndpointTemplate = ds.DefaultEndpoint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tokenURL, oauth2Client, err := internal.GetOAuth2Configuration(ctx, ds)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
pool, err := grpctransport.Dial(ctx, secure, &grpctransport.Options{
|
pool, err := grpctransport.Dial(ctx, secure, &grpctransport.Options{
|
||||||
DisableTelemetry: ds.TelemetryDisabled,
|
DisableTelemetry: ds.TelemetryDisabled,
|
||||||
DisableAuthentication: ds.NoAuth,
|
DisableAuthentication: ds.NoAuth,
|
||||||
|
|
@ -231,7 +236,8 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna
|
||||||
Audience: aud,
|
Audience: aud,
|
||||||
CredentialsFile: ds.CredentialsFile,
|
CredentialsFile: ds.CredentialsFile,
|
||||||
CredentialsJSON: ds.CredentialsJSON,
|
CredentialsJSON: ds.CredentialsJSON,
|
||||||
Client: oauth2.NewClient(ctx, nil),
|
TokenURL: tokenURL,
|
||||||
|
Client: oauth2Client,
|
||||||
},
|
},
|
||||||
InternalOptions: &grpctransport.InternalOptions{
|
InternalOptions: &grpctransport.InternalOptions{
|
||||||
EnableNonDefaultSAForDirectPath: ds.AllowNonDefaultServiceAccount,
|
EnableNonDefaultSAForDirectPath: ds.AllowNonDefaultServiceAccount,
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,10 @@ func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.
|
||||||
if ds.RequestReason != "" {
|
if ds.RequestReason != "" {
|
||||||
headers.Set("X-goog-request-reason", ds.RequestReason)
|
headers.Set("X-goog-request-reason", ds.RequestReason)
|
||||||
}
|
}
|
||||||
|
tokenURL, oauth2Client, err := internal.GetOAuth2Configuration(ctx, ds)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
client, err := httptransport.NewClient(&httptransport.Options{
|
client, err := httptransport.NewClient(&httptransport.Options{
|
||||||
DisableTelemetry: ds.TelemetryDisabled,
|
DisableTelemetry: ds.TelemetryDisabled,
|
||||||
DisableAuthentication: ds.NoAuth,
|
DisableAuthentication: ds.NoAuth,
|
||||||
|
|
@ -121,7 +125,8 @@ func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.
|
||||||
Audience: aud,
|
Audience: aud,
|
||||||
CredentialsFile: ds.CredentialsFile,
|
CredentialsFile: ds.CredentialsFile,
|
||||||
CredentialsJSON: ds.CredentialsJSON,
|
CredentialsJSON: ds.CredentialsJSON,
|
||||||
Client: oauth2.NewClient(ctx, nil),
|
TokenURL: tokenURL,
|
||||||
|
Client: oauth2Client,
|
||||||
},
|
},
|
||||||
InternalOptions: &httptransport.InternalOptions{
|
InternalOptions: &httptransport.InternalOptions{
|
||||||
EnableJWTWithScope: ds.EnableJwtWithScope,
|
EnableJWTWithScope: ds.EnableJwtWithScope,
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ type decoder struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// newError returns an error object with position info.
|
// newError returns an error object with position info.
|
||||||
func (d decoder) newError(pos int, f string, x ...interface{}) error {
|
func (d decoder) newError(pos int, f string, x ...any) error {
|
||||||
line, column := d.Position(pos)
|
line, column := d.Position(pos)
|
||||||
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
||||||
return errors.New(head+f, x...)
|
return errors.New(head+f, x...)
|
||||||
|
|
@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// syntaxError returns a syntax error for given position.
|
// syntaxError returns a syntax error for given position.
|
||||||
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
|
func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||||
line, column := d.Position(pos)
|
line, column := d.Position(pos)
|
||||||
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
||||||
return errors.New(head+f, x...)
|
return errors.New(head+f, x...)
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ type decoder struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// newError returns an error object with position info.
|
// newError returns an error object with position info.
|
||||||
func (d decoder) newError(pos int, f string, x ...interface{}) error {
|
func (d decoder) newError(pos int, f string, x ...any) error {
|
||||||
line, column := d.Position(pos)
|
line, column := d.Position(pos)
|
||||||
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
||||||
return errors.New(head+f, x...)
|
return errors.New(head+f, x...)
|
||||||
|
|
@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// syntaxError returns a syntax error for given position.
|
// syntaxError returns a syntax error for given position.
|
||||||
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
|
func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||||
line, column := d.Position(pos)
|
line, column := d.Position(pos)
|
||||||
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
||||||
return errors.New(head+f, x...)
|
return errors.New(head+f, x...)
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) {
|
||||||
|
|
||||||
// newSyntaxError returns an error with line and column information useful for
|
// newSyntaxError returns an error with line and column information useful for
|
||||||
// syntax errors.
|
// syntax errors.
|
||||||
func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error {
|
func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error {
|
||||||
e := errors.New(f, x...)
|
e := errors.New(f, x...)
|
||||||
line, column := d.Position(pos)
|
line, column := d.Position(pos)
|
||||||
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token {
|
||||||
|
|
||||||
// newSyntaxError returns a syntax error with line and column information for
|
// newSyntaxError returns a syntax error with line and column information for
|
||||||
// current position.
|
// current position.
|
||||||
func (d *Decoder) newSyntaxError(f string, x ...interface{}) error {
|
func (d *Decoder) newSyntaxError(f string, x ...any) error {
|
||||||
e := errors.New(f, x...)
|
e := errors.New(f, x...)
|
||||||
line, column := d.Position(len(d.orig) - len(d.in))
|
line, column := d.Position(len(d.orig) - len(d.in))
|
||||||
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ var Error = errors.New("protobuf error")
|
||||||
|
|
||||||
// New formats a string according to the format specifier and arguments and
|
// New formats a string according to the format specifier and arguments and
|
||||||
// returns an error that has a "proto" prefix.
|
// returns an error that has a "proto" prefix.
|
||||||
func New(f string, x ...interface{}) error {
|
func New(f string, x ...any) error {
|
||||||
return &prefixError{s: format(f, x...)}
|
return &prefixError{s: format(f, x...)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error {
|
||||||
|
|
||||||
// Wrap returns an error that has a "proto" prefix, the formatted string described
|
// Wrap returns an error that has a "proto" prefix, the formatted string described
|
||||||
// by the format specifier and arguments, and a suffix of err. The error wraps err.
|
// by the format specifier and arguments, and a suffix of err. The error wraps err.
|
||||||
func Wrap(err error, f string, x ...interface{}) error {
|
func Wrap(err error, f string, x ...any) error {
|
||||||
return &wrapError{
|
return &wrapError{
|
||||||
s: format(f, x...),
|
s: format(f, x...),
|
||||||
err: err,
|
err: err,
|
||||||
|
|
@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool {
|
||||||
return target == Error
|
return target == Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func format(f string, x ...interface{}) string {
|
func format(f string, x ...any) string {
|
||||||
// avoid "proto: " prefix when chaining
|
// avoid "proto: " prefix when chaining
|
||||||
for i := 0; i < len(x); i++ {
|
for i := 0; i < len(x); i++ {
|
||||||
switch e := x[i].(type) {
|
switch e := x[i].(type) {
|
||||||
|
|
|
||||||
|
|
@ -383,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor {
|
||||||
}
|
}
|
||||||
return fd.L1.Message
|
return fd.L1.Message
|
||||||
}
|
}
|
||||||
|
func (fd *Field) IsMapEntry() bool {
|
||||||
|
parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor)
|
||||||
|
return ok && parent.IsMapEntry()
|
||||||
|
}
|
||||||
func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
|
func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
|
||||||
func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}
|
func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor
|
||||||
}
|
}
|
||||||
|
|
||||||
var nameBuilderPool = sync.Pool{
|
var nameBuilderPool = sync.Pool{
|
||||||
New: func() interface{} { return new(strs.Builder) },
|
New: func() any { return new(strs.Builder) },
|
||||||
}
|
}
|
||||||
|
|
||||||
func getBuilder() *strs.Builder {
|
func getBuilder() *strs.Builder {
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,11 @@ func (file *File) resolveMessages() {
|
||||||
case protoreflect.MessageKind, protoreflect.GroupKind:
|
case protoreflect.MessageKind, protoreflect.GroupKind:
|
||||||
fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)
|
fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)
|
||||||
depIdx++
|
depIdx++
|
||||||
|
if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) {
|
||||||
|
// A map field might inherit delimited encoding from a file-wide default feature.
|
||||||
|
// But maps never actually use delimited encoding. (At least for now...)
|
||||||
|
fd.L1.Kind = protoreflect.MessageKind
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default is resolved here since it depends on Enum being resolved.
|
// Default is resolved here since it depends on Enum being resolved.
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ type Builder struct {
|
||||||
// and for input and output messages referenced by service methods.
|
// and for input and output messages referenced by service methods.
|
||||||
// Dependencies must come after declarations, but the ordering of
|
// Dependencies must come after declarations, but the ordering of
|
||||||
// dependencies themselves is unspecified.
|
// dependencies themselves is unspecified.
|
||||||
GoTypes []interface{}
|
GoTypes []any
|
||||||
|
|
||||||
// DependencyIndexes is an ordered list of indexes into GoTypes for the
|
// DependencyIndexes is an ordered list of indexes into GoTypes for the
|
||||||
// dependencies of messages, extensions, or services.
|
// dependencies of messages, extensions, or services.
|
||||||
|
|
@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 {
|
||||||
|
|
||||||
type (
|
type (
|
||||||
resolverByIndex struct {
|
resolverByIndex struct {
|
||||||
goTypes []interface{}
|
goTypes []any
|
||||||
depIdxs depIdxs
|
depIdxs depIdxs
|
||||||
fileRegistry
|
fileRegistry
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -860,11 +860,13 @@ const (
|
||||||
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||||
EnumValueOptions_Features_field_name protoreflect.Name = "features"
|
EnumValueOptions_Features_field_name protoreflect.Name = "features"
|
||||||
EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
|
EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
|
||||||
|
EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support"
|
||||||
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||||
|
|
||||||
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
|
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
|
||||||
EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
|
EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
|
||||||
EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
|
EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
|
||||||
|
EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support"
|
||||||
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
|
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -873,6 +875,7 @@ const (
|
||||||
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
|
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
|
||||||
EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
|
EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
|
||||||
EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
|
EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
|
||||||
|
EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4
|
||||||
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ type Export struct{}
|
||||||
|
|
||||||
// NewError formats a string according to the format specifier and arguments and
|
// NewError formats a string according to the format specifier and arguments and
|
||||||
// returns an error that has a "proto" prefix.
|
// returns an error that has a "proto" prefix.
|
||||||
func (Export) NewError(f string, x ...interface{}) error {
|
func (Export) NewError(f string, x ...any) error {
|
||||||
return errors.New(f, x...)
|
return errors.New(f, x...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// enum is any enum type generated by protoc-gen-go
|
// enum is any enum type generated by protoc-gen-go
|
||||||
// and must be a named int32 type.
|
// and must be a named int32 type.
|
||||||
type enum = interface{}
|
type enum = any
|
||||||
|
|
||||||
// EnumOf returns the protoreflect.Enum interface over e.
|
// EnumOf returns the protoreflect.Enum interface over e.
|
||||||
// It returns nil if e is nil.
|
// It returns nil if e is nil.
|
||||||
|
|
@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu
|
||||||
|
|
||||||
// message is any message type generated by protoc-gen-go
|
// message is any message type generated by protoc-gen-go
|
||||||
// and must be a pointer to a named struct type.
|
// and must be a pointer to a named struct type.
|
||||||
type message = interface{}
|
type message = any
|
||||||
|
|
||||||
// legacyMessageWrapper wraps a v2 message as a v1 message.
|
// legacyMessageWrapper wraps a v2 message as a v1 message.
|
||||||
type legacyMessageWrapper struct{ m protoreflect.ProtoMessage }
|
type legacyMessageWrapper struct{ m protoreflect.ProtoMessage }
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error {
|
||||||
}
|
}
|
||||||
for _, x := range *ext {
|
for _, x := range *ext {
|
||||||
ei := getExtensionFieldInfo(x.Type())
|
ei := getExtensionFieldInfo(x.Type())
|
||||||
if ei.funcs.isInit == nil {
|
if ei.funcs.isInit == nil || x.isUnexpandedLazy() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
v := x.Value()
|
v := x.Value()
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// isUnexpandedLazy returns true if the ExensionField is lazy and not
|
||||||
|
// yet expanded, which means it's present and already checked for
|
||||||
|
// initialized required fields.
|
||||||
|
func (f *ExtensionField) isUnexpandedLazy() bool {
|
||||||
|
return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded.
|
||||||
|
//
|
||||||
|
// The returned buffer has to be kept over whatever operation we're planning,
|
||||||
|
// as re-retrieving it will fail after the message is lazily decoded.
|
||||||
|
func (f *ExtensionField) lazyBuffer() []byte {
|
||||||
|
// This function might be in the critical path, so check the atomic without
|
||||||
|
// taking a look first, then only take the lock if needed.
|
||||||
|
if !f.isUnexpandedLazy() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
f.lazy.mu.Lock()
|
||||||
|
defer f.lazy.mu.Unlock()
|
||||||
|
return f.lazy.b
|
||||||
|
}
|
||||||
|
|
||||||
func (f *ExtensionField) lazyInit() {
|
func (f *ExtensionField) lazyInit() {
|
||||||
f.lazy.mu.Lock()
|
f.lazy.mu.Lock()
|
||||||
defer f.lazy.mu.Unlock()
|
defer f.lazy.mu.Unlock()
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int)
|
||||||
}
|
}
|
||||||
num, _ := protowire.DecodeTag(xi.wiretag)
|
num, _ := protowire.DecodeTag(xi.wiretag)
|
||||||
size += messageset.SizeField(num)
|
size += messageset.SizeField(num)
|
||||||
|
if fullyLazyExtensions(opts) {
|
||||||
|
// Don't expand the extension, instead use the buffer to calculate size
|
||||||
|
if lb := x.lazyBuffer(); lb != nil {
|
||||||
|
// We got hold of the buffer, so it's still lazy.
|
||||||
|
// Don't count the tag size in the extension buffer, it's already added.
|
||||||
|
size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts)
|
size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma
|
||||||
xi := getExtensionFieldInfo(x.Type())
|
xi := getExtensionFieldInfo(x.Type())
|
||||||
num, _ := protowire.DecodeTag(xi.wiretag)
|
num, _ := protowire.DecodeTag(xi.wiretag)
|
||||||
b = messageset.AppendFieldStart(b, num)
|
b = messageset.AppendFieldStart(b, num)
|
||||||
|
|
||||||
|
if fullyLazyExtensions(opts) {
|
||||||
|
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||||
|
if lb := x.lazyBuffer(); lb != nil {
|
||||||
|
// The tag inside the lazy buffer is a different tag (the extension
|
||||||
|
// number), but what we need here is the tag for FieldMessage:
|
||||||
|
b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType))
|
||||||
|
b = append(b, lb[xi.tagsize:]...)
|
||||||
|
b = messageset.AppendFieldEnd(b)
|
||||||
|
return b, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts)
|
b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return b, err
|
return b, err
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import (
|
||||||
// unwrapper unwraps the value to the underlying value.
|
// unwrapper unwraps the value to the underlying value.
|
||||||
// This is implemented by List and Map.
|
// This is implemented by List and Map.
|
||||||
type unwrapper interface {
|
type unwrapper interface {
|
||||||
protoUnwrap() interface{}
|
protoUnwrap() any
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.
|
// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value {
|
||||||
func (ls *listReflect) IsValid() bool {
|
func (ls *listReflect) IsValid() bool {
|
||||||
return !ls.v.IsNil()
|
return !ls.v.IsNil()
|
||||||
}
|
}
|
||||||
func (ls *listReflect) protoUnwrap() interface{} {
|
func (ls *listReflect) protoUnwrap() any {
|
||||||
return ls.v.Interface()
|
return ls.v.Interface()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value {
|
||||||
func (ms *mapReflect) IsValid() bool {
|
func (ms *mapReflect) IsValid() bool {
|
||||||
return !ms.v.IsNil()
|
return !ms.v.IsNil()
|
||||||
}
|
}
|
||||||
func (ms *mapReflect) protoUnwrap() interface{} {
|
func (ms *mapReflect) protoUnwrap() any {
|
||||||
return ms.v.Interface()
|
return ms.v.Interface()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() {
|
if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() {
|
||||||
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 {
|
// The size cache contains the size + 1, to allow the
|
||||||
return int(size)
|
// zero value to be invalid, while also allowing for a
|
||||||
|
// 0 size to be cached.
|
||||||
|
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 {
|
||||||
|
return int(size - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mi.sizePointerSlow(p, opts)
|
return mi.sizePointerSlow(p, opts)
|
||||||
|
|
@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
|
||||||
if flags.ProtoLegacy && mi.isMessageSet {
|
if flags.ProtoLegacy && mi.isMessageSet {
|
||||||
size = sizeMessageSet(mi, p, opts)
|
size = sizeMessageSet(mi, p, opts)
|
||||||
if mi.sizecacheOffset.IsValid() {
|
if mi.sizecacheOffset.IsValid() {
|
||||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size))
|
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
|
||||||
}
|
}
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if mi.sizecacheOffset.IsValid() {
|
if mi.sizecacheOffset.IsValid() {
|
||||||
if size > math.MaxInt32 {
|
if size > (math.MaxInt32 - 1) {
|
||||||
// The size is too large for the int32 sizecache field.
|
// The size is too large for the int32 sizecache field.
|
||||||
// We will need to recompute the size when encoding;
|
// We will need to recompute the size when encoding;
|
||||||
// unfortunately expensive, but better than invalid output.
|
// unfortunately expensive, but better than invalid output.
|
||||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1)
|
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0)
|
||||||
} else {
|
} else {
|
||||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size))
|
// The size cache contains the size + 1, to allow the
|
||||||
|
// zero value to be invalid, while also allowing for a
|
||||||
|
// 0 size to be cached.
|
||||||
|
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return size
|
return size
|
||||||
|
|
@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt
|
||||||
return b, nil
|
return b, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal.
|
||||||
|
func fullyLazyExtensions(opts marshalOptions) bool {
|
||||||
|
// When deterministic marshaling is requested, force an unmarshal for lazy
|
||||||
|
// extensions to produce a deterministic result, instead of passing through
|
||||||
|
// bytes lazily that may or may not match what Go Protobuf would produce.
|
||||||
|
return opts.flags&piface.MarshalDeterministic == 0
|
||||||
|
}
|
||||||
|
|
||||||
func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) {
|
func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) {
|
||||||
if ext == nil {
|
if ext == nil {
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha
|
||||||
if xi.funcs.size == nil {
|
if xi.funcs.size == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if fullyLazyExtensions(opts) {
|
||||||
|
// Don't expand the extension, instead use the buffer to calculate size
|
||||||
|
if lb := x.lazyBuffer(); lb != nil {
|
||||||
|
// We got hold of the buffer, so it's still lazy.
|
||||||
|
n += len(lb)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
n += xi.funcs.size(x.Value(), xi.tagsize, opts)
|
n += xi.funcs.size(x.Value(), xi.tagsize, opts)
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
|
|
@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
|
||||||
var err error
|
var err error
|
||||||
for _, x := range *ext {
|
for _, x := range *ext {
|
||||||
xi := getExtensionFieldInfo(x.Type())
|
xi := getExtensionFieldInfo(x.Type())
|
||||||
|
if fullyLazyExtensions(opts) {
|
||||||
|
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||||
|
if lb := x.lazyBuffer(); lb != nil {
|
||||||
|
b = append(b, lb...)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
||||||
}
|
}
|
||||||
return b, err
|
return b, err
|
||||||
|
|
@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
|
||||||
for _, k := range keys {
|
for _, k := range keys {
|
||||||
x := (*ext)[int32(k)]
|
x := (*ext)[int32(k)]
|
||||||
xi := getExtensionFieldInfo(x.Type())
|
xi := getExtensionFieldInfo(x.Type())
|
||||||
|
if fullyLazyExtensions(opts) {
|
||||||
|
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||||
|
if lb := x.lazyBuffer(); lb != nil {
|
||||||
|
b = append(b, lb...)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return b, err
|
return b, err
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ type ExtensionInfo struct {
|
||||||
// type returned by InterfaceOf may not be identical.
|
// type returned by InterfaceOf may not be identical.
|
||||||
//
|
//
|
||||||
// Deprecated: Use InterfaceOf(xt.Zero()) instead.
|
// Deprecated: Use InterfaceOf(xt.Zero()) instead.
|
||||||
ExtensionType interface{}
|
ExtensionType any
|
||||||
|
|
||||||
// Field is the field number of the extension.
|
// Field is the field number of the extension.
|
||||||
//
|
//
|
||||||
|
|
@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value {
|
||||||
func (xi *ExtensionInfo) Zero() protoreflect.Value {
|
func (xi *ExtensionInfo) Zero() protoreflect.Value {
|
||||||
return xi.lazyInit().Zero()
|
return xi.lazyInit().Zero()
|
||||||
}
|
}
|
||||||
func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value {
|
func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value {
|
||||||
return xi.lazyInit().PBValueOf(reflect.ValueOf(v))
|
return xi.lazyInit().PBValueOf(reflect.ValueOf(v))
|
||||||
}
|
}
|
||||||
func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} {
|
func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any {
|
||||||
return xi.lazyInit().GoValueOf(v).Interface()
|
return xi.lazyInit().GoValueOf(v).Interface()
|
||||||
}
|
}
|
||||||
func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {
|
func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {
|
||||||
return xi.lazyInit().IsValidPB(v)
|
return xi.lazyInit().IsValidPB(v)
|
||||||
}
|
}
|
||||||
func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool {
|
func (xi *ExtensionInfo) IsValidInterface(v any) bool {
|
||||||
return xi.lazyInit().IsValidGo(reflect.ValueOf(v))
|
return xi.lazyInit().IsValidGo(reflect.ValueOf(v))
|
||||||
}
|
}
|
||||||
func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {
|
func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber {
|
||||||
func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {
|
func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
func (e *legacyEnumWrapper) protoUnwrap() interface{} {
|
func (e *legacyEnumWrapper) protoUnwrap() any {
|
||||||
v := reflect.New(e.goTyp).Elem()
|
v := reflect.New(e.goTyp).Elem()
|
||||||
v.SetInt(int64(e.num))
|
v.SetInt(int64(e.num))
|
||||||
return v.Interface()
|
return v.Interface()
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName
|
||||||
}
|
}
|
||||||
for _, fn := range methods {
|
for _, fn := range methods {
|
||||||
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
||||||
if vs, ok := v.Interface().([]interface{}); ok {
|
if vs, ok := v.Interface().([]any); ok {
|
||||||
for _, v := range vs {
|
for _, v := range vs {
|
||||||
oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
|
oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
|
||||||
}
|
}
|
||||||
|
|
@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool {
|
||||||
func (m aberrantMessage) ProtoMethods() *protoiface.Methods {
|
func (m aberrantMessage) ProtoMethods() *protoiface.Methods {
|
||||||
return aberrantProtoMethods
|
return aberrantProtoMethods
|
||||||
}
|
}
|
||||||
func (m aberrantMessage) protoUnwrap() interface{} {
|
func (m aberrantMessage) protoUnwrap() any {
|
||||||
return m.v.Interface()
|
return m.v.Interface()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ type MessageInfo struct {
|
||||||
Exporter exporter
|
Exporter exporter
|
||||||
|
|
||||||
// OneofWrappers is list of pointers to oneof wrapper struct types.
|
// OneofWrappers is list of pointers to oneof wrapper struct types.
|
||||||
OneofWrappers []interface{}
|
OneofWrappers []any
|
||||||
|
|
||||||
initMu sync.Mutex // protects all unexported fields
|
initMu sync.Mutex // protects all unexported fields
|
||||||
initDone uint32
|
initDone uint32
|
||||||
|
|
@ -47,7 +47,7 @@ type MessageInfo struct {
|
||||||
// exporter is a function that returns a reference to the ith field of v,
|
// exporter is a function that returns a reference to the ith field of v,
|
||||||
// where v is a pointer to a struct. It returns nil if it does not support
|
// where v is a pointer to a struct. It returns nil if it does not support
|
||||||
// exporting the requested field (e.g., already exported).
|
// exporting the requested field (e.g., already exported).
|
||||||
type exporter func(v interface{}, i int) interface{}
|
type exporter func(v any, i int) any
|
||||||
|
|
||||||
// getMessageInfo returns the MessageInfo for any message type that
|
// getMessageInfo returns the MessageInfo for any message type that
|
||||||
// is generated by our implementation of protoc-gen-go (for v2 and on).
|
// is generated by our implementation of protoc-gen-go (for v2 and on).
|
||||||
|
|
@ -201,7 +201,7 @@ fieldLoop:
|
||||||
}
|
}
|
||||||
for _, fn := range methods {
|
for _, fn := range methods {
|
||||||
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
||||||
if vs, ok := v.Interface().([]interface{}); ok {
|
if vs, ok := v.Interface().([]any); ok {
|
||||||
oneofWrappers = vs
|
oneofWrappers = vs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType {
|
||||||
|
|
||||||
type mapEntryType struct {
|
type mapEntryType struct {
|
||||||
desc protoreflect.MessageDescriptor
|
desc protoreflect.MessageDescriptor
|
||||||
valType interface{} // zero value of enum or message type
|
valType any // zero value of enum or message type
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mt mapEntryType) New() protoreflect.Message {
|
func (mt mapEntryType) New() protoreflect.Message {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ type reflectMessageInfo struct {
|
||||||
// fieldTypes contains the zero value of an enum or message field.
|
// fieldTypes contains the zero value of an enum or message field.
|
||||||
// For lists, it contains the element type.
|
// For lists, it contains the element type.
|
||||||
// For maps, it contains the entry value type.
|
// For maps, it contains the entry value type.
|
||||||
fieldTypes map[protoreflect.FieldNumber]interface{}
|
fieldTypes map[protoreflect.FieldNumber]any
|
||||||
|
|
||||||
// denseFields is a subset of fields where:
|
// denseFields is a subset of fields where:
|
||||||
// 0 < fieldDesc.Number() < len(denseFields)
|
// 0 < fieldDesc.Number() < len(denseFields)
|
||||||
|
|
@ -28,7 +28,7 @@ type reflectMessageInfo struct {
|
||||||
denseFields []*fieldInfo
|
denseFields []*fieldInfo
|
||||||
|
|
||||||
// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.
|
// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.
|
||||||
rangeInfos []interface{} // either *fieldInfo or *oneofInfo
|
rangeInfos []any // either *fieldInfo or *oneofInfo
|
||||||
|
|
||||||
getUnknown func(pointer) protoreflect.RawFields
|
getUnknown func(pointer) protoreflect.RawFields
|
||||||
setUnknown func(pointer, protoreflect.RawFields)
|
setUnknown func(pointer, protoreflect.RawFields)
|
||||||
|
|
@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
|
||||||
}
|
}
|
||||||
if ft != nil {
|
if ft != nil {
|
||||||
if mi.fieldTypes == nil {
|
if mi.fieldTypes == nil {
|
||||||
mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{})
|
mi.fieldTypes = make(map[protoreflect.FieldNumber]any)
|
||||||
}
|
}
|
||||||
mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()
|
mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()
|
||||||
}
|
}
|
||||||
|
|
@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) {
|
||||||
if !ok {
|
if !ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if x.isUnexpandedLazy() {
|
||||||
|
// Avoid calling x.Value(), which triggers a lazy unmarshal.
|
||||||
|
return true
|
||||||
|
}
|
||||||
switch {
|
switch {
|
||||||
case xd.IsList():
|
case xd.IsList():
|
||||||
return x.Value().List().Len() > 0
|
return x.Value().List().Len() > 0
|
||||||
|
|
@ -389,7 +393,7 @@ var (
|
||||||
// MessageOf returns a reflective view over a message. The input must be a
|
// MessageOf returns a reflective view over a message. The input must be a
|
||||||
// pointer to a named Go struct. If the provided type has a ProtoReflect method,
|
// pointer to a named Go struct. If the provided type has a ProtoReflect method,
|
||||||
// it must be implemented by calling this method.
|
// it must be implemented by calling this method.
|
||||||
func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message {
|
func (mi *MessageInfo) MessageOf(m any) protoreflect.Message {
|
||||||
if reflect.TypeOf(m) != mi.GoReflectType {
|
if reflect.TypeOf(m) != mi.GoReflectType {
|
||||||
panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType))
|
panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType))
|
||||||
}
|
}
|
||||||
|
|
@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() {
|
||||||
func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {
|
func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {
|
||||||
return (*messageReflectWrapper)(m)
|
return (*messageReflectWrapper)(m)
|
||||||
}
|
}
|
||||||
func (m *messageIfaceWrapper) protoUnwrap() interface{} {
|
func (m *messageIfaceWrapper) protoUnwrap() any {
|
||||||
return m.p.AsIfaceOf(m.mi.GoReflectType.Elem())
|
return m.p.AsIfaceOf(m.mi.GoReflectType.Elem())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message {
|
||||||
func (m *messageState) Interface() protoreflect.ProtoMessage {
|
func (m *messageState) Interface() protoreflect.ProtoMessage {
|
||||||
return m.protoUnwrap().(protoreflect.ProtoMessage)
|
return m.protoUnwrap().(protoreflect.ProtoMessage)
|
||||||
}
|
}
|
||||||
func (m *messageState) protoUnwrap() interface{} {
|
func (m *messageState) protoUnwrap() any {
|
||||||
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
||||||
}
|
}
|
||||||
func (m *messageState) ProtoMethods() *protoiface.Methods {
|
func (m *messageState) ProtoMethods() *protoiface.Methods {
|
||||||
|
|
@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage {
|
||||||
}
|
}
|
||||||
return (*messageIfaceWrapper)(m)
|
return (*messageIfaceWrapper)(m)
|
||||||
}
|
}
|
||||||
func (m *messageReflectWrapper) protoUnwrap() interface{} {
|
func (m *messageReflectWrapper) protoUnwrap() any {
|
||||||
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
||||||
}
|
}
|
||||||
func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {
|
func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import (
|
||||||
const UnsafeEnabled = false
|
const UnsafeEnabled = false
|
||||||
|
|
||||||
// Pointer is an opaque pointer type.
|
// Pointer is an opaque pointer type.
|
||||||
type Pointer interface{}
|
type Pointer any
|
||||||
|
|
||||||
// offset represents the offset to a struct field, accessible from a pointer.
|
// offset represents the offset to a struct field, accessible from a pointer.
|
||||||
// The offset is the field index into a struct.
|
// The offset is the field index into a struct.
|
||||||
|
|
@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pointerOfIface returns the pointer portion of an interface.
|
// pointerOfIface returns the pointer portion of an interface.
|
||||||
func pointerOfIface(v interface{}) pointer {
|
func pointerOfIface(v any) pointer {
|
||||||
return pointer{v: reflect.ValueOf(v)}
|
return pointer{v: reflect.ValueOf(v)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||||
|
|
||||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||||
// It is equivalent to p.AsValueOf(t).Interface()
|
// It is equivalent to p.AsValueOf(t).Interface()
|
||||||
func (p pointer) AsIfaceOf(t reflect.Type) interface{} {
|
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||||
return p.AsValueOf(t).Interface()
|
return p.AsValueOf(t).Interface()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pointerOfIface returns the pointer portion of an interface.
|
// pointerOfIface returns the pointer portion of an interface.
|
||||||
func pointerOfIface(v interface{}) pointer {
|
func pointerOfIface(v any) pointer {
|
||||||
type ifaceHeader struct {
|
type ifaceHeader struct {
|
||||||
Type unsafe.Pointer
|
Type unsafe.Pointer
|
||||||
Data unsafe.Pointer
|
Data unsafe.Pointer
|
||||||
|
|
@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||||
|
|
||||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||||
// It is equivalent to p.AsValueOf(t).Interface()
|
// It is equivalent to p.AsValueOf(t).Interface()
|
||||||
func (p pointer) AsIfaceOf(t reflect.Type) interface{} {
|
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||||
// TODO: Use tricky unsafe magic to directly create ifaceHeader.
|
// TODO: Use tricky unsafe magic to directly create ifaceHeader.
|
||||||
return p.AsValueOf(t).Interface()
|
return p.AsValueOf(t).Interface()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ type messageField struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var messageFieldPool = sync.Pool{
|
var messageFieldPool = sync.Pool{
|
||||||
New: func() interface{} { return new([]messageField) },
|
New: func() any { return new([]messageField) },
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
@ -69,7 +69,7 @@ type mapEntry struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var mapEntryPool = sync.Pool{
|
var mapEntryPool = sync.Pool{
|
||||||
New: func() interface{} { return new([]mapEntry) },
|
New: func() any { return new([]mapEntry) },
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ import (
|
||||||
const (
|
const (
|
||||||
Major = 1
|
Major = 1
|
||||||
Minor = 34
|
Minor = 34
|
||||||
Patch = 1
|
Patch = 2
|
||||||
PreRelease = ""
|
PreRelease = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) {
|
||||||
// If the field is unpopulated, it returns the default value for
|
// If the field is unpopulated, it returns the default value for
|
||||||
// scalars and an immutable, empty value for lists or messages.
|
// scalars and an immutable, empty value for lists or messages.
|
||||||
// It panics if xt does not extend m.
|
// It panics if xt does not extend m.
|
||||||
func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} {
|
func GetExtension(m Message, xt protoreflect.ExtensionType) any {
|
||||||
// Treat nil message interface as an empty message; return the default.
|
// Treat nil message interface as an empty message; return the default.
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return xt.InterfaceOf(xt.Zero())
|
return xt.InterfaceOf(xt.Zero())
|
||||||
|
|
@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} {
|
||||||
// SetExtension stores the value of an extension field.
|
// SetExtension stores the value of an extension field.
|
||||||
// It panics if m is invalid, xt does not extend m, or if type of v
|
// It panics if m is invalid, xt does not extend m, or if type of v
|
||||||
// is invalid for the specified extension field.
|
// is invalid for the specified extension field.
|
||||||
func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) {
|
func SetExtension(m Message, xt protoreflect.ExtensionType, v any) {
|
||||||
xd := xt.TypeDescriptor()
|
xd := xt.TypeDescriptor()
|
||||||
pv := xt.ValueOf(v)
|
pv := xt.ValueOf(v)
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) {
|
||||||
// It returns immediately if f returns false.
|
// It returns immediately if f returns false.
|
||||||
// While iterating, mutating operations may only be performed
|
// While iterating, mutating operations may only be performed
|
||||||
// on the current extension field.
|
// on the current extension field.
|
||||||
func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) {
|
func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) {
|
||||||
// Treat nil message interface as an empty message; nothing to range over.
|
// Treat nil message interface as an empty message; nothing to range over.
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc
|
||||||
if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil {
|
if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil {
|
||||||
return errors.New("message field %q cannot resolve type: %v", f.FullName(), err)
|
return errors.New("message field %q cannot resolve type: %v", f.FullName(), err)
|
||||||
}
|
}
|
||||||
|
if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) {
|
||||||
|
// A map field might inherit delimited encoding from a file-wide default feature.
|
||||||
|
// But maps never actually use delimited encoding. (At least for now...)
|
||||||
|
f.L1.Kind = protoreflect.MessageKind
|
||||||
|
}
|
||||||
if fd.DefaultValue != nil {
|
if fd.DefaultValue != nil {
|
||||||
v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable)
|
v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -116,18 +116,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds
|
||||||
if m.ExtensionRanges().Len() > 0 {
|
if m.ExtensionRanges().Len() > 0 {
|
||||||
return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName())
|
return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName())
|
||||||
}
|
}
|
||||||
// Verify that field names in proto3 do not conflict if lowercased
|
|
||||||
// with all underscores removed.
|
|
||||||
// See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847
|
|
||||||
names := map[string]protoreflect.FieldDescriptor{}
|
|
||||||
for i := 0; i < m.Fields().Len(); i++ {
|
|
||||||
f1 := m.Fields().Get(i)
|
|
||||||
s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1)
|
|
||||||
if f2, ok := names[s]; ok {
|
|
||||||
return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name())
|
|
||||||
}
|
|
||||||
names[s] = f1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for j, fd := range md.GetField() {
|
for j, fd := range md.GetField() {
|
||||||
|
|
|
||||||
|
|
@ -485,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
|
||||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||||
case 3:
|
case 3:
|
||||||
b = p.appendSingularField(b, "debug_redact", nil)
|
b = p.appendSingularField(b, "debug_redact", nil)
|
||||||
|
case 4:
|
||||||
|
b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport)
|
||||||
case 999:
|
case 999:
|
||||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ type ExtensionType interface {
|
||||||
//
|
//
|
||||||
// ValueOf is more extensive than protoreflect.ValueOf for a given field's
|
// ValueOf is more extensive than protoreflect.ValueOf for a given field's
|
||||||
// value as it has more type information available.
|
// value as it has more type information available.
|
||||||
ValueOf(interface{}) Value
|
ValueOf(any) Value
|
||||||
|
|
||||||
// InterfaceOf completely unwraps the Value to the underlying Go type.
|
// InterfaceOf completely unwraps the Value to the underlying Go type.
|
||||||
// InterfaceOf panics if the input is nil or does not represent the
|
// InterfaceOf panics if the input is nil or does not represent the
|
||||||
|
|
@ -519,13 +519,13 @@ type ExtensionType interface {
|
||||||
//
|
//
|
||||||
// InterfaceOf is able to unwrap the Value further than Value.Interface
|
// InterfaceOf is able to unwrap the Value further than Value.Interface
|
||||||
// as it has more type information available.
|
// as it has more type information available.
|
||||||
InterfaceOf(Value) interface{}
|
InterfaceOf(Value) any
|
||||||
|
|
||||||
// IsValidValue reports whether the Value is valid to assign to the field.
|
// IsValidValue reports whether the Value is valid to assign to the field.
|
||||||
IsValidValue(Value) bool
|
IsValidValue(Value) bool
|
||||||
|
|
||||||
// IsValidInterface reports whether the input is valid to assign to the field.
|
// IsValidInterface reports whether the input is valid to assign to the field.
|
||||||
IsValidInterface(interface{}) bool
|
IsValidInterface(any) bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnumDescriptor describes an enum and
|
// EnumDescriptor describes an enum and
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ const (
|
||||||
type value struct {
|
type value struct {
|
||||||
pragma.DoNotCompare // 0B
|
pragma.DoNotCompare // 0B
|
||||||
|
|
||||||
typ valueType // 8B
|
typ valueType // 8B
|
||||||
num uint64 // 8B
|
num uint64 // 8B
|
||||||
str string // 16B
|
str string // 16B
|
||||||
bin []byte // 24B
|
bin []byte // 24B
|
||||||
iface interface{} // 16B
|
iface any // 16B
|
||||||
}
|
}
|
||||||
|
|
||||||
func valueOfString(v string) Value {
|
func valueOfString(v string) Value {
|
||||||
|
|
@ -45,7 +45,7 @@ func valueOfString(v string) Value {
|
||||||
func valueOfBytes(v []byte) Value {
|
func valueOfBytes(v []byte) Value {
|
||||||
return Value{typ: bytesType, bin: v}
|
return Value{typ: bytesType, bin: v}
|
||||||
}
|
}
|
||||||
func valueOfIface(v interface{}) Value {
|
func valueOfIface(v any) Value {
|
||||||
return Value{typ: ifaceType, iface: v}
|
return Value{typ: ifaceType, iface: v}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,6 +55,6 @@ func (v Value) getString() string {
|
||||||
func (v Value) getBytes() []byte {
|
func (v Value) getBytes() []byte {
|
||||||
return v.bin
|
return v.bin
|
||||||
}
|
}
|
||||||
func (v Value) getIface() interface{} {
|
func (v Value) getIface() any {
|
||||||
return v.iface
|
return v.iface
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ import (
|
||||||
// composite Value. Modifying an empty, read-only value panics.
|
// composite Value. Modifying an empty, read-only value panics.
|
||||||
type Value value
|
type Value value
|
||||||
|
|
||||||
// The protoreflect API uses a custom Value union type instead of interface{}
|
// The protoreflect API uses a custom Value union type instead of any
|
||||||
// to keep the future open for performance optimizations. Using an interface{}
|
// to keep the future open for performance optimizations. Using an any
|
||||||
// always incurs an allocation for primitives (e.g., int64) since it needs to
|
// always incurs an allocation for primitives (e.g., int64) since it needs to
|
||||||
// be boxed on the heap (as interfaces can only contain pointers natively).
|
// be boxed on the heap (as interfaces can only contain pointers natively).
|
||||||
// Instead, we represent the Value union as a flat struct that internally keeps
|
// Instead, we represent the Value union as a flat struct that internally keeps
|
||||||
|
|
@ -85,7 +85,7 @@ type Value value
|
||||||
// ValueOf returns a Value initialized with the concrete value stored in v.
|
// ValueOf returns a Value initialized with the concrete value stored in v.
|
||||||
// This panics if the type does not match one of the allowed types in the
|
// This panics if the type does not match one of the allowed types in the
|
||||||
// Value union.
|
// Value union.
|
||||||
func ValueOf(v interface{}) Value {
|
func ValueOf(v any) Value {
|
||||||
switch v := v.(type) {
|
switch v := v.(type) {
|
||||||
case nil:
|
case nil:
|
||||||
return Value{}
|
return Value{}
|
||||||
|
|
@ -192,10 +192,10 @@ func (v Value) IsValid() bool {
|
||||||
return v.typ != nilType
|
return v.typ != nilType
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interface returns v as an interface{}.
|
// Interface returns v as an any.
|
||||||
//
|
//
|
||||||
// Invariant: v == ValueOf(v).Interface()
|
// Invariant: v == ValueOf(v).Interface()
|
||||||
func (v Value) Interface() interface{} {
|
func (v Value) Interface() any {
|
||||||
switch v.typ {
|
switch v.typ {
|
||||||
case nilType:
|
case nilType:
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool {
|
||||||
return Value(k).IsValid()
|
return Value(k).IsValid()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interface returns k as an interface{}.
|
// Interface returns k as an any.
|
||||||
func (k MapKey) Interface() interface{} {
|
func (k MapKey) Interface() any {
|
||||||
return Value(k).Interface()
|
return Value(k).Interface()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ var (
|
||||||
|
|
||||||
// typeOf returns a pointer to the Go type information.
|
// typeOf returns a pointer to the Go type information.
|
||||||
// The pointer is comparable and equal if and only if the types are identical.
|
// The pointer is comparable and equal if and only if the types are identical.
|
||||||
func typeOf(t interface{}) unsafe.Pointer {
|
func typeOf(t any) unsafe.Pointer {
|
||||||
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value {
|
||||||
p := (*sliceHeader)(unsafe.Pointer(&v))
|
p := (*sliceHeader)(unsafe.Pointer(&v))
|
||||||
return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))}
|
return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))}
|
||||||
}
|
}
|
||||||
func valueOfIface(v interface{}) Value {
|
func valueOfIface(v any) Value {
|
||||||
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
||||||
return Value{typ: p.Type, ptr: p.Data}
|
return Value{typ: p.Type, ptr: p.Data}
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) {
|
||||||
*(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)}
|
*(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)}
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
func (v Value) getIface() (x interface{}) {
|
func (v Value) getIface() (x any) {
|
||||||
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
type (
|
type (
|
||||||
ifaceHeader struct {
|
ifaceHeader struct {
|
||||||
_ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
|
_ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
|
||||||
Type unsafe.Pointer
|
Type unsafe.Pointer
|
||||||
Data unsafe.Pointer
|
Data unsafe.Pointer
|
||||||
}
|
}
|
||||||
|
|
@ -37,7 +37,7 @@ var (
|
||||||
|
|
||||||
// typeOf returns a pointer to the Go type information.
|
// typeOf returns a pointer to the Go type information.
|
||||||
// The pointer is comparable and equal if and only if the types are identical.
|
// The pointer is comparable and equal if and only if the types are identical.
|
||||||
func typeOf(t interface{}) unsafe.Pointer {
|
func typeOf(t any) unsafe.Pointer {
|
||||||
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ func valueOfString(v string) Value {
|
||||||
func valueOfBytes(v []byte) Value {
|
func valueOfBytes(v []byte) Value {
|
||||||
return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}
|
return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}
|
||||||
}
|
}
|
||||||
func valueOfIface(v interface{}) Value {
|
func valueOfIface(v any) Value {
|
||||||
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
||||||
return Value{typ: p.Type, ptr: p.Data}
|
return Value{typ: p.Type, ptr: p.Data}
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ func (v Value) getString() string {
|
||||||
func (v Value) getBytes() []byte {
|
func (v Value) getBytes() []byte {
|
||||||
return unsafe.Slice((*byte)(v.ptr), v.num)
|
return unsafe.Slice((*byte)(v.ptr), v.num)
|
||||||
}
|
}
|
||||||
func (v Value) getIface() (x interface{}) {
|
func (v Value) getIface() (x any) {
|
||||||
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ type Files struct {
|
||||||
// multiple files. Only top-level declarations are registered.
|
// multiple files. Only top-level declarations are registered.
|
||||||
// Note that enum values are in the top-level since that are in the same
|
// Note that enum values are in the top-level since that are in the same
|
||||||
// scope as the parent enum.
|
// scope as the parent enum.
|
||||||
descsByName map[protoreflect.FullName]interface{}
|
descsByName map[protoreflect.FullName]any
|
||||||
filesByPath map[string][]protoreflect.FileDescriptor
|
filesByPath map[string][]protoreflect.FileDescriptor
|
||||||
numFiles int
|
numFiles int
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
|
||||||
defer globalMutex.Unlock()
|
defer globalMutex.Unlock()
|
||||||
}
|
}
|
||||||
if r.descsByName == nil {
|
if r.descsByName == nil {
|
||||||
r.descsByName = map[protoreflect.FullName]interface{}{
|
r.descsByName = map[protoreflect.FullName]any{
|
||||||
"": &packageDescriptor{},
|
"": &packageDescriptor{},
|
||||||
}
|
}
|
||||||
r.filesByPath = make(map[string][]protoreflect.FileDescriptor)
|
r.filesByPath = make(map[string][]protoreflect.FileDescriptor)
|
||||||
|
|
@ -485,7 +485,7 @@ type Types struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
typesByName map[protoreflect.FullName]interface{}
|
typesByName map[protoreflect.FullName]any
|
||||||
extensionsByMessage map[protoreflect.FullName]extensionsByNumber
|
extensionsByMessage map[protoreflect.FullName]extensionsByNumber
|
||||||
extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType
|
extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType
|
||||||
)
|
)
|
||||||
|
|
@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error {
|
func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error {
|
||||||
name := desc.FullName()
|
name := desc.FullName()
|
||||||
prev := r.typesByName[name]
|
prev := r.typesByName[name]
|
||||||
if prev != nil {
|
if prev != nil {
|
||||||
|
|
@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func typeName(t interface{}) string {
|
func typeName(t any) string {
|
||||||
switch t.(type) {
|
switch t.(type) {
|
||||||
case protoreflect.EnumType:
|
case protoreflect.EnumType:
|
||||||
return "enum"
|
return "enum"
|
||||||
|
|
@ -854,7 +854,7 @@ func typeName(t interface{}) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func amendErrorWithCaller(err error, prev, curr interface{}) error {
|
func amendErrorWithCaller(err error, prev, curr any) error {
|
||||||
prevPkg := goPackage(prev)
|
prevPkg := goPackage(prev)
|
||||||
currPkg := goPackage(curr)
|
currPkg := goPackage(curr)
|
||||||
if prevPkg == "" || currPkg == "" || prevPkg == currPkg {
|
if prevPkg == "" || currPkg == "" || prevPkg == currPkg {
|
||||||
|
|
@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error {
|
||||||
return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg)
|
return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func goPackage(v interface{}) string {
|
func goPackage(v any) string {
|
||||||
switch d := v.(type) {
|
switch d := v.(type) {
|
||||||
case protoreflect.EnumType:
|
case protoreflect.EnumType:
|
||||||
v = d.Descriptor()
|
v = d.Descriptor()
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -90,27 +90,27 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{
|
||||||
0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72,
|
0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||||
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x0a, 0x47, 0x6f,
|
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f,
|
||||||
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67,
|
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67,
|
||||||
0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73,
|
0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73,
|
||||||
0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x7d, 0x88,
|
0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01,
|
||||||
0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0x84,
|
0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72,
|
||||||
0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0xb2, 0x01,
|
0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18,
|
||||||
0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x67,
|
0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65,
|
||||||
0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x53, 0x4f,
|
0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61,
|
||||||
0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
|
0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70,
|
||||||
0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20,
|
0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c,
|
||||||
0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74,
|
0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61,
|
||||||
0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65,
|
0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||||
0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f,
|
0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61,
|
||||||
0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f,
|
0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12,
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65,
|
0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20,
|
||||||
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52,
|
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75,
|
||||||
0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
|
0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||||
0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
|
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65,
|
||||||
0x65, 0x73, 0x70, 0x62,
|
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -126,7 +126,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_go_features_proto_goTypes = []interface{}{
|
var file_google_protobuf_go_features_proto_goTypes = []any{
|
||||||
(*GoFeatures)(nil), // 0: pb.GoFeatures
|
(*GoFeatures)(nil), // 0: pb.GoFeatures
|
||||||
(*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet
|
(*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ func file_google_protobuf_go_features_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*GoFeatures); i {
|
switch v := v.(*GoFeatures); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_any_proto_goTypes = []interface{}{
|
var file_google_protobuf_any_proto_goTypes = []any{
|
||||||
(*Any)(nil), // 0: google.protobuf.Any
|
(*Any)(nil), // 0: google.protobuf.Any
|
||||||
}
|
}
|
||||||
var file_google_protobuf_any_proto_depIdxs = []int32{
|
var file_google_protobuf_any_proto_depIdxs = []int32{
|
||||||
|
|
@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Any); i {
|
switch v := v.(*Any); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_duration_proto_goTypes = []interface{}{
|
var file_google_protobuf_duration_proto_goTypes = []any{
|
||||||
(*Duration)(nil), // 0: google.protobuf.Duration
|
(*Duration)(nil), // 0: google.protobuf.Duration
|
||||||
}
|
}
|
||||||
var file_google_protobuf_duration_proto_depIdxs = []int32{
|
var file_google_protobuf_duration_proto_depIdxs = []int32{
|
||||||
|
|
@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Duration); i {
|
switch v := v.(*Duration); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ func file_google_protobuf_empty_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_empty_proto_goTypes = []interface{}{
|
var file_google_protobuf_empty_proto_goTypes = []any{
|
||||||
(*Empty)(nil), // 0: google.protobuf.Empty
|
(*Empty)(nil), // 0: google.protobuf.Empty
|
||||||
}
|
}
|
||||||
var file_google_protobuf_empty_proto_depIdxs = []int32{
|
var file_google_protobuf_empty_proto_depIdxs = []int32{
|
||||||
|
|
@ -132,7 +132,7 @@ func file_google_protobuf_empty_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Empty); i {
|
switch v := v.(*Empty); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_field_mask_proto_goTypes = []interface{}{
|
var file_google_protobuf_field_mask_proto_goTypes = []any{
|
||||||
(*FieldMask)(nil), // 0: google.protobuf.FieldMask
|
(*FieldMask)(nil), // 0: google.protobuf.FieldMask
|
||||||
}
|
}
|
||||||
var file_google_protobuf_field_mask_proto_depIdxs = []int32{
|
var file_google_protobuf_field_mask_proto_depIdxs = []int32{
|
||||||
|
|
@ -554,7 +554,7 @@ func file_google_protobuf_field_mask_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*FieldMask); i {
|
switch v := v.(*FieldMask); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_google_protobuf_timestamp_proto_goTypes = []interface{}{
|
var file_google_protobuf_timestamp_proto_goTypes = []any{
|
||||||
(*Timestamp)(nil), // 0: google.protobuf.Timestamp
|
(*Timestamp)(nil), // 0: google.protobuf.Timestamp
|
||||||
}
|
}
|
||||||
var file_google_protobuf_timestamp_proto_depIdxs = []int32{
|
var file_google_protobuf_timestamp_proto_depIdxs = []int32{
|
||||||
|
|
@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||||
switch v := v.(*Timestamp); i {
|
switch v := v.(*Timestamp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# cloud.google.com/go v0.114.0
|
# cloud.google.com/go v0.115.0
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
cloud.google.com/go/internal
|
cloud.google.com/go/internal
|
||||||
cloud.google.com/go/internal/optional
|
cloud.google.com/go/internal/optional
|
||||||
|
|
@ -1184,7 +1184,7 @@ golang.org/x/text/unicode/norm
|
||||||
# golang.org/x/time v0.5.0
|
# golang.org/x/time v0.5.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/time/rate
|
golang.org/x/time/rate
|
||||||
# google.golang.org/api v0.183.0
|
# google.golang.org/api v0.185.0
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
google.golang.org/api/googleapi
|
google.golang.org/api/googleapi
|
||||||
google.golang.org/api/googleapi/transport
|
google.golang.org/api/googleapi/transport
|
||||||
|
|
@ -1202,16 +1202,16 @@ google.golang.org/api/transport
|
||||||
google.golang.org/api/transport/grpc
|
google.golang.org/api/transport/grpc
|
||||||
google.golang.org/api/transport/http
|
google.golang.org/api/transport/http
|
||||||
google.golang.org/api/transport/http/internal/propagation
|
google.golang.org/api/transport/http/internal/propagation
|
||||||
# google.golang.org/genproto v0.0.0-20240528184218-531527333157
|
# google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
google.golang.org/genproto/googleapis/type/date
|
google.golang.org/genproto/googleapis/type/date
|
||||||
google.golang.org/genproto/googleapis/type/expr
|
google.golang.org/genproto/googleapis/type/expr
|
||||||
google.golang.org/genproto/protobuf/field_mask
|
google.golang.org/genproto/protobuf/field_mask
|
||||||
# google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117
|
# google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
google.golang.org/genproto/googleapis/api
|
google.golang.org/genproto/googleapis/api
|
||||||
google.golang.org/genproto/googleapis/api/annotations
|
google.golang.org/genproto/googleapis/api/annotations
|
||||||
# google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157
|
# google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
google.golang.org/genproto/googleapis/rpc/code
|
google.golang.org/genproto/googleapis/rpc/code
|
||||||
google.golang.org/genproto/googleapis/rpc/errdetails
|
google.golang.org/genproto/googleapis/rpc/errdetails
|
||||||
|
|
@ -1284,8 +1284,8 @@ google.golang.org/grpc/serviceconfig
|
||||||
google.golang.org/grpc/stats
|
google.golang.org/grpc/stats
|
||||||
google.golang.org/grpc/status
|
google.golang.org/grpc/status
|
||||||
google.golang.org/grpc/tap
|
google.golang.org/grpc/tap
|
||||||
# google.golang.org/protobuf v1.34.1
|
# google.golang.org/protobuf v1.34.2
|
||||||
## explicit; go 1.17
|
## explicit; go 1.20
|
||||||
google.golang.org/protobuf/encoding/protojson
|
google.golang.org/protobuf/encoding/protojson
|
||||||
google.golang.org/protobuf/encoding/prototext
|
google.golang.org/protobuf/encoding/prototext
|
||||||
google.golang.org/protobuf/encoding/protowire
|
google.golang.org/protobuf/encoding/protowire
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue