From d5bf43c07a98f595e674d6af016642c299727b66 Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Thu, 24 Oct 2024 12:25:10 -0400 Subject: [PATCH 01/34] Update bufplugin dependency (#3419) --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 1fa445ad3e..a60facce62 100644 --- a/go.mod +++ b/go.mod @@ -5,18 +5,18 @@ go 1.22.0 toolchain go1.23.2 require ( - buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.34.2-20240928190436-5e8abcfd7a7e.2 + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241007185750-f2282fe532fe.1 buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f2282fe532fe.1 - buf.build/go/bufplugin v0.5.0 + buf.build/go/bufplugin v0.6.0 buf.build/go/protoyaml v0.2.0 buf.build/go/spdx v0.2.0 connectrpc.com/connect v1.17.0 connectrpc.com/otelconnect v0.7.1 github.com/bufbuild/protocompile v0.14.1 github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a - github.com/bufbuild/protovalidate-go v0.7.2 + github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 github.com/docker/docker v27.3.1+incompatible github.com/go-chi/chi/v5 v5.1.0 github.com/gofrs/flock v0.12.1 diff --git a/go.sum b/go.sum index 33364f816b..26ceb3dbc4 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.34.2-20240928190436-5e8abcfd7a7e.2 h1:BQVQ0fcYgqpe6F/2ZPJUR1rTN+nwdrj2z7IAbAu9XAQ= -buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.34.2-20240928190436-5e8abcfd7a7e.2/go.mod h1:B+9TKHRYqoAUW57pLjhkLOnBCu0DQYMV+f7imQ9nXwI= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1 h1:O31Hu5Oho5suEWOD7FuMU9vfzeQT07ukTu4YuBVjLbw= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 h1:9wP6ZZYWnF2Z0TxmII7m3XNykxnP4/w8oXeth6ekcRI= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1/go.mod h1:Duw/9JoXkXIydyASnLYIiufkzySThoqavOsF+IihqvM= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241007185750-f2282fe532fe.1 h1:tVBsEQVsOz3Xsoy90GOefAgn6siKtfFZxsst39/hJNU= @@ -8,8 +8,8 @@ buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f22 buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f2282fe532fe.1/go.mod h1:wDNiJdkMLOTfEL3o1lBgh+9EVhwGORcz+Aoq6hGk33Y= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.34.2-20241007202033-cf42259fcbfc.2 h1:QPJpr4Jtj5AN+LXVz+r+pT8dvPkznkRPotxYSN4zXYE= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.34.2-20241007202033-cf42259fcbfc.2/go.mod h1:GjH0gjlY/ns16X8d6eaXV2W+6IFwsO5Ly9WVnzyd1E0= -buf.build/go/bufplugin v0.5.0 h1:pmK1AloAMp+4woH5hEisK9qVmDdLySzIKexUUVZLJ2Q= -buf.build/go/bufplugin v0.5.0/go.mod h1:r7Y8tpqpErLtUXUecEgwAHnjihY03YbN0IaBFNJF/x0= +buf.build/go/bufplugin v0.6.0 h1:3lhoh+0z+IUPS3ZajTPn/27LaLIkero2BDVnV7yXD1s= +buf.build/go/bufplugin v0.6.0/go.mod h1:hWCjxxv24xdR6F5pNlQavZV2oo0J3uF4Ff1XEoyV6vU= buf.build/go/protoyaml v0.2.0 h1:2g3OHjtLDqXBREIOjpZGHmQ+U/4mkN1YiQjxNB68Ip8= buf.build/go/protoyaml v0.2.0/go.mod h1:L/9QvTDkTWcDTzAL6HMfN+mYC6CmZRm2KnsUA054iL0= buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= @@ -34,8 +34,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/ github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a h1:l3RhVoG0RtC61h6TVWnkniGj4TgBebuyPQRdleFAmTg= github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= -github.com/bufbuild/protovalidate-go v0.7.2 h1:UuvKyZHl5p7u3ztEjtRtqtDxOjRKX5VUOgKFq6p6ETk= -github.com/bufbuild/protovalidate-go v0.7.2/go.mod h1:PHV5pFuWlRzdDW02/cmVyNzdiQ+RNNwo7idGxdzS7o4= +github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 h1:A4TfjZJqApnAvGKDgxHqA1rG6BK1OswyNcTcnSrDbJc= +github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576/go.mod h1:R/UFeIPyFAh0eH7Ic/JJbO2ABdkxFuZZKDbzsI5UiwM= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= From 866295e8310ab553527801d5d543de8fb3e56262 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:09:43 -0400 Subject: [PATCH 02/34] Update go registry protos (#3420) --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index a60facce62..487311c5a1 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ toolchain go1.23.2 require ( buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 - buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241007185750-f2282fe532fe.1 - buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f2282fe532fe.1 + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 buf.build/go/bufplugin v0.6.0 buf.build/go/protoyaml v0.2.0 buf.build/go/spdx v0.2.0 @@ -55,7 +55,7 @@ require ( ) require ( - buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.34.2-20241007202033-cf42259fcbfc.2 // indirect + buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.12.7 // indirect diff --git a/go.sum b/go.sum index 26ceb3dbc4..7222c10d80 100644 --- a/go.sum +++ b/go.sum @@ -2,12 +2,12 @@ buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42 buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 h1:9wP6ZZYWnF2Z0TxmII7m3XNykxnP4/w8oXeth6ekcRI= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1/go.mod h1:Duw/9JoXkXIydyASnLYIiufkzySThoqavOsF+IihqvM= -buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241007185750-f2282fe532fe.1 h1:tVBsEQVsOz3Xsoy90GOefAgn6siKtfFZxsst39/hJNU= -buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241007185750-f2282fe532fe.1/go.mod h1:of6bEOQJUQbBMVsPiLQiyD+yPRze0FClQv2u1CmgDdQ= -buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f2282fe532fe.1 h1:jvB3uNDZnP89xIFy8WHeYgCz86vv7mWRyv2Wgp+8hoI= -buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241007185750-f2282fe532fe.1/go.mod h1:wDNiJdkMLOTfEL3o1lBgh+9EVhwGORcz+Aoq6hGk33Y= -buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.34.2-20241007202033-cf42259fcbfc.2 h1:QPJpr4Jtj5AN+LXVz+r+pT8dvPkznkRPotxYSN4zXYE= -buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.34.2-20241007202033-cf42259fcbfc.2/go.mod h1:GjH0gjlY/ns16X8d6eaXV2W+6IFwsO5Ly9WVnzyd1E0= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 h1:FHQXg3T7S2jp8yc7/bQJgqEH1yza/rrDHXITUK2Tm0g= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1/go.mod h1:5iwF5l+9lKCnvr1zLvDgUHrv6X+vU5nNPjvig1sbnao= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 h1:PyqnJojY+BXNuJHp5aEfN9wPiP1dzrobXVmgLrUMe+A= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1/go.mod h1:x5Mti5bhMO87zJxCkcEbr7Lz+bHiFsqpxnpqSB1okG0= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 h1:rPi3qs3qpDIXIl5QW2IPOaYZhppRkvuVKwEZrfhpy78= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1/go.mod h1:4IVMTaeh4JIjBYcGFLlTorfWpKVEXDjDfHAgKTeR0Ds= buf.build/go/bufplugin v0.6.0 h1:3lhoh+0z+IUPS3ZajTPn/27LaLIkero2BDVnV7yXD1s= buf.build/go/bufplugin v0.6.0/go.mod h1:hWCjxxv24xdR6F5pNlQavZV2oo0J3uF4Ff1XEoyV6vU= buf.build/go/protoyaml v0.2.0 h1:2g3OHjtLDqXBREIOjpZGHmQ+U/4mkN1YiQjxNB68Ip8= From 9ec774500bdc9f6e90f5836f15a147168b30a45a Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Fri, 25 Oct 2024 14:08:36 -0400 Subject: [PATCH 03/34] Add deprecated field to curated plugins config and upload (#3421) --- .../beta/registry/plugin/pluginpush/pluginpush.go | 1 + .../bufremotepluginconfig.go | 3 +++ .../bufremotepluginconfig_test.go | 2 ++ .../bufremotepluginconfig/config.go | 1 + .../testdata/success/go/buf.plugin.yaml | 1 + .../alpha/registry/v1alpha1/plugin_curation.pb.go | 15 +++++++++++++-- .../alpha/registry/v1alpha1/plugin_curation.proto | 2 ++ 7 files changed, 23 insertions(+), 2 deletions(-) diff --git a/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go b/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go index 904768431a..ea46bc8357 100644 --- a/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go +++ b/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go @@ -345,6 +345,7 @@ func createCuratedPluginRequest( LicenseUrl: pluginConfig.LicenseURL, Visibility: visibility, IntegrationGuideUrl: pluginConfig.IntegrationGuideURL, + Deprecated: pluginConfig.Deprecated, }, nil } diff --git a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig.go b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig.go index d21f5247ad..6ddf2bab10 100644 --- a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig.go +++ b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig.go @@ -81,6 +81,8 @@ type Config struct { // IntegrationGuideURL is an optional attribute used to specify where // the plugin integration guide can be found. IntegrationGuideURL string + // Deprecated specifies whether the plugin is deprecated. + Deprecated bool } // RegistryConfig is the configuration for the registry of a plugin. @@ -407,6 +409,7 @@ type ExternalConfig struct { SPDXLicenseID string `json:"spdx_license_id,omitempty" yaml:"spdx_license_id,omitempty"` LicenseURL string `json:"license_url,omitempty" yaml:"license_url,omitempty"` IntegrationGuideURL string `json:"integration_guide_url,omitempty" yaml:"integration_guide_url,omitempty"` + Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` } // ExternalDependency represents a dependency on another plugin. diff --git a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig_test.go b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig_test.go index ecb3da3032..c0f528b820 100644 --- a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig_test.go +++ b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/bufremotepluginconfig_test.go @@ -68,6 +68,7 @@ func TestGetConfigForBucket(t *testing.T) { SPDXLicenseID: "Apache-2.0", LicenseURL: "https://github.com/grpc/grpc-go/blob/master/LICENSE", IntegrationGuideURL: "https://grpc.io/docs/languages/go/quickstart", + Deprecated: true, }, pluginConfig, ) @@ -109,6 +110,7 @@ func TestParsePluginConfigGoYAML(t *testing.T) { SPDXLicenseID: "Apache-2.0", LicenseURL: "https://github.com/grpc/grpc-go/blob/master/LICENSE", IntegrationGuideURL: "https://grpc.io/docs/languages/go/quickstart", + Deprecated: true, }, pluginConfig, ) diff --git a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/config.go b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/config.go index 378b19960b..f5e77e372b 100644 --- a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/config.go +++ b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/config.go @@ -83,6 +83,7 @@ func newConfig(externalConfig ExternalConfig, options []ConfigOption) (*Config, SPDXLicenseID: spdxLicenseID, LicenseURL: externalConfig.LicenseURL, IntegrationGuideURL: externalConfig.IntegrationGuideURL, + Deprecated: externalConfig.Deprecated, }, nil } diff --git a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/testdata/success/go/buf.plugin.yaml b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/testdata/success/go/buf.plugin.yaml index dfd2d07760..1b50956964 100644 --- a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/testdata/success/go/buf.plugin.yaml +++ b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/testdata/success/go/buf.plugin.yaml @@ -18,3 +18,4 @@ registry: spdx_license_id: Apache-2.0 license_url: https://github.com/grpc/grpc-go/blob/master/LICENSE integration_guide_url: https://grpc.io/docs/languages/go/quickstart +deprecated: true diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go index d05c78ff80..91b67849e2 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go @@ -1874,6 +1874,8 @@ type CreateCuratedPluginRequest struct { Visibility CuratedPluginVisibility `protobuf:"varint,17,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.CuratedPluginVisibility" json:"visibility,omitempty"` // The URL leading to the integration guide of the plugin, if available. IntegrationGuideUrl string `protobuf:"bytes,18,opt,name=integration_guide_url,json=integrationGuideUrl,proto3" json:"integration_guide_url,omitempty"` + // The deprecation status of the plugin. + Deprecated bool `protobuf:"varint,19,opt,name=deprecated,proto3" json:"deprecated,omitempty"` } func (x *CreateCuratedPluginRequest) Reset() { @@ -2011,6 +2013,13 @@ func (x *CreateCuratedPluginRequest) GetIntegrationGuideUrl() string { return "" } +func (x *CreateCuratedPluginRequest) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + type CreateCuratedPluginResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3571,7 +3580,7 @@ var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc = []byte{ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x06, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x06, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, @@ -3621,7 +3630,9 @@ var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc = []byte{ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x6f, 0x0a, 0x1b, 0x43, 0x72, + 0x6f, 0x6e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x6f, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, diff --git a/proto/buf/alpha/registry/v1alpha1/plugin_curation.proto b/proto/buf/alpha/registry/v1alpha1/plugin_curation.proto index 3903832fe0..9e05098ddb 100644 --- a/proto/buf/alpha/registry/v1alpha1/plugin_curation.proto +++ b/proto/buf/alpha/registry/v1alpha1/plugin_curation.proto @@ -502,6 +502,8 @@ message CreateCuratedPluginRequest { CuratedPluginVisibility visibility = 17; // The URL leading to the integration guide of the plugin, if available. string integration_guide_url = 18; + // The deprecation status of the plugin. + bool deprecated = 19; } message CreateCuratedPluginResponse { From 40e649dac4687cda6c141b1e8b96ef584a03c75a Mon Sep 17 00:00:00 2001 From: bufdev <4228796+bufdev@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:19:29 -0400 Subject: [PATCH 04/34] Update issue templates (#3427) --- .github/ISSUE_TEMPLATE/1-bug-report.yml | 4 ++-- .github/ISSUE_TEMPLATE/3-other.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml index 234743d4b9..846e59a58b 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yml @@ -7,13 +7,13 @@ body: value: | Thanks for helping us improve Buf by filing bugs, we really appreciate it! For us to investigate your issue efficiently, we need a minimal reproducible example. We get lots of support requests, so please help us help you. We find that the easiest way to do this is by linking to a GitHub repository with the setup of the example, as well as a set of commands for us to run on this GitHub repository to reproduce the issue. You can use an existing GitHub repository, or a temporary GitHub repository you create. - **If you do not provide a minimal reproducible example in a GitHub repository, we may have to close your issue. We apologize, but we have to be efficient with our support requests, and we appreciate your help.** + **If you do not provide a minimal reproducible example in a GitHub repository, we will likely close your issue until a reproducible example is provided. We apologize, but we have to be efficient with our support requests, and we appreciate your help.** [This article](https://stackoverflow.com/help/minimal-reproducible-example) on minimal reproducible examples may be of use! - type: input id: github-repository attributes: - label: GitHub repository with your minimal reproducible example (do not fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!) + label: GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!) description: Provide us with a link to the GitHub repository that contains the setup needed to reproduce the issue. This is a repository you create, and is required for us to investigate your issue. placeholder: https://github.com/you/temp-repo-with-repro validations: diff --git a/.github/ISSUE_TEMPLATE/3-other.yml b/.github/ISSUE_TEMPLATE/3-other.yml index 57e28d8028..6e59e4cee3 100644 --- a/.github/ISSUE_TEMPLATE/3-other.yml +++ b/.github/ISSUE_TEMPLATE/3-other.yml @@ -8,13 +8,13 @@ body: If this is a question about some behavior you are witnessing, we will need a minimal reproducible example. We get lots of support requests, so please help us help you. We find that the easiest way to do this is by linking to a GitHub repository with the setup of the example, as well as a set of commands for us to run on this GitHub repository to reproduce the issue. You can use an existing GitHub repository, or a temporary GitHub repository you create. - **If this is a question about some behavior you are witnessing, and you do not provide a minimal reproducible example in a GitHub repository, we may have to close your issue. We apologize, but we have to be efficient with our support requests, and we appreciate your help.** + **If this is a question about some behavior you are witnessing, and you do not provide a minimal reproducible example in a GitHub repository, we will likely close your issue until a reproducible example is provided. We apologize, but we have to be efficient with our support requests, and we appreciate your help.** [This article](https://stackoverflow.com/help/minimal-reproducible-example) on minimal reproducible examples may be of use! - type: input id: github-repository attributes: - label: GitHub repository with your minimal reproducible example (do not fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!) + label: GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!) description: If this is a question about some behavior you are witnessing, provide us with a link to the GitHub repository that contains the setup needed to reproduce the issue. This is a repository you create, and is required for us to investigate your issue. placeholder: https://github.com/you/temp-repo-with-repro - type: textarea From 91bf561b08cfe77dcd1013f6610b07ebf319b88a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:09:29 -0400 Subject: [PATCH 05/34] Bump github.com/quic-go/quic-go from 0.48.0 to 0.48.1 (#3422) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 487311c5a1..b3ac5c60bf 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/klauspost/pgzip v1.2.6 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/pkg/profile v1.7.0 - github.com/quic-go/quic-go v0.48.0 + github.com/quic-go/quic-go v0.48.1 github.com/rs/cors v1.11.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 7222c10d80..c250b660c2 100644 --- a/go.sum +++ b/go.sum @@ -223,8 +223,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= -github.com/quic-go/quic-go v0.48.0 h1:2TCyvBrMu1Z25rvIAlnp2dPT4lgh/uTqLqiXVpp5AeU= -github.com/quic-go/quic-go v0.48.0/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= +github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA= +github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= From 225aeaf9024440284e48106f20f3531cea08935d Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:43:33 -0400 Subject: [PATCH 06/34] Split bufapi module to separate packages (#3428) Co-authored-by: bufdev --- private/buf/bufcli/cache.go | 25 ++- private/buf/bufcli/controller.go | 14 +- private/buf/bufcli/graph_provider.go | 15 +- private/buf/bufcli/module_key_provider.go | 4 +- private/buf/bufcli/uploader.go | 6 +- .../commit/commitaddlabel/commitaddlabel.go | 6 +- .../registry/commit/commitinfo/commitinfo.go | 4 +- .../registry/commit/commitlist/commitlist.go | 10 +- .../commit/commitresolve/commitresolve.go | 4 +- .../label/labelarchive/labelarchive.go | 4 +- .../registry/label/labelinfo/labelinfo.go | 6 +- .../registry/label/labellist/labellist.go | 6 +- .../label/labelunarchive/labelunarchive.go | 4 +- .../module/modulecreate/modulecreate.go | 4 +- .../module/moduledelete/moduledelete.go | 4 +- .../module/moduledeprecate/moduledeprecate.go | 6 +- .../registry/module/moduleinfo/moduleinfo.go | 4 +- .../moduleundeprecate/moduleundeprecate.go | 6 +- .../module/moduleupdate/moduleupdate.go | 4 +- .../organizationcreate/organizationcreate.go | 6 +- .../organizationdelete/organizationdelete.go | 6 +- .../organizationinfo/organizationinfo.go | 6 +- .../organizationupdate/organizationupdate.go | 6 +- .../bufmodule/bufmoduleapi/commit_provider.go | 50 +++--- .../bufmoduleapi/digest_for_commit_id.go | 10 +- .../bufmodule/bufmoduleapi/graph_provider.go | 52 +++--- .../bufmoduleapi/module_data_provider.go | 40 ++--- .../bufmoduleapi/module_key_provider.go | 30 ++-- .../bufmoduleapi/universal_proto_commit.go | 38 ++-- .../bufmoduleapi/universal_proto_content.go | 20 +-- .../bufpkg/bufmodule/bufmoduleapi/uploader.go | 44 ++--- .../bufmoduleapi/v1_proto_module_provider.go | 16 +- .../bufmoduleapi/v1_proto_owner_provider.go | 16 +- .../bufregistryapimodule.go} | 63 +------ .../bufregistryapimodule/usage.gen.go | 19 ++ .../bufregistryapiowner.go | 108 +++++++++++ .../bufregistryapiowner}/usage.gen.go | 2 +- .../bufregistryapiplugin.go | 168 ++++++++++++++++++ .../bufregistryapiplugin/usage.gen.go | 19 ++ 39 files changed, 565 insertions(+), 290 deletions(-) rename private/bufpkg/{bufapi/bufapi.go => bufregistryapi/bufregistryapimodule/bufregistryapimodule.go} (82%) create mode 100644 private/bufpkg/bufregistryapi/bufregistryapimodule/usage.gen.go create mode 100644 private/bufpkg/bufregistryapi/bufregistryapiowner/bufregistryapiowner.go rename private/bufpkg/{bufapi => bufregistryapi/bufregistryapiowner}/usage.gen.go (96%) create mode 100644 private/bufpkg/bufregistryapi/bufregistryapiplugin/bufregistryapiplugin.go create mode 100644 private/bufpkg/bufregistryapi/bufregistryapiplugin/usage.gen.go diff --git a/private/buf/bufcli/cache.go b/private/buf/bufcli/cache.go index 6b42f628fa..ddadfb50dc 100644 --- a/private/buf/bufcli/cache.go +++ b/private/buf/bufcli/cache.go @@ -22,11 +22,12 @@ import ( "path/filepath" "github.com/bufbuild/buf/private/buf/bufwkt/bufwktstore" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulestore" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/filelock" @@ -119,7 +120,10 @@ func NewModuleDataProvider(container appext.Container) (bufmodule.ModuleDataProv } return newModuleDataProvider( container, - bufapi.NewClientProvider( + bufregistryapimodule.NewClientProvider( + clientConfig, + ), + bufregistryapiowner.NewClientProvider( clientConfig, ), ) @@ -134,7 +138,10 @@ func NewCommitProvider(container appext.Container) (bufmodule.CommitProvider, er } return newCommitProvider( container, - bufapi.NewClientProvider( + bufregistryapimodule.NewClientProvider( + clientConfig, + ), + bufregistryapiowner.NewClientProvider( clientConfig, ), ) @@ -174,7 +181,8 @@ func NewWKTStore(container appext.Container) (bufwktstore.Store, error) { func newModuleDataProvider( container appext.Container, - clientProvider bufapi.ClientProvider, + moduleClientProvider bufregistryapimodule.ClientProvider, + ownerClientProvider bufregistryapiowner.ClientProvider, ) (bufmodule.ModuleDataProvider, error) { if err := createCacheDir(container.CacheDirPath(), v3CacheModuleRelDirPath); err != nil { return nil, err @@ -182,8 +190,8 @@ func newModuleDataProvider( fullCacheDirPath := normalpath.Join(container.CacheDirPath(), v3CacheModuleRelDirPath) delegateModuleDataProvider := bufmoduleapi.NewModuleDataProvider( container.Logger(), - clientProvider, - newGraphProvider(container, clientProvider), + moduleClientProvider, + newGraphProvider(container, moduleClientProvider, ownerClientProvider), ) // No symlinks. storageosProvider := storageos.NewProvider() @@ -211,13 +219,14 @@ func newModuleDataProvider( func newCommitProvider( container appext.Container, - clientProvider bufapi.ClientProvider, + moduleClientProvider bufregistryapimodule.ClientProvider, + ownerClientProvider bufregistryapiowner.ClientProvider, ) (bufmodule.CommitProvider, error) { if err := createCacheDir(container.CacheDirPath(), v3CacheCommitsRelDirPath); err != nil { return nil, err } fullCacheDirPath := normalpath.Join(container.CacheDirPath(), v3CacheCommitsRelDirPath) - delegateReader := bufmoduleapi.NewCommitProvider(container.Logger(), clientProvider) + delegateReader := bufmoduleapi.NewCommitProvider(container.Logger(), moduleClientProvider, ownerClientProvider) // No symlinks. storageosProvider := storageos.NewProvider() cacheBucket, err := storageosProvider.NewReadWriteBucket(fullCacheDirPath) diff --git a/private/buf/bufcli/controller.go b/private/buf/bufcli/controller.go index d4939a4e37..78058ff7ca 100644 --- a/private/buf/bufcli/controller.go +++ b/private/buf/bufcli/controller.go @@ -16,8 +16,9 @@ package bufcli import ( "github.com/bufbuild/buf/private/buf/bufctl" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appext" ) @@ -36,12 +37,13 @@ func NewController( if err != nil { return nil, err } - clientProvider := bufapi.NewClientProvider(clientConfig) - moduleDataProvider, err := newModuleDataProvider(container, clientProvider) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) + ownerClientProvider := bufregistryapiowner.NewClientProvider(clientConfig) + moduleDataProvider, err := newModuleDataProvider(container, moduleClientProvider, ownerClientProvider) if err != nil { return nil, err } - commitProvider, err := newCommitProvider(container, clientProvider) + commitProvider, err := newCommitProvider(container, moduleClientProvider, ownerClientProvider) if err != nil { return nil, err } @@ -52,8 +54,8 @@ func NewController( return bufctl.NewController( container.Logger(), container, - newGraphProvider(container, clientProvider), - bufmoduleapi.NewModuleKeyProvider(container.Logger(), clientProvider), + newGraphProvider(container, moduleClientProvider, ownerClientProvider), + bufmoduleapi.NewModuleKeyProvider(container.Logger(), moduleClientProvider), moduleDataProvider, commitProvider, wktStore, diff --git a/private/buf/bufcli/graph_provider.go b/private/buf/bufcli/graph_provider.go index 878ee0ddfe..534583e7e2 100644 --- a/private/buf/bufcli/graph_provider.go +++ b/private/buf/bufcli/graph_provider.go @@ -15,9 +15,10 @@ package bufcli import ( - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appext" ) @@ -27,16 +28,22 @@ func NewGraphProvider(container appext.Container) (bufmodule.GraphProvider, erro if err != nil { return nil, err } - return newGraphProvider(container, bufapi.NewClientProvider(clientConfig)), nil + return newGraphProvider( + container, + bufregistryapimodule.NewClientProvider(clientConfig), + bufregistryapiowner.NewClientProvider(clientConfig), + ), nil } func newGraphProvider( container appext.Container, - clientProvider bufapi.ClientProvider, + moduleClientProvider bufregistryapimodule.ClientProvider, + ownerClientProvider bufregistryapiowner.ClientProvider, ) bufmodule.GraphProvider { return bufmoduleapi.NewGraphProvider( container.Logger(), - clientProvider, + moduleClientProvider, + ownerClientProvider, // OK if empty bufmoduleapi.GraphProviderWithLegacyFederationRegistry(container.Env(legacyFederationRegistryEnvKey)), // OK if empty diff --git a/private/buf/bufcli/module_key_provider.go b/private/buf/bufcli/module_key_provider.go index 9412f15935..e48510c810 100644 --- a/private/buf/bufcli/module_key_provider.go +++ b/private/buf/bufcli/module_key_provider.go @@ -15,9 +15,9 @@ package bufcli import ( - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appext" ) @@ -29,7 +29,7 @@ func NewModuleKeyProvider(container appext.Container) (bufmodule.ModuleKeyProvid } return bufmoduleapi.NewModuleKeyProvider( container.Logger(), - bufapi.NewClientProvider( + bufregistryapimodule.NewClientProvider( clientConfig, ), ), nil diff --git a/private/buf/bufcli/uploader.go b/private/buf/bufcli/uploader.go index 458f25cd19..df2d047a5e 100644 --- a/private/buf/bufcli/uploader.go +++ b/private/buf/bufcli/uploader.go @@ -15,9 +15,9 @@ package bufcli import ( - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appext" ) @@ -27,12 +27,12 @@ func NewUploader(container appext.Container) (bufmodule.Uploader, error) { if err != nil { return nil, err } - return newUploader(container, bufapi.NewClientProvider(clientConfig)), nil + return newUploader(container, bufregistryapimodule.NewClientProvider(clientConfig)), nil } func newUploader( container appext.Container, - clientProvider bufapi.ClientProvider, + clientProvider bufregistryapimodule.ClientProvider, ) bufmodule.Uploader { return bufmoduleapi.NewUploader( container.Logger(), diff --git a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go b/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go index f10b3ceb65..685a2ce6c7 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go +++ b/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -107,8 +107,8 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - labelServiceClient := clientProvider.V1LabelServiceClient(moduleRef.ModuleFullName().Registry()) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) + labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleRef.ModuleFullName().Registry()) requestValues := slicesext.Map(labels, func(label string) *modulev1.CreateOrUpdateLabelsRequest_Value { return &modulev1.CreateOrUpdateLabelsRequest_Value{ LabelRef: &modulev1.LabelRef{ diff --git a/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go b/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go index 31534aea6e..3a79745df1 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go +++ b/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -94,7 +94,7 @@ func run( if err != nil { return err } - commitServiceClient := bufapi.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) + commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) resp, err := commitServiceClient.GetCommits( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go b/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go index 59c3693f91..292ccc8208 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go +++ b/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -117,10 +117,10 @@ func run( return err } registry := moduleRef.ModuleFullName().Registry() - clientProvider := bufapi.NewClientProvider(clientConfig) - commitServiceClient := clientProvider.V1CommitServiceClient(registry) - labelServiceClient := clientProvider.V1LabelServiceClient(registry) - resourceServiceClient := clientProvider.V1ResourceServiceClient(registry) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) + commitServiceClient := moduleClientProvider.V1CommitServiceClient(registry) + labelServiceClient := moduleClientProvider.V1LabelServiceClient(registry) + resourceServiceClient := moduleClientProvider.V1ResourceServiceClient(registry) resourceResp, err := resourceServiceClient.GetResources( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go b/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go index bc30d6ff1a..fccfc7e597 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go +++ b/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -86,7 +86,7 @@ func run( if err != nil { return err } - commitServiceClient := bufapi.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) + commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) resp, err := commitServiceClient.GetCommits( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go b/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go index 1fa2520391..12e2e2fb98 100644 --- a/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go +++ b/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/spf13/pflag" @@ -75,7 +75,7 @@ func run( return err } moduleFullName := moduleRef.ModuleFullName() - labelServiceClient := bufapi.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) + labelServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) // ArchiveLabelsResponse is empty. if _, err := labelServiceClient.ArchiveLabels( ctx, diff --git a/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go b/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go index 4b27563fcd..857d010a32 100644 --- a/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go +++ b/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -89,9 +89,9 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) moduleFullName := moduleRef.ModuleFullName() - labelServiceClient := clientProvider.V1LabelServiceClient(moduleFullName.Registry()) + labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleFullName.Registry()) resp, err := labelServiceClient.GetLabels( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/label/labellist/labellist.go b/private/buf/cmd/buf/command/registry/label/labellist/labellist.go index 580dc2614e..5b15eddbcc 100644 --- a/private/buf/cmd/buf/command/registry/label/labellist/labellist.go +++ b/private/buf/cmd/buf/command/registry/label/labellist/labellist.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -120,9 +120,9 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) moduleFullName := moduleRef.ModuleFullName() - labelServiceClient := clientProvider.V1LabelServiceClient(moduleFullName.Registry()) + labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleFullName.Registry()) order := modulev1.ListLabelsRequest_ORDER_UPDATE_TIME_DESC if flags.Reverse { order = modulev1.ListLabelsRequest_ORDER_UPDATE_TIME_ASC diff --git a/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go b/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go index 761ce5a1e3..c104833dad 100644 --- a/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go +++ b/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/spf13/pflag" @@ -75,7 +75,7 @@ func run( return err } moduleFullName := moduleRef.ModuleFullName() - labelServiceClient := bufapi.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) + labelServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) // UnarchiveLabelsResponse is empty. if _, err := labelServiceClient.UnarchiveLabels( ctx, diff --git a/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go b/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go index 1848cd5704..4b274514e2 100644 --- a/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go +++ b/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go @@ -23,8 +23,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -106,7 +106,7 @@ func run( if err != nil { return err } - moduleServiceClient := bufapi.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) + moduleServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) resp, err := moduleServiceClient.CreateModules( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go b/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go index fc08e5bd4a..37b72d307e 100644 --- a/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go +++ b/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -85,7 +85,7 @@ func run( return err } } - moduleServiceClient := bufapi.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) + moduleServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) if _, err := moduleServiceClient.DeleteModules( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go b/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go index 33d004e1b8..4ebfd44ea4 100644 --- a/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go +++ b/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -62,8 +62,8 @@ func run(ctx context.Context, container appext.Container, flags *flags) error { if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - moduleServiceClient := clientProvider.V1ModuleServiceClient(moduleFullName.Registry()) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) + moduleServiceClient := moduleClientProvider.V1ModuleServiceClient(moduleFullName.Registry()) if _, err := moduleServiceClient.UpdateModules( ctx, &connect.Request[modulev1.UpdateModulesRequest]{ diff --git a/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go b/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go index a6cfd7a678..19ae1d19db 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go +++ b/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go @@ -22,8 +22,8 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -86,7 +86,7 @@ func run( if err != nil { return err } - moduleServiceClient := bufapi.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) + moduleServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) resp, err := moduleServiceClient.GetModules( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go b/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go index 361a5b739a..8bca106626 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go +++ b/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -47,8 +47,8 @@ func run(ctx context.Context, container appext.Container) error { if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - moduleServiceClient := clientProvider.V1ModuleServiceClient(moduleFullName.Registry()) + moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) + moduleServiceClient := moduleClientProvider.V1ModuleServiceClient(moduleFullName.Registry()) if _, err := moduleServiceClient.UpdateModules( ctx, &connect.Request[modulev1.UpdateModulesRequest]{ diff --git a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go b/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go index b2e6dd5974..6e67806e70 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go +++ b/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -102,7 +102,7 @@ func run( if err != nil { return err } - moduleServiceClient := bufapi.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) + moduleServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1ModuleServiceClient(moduleFullName.Registry()) visibilityUpdate := &visibility if visibility == modulev1.ModuleVisibility_MODULE_VISIBILITY_UNSPECIFIED { visibilityUpdate = nil diff --git a/private/buf/cmd/buf/command/registry/organization/organizationcreate/organizationcreate.go b/private/buf/cmd/buf/command/registry/organization/organizationcreate/organizationcreate.go index 56867235ef..4c79fdefdb 100644 --- a/private/buf/cmd/buf/command/registry/organization/organizationcreate/organizationcreate.go +++ b/private/buf/cmd/buf/command/registry/organization/organizationcreate/organizationcreate.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -85,8 +85,8 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - organizationServiceClient := clientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) + ownerClientProvider := bufregistryapiowner.NewClientProvider(clientConfig) + organizationServiceClient := ownerClientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) resp, err := organizationServiceClient.CreateOrganizations( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/organization/organizationdelete/organizationdelete.go b/private/buf/cmd/buf/command/registry/organization/organizationdelete/organizationdelete.go index 9a0e4e6ca6..362bac14d0 100644 --- a/private/buf/cmd/buf/command/registry/organization/organizationdelete/organizationdelete.go +++ b/private/buf/cmd/buf/command/registry/organization/organizationdelete/organizationdelete.go @@ -21,7 +21,7 @@ import ( ownerv1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -84,8 +84,8 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - organizationServiceClient := clientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) + ownerClientProvider := bufregistryapiowner.NewClientProvider(clientConfig) + organizationServiceClient := ownerClientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) if _, err := organizationServiceClient.DeleteOrganizations( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/organization/organizationinfo/organizationinfo.go b/private/buf/cmd/buf/command/registry/organization/organizationinfo/organizationinfo.go index 3347b4ef18..766985513c 100644 --- a/private/buf/cmd/buf/command/registry/organization/organizationinfo/organizationinfo.go +++ b/private/buf/cmd/buf/command/registry/organization/organizationinfo/organizationinfo.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -85,8 +85,8 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - organizationServiceClient := clientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) + ownerClientProvider := bufregistryapiowner.NewClientProvider(clientConfig) + organizationServiceClient := ownerClientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) resp, err := organizationServiceClient.GetOrganizations( ctx, connect.NewRequest( diff --git a/private/buf/cmd/buf/command/registry/organization/organizationupdate/organizationupdate.go b/private/buf/cmd/buf/command/registry/organization/organizationupdate/organizationupdate.go index 765ab41230..cbce3b41ee 100644 --- a/private/buf/cmd/buf/command/registry/organization/organizationupdate/organizationupdate.go +++ b/private/buf/cmd/buf/command/registry/organization/organizationupdate/organizationupdate.go @@ -21,7 +21,7 @@ import ( ownerv1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -89,8 +89,8 @@ func run( if err != nil { return err } - clientProvider := bufapi.NewClientProvider(clientConfig) - organizationServiceClient := clientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) + ownerClientProvider := bufregistryapiowner.NewClientProvider(clientConfig) + organizationServiceClient := ownerClientProvider.V1OrganizationServiceClient(moduleOwner.Registry()) if _, err := organizationServiceClient.UpdateOrganizations( ctx, connect.NewRequest( diff --git a/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go index 6e75311f96..d710cec37b 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go @@ -19,8 +19,9 @@ import ( "log/slog" "time" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -30,40 +31,41 @@ import ( // NewCommitProvider returns a new CommitProvider for the given API client. func NewCommitProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider, ) bufmodule.CommitProvider { - return newCommitProvider(logger, clientProvider) + return newCommitProvider(logger, moduleClientProvider, ownerClientProvider) } // *** PRIVATE *** type commitProvider struct { - logger *slog.Logger - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + logger *slog.Logger + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider } + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider } func newCommitProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider, ) *commitProvider { return &commitProvider{ - logger: logger, - clientProvider: clientProvider, + logger: logger, + moduleClientProvider: moduleClientProvider, + ownerClientProvider: ownerClientProvider, } } @@ -115,8 +117,8 @@ func (a *commitProvider) GetCommitsForCommitKeys( // We don't want to persist these across calls - this could grow over time and this cache // isn't an LRU cache, and the information also may change over time. - v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.clientProvider) - v1ProtoOwnerProvider := newV1ProtoOwnerProvider(a.logger, a.clientProvider) + v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.moduleClientProvider) + v1ProtoOwnerProvider := newV1ProtoOwnerProvider(a.logger, a.ownerClientProvider) registryToIndexedCommitKeys := slicesext.ToIndexedValuesMap( commitKeys, @@ -158,7 +160,7 @@ func (a *commitProvider) getIndexedCommitsForRegistryAndIndexedModuleKeys( return nil, err } commitIDs := slicesext.MapKeysToSlice(commitIDToIndexedModuleKey) - universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, a.clientProvider, registry, commitIDs, digestType) + universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, a.moduleClientProvider, registry, commitIDs, digestType) if err != nil { return nil, err } @@ -209,7 +211,7 @@ func (a *commitProvider) getIndexedCommitsForRegistryAndIndexedCommitKeys( return nil, err } commitIDs := slicesext.MapKeysToSlice(commitIDToIndexedCommitKey) - universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, a.clientProvider, registry, commitIDs, digestType) + universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, a.moduleClientProvider, registry, commitIDs, digestType) if err != nil { return nil, err } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/digest_for_commit_id.go b/private/bufpkg/bufmodule/bufmoduleapi/digest_for_commit_id.go index 272785060a..39d6e7d873 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/digest_for_commit_id.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/digest_for_commit_id.go @@ -17,8 +17,8 @@ package bufmoduleapi import ( "context" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/google/uuid" ) @@ -26,15 +26,15 @@ import ( // the Digest for the Commit. func DigestForCommitID( ctx context.Context, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, registry string, commitID uuid.UUID, digestType bufmodule.DigestType, ) (bufmodule.Digest, error) { - universalProtoCommit, err := getUniversalProtoCommitForRegistryAndCommitID(ctx, clientProvider, registry, commitID, digestType) + universalProtoCommit, err := getUniversalProtoCommitForRegistryAndCommitID(ctx, moduleClientProvider, registry, commitID, digestType) if err != nil { return nil, err } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/graph_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/graph_provider.go index 46278bf755..59aa2ff1dc 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/graph_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/graph_provider.go @@ -22,8 +22,9 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/dag" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -33,15 +34,15 @@ import ( // NewGraphProvider returns a new GraphProvider for the given API client. func NewGraphProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1GraphServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1GraphServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1GraphServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1GraphServiceClientProvider }, + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider, options ...GraphProviderOption, ) bufmodule.GraphProvider { - return newGraphProvider(logger, clientProvider, options...) + return newGraphProvider(logger, moduleClientProvider, ownerClientProvider, options...) } // GraphProviderOption is an option for a new GraphProvider. @@ -74,31 +75,32 @@ func GraphProviderWithPublicRegistry(publicRegistry string) GraphProviderOption // *** PRIVATE *** type graphProvider struct { - logger *slog.Logger - clientProvider interface { - bufapi.V1GraphServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1GraphServiceClientProvider + logger *slog.Logger + moduleClientProvider interface { + bufregistryapimodule.V1GraphServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1GraphServiceClientProvider } + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider legacyFederationRegistry string publicRegistry string } func newGraphProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1GraphServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1OwnerServiceClientProvider - bufapi.V1Beta1GraphServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1GraphServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1GraphServiceClientProvider }, + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider, options ...GraphProviderOption, ) *graphProvider { graphProvider := &graphProvider{ - logger: logger, - clientProvider: clientProvider, - publicRegistry: defaultPublicRegistry, + logger: logger, + moduleClientProvider: moduleClientProvider, + ownerClientProvider: ownerClientProvider, + publicRegistry: defaultPublicRegistry, } for _, option := range options { option(graphProvider) @@ -121,8 +123,8 @@ func (a *graphProvider) GetGraphForModuleKeys( // We don't want to persist these across calls - this could grow over time and this cache // isn't an LRU cache, and the information also may change over time. - v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.clientProvider) - v1ProtoOwnerProvider := newV1ProtoOwnerProvider(a.logger, a.clientProvider) + v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.moduleClientProvider) + v1ProtoOwnerProvider := newV1ProtoOwnerProvider(a.logger, a.ownerClientProvider) v1beta1ProtoGraph, err := a.getV1Beta1ProtoGraphForModuleKeys(ctx, moduleKeys, digestType) if err != nil { return nil, err @@ -238,7 +240,7 @@ func (a *graphProvider) getV1Beta1ProtoGraphForModuleKeys( if err != nil { return nil, err } - response, err := a.clientProvider.V1Beta1GraphServiceClient(primaryRegistry).GetGraph( + response, err := a.moduleClientProvider.V1Beta1GraphServiceClient(primaryRegistry).GetGraph( ctx, connect.NewRequest( &modulev1beta1.GetGraphRequest{ @@ -273,7 +275,7 @@ func (a *graphProvider) getV1ProtoGraphForRegistryAndModuleKeys( moduleKeys []bufmodule.ModuleKey, ) (*modulev1.Graph, error) { commitIDs := slicesext.Map(moduleKeys, bufmodule.ModuleKey.CommitID) - response, err := a.clientProvider.V1GraphServiceClient(registry).GetGraph( + response, err := a.moduleClientProvider.V1GraphServiceClient(registry).GetGraph( ctx, connect.NewRequest( &modulev1.GetGraphRequest{ diff --git a/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go index 0fcded0347..c97c4f7f59 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go @@ -21,8 +21,8 @@ import ( "sort" modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" @@ -35,41 +35,41 @@ import ( // A warning is printed to the logger if a given Module is deprecated. func NewModuleDataProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1DownloadServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1Beta1DownloadServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1DownloadServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1DownloadServiceClientProvider }, graphProvider bufmodule.GraphProvider, ) bufmodule.ModuleDataProvider { - return newModuleDataProvider(logger, clientProvider, graphProvider) + return newModuleDataProvider(logger, moduleClientProvider, graphProvider) } // *** PRIVATE *** type moduleDataProvider struct { - logger *slog.Logger - clientProvider interface { - bufapi.V1DownloadServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1Beta1DownloadServiceClientProvider + logger *slog.Logger + moduleClientProvider interface { + bufregistryapimodule.V1DownloadServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1DownloadServiceClientProvider } graphProvider bufmodule.GraphProvider } func newModuleDataProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1DownloadServiceClientProvider - bufapi.V1ModuleServiceClientProvider - bufapi.V1Beta1DownloadServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1DownloadServiceClientProvider + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1Beta1DownloadServiceClientProvider }, graphProvider bufmodule.GraphProvider, ) *moduleDataProvider { return &moduleDataProvider{ - logger: logger, - clientProvider: clientProvider, - graphProvider: graphProvider, + logger: logger, + moduleClientProvider: moduleClientProvider, + graphProvider: graphProvider, } } @@ -90,7 +90,7 @@ func (a *moduleDataProvider) GetModuleDatasForModuleKeys( // We don't want to persist this across calls - this could grow over time and this cache // isn't an LRU cache, and the information also may change over time. - v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.clientProvider) + v1ProtoModuleProvider := newV1ProtoModuleProvider(a.logger, a.moduleClientProvider) registryToIndexedModuleKeys := slicesext.ToIndexedValuesMap( moduleKeys, @@ -218,7 +218,7 @@ func (a *moduleDataProvider) getCommitIDToUniversalProtoContentForRegistryAndInd commitIDs := slicesext.MapKeysToSlice(commitIDToIndexedModuleKey) universalProtoContents, err := getUniversalProtoContentsForRegistryAndCommitIDs( ctx, - a.clientProvider, + a.moduleClientProvider, registry, commitIDs, digestType, diff --git a/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go index 90ef844223..c1c576ec35 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go @@ -18,8 +18,8 @@ import ( "context" "log/slog" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/uuidutil" ) @@ -27,34 +27,34 @@ import ( // NewModuleKeyProvider returns a new ModuleKeyProvider for the given API clients. func NewModuleKeyProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, ) bufmodule.ModuleKeyProvider { - return newModuleKeyProvider(logger, clientProvider) + return newModuleKeyProvider(logger, moduleClientProvider) } // *** PRIVATE *** type moduleKeyProvider struct { - logger *slog.Logger - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + logger *slog.Logger + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider } } func newModuleKeyProvider( logger *slog.Logger, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, ) *moduleKeyProvider { return &moduleKeyProvider{ - logger: logger, - clientProvider: clientProvider, + logger: logger, + moduleClientProvider: moduleClientProvider, } } @@ -101,7 +101,7 @@ func (a *moduleKeyProvider) getIndexedModuleKeysForRegistryAndIndexedModuleRefs( indexedModuleRefs []slicesext.Indexed[bufmodule.ModuleRef], digestType bufmodule.DigestType, ) ([]slicesext.Indexed[bufmodule.ModuleKey], error) { - universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndModuleRefs(ctx, a.clientProvider, registry, slicesext.IndexedToValues(indexedModuleRefs), digestType) + universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndModuleRefs(ctx, a.moduleClientProvider, registry, slicesext.IndexedToValues(indexedModuleRefs), digestType) if err != nil { return nil, err } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go index 1298a2b2b3..f2cc9f2555 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go @@ -22,8 +22,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/google/uuid" @@ -70,15 +70,15 @@ func newUniversalProtoCommitForV1Beta1(v1beta1ProtoCommit *modulev1beta1.Commit) func getUniversalProtoCommitForRegistryAndCommitID( ctx context.Context, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, registry string, commitID uuid.UUID, digestType bufmodule.DigestType, ) (*universalProtoCommit, error) { - universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, clientProvider, registry, []uuid.UUID{commitID}, digestType) + universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndCommitIDs(ctx, moduleClientProvider, registry, []uuid.UUID{commitID}, digestType) if err != nil { return nil, err } @@ -88,9 +88,9 @@ func getUniversalProtoCommitForRegistryAndCommitID( func getUniversalProtoCommitsForRegistryAndCommitIDs( ctx context.Context, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, registry string, commitIDs []uuid.UUID, @@ -99,14 +99,14 @@ func getUniversalProtoCommitsForRegistryAndCommitIDs( switch digestType { case bufmodule.DigestTypeB4: v1beta1ProtoResourceRefs := commitIDsToV1Beta1ProtoResourceRefs(commitIDs) - v1beta1ProtoCommits, err := getV1Beta1ProtoCommitsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1beta1ProtoResourceRefs, digestType) + v1beta1ProtoCommits, err := getV1Beta1ProtoCommitsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1beta1ProtoResourceRefs, digestType) if err != nil { return nil, err } return slicesext.MapError(v1beta1ProtoCommits, newUniversalProtoCommitForV1Beta1) case bufmodule.DigestTypeB5: v1ProtoResourceRefs := commitIDsToV1ProtoResourceRefs(commitIDs) - v1ProtoCommits, err := getV1ProtoCommitsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1ProtoResourceRefs) + v1ProtoCommits, err := getV1ProtoCommitsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1ProtoResourceRefs) if err != nil { return nil, err } @@ -118,9 +118,9 @@ func getUniversalProtoCommitsForRegistryAndCommitIDs( func getUniversalProtoCommitsForRegistryAndModuleRefs( ctx context.Context, - clientProvider interface { - bufapi.V1CommitServiceClientProvider - bufapi.V1Beta1CommitServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1CommitServiceClientProvider + bufregistryapimodule.V1Beta1CommitServiceClientProvider }, registry string, moduleRefs []bufmodule.ModuleRef, @@ -129,14 +129,14 @@ func getUniversalProtoCommitsForRegistryAndModuleRefs( switch digestType { case bufmodule.DigestTypeB4: v1beta1ProtoResourceRefs := moduleRefsToV1Beta1ProtoResourceRefs(moduleRefs) - v1beta1ProtoCommits, err := getV1Beta1ProtoCommitsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1beta1ProtoResourceRefs, digestType) + v1beta1ProtoCommits, err := getV1Beta1ProtoCommitsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1beta1ProtoResourceRefs, digestType) if err != nil { return nil, err } return slicesext.MapError(v1beta1ProtoCommits, newUniversalProtoCommitForV1Beta1) case bufmodule.DigestTypeB5: v1ProtoResourceRefs := moduleRefsToV1ProtoResourceRefs(moduleRefs) - v1ProtoCommits, err := getV1ProtoCommitsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1ProtoResourceRefs) + v1ProtoCommits, err := getV1ProtoCommitsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1ProtoResourceRefs) if err != nil { return nil, err } @@ -148,11 +148,11 @@ func getUniversalProtoCommitsForRegistryAndModuleRefs( func getV1ProtoCommitsForRegistryAndResourceRefs( ctx context.Context, - clientProvider bufapi.V1CommitServiceClientProvider, + moduleClientProvider bufregistryapimodule.V1CommitServiceClientProvider, registry string, v1ProtoResourceRefs []*modulev1.ResourceRef, ) ([]*modulev1.Commit, error) { - response, err := clientProvider.V1CommitServiceClient(registry).GetCommits( + response, err := moduleClientProvider.V1CommitServiceClient(registry).GetCommits( ctx, connect.NewRequest( &modulev1.GetCommitsRequest{ @@ -172,7 +172,7 @@ func getV1ProtoCommitsForRegistryAndResourceRefs( func getV1Beta1ProtoCommitsForRegistryAndResourceRefs( ctx context.Context, - clientProvider bufapi.V1Beta1CommitServiceClientProvider, + moduleClientProvider bufregistryapimodule.V1Beta1CommitServiceClientProvider, registry string, v1beta1ProtoResourceRefs []*modulev1beta1.ResourceRef, digestType bufmodule.DigestType, @@ -181,7 +181,7 @@ func getV1Beta1ProtoCommitsForRegistryAndResourceRefs( if err != nil { return nil, err } - response, err := clientProvider.V1Beta1CommitServiceClient(registry).GetCommits( + response, err := moduleClientProvider.V1Beta1CommitServiceClient(registry).GetCommits( ctx, connect.NewRequest( &modulev1beta1.GetCommitsRequest{ diff --git a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_content.go b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_content.go index 660f439878..f42b919fc7 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_content.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_content.go @@ -21,8 +21,8 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/google/uuid" @@ -68,9 +68,9 @@ func newUniversalProtoContentForV1Beta1(v1beta1ProtoContent *modulev1beta1.Downl func getUniversalProtoContentsForRegistryAndCommitIDs( ctx context.Context, - clientProvider interface { - bufapi.V1DownloadServiceClientProvider - bufapi.V1Beta1DownloadServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1DownloadServiceClientProvider + bufregistryapimodule.V1Beta1DownloadServiceClientProvider }, registry string, commitIDs []uuid.UUID, @@ -79,14 +79,14 @@ func getUniversalProtoContentsForRegistryAndCommitIDs( switch digestType { case bufmodule.DigestTypeB4: v1beta1ProtoResourceRefs := commitIDsToV1Beta1ProtoResourceRefs(commitIDs) - v1beta1ProtoContents, err := getV1Beta1ProtoContentsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1beta1ProtoResourceRefs, digestType) + v1beta1ProtoContents, err := getV1Beta1ProtoContentsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1beta1ProtoResourceRefs, digestType) if err != nil { return nil, err } return slicesext.Map(v1beta1ProtoContents, newUniversalProtoContentForV1Beta1), nil case bufmodule.DigestTypeB5: v1ProtoResourceRefs := commitIDsToV1ProtoResourceRefs(commitIDs) - v1ProtoContents, err := getV1ProtoContentsForRegistryAndResourceRefs(ctx, clientProvider, registry, v1ProtoResourceRefs) + v1ProtoContents, err := getV1ProtoContentsForRegistryAndResourceRefs(ctx, moduleClientProvider, registry, v1ProtoResourceRefs) if err != nil { return nil, err } @@ -98,11 +98,11 @@ func getUniversalProtoContentsForRegistryAndCommitIDs( func getV1ProtoContentsForRegistryAndResourceRefs( ctx context.Context, - clientProvider bufapi.V1DownloadServiceClientProvider, + moduleClientProvider bufregistryapimodule.V1DownloadServiceClientProvider, registry string, v1ProtoResourceRefs []*modulev1.ResourceRef, ) ([]*modulev1.DownloadResponse_Content, error) { - response, err := clientProvider.V1DownloadServiceClient(registry).Download( + response, err := moduleClientProvider.V1DownloadServiceClient(registry).Download( ctx, connect.NewRequest( &modulev1.DownloadRequest{ @@ -129,7 +129,7 @@ func getV1ProtoContentsForRegistryAndResourceRefs( func getV1Beta1ProtoContentsForRegistryAndResourceRefs( ctx context.Context, - clientProvider bufapi.V1Beta1DownloadServiceClientProvider, + moduleClientProvider bufregistryapimodule.V1Beta1DownloadServiceClientProvider, registry string, v1beta1ProtoResourceRefs []*modulev1beta1.ResourceRef, digestType bufmodule.DigestType, @@ -138,7 +138,7 @@ func getV1Beta1ProtoContentsForRegistryAndResourceRefs( if err != nil { return nil, err } - response, err := clientProvider.V1Beta1DownloadServiceClient(registry).Download( + response, err := moduleClientProvider.V1Beta1DownloadServiceClient(registry).Download( ctx, connect.NewRequest( &modulev1beta1.DownloadRequest{ diff --git a/private/bufpkg/bufmodule/bufmoduleapi/uploader.go b/private/bufpkg/bufmodule/bufmoduleapi/uploader.go index 0b60b6eed0..ff78d879b4 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/uploader.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/uploader.go @@ -25,8 +25,8 @@ import ( modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" ownerv1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -36,14 +36,14 @@ import ( // NewUploader returns a new Uploader for the given API client. func NewUploader( logger *slog.Logger, - clientProvider interface { - bufapi.V1ModuleServiceClientProvider - bufapi.V1UploadServiceClientProvider - bufapi.V1Beta1UploadServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1UploadServiceClientProvider + bufregistryapimodule.V1Beta1UploadServiceClientProvider }, options ...UploaderOption, ) bufmodule.Uploader { - return newUploader(logger, clientProvider, options...) + return newUploader(logger, moduleClientProvider, options...) } // UploaderOption is an option for a new Uploader. @@ -65,28 +65,28 @@ func UploaderWithPublicRegistry(publicRegistry string) UploaderOption { // *** PRIVATE *** type uploader struct { - logger *slog.Logger - clientProvider interface { - bufapi.V1ModuleServiceClientProvider - bufapi.V1UploadServiceClientProvider - bufapi.V1Beta1UploadServiceClientProvider + logger *slog.Logger + moduleClientProvider interface { + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1UploadServiceClientProvider + bufregistryapimodule.V1Beta1UploadServiceClientProvider } publicRegistry string } func newUploader( logger *slog.Logger, - clientProvider interface { - bufapi.V1ModuleServiceClientProvider - bufapi.V1UploadServiceClientProvider - bufapi.V1Beta1UploadServiceClientProvider + moduleClientProvider interface { + bufregistryapimodule.V1ModuleServiceClientProvider + bufregistryapimodule.V1UploadServiceClientProvider + bufregistryapimodule.V1Beta1UploadServiceClientProvider }, options ...UploaderOption, ) *uploader { uploader := &uploader{ - logger: logger, - clientProvider: clientProvider, - publicRegistry: defaultPublicRegistry, + logger: logger, + moduleClientProvider: moduleClientProvider, + publicRegistry: defaultPublicRegistry, } for _, option := range options { option(uploader) @@ -281,7 +281,7 @@ func (a *uploader) Upload( if len(remoteDepRegistries) > 0 && (len(remoteDepRegistries) > 1 || remoteDepRegistries[0] != primaryRegistry) { // If we have dependencies on other registries, or we have multiple registries we depend on, we have // to use legacy federation. - response, err := a.clientProvider.V1Beta1UploadServiceClient(primaryRegistry).Upload( + response, err := a.moduleClientProvider.V1Beta1UploadServiceClient(primaryRegistry).Upload( ctx, connect.NewRequest( &modulev1beta1.UploadRequest{ @@ -312,7 +312,7 @@ func (a *uploader) Upload( return v1beta1ProtoDepRef.CommitId }, ) - response, err := a.clientProvider.V1UploadServiceClient(primaryRegistry).Upload( + response, err := a.moduleClientProvider.V1UploadServiceClient(primaryRegistry).Upload( ctx, connect.NewRequest( &modulev1.UploadRequest{ @@ -376,7 +376,7 @@ func (a *uploader) createContentModuleIfNotExist( if err != nil { return nil, err } - response, err := a.clientProvider.V1ModuleServiceClient(primaryRegistry).CreateModules( + response, err := a.moduleClientProvider.V1ModuleServiceClient(primaryRegistry).CreateModules( ctx, connect.NewRequest( &modulev1.CreateModulesRequest{ @@ -421,7 +421,7 @@ func (a *uploader) validateContentModulesExist( primaryRegistry string, contentModules []bufmodule.Module, ) ([]*modulev1.Module, error) { - response, err := a.clientProvider.V1ModuleServiceClient(primaryRegistry).GetModules( + response, err := a.moduleClientProvider.V1ModuleServiceClient(primaryRegistry).GetModules( ctx, connect.NewRequest( &modulev1.GetModulesRequest{ diff --git a/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_module_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_module_provider.go index e56e011ecd..831755c85f 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_module_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_module_provider.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/cache" ) @@ -30,18 +30,18 @@ import ( // We don't want to persist these across calls - this could grow over time and this cache // isn't an LRU cache, and the information also may change over time. type v1ProtoModuleProvider struct { - logger *slog.Logger - clientProvider bufapi.V1ModuleServiceClientProvider - protoModuleCache cache.Cache[string, *modulev1.Module] + logger *slog.Logger + moduleClientProvider bufregistryapimodule.V1ModuleServiceClientProvider + protoModuleCache cache.Cache[string, *modulev1.Module] } func newV1ProtoModuleProvider( logger *slog.Logger, - clientProvider bufapi.V1ModuleServiceClientProvider, + moduleClientProvider bufregistryapimodule.V1ModuleServiceClientProvider, ) *v1ProtoModuleProvider { return &v1ProtoModuleProvider{ - logger: logger, - clientProvider: clientProvider, + logger: logger, + moduleClientProvider: moduleClientProvider, } } @@ -54,7 +54,7 @@ func (a *v1ProtoModuleProvider) getV1ProtoModuleForProtoModuleID( return a.protoModuleCache.GetOrAdd( registry+"/"+protoModuleID, func() (*modulev1.Module, error) { - response, err := a.clientProvider.V1ModuleServiceClient(registry).GetModules( + response, err := a.moduleClientProvider.V1ModuleServiceClient(registry).GetModules( ctx, connect.NewRequest( &modulev1.GetModulesRequest{ diff --git a/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_owner_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_owner_provider.go index e0cc5504ce..ada9b7a3e3 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_owner_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/v1_proto_owner_provider.go @@ -21,7 +21,7 @@ import ( ownerv1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufapi" + "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/cache" ) @@ -30,18 +30,18 @@ import ( // We don't want to persist these across calls - this could grow over time and this cache // isn't an LRU cache, and the information also may change over time. type v1ProtoOwnerProvider struct { - logger *slog.Logger - clientProvider bufapi.V1OwnerServiceClientProvider - protoOwnerCache cache.Cache[string, *ownerv1.Owner] + logger *slog.Logger + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider + protoOwnerCache cache.Cache[string, *ownerv1.Owner] } func newV1ProtoOwnerProvider( logger *slog.Logger, - clientProvider bufapi.V1OwnerServiceClientProvider, + ownerClientProvider bufregistryapiowner.V1OwnerServiceClientProvider, ) *v1ProtoOwnerProvider { return &v1ProtoOwnerProvider{ - logger: logger, - clientProvider: clientProvider, + logger: logger, + ownerClientProvider: ownerClientProvider, } } @@ -54,7 +54,7 @@ func (a *v1ProtoOwnerProvider) getV1ProtoOwnerForProtoOwnerID( return a.protoOwnerCache.GetOrAdd( registry+"/"+protoOwnerID, func() (*ownerv1.Owner, error) { - response, err := a.clientProvider.V1OwnerServiceClient(registry).GetOwners( + response, err := a.ownerClientProvider.V1OwnerServiceClient(registry).GetOwners( ctx, connect.NewRequest( &ownerv1.GetOwnersRequest{ diff --git a/private/bufpkg/bufapi/bufapi.go b/private/bufpkg/bufregistryapi/bufregistryapimodule/bufregistryapimodule.go similarity index 82% rename from private/bufpkg/bufapi/bufapi.go rename to private/bufpkg/bufregistryapi/bufregistryapimodule/bufregistryapimodule.go index 61be94c414..ee8bd10f0f 100644 --- a/private/bufpkg/bufapi/bufapi.go +++ b/private/bufpkg/bufregistryapi/bufregistryapimodule/bufregistryapimodule.go @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -package bufapi +package bufregistryapimodule import ( "buf.build/gen/go/bufbuild/registry/connectrpc/go/buf/registry/module/v1/modulev1connect" "buf.build/gen/go/bufbuild/registry/connectrpc/go/buf/registry/module/v1beta1/modulev1beta1connect" - "buf.build/gen/go/bufbuild/registry/connectrpc/go/buf/registry/owner/v1/ownerv1connect" "github.com/bufbuild/buf/private/pkg/connectclient" ) @@ -34,12 +33,6 @@ var ( NopV1ModuleServiceClientProvider V1ModuleServiceClientProvider = nopClientProvider{} // NopV1UploadServiceClientProvider is a V1UploadServiceClientProvider that provides unimplemented services for testing. NopV1UploadServiceClientProvider V1UploadServiceClientProvider = nopClientProvider{} - // NopV1OrganizationServiceClientProvider is a V1OrganizationServiceClientProvider that provides unimplemented services for testing. - NopV1OrganizationServiceClientProvider V1OrganizationServiceClientProvider = nopClientProvider{} - // NopV1OwnerServiceClientProvider is a V1OwnerServiceClientProvider that provides unimplemented services for testing. - NopV1OwnerServiceClientProvider V1OwnerServiceClientProvider = nopClientProvider{} - // NopV1UserServiceClientProvider is a V1UserServiceClientProvider that provides unimplemented services for testing. - NopV1UserServiceClientProvider V1UserServiceClientProvider = nopClientProvider{} // NopV1Beta1CommitServiceClientProvider is a V1Beta1CommitServiceClientProvider that provides unimplemented services for testing. NopV1Beta1CommitServiceClientProvider V1Beta1CommitServiceClientProvider = nopClientProvider{} // NopV1Beta1DownloadServiceClientProvider is a V1Beta1DownloadServiceClientProvider that provides unimplemented services for testing. @@ -91,21 +84,6 @@ type V1UploadServiceClientProvider interface { V1UploadServiceClient(registry string) modulev1connect.UploadServiceClient } -// V1OrganizationServiceClientProvider provides OrganizationServiceClients. -type V1OrganizationServiceClientProvider interface { - V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient -} - -// V1OwnerServiceClientProvider provides OwnerServiceClients. -type V1OwnerServiceClientProvider interface { - V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient -} - -// V1UserServiceClientProvider provides UserServiceClients. -type V1UserServiceClientProvider interface { - V1UserServiceClient(registry string) ownerv1connect.UserServiceClient -} - // V1Beta1CommitServiceClientProvider provides CommitServiceClients. type V1Beta1CommitServiceClientProvider interface { V1Beta1CommitServiceClient(registry string) modulev1beta1connect.CommitServiceClient @@ -145,9 +123,6 @@ type ClientProvider interface { V1ModuleServiceClientProvider V1ResourceServiceClientProvider V1UploadServiceClientProvider - V1OrganizationServiceClientProvider - V1OwnerServiceClientProvider - V1UserServiceClientProvider V1Beta1CommitServiceClientProvider V1Beta1DownloadServiceClientProvider V1Beta1GraphServiceClientProvider @@ -229,30 +204,6 @@ func (c *clientProvider) V1UploadServiceClient(registry string) modulev1connect. ) } -func (c *clientProvider) V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient { - return connectclient.Make( - c.clientConfig, - registry, - ownerv1connect.NewOrganizationServiceClient, - ) -} - -func (c *clientProvider) V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient { - return connectclient.Make( - c.clientConfig, - registry, - ownerv1connect.NewOwnerServiceClient, - ) -} - -func (c *clientProvider) V1UserServiceClient(registry string) ownerv1connect.UserServiceClient { - return connectclient.Make( - c.clientConfig, - registry, - ownerv1connect.NewUserServiceClient, - ) -} - func (c *clientProvider) V1Beta1CommitServiceClient(registry string) modulev1beta1connect.CommitServiceClient { return connectclient.Make( c.clientConfig, @@ -331,18 +282,6 @@ func (nopClientProvider) V1UploadServiceClient(registry string) modulev1connect. return modulev1connect.UnimplementedUploadServiceHandler{} } -func (nopClientProvider) V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient { - return ownerv1connect.UnimplementedOrganizationServiceHandler{} -} - -func (nopClientProvider) V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient { - return ownerv1connect.UnimplementedOwnerServiceHandler{} -} - -func (nopClientProvider) V1UserServiceClient(registry string) ownerv1connect.UserServiceClient { - return ownerv1connect.UnimplementedUserServiceHandler{} -} - func (nopClientProvider) V1Beta1CommitServiceClient(registry string) modulev1beta1connect.CommitServiceClient { return modulev1beta1connect.UnimplementedCommitServiceHandler{} } diff --git a/private/bufpkg/bufregistryapi/bufregistryapimodule/usage.gen.go b/private/bufpkg/bufregistryapi/bufregistryapimodule/usage.gen.go new file mode 100644 index 0000000000..99ddb1638b --- /dev/null +++ b/private/bufpkg/bufregistryapi/bufregistryapimodule/usage.gen.go @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated. DO NOT EDIT. + +package bufregistryapimodule + +import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/bufpkg/bufregistryapi/bufregistryapiowner/bufregistryapiowner.go b/private/bufpkg/bufregistryapi/bufregistryapiowner/bufregistryapiowner.go new file mode 100644 index 0000000000..1aa8bf3f60 --- /dev/null +++ b/private/bufpkg/bufregistryapi/bufregistryapiowner/bufregistryapiowner.go @@ -0,0 +1,108 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufregistryapiowner + +import ( + "buf.build/gen/go/bufbuild/registry/connectrpc/go/buf/registry/owner/v1/ownerv1connect" + "github.com/bufbuild/buf/private/pkg/connectclient" +) + +var ( + // NopV1OrganizationServiceClientProvider is a V1OrganizationServiceClientProvider that provides unimplemented services for testing. + NopV1OrganizationServiceClientProvider V1OrganizationServiceClientProvider = nopClientProvider{} + // NopV1OwnerServiceClientProvider is a V1OwnerServiceClientProvider that provides unimplemented services for testing. + NopV1OwnerServiceClientProvider V1OwnerServiceClientProvider = nopClientProvider{} + // NopV1UserServiceClientProvider is a V1UserServiceClientProvider that provides unimplemented services for testing. + NopV1UserServiceClientProvider V1UserServiceClientProvider = nopClientProvider{} + // NopClientProvider is a ClientProvider that provides unimplemented services for testing. + NopClientProvider ClientProvider = nopClientProvider{} +) + +// V1OrganizationServiceClientProvider provides OrganizationServiceClients. +type V1OrganizationServiceClientProvider interface { + V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient +} + +// V1OwnerServiceClientProvider provides OwnerServiceClients. +type V1OwnerServiceClientProvider interface { + V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient +} + +// V1UserServiceClientProvider provides UserServiceClients. +type V1UserServiceClientProvider interface { + V1UserServiceClient(registry string) ownerv1connect.UserServiceClient +} + +// ClientProvider provides API clients for BSR services. +type ClientProvider interface { + V1OrganizationServiceClientProvider + V1OwnerServiceClientProvider + V1UserServiceClientProvider +} + +// NewClientProvider returns a new ClientProvider. +func NewClientProvider(clientConfig *connectclient.Config) ClientProvider { + return newClientProvider(clientConfig) +} + +// *** PRIVATE *** + +type clientProvider struct { + clientConfig *connectclient.Config +} + +func newClientProvider(clientConfig *connectclient.Config) *clientProvider { + return &clientProvider{ + clientConfig: clientConfig, + } +} + +func (c *clientProvider) V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + ownerv1connect.NewOrganizationServiceClient, + ) +} + +func (c *clientProvider) V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + ownerv1connect.NewOwnerServiceClient, + ) +} + +func (c *clientProvider) V1UserServiceClient(registry string) ownerv1connect.UserServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + ownerv1connect.NewUserServiceClient, + ) +} + +type nopClientProvider struct{} + +func (nopClientProvider) V1OrganizationServiceClient(registry string) ownerv1connect.OrganizationServiceClient { + return ownerv1connect.UnimplementedOrganizationServiceHandler{} +} + +func (nopClientProvider) V1OwnerServiceClient(registry string) ownerv1connect.OwnerServiceClient { + return ownerv1connect.UnimplementedOwnerServiceHandler{} +} + +func (nopClientProvider) V1UserServiceClient(registry string) ownerv1connect.UserServiceClient { + return ownerv1connect.UnimplementedUserServiceHandler{} +} diff --git a/private/bufpkg/bufapi/usage.gen.go b/private/bufpkg/bufregistryapi/bufregistryapiowner/usage.gen.go similarity index 96% rename from private/bufpkg/bufapi/usage.gen.go rename to private/bufpkg/bufregistryapi/bufregistryapiowner/usage.gen.go index fc97a7d4c9..e10694f2e2 100644 --- a/private/bufpkg/bufapi/usage.gen.go +++ b/private/bufpkg/bufregistryapi/bufregistryapiowner/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package bufapi +package bufregistryapiowner import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/bufpkg/bufregistryapi/bufregistryapiplugin/bufregistryapiplugin.go b/private/bufpkg/bufregistryapi/bufregistryapiplugin/bufregistryapiplugin.go new file mode 100644 index 0000000000..1cba7fb1f2 --- /dev/null +++ b/private/bufpkg/bufregistryapi/bufregistryapiplugin/bufregistryapiplugin.go @@ -0,0 +1,168 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufregistryapiplugin + +import ( + "buf.build/gen/go/bufbuild/registry/connectrpc/go/buf/registry/plugin/v1beta1/pluginv1beta1connect" + "github.com/bufbuild/buf/private/pkg/connectclient" +) + +var ( + // NopV1Beta1CollectionServiceClientProvider is a V1Beta1CollectionServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1CollectionServiceClientProvider V1Beta1CollectionServiceClientProvider = nopClientProvider{} + // NopV1Beta1CommitServiceClientProvider is a V1Beta1CommitServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1CommitServiceClientProvider V1Beta1CommitServiceClientProvider = nopClientProvider{} + // NopV1Beta1DownloadServiceClientProvider is a V1Beta1DownloadServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1DownloadServiceClientProvider V1Beta1DownloadServiceClientProvider = nopClientProvider{} + // NopV1Beta1LabelServiceClientProvider is a V1Beta1LabelServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1LabelServiceClientProvider V1Beta1LabelServiceClientProvider = nopClientProvider{} + // NopV1Beta1PluginServiceClientProvider is a V1Beta1PluginServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1PluginServiceClientProvider V1Beta1PluginServiceClientProvider = nopClientProvider{} + // NopV1Beta1UploadServiceClientProvider is a V1Beta1UploadServiceClientProvider that provides unimplemented services for testing. + NopV1Beta1UploadServiceClientProvider V1Beta1UploadServiceClientProvider = nopClientProvider{} + // NopClientProvider is a ClientProvider that provides unimplemented services for testing. + NopClientProvider ClientProvider = nopClientProvider{} +) + +// V1Beta1CollectionServiceClientProvider provides CollectionServiceClients. +type V1Beta1CollectionServiceClientProvider interface { + V1Beta1CollectionServiceClient(registry string) pluginv1beta1connect.CollectionServiceClient +} + +// V1Beta1CommitServiceClientProvider provides CommitServiceClients. +type V1Beta1CommitServiceClientProvider interface { + V1Beta1CommitServiceClient(registry string) pluginv1beta1connect.CommitServiceClient +} + +// V1Beta1DownloadServiceClientProvider provides DownloadServiceClients. +type V1Beta1DownloadServiceClientProvider interface { + V1Beta1DownloadServiceClient(registry string) pluginv1beta1connect.DownloadServiceClient +} + +// V1Beta1LabelServiceClientProvider provides LabelServiceClients. +type V1Beta1LabelServiceClientProvider interface { + V1Beta1LabelServiceClient(registry string) pluginv1beta1connect.LabelServiceClient +} + +// V1Beta1PluginServiceClientProvider provides PluginServiceClients. +type V1Beta1PluginServiceClientProvider interface { + V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient +} + +// V1Beta1UploadServiceClientProvider provides UploadServiceClients. +type V1Beta1UploadServiceClientProvider interface { + V1Beta1UploadServiceClient(registry string) pluginv1beta1connect.UploadServiceClient +} + +// ClientProvider provides API clients for BSR services. +type ClientProvider interface { + V1Beta1CollectionServiceClientProvider + V1Beta1CommitServiceClientProvider + V1Beta1DownloadServiceClientProvider + V1Beta1LabelServiceClientProvider + V1Beta1PluginServiceClientProvider + V1Beta1UploadServiceClientProvider +} + +// NewClientProvider returns a new ClientProvider. +func NewClientProvider(clientConfig *connectclient.Config) ClientProvider { + return newClientProvider(clientConfig) +} + +// *** PRIVATE *** + +type clientProvider struct { + clientConfig *connectclient.Config +} + +func newClientProvider(clientConfig *connectclient.Config) *clientProvider { + return &clientProvider{ + clientConfig: clientConfig, + } +} + +func (c *clientProvider) V1Beta1CollectionServiceClient(registry string) pluginv1beta1connect.CollectionServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewCollectionServiceClient, + ) +} + +func (c *clientProvider) V1Beta1CommitServiceClient(registry string) pluginv1beta1connect.CommitServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewCommitServiceClient, + ) +} + +func (c *clientProvider) V1Beta1DownloadServiceClient(registry string) pluginv1beta1connect.DownloadServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewDownloadServiceClient, + ) +} + +func (c *clientProvider) V1Beta1LabelServiceClient(registry string) pluginv1beta1connect.LabelServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewLabelServiceClient, + ) +} + +func (c *clientProvider) V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewPluginServiceClient, + ) +} + +func (c *clientProvider) V1Beta1UploadServiceClient(registry string) pluginv1beta1connect.UploadServiceClient { + return connectclient.Make( + c.clientConfig, + registry, + pluginv1beta1connect.NewUploadServiceClient, + ) +} + +type nopClientProvider struct{} + +func (nopClientProvider) V1Beta1CollectionServiceClient(registry string) pluginv1beta1connect.CollectionServiceClient { + return pluginv1beta1connect.UnimplementedCollectionServiceHandler{} +} + +func (nopClientProvider) V1Beta1CommitServiceClient(registry string) pluginv1beta1connect.CommitServiceClient { + return pluginv1beta1connect.UnimplementedCommitServiceHandler{} +} + +func (nopClientProvider) V1Beta1DownloadServiceClient(registry string) pluginv1beta1connect.DownloadServiceClient { + return pluginv1beta1connect.UnimplementedDownloadServiceHandler{} +} + +func (nopClientProvider) V1Beta1LabelServiceClient(registry string) pluginv1beta1connect.LabelServiceClient { + return pluginv1beta1connect.UnimplementedLabelServiceHandler{} +} + +func (nopClientProvider) V1Beta1PluginServiceClient(registry string) pluginv1beta1connect.PluginServiceClient { + return pluginv1beta1connect.UnimplementedPluginServiceHandler{} +} + +func (nopClientProvider) V1Beta1UploadServiceClient(registry string) pluginv1beta1connect.UploadServiceClient { + return pluginv1beta1connect.UnimplementedUploadServiceHandler{} +} diff --git a/private/bufpkg/bufregistryapi/bufregistryapiplugin/usage.gen.go b/private/bufpkg/bufregistryapi/bufregistryapiplugin/usage.gen.go new file mode 100644 index 0000000000..51d5332374 --- /dev/null +++ b/private/bufpkg/bufregistryapi/bufregistryapiplugin/usage.gen.go @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated. DO NOT EDIT. + +package bufregistryapiplugin + +import _ "github.com/bufbuild/buf/private/usage" From b5f41e388b22f006bcc51e5afd0488fb23e7e0d7 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Tue, 29 Oct 2024 13:30:27 -0400 Subject: [PATCH 07/34] Fix LSP leading comment formatting (#3424) --- private/buf/buflsp/server.go | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/private/buf/buflsp/server.go b/private/buf/buflsp/server.go index eaf1f3c724..737e3f2346 100644 --- a/private/buf/buflsp/server.go +++ b/private/buf/buflsp/server.go @@ -215,9 +215,32 @@ func (s *server) Formatting( return nil, err } + // XXX: The current compiler does not expose a span for the full file. Instead of + // potentially undershooting the correct span (which can cause comments at the + // start and end of the file to be duplicated), we instead manually count up the + // number of lines in the file. This is comparatively cheap, compared to sending the + // entire file over a domain socket. + var lastLine, lastLineStart int + for i := 0; i < len(file.text); i++ { + // NOTE: we are iterating over bytes, not runes. + if file.text[i] == '\n' { + lastLine++ + lastLineStart = i + 1 // Skip the \n. + } + } + lastChar := len(file.text[lastLineStart:]) - 1 // Bytes, not runes! return []protocol.TextEdit{ { - Range: infoToRange(file.fileNode.NodeInfo(file.fileNode)), + Range: protocol.Range{ + Start: protocol.Position{ + Line: 0, + Character: 0, + }, + End: protocol.Position{ + Line: uint32(lastLine), + Character: uint32(lastChar), + }, + }, NewText: out.String(), }, }, nil From ed28039c28f9835bf30cf94be4a0dc94214e065d Mon Sep 17 00:00:00 2001 From: Doria Keung Date: Tue, 29 Oct 2024 14:16:52 -0400 Subject: [PATCH 08/34] Add `buf registry whoami` command (#3416) Co-authored-by: Edward McFarlane --- CHANGELOG.md | 3 +- private/buf/bufprint/bufprint.go | 18 +++ private/buf/cmd/buf/buf.go | 2 + .../registry/registrylogin/registrylogin.go | 3 +- .../buf/command/registry/whoami/usage.gen.go | 19 +++ .../cmd/buf/command/registry/whoami/whoami.go | 139 ++++++++++++++++++ 6 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 private/buf/cmd/buf/command/registry/whoami/usage.gen.go create mode 100644 private/buf/cmd/buf/command/registry/whoami/whoami.go diff --git a/CHANGELOG.md b/CHANGELOG.md index ddbdc67d3b..0a0ded5ba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## [Unreleased] -- No changes yet. +- Add `buf registry whoami` command, which checks if you are logged in to the Buf Schema + Registry at a given domain. ## [v1.45.0] - 2024-10-08 diff --git a/private/buf/bufprint/bufprint.go b/private/buf/bufprint/bufprint.go index 1647a41f93..75b95b573a 100644 --- a/private/buf/bufprint/bufprint.go +++ b/private/buf/bufprint/bufprint.go @@ -248,6 +248,15 @@ func NewOrganizationEntity(organization *ownerv1.Organization, remote string) En } } +// NewUserEntity returns a new user entity to print. +func NewUserEntity(user *registryv1alpha1.User) Entity { + return outputUser{ + Username: user.Username, + // We use the Username as the full name for the user when printing. + FullName: user.Username, + } +} + // CuratedPluginPrinter is a printer for curated plugins. type CuratedPluginPrinter interface { PrintCuratedPlugin(ctx context.Context, format Format, plugin *registryv1alpha1.CuratedPlugin) error @@ -456,3 +465,12 @@ type outputOrganization struct { func (o outputOrganization) fullName() string { return o.FullName } + +type outputUser struct { + Username string `json:"username,omitempty"` + FullName string `json:"-" bufprint:"Name"` +} + +func (o outputUser) fullName() string { + return o.FullName +} diff --git a/private/buf/cmd/buf/buf.go b/private/buf/cmd/buf/buf.go index 1793958ce2..277c88d653 100644 --- a/private/buf/cmd/buf/buf.go +++ b/private/buf/cmd/buf/buf.go @@ -85,6 +85,7 @@ import ( "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/sdk/version" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/whoami" "github.com/bufbuild/buf/private/bufpkg/bufcobra" "github.com/bufbuild/buf/private/bufpkg/bufconnect" "github.com/bufbuild/buf/private/bufpkg/bufmodule" @@ -176,6 +177,7 @@ func NewRootCommand(name string) *appcmd.Command { SubCommands: []*appcmd.Command{ registrylogin.NewCommand("login", builder), registrylogout.NewCommand("logout", builder), + whoami.NewCommand("whoami", builder), registrycc.NewCommand("cc", builder, ``, false), { Use: "commit", diff --git a/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go b/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go index 550c5016aa..184b98f03e 100644 --- a/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go +++ b/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go @@ -34,6 +34,7 @@ import ( "github.com/bufbuild/buf/private/pkg/netext" "github.com/bufbuild/buf/private/pkg/netrc" "github.com/bufbuild/buf/private/pkg/oauth2" + "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/transport/http/httpclient" "github.com/pkg/browser" "github.com/spf13/pflag" @@ -210,7 +211,7 @@ func inner( } user := resp.Msg.User if user == nil { - return errors.New("no user found for provided token") + return syserror.New("no user found for registry login token") } if err := netrc.PutMachines( container, diff --git a/private/buf/cmd/buf/command/registry/whoami/usage.gen.go b/private/buf/cmd/buf/command/registry/whoami/usage.gen.go new file mode 100644 index 0000000000..d260922272 --- /dev/null +++ b/private/buf/cmd/buf/command/registry/whoami/usage.gen.go @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated. DO NOT EDIT. + +package whoami + +import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/whoami/whoami.go b/private/buf/cmd/buf/command/registry/whoami/whoami.go new file mode 100644 index 0000000000..9d2bbec32b --- /dev/null +++ b/private/buf/cmd/buf/command/registry/whoami/whoami.go @@ -0,0 +1,139 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package whoami + +import ( + "context" + "errors" + "fmt" + + "connectrpc.com/connect" + "github.com/bufbuild/buf/private/buf/bufcli" + "github.com/bufbuild/buf/private/buf/bufprint" + "github.com/bufbuild/buf/private/bufpkg/bufconnect" + "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect" + registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1" + "github.com/bufbuild/buf/private/pkg/app/appcmd" + "github.com/bufbuild/buf/private/pkg/app/appext" + "github.com/bufbuild/buf/private/pkg/connectclient" + "github.com/bufbuild/buf/private/pkg/netext" + "github.com/spf13/pflag" +) + +const ( + formatFlagName = "format" + + loginCommand = "buf registry login" +) + +// NewCommand returns a new Command. +func NewCommand( + name string, + builder appext.SubCommandBuilder, +) *appcmd.Command { + flags := newFlags() + return &appcmd.Command{ + Use: name + " ", + Short: `Check if you are logged in to the Buf Schema Registry`, + Long: `This command checks if you are currently logged into the Buf Schema Registry at the provided . +The argument will default to buf.build if not specified.`, + Args: appcmd.MaximumNArgs(1), + Run: builder.NewRunFunc( + func(ctx context.Context, container appext.Container) error { + return run(ctx, container, flags) + }, + ), + BindFlags: flags.Bind, + } +} + +type flags struct { + Format string +} + +func newFlags() *flags { + return &flags{} +} + +func (f *flags) Bind(flagSet *pflag.FlagSet) { + flagSet.StringVar( + &f.Format, + formatFlagName, + bufprint.FormatText.String(), + fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString), + ) +} + +func run( + ctx context.Context, + container appext.Container, + flags *flags, +) error { + remote := bufconnect.DefaultRemote + if container.NumArgs() == 1 { + remote = container.Arg(0) + if _, err := netext.ValidateHostname(remote); err != nil { + return err + } + } + clientConfig, err := bufcli.NewConnectClientConfig(container) + if err != nil { + return err + } + authnService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewAuthnServiceClient) + currentUserResponse, err := authnService.GetCurrentUser(ctx, connect.NewRequest(®istryv1alpha1.GetCurrentUserRequest{})) + if err != nil { + if connectErr := new(connect.Error); errors.As(err, &connectErr) && connectErr.Code() == connect.CodeUnauthenticated { + return fmt.Errorf("Not currently logged in for %s.", remote) + } + return err + } + user := currentUserResponse.Msg.User + if user == nil { + return fmt.Errorf( + `No user is logged in to %s. Run %q to refresh your credentials. If you have the %s environment variable set, ensure that the token is valid.`, + remote, + loginCommandForRemote(remote), + bufconnect.TokenEnvKey, + ) + } + format, err := bufprint.ParseFormat(flags.Format) + if err != nil { + return appcmd.WrapInvalidArgumentError(err) + } + // ParseFormat always expects a format that is either text or json, otherwise it returns + // an error, so do not need a default case for this switch. + switch format { + case bufprint.FormatText: + _, err = fmt.Fprintf(container.Stdout(), "Logged in as %s.\n", user.Username) + return err + case bufprint.FormatJSON: + return bufprint.PrintEntity( + container.Stdout(), + format, + bufprint.NewUserEntity(user), + ) + } + return nil +} + +// loginCommandForRemote returns the login command for the given remote, +// the default remote is excluded in the command. +func loginCommandForRemote(remote string) string { + if remote == bufconnect.DefaultRemote { + return loginCommand + } + return fmt.Sprintf("%s %s", loginCommand, remote) +} From f9856b2e60beca0f34a9b41f17c34962f397baf6 Mon Sep 17 00:00:00 2001 From: Tommy Ma <33741651+cyinma@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:30:43 -0400 Subject: [PATCH 09/34] Add audit logging resource and events for check plugin (#3430) --- .../go/buf/alpha/audit/v1alpha1/event.pb.go | 1917 +++++++++-------- proto/buf/alpha/audit/v1alpha1/event.proto | 31 +- 2 files changed, 1074 insertions(+), 874 deletions(-) diff --git a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go index 5c4c47d62b..f539d614f0 100644 --- a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go +++ b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go @@ -99,6 +99,7 @@ const ( ResourceType_RESOURCE_TYPE_REPOSITORY ResourceType = 4 ResourceType_RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR ResourceType = 5 ResourceType_RESOURCE_TYPE_REPOSITORY_COMMIT ResourceType = 6 + ResourceType_RESOURCE_TYPE_PLUGIN ResourceType = 7 ResourceType_RESOURCE_TYPE_CURATED_PLUGIN ResourceType = 8 ResourceType_RESOURCE_TYPE_TOKEN ResourceType = 10 ResourceType_RESOURCE_TYPE_SCIM_TOKEN ResourceType = 11 @@ -118,6 +119,7 @@ var ( 4: "RESOURCE_TYPE_REPOSITORY", 5: "RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR", 6: "RESOURCE_TYPE_REPOSITORY_COMMIT", + 7: "RESOURCE_TYPE_PLUGIN", 8: "RESOURCE_TYPE_CURATED_PLUGIN", 10: "RESOURCE_TYPE_TOKEN", 11: "RESOURCE_TYPE_SCIM_TOKEN", @@ -134,6 +136,7 @@ var ( "RESOURCE_TYPE_REPOSITORY": 4, "RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR": 5, "RESOURCE_TYPE_REPOSITORY_COMMIT": 6, + "RESOURCE_TYPE_PLUGIN": 7, "RESOURCE_TYPE_CURATED_PLUGIN": 8, "RESOURCE_TYPE_TOKEN": 10, "RESOURCE_TYPE_SCIM_TOKEN": 11, @@ -174,25 +177,23 @@ func (ResourceType) EnumDescriptor() ([]byte, []int) { type EventType int32 const ( - EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 - EventType_EVENT_TYPE_ORGANIZATION_CREATED EventType = 1 - EventType_EVENT_TYPE_ORGANIZATION_DELETED EventType = 2 - EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ADDED EventType = 3 - EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ROLE_CHANGED EventType = 4 - EventType_EVENT_TYPE_ORGANIZATION_MEMBER_REMOVED EventType = 5 - EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_ADDED EventType = 21 - EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_REMOVED EventType = 22 - EventType_EVENT_TYPE_REPOSITORY_CREATED EventType = 6 - EventType_EVENT_TYPE_REPOSITORY_DELETED EventType = 7 - EventType_EVENT_TYPE_REPOSITORY_COMMIT_PUSHED EventType = 8 - EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ADDED EventType = 9 - EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ROLE_CHANGED EventType = 10 - EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED EventType = 11 - EventType_EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED EventType = 12 - EventType_EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED EventType = 40 - // Deprecated: Marked as deprecated in buf/alpha/audit/v1alpha1/event.proto. - EventType_EVENT_TYPE_PLUGIN_CREATED EventType = 13 - // Deprecated: Marked as deprecated in buf/alpha/audit/v1alpha1/event.proto. + EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 + EventType_EVENT_TYPE_ORGANIZATION_CREATED EventType = 1 + EventType_EVENT_TYPE_ORGANIZATION_DELETED EventType = 2 + EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ADDED EventType = 3 + EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ROLE_CHANGED EventType = 4 + EventType_EVENT_TYPE_ORGANIZATION_MEMBER_REMOVED EventType = 5 + EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_ADDED EventType = 21 + EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_REMOVED EventType = 22 + EventType_EVENT_TYPE_REPOSITORY_CREATED EventType = 6 + EventType_EVENT_TYPE_REPOSITORY_DELETED EventType = 7 + EventType_EVENT_TYPE_REPOSITORY_COMMIT_PUSHED EventType = 8 + EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ADDED EventType = 9 + EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ROLE_CHANGED EventType = 10 + EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED EventType = 11 + EventType_EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED EventType = 12 + EventType_EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED EventType = 40 + EventType_EVENT_TYPE_PLUGIN_CREATED EventType = 13 EventType_EVENT_TYPE_PLUGIN_DELETED EventType = 14 EventType_EVENT_TYPE_CURATED_PLUGIN_CREATED EventType = 20 EventType_EVENT_TYPE_CURATED_PLUGIN_DELETED EventType = 31 @@ -574,6 +575,8 @@ type Event struct { // *Event_RepositoryContributorRemoved // *Event_RepositoryVisibilityChanged // *Event_RepositoryDefaultLabelNameChanged + // *Event_PluginCreated + // *Event_PluginDeleted // *Event_UserCreated // *Event_UserDeactivated // *Event_UserDeleted @@ -774,6 +777,20 @@ func (x *Event) GetRepositoryDefaultLabelNameChanged() *PayloadRepositoryDefault return nil } +func (x *Event) GetPluginCreated() *PayloadPluginCreated { + if x, ok := x.GetPayload().(*Event_PluginCreated); ok { + return x.PluginCreated + } + return nil +} + +func (x *Event) GetPluginDeleted() *PayloadPluginDeleted { + if x, ok := x.GetPayload().(*Event_PluginDeleted); ok { + return x.PluginDeleted + } + return nil +} + func (x *Event) GetUserCreated() *PayloadUserCreated { if x, ok := x.GetPayload().(*Event_UserCreated); ok { return x.UserCreated @@ -1019,6 +1036,14 @@ type Event_RepositoryDefaultLabelNameChanged struct { RepositoryDefaultLabelNameChanged *PayloadRepositoryDefaultLabelNameChanged `protobuf:"bytes,46,opt,name=repository_default_label_name_changed,json=repositoryDefaultLabelNameChanged,proto3,oneof"` } +type Event_PluginCreated struct { + PluginCreated *PayloadPluginCreated `protobuf:"bytes,19,opt,name=plugin_created,json=pluginCreated,proto3,oneof"` +} + +type Event_PluginDeleted struct { + PluginDeleted *PayloadPluginDeleted `protobuf:"bytes,20,opt,name=plugin_deleted,json=pluginDeleted,proto3,oneof"` +} + type Event_UserCreated struct { UserCreated *PayloadUserCreated `protobuf:"bytes,21,opt,name=user_created,json=userCreated,proto3,oneof"` } @@ -1153,6 +1178,10 @@ func (*Event_RepositoryVisibilityChanged) isEvent_Payload() {} func (*Event_RepositoryDefaultLabelNameChanged) isEvent_Payload() {} +func (*Event_PluginCreated) isEvent_Payload() {} + +func (*Event_PluginDeleted) isEvent_Payload() {} + func (*Event_UserCreated) isEvent_Payload() {} func (*Event_UserDeactivated) isEvent_Payload() {} @@ -2347,6 +2376,134 @@ func (x *PayloadRepositoryDefaultBranchChanged) GetNewDefaultBranch() string { return "" } +type PayloadPluginCreated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner_id is the id of the owner of the plugin. + OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // owner_name is the name of the owner of the plugin. + OwnerName string `protobuf:"bytes,2,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"` + // plugin_type is the type of the plugin. + PluginType string `protobuf:"bytes,3,opt,name=plugin_type,json=pluginType,proto3" json:"plugin_type,omitempty"` +} + +func (x *PayloadPluginCreated) Reset() { + *x = PayloadPluginCreated{} + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PayloadPluginCreated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadPluginCreated) ProtoMessage() {} + +func (x *PayloadPluginCreated) ProtoReflect() protoreflect.Message { + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayloadPluginCreated.ProtoReflect.Descriptor instead. +func (*PayloadPluginCreated) Descriptor() ([]byte, []int) { + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{20} +} + +func (x *PayloadPluginCreated) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *PayloadPluginCreated) GetOwnerName() string { + if x != nil { + return x.OwnerName + } + return "" +} + +func (x *PayloadPluginCreated) GetPluginType() string { + if x != nil { + return x.PluginType + } + return "" +} + +type PayloadPluginDeleted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner_id is the id of the owner of the check plugin. + OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // owner_name is the name of the owner of the check plugin. + OwnerName string `protobuf:"bytes,2,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"` + // plugin_type is the type of the plugin. + PluginType string `protobuf:"bytes,3,opt,name=plugin_type,json=pluginType,proto3" json:"plugin_type,omitempty"` +} + +func (x *PayloadPluginDeleted) Reset() { + *x = PayloadPluginDeleted{} + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PayloadPluginDeleted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadPluginDeleted) ProtoMessage() {} + +func (x *PayloadPluginDeleted) ProtoReflect() protoreflect.Message { + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayloadPluginDeleted.ProtoReflect.Descriptor instead. +func (*PayloadPluginDeleted) Descriptor() ([]byte, []int) { + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{21} +} + +func (x *PayloadPluginDeleted) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *PayloadPluginDeleted) GetOwnerName() string { + if x != nil { + return x.OwnerName + } + return "" +} + +func (x *PayloadPluginDeleted) GetPluginType() string { + if x != nil { + return x.PluginType + } + return "" +} + type PayloadUserCreated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2355,7 +2512,7 @@ type PayloadUserCreated struct { func (x *PayloadUserCreated) Reset() { *x = PayloadUserCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[20] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2367,7 +2524,7 @@ func (x *PayloadUserCreated) String() string { func (*PayloadUserCreated) ProtoMessage() {} func (x *PayloadUserCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[20] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2380,7 +2537,7 @@ func (x *PayloadUserCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserCreated.ProtoReflect.Descriptor instead. func (*PayloadUserCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{20} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{22} } type PayloadUserReactivated struct { @@ -2391,7 +2548,7 @@ type PayloadUserReactivated struct { func (x *PayloadUserReactivated) Reset() { *x = PayloadUserReactivated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[21] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2403,7 +2560,7 @@ func (x *PayloadUserReactivated) String() string { func (*PayloadUserReactivated) ProtoMessage() {} func (x *PayloadUserReactivated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[21] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2416,7 +2573,7 @@ func (x *PayloadUserReactivated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserReactivated.ProtoReflect.Descriptor instead. func (*PayloadUserReactivated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{21} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{23} } type PayloadUserDeactivated struct { @@ -2427,7 +2584,7 @@ type PayloadUserDeactivated struct { func (x *PayloadUserDeactivated) Reset() { *x = PayloadUserDeactivated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2439,7 +2596,7 @@ func (x *PayloadUserDeactivated) String() string { func (*PayloadUserDeactivated) ProtoMessage() {} func (x *PayloadUserDeactivated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2452,7 +2609,7 @@ func (x *PayloadUserDeactivated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserDeactivated.ProtoReflect.Descriptor instead. func (*PayloadUserDeactivated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{22} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{24} } type PayloadUserDeleted struct { @@ -2463,7 +2620,7 @@ type PayloadUserDeleted struct { func (x *PayloadUserDeleted) Reset() { *x = PayloadUserDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2475,7 +2632,7 @@ func (x *PayloadUserDeleted) String() string { func (*PayloadUserDeleted) ProtoMessage() {} func (x *PayloadUserDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2488,7 +2645,7 @@ func (x *PayloadUserDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserDeleted.ProtoReflect.Descriptor instead. func (*PayloadUserDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{23} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{25} } type PayloadUserLoggedIn struct { @@ -2499,7 +2656,7 @@ type PayloadUserLoggedIn struct { func (x *PayloadUserLoggedIn) Reset() { *x = PayloadUserLoggedIn{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2511,7 +2668,7 @@ func (x *PayloadUserLoggedIn) String() string { func (*PayloadUserLoggedIn) ProtoMessage() {} func (x *PayloadUserLoggedIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2524,7 +2681,7 @@ func (x *PayloadUserLoggedIn) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserLoggedIn.ProtoReflect.Descriptor instead. func (*PayloadUserLoggedIn) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{24} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{26} } type PayloadUserLoggedOut struct { @@ -2535,7 +2692,7 @@ type PayloadUserLoggedOut struct { func (x *PayloadUserLoggedOut) Reset() { *x = PayloadUserLoggedOut{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2547,7 +2704,7 @@ func (x *PayloadUserLoggedOut) String() string { func (*PayloadUserLoggedOut) ProtoMessage() {} func (x *PayloadUserLoggedOut) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2560,7 +2717,7 @@ func (x *PayloadUserLoggedOut) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserLoggedOut.ProtoReflect.Descriptor instead. func (*PayloadUserLoggedOut) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{25} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{27} } // PayloadUserAutoMergedFromNewIdP is the payload for the audit event @@ -2575,7 +2732,7 @@ type PayloadUserAutoMergedFromNewIdP struct { func (x *PayloadUserAutoMergedFromNewIdP) Reset() { *x = PayloadUserAutoMergedFromNewIdP{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2587,7 +2744,7 @@ func (x *PayloadUserAutoMergedFromNewIdP) String() string { func (*PayloadUserAutoMergedFromNewIdP) ProtoMessage() {} func (x *PayloadUserAutoMergedFromNewIdP) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2600,7 +2757,7 @@ func (x *PayloadUserAutoMergedFromNewIdP) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserAutoMergedFromNewIdP.ProtoReflect.Descriptor instead. func (*PayloadUserAutoMergedFromNewIdP) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{26} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{28} } type PayloadCuratedPluginCreated struct { @@ -2616,7 +2773,7 @@ type PayloadCuratedPluginCreated struct { func (x *PayloadCuratedPluginCreated) Reset() { *x = PayloadCuratedPluginCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2628,7 +2785,7 @@ func (x *PayloadCuratedPluginCreated) String() string { func (*PayloadCuratedPluginCreated) ProtoMessage() {} func (x *PayloadCuratedPluginCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2641,7 +2798,7 @@ func (x *PayloadCuratedPluginCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadCuratedPluginCreated.ProtoReflect.Descriptor instead. func (*PayloadCuratedPluginCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{27} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{29} } func (x *PayloadCuratedPluginCreated) GetOwnerId() string { @@ -2671,7 +2828,7 @@ type PayloadCuratedPluginDeleted struct { func (x *PayloadCuratedPluginDeleted) Reset() { *x = PayloadCuratedPluginDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2683,7 +2840,7 @@ func (x *PayloadCuratedPluginDeleted) String() string { func (*PayloadCuratedPluginDeleted) ProtoMessage() {} func (x *PayloadCuratedPluginDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2696,7 +2853,7 @@ func (x *PayloadCuratedPluginDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadCuratedPluginDeleted.ProtoReflect.Descriptor instead. func (*PayloadCuratedPluginDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{28} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{30} } func (x *PayloadCuratedPluginDeleted) GetOwnerId() string { @@ -2726,7 +2883,7 @@ type PayloadTokenCreated struct { func (x *PayloadTokenCreated) Reset() { *x = PayloadTokenCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2738,7 +2895,7 @@ func (x *PayloadTokenCreated) String() string { func (*PayloadTokenCreated) ProtoMessage() {} func (x *PayloadTokenCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2751,7 +2908,7 @@ func (x *PayloadTokenCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTokenCreated.ProtoReflect.Descriptor instead. func (*PayloadTokenCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{29} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{31} } func (x *PayloadTokenCreated) GetOwnerId() string { @@ -2779,7 +2936,7 @@ type PayloadTokenDeleted struct { func (x *PayloadTokenDeleted) Reset() { *x = PayloadTokenDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2791,7 +2948,7 @@ func (x *PayloadTokenDeleted) String() string { func (*PayloadTokenDeleted) ProtoMessage() {} func (x *PayloadTokenDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2804,7 +2961,7 @@ func (x *PayloadTokenDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTokenDeleted.ProtoReflect.Descriptor instead. func (*PayloadTokenDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{30} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{32} } func (x *PayloadTokenDeleted) GetOwnerId() string { @@ -2825,7 +2982,7 @@ type PayloadSCIMTokenCreated struct { func (x *PayloadSCIMTokenCreated) Reset() { *x = PayloadSCIMTokenCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2837,7 +2994,7 @@ func (x *PayloadSCIMTokenCreated) String() string { func (*PayloadSCIMTokenCreated) ProtoMessage() {} func (x *PayloadSCIMTokenCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2850,7 +3007,7 @@ func (x *PayloadSCIMTokenCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSCIMTokenCreated.ProtoReflect.Descriptor instead. func (*PayloadSCIMTokenCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{31} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{33} } func (x *PayloadSCIMTokenCreated) GetTokenExpiryTime() *timestamppb.Timestamp { @@ -2868,7 +3025,7 @@ type PayloadSCIMTokenDeleted struct { func (x *PayloadSCIMTokenDeleted) Reset() { *x = PayloadSCIMTokenDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2880,7 +3037,7 @@ func (x *PayloadSCIMTokenDeleted) String() string { func (*PayloadSCIMTokenDeleted) ProtoMessage() {} func (x *PayloadSCIMTokenDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2893,7 +3050,7 @@ func (x *PayloadSCIMTokenDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSCIMTokenDeleted.ProtoReflect.Descriptor instead. func (*PayloadSCIMTokenDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{32} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{34} } type PayloadRepositoryCommitDeleted struct { @@ -2915,7 +3072,7 @@ type PayloadRepositoryCommitDeleted struct { func (x *PayloadRepositoryCommitDeleted) Reset() { *x = PayloadRepositoryCommitDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2927,7 +3084,7 @@ func (x *PayloadRepositoryCommitDeleted) String() string { func (*PayloadRepositoryCommitDeleted) ProtoMessage() {} func (x *PayloadRepositoryCommitDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2940,7 +3097,7 @@ func (x *PayloadRepositoryCommitDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryCommitDeleted.ProtoReflect.Descriptor instead. func (*PayloadRepositoryCommitDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{33} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{35} } func (x *PayloadRepositoryCommitDeleted) GetOwnerId() string { @@ -3001,7 +3158,7 @@ type PayloadRepositoryLabelCreated struct { func (x *PayloadRepositoryLabelCreated) Reset() { *x = PayloadRepositoryLabelCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3013,7 +3170,7 @@ func (x *PayloadRepositoryLabelCreated) String() string { func (*PayloadRepositoryLabelCreated) ProtoMessage() {} func (x *PayloadRepositoryLabelCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3026,7 +3183,7 @@ func (x *PayloadRepositoryLabelCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelCreated.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{34} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{36} } func (x *PayloadRepositoryLabelCreated) GetOwnerId() string { @@ -3097,7 +3254,7 @@ type PayloadRepositoryLabelMoved struct { func (x *PayloadRepositoryLabelMoved) Reset() { *x = PayloadRepositoryLabelMoved{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3109,7 +3266,7 @@ func (x *PayloadRepositoryLabelMoved) String() string { func (*PayloadRepositoryLabelMoved) ProtoMessage() {} func (x *PayloadRepositoryLabelMoved) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3122,7 +3279,7 @@ func (x *PayloadRepositoryLabelMoved) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelMoved.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelMoved) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{35} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{37} } func (x *PayloadRepositoryLabelMoved) GetOwnerId() string { @@ -3192,7 +3349,7 @@ type PayloadRepositoryLabelArchived struct { func (x *PayloadRepositoryLabelArchived) Reset() { *x = PayloadRepositoryLabelArchived{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3204,7 +3361,7 @@ func (x *PayloadRepositoryLabelArchived) String() string { func (*PayloadRepositoryLabelArchived) ProtoMessage() {} func (x *PayloadRepositoryLabelArchived) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3217,7 +3374,7 @@ func (x *PayloadRepositoryLabelArchived) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelArchived.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelArchived) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{36} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{38} } func (x *PayloadRepositoryLabelArchived) GetOwnerId() string { @@ -3265,7 +3422,7 @@ type PayloadRepositoryLabelUnarchived struct { func (x *PayloadRepositoryLabelUnarchived) Reset() { *x = PayloadRepositoryLabelUnarchived{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3277,7 +3434,7 @@ func (x *PayloadRepositoryLabelUnarchived) String() string { func (*PayloadRepositoryLabelUnarchived) ProtoMessage() {} func (x *PayloadRepositoryLabelUnarchived) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3290,7 +3447,7 @@ func (x *PayloadRepositoryLabelUnarchived) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelUnarchived.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelUnarchived) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{37} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{39} } func (x *PayloadRepositoryLabelUnarchived) GetOwnerId() string { @@ -3334,7 +3491,7 @@ type PayloadServerBreakingChangePolicyEnabled struct { func (x *PayloadServerBreakingChangePolicyEnabled) Reset() { *x = PayloadServerBreakingChangePolicyEnabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3346,7 +3503,7 @@ func (x *PayloadServerBreakingChangePolicyEnabled) String() string { func (*PayloadServerBreakingChangePolicyEnabled) ProtoMessage() {} func (x *PayloadServerBreakingChangePolicyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3359,7 +3516,7 @@ func (x *PayloadServerBreakingChangePolicyEnabled) ProtoReflect() protoreflect.M // Deprecated: Use PayloadServerBreakingChangePolicyEnabled.ProtoReflect.Descriptor instead. func (*PayloadServerBreakingChangePolicyEnabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{38} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{40} } func (x *PayloadServerBreakingChangePolicyEnabled) GetCategory() v1alpha1.BreakingChangeCategory { @@ -3384,7 +3541,7 @@ type PayloadServerBreakingChangePolicyDisabled struct { func (x *PayloadServerBreakingChangePolicyDisabled) Reset() { *x = PayloadServerBreakingChangePolicyDisabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3396,7 +3553,7 @@ func (x *PayloadServerBreakingChangePolicyDisabled) String() string { func (*PayloadServerBreakingChangePolicyDisabled) ProtoMessage() {} func (x *PayloadServerBreakingChangePolicyDisabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3409,7 +3566,7 @@ func (x *PayloadServerBreakingChangePolicyDisabled) ProtoReflect() protoreflect. // Deprecated: Use PayloadServerBreakingChangePolicyDisabled.ProtoReflect.Descriptor instead. func (*PayloadServerBreakingChangePolicyDisabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{39} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{41} } type PayloadServerUniquenessPolicyEnabled struct { @@ -3420,7 +3577,7 @@ type PayloadServerUniquenessPolicyEnabled struct { func (x *PayloadServerUniquenessPolicyEnabled) Reset() { *x = PayloadServerUniquenessPolicyEnabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3432,7 +3589,7 @@ func (x *PayloadServerUniquenessPolicyEnabled) String() string { func (*PayloadServerUniquenessPolicyEnabled) ProtoMessage() {} func (x *PayloadServerUniquenessPolicyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3445,7 +3602,7 @@ func (x *PayloadServerUniquenessPolicyEnabled) ProtoReflect() protoreflect.Messa // Deprecated: Use PayloadServerUniquenessPolicyEnabled.ProtoReflect.Descriptor instead. func (*PayloadServerUniquenessPolicyEnabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{40} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{42} } type PayloadServerUniquenessPolicyDisabled struct { @@ -3456,7 +3613,7 @@ type PayloadServerUniquenessPolicyDisabled struct { func (x *PayloadServerUniquenessPolicyDisabled) Reset() { *x = PayloadServerUniquenessPolicyDisabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3468,7 +3625,7 @@ func (x *PayloadServerUniquenessPolicyDisabled) String() string { func (*PayloadServerUniquenessPolicyDisabled) ProtoMessage() {} func (x *PayloadServerUniquenessPolicyDisabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3481,7 +3638,7 @@ func (x *PayloadServerUniquenessPolicyDisabled) ProtoReflect() protoreflect.Mess // Deprecated: Use PayloadServerUniquenessPolicyDisabled.ProtoReflect.Descriptor instead. func (*PayloadServerUniquenessPolicyDisabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{41} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{43} } type PayloadDeviceAuthorizationGrantApproved struct { @@ -3495,7 +3652,7 @@ type PayloadDeviceAuthorizationGrantApproved struct { func (x *PayloadDeviceAuthorizationGrantApproved) Reset() { *x = PayloadDeviceAuthorizationGrantApproved{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3507,7 +3664,7 @@ func (x *PayloadDeviceAuthorizationGrantApproved) String() string { func (*PayloadDeviceAuthorizationGrantApproved) ProtoMessage() {} func (x *PayloadDeviceAuthorizationGrantApproved) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3520,7 +3677,7 @@ func (x *PayloadDeviceAuthorizationGrantApproved) ProtoReflect() protoreflect.Me // Deprecated: Use PayloadDeviceAuthorizationGrantApproved.ProtoReflect.Descriptor instead. func (*PayloadDeviceAuthorizationGrantApproved) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{42} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{44} } func (x *PayloadDeviceAuthorizationGrantApproved) GetClientId() string { @@ -3541,7 +3698,7 @@ type PayloadDeviceAuthorizationGrantDenied struct { func (x *PayloadDeviceAuthorizationGrantDenied) Reset() { *x = PayloadDeviceAuthorizationGrantDenied{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3553,7 +3710,7 @@ func (x *PayloadDeviceAuthorizationGrantDenied) String() string { func (*PayloadDeviceAuthorizationGrantDenied) ProtoMessage() {} func (x *PayloadDeviceAuthorizationGrantDenied) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3566,7 +3723,7 @@ func (x *PayloadDeviceAuthorizationGrantDenied) ProtoReflect() protoreflect.Mess // Deprecated: Use PayloadDeviceAuthorizationGrantDenied.ProtoReflect.Descriptor instead. func (*PayloadDeviceAuthorizationGrantDenied) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{43} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{45} } func (x *PayloadDeviceAuthorizationGrantDenied) GetClientId() string { @@ -3611,7 +3768,7 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xa2, 0x28, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xa8, 0x29, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, @@ -3734,472 +3891,327 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x48, 0x00, 0x52, 0x21, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, - 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, - 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x57, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, - 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, - 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, - 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, - 0x6e, 0x12, 0x58, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, - 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, - 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x75, 0x73, - 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x6d, 0x0a, 0x16, 0x63, - 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x0f, 0x69, 0x64, - 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x1b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x0d, 0x69, 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x12, 0x6a, 0x0a, 0x11, 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x64, 0x70, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0d, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, - 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, 0x69, 0x6d, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x20, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, 0x6d, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, - 0x69, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x57, + 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, - 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x76, 0x0a, - 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x73, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x16, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, - 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, - 0x64, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x19, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x61, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x64, 0x12, 0x7c, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, - 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, - 0x6d, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0xa5, - 0x01, 0x0a, 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x28, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0xa8, 0x01, 0x0a, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, + 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, + 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x16, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x0b, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, + 0x64, 0x49, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, + 0x64, 0x49, 0x6e, 0x12, 0x58, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, + 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0d, + 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x6d, 0x0a, + 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x48, 0x00, - 0x52, 0x1e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x12, 0x98, 0x01, 0x0a, 0x28, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x29, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, - 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x24, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x9b, 0x01, 0x0a, 0x29, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, - 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x0f, + 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x11, 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x69, + 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x54, + 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, 0x69, + 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, 0x6d, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, + 0x73, 0x63, 0x69, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, + 0x63, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, + 0x76, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x22, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, + 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x73, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x16, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, + 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, + 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x19, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, + 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x64, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x64, 0x12, 0x6d, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x12, 0xa5, 0x01, 0x0a, 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x28, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0xa8, 0x01, 0x0a, 0x2e, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, - 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x48, 0x00, 0x52, 0x25, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1d, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x64, 0x70, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, - 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, - 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x48, 0x00, 0x52, 0x18, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, - 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x70, 0x12, 0x92, 0x01, 0x0a, 0x23, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x18, - 0x2f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x48, 0x00, 0x52, 0x1e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x12, 0x98, 0x01, 0x0a, 0x28, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x20, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x8c, 0x01, 0x0a, - 0x21, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x69, - 0x65, 0x64, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1e, 0x64, 0x65, 0x76, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x24, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x9b, 0x01, + 0x0a, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x25, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1d, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x64, 0x70, 0x18, 0x2b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, + 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x48, 0x00, 0x52, + 0x18, 0x75, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, + 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x70, 0x12, 0x92, 0x01, 0x0a, 0x23, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x20, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x8c, + 0x01, 0x0a, 0x21, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x64, 0x65, + 0x6e, 0x69, 0x65, 0x64, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x14, - 0x10, 0x15, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xa9, - 0x02, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, - 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1e, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x09, 0x0a, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x22, 0xa9, 0x02, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, + 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, + 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xe4, 0x03, 0x0a, 0x24, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, + 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x48, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6e, 0x65, 0x77, + 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, + 0x6f, 0x6c, 0x65, 0x12, 0x68, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, - 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe4, 0x03, 0x0a, 0x24, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6f, 0x6c, 0x64, - 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, - 0x6f, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x68, 0x0a, - 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, + 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x68, 0x0a, + 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, - 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x63, 0x65, 0x52, 0x13, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xab, 0x02, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x6e, 0x65, - 0x77, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0xab, 0x02, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, - 0x78, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, - 0x64, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x22, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, - 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, - 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, - 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, - 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x1d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, - 0x75, 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x35, 0x5f, - 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x35, - 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x83, 0x02, 0x0a, 0x21, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, + 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, + 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xc1, 0x02, 0x0a, - 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, - 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x78, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x7a, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, + 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x18, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x46, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, - 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, - 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, - 0x22, 0x85, 0x02, 0x0a, 0x23, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, - 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, - 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x56, 0x69, - 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, - 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x4e, 0x0a, 0x0e, 0x6e, 0x65, 0x77, - 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xce, 0x01, 0x0a, 0x28, 0x50, 0x61, + 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x25, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, - 0x0a, 0x12, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, - 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x6c, 0x64, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x12, - 0x6e, 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, - 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x22, 0x57, 0x0a, 0x1b, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x78, - 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x46, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, - 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x30, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x17, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, - 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x1d, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, @@ -4208,259 +4220,426 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x9a, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, - 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x74, - 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, - 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x49, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, - 0x01, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x28, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, - 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, - 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x16, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x29, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x22, 0x26, 0x0a, 0x24, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x25, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, - 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x25, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, - 0x6e, 0x69, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x2a, 0x53, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, - 0x0a, 0x16, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x43, - 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, - 0x15, 0x0a, 0x11, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, - 0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x2a, 0x84, 0x04, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, - 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1e, - 0x0a, 0x1a, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x25, - 0x0a, 0x21, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x03, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x09, 0x12, - 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x04, 0x12, 0x28, 0x0a, - 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, - 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x53, 0x4f, 0x55, - 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, - 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, - 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x08, 0x12, 0x17, - 0x0a, 0x13, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x53, 0x4f, 0x55, - 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, - 0x4b, 0x45, 0x4e, 0x10, 0x0b, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, - 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x0c, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x10, 0x0d, 0x12, 0x2c, 0x0a, 0x28, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, - 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x10, - 0x0e, 0x22, 0x04, 0x08, 0x07, 0x10, 0x07, 0x2a, 0x14, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x2a, 0xee, 0x0d, - 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x2f, 0x0a, 0x2b, 0x45, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, + 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x62, 0x35, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x35, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x83, 0x02, 0x0a, + 0x21, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, + 0x6c, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x46, + 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, + 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x23, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xfe, + 0x01, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x4e, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x4e, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, + 0xce, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6e, + 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x77, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0xbd, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x22, 0x71, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x71, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, + 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x22, 0x16, 0x0a, + 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, + 0x65, 0x64, 0x4f, 0x75, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, + 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x13, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x30, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x46, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf1, + 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x49, 0x64, 0x22, 0x9a, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, + 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, + 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, + 0xa8, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x20, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, + 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x88, 0x01, 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x22, 0x2b, 0x0a, 0x29, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x26, + 0x0a, 0x24, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, + 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, + 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, + 0x46, 0x0a, 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x2a, 0x53, 0x0a, + 0x09, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, + 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, + 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, + 0x10, 0x02, 0x2a, 0x82, 0x04, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, + 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, + 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x45, + 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, + 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, + 0x03, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x52, + 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, + 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, + 0x52, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, + 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x4f, + 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, + 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, + 0x49, 0x4e, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, + 0x18, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0b, 0x12, 0x22, 0x0a, 0x1e, 0x52, + 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x0c, 0x12, + 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x0d, 0x12, 0x2c, 0x0a, 0x28, 0x52, 0x45, 0x53, + 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, + 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x47, 0x52, 0x41, 0x4e, 0x54, 0x10, 0x0e, 0x2a, 0xe6, 0x0d, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, - 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, - 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x04, 0x12, 0x2a, 0x0a, 0x26, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, - 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x41, 0x44, - 0x44, 0x45, 0x44, 0x10, 0x15, 0x12, 0x2d, 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x41, 0x44, + 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, - 0x45, 0x44, 0x10, 0x16, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, - 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x45, - 0x44, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, - 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x09, - 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, - 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, - 0x45, 0x44, 0x10, 0x0a, 0x12, 0x2d, 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x44, 0x10, 0x04, 0x12, 0x2a, 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, + 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, + 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x15, 0x12, + 0x2d, 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, + 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, + 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x16, 0x12, 0x21, + 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x44, 0x10, 0x07, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, - 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, - 0x44, 0x10, 0x0b, 0x12, 0x2c, 0x0a, 0x28, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, - 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, - 0x0c, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, - 0x4c, 0x54, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, - 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x28, 0x12, 0x21, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x0d, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x21, 0x0a, 0x19, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, - 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x25, 0x0a, - 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, - 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, - 0x45, 0x44, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, - 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1f, 0x12, 0x1b, 0x0a, 0x17, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x45, 0x44, - 0x5f, 0x49, 0x4e, 0x10, 0x12, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x45, 0x44, 0x5f, - 0x4f, 0x55, 0x54, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, - 0x44, 0x10, 0x17, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, - 0x18, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x53, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, 0x45, 0x44, - 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x44, - 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1b, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, - 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, - 0x10, 0x1c, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1d, 0x12, 0x25, 0x0a, 0x21, 0x45, + 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x2b, 0x0a, + 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, + 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x09, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, + 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x2d, + 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, + 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x2c, 0x0a, + 0x28, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x44, - 0x10, 0x1e, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x26, 0x12, 0x2a, 0x0a, 0x26, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, - 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x41, 0x52, - 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x27, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x52, - 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x4f, - 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x20, 0x12, 0x35, - 0x0a, 0x31, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x52, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, - 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, - 0x4c, 0x45, 0x44, 0x10, 0x21, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, - 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x43, 0x48, - 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x22, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x49, - 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, - 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x23, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, - 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, - 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x24, 0x12, 0x2c, 0x0a, 0x28, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4e, - 0x45, 0x57, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x25, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, - 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x29, 0x12, 0x30, 0x0a, 0x2c, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, - 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x47, 0x52, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x2a, 0x42, 0x82, - 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x41, 0xaa, 0x02, 0x18, 0x42, 0x75, 0x66, 0x2e, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, - 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, - 0x24, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x41, 0x75, 0x64, 0x69, 0x74, - 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, - 0x68, 0x61, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x4c, 0x41, 0x42, + 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, + 0x28, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0d, + 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, + 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x12, + 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, + 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, + 0x47, 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1f, 0x12, 0x1b, 0x0a, + 0x17, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, + 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, + 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x12, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x45, + 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x17, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, + 0x44, 0x10, 0x18, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, + 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1b, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x44, 0x10, 0x1c, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, + 0x42, 0x45, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1d, 0x12, 0x25, 0x0a, + 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4d, 0x4f, 0x56, + 0x45, 0x44, 0x10, 0x1e, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, + 0x42, 0x45, 0x4c, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x26, 0x12, 0x2a, + 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x55, 0x4e, + 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x27, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, + 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, + 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x20, + 0x12, 0x35, 0x0a, 0x31, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, + 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x49, 0x53, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x21, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, + 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, + 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x22, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, + 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x23, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, + 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, + 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x24, 0x12, 0x2c, 0x0a, 0x28, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, + 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, + 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x25, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, + 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, + 0x41, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x29, 0x12, 0x30, + 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, + 0x49, 0x43, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x2a, + 0x42, 0x82, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x41, 0xaa, 0x02, 0x18, 0x42, 0x75, 0x66, + 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x5c, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xe2, 0x02, 0x24, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x41, 0x75, 0x64, + 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4476,7 +4655,7 @@ func file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP() []byte { } var file_buf_alpha_audit_v1alpha1_event_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_buf_alpha_audit_v1alpha1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_buf_alpha_audit_v1alpha1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_buf_alpha_audit_v1alpha1_event_proto_goTypes = []any{ (ActorType)(0), // 0: buf.alpha.audit.v1alpha1.ActorType (ResourceType)(0), // 1: buf.alpha.audit.v1alpha1.ResourceType @@ -4501,36 +4680,38 @@ var file_buf_alpha_audit_v1alpha1_event_proto_goTypes = []any{ (*PayloadRepositoryVisibilityChanged)(nil), // 20: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged (*PayloadRepositoryDefaultLabelNameChanged)(nil), // 21: buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultLabelNameChanged (*PayloadRepositoryDefaultBranchChanged)(nil), // 22: buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged - (*PayloadUserCreated)(nil), // 23: buf.alpha.audit.v1alpha1.PayloadUserCreated - (*PayloadUserReactivated)(nil), // 24: buf.alpha.audit.v1alpha1.PayloadUserReactivated - (*PayloadUserDeactivated)(nil), // 25: buf.alpha.audit.v1alpha1.PayloadUserDeactivated - (*PayloadUserDeleted)(nil), // 26: buf.alpha.audit.v1alpha1.PayloadUserDeleted - (*PayloadUserLoggedIn)(nil), // 27: buf.alpha.audit.v1alpha1.PayloadUserLoggedIn - (*PayloadUserLoggedOut)(nil), // 28: buf.alpha.audit.v1alpha1.PayloadUserLoggedOut - (*PayloadUserAutoMergedFromNewIdP)(nil), // 29: buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP - (*PayloadCuratedPluginCreated)(nil), // 30: buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated - (*PayloadCuratedPluginDeleted)(nil), // 31: buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted - (*PayloadTokenCreated)(nil), // 32: buf.alpha.audit.v1alpha1.PayloadTokenCreated - (*PayloadTokenDeleted)(nil), // 33: buf.alpha.audit.v1alpha1.PayloadTokenDeleted - (*PayloadSCIMTokenCreated)(nil), // 34: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated - (*PayloadSCIMTokenDeleted)(nil), // 35: buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted - (*PayloadRepositoryCommitDeleted)(nil), // 36: buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted - (*PayloadRepositoryLabelCreated)(nil), // 37: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated - (*PayloadRepositoryLabelMoved)(nil), // 38: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved - (*PayloadRepositoryLabelArchived)(nil), // 39: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived - (*PayloadRepositoryLabelUnarchived)(nil), // 40: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived - (*PayloadServerBreakingChangePolicyEnabled)(nil), // 41: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled - (*PayloadServerBreakingChangePolicyDisabled)(nil), // 42: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled - (*PayloadServerUniquenessPolicyEnabled)(nil), // 43: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled - (*PayloadServerUniquenessPolicyDisabled)(nil), // 44: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled - (*PayloadDeviceAuthorizationGrantApproved)(nil), // 45: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved - (*PayloadDeviceAuthorizationGrantDenied)(nil), // 46: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied - (*timestamppb.Timestamp)(nil), // 47: google.protobuf.Timestamp - (v1alpha1.OrganizationRole)(0), // 48: buf.alpha.registry.v1alpha1.OrganizationRole - (v1alpha1.OrganizationRoleSource)(0), // 49: buf.alpha.registry.v1alpha1.OrganizationRoleSource - (v1alpha1.Visibility)(0), // 50: buf.alpha.registry.v1alpha1.Visibility - (v1alpha1.RepositoryRole)(0), // 51: buf.alpha.registry.v1alpha1.RepositoryRole - (v1alpha1.BreakingChangeCategory)(0), // 52: buf.alpha.registry.v1alpha1.BreakingChangeCategory + (*PayloadPluginCreated)(nil), // 23: buf.alpha.audit.v1alpha1.PayloadPluginCreated + (*PayloadPluginDeleted)(nil), // 24: buf.alpha.audit.v1alpha1.PayloadPluginDeleted + (*PayloadUserCreated)(nil), // 25: buf.alpha.audit.v1alpha1.PayloadUserCreated + (*PayloadUserReactivated)(nil), // 26: buf.alpha.audit.v1alpha1.PayloadUserReactivated + (*PayloadUserDeactivated)(nil), // 27: buf.alpha.audit.v1alpha1.PayloadUserDeactivated + (*PayloadUserDeleted)(nil), // 28: buf.alpha.audit.v1alpha1.PayloadUserDeleted + (*PayloadUserLoggedIn)(nil), // 29: buf.alpha.audit.v1alpha1.PayloadUserLoggedIn + (*PayloadUserLoggedOut)(nil), // 30: buf.alpha.audit.v1alpha1.PayloadUserLoggedOut + (*PayloadUserAutoMergedFromNewIdP)(nil), // 31: buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP + (*PayloadCuratedPluginCreated)(nil), // 32: buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated + (*PayloadCuratedPluginDeleted)(nil), // 33: buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted + (*PayloadTokenCreated)(nil), // 34: buf.alpha.audit.v1alpha1.PayloadTokenCreated + (*PayloadTokenDeleted)(nil), // 35: buf.alpha.audit.v1alpha1.PayloadTokenDeleted + (*PayloadSCIMTokenCreated)(nil), // 36: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated + (*PayloadSCIMTokenDeleted)(nil), // 37: buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted + (*PayloadRepositoryCommitDeleted)(nil), // 38: buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted + (*PayloadRepositoryLabelCreated)(nil), // 39: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated + (*PayloadRepositoryLabelMoved)(nil), // 40: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved + (*PayloadRepositoryLabelArchived)(nil), // 41: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived + (*PayloadRepositoryLabelUnarchived)(nil), // 42: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived + (*PayloadServerBreakingChangePolicyEnabled)(nil), // 43: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled + (*PayloadServerBreakingChangePolicyDisabled)(nil), // 44: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled + (*PayloadServerUniquenessPolicyEnabled)(nil), // 45: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled + (*PayloadServerUniquenessPolicyDisabled)(nil), // 46: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled + (*PayloadDeviceAuthorizationGrantApproved)(nil), // 47: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved + (*PayloadDeviceAuthorizationGrantDenied)(nil), // 48: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied + (*timestamppb.Timestamp)(nil), // 49: google.protobuf.Timestamp + (v1alpha1.OrganizationRole)(0), // 50: buf.alpha.registry.v1alpha1.OrganizationRole + (v1alpha1.OrganizationRoleSource)(0), // 51: buf.alpha.registry.v1alpha1.OrganizationRoleSource + (v1alpha1.Visibility)(0), // 52: buf.alpha.registry.v1alpha1.Visibility + (v1alpha1.RepositoryRole)(0), // 53: buf.alpha.registry.v1alpha1.RepositoryRole + (v1alpha1.BreakingChangeCategory)(0), // 54: buf.alpha.registry.v1alpha1.BreakingChangeCategory } var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 0, // 0: buf.alpha.audit.v1alpha1.Actor.type:type_name -> buf.alpha.audit.v1alpha1.ActorType @@ -4538,7 +4719,7 @@ var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 2, // 2: buf.alpha.audit.v1alpha1.Event.type:type_name -> buf.alpha.audit.v1alpha1.EventType 3, // 3: buf.alpha.audit.v1alpha1.Event.actor:type_name -> buf.alpha.audit.v1alpha1.Actor 4, // 4: buf.alpha.audit.v1alpha1.Event.resource:type_name -> buf.alpha.audit.v1alpha1.Resource - 47, // 5: buf.alpha.audit.v1alpha1.Event.event_time:type_name -> google.protobuf.Timestamp + 49, // 5: buf.alpha.audit.v1alpha1.Event.event_time:type_name -> google.protobuf.Timestamp 5, // 6: buf.alpha.audit.v1alpha1.Event.metadata:type_name -> buf.alpha.audit.v1alpha1.EventMetadata 7, // 7: buf.alpha.audit.v1alpha1.Event.organization_created:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationCreated 8, // 8: buf.alpha.audit.v1alpha1.Event.organization_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationDeleted @@ -4553,57 +4734,59 @@ var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 19, // 17: buf.alpha.audit.v1alpha1.Event.repository_contributor_removed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRemoved 20, // 18: buf.alpha.audit.v1alpha1.Event.repository_visibility_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged 21, // 19: buf.alpha.audit.v1alpha1.Event.repository_default_label_name_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultLabelNameChanged - 23, // 20: buf.alpha.audit.v1alpha1.Event.user_created:type_name -> buf.alpha.audit.v1alpha1.PayloadUserCreated - 25, // 21: buf.alpha.audit.v1alpha1.Event.user_deactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeactivated - 26, // 22: buf.alpha.audit.v1alpha1.Event.user_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeleted - 27, // 23: buf.alpha.audit.v1alpha1.Event.user_logged_in:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedIn - 28, // 24: buf.alpha.audit.v1alpha1.Event.user_logged_out:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedOut - 30, // 25: buf.alpha.audit.v1alpha1.Event.curated_plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated - 12, // 26: buf.alpha.audit.v1alpha1.Event.idp_group_added:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupAdded - 13, // 27: buf.alpha.audit.v1alpha1.Event.idp_group_removed:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupRemoved - 32, // 28: buf.alpha.audit.v1alpha1.Event.token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenCreated - 33, // 29: buf.alpha.audit.v1alpha1.Event.token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenDeleted - 24, // 30: buf.alpha.audit.v1alpha1.Event.user_reactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserReactivated - 34, // 31: buf.alpha.audit.v1alpha1.Event.scim_token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated - 35, // 32: buf.alpha.audit.v1alpha1.Event.scim_token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted - 36, // 33: buf.alpha.audit.v1alpha1.Event.repository_commit_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted - 37, // 34: buf.alpha.audit.v1alpha1.Event.repository_label_created:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated - 38, // 35: buf.alpha.audit.v1alpha1.Event.repository_label_moved:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved - 39, // 36: buf.alpha.audit.v1alpha1.Event.repository_label_archived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived - 40, // 37: buf.alpha.audit.v1alpha1.Event.repository_label_unarchived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived - 31, // 38: buf.alpha.audit.v1alpha1.Event.curated_plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted - 41, // 39: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled - 42, // 40: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled - 22, // 41: buf.alpha.audit.v1alpha1.Event.repository_default_branch_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged - 43, // 42: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled - 44, // 43: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled - 29, // 44: buf.alpha.audit.v1alpha1.Event.user_auto_merged_from_new_idp:type_name -> buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP - 45, // 45: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_approved:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved - 46, // 46: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_denied:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied - 48, // 47: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 49, // 48: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 48, // 49: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 48, // 50: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 49, // 51: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 49, // 52: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 48, // 53: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 49, // 54: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 50, // 55: buf.alpha.audit.v1alpha1.PayloadRepositoryCreated.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 50, // 56: buf.alpha.audit.v1alpha1.PayloadRepositoryDeleted.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 51, // 57: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorAdded.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 51, // 58: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 51, // 59: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 51, // 60: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRemoved.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 50, // 61: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.old_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 50, // 62: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.new_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 47, // 63: buf.alpha.audit.v1alpha1.PayloadTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp - 47, // 64: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp - 52, // 65: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled.category:type_name -> buf.alpha.registry.v1alpha1.BreakingChangeCategory - 66, // [66:66] is the sub-list for method output_type - 66, // [66:66] is the sub-list for method input_type - 66, // [66:66] is the sub-list for extension type_name - 66, // [66:66] is the sub-list for extension extendee - 0, // [0:66] is the sub-list for field type_name + 23, // 20: buf.alpha.audit.v1alpha1.Event.plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadPluginCreated + 24, // 21: buf.alpha.audit.v1alpha1.Event.plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadPluginDeleted + 25, // 22: buf.alpha.audit.v1alpha1.Event.user_created:type_name -> buf.alpha.audit.v1alpha1.PayloadUserCreated + 27, // 23: buf.alpha.audit.v1alpha1.Event.user_deactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeactivated + 28, // 24: buf.alpha.audit.v1alpha1.Event.user_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeleted + 29, // 25: buf.alpha.audit.v1alpha1.Event.user_logged_in:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedIn + 30, // 26: buf.alpha.audit.v1alpha1.Event.user_logged_out:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedOut + 32, // 27: buf.alpha.audit.v1alpha1.Event.curated_plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated + 12, // 28: buf.alpha.audit.v1alpha1.Event.idp_group_added:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupAdded + 13, // 29: buf.alpha.audit.v1alpha1.Event.idp_group_removed:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupRemoved + 34, // 30: buf.alpha.audit.v1alpha1.Event.token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenCreated + 35, // 31: buf.alpha.audit.v1alpha1.Event.token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenDeleted + 26, // 32: buf.alpha.audit.v1alpha1.Event.user_reactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserReactivated + 36, // 33: buf.alpha.audit.v1alpha1.Event.scim_token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated + 37, // 34: buf.alpha.audit.v1alpha1.Event.scim_token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted + 38, // 35: buf.alpha.audit.v1alpha1.Event.repository_commit_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted + 39, // 36: buf.alpha.audit.v1alpha1.Event.repository_label_created:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated + 40, // 37: buf.alpha.audit.v1alpha1.Event.repository_label_moved:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved + 41, // 38: buf.alpha.audit.v1alpha1.Event.repository_label_archived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived + 42, // 39: buf.alpha.audit.v1alpha1.Event.repository_label_unarchived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived + 33, // 40: buf.alpha.audit.v1alpha1.Event.curated_plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted + 43, // 41: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled + 44, // 42: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled + 22, // 43: buf.alpha.audit.v1alpha1.Event.repository_default_branch_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged + 45, // 44: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled + 46, // 45: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled + 31, // 46: buf.alpha.audit.v1alpha1.Event.user_auto_merged_from_new_idp:type_name -> buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP + 47, // 47: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_approved:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved + 48, // 48: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_denied:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied + 50, // 49: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 51, // 50: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 50, // 51: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 50, // 52: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 51, // 53: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 51, // 54: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 50, // 55: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 51, // 56: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 52, // 57: buf.alpha.audit.v1alpha1.PayloadRepositoryCreated.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 52, // 58: buf.alpha.audit.v1alpha1.PayloadRepositoryDeleted.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 53, // 59: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorAdded.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 53, // 60: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 53, // 61: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 53, // 62: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRemoved.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 52, // 63: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.old_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 52, // 64: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.new_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 49, // 65: buf.alpha.audit.v1alpha1.PayloadTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp + 49, // 66: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp + 54, // 67: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled.category:type_name -> buf.alpha.registry.v1alpha1.BreakingChangeCategory + 68, // [68:68] is the sub-list for method output_type + 68, // [68:68] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_buf_alpha_audit_v1alpha1_event_proto_init() } @@ -4625,6 +4808,8 @@ func file_buf_alpha_audit_v1alpha1_event_proto_init() { (*Event_RepositoryContributorRemoved)(nil), (*Event_RepositoryVisibilityChanged)(nil), (*Event_RepositoryDefaultLabelNameChanged)(nil), + (*Event_PluginCreated)(nil), + (*Event_PluginDeleted)(nil), (*Event_UserCreated)(nil), (*Event_UserDeactivated)(nil), (*Event_UserDeleted)(nil), @@ -4653,14 +4838,14 @@ func file_buf_alpha_audit_v1alpha1_event_proto_init() { (*Event_DeviceAuthorizationGrantApproved)(nil), (*Event_DeviceAuthorizationGrantDenied)(nil), } - file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38].OneofWrappers = []any{} + file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buf_alpha_audit_v1alpha1_event_proto_rawDesc, NumEnums: 3, - NumMessages: 44, + NumMessages: 46, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/buf/alpha/audit/v1alpha1/event.proto b/proto/buf/alpha/audit/v1alpha1/event.proto index 8cb6e89f1c..23fd304fec 100644 --- a/proto/buf/alpha/audit/v1alpha1/event.proto +++ b/proto/buf/alpha/audit/v1alpha1/event.proto @@ -41,9 +41,6 @@ message Actor { // ResourceType is the type of the resource that was affected by the audited // event. enum ResourceType { - reserved 7; - reserved "RESOURCE_TYPE_PLUGIN"; - RESOURCE_TYPE_UNSPECIFIED = 0; RESOURCE_TYPE_USER = 1; RESOURCE_TYPE_ORGANIZATION = 2; @@ -52,6 +49,7 @@ enum ResourceType { RESOURCE_TYPE_REPOSITORY = 4; RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR = 5; RESOURCE_TYPE_REPOSITORY_COMMIT = 6; + RESOURCE_TYPE_PLUGIN = 7; RESOURCE_TYPE_CURATED_PLUGIN = 8; RESOURCE_TYPE_TOKEN = 10; RESOURCE_TYPE_SCIM_TOKEN = 11; @@ -88,8 +86,8 @@ enum EventType { EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED = 11; EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED = 12; EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED = 40; - EVENT_TYPE_PLUGIN_CREATED = 13 [deprecated = true]; - EVENT_TYPE_PLUGIN_DELETED = 14 [deprecated = true]; + EVENT_TYPE_PLUGIN_CREATED = 13; + EVENT_TYPE_PLUGIN_DELETED = 14; EVENT_TYPE_CURATED_PLUGIN_CREATED = 20; EVENT_TYPE_CURATED_PLUGIN_DELETED = 31; EVENT_TYPE_USER_CREATED = 15; @@ -131,9 +129,6 @@ message EventMetadata { // what happened, when it happened, who did it, which resource was affected, and // more contextual information on the event. message Event { - reserved 19, 20; - reserved "plugin_created", "plugin_deleted"; - // Unique id of the audited event. string event_id = 1; // Type of the audited event. It specifies "what" happened. @@ -161,6 +156,8 @@ message Event { PayloadRepositoryContributorRemoved repository_contributor_removed = 17; PayloadRepositoryVisibilityChanged repository_visibility_changed = 18; PayloadRepositoryDefaultLabelNameChanged repository_default_label_name_changed = 46; + PayloadPluginCreated plugin_created = 19; + PayloadPluginDeleted plugin_deleted = 20; PayloadUserCreated user_created = 21; PayloadUserDeactivated user_deactivated = 22; PayloadUserDeleted user_deleted = 23; @@ -360,6 +357,24 @@ message PayloadRepositoryDefaultBranchChanged { string new_default_branch = 4; } +message PayloadPluginCreated { + // owner_id is the id of the owner of the plugin. + string owner_id = 1; + // owner_name is the name of the owner of the plugin. + string owner_name = 2; + // plugin_type is the type of the plugin. + string plugin_type = 3; +} + +message PayloadPluginDeleted { + // owner_id is the id of the owner of the check plugin. + string owner_id = 1; + // owner_name is the name of the owner of the check plugin. + string owner_name = 2; + // plugin_type is the type of the plugin. + string plugin_type = 3; +} + message PayloadUserCreated {} message PayloadUserReactivated {} From 72a73eaea88b4dfef9a00532cf741143dc9e93db Mon Sep 17 00:00:00 2001 From: "buf-release-bot[bot]" <116301919+buf-release-bot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:50:59 -0400 Subject: [PATCH 10/34] Release v1.46.0 (#3432) Co-authored-by: doriable --- CHANGELOG.md | 4 ++-- private/buf/bufcli/bufcli.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a0ded5ba5..9ed36b4636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [Unreleased] +## [v1.46.0] - 2024-10-29 - Add `buf registry whoami` command, which checks if you are logged in to the Buf Schema Registry at a given domain. @@ -1283,7 +1283,7 @@ buf check breaking proto --against .git#branch=master,subdir=proto Initial beta release. -[Unreleased]: https://github.com/bufbuild/buf/compare/v1.45.0...HEAD +[v1.46.0]: https://github.com/bufbuild/buf/compare/v1.45.0...v1.46.0 [v1.45.0]: https://github.com/bufbuild/buf/compare/v1.44.0...v1.45.0 [v1.44.0]: https://github.com/bufbuild/buf/compare/v1.43.0...v1.44.0 [v1.43.0]: https://github.com/bufbuild/buf/compare/v1.42.0...v1.43.0 diff --git a/private/buf/bufcli/bufcli.go b/private/buf/bufcli/bufcli.go index 64d2549c85..0496e96b63 100644 --- a/private/buf/bufcli/bufcli.go +++ b/private/buf/bufcli/bufcli.go @@ -15,4 +15,4 @@ package bufcli // Version is the CLI version of buf. -const Version = "1.45.1-dev" +const Version = "1.46.0" From 4b587f3b86c3a942adf7cce9ad172278bea3032d Mon Sep 17 00:00:00 2001 From: "buf-release-bot[bot]" <116301919+buf-release-bot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:06:40 -0400 Subject: [PATCH 11/34] Return to development (#3433) Co-authored-by: doriable --- CHANGELOG.md | 5 +++++ private/buf/bufcli/bufcli.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ed36b4636..137fefaf96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [Unreleased] + +- No changes yet. + ## [v1.46.0] - 2024-10-29 - Add `buf registry whoami` command, which checks if you are logged in to the Buf Schema @@ -1283,6 +1287,7 @@ buf check breaking proto --against .git#branch=master,subdir=proto Initial beta release. +[Unreleased]: https://github.com/bufbuild/buf/compare/v1.46.0...HEAD [v1.46.0]: https://github.com/bufbuild/buf/compare/v1.45.0...v1.46.0 [v1.45.0]: https://github.com/bufbuild/buf/compare/v1.44.0...v1.45.0 [v1.44.0]: https://github.com/bufbuild/buf/compare/v1.43.0...v1.44.0 diff --git a/private/buf/bufcli/bufcli.go b/private/buf/bufcli/bufcli.go index 0496e96b63..6d63cf46af 100644 --- a/private/buf/bufcli/bufcli.go +++ b/private/buf/bufcli/bufcli.go @@ -15,4 +15,4 @@ package bufcli // Version is the CLI version of buf. -const Version = "1.46.0" +const Version = "1.46.1-dev" From da80689ca11238119bfd038de978444d359b4a76 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 30 Oct 2024 17:04:51 -0400 Subject: [PATCH 12/34] Avoid returning TextEdit on empty diff (#3435) --- private/buf/buflsp/server.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/private/buf/buflsp/server.go b/private/buf/buflsp/server.go index 737e3f2346..e63c34118a 100644 --- a/private/buf/buflsp/server.go +++ b/private/buf/buflsp/server.go @@ -215,6 +215,12 @@ func (s *server) Formatting( return nil, err } + newText := out.String() + // Avoid formatting the file if text has not changed. + if newText == file.text { + return nil, nil + } + // XXX: The current compiler does not expose a span for the full file. Instead of // potentially undershooting the correct span (which can cause comments at the // start and end of the file to be duplicated), we instead manually count up the @@ -241,7 +247,7 @@ func (s *server) Formatting( Character: uint32(lastChar), }, }, - NewText: out.String(), + NewText: newText, }, }, nil } From 4828637f62d2126507264d5f1ad8ad578973ccab Mon Sep 17 00:00:00 2001 From: bufdev <4228796+bufdev@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:47:14 -0400 Subject: [PATCH 13/34] Remove command package and command.Runner in favor of simpler and stateless execext package (#3439) --- .golangci.yml | 12 +- private/buf/bufcli/cache.go | 2 - private/buf/bufctl/controller.go | 4 - private/buf/bufformat/formatter_test.go | 4 +- private/buf/bufgen/bufgen.go | 3 - private/buf/bufgen/generator.go | 4 +- private/buf/bufmigrate/bufmigrate.go | 3 - private/buf/bufmigrate/migrate_builder.go | 12 +- private/buf/bufmigrate/migrator.go | 13 +- .../buf/bufprotopluginexec/binary_handler.go | 19 +- .../bufprotopluginexec/bufprotopluginexec.go | 15 +- private/buf/bufprotopluginexec/generator.go | 5 - .../protoc_proxy_handler.go | 23 +- private/buf/buftesting/buftesting.go | 5 - private/buf/bufwkt/bufwktstore/bufwktstore.go | 4 +- private/buf/bufwkt/bufwktstore/store.go | 6 +- private/buf/cmd/buf/buf_test.go | 3 +- .../cmd/buf/command/alpha/protoc/plugin.go | 3 - .../cmd/buf/command/alpha/protoc/protoc.go | 3 - .../buf/command/alpha/protoc/protoc_test.go | 26 +- private/buf/cmd/buf/command/beta/lsp/lsp.go | 3 +- .../buf/cmd/buf/command/breaking/breaking.go | 3 +- .../config/configmigrate/configmigrate.go | 3 - .../buf/command/config/internal/internal.go | 3 +- private/buf/cmd/buf/command/format/format.go | 3 - .../buf/cmd/buf/command/generate/generate.go | 2 - .../cmd/buf/command/generate/generate_test.go | 37 +-- private/buf/cmd/buf/command/lint/lint.go | 3 +- .../cmd/buf/command/mod/internal/internal.go | 3 +- private/buf/cmd/buf/command/push/push.go | 18 +- .../cmd/protoc-gen-buf-breaking/breaking.go | 3 +- private/buf/cmd/protoc-gen-buf-lint/lint.go | 3 +- .../buf/cmd/protoc-gen-buf-lint/lint_test.go | 5 - private/bufpkg/bufcheck/breaking_test.go | 3 +- private/bufpkg/bufcheck/bufcheck.go | 7 +- private/bufpkg/bufcheck/lint_test.go | 3 +- private/bufpkg/bufcheck/multi_client_test.go | 5 +- private/bufpkg/bufcheck/runner_provider.go | 10 +- .../bufimagefuzz/bufimagefuzz_unix_test.go | 15 +- private/bufpkg/bufimage/build_image_test.go | 19 +- .../bufpkg/bufimage/build_image_unix_test.go | 9 +- .../bufremoteplugindocker/docker_test.go | 25 +- private/pkg/bandeps/bandeps.go | 5 +- private/pkg/bandeps/checker.go | 7 +- private/pkg/bandeps/cmd/bandeps/main.go | 2 - private/pkg/bandeps/state.go | 26 +- private/pkg/command/command.go | 243 ---------------- private/pkg/command/runner.go | 133 --------- private/pkg/diff/diff.go | 13 +- private/pkg/execext/execext.go | 259 ++++++++++++++++++ .../execext_unix_test.go} | 33 +-- private/pkg/{command => execext}/process.go | 39 ++- private/pkg/{command => execext}/usage.gen.go | 2 +- private/pkg/git/cloner.go | 75 +++-- .../pkg/git/cmd/git-ls-files-unstaged/main.go | 3 +- private/pkg/git/git.go | 78 +++--- private/pkg/git/git_test.go | 124 ++++----- private/pkg/git/lister.go | 35 ++- private/pkg/git/remote.go | 47 ++-- .../licenseheader/cmd/license-header/main.go | 8 +- private/pkg/pluginrpcutil/pluginrpcutil.go | 7 +- private/pkg/pluginrpcutil/runner.go | 15 +- private/pkg/prototesting/prototesting.go | 31 +-- private/pkg/storage/cmd/ddiff/main.go | 2 - private/pkg/storage/diff.go | 10 +- .../storage/storagetesting/storagetesting.go | 3 - 66 files changed, 628 insertions(+), 926 deletions(-) delete mode 100644 private/pkg/command/command.go delete mode 100644 private/pkg/command/runner.go create mode 100644 private/pkg/execext/execext.go rename private/pkg/{command/runner_unix_test.go => execext/execext_unix_test.go} (62%) rename private/pkg/{command => execext}/process.go (66%) rename private/pkg/{command => execext}/usage.gen.go (97%) diff --git a/.golangci.yml b/.golangci.yml index de17f1bf56..a53b93cc05 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,7 @@ linters-settings: forbid: # Use private/pkg/thread.Parallelize - '^errgroup\.' - # Use private/pkg/command.Runner + # Use private/pkg/execext - '^exec\.Cmd$' - '^exec\.Command$' - '^exec\.CommandContext$' @@ -213,6 +213,10 @@ issues: - containedctx # we actually want to embed a context here path: private/bufpkg/bufmodule/module_set_builder.go + - linters: + - containedctx + # we actually want to embed a context here + path: private/pkg/execext/process.go - linters: - gochecknoinits # we actually want to use init here @@ -225,15 +229,15 @@ issues: - linters: - forbidigo # this is one of two files we want to allow exec.Cmd functions in - path: private/pkg/command/process.go + path: private/pkg/execext/execext.go - linters: - forbidigo # this is one of two files we want to allow exec.Cmd functions in - path: private/pkg/command/runner.go + path: private/pkg/execext/process.go - linters: - gosec # G204 checks that exec.Command is not called with non-constants. - path: private/pkg/command/runner.go + path: private/pkg/execext/execext.go text: "G204:" - linters: - gosec diff --git a/private/buf/bufcli/cache.go b/private/buf/bufcli/cache.go index ddadfb50dc..cfe01a9579 100644 --- a/private/buf/bufcli/cache.go +++ b/private/buf/bufcli/cache.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapiowner" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/filelock" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/storage/storageos" @@ -174,7 +173,6 @@ func NewWKTStore(container appext.Container) (bufwktstore.Store, error) { } return bufwktstore.NewStore( container.Logger(), - command.NewRunner(), cacheBucket, ), nil } diff --git a/private/buf/bufctl/controller.go b/private/buf/bufctl/controller.go index 0e1322348a..d6c044b7ea 100644 --- a/private/buf/bufctl/controller.go +++ b/private/buf/bufctl/controller.go @@ -38,7 +38,6 @@ import ( imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/app/appcmd" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/httpauth" "github.com/bufbuild/buf/private/pkg/ioext" @@ -178,7 +177,6 @@ type controller struct { fileAnnotationsToStdout bool copyToInMemory bool - commandRunner command.Runner storageosProvider storageos.Provider buffetchRefParser buffetch.RefParser buffetchReader buffetch.Reader @@ -214,7 +212,6 @@ func newController( if err := validateFileAnnotationErrorFormat(controller.fileAnnotationErrorFormat); err != nil { return nil, err } - controller.commandRunner = command.NewRunner() controller.storageosProvider = newStorageosProvider(controller.disableSymlinks) controller.buffetchRefParser = buffetch.NewRefParser(logger) controller.buffetchReader = buffetch.NewReader( @@ -225,7 +222,6 @@ func newController( git.NewCloner( logger, controller.storageosProvider, - controller.commandRunner, gitClonerOptions, ), moduleKeyProvider, diff --git a/private/buf/bufformat/formatter_test.go b/private/buf/bufformat/formatter_test.go index f57e1ede99..c8168437d6 100644 --- a/private/buf/bufformat/formatter_test.go +++ b/private/buf/bufformat/formatter_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/diff" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/bufbuild/buf/private/pkg/storage" @@ -72,7 +71,6 @@ func testFormatProto3(t *testing.T) { func testFormatNoDiff(t *testing.T, path string) { t.Run(path, func(t *testing.T) { ctx := context.Background() - runner := command.NewRunner() bucket, err := storageos.NewProvider().NewReadWriteBucket(path) require.NoError(t, err) moduleSetBuilder := bufmodule.NewModuleSetBuilder(ctx, slogtestext.NewLogger(t), bufmodule.NopModuleDataProvider, bufmodule.NopCommitProvider) @@ -102,7 +100,7 @@ func testFormatNoDiff(t *testing.T, path string) { require.NoError(t, err) expectedData, err := io.ReadAll(expectedFile) require.NoError(t, err) - fileDiff, err := diff.Diff(ctx, runner, expectedData, formattedData, expectedPath, formattedFile.Path()+" (formatted)") + fileDiff, err := diff.Diff(ctx, expectedData, formattedData, expectedPath, formattedFile.Path()+" (formatted)") require.NoError(t, err) require.Empty(t, string(fileDiff)) }) diff --git a/private/buf/bufgen/bufgen.go b/private/buf/bufgen/bufgen.go index e0b0d94139..42790a9eb8 100644 --- a/private/buf/bufgen/bufgen.go +++ b/private/buf/bufgen/bufgen.go @@ -26,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/connectclient" "github.com/bufbuild/buf/private/pkg/storage/storageos" ) @@ -88,7 +87,6 @@ type Generator interface { func NewGenerator( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, // Pass a clientConfig instead of a CodeGenerationServiceClient because the // plugins' remotes/registries is not known at this time, and remotes/registries // may be different for different plugins. @@ -97,7 +95,6 @@ func NewGenerator( return newGenerator( logger, storageosProvider, - runner, clientConfig, ) } diff --git a/private/buf/bufgen/generator.go b/private/buf/bufgen/generator.go index 2fe4905f78..2832f34864 100644 --- a/private/buf/bufgen/generator.go +++ b/private/buf/bufgen/generator.go @@ -33,7 +33,6 @@ import ( "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect" registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/connectclient" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage/storageos" @@ -52,13 +51,12 @@ type generator struct { func newGenerator( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, clientConfig *connectclient.Config, ) *generator { return &generator{ logger: logger, storageosProvider: storageosProvider, - pluginexecGenerator: bufprotopluginexec.NewGenerator(logger, storageosProvider, runner), + pluginexecGenerator: bufprotopluginexec.NewGenerator(logger, storageosProvider), clientConfig: clientConfig, } } diff --git a/private/buf/bufmigrate/bufmigrate.go b/private/buf/bufmigrate/bufmigrate.go index be63386b43..dd52b79ac1 100644 --- a/private/buf/bufmigrate/bufmigrate.go +++ b/private/buf/bufmigrate/bufmigrate.go @@ -22,7 +22,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" @@ -77,13 +76,11 @@ type Migrator interface { // NewMigrator returns a new Migrator. func NewMigrator( logger *slog.Logger, - runner command.Runner, moduleKeyProvider bufmodule.ModuleKeyProvider, commitProvider bufmodule.CommitProvider, ) Migrator { return newMigrator( logger, - runner, moduleKeyProvider, commitProvider, ) diff --git a/private/buf/bufmigrate/migrate_builder.go b/private/buf/bufmigrate/migrate_builder.go index 3166039f72..602a94309a 100644 --- a/private/buf/bufmigrate/migrate_builder.go +++ b/private/buf/bufmigrate/migrate_builder.go @@ -23,7 +23,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -35,7 +34,6 @@ import ( type migrateBuilder struct { logger *slog.Logger - runner command.Runner commitProvider bufmodule.CommitProvider bucket storage.ReadBucket destinationDirPath string @@ -55,14 +53,12 @@ type migrateBuilder struct { func newMigrateBuilder( logger *slog.Logger, - runner command.Runner, commitProvider bufmodule.CommitProvider, bucket storage.ReadBucket, destinationDirPath string, ) *migrateBuilder { return &migrateBuilder{ logger: logger, - runner: runner, commitProvider: commitProvider, bucket: bucket, destinationDirPath: destinationDirPath, @@ -268,11 +264,11 @@ func (m *migrateBuilder) addModule(ctx context.Context, moduleDirPath string) (r if err != nil { return err } - lintConfigForRoot, err := equivalentLintConfigInV2(ctx, m.logger, m.runner, moduleConfig.LintConfig()) + lintConfigForRoot, err := equivalentLintConfigInV2(ctx, m.logger, moduleConfig.LintConfig()) if err != nil { return err } - breakingConfigForRoot, err := equivalentBreakingConfigInV2(ctx, m.logger, m.runner, moduleConfig.BreakingConfig()) + breakingConfigForRoot, err := equivalentBreakingConfigInV2(ctx, m.logger, moduleConfig.BreakingConfig()) if err != nil { return err } @@ -304,11 +300,11 @@ func (m *migrateBuilder) addModule(ctx context.Context, moduleDirPath string) (r if err != nil { return err } - lintConfig, err := equivalentLintConfigInV2(ctx, m.logger, m.runner, moduleConfig.LintConfig()) + lintConfig, err := equivalentLintConfigInV2(ctx, m.logger, moduleConfig.LintConfig()) if err != nil { return err } - breakingConfig, err := equivalentBreakingConfigInV2(ctx, m.logger, m.runner, moduleConfig.BreakingConfig()) + breakingConfig, err := equivalentBreakingConfigInV2(ctx, m.logger, moduleConfig.BreakingConfig()) if err != nil { return err } diff --git a/private/buf/bufmigrate/migrator.go b/private/buf/bufmigrate/migrator.go index 37d38bf5e9..0f220c9cad 100644 --- a/private/buf/bufmigrate/migrator.go +++ b/private/buf/bufmigrate/migrator.go @@ -28,7 +28,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -40,20 +39,17 @@ import ( type migrator struct { logger *slog.Logger - runner command.Runner moduleKeyProvider bufmodule.ModuleKeyProvider commitProvider bufmodule.CommitProvider } func newMigrator( logger *slog.Logger, - runner command.Runner, moduleKeyProvider bufmodule.ModuleKeyProvider, commitProvider bufmodule.CommitProvider, ) *migrator { return &migrator{ logger: logger, - runner: runner, moduleKeyProvider: moduleKeyProvider, commitProvider: commitProvider, } @@ -140,7 +136,6 @@ func (m *migrator) getMigrateBuilder( } migrateBuilder := newMigrateBuilder( m.logger, - m.runner, m.commitProvider, bucket, destinationDirPath, @@ -209,7 +204,6 @@ func (m *migrator) diff( } return storage.Diff( ctx, - m.runner, writer, originalFileBucket, addedFileBucket, @@ -647,13 +641,11 @@ func resolvedDeclaredAndLockedDependencies( func equivalentLintConfigInV2( ctx context.Context, logger *slog.Logger, - runner command.Runner, lintConfig bufconfig.LintConfig, ) (bufconfig.LintConfig, error) { equivalentCheckConfigV2, err := equivalentCheckConfigInV2( ctx, logger, - runner, check.RuleTypeLint, lintConfig, ) @@ -674,13 +666,11 @@ func equivalentLintConfigInV2( func equivalentBreakingConfigInV2( ctx context.Context, logger *slog.Logger, - runner command.Runner, breakingConfig bufconfig.BreakingConfig, ) (bufconfig.BreakingConfig, error) { equivalentCheckConfigV2, err := equivalentCheckConfigInV2( ctx, logger, - runner, check.RuleTypeBreaking, breakingConfig, ) @@ -698,13 +688,12 @@ func equivalentBreakingConfigInV2( func equivalentCheckConfigInV2( ctx context.Context, logger *slog.Logger, - runner command.Runner, ruleType check.RuleType, checkConfig bufconfig.CheckConfig, ) (bufconfig.CheckConfig, error) { // No need for custom lint/breaking plugins since there's no plugins to migrate from <=v1. // TODO: If we ever need v3, then we will have to deal with this. - client, err := bufcheck.NewClient(logger, bufcheck.NewRunnerProvider(runner, wasm.UnimplementedRuntime)) + client, err := bufcheck.NewClient(logger, bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime)) if err != nil { return nil, err } diff --git a/private/buf/bufprotopluginexec/binary_handler.go b/private/buf/bufprotopluginexec/binary_handler.go index c617a5da29..98e2f284cd 100644 --- a/private/buf/bufprotopluginexec/binary_handler.go +++ b/private/buf/bufprotopluginexec/binary_handler.go @@ -21,7 +21,7 @@ import ( "log/slog" "path/filepath" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/ioext" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/slogext" @@ -31,20 +31,17 @@ import ( type binaryHandler struct { logger *slog.Logger - runner command.Runner pluginPath string pluginArgs []string } func newBinaryHandler( logger *slog.Logger, - runner command.Runner, pluginPath string, pluginArgs []string, ) *binaryHandler { return &binaryHandler{ logger: logger, - runner: runner, pluginPath: pluginPath, pluginArgs: pluginArgs, } @@ -64,16 +61,16 @@ func (h *binaryHandler) Handle( } responseBuffer := bytes.NewBuffer(nil) stderrWriteCloser := newStderrWriteCloser(pluginEnv.Stderr, h.pluginPath) - runOptions := []command.RunOption{ - command.RunWithEnviron(pluginEnv.Environ), - command.RunWithStdin(bytes.NewReader(requestData)), - command.RunWithStdout(responseBuffer), - command.RunWithStderr(stderrWriteCloser), + runOptions := []execext.RunOption{ + execext.WithEnv(pluginEnv.Environ), + execext.WithStdin(bytes.NewReader(requestData)), + execext.WithStdout(responseBuffer), + execext.WithStderr(stderrWriteCloser), } if len(h.pluginArgs) > 0 { - runOptions = append(runOptions, command.RunWithArgs(h.pluginArgs...)) + runOptions = append(runOptions, execext.WithArgs(h.pluginArgs...)) } - if err := h.runner.Run( + if err := execext.Run( ctx, h.pluginPath, runOptions..., diff --git a/private/buf/bufprotopluginexec/bufprotopluginexec.go b/private/buf/bufprotopluginexec/bufprotopluginexec.go index c81ad755f3..8226d7cc16 100644 --- a/private/buf/bufprotopluginexec/bufprotopluginexec.go +++ b/private/buf/bufprotopluginexec/bufprotopluginexec.go @@ -27,7 +27,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/protoplugin" "google.golang.org/protobuf/types/pluginpb" @@ -77,9 +76,8 @@ type Generator interface { func NewGenerator( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, ) Generator { - return newGenerator(logger, storageosProvider, runner) + return newGenerator(logger, storageosProvider) } // GenerateOption is an option for Generate. @@ -114,7 +112,6 @@ func GenerateWithProtocPath(protocPath ...string) GenerateOption { func NewHandler( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, pluginName string, options ...HandlerOption, ) (protoplugin.Handler, error) { @@ -126,11 +123,11 @@ func NewHandler( // Initialize binary plugin handler when path is specified with optional args. Return // on error as something is wrong with the supplied pluginPath option. if len(handlerOptions.pluginPath) > 0 { - return NewBinaryHandler(logger, runner, handlerOptions.pluginPath[0], handlerOptions.pluginPath[1:]) + return NewBinaryHandler(logger, handlerOptions.pluginPath[0], handlerOptions.pluginPath[1:]) } // Initialize binary plugin handler based on plugin name. - if handler, err := NewBinaryHandler(logger, runner, "protoc-gen-"+pluginName, nil); err == nil { + if handler, err := NewBinaryHandler(logger, "protoc-gen-"+pluginName, nil); err == nil { return handler, nil } @@ -145,7 +142,7 @@ func NewHandler( if err != nil { return nil, err } - return newProtocProxyHandler(logger, storageosProvider, runner, protocPath, protocExtraArgs, pluginName), nil + return newProtocProxyHandler(logger, storageosProvider, protocPath, protocExtraArgs, pluginName), nil } return nil, fmt.Errorf( "could not find protoc plugin for name %s - please make sure protoc-gen-%s is installed and present on your $PATH", @@ -180,12 +177,12 @@ func HandlerWithPluginPath(pluginPath ...string) HandlerOption { // NewBinaryHandler returns a new Handler that invokes the specific plugin // specified by pluginPath. -func NewBinaryHandler(logger *slog.Logger, runner command.Runner, pluginPath string, pluginArgs []string) (protoplugin.Handler, error) { +func NewBinaryHandler(logger *slog.Logger, pluginPath string, pluginArgs []string) (protoplugin.Handler, error) { pluginPath, err := unsafeLookPath(pluginPath) if err != nil { return nil, err } - return newBinaryHandler(logger, runner, pluginPath, pluginArgs), nil + return newBinaryHandler(logger, pluginPath, pluginArgs), nil } type handlerOptions struct { diff --git a/private/buf/bufprotopluginexec/generator.go b/private/buf/bufprotopluginexec/generator.go index 1aec1a244f..6cbe690701 100644 --- a/private/buf/bufprotopluginexec/generator.go +++ b/private/buf/bufprotopluginexec/generator.go @@ -20,7 +20,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufprotoplugin" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage/storageos" "google.golang.org/protobuf/types/pluginpb" ) @@ -28,18 +27,15 @@ import ( type generator struct { logger *slog.Logger storageosProvider storageos.Provider - runner command.Runner } func newGenerator( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, ) *generator { return &generator{ logger: logger, storageosProvider: storageosProvider, - runner: runner, } } @@ -61,7 +57,6 @@ func (g *generator) Generate( handler, err := NewHandler( g.logger, g.storageosProvider, - g.runner, pluginName, handlerOptions..., ) diff --git a/private/buf/bufprotopluginexec/protoc_proxy_handler.go b/private/buf/bufprotopluginexec/protoc_proxy_handler.go index 973ee17096..0a06674a95 100644 --- a/private/buf/bufprotopluginexec/protoc_proxy_handler.go +++ b/private/buf/bufprotopluginexec/protoc_proxy_handler.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/ioext" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -42,7 +42,6 @@ import ( type protocProxyHandler struct { logger *slog.Logger storageosProvider storageos.Provider - runner command.Runner protocPath string protocExtraArgs []string pluginName string @@ -51,7 +50,6 @@ type protocProxyHandler struct { func newProtocProxyHandler( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, protocPath string, protocExtraArgs []string, pluginName string, @@ -59,7 +57,6 @@ func newProtocProxyHandler( return &protocProxyHandler{ logger: logger, storageosProvider: storageosProvider, - runner: runner, protocPath: protocPath, protocExtraArgs: protocExtraArgs, pluginName: pluginName, @@ -149,13 +146,13 @@ func (h *protocProxyHandler) Handle( if descriptorFilePath != "" && descriptorFilePath == app.DevStdinFilePath { stdin = bytes.NewReader(fileDescriptorSetData) } - if err := h.runner.Run( + if err := execext.Run( ctx, h.protocPath, - command.RunWithArgs(args...), - command.RunWithEnviron(pluginEnv.Environ), - command.RunWithStdin(stdin), - command.RunWithStderr(pluginEnv.Stderr), + execext.WithArgs(args...), + execext.WithEnv(pluginEnv.Environ), + execext.WithStdin(stdin), + execext.WithStderr(pluginEnv.Stderr), ); err != nil { // TODO: strip binary path as well? // We don't know if this is a system error or plugin error, so we assume system error @@ -195,12 +192,12 @@ func (h *protocProxyHandler) getProtocVersion( pluginEnv protoplugin.PluginEnv, ) (*pluginpb.Version, error) { stdoutBuffer := bytes.NewBuffer(nil) - if err := h.runner.Run( + if err := execext.Run( ctx, h.protocPath, - command.RunWithArgs(slicesext.Concat(h.protocExtraArgs, []string{"--version"})...), - command.RunWithEnviron(pluginEnv.Environ), - command.RunWithStdout(stdoutBuffer), + execext.WithArgs(slicesext.Concat(h.protocExtraArgs, []string{"--version"})...), + execext.WithEnv(pluginEnv.Environ), + execext.WithStdout(stdoutBuffer), ); err != nil { // TODO: strip binary path as well? return nil, handlePotentialTooManyFilesError(err) diff --git a/private/buf/buftesting/buftesting.go b/private/buf/buftesting/buftesting.go index 1942e1ca3b..763505bc4a 100644 --- a/private/buf/buftesting/buftesting.go +++ b/private/buf/buftesting/buftesting.go @@ -24,7 +24,6 @@ import ( "github.com/bufbuild/buf/private/buf/bufprotoc" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/github/githubtesting" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/prototesting" @@ -59,7 +58,6 @@ var ( // GetActualProtocFileDescriptorSet gets the FileDescriptorSet for actual protoc. func GetActualProtocFileDescriptorSet( t *testing.T, - runner command.Runner, includeImports bool, includeSourceInfo bool, dirPath string, @@ -67,7 +65,6 @@ func GetActualProtocFileDescriptorSet( ) *descriptorpb.FileDescriptorSet { fileDescriptorSet, err := prototesting.GetProtocFileDescriptorSet( context.Background(), - runner, []string{dirPath}, filePaths, includeImports, @@ -80,7 +77,6 @@ func GetActualProtocFileDescriptorSet( // RunActualProtoc runs actual protoc. func RunActualProtoc( t *testing.T, - runner command.Runner, includeImports bool, includeSourceInfo bool, dirPath string, @@ -91,7 +87,6 @@ func RunActualProtoc( ) { err := prototesting.RunProtoc( context.Background(), - runner, []string{dirPath}, filePaths, includeImports, diff --git a/private/buf/bufwkt/bufwktstore/bufwktstore.go b/private/buf/bufwkt/bufwktstore/bufwktstore.go index d0f5dc597f..8377557768 100644 --- a/private/buf/bufwkt/bufwktstore/bufwktstore.go +++ b/private/buf/bufwkt/bufwktstore/bufwktstore.go @@ -18,7 +18,6 @@ import ( "context" "log/slog" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage" ) @@ -35,8 +34,7 @@ type Store interface { // It is assumed that the Store has complete control of the bucket. func NewStore( logger *slog.Logger, - runner command.Runner, bucket storage.ReadWriteBucket, ) Store { - return newStore(logger, runner, bucket) + return newStore(logger, bucket) } diff --git a/private/buf/bufwkt/bufwktstore/store.go b/private/buf/bufwkt/bufwktstore/store.go index 926fb6a9db..835d8ba978 100644 --- a/private/buf/bufwkt/bufwktstore/store.go +++ b/private/buf/bufwkt/bufwktstore/store.go @@ -19,24 +19,20 @@ import ( "log/slog" "github.com/bufbuild/buf/private/gen/data/datawkt" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage" ) type store struct { logger *slog.Logger - runner command.Runner bucket storage.ReadWriteBucket } func newStore( logger *slog.Logger, - runner command.Runner, bucket storage.ReadWriteBucket, ) *store { return &store{ logger: logger, - runner: runner, bucket: bucket, } } @@ -53,7 +49,7 @@ func (s *store) GetBucket(ctx context.Context) (storage.ReadBucket, error) { return nil, err } } else { - diff, err := storage.DiffBytes(ctx, s.runner, datawkt.ReadBucket, wktBucket) + diff, err := storage.DiffBytes(ctx, datawkt.ReadBucket, wktBucket) if err != nil { return nil, err } diff --git a/private/buf/cmd/buf/buf_test.go b/private/buf/cmd/buf/buf_test.go index 18fe6e26c8..1bb1c22b16 100644 --- a/private/buf/cmd/buf/buf_test.go +++ b/private/buf/cmd/buf/buf_test.go @@ -38,7 +38,6 @@ import ( imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appcmd/appcmdtesting" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/osext" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -1349,7 +1348,7 @@ func TestCheckLsBreakingRulesFromConfigExceptDeprecated(t *testing.T) { t.Run(version.String(), func(t *testing.T) { t.Parallel() // Do not need any custom lint/breaking plugins here. - client, err := bufcheck.NewClient(slogtestext.NewLogger(t), bufcheck.NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime)) + client, err := bufcheck.NewClient(slogtestext.NewLogger(t), bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime)) require.NoError(t, err) allRules, err := client.AllRules(context.Background(), check.RuleTypeBreaking, version) require.NoError(t, err) diff --git a/private/buf/cmd/buf/command/alpha/protoc/plugin.go b/private/buf/cmd/buf/command/alpha/protoc/plugin.go index 56501842cc..931e910cb2 100644 --- a/private/buf/cmd/buf/command/alpha/protoc/plugin.go +++ b/private/buf/cmd/buf/command/alpha/protoc/plugin.go @@ -23,7 +23,6 @@ import ( "github.com/bufbuild/buf/private/buf/bufprotopluginexec" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage/storageos" "google.golang.org/protobuf/types/pluginpb" ) @@ -45,7 +44,6 @@ func executePlugin( ctx context.Context, logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, container app.EnvStderrContainer, images []bufimage.Image, pluginName string, @@ -54,7 +52,6 @@ func executePlugin( generator := bufprotopluginexec.NewGenerator( logger, storageosProvider, - runner, ) requests, err := bufimage.ImagesToCodeGeneratorRequests( images, diff --git a/private/buf/cmd/buf/command/alpha/protoc/protoc.go b/private/buf/cmd/buf/command/alpha/protoc/protoc.go index 20e78c18f4..ce2180d02e 100644 --- a/private/buf/cmd/buf/command/alpha/protoc/protoc.go +++ b/private/buf/cmd/buf/command/alpha/protoc/protoc.go @@ -34,7 +34,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slogext" "github.com/bufbuild/buf/private/pkg/storage/storageos" ) @@ -87,7 +86,6 @@ func run( container appext.Container, env *env, ) (retErr error) { - runner := command.NewRunner() logger := container.Logger() defer slogext.DebugProfile(logger)() @@ -191,7 +189,6 @@ func run( ctx, logger, storageosProvider, - runner, container, images, pluginName, diff --git a/private/buf/cmd/buf/command/alpha/protoc/protoc_test.go b/private/buf/cmd/buf/command/alpha/protoc/protoc_test.go index 6436abecbe..a6db3349fc 100644 --- a/private/buf/cmd/buf/command/alpha/protoc/protoc_test.go +++ b/private/buf/cmd/buf/command/alpha/protoc/protoc_test.go @@ -27,7 +27,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appcmd/appcmdtesting" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/prototesting" "github.com/bufbuild/buf/private/pkg/storage" @@ -88,10 +87,8 @@ func TestComparePrintFreeFieldNumbersGoogleapis(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) filePaths := buftesting.GetProtocFilePaths(t, googleapisDirPath, 100) actualProtocStdout := bytes.NewBuffer(nil) - runner := command.NewRunner() buftesting.RunActualProtoc( t, - runner, false, false, googleapisDirPath, @@ -127,17 +124,15 @@ func TestCompareOutputGoogleapis(t *testing.T) { t.Parallel() googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) filePaths := buftesting.GetProtocFilePaths(t, googleapisDirPath, 100) - runner := command.NewRunner() actualProtocFileDescriptorSet := buftesting.GetActualProtocFileDescriptorSet( t, - runner, false, false, googleapisDirPath, filePaths, ) bufProtocFileDescriptorSet := testGetBufProtocFileDescriptorSet(t, googleapisDirPath) - prototesting.AssertFileDescriptorSetsEqual(t, command.NewRunner(), bufProtocFileDescriptorSet, actualProtocFileDescriptorSet) + prototesting.AssertFileDescriptorSetsEqual(t, bufProtocFileDescriptorSet, actualProtocFileDescriptorSet) } func TestCompareGeneratedStubsGoogleapisGo(t *testing.T) { @@ -146,7 +141,6 @@ func TestCompareGeneratedStubsGoogleapisGo(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubs( t, - command.NewRunner(), googleapisDirPath, []testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -160,7 +154,6 @@ func TestCompareGeneratedStubsGoogleapisGoZip(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubsArchive( t, - command.NewRunner(), googleapisDirPath, []testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -175,7 +168,6 @@ func TestCompareGeneratedStubsGoogleapisGoJar(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubsArchive( t, - command.NewRunner(), googleapisDirPath, []testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -190,7 +182,6 @@ func TestCompareGeneratedStubsGoogleapisObjc(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubs( t, - command.NewRunner(), googleapisDirPath, []testPluginInfo{{name: "objc"}}, ) @@ -202,7 +193,6 @@ func TestCompareInsertionPointOutput(t *testing.T) { insertionTestdataDirPath := filepath.Join("testdata", "insertion") testCompareGeneratedStubs( t, - command.NewRunner(), insertionTestdataDirPath, []testPluginInfo{ {name: "insertion-point-receiver"}, @@ -216,15 +206,14 @@ func TestInsertionPointMixedPathsSuccess(t *testing.T) { t.Parallel() wd, err := os.Getwd() require.NoError(t, err) - runner := command.NewRunner() - testInsertionPointMixedPathsSuccess(t, runner, ".", wd) - testInsertionPointMixedPathsSuccess(t, runner, wd, ".") + testInsertionPointMixedPathsSuccess(t, ".", wd) + testInsertionPointMixedPathsSuccess(t, wd, ".") } // testInsertionPointMixedPathsSuccess demonstrates that insertion points are able // to generate to the same output directory, even if the absolute path points to // the same place. -func testInsertionPointMixedPathsSuccess(t *testing.T, runner command.Runner, receiverOut string, writerOut string) { +func testInsertionPointMixedPathsSuccess(t *testing.T, receiverOut string, writerOut string) { dirPath := filepath.Join("testdata", "insertion") filePaths := buftesting.GetProtocFilePaths(t, dirPath, 100) protocFlags := []string{ @@ -233,7 +222,6 @@ func testInsertionPointMixedPathsSuccess(t *testing.T, runner command.Runner, re } err := prototesting.RunProtoc( context.Background(), - runner, []string{dirPath}, filePaths, false, @@ -274,7 +262,6 @@ func testInsertionPointMixedPathsSuccess(t *testing.T, runner command.Runner, re func testCompareGeneratedStubs( t *testing.T, - runner command.Runner, dirPath string, plugins []testPluginInfo, ) { @@ -290,7 +277,6 @@ func testCompareGeneratedStubs( } buftesting.RunActualProtoc( t, - runner, false, false, dirPath, @@ -346,7 +332,6 @@ func testCompareGeneratedStubs( require.NoError(t, err) diff, err := storage.DiffBytes( context.Background(), - runner, actualReadWriteBucket, bufReadWriteBucket, ) @@ -356,7 +341,6 @@ func testCompareGeneratedStubs( func testCompareGeneratedStubsArchive( t *testing.T, - runner command.Runner, dirPath string, plugins []testPluginInfo, useJar bool, @@ -378,7 +362,6 @@ func testCompareGeneratedStubsArchive( } buftesting.RunActualProtoc( t, - runner, false, false, dirPath, @@ -443,7 +426,6 @@ func testCompareGeneratedStubsArchive( require.NoError(t, err) diff, err := storage.DiffBytes( context.Background(), - runner, actualReadWriteBucket, bufReadWriteBucket, ) diff --git a/private/buf/cmd/buf/command/beta/lsp/lsp.go b/private/buf/cmd/buf/command/beta/lsp/lsp.go index adb32c87e2..52908c8f81 100644 --- a/private/buf/cmd/buf/command/beta/lsp/lsp.go +++ b/private/buf/cmd/buf/command/beta/lsp/lsp.go @@ -28,7 +28,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/ioext" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" @@ -116,7 +115,7 @@ func run( }() checkClient, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasmRuntime), + bufcheck.NewRunnerProvider(wasmRuntime), bufcheck.ClientWithStderr(container.Stderr()), ) if err != nil { diff --git a/private/buf/cmd/buf/command/breaking/breaking.go b/private/buf/cmd/buf/command/breaking/breaking.go index 0cfd5c5a01..36b4a5cb92 100644 --- a/private/buf/cmd/buf/command/breaking/breaking.go +++ b/private/buf/cmd/buf/command/breaking/breaking.go @@ -27,7 +27,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/wasm" @@ -222,7 +221,7 @@ func run( for i, imageWithConfig := range imageWithConfigs { client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasmRuntime), + bufcheck.NewRunnerProvider(wasmRuntime), bufcheck.ClientWithStderr(container.Stderr()), ) if err != nil { diff --git a/private/buf/cmd/buf/command/config/configmigrate/configmigrate.go b/private/buf/cmd/buf/command/config/configmigrate/configmigrate.go index 8ff7a834ca..13e8f366f2 100644 --- a/private/buf/cmd/buf/command/config/configmigrate/configmigrate.go +++ b/private/buf/cmd/buf/command/config/configmigrate/configmigrate.go @@ -21,7 +21,6 @@ import ( "github.com/bufbuild/buf/private/buf/bufmigrate" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/spf13/pflag" ) @@ -109,7 +108,6 @@ func run( container appext.Container, flags *flags, ) error { - runner := command.NewRunner() moduleKeyProvider, err := bufcli.NewModuleKeyProvider(container) if err != nil { return err @@ -127,7 +125,6 @@ func run( } migrator := bufmigrate.NewMigrator( container.Logger(), - runner, moduleKeyProvider, commitProvider, ) diff --git a/private/buf/cmd/buf/command/config/internal/internal.go b/private/buf/cmd/buf/command/config/internal/internal.go index 959907bd70..919607d1a0 100644 --- a/private/buf/cmd/buf/command/config/internal/internal.go +++ b/private/buf/cmd/buf/command/config/internal/internal.go @@ -26,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/stringutil" @@ -198,7 +197,7 @@ func lsRun( }() client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasmRuntime), + bufcheck.NewRunnerProvider(wasmRuntime), bufcheck.ClientWithStderr(container.Stderr()), ) if err != nil { diff --git a/private/buf/cmd/buf/command/format/format.go b/private/buf/cmd/buf/command/format/format.go index b953ba7f90..e991a44f76 100644 --- a/private/buf/cmd/buf/command/format/format.go +++ b/private/buf/cmd/buf/command/format/format.go @@ -30,7 +30,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageos" @@ -290,7 +289,6 @@ func run( return err } - runner := command.NewRunner() controller, err := bufcli.NewController( container, bufctl.WithDisableSymlinks(flags.DisableSymlinks), @@ -326,7 +324,6 @@ func run( diffBuffer := bytes.NewBuffer(nil) changedPaths, err := storage.DiffWithFilenames( ctx, - runner, diffBuffer, originalReadBucket, formattedReadBucket, diff --git a/private/buf/cmd/buf/command/generate/generate.go b/private/buf/cmd/buf/command/generate/generate.go index 19a8f25aa5..d35213a50e 100644 --- a/private/buf/cmd/buf/command/generate/generate.go +++ b/private/buf/cmd/buf/command/generate/generate.go @@ -31,7 +31,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/spf13/pflag" @@ -542,7 +541,6 @@ func run( return bufgen.NewGenerator( logger, storageosProvider, - command.NewRunner(), clientConfig, ).Generate( ctx, diff --git a/private/buf/cmd/buf/command/generate/generate_test.go b/private/buf/cmd/buf/command/generate/generate_test.go index 22758a0b10..24e220e274 100644 --- a/private/buf/cmd/buf/command/generate/generate_test.go +++ b/private/buf/cmd/buf/command/generate/generate_test.go @@ -31,7 +31,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appcmd/appcmdtesting" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -63,7 +62,6 @@ func TestCompareGeneratedStubsGoogleapisGo(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubs( t, - command.NewRunner(), googleapisDirPath, []*testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -77,7 +75,6 @@ func TestCompareGeneratedStubsGoogleapisGoZip(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubsArchive( t, - command.NewRunner(), googleapisDirPath, []*testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -92,7 +89,6 @@ func TestCompareGeneratedStubsGoogleapisGoJar(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubsArchive( t, - command.NewRunner(), googleapisDirPath, []*testPluginInfo{ {name: "go", opt: "Mgoogle/api/auth.proto=foo"}, @@ -107,7 +103,6 @@ func TestCompareGeneratedStubsGoogleapisObjc(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubs( t, - command.NewRunner(), googleapisDirPath, []*testPluginInfo{{name: "objc"}}, ) @@ -119,7 +114,6 @@ func TestCompareGeneratedStubsGoogleapisPyi(t *testing.T) { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) testCompareGeneratedStubs( t, - command.NewRunner(), googleapisDirPath, []*testPluginInfo{{name: "pyi"}}, ) @@ -131,7 +125,6 @@ func TestCompareInsertionPointOutput(t *testing.T) { insertionTestdataDirPath := filepath.Join("testdata", "insertion") testCompareGeneratedStubs( t, - command.NewRunner(), insertionTestdataDirPath, []*testPluginInfo{ {name: "insertion-point-receiver"}, @@ -172,7 +165,7 @@ func TestGenerateV2LocalPluginBasic(t *testing.T) { actual, err := storageos.NewProvider().NewReadWriteBucket(tempDirPath) require.NoError(t, err) - diff, err := storage.DiffBytes(context.Background(), command.NewRunner(), expected, actual) + diff, err := storage.DiffBytes(context.Background(), expected, actual) require.NoError(t, err) require.Empty(t, string(diff)) } @@ -195,7 +188,7 @@ func TestGenerateV2LocalPluginTypes(t *testing.T) { actual, err := storageos.NewProvider().NewReadWriteBucket(tempDirPath) require.NoError(t, err) - diff, err := storage.DiffBytes(context.Background(), command.NewRunner(), expected, actual) + diff, err := storage.DiffBytes(context.Background(), expected, actual) require.NoError(t, err) require.Empty(t, string(diff)) } @@ -429,13 +422,12 @@ func TestOutputWithPathEqualToExclude(t *testing.T) { func TestGenerateInsertionPoint(t *testing.T) { t.Parallel() - runner := command.NewRunner() - testGenerateInsertionPointV1(t, runner, ".", ".", filepath.Join("testdata", "insertion_point")) - testGenerateInsertionPointV1(t, runner, "gen/proto/insertion", "gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) - testGenerateInsertionPointV1(t, runner, "gen/proto/insertion/", "./gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) - testGenerateInsertionPointV2(t, runner, ".", ".", filepath.Join("testdata", "insertion_point")) - testGenerateInsertionPointV2(t, runner, "gen/proto/insertion", "gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) - testGenerateInsertionPointV2(t, runner, "gen/proto/insertion/", "./gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) + testGenerateInsertionPointV1(t, ".", ".", filepath.Join("testdata", "insertion_point")) + testGenerateInsertionPointV1(t, "gen/proto/insertion", "gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) + testGenerateInsertionPointV1(t, "gen/proto/insertion/", "./gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) + testGenerateInsertionPointV2(t, ".", ".", filepath.Join("testdata", "insertion_point")) + testGenerateInsertionPointV2(t, "gen/proto/insertion", "gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) + testGenerateInsertionPointV2(t, "gen/proto/insertion/", "./gen/proto/insertion", filepath.Join("testdata", "nested_insertion_point")) } func TestGenerateInsertionPointFail(t *testing.T) { @@ -591,14 +583,12 @@ func TestBoolPointerFlagUnspecified(t *testing.T) { func testGenerateInsertionPointV1( t *testing.T, - runner command.Runner, receiverOut string, writerOut string, expectedOutputPath string, ) { testGenerateInsertionPoint( t, - runner, receiverOut, writerOut, expectedOutputPath, @@ -615,14 +605,12 @@ plugins: func testGenerateInsertionPointV2( t *testing.T, - runner command.Runner, receiverOut string, writerOut string, expectedOutputPath string, ) { testGenerateInsertionPoint( t, - runner, receiverOut, writerOut, expectedOutputPath, @@ -639,7 +627,6 @@ plugins: func testGenerateInsertionPoint( t *testing.T, - runner command.Runner, receiverOut string, writerOut string, expectedOutputPath string, @@ -662,7 +649,7 @@ func testGenerateInsertionPoint( ) expectedOutput, err := storageosProvider.NewReadWriteBucket(expectedOutputPath) require.NoError(t, err) - diff, err := storage.DiffBytes(context.Background(), runner, expectedOutput, readWriteBucket) + diff, err := storage.DiffBytes(context.Background(), expectedOutput, readWriteBucket) require.NoError(t, err) require.Empty(t, string(diff)) } @@ -732,7 +719,6 @@ func testGenerateInsertionPointMixedPathsFail( func testCompareGeneratedStubs( t *testing.T, - runner command.Runner, dirPath string, testPluginInfos []*testPluginInfo, ) { @@ -748,7 +734,6 @@ func testCompareGeneratedStubs( } buftesting.RunActualProtoc( t, - runner, false, false, dirPath, @@ -797,7 +782,6 @@ func testCompareGeneratedStubs( require.NoError(t, err) diff, err := storage.DiffBytes( context.Background(), - runner, actualReadWriteBucket, bufReadWriteBucket, transformGolangProtocVersionToUnknown(t), @@ -808,7 +792,6 @@ func testCompareGeneratedStubs( func testCompareGeneratedStubsArchive( t *testing.T, - runner command.Runner, dirPath string, testPluginInfos []*testPluginInfo, useJar bool, @@ -830,7 +813,6 @@ func testCompareGeneratedStubsArchive( } buftesting.RunActualProtoc( t, - runner, false, false, dirPath, @@ -879,7 +861,6 @@ func testCompareGeneratedStubsArchive( require.NoError(t, err) diff, err := storage.DiffBytes( context.Background(), - runner, actualReadWriteBucket, bufReadWriteBucket, transformGolangProtocVersionToUnknown(t), diff --git a/private/buf/cmd/buf/command/lint/lint.go b/private/buf/cmd/buf/command/lint/lint.go index 42066f96c1..f0506a930a 100644 --- a/private/buf/cmd/buf/command/lint/lint.go +++ b/private/buf/cmd/buf/command/lint/lint.go @@ -25,7 +25,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" @@ -147,7 +146,7 @@ func run( for _, imageWithConfig := range imageWithConfigs { client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasmRuntime), + bufcheck.NewRunnerProvider(wasmRuntime), bufcheck.ClientWithStderr(container.Stderr()), ) if err != nil { diff --git a/private/buf/cmd/buf/command/mod/internal/internal.go b/private/buf/cmd/buf/command/mod/internal/internal.go index accfd9aec8..c802e34e50 100644 --- a/private/buf/cmd/buf/command/mod/internal/internal.go +++ b/private/buf/cmd/buf/command/mod/internal/internal.go @@ -26,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/syserror" @@ -176,7 +175,7 @@ func lsRun( // BufYAMLFiles <=v1 never had plugins. client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime), + bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime), bufcheck.ClientWithStderr(container.Stderr()), ) if err != nil { diff --git a/private/buf/cmd/buf/command/push/push.go b/private/buf/cmd/buf/command/push/push.go index 49ef16c5ea..213db7689e 100644 --- a/private/buf/cmd/buf/command/push/push.go +++ b/private/buf/cmd/buf/command/push/push.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/stringutil" @@ -456,31 +455,30 @@ func getGitMetadataUploadOptions( if err != nil { return nil, err } - runner := command.NewRunner() // validate that input is a dirRef and is a valid git checkout - if err := validateInputIsValidDirAndGitCheckout(ctx, runner, container, input); err != nil { + if err := validateInputIsValidDirAndGitCheckout(ctx, container, input); err != nil { return nil, err } - uncommittedFiles, err := git.CheckForUncommittedGitChanges(ctx, runner, container, input) + uncommittedFiles, err := git.CheckForUncommittedGitChanges(ctx, container, input) if err != nil { return nil, err } if len(uncommittedFiles) > 0 { return nil, fmt.Errorf("--%s requires that there are no uncommitted changes, uncommitted changes found in the following files: %v", gitMetadataFlagName, uncommittedFiles) } - originRemote, err := git.GetRemote(ctx, runner, container, input, gitOriginRemote) + originRemote, err := git.GetRemote(ctx, container, input, gitOriginRemote) if err != nil { if errors.Is(err, git.ErrRemoteNotFound) { return nil, appcmd.NewInvalidArgumentErrorf("remote %s must be present on Git checkout: %w", gitOriginRemote, err) } return nil, err } - currentGitCommit, err := git.GetCurrentHEADGitCommit(ctx, runner, container, input) + currentGitCommit, err := git.GetCurrentHEADGitCommit(ctx, container, input) if err != nil { return nil, err } var gitMetadataUploadOptions []bufmodule.UploadOption - gitLabelsUploadOption, err := getGitMetadataLabelsUploadOptions(ctx, runner, container, input, currentGitCommit) + gitLabelsUploadOption, err := getGitMetadataLabelsUploadOptions(ctx, container, input, currentGitCommit) if err != nil { return nil, err } @@ -515,14 +513,13 @@ func getGitMetadataUploadOptions( func validateInputIsValidDirAndGitCheckout( ctx context.Context, - runner command.Runner, container appext.Container, input string, ) error { if _, err := buffetch.NewDirRefParser(container.Logger()).GetDirRef(ctx, input); err != nil { return appcmd.NewInvalidArgumentErrorf("input %q is not a valid directory: %w", input, err) } - if err := git.CheckDirectoryIsValidGitCheckout(ctx, runner, container, input); err != nil { + if err := git.CheckDirectoryIsValidGitCheckout(ctx, container, input); err != nil { if errors.Is(err, git.ErrInvalidGitCheckout) { return appcmd.NewInvalidArgumentErrorf("input %q is not a local Git repository checkout", input) } @@ -533,12 +530,11 @@ func validateInputIsValidDirAndGitCheckout( func getGitMetadataLabelsUploadOptions( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, input string, gitCommitSha string, ) (bufmodule.UploadOption, error) { - refs, err := git.GetRefsForGitCommitAndRemote(ctx, runner, envContainer, input, gitOriginRemote, gitCommitSha) + refs, err := git.GetRefsForGitCommitAndRemote(ctx, envContainer, input, gitOriginRemote, gitCommitSha) if err != nil { return nil, err } diff --git a/private/buf/cmd/protoc-gen-buf-breaking/breaking.go b/private/buf/cmd/protoc-gen-buf-breaking/breaking.go index ec29b5f6a2..1de59b0149 100644 --- a/private/buf/cmd/protoc-gen-buf-breaking/breaking.go +++ b/private/buf/cmd/protoc-gen-buf-breaking/breaking.go @@ -28,7 +28,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufanalysis" "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufimage" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/protodescriptor" "github.com/bufbuild/buf/private/pkg/protoencoding" @@ -126,7 +125,7 @@ func handle( // The protoc plugins do not support custom lint/breaking change plugins for now. client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime), + bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime), bufcheck.ClientWithStderr(pluginEnv.Stderr), ) if err != nil { diff --git a/private/buf/cmd/protoc-gen-buf-lint/lint.go b/private/buf/cmd/protoc-gen-buf-lint/lint.go index 6ee136a4b6..d7ed7b0a1a 100644 --- a/private/buf/cmd/protoc-gen-buf-lint/lint.go +++ b/private/buf/cmd/protoc-gen-buf-lint/lint.go @@ -27,7 +27,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufanalysis" "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufimage" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/protodescriptor" "github.com/bufbuild/buf/private/pkg/protoencoding" @@ -101,7 +100,7 @@ func handle( // The protoc plugins do not support custom lint/breaking change plugins for now. client, err := bufcheck.NewClient( container.Logger(), - bufcheck.NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime), + bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime), bufcheck.ClientWithStderr(pluginEnv.Stderr), ) if err != nil { diff --git a/private/buf/cmd/protoc-gen-buf-lint/lint_test.go b/private/buf/cmd/protoc-gen-buf-lint/lint_test.go index 5aa72639f2..9185cbb001 100644 --- a/private/buf/cmd/protoc-gen-buf-lint/lint_test.go +++ b/private/buf/cmd/protoc-gen-buf-lint/lint_test.go @@ -22,7 +22,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/prototesting" @@ -258,7 +257,6 @@ func testRunLint( expectedExitCode int, expectedErrorString string, ) { - runner := command.NewRunner() testRunHandlerFunc( t, protoplugin.HandlerFunc( @@ -278,7 +276,6 @@ func testRunLint( ), testBuildRequest( t, - runner, root, realFilePaths, parameter, @@ -328,7 +325,6 @@ func testRunHandlerFunc( func testBuildRequest( t *testing.T, - runner command.Runner, root string, realFilePaths []string, parameter string, @@ -336,7 +332,6 @@ func testBuildRequest( ) protoplugin.Request { fileDescriptorSet, err := prototesting.GetProtocFileDescriptorSet( context.Background(), - runner, []string{root}, realFilePaths, true, diff --git a/private/bufpkg/bufcheck/breaking_test.go b/private/bufpkg/bufcheck/breaking_test.go index c87af2d1e6..2bab7cbf4d 100644 --- a/private/bufpkg/bufcheck/breaking_test.go +++ b/private/bufpkg/bufcheck/breaking_test.go @@ -30,7 +30,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/wasm" @@ -1345,7 +1344,7 @@ func testBreaking( require.NoError(t, err) breakingConfig := workspace.GetBreakingConfigForOpaqueID(opaqueID) require.NotNil(t, breakingConfig) - client, err := bufcheck.NewClient(logger, bufcheck.NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime)) + client, err := bufcheck.NewClient(logger, bufcheck.NewRunnerProvider(wasm.UnimplementedRuntime)) require.NoError(t, err) err = client.Breaking( ctx, diff --git a/private/bufpkg/bufcheck/bufcheck.go b/private/bufpkg/bufcheck/bufcheck.go index 0cff78425d..91a6cda45f 100644 --- a/private/bufpkg/bufcheck/bufcheck.go +++ b/private/bufpkg/bufcheck/bufcheck.go @@ -22,7 +22,6 @@ import ( "buf.build/go/bufplugin/check" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufimage" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/wasm" @@ -170,7 +169,7 @@ func (r RunnerProviderFunc) NewRunner(pluginConfig bufconfig.PluginConfig) (plug return r(pluginConfig) } -// NewRunnerProvider returns a new RunnerProvider for the command.Runner and wasm.Runtime. +// NewRunnerProvider returns a new RunnerProvider for the wasm.Runtime. // // This implementation should only be used for local applications. It is safe to // use concurrently. @@ -181,8 +180,8 @@ func (r RunnerProviderFunc) NewRunner(pluginConfig bufconfig.PluginConfig) (plug // - bufconfig.PluginConfigTypeLocalWasm // // If the PluginConfigType is not supported, an error is returned. -func NewRunnerProvider(commandRunner command.Runner, wasmRuntime wasm.Runtime) RunnerProvider { - return newRunnerProvider(commandRunner, wasmRuntime) +func NewRunnerProvider(wasmRuntime wasm.Runtime) RunnerProvider { + return newRunnerProvider(wasmRuntime) } // NewClient returns a new Client. diff --git a/private/bufpkg/bufcheck/lint_test.go b/private/bufpkg/bufcheck/lint_test.go index 1ff56ab7f3..626f3738b2 100644 --- a/private/bufpkg/bufcheck/lint_test.go +++ b/private/bufpkg/bufcheck/lint_test.go @@ -27,7 +27,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/bufpkg/bufmodule" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/wasm" @@ -1356,7 +1355,7 @@ func testLintWithOptions( }) client, err := bufcheck.NewClient( logger, - bufcheck.NewRunnerProvider(command.NewRunner(), wasmRuntime), + bufcheck.NewRunnerProvider(wasmRuntime), ) require.NoError(t, err) err = client.Lint( diff --git a/private/bufpkg/bufcheck/multi_client_test.go b/private/bufpkg/bufcheck/multi_client_test.go index 810887cd9a..8fde74ddae 100644 --- a/private/bufpkg/bufcheck/multi_client_test.go +++ b/private/bufpkg/bufcheck/multi_client_test.go @@ -24,7 +24,6 @@ import ( "buf.build/go/bufplugin/check/checkutil" "buf.build/go/bufplugin/option" "github.com/bufbuild/buf/private/bufpkg/bufconfig" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/bufbuild/buf/private/pkg/stringutil" @@ -183,7 +182,7 @@ func TestMultiClientCannotHaveOverlappingRulesWithBuiltIn(t *testing.T) { client, err := newClient( slogtestext.NewLogger(t), - NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime), + NewRunnerProvider(wasm.UnimplementedRuntime), ) require.NoError(t, err) duplicateBuiltInRulePluginConfig, err := bufconfig.NewLocalPluginConfig( @@ -276,7 +275,7 @@ func TestMultiClientCannotHaveOverlappingCategoriesWithBuiltIn(t *testing.T) { client, err := newClient( slogtestext.NewLogger(t), - NewRunnerProvider(command.NewRunner(), wasm.UnimplementedRuntime), + NewRunnerProvider(wasm.UnimplementedRuntime), ) require.NoError(t, err) duplicateBuiltInRulePluginConfig, err := bufconfig.NewLocalPluginConfig( diff --git a/private/bufpkg/bufcheck/runner_provider.go b/private/bufpkg/bufcheck/runner_provider.go index e5788c9017..ca8a8ed626 100644 --- a/private/bufpkg/bufcheck/runner_provider.go +++ b/private/bufpkg/bufcheck/runner_provider.go @@ -16,7 +16,6 @@ package bufcheck import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/pluginrpcutil" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/wasm" @@ -24,14 +23,12 @@ import ( ) type runnerProvider struct { - commandRunner command.Runner - wasmRuntime wasm.Runtime + wasmRuntime wasm.Runtime } -func newRunnerProvider(commandRunner command.Runner, wasmRuntime wasm.Runtime) *runnerProvider { +func newRunnerProvider(wasmRuntime wasm.Runtime) *runnerProvider { return &runnerProvider{ - commandRunner: commandRunner, - wasmRuntime: wasmRuntime, + wasmRuntime: wasmRuntime, } } @@ -40,7 +37,6 @@ func (r *runnerProvider) NewRunner(pluginConfig bufconfig.PluginConfig) (pluginr case bufconfig.PluginConfigTypeLocal: path := pluginConfig.Path() return pluginrpcutil.NewRunner( - r.commandRunner, // We know that Path is of at least length 1. path[0], path[1:]..., diff --git a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go index 71ae4c9550..90d3e3a008 100644 --- a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go +++ b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go @@ -30,7 +30,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/prototesting" "github.com/bufbuild/buf/private/pkg/slogext" "github.com/bufbuild/buf/private/pkg/tmp" @@ -45,7 +44,6 @@ func TestCorpus(t *testing.T) { // To focus on just one test in the corpus, put its file name here. Don't forget to revert before committing. focus := "" ctx := context.Background() - runner := command.NewRunner() require.NoError(t, filepath.Walk("corpus", func(path string, info fs.FileInfo, err error) error { if err != nil { return err @@ -59,7 +57,7 @@ func TestCorpus(t *testing.T) { t.Run(info.Name(), func(t *testing.T) { data, err := os.ReadFile(filepath.Join("corpus", info.Name())) require.NoError(t, err) - result, err := fuzz(ctx, runner, data) + result, err := fuzz(ctx, data) require.NoError(t, err) require.NoError(t, result.error(ctx)) }) @@ -94,8 +92,7 @@ func TestCorpus(t *testing.T) { // go-fuzz -bin $(TMP)/gofuzz/gofuzz.zip -workdir $(TMP)/gofuzz //func Fuzz(data []byte) int { //ctx := context.Background() -//runner := command.NewRunner() -//result, err := fuzz(ctx, runner, data) +//result, err := fuzz(ctx, data) //if err != nil { //// data was invalid in some way //return -1 @@ -103,7 +100,7 @@ func TestCorpus(t *testing.T) { //return result.panicOrN(ctx) //} -func fuzz(ctx context.Context, runner command.Runner, data []byte) (_ *fuzzResult, retErr error) { +func fuzz(ctx context.Context, data []byte) (_ *fuzzResult, retErr error) { dir, err := tmp.NewDir(ctx) if err != nil { return nil, err @@ -122,7 +119,6 @@ func fuzz(ctx context.Context, runner command.Runner, data []byte) (_ *fuzzResul actualProtocFileDescriptorSet, protocErr := prototesting.GetProtocFileDescriptorSet( ctx, - runner, []string{dir.Path()}, filePaths, false, @@ -131,7 +127,6 @@ func fuzz(ctx context.Context, runner command.Runner, data []byte) (_ *fuzzResul image, bufErr := fuzzBuild(ctx, dir.Path()) return newFuzzResult( - runner, bufErr, protocErr, actualProtocFileDescriptorSet, @@ -194,7 +189,6 @@ func untxtar(data []byte, destDirPath string) error { } type fuzzResult struct { - runner command.Runner bufErr error protocErr error actualProtocFileDescriptorSet *descriptorpb.FileDescriptorSet @@ -202,14 +196,12 @@ type fuzzResult struct { } func newFuzzResult( - runner command.Runner, bufErr error, protocErr error, actualProtocFileDescriptorSet *descriptorpb.FileDescriptorSet, image bufimage.Image, ) *fuzzResult { return &fuzzResult{ - runner: runner, bufErr: bufErr, protocErr: protocErr, actualProtocFileDescriptorSet: actualProtocFileDescriptorSet, @@ -246,7 +238,6 @@ func (f *fuzzResult) error(ctx context.Context) error { diff, err := prototesting.DiffFileDescriptorSetsJSON( ctx, - f.runner, fileDescriptorSet, f.actualProtocFileDescriptorSet, "buf", diff --git a/private/bufpkg/bufimage/build_image_test.go b/private/bufpkg/bufimage/build_image_test.go index 7f02a3a046..0d05fb1148 100644 --- a/private/bufpkg/bufimage/build_image_test.go +++ b/private/bufpkg/bufimage/build_image_test.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" "github.com/bufbuild/buf/private/bufpkg/bufprotosource" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/prototesting" "github.com/bufbuild/buf/private/pkg/slogtestext" @@ -219,20 +218,17 @@ func TestGoogleapis(t *testing.T) { func TestCompareCustomOptions1(t *testing.T) { t.Parallel() - runner := command.NewRunner() - testCompare(t, runner, "customoptions1") + testCompare(t, "customoptions1") } func TestCompareProto3Optional1(t *testing.T) { t.Parallel() - runner := command.NewRunner() - testCompare(t, runner, "proto3optional1") + testCompare(t, "proto3optional1") } func TestCompareTrailingComments(t *testing.T) { t.Parallel() - runner := command.NewRunner() - testCompare(t, runner, "trailingcomments") + testCompare(t, "trailingcomments") } func TestCustomOptionsError1(t *testing.T) { @@ -314,8 +310,7 @@ func TestOptionPanic(t *testing.T) { func TestCompareSemicolons(t *testing.T) { t.Parallel() - runner := command.NewRunner() - testCompare(t, runner, "semicolons") + testCompare(t, "semicolons") } func TestModuleTargetFiles(t *testing.T) { @@ -369,15 +364,15 @@ func TestModuleTargetFiles(t *testing.T) { testTagetImageFiles(t, []string{"b.proto", "c.proto"}, "buf.build/foo/b", "buf.build/foo/c") } -func testCompare(t *testing.T, runner command.Runner, relDirPath string) { +func testCompare(t *testing.T, relDirPath string) { dirPath := filepath.Join("testdata", relDirPath) image, fileAnnotations := testBuild(t, false, dirPath, false) require.Equal(t, 0, len(fileAnnotations), fileAnnotations) image = bufimage.ImageWithoutImports(image) fileDescriptorSet := bufimage.ImageToFileDescriptorSet(image) filePaths := buftesting.GetProtocFilePaths(t, dirPath, 0) - actualProtocFileDescriptorSet := buftesting.GetActualProtocFileDescriptorSet(t, runner, false, false, dirPath, filePaths) - prototesting.AssertFileDescriptorSetsEqual(t, runner, fileDescriptorSet, actualProtocFileDescriptorSet) + actualProtocFileDescriptorSet := buftesting.GetActualProtocFileDescriptorSet(t, false, false, dirPath, filePaths) + prototesting.AssertFileDescriptorSetsEqual(t, fileDescriptorSet, actualProtocFileDescriptorSet) } func testBuildGoogleapis(t *testing.T, includeSourceInfo bool) bufimage.Image { diff --git a/private/bufpkg/bufimage/build_image_unix_test.go b/private/bufpkg/bufimage/build_image_unix_test.go index cb6d0636d2..b339acd2c4 100644 --- a/private/bufpkg/bufimage/build_image_unix_test.go +++ b/private/bufpkg/bufimage/build_image_unix_test.go @@ -22,7 +22,6 @@ import ( "github.com/bufbuild/buf/private/buf/buftesting" "github.com/bufbuild/buf/private/bufpkg/bufimage" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/prototesting" "github.com/bufbuild/buf/private/pkg/testingext" "github.com/stretchr/testify/assert" @@ -36,20 +35,18 @@ func TestCompareGoogleapis(t *testing.T) { // code infos that protoc does not image := testBuildGoogleapis(t, false) fileDescriptorSet := bufimage.ImageToFileDescriptorSet(image) - runner := command.NewRunner() - actualProtocFileDescriptorSet := testBuildActualProtocGoogleapis(t, runner, false) + actualProtocFileDescriptorSet := testBuildActualProtocGoogleapis(t, false) prototesting.AssertFileDescriptorSetsEqual( t, - runner, fileDescriptorSet, actualProtocFileDescriptorSet, ) } -func testBuildActualProtocGoogleapis(t *testing.T, runner command.Runner, includeSourceInfo bool) *descriptorpb.FileDescriptorSet { +func testBuildActualProtocGoogleapis(t *testing.T, includeSourceInfo bool) *descriptorpb.FileDescriptorSet { googleapisDirPath := buftesting.GetGoogleapisDirPath(t, buftestingDirPath) filePaths := buftesting.GetProtocFilePaths(t, googleapisDirPath, 0) - fileDescriptorSet := buftesting.GetActualProtocFileDescriptorSet(t, runner, true, includeSourceInfo, googleapisDirPath, filePaths) + fileDescriptorSet := buftesting.GetActualProtocFileDescriptorSet(t, true, includeSourceInfo, googleapisDirPath, filePaths) assert.Equal(t, buftesting.NumGoogleapisFilesWithImports, len(fileDescriptorSet.GetFile())) return fileDescriptorSet diff --git a/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker_test.go b/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker_test.go index a60c9f5c5d..d27cc40265 100644 --- a/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker_test.go +++ b/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker_test.go @@ -33,7 +33,7 @@ import ( "time" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/docker/docker/api/types" dockerimage "github.com/docker/docker/api/types/image" @@ -148,29 +148,28 @@ func buildDockerPlugin(t testing.TB, dockerfilePath string, pluginIdentity strin return "", err } imageName := fmt.Sprintf("%s:%s", pluginIdentity, stringid.GenerateRandomID()) - cmd := command.NewRunner() envContainer, err := app.NewEnvContainerForOS() require.NoError(t, err) - if err := cmd.Run( + if err := execext.Run( context.Background(), docker, - command.RunWithArgs("build", "-t", imageName, "."), - command.RunWithDir(filepath.Dir(dockerfilePath)), - command.RunWithStdout(os.Stdout), - command.RunWithStderr(os.Stderr), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("build", "-t", imageName, "."), + execext.WithDir(filepath.Dir(dockerfilePath)), + execext.WithStdout(os.Stdout), + execext.WithStderr(os.Stderr), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { return "", err } t.Logf("created image: %s", imageName) t.Cleanup(func() { - if err := cmd.Run( + if err := execext.Run( context.Background(), docker, - command.RunWithArgs("rmi", "--force", imageName), - command.RunWithDir(filepath.Dir(dockerfilePath)), - command.RunWithStdout(os.Stdout), - command.RunWithStderr(os.Stderr), + execext.WithArgs("rmi", "--force", imageName), + execext.WithDir(filepath.Dir(dockerfilePath)), + execext.WithStdout(os.Stdout), + execext.WithStderr(os.Stderr), ); err != nil { t.Logf("failed to remove temporary docker image: %v", err) } diff --git a/private/pkg/bandeps/bandeps.go b/private/pkg/bandeps/bandeps.go index ba7cc195b2..ebd0a1c793 100644 --- a/private/pkg/bandeps/bandeps.go +++ b/private/pkg/bandeps/bandeps.go @@ -20,7 +20,6 @@ import ( "log/slog" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" ) // Checker is a checker. @@ -33,8 +32,8 @@ type Checker interface { ) ([]Violation, error) } -func NewChecker(logger *slog.Logger, runner command.Runner) Checker { - return newChecker(logger, runner) +func NewChecker(logger *slog.Logger) Checker { + return newChecker(logger) } // Violation is a violation. diff --git a/private/pkg/bandeps/checker.go b/private/pkg/bandeps/checker.go index 7f8160f2e1..ccc59af620 100644 --- a/private/pkg/bandeps/checker.go +++ b/private/pkg/bandeps/checker.go @@ -20,19 +20,16 @@ import ( "sync" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/thread" ) type checker struct { logger *slog.Logger - runner command.Runner } -func newChecker(logger *slog.Logger, runner command.Runner) *checker { +func newChecker(logger *slog.Logger) *checker { return &checker{ logger: logger, - runner: runner, } } @@ -41,7 +38,7 @@ func (c *checker) Check( envStdioContainer app.EnvStdioContainer, externalConfig ExternalConfig, ) ([]Violation, error) { - state := newState(c.logger, envStdioContainer, c.runner) + state := newState(c.logger, envStdioContainer) if err := c.populateState(ctx, state, externalConfig); err != nil { return nil, err } diff --git a/private/pkg/bandeps/cmd/bandeps/main.go b/private/pkg/bandeps/cmd/bandeps/main.go index be156ec6d6..ed8196db03 100644 --- a/private/pkg/bandeps/cmd/bandeps/main.go +++ b/private/pkg/bandeps/cmd/bandeps/main.go @@ -24,7 +24,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/bandeps" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/slogapp" "github.com/spf13/pflag" @@ -92,7 +91,6 @@ func run(ctx context.Context, container appext.Container, flags *flags) error { } violations, err := bandeps.NewChecker( container.Logger(), - command.NewRunner(), ).Check( ctx, container, diff --git a/private/pkg/bandeps/state.go b/private/pkg/bandeps/state.go index ffe877ecc9..7d3be9e885 100644 --- a/private/pkg/bandeps/state.go +++ b/private/pkg/bandeps/state.go @@ -15,19 +15,19 @@ package bandeps import ( + "bytes" "context" "log/slog" "sync" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/slicesext" ) type state struct { logger *slog.Logger envStdioContainer app.EnvStdioContainer - runner command.Runner violationMap map[string]Violation // map from ./foo/bar/... to actual packages packageExpressionToPackages map[string]*packagesResult @@ -43,12 +43,10 @@ type state struct { func newState( logger *slog.Logger, envStdioContainer app.EnvStdioContainer, - runner command.Runner, ) *state { return &state{ logger: logger, envStdioContainer: envStdioContainer, - runner: runner, violationMap: make(map[string]Violation), packageExpressionToPackages: make(map[string]*packagesResult), packageExpressionToPackagesLock: newKeyRWLock(), @@ -155,7 +153,7 @@ func (s *state) packagesForPackageExpressionUncached( ctx context.Context, packageExpression string, ) (map[string]struct{}, error) { - data, err := command.RunStdout(ctx, s.envStdioContainer, s.runner, `go`, `list`, packageExpression) + data, err := s.runStdout(ctx, `go`, `list`, packageExpression) if err != nil { return nil, err } @@ -210,13 +208,29 @@ func (s *state) depsForPackageUncached( ctx context.Context, pkg string, ) (map[string]struct{}, error) { - data, err := command.RunStdout(ctx, s.envStdioContainer, s.runner, `go`, `list`, `-f`, `{{join .Deps "\n"}}`, pkg) + data, err := s.runStdout(ctx, `go`, `list`, `-f`, `{{join .Deps "\n"}}`, pkg) if err != nil { return nil, err } return slicesext.ToStructMap(getNonEmptyLines(string(data))), nil } +func (s *state) runStdout(ctx context.Context, name string, args ...string) ([]byte, error) { + buffer := bytes.NewBuffer(nil) + if err := execext.Run( + ctx, + name, + execext.WithArgs(args...), + execext.WithEnv(app.Environ(s.envStdioContainer)), + execext.WithStdin(s.envStdioContainer.Stdin()), + execext.WithStdout(buffer), + execext.WithStderr(s.envStdioContainer.Stderr()), + ); err != nil { + return nil, err + } + return buffer.Bytes(), nil +} + type packagesResult struct { Packages map[string]struct{} Err error diff --git a/private/pkg/command/command.go b/private/pkg/command/command.go deleted file mode 100644 index 600646c287..0000000000 --- a/private/pkg/command/command.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package command - -import ( - "bytes" - "context" - "io" - - "github.com/bufbuild/buf/private/pkg/app" -) - -// Process represents a background process. -type Process interface { - // Wait blocks to wait for the process to exit. It will attempt to kill the - // process if the passed context expires. - Wait(ctx context.Context) error -} - -// Runner runs external commands. -// -// A Runner will limit the number of concurrent commands, as well as explicitly -// set stdin, stdout, stderr, and env to nil/empty values if not set with options. -// -// All external commands in buf MUST use command.Runner instead of -// exec.Command, exec.CommandContext. -type Runner interface { - // Run runs the external command. It blocks until the command exits. - // - // This should be used instead of exec.CommandContext(...).Run(). - Run(ctx context.Context, name string, options ...RunOption) error - - // Start runs the external command, returning a [Process] handle to track - // its progress. - // - // This should be used instead of exec.Command(...).Start(). - Start(name string, options ...StartOption) (Process, error) - - isRunner() -} - -// RunOption is an option for Run. -type RunOption func(*execOptions) - -// RunWithArgs returns a new RunOption that sets the arguments other -// than the name. -// -// The default is no arguments. -func RunWithArgs(args ...string) RunOption { - return func(execOptions *execOptions) { - execOptions.args = args - } -} - -// RunWithEnv returns a new RunOption that sets the environment variables. -// -// The default is to use the single environment variable __EMPTY_ENV__=1 as we -// cannot explicitly set an empty environment with the exec package. -// -// If this and RunWithEnviron are specified, the last option specified wins. -func RunWithEnv(env map[string]string) RunOption { - return func(execOptions *execOptions) { - execOptions.environ = envSlice(env) - } -} - -// RunWithEnviron returns a new RunOption that sets the environment variables. -// -// The default is to use the single environment variable __EMPTY_ENV__=1 as we -// cannot explicitly set an empty environment with the exec package. -// -// If this and RunWithEnv are specified, the last option specified wins. -func RunWithEnviron(environ []string) RunOption { - return func(execOptions *execOptions) { - execOptions.environ = environ - } -} - -// RunWithStdin returns a new RunOption that sets the stdin. -// -// The default is ioext.DiscardReader. -func RunWithStdin(stdin io.Reader) RunOption { - return func(execOptions *execOptions) { - execOptions.stdin = stdin - } -} - -// RunWithStdout returns a new RunOption that sets the stdout. -// -// The default is the null device (os.DevNull). -func RunWithStdout(stdout io.Writer) RunOption { - return func(execOptions *execOptions) { - execOptions.stdout = stdout - } -} - -// RunWithStderr returns a new RunOption that sets the stderr. -// -// The default is the null device (os.DevNull). -func RunWithStderr(stderr io.Writer) RunOption { - return func(execOptions *execOptions) { - execOptions.stderr = stderr - } -} - -// RunWithDir returns a new RunOption that sets the working directory. -// -// The default is the current working directory. -func RunWithDir(dir string) RunOption { - return func(execOptions *execOptions) { - execOptions.dir = dir - } -} - -// StartOption is an option for Start. -type StartOption func(*execOptions) - -// StartWithArgs returns a new RunOption that sets the arguments other -// than the name. -// -// The default is no arguments. -func StartWithArgs(args ...string) StartOption { - return func(execOptions *execOptions) { - execOptions.args = args - } -} - -// StartWithEnv returns a new RunOption that sets the environment variables. -// -// The default is to use the single environment variable __EMPTY_ENV__=1 as we -// cannot explicitly set an empty environment with the exec package. -// -// If this and StartWithEnviron are specified, the last option specified wins. -func StartWithEnv(env map[string]string) StartOption { - return func(execOptions *execOptions) { - execOptions.environ = envSlice(env) - } -} - -// StartWithEnviron returns a new RunOption that sets the environment variables. -// -// The default is to use the single environment variable __EMPTY_ENV__=1 as we -// cannot explicitly set an empty environment with the exec package. -// -// If this and StartWithEnv are specified, the last option specified wins. -func StartWithEnviron(environ []string) StartOption { - return func(execOptions *execOptions) { - execOptions.environ = environ - } -} - -// StartWithStdin returns a new RunOption that sets the stdin. -// -// The default is ioext.DiscardReader. -func StartWithStdin(stdin io.Reader) StartOption { - return func(execOptions *execOptions) { - execOptions.stdin = stdin - } -} - -// StartWithStdout returns a new RunOption that sets the stdout. -// -// The default is the null device (os.DevNull). -func StartWithStdout(stdout io.Writer) StartOption { - return func(execOptions *execOptions) { - execOptions.stdout = stdout - } -} - -// StartWithStderr returns a new RunOption that sets the stderr. -// -// The default is the null device (os.DevNull). -func StartWithStderr(stderr io.Writer) StartOption { - return func(execOptions *execOptions) { - execOptions.stderr = stderr - } -} - -// StartWithDir returns a new RunOption that sets the working directory. -// -// The default is the current working directory. -func StartWithDir(dir string) StartOption { - return func(execOptions *execOptions) { - execOptions.dir = dir - } -} - -// NewRunner returns a new Runner. -func NewRunner(options ...RunnerOption) Runner { - return newRunner(options...) -} - -// RunnerOption is an option for a new Runner. -type RunnerOption func(*runner) - -// RunnerWithParallelism returns a new Runner that sets the number of -// external commands that can be run concurrently. -// -// The default is thread.Parallelism(). -func RunnerWithParallelism(parallelism int) RunnerOption { - if parallelism < 1 { - parallelism = 1 - } - return func(runner *runner) { - runner.parallelism = parallelism - } -} - -// RunStdout is a convenience function that attaches the container environment, -// stdin, and stderr, and returns the stdout as a byte slice. -func RunStdout( - ctx context.Context, - container app.EnvStdioContainer, - runner Runner, - name string, - args ...string, -) ([]byte, error) { - buffer := bytes.NewBuffer(nil) - if err := runner.Run( - ctx, - name, - RunWithArgs(args...), - RunWithEnv(app.EnvironMap(container)), - RunWithStdin(container.Stdin()), - RunWithStdout(buffer), - RunWithStderr(container.Stderr()), - ); err != nil { - return nil, err - } - return buffer.Bytes(), nil -} diff --git a/private/pkg/command/runner.go b/private/pkg/command/runner.go deleted file mode 100644 index 52c97730d4..0000000000 --- a/private/pkg/command/runner.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package command - -import ( - "context" - "io" - "os/exec" - "sort" - - "github.com/bufbuild/buf/private/pkg/ioext" - "github.com/bufbuild/buf/private/pkg/thread" -) - -var emptyEnv = envSlice( - map[string]string{ - "__EMPTY_ENV": "1", - }, -) - -type runner struct { - parallelism int - - semaphoreC chan struct{} -} - -func newRunner(options ...RunnerOption) *runner { - runner := &runner{ - parallelism: thread.Parallelism(), - } - for _, option := range options { - option(runner) - } - runner.semaphoreC = make(chan struct{}, runner.parallelism) - return runner -} - -func (r *runner) Run(ctx context.Context, name string, options ...RunOption) error { - execOptions := newExecOptions() - for _, option := range options { - option(execOptions) - } - cmd := exec.CommandContext(ctx, name, execOptions.args...) - execOptions.ApplyToCmd(cmd) - r.increment() - err := cmd.Run() - r.decrement() - return err -} - -func (r *runner) Start(name string, options ...StartOption) (Process, error) { - execOptions := newExecOptions() - for _, option := range options { - option(execOptions) - } - cmd := exec.Command(name, execOptions.args...) - execOptions.ApplyToCmd(cmd) - r.increment() - if err := cmd.Start(); err != nil { - return nil, err - } - process := newProcess(cmd, r.decrement) - process.Monitor() - return process, nil -} - -func (r *runner) increment() { - r.semaphoreC <- struct{}{} -} - -func (r *runner) decrement() { - <-r.semaphoreC -} - -func (*runner) isRunner() {} - -type execOptions struct { - args []string - environ []string - stdin io.Reader - stdout io.Writer - stderr io.Writer - dir string -} - -func newExecOptions() *execOptions { - return &execOptions{} -} - -func (e *execOptions) ApplyToCmd(cmd *exec.Cmd) { - // If the user did not specify env vars, we want to make sure - // the command has access to none, as the default is the current env. - if len(e.environ) == 0 { - cmd.Env = emptyEnv - } else { - cmd.Env = e.environ - } - // If the user did not specify any stdin, we want to make sure - // the command has access to none, as the default is the default stdin. - if e.stdin == nil { - cmd.Stdin = ioext.DiscardReader - } else { - cmd.Stdin = e.stdin - } - // If Stdout or Stderr are nil, os/exec connects the process output directly - // to the null device. - cmd.Stdout = e.stdout - cmd.Stderr = e.stderr - // The default behavior for dir is what we want already, i.e. the current - // working directory. - cmd.Dir = e.dir -} - -func envSlice(env map[string]string) []string { - var environ []string - for key, value := range env { - environ = append(environ, key+"="+value) - } - sort.Strings(environ) - return environ -} diff --git a/private/pkg/diff/diff.go b/private/pkg/diff/diff.go index 2c756d2132..4a0a8ea2de 100644 --- a/private/pkg/diff/diff.go +++ b/private/pkg/diff/diff.go @@ -33,7 +33,7 @@ import ( "path/filepath" "runtime" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" ) // Diff does a diff. @@ -41,7 +41,6 @@ import ( // Returns nil if no diff. func Diff( ctx context.Context, - runner command.Runner, b1 []byte, b2 []byte, filename1 string, @@ -54,7 +53,6 @@ func Diff( } return doDiff( ctx, - runner, b1, b2, filename1, @@ -83,7 +81,6 @@ func DiffWithSuppressTimestamps() DiffOption { func doDiff( ctx context.Context, - runner command.Runner, b1 []byte, b2 []byte, filename1 string, @@ -117,12 +114,12 @@ func doDiff( } buffer := bytes.NewBuffer(nil) - err = runner.Run( + err = execext.Run( ctx, binaryPath, - command.RunWithArgs("-u", f1, f2), - command.RunWithStdout(buffer), - command.RunWithStderr(buffer), + execext.WithArgs("-u", f1, f2), + execext.WithStdout(buffer), + execext.WithStderr(buffer), ) data := buffer.Bytes() if len(data) > 0 { diff --git a/private/pkg/execext/execext.go b/private/pkg/execext/execext.go new file mode 100644 index 0000000000..2c4c554a4f --- /dev/null +++ b/private/pkg/execext/execext.go @@ -0,0 +1,259 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package execext + +import ( + "context" + "io" + "os/exec" + "slices" +) + +var emptyEnv = []string{"__EMPTY_ENV__=1"} + +// Run runs the external command. It blocks until the command exits. +// +// Stdin, stdout, stderr, and env will be explicitly set to nil/empty values if not set with options. +// The command will be killed if the Context is cancelled. +// +// This should be used instead of exec.CommandContext(...).Run(). +func Run(ctx context.Context, name string, options ...RunOption) error { + runStartOptions := newRunStartOptions() + for _, option := range options { + option.applyRun(runStartOptions) + } + cmd := exec.CommandContext(ctx, name, runStartOptions.args...) + runStartOptions.applyCmd(cmd) + return cmd.Run() +} + +// Start runs the external command, returning a [Process] to track its progress. +// +// Stdin, stdout, stderr, and env will be explicitly set to nil/empty values if not set with options. +// The command will be killed if the Context is cancelled. +// +// This should be used instead of exec.Command(...).Start(). +func Start(ctx context.Context, name string, options ...StartOption) (Process, error) { + runStartOptions := newRunStartOptions() + for _, option := range options { + option.applyStart(runStartOptions) + } + cmd := exec.CommandContext(ctx, name, runStartOptions.args...) + runStartOptions.applyCmd(cmd) + if err := cmd.Start(); err != nil { + return nil, err + } + process := newProcess(ctx, cmd) + process.monitor() + return process, nil +} + +// Process represents a background process. +type Process interface { + // Wait blocks to wait for the process to exit. + Wait() error + + isProcess() +} + +// RunOption is an option for [Run]. +type RunOption interface { + applyRun(*runStartOptions) +} + +// StartOption is an option for [Start]. +type StartOption interface { + applyStart(*runStartOptions) +} + +// RunStartOption is both a [RunOption] and a [StartOption]. +// +// We split out RunOptions and StartOptions for maximum future flexibility, in case we ever want +// the options for [Run] and [Start] to deviate. +type RunStartOption interface { + RunOption + StartOption +} + +// WithArgs returns a new option that sets the arguments other than the name. +// +// The default is no additional arguments. +func WithArgs(args ...string) RunStartOption { + return &argsOption{args: slices.Clone(args)} +} + +// WithEnv returns a new option that sets the environment variables. +// +// The default is to use the single envment variable __EMPTY_ENV__=1 as we +// cannot explicitly set an empty envment with the exec package. +// +// If this and WithEnv are specified, the last option specified wins. +func WithEnv(env []string) RunStartOption { + return &envOption{env: slices.Clone(env)} +} + +// WithStdin returns a new option that sets the stdin. +// +// The default is a [io.Reader] that always returns empty.. +func WithStdin(stdin io.Reader) RunStartOption { + return &stdinOption{stdin: stdin} +} + +// WithStdout returns a new option that sets the stdout. +// +// The default is a [io.Writer] that ignores all writes.. +func WithStdout(stdout io.Writer) RunStartOption { + return &stdoutOption{stdout: stdout} +} + +// WithStderr returns a new option that sets the stderr. +// +// The default is a [io.Writer] that ignores all writes.. +func WithStderr(stderr io.Writer) RunStartOption { + return &stderrOption{stderr: stderr} +} + +// WithDir returns a new option that sets the working directory. +// +// The default is the current working directory. +func WithDir(dir string) RunStartOption { + return &dirOption{dir: dir} +} + +// *** PRIVATE *** + +type argsOption struct { + args []string +} + +func (a *argsOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.args = a.args +} + +func (a *argsOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.args = a.args +} + +type envOption struct { + env []string +} + +func (e *envOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.env = e.env +} + +func (e *envOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.env = e.env +} + +type stdinOption struct { + stdin io.Reader +} + +func (i *stdinOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.stdin = i.stdin +} + +func (i *stdinOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.stdin = i.stdin +} + +type stdoutOption struct { + stdout io.Writer +} + +func (o *stdoutOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.stdout = o.stdout +} + +func (o *stdoutOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.stdout = o.stdout +} + +type stderrOption struct { + stderr io.Writer +} + +func (r *stderrOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.stderr = r.stderr +} + +func (r *stderrOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.stderr = r.stderr +} + +type dirOption struct { + dir string +} + +func (d *dirOption) applyRun(runStartOptions *runStartOptions) { + runStartOptions.dir = d.dir +} + +func (d *dirOption) applyStart(runStartOptions *runStartOptions) { + runStartOptions.dir = d.dir +} + +type runStartOptions struct { + args []string + env []string + stdin io.Reader + stdout io.Writer + stderr io.Writer + dir string +} + +func newRunStartOptions() *runStartOptions { + return &runStartOptions{} +} + +func (rs *runStartOptions) applyCmd(cmd *exec.Cmd) { + // If the user did not specify env vars, we want to make sure + // the command has access to none, as the default is the current env. + if len(rs.env) == 0 { + cmd.Env = emptyEnv + } else { + cmd.Env = rs.env + } + // If the user did not specify any stdin, we want to make sure + // the command has access to none, as the default is the default stdin. + // + // Note: This *should* be the same as just having cmd.Stdin = nil, given that + // exec.Cmd documents that Stdin has the same behavior as Stdout/Stderr, namely + // that os.DevNull is used. This has been the case for Stdin since at least 2014. + // However, way back when this package was first introduced, we set up the discardReader + // for some reason, and we can't remember why. We're terrified to change it, as there + // *may* have been some reason to do so. os.DevNull is actually just a string such + // as "/dev/null" on Unix systems, so how Golang actually handles this is somewhat + // unknown. Honestly, I might just want to change Stdout/Stderr to use a discardWriter. + if rs.stdin == nil { + cmd.Stdin = discardReader{} + } else { + cmd.Stdin = rs.stdin + } + // If Stdout or Stderr are nil, os/exec connects the process output directly + // to the null device. + cmd.Stdout = rs.stdout + cmd.Stderr = rs.stderr + // The default behavior for dir is what we want already, i.e. the current + // working directory. + cmd.Dir = rs.dir +} + +type discardReader struct{} + +func (discardReader) Read([]byte) (int, error) { + return 0, io.EOF +} diff --git a/private/pkg/command/runner_unix_test.go b/private/pkg/execext/execext_unix_test.go similarity index 62% rename from private/pkg/command/runner_unix_test.go rename to private/pkg/execext/execext_unix_test.go index fb46e20df3..2575c5edb6 100644 --- a/private/pkg/command/runner_unix_test.go +++ b/private/pkg/execext/execext_unix_test.go @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris +//go:build unix -package command +package execext import ( "context" @@ -24,29 +23,27 @@ import ( "github.com/stretchr/testify/require" ) -func TestDoubleWait(t *testing.T) { +func TestStartSimple(t *testing.T) { t.Parallel() - runner := NewRunner() - process, err := runner.Start("echo") - require.NoError(t, err) ctx := context.Background() - _ = process.Wait(ctx) - require.Equal(t, process.Wait(ctx), errWaitAlreadyCalled) -} - -func TestNoDeadlock(t *testing.T) { - t.Parallel() - - runner := NewRunner(RunnerWithParallelism(2)) processes := make([]Process, 4) for i := 0; i < 4; i++ { - process, err := runner.Start("sleep", StartWithArgs("1")) + process, err := Start(ctx, "sleep", WithArgs("1")) require.NoError(t, err) processes[i] = process } - ctx := context.Background() for _, process := range processes { - require.NoError(t, process.Wait(ctx)) + require.NoError(t, process.Wait()) } } + +func TestStartDoubleWait(t *testing.T) { + t.Parallel() + + ctx := context.Background() + process, err := Start(ctx, "echo") + require.NoError(t, err) + _ = process.Wait() + require.Equal(t, process.Wait(), errWaitAlreadyCalled) +} diff --git a/private/pkg/command/process.go b/private/pkg/execext/process.go similarity index 66% rename from private/pkg/command/process.go rename to private/pkg/execext/process.go index 02ccd8016d..4b72533e99 100644 --- a/private/pkg/command/process.go +++ b/private/pkg/execext/process.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package execext import ( "context" @@ -25,36 +25,20 @@ import ( var errWaitAlreadyCalled = errors.New("wait already called on process") type process struct { + ctx context.Context cmd *exec.Cmd - done func() waitC chan error } -// newProcess wraps an *exec.Cmd and monitors it for exiting. -// When the process exits, done will be called. -// -// This implements the Process interface. -// -// The process is expected to have been started by the caller. -func newProcess(cmd *exec.Cmd, done func()) *process { +func newProcess(ctx context.Context, cmd *exec.Cmd) *process { return &process{ + ctx: ctx, cmd: cmd, - done: done, waitC: make(chan error, 1), } } -// Monitor starts monitoring of the *exec.Cmd. -func (p *process) Monitor() { - go func() { - p.waitC <- p.cmd.Wait() - close(p.waitC) - p.done() - }() -} - -// Wait waits for the process to exit. -func (p *process) Wait(ctx context.Context) error { +func (p *process) Wait() error { select { case err, ok := <-p.waitC: // Process exited @@ -62,8 +46,17 @@ func (p *process) Wait(ctx context.Context) error { return err } return errWaitAlreadyCalled - case <-ctx.Done(): + case <-p.ctx.Done(): // Timed out. Send a kill signal and release our handle to it. - return multierr.Combine(ctx.Err(), p.cmd.Process.Kill()) + return multierr.Combine(p.ctx.Err(), p.cmd.Process.Kill()) } } + +func (p *process) monitor() { + go func() { + p.waitC <- p.cmd.Wait() + close(p.waitC) + }() +} + +func (*process) isProcess() {} diff --git a/private/pkg/command/usage.gen.go b/private/pkg/execext/usage.gen.go similarity index 97% rename from private/pkg/command/usage.gen.go rename to private/pkg/execext/usage.gen.go index b84237f458..4c3ce0da85 100644 --- a/private/pkg/command/usage.gen.go +++ b/private/pkg/execext/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package command +package execext import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/pkg/git/cloner.go b/private/pkg/git/cloner.go index f891af6ca6..d79b28e242 100644 --- a/private/pkg/git/cloner.go +++ b/private/pkg/git/cloner.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/slogext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageos" @@ -35,20 +35,17 @@ import ( type cloner struct { logger *slog.Logger storageosProvider storageos.Provider - runner command.Runner options ClonerOptions } func newCloner( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, options ClonerOptions, ) *cloner { return &cloner{ logger: logger, storageosProvider: storageosProvider, - runner: runner, options: options, } } @@ -89,25 +86,25 @@ func (c *cloner) CloneToBucket( }() buffer := bytes.NewBuffer(nil) - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs("init"), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithArgs("init"), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs("remote", "add", "origin", url), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithArgs("remote", "add", "origin", url), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } @@ -135,10 +132,10 @@ func (c *cloner) CloneToBucket( var usedFallback bool fetchRef, fallbackRef, checkoutRef := getRefspecsForName(options.Name) buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs(append( + execext.WithArgs(append( gitConfigAuthArgs, "fetch", "--depth", depthArg, @@ -146,9 +143,9 @@ func (c *cloner) CloneToBucket( "origin", fetchRef, )...), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { // If the ref fetch failed, without a fallback, return the error. if fallbackRef == "" { @@ -157,10 +154,10 @@ func (c *cloner) CloneToBucket( // Failed to fetch the ref directly, try to fetch the fallback ref. usedFallback = true buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs(append( + execext.WithArgs(append( gitConfigAuthArgs, "fetch", "--depth", depthArg, @@ -168,9 +165,9 @@ func (c *cloner) CloneToBucket( "origin", fallbackRef, )...), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } @@ -179,13 +176,13 @@ func (c *cloner) CloneToBucket( // Always checkout the FETCH_HEAD to populate the working directory. // This allows for referencing HEAD in checkouts. buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs("checkout", "--force", "FETCH_HEAD"), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithArgs("checkout", "--force", "FETCH_HEAD"), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } @@ -193,13 +190,13 @@ func (c *cloner) CloneToBucket( // from the fetch ref. if checkoutRef != "" && (usedFallback || checkoutRef != fetchRef) { buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs("checkout", "--force", checkoutRef), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithArgs("checkout", "--force", checkoutRef), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } @@ -207,10 +204,10 @@ func (c *cloner) CloneToBucket( if options.RecurseSubmodules { buffer.Reset() - if err := c.runner.Run( + if err := execext.Run( ctx, "git", - command.RunWithArgs(append( + execext.WithArgs(append( gitConfigAuthArgs, "submodule", "update", @@ -220,9 +217,9 @@ func (c *cloner) CloneToBucket( "--depth", depthArg, )...), - command.RunWithEnv(app.EnvironMap(envContainer)), - command.RunWithStderr(buffer), - command.RunWithDir(baseDir.Path()), + execext.WithEnv(app.Environ(envContainer)), + execext.WithStderr(buffer), + execext.WithDir(baseDir.Path()), ); err != nil { return newGitCommandError(err, buffer) } diff --git a/private/pkg/git/cmd/git-ls-files-unstaged/main.go b/private/pkg/git/cmd/git-ls-files-unstaged/main.go index 25c1415e1a..2d66038c9f 100644 --- a/private/pkg/git/cmd/git-ls-files-unstaged/main.go +++ b/private/pkg/git/cmd/git-ls-files-unstaged/main.go @@ -22,7 +22,6 @@ import ( "strings" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/git" ) @@ -31,7 +30,7 @@ func main() { } func run(ctx context.Context, container app.Container) error { - files, err := git.NewLister(command.NewRunner()).ListFilesAndUnstagedFiles( + files, err := git.NewLister().ListFilesAndUnstagedFiles( ctx, container, git.ListFilesAndUnstagedFilesOptions{}, diff --git a/private/pkg/git/git.go b/private/pkg/git/git.go index 04c950d6af..339fad2bd4 100644 --- a/private/pkg/git/git.go +++ b/private/pkg/git/git.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageos" ) @@ -103,10 +103,9 @@ type CloneToBucketOptions struct { func NewCloner( logger *slog.Logger, storageosProvider storageos.Provider, - runner command.Runner, options ClonerOptions, ) Cloner { - return newCloner(logger, storageosProvider, runner, options) + return newCloner(logger, storageosProvider, options) } // ClonerOptions are options for a new Cloner. @@ -144,8 +143,8 @@ type Lister interface { } // NewLister returns a new Lister. -func NewLister(runner command.Runner) Lister { - return newLister(runner) +func NewLister() Lister { + return newLister() } // ListFilesAndUnstagedFilesOptions are options for ListFilesAndUnstagedFiles. @@ -200,12 +199,11 @@ type Remote interface { // permissions. func GetRemote( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, name string, ) (Remote, error) { - return getRemote(ctx, runner, envContainer, dir, name) + return getRemote(ctx, envContainer, dir, name) } // CheckDirectoryIsValidGitCheckout runs a simple git rev-parse. In the case where the @@ -214,20 +212,19 @@ func GetRemote( // ErrInvalidGitCheckout to the user. func CheckDirectoryIsValidGitCheckout( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, ) error { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("rev-parse"), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("rev-parse"), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { var exitErr *exec.ExitError if errors.As(err, &exitErr) { @@ -244,23 +241,22 @@ func CheckDirectoryIsValidGitCheckout( // changes from git based on the given directory. func CheckForUncommittedGitChanges( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, ) ([]string, error) { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) var modifiedFiles []string - envMap := app.EnvironMap(envContainer) + environ := app.Environ(envContainer) // Unstaged changes - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("diff", "--name-only"), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(envMap), + execext.WithArgs("diff", "--name-only"), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(environ), ); err != nil { return nil, fmt.Errorf("failed to get unstaged changes: %w: %s", err, stderr.String()) } @@ -269,14 +265,14 @@ func CheckForUncommittedGitChanges( stdout = bytes.NewBuffer(nil) stderr = bytes.NewBuffer(nil) // Staged changes - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("diff", "--name-only", "--cached"), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(envMap), + execext.WithArgs("diff", "--name-only", "--cached"), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(environ), ); err != nil { return nil, fmt.Errorf("failed to get staged changes: %w: %s", err, stderr.String()) } @@ -288,20 +284,19 @@ func CheckForUncommittedGitChanges( // GetCurrentHEADGitCommit returns the current HEAD commit based on the given directory. func GetCurrentHEADGitCommit( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, ) (string, error) { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("rev-parse", "HEAD"), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("rev-parse", "HEAD"), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { return "", fmt.Errorf("failed to get current HEAD commit: %w: %s", err, stderr.String()) } @@ -313,7 +308,6 @@ func GetCurrentHEADGitCommit( // passing the environment for permissions. func GetRefsForGitCommitAndRemote( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, remote string, @@ -321,14 +315,14 @@ func GetRefsForGitCommitAndRemote( ) ([]string, error) { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("ls-remote", "--heads", "--tags", remote), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("ls-remote", "--heads", "--tags", remote), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { return nil, fmt.Errorf("failed to get refs for remote %s: %w: %s", remote, err, stderr.String()) } diff --git a/private/pkg/git/git_test.go b/private/pkg/git/git_test.go index b9091c5b15..3bd15af640 100644 --- a/private/pkg/git/git_test.go +++ b/private/pkg/git/git_test.go @@ -28,7 +28,6 @@ import ( "testing" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storagemem" @@ -42,12 +41,11 @@ func TestGitCloner(t *testing.T) { ctx := context.Background() container, err := app.NewContainerForOS() require.NoError(t, err) - runner := command.NewRunner() - originDir, workDir := createGitDirs(ctx, t, container, runner) + originDir, workDir := createGitDirs(ctx, t, container) t.Run("default", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, nil, false) + readBucket := readBucketForName(ctx, t, workDir, 1, nil, false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -60,7 +58,7 @@ func TestGitCloner(t *testing.T) { t.Run("default_submodule", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, nil, true) + readBucket := readBucketForName(ctx, t, workDir, 1, nil, true) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -74,7 +72,7 @@ func TestGitCloner(t *testing.T) { t.Run("main", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewBranchName("main"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewBranchName("main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -84,7 +82,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=main", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewRefName("main"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewRefName("main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -95,7 +93,7 @@ func TestGitCloner(t *testing.T) { t.Run("origin/main", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewBranchName("origin/main"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewBranchName("origin/main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -105,7 +103,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=origin/main", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewRefName("origin/main"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewRefName("origin/main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -116,7 +114,7 @@ func TestGitCloner(t *testing.T) { t.Run("origin/remote-branch", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewBranchName("origin/remote-branch"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewBranchName("origin/remote-branch"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -127,7 +125,7 @@ func TestGitCloner(t *testing.T) { t.Run("remote-tag", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewTagName("remote-tag"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewTagName("remote-tag"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -137,7 +135,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=remote-tag", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewRefName("remote-tag"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewRefName("remote-tag"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -147,7 +145,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("tag=remote-annotated-tag", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewTagName("remote-annotated-tag"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewTagName("remote-annotated-tag"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -157,7 +155,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=remote-annotated-tag", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewRefName("remote-annotated-tag"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewRefName("remote-annotated-tag"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -168,7 +166,7 @@ func TestGitCloner(t *testing.T) { t.Run("branch_and_main_ref", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefNameWithBranch("HEAD~", "main"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefNameWithBranch("HEAD~", "main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -178,7 +176,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("branch=main,ref=main~1", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefNameWithBranch("main~", "main"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefNameWithBranch("main~", "main"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -189,7 +187,7 @@ func TestGitCloner(t *testing.T) { t.Run("branch_and_ref", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefNameWithBranch("local-branch~", "local-branch"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefNameWithBranch("local-branch~", "local-branch"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -200,7 +198,7 @@ func TestGitCloner(t *testing.T) { t.Run("ref=HEAD", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 1, NewRefName("HEAD"), false) + readBucket := readBucketForName(ctx, t, workDir, 1, NewRefName("HEAD"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -210,7 +208,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=HEAD~", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefName("HEAD~"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefName("HEAD~"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -220,7 +218,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=HEAD~1", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefName("HEAD~1"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefName("HEAD~1"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -230,7 +228,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=HEAD^", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefName("HEAD^"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefName("HEAD^"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -240,7 +238,7 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=HEAD^1", func(t *testing.T) { t.Parallel() - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefName("HEAD^1"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefName("HEAD^1"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -251,9 +249,9 @@ func TestGitCloner(t *testing.T) { t.Run("ref=", func(t *testing.T) { t.Parallel() - revParseBytes, err := command.RunStdout(ctx, container, runner, "git", "-C", workDir, "rev-parse", "HEAD~") + revParseBytes, err := runStdout(ctx, container, "git", "-C", workDir, "rev-parse", "HEAD~") require.NoError(t, err) - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefName(strings.TrimSpace(string(revParseBytes))), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefName(strings.TrimSpace(string(revParseBytes))), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -263,10 +261,10 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=", func(t *testing.T) { t.Parallel() - revParseBytes, err := command.RunStdout(ctx, container, runner, "git", "-C", workDir, "rev-parse", "HEAD~") + revParseBytes, err := runStdout(ctx, container, "git", "-C", workDir, "rev-parse", "HEAD~") require.NoError(t, err) partialRef := NewRefName(strings.TrimSpace(string(revParseBytes))[:8]) - readBucket := readBucketForName(ctx, t, runner, workDir, 8, partialRef, false) + readBucket := readBucketForName(ctx, t, workDir, 8, partialRef, false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -277,9 +275,9 @@ func TestGitCloner(t *testing.T) { t.Run("ref=,branch=origin/remote-branch", func(t *testing.T) { t.Parallel() - revParseBytes, err := command.RunStdout(ctx, container, runner, "git", "-C", originDir, "rev-parse", "remote-branch~") + revParseBytes, err := runStdout(ctx, container, "git", "-C", originDir, "rev-parse", "remote-branch~") require.NoError(t, err) - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefNameWithBranch(strings.TrimSpace(string(revParseBytes)), "origin/remote-branch"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefNameWithBranch(strings.TrimSpace(string(revParseBytes)), "origin/remote-branch"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -289,10 +287,10 @@ func TestGitCloner(t *testing.T) { }) t.Run("ref=,branch=origin/remote-branch", func(t *testing.T) { t.Parallel() - revParseBytes, err := command.RunStdout(ctx, container, runner, "git", "-C", originDir, "rev-parse", "remote-branch~") + revParseBytes, err := runStdout(ctx, container, "git", "-C", originDir, "rev-parse", "remote-branch~") require.NoError(t, err) partialRef := strings.TrimSpace(string(revParseBytes))[:8] - readBucket := readBucketForName(ctx, t, runner, workDir, 2, NewRefNameWithBranch(partialRef, "origin/remote-branch"), false) + readBucket := readBucketForName(ctx, t, workDir, 2, NewRefNameWithBranch(partialRef, "origin/remote-branch"), false) content, err := storage.ReadPath(ctx, readBucket, "test.proto") require.NoError(t, err) @@ -302,10 +300,10 @@ func TestGitCloner(t *testing.T) { }) } -func readBucketForName(ctx context.Context, t *testing.T, runner command.Runner, path string, depth uint32, name Name, recurseSubmodules bool) storage.ReadBucket { +func readBucketForName(ctx context.Context, t *testing.T, path string, depth uint32, name Name, recurseSubmodules bool) storage.ReadBucket { t.Helper() storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks()) - cloner := NewCloner(slogtestext.NewLogger(t), storageosProvider, runner, ClonerOptions{}) + cloner := NewCloner(slogtestext.NewLogger(t), storageosProvider, ClonerOptions{}) envContainer, err := app.NewEnvContainerForOS() require.NoError(t, err) @@ -330,21 +328,20 @@ func createGitDirs( ctx context.Context, t *testing.T, container app.EnvStdioContainer, - runner command.Runner, ) (string, string) { tmpDir := t.TempDir() submodulePath := filepath.Join(tmpDir, "submodule") require.NoError(t, os.MkdirAll(submodulePath, os.ModePerm)) - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "init") - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "config", "user.email", "tests@buf.build") - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "config", "user.name", "Buf go tests") - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "checkout", "-b", "main") + runCommand(ctx, t, container, "git", "-C", submodulePath, "init") + runCommand(ctx, t, container, "git", "-C", submodulePath, "config", "user.email", "tests@buf.build") + runCommand(ctx, t, container, "git", "-C", submodulePath, "config", "user.name", "Buf go tests") + runCommand(ctx, t, container, "git", "-C", submodulePath, "checkout", "-b", "main") require.NoError(t, os.WriteFile(filepath.Join(submodulePath, "test.proto"), []byte("// submodule"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "add", "test.proto") - runCommand(ctx, t, container, runner, "git", "-C", submodulePath, "commit", "-m", "commit 0") + runCommand(ctx, t, container, "git", "-C", submodulePath, "add", "test.proto") + runCommand(ctx, t, container, "git", "-C", submodulePath, "commit", "-m", "commit 0") - gitExecPathBytes, err := command.RunStdout(ctx, container, runner, "git", "--exec-path") + gitExecPathBytes, err := runStdout(ctx, container, "git", "--exec-path") require.NoError(t, err) gitExecPath := strings.TrimSpace(string(gitExecPathBytes)) // In Golang 1.22, the behavior of "os/exec" was changed so that LookPath is no longer called @@ -374,38 +371,38 @@ func createGitDirs( originPath := filepath.Join(tmpDir, "origin") require.NoError(t, os.MkdirAll(originPath, 0777)) - runCommand(ctx, t, container, runner, "git", "-C", originPath, "init") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "config", "user.email", "tests@buf.build") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "config", "user.name", "Buf go tests") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "checkout", "-b", "main") + runCommand(ctx, t, container, "git", "-C", originPath, "init") + runCommand(ctx, t, container, "git", "-C", originPath, "config", "user.email", "tests@buf.build") + runCommand(ctx, t, container, "git", "-C", originPath, "config", "user.name", "Buf go tests") + runCommand(ctx, t, container, "git", "-C", originPath, "checkout", "-b", "main") require.NoError(t, os.WriteFile(filepath.Join(originPath, "test.proto"), []byte("// commit 0"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", originPath, "add", "test.proto") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "commit", "-m", "commit 0") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "submodule", "add", submodulePath, "submodule") + runCommand(ctx, t, container, "git", "-C", originPath, "add", "test.proto") + runCommand(ctx, t, container, "git", "-C", originPath, "commit", "-m", "commit 0") + runCommand(ctx, t, container, "git", "-C", originPath, "submodule", "add", submodulePath, "submodule") require.NoError(t, os.WriteFile(filepath.Join(originPath, "test.proto"), []byte("// commit 1"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", originPath, "add", "test.proto") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "commit", "-m", "commit 1") + runCommand(ctx, t, container, "git", "-C", originPath, "add", "test.proto") + runCommand(ctx, t, container, "git", "-C", originPath, "commit", "-m", "commit 1") workPath := filepath.Join(tmpDir, "workdir") - runCommand(ctx, t, container, runner, "git", "clone", originPath, workPath) - runCommand(ctx, t, container, runner, "git", "-C", workPath, "config", "user.email", "tests@buf.build") - runCommand(ctx, t, container, runner, "git", "-C", workPath, "config", "user.name", "Buf go tests") - runCommand(ctx, t, container, runner, "git", "-C", workPath, "checkout", "-b", "local-branch") + runCommand(ctx, t, container, "git", "clone", originPath, workPath) + runCommand(ctx, t, container, "git", "-C", workPath, "config", "user.email", "tests@buf.build") + runCommand(ctx, t, container, "git", "-C", workPath, "config", "user.name", "Buf go tests") + runCommand(ctx, t, container, "git", "-C", workPath, "checkout", "-b", "local-branch") require.NoError(t, os.WriteFile(filepath.Join(workPath, "test.proto"), []byte("// commit 2"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", workPath, "commit", "-a", "-m", "commit 2") + runCommand(ctx, t, container, "git", "-C", workPath, "commit", "-a", "-m", "commit 2") require.NoError(t, os.WriteFile(filepath.Join(originPath, "test.proto"), []byte("// commit 3"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", originPath, "add", "test.proto") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "commit", "-m", "commit 3") + runCommand(ctx, t, container, "git", "-C", originPath, "add", "test.proto") + runCommand(ctx, t, container, "git", "-C", originPath, "commit", "-m", "commit 3") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "checkout", "-b", "remote-branch") + runCommand(ctx, t, container, "git", "-C", originPath, "checkout", "-b", "remote-branch") require.NoError(t, os.WriteFile(filepath.Join(originPath, "test.proto"), []byte("// commit 4"), 0600)) - runCommand(ctx, t, container, runner, "git", "-C", originPath, "add", "test.proto") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "commit", "-m", "commit 4") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "tag", "remote-tag") - runCommand(ctx, t, container, runner, "git", "-C", originPath, "tag", "-a", "remote-annotated-tag", "-m", "annotated tag") + runCommand(ctx, t, container, "git", "-C", originPath, "add", "test.proto") + runCommand(ctx, t, container, "git", "-C", originPath, "commit", "-m", "commit 4") + runCommand(ctx, t, container, "git", "-C", originPath, "tag", "remote-tag") + runCommand(ctx, t, container, "git", "-C", originPath, "tag", "-a", "remote-annotated-tag", "-m", "annotated tag") - runCommand(ctx, t, container, runner, "git", "-C", workPath, "fetch", "origin") + runCommand(ctx, t, container, "git", "-C", workPath, "fetch", "origin") return originPath, workPath } @@ -413,12 +410,11 @@ func runCommand( ctx context.Context, t *testing.T, container app.EnvStdioContainer, - runner command.Runner, name string, args ...string, ) { t.Helper() - output, err := command.RunStdout(ctx, container, runner, name, args...) + output, err := runStdout(ctx, container, name, args...) if err != nil { var exitErr *exec.ExitError var stdErr []byte diff --git a/private/pkg/git/lister.go b/private/pkg/git/lister.go index 3736cbc532..d861549f9c 100644 --- a/private/pkg/git/lister.go +++ b/private/pkg/git/lister.go @@ -15,24 +15,21 @@ package git import ( + "bytes" "context" "os" "regexp" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/stringutil" ) -type lister struct { - runner command.Runner -} +type lister struct{} -func newLister(runner command.Runner) *lister { - return &lister{ - runner: runner, - } +func newLister() *lister { + return &lister{} } func (l *lister) ListFilesAndUnstagedFiles( @@ -40,10 +37,9 @@ func (l *lister) ListFilesAndUnstagedFiles( container app.EnvStdioContainer, options ListFilesAndUnstagedFilesOptions, ) ([]string, error) { - allFilesOutput, err := command.RunStdout( + allFilesOutput, err := runStdout( ctx, container, - l.runner, "git", "ls-files", "--cached", @@ -54,10 +50,9 @@ func (l *lister) ListFilesAndUnstagedFiles( if err != nil { return nil, err } - deletedFilesOutput, err := command.RunStdout( + deletedFilesOutput, err := runStdout( ctx, container, - l.runner, "git", "ls-files", "--deleted", @@ -130,3 +125,19 @@ func filterNonRegularFiles(files []string) []string { } return filteredFiles } + +func runStdout(ctx context.Context, container app.EnvStdioContainer, name string, args ...string) ([]byte, error) { + buffer := bytes.NewBuffer(nil) + if err := execext.Run( + ctx, + name, + execext.WithArgs(args...), + execext.WithEnv(app.Environ(container)), + execext.WithStdin(container.Stdin()), + execext.WithStdout(buffer), + execext.WithStderr(container.Stderr()), + ); err != nil { + return nil, err + } + return buffer.Bytes(), nil +} diff --git a/private/pkg/git/remote.go b/private/pkg/git/remote.go index 822017f755..52f2c78941 100644 --- a/private/pkg/git/remote.go +++ b/private/pkg/git/remote.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/bufbuild/buf/private/pkg/app" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" ) const ( @@ -123,17 +123,15 @@ func newRemote( func getRemote( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, name string, ) (*remote, error) { - if err := validateRemoteExists(ctx, runner, envContainer, dir, name); err != nil { + if err := validateRemoteExists(ctx, envContainer, dir, name); err != nil { return nil, err } hostname, repositoryPath, err := getRemoteURLMetadata( ctx, - runner, envContainer, dir, name, @@ -141,7 +139,7 @@ func getRemote( if err != nil { return nil, fmt.Errorf("failed to get remote URL metadata: %w", err) } - headBranch, err := getRemoteHEADBranch(ctx, runner, envContainer, dir, name) + headBranch, err := getRemoteHEADBranch(ctx, envContainer, dir, name) if err != nil { return nil, fmt.Errorf("failed to get remote HEAD branch: %w", err) } @@ -156,21 +154,20 @@ func getRemote( func validateRemoteExists( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, name string, ) error { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("ls-remote", "--exit-code", name), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("ls-remote", "--exit-code", name), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { var exitErr *exec.ExitError if errors.As(err, &exitErr) { @@ -185,23 +182,22 @@ func validateRemoteExists( func getRemoteURLMetadata( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, remote string, ) (string, string, error) { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, // We use `git config --get remote..url` instead of `git remote get-url // since it is more specific to the checkout. - command.RunWithArgs("config", "--get", fmt.Sprintf("remote.%s.url", remote)), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("config", "--get", fmt.Sprintf("remote.%s.url", remote)), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { return "", "", err } @@ -246,21 +242,20 @@ func parseSCPLikeURL(rawURL string) *url.URL { // environment for permissions. func getRemoteHEADBranch( ctx context.Context, - runner command.Runner, envContainer app.EnvContainer, dir string, remote string, ) (string, error) { stdout := bytes.NewBuffer(nil) stderr := bytes.NewBuffer(nil) - if err := runner.Run( + if err := execext.Run( ctx, gitCommand, - command.RunWithArgs("remote", "show", remote), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), - command.RunWithDir(dir), - command.RunWithEnv(app.EnvironMap(envContainer)), + execext.WithArgs("remote", "show", remote), + execext.WithStdout(stdout), + execext.WithStderr(stderr), + execext.WithDir(dir), + execext.WithEnv(app.Environ(envContainer)), ); err != nil { return "", err } diff --git a/private/pkg/licenseheader/cmd/license-header/main.go b/private/pkg/licenseheader/cmd/license-header/main.go index 40e571044b..040a58fd22 100644 --- a/private/pkg/licenseheader/cmd/license-header/main.go +++ b/private/pkg/licenseheader/cmd/license-header/main.go @@ -23,7 +23,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/app/appcmd" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/diff" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/licenseheader" @@ -130,8 +129,7 @@ func run(ctx context.Context, container app.Container, flags *flags) error { return newRequiredFlagError(yearRangeFlagName) } } - runner := command.NewRunner() - filenames, err := getFilenames(ctx, container, runner, flags.Ignore) + filenames, err := getFilenames(ctx, container, flags.Ignore) if err != nil { return err } @@ -154,7 +152,6 @@ func run(ctx context.Context, container app.Container, flags *flags) error { if flags.Diff { diffData, err := diff.Diff( ctx, - runner, data, modifiedData, filename, @@ -188,7 +185,6 @@ func run(ctx context.Context, container app.Container, flags *flags) error { func getFilenames( ctx context.Context, container app.Container, - runner command.Runner, ignores []string, ) ([]string, error) { if container.NumArgs() > 0 { @@ -205,7 +201,7 @@ func getFilenames( } ignoreRegexps[i] = ignoreRegexp } - return git.NewLister(runner).ListFilesAndUnstagedFiles( + return git.NewLister().ListFilesAndUnstagedFiles( ctx, container, git.ListFilesAndUnstagedFilesOptions{ diff --git a/private/pkg/pluginrpcutil/pluginrpcutil.go b/private/pkg/pluginrpcutil/pluginrpcutil.go index ef50a20146..3164e316fa 100644 --- a/private/pkg/pluginrpcutil/pluginrpcutil.go +++ b/private/pkg/pluginrpcutil/pluginrpcutil.go @@ -15,14 +15,13 @@ package pluginrpcutil import ( - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/wasm" "pluginrpc.com/pluginrpc" ) -// NewRunner returns a new pluginrpc.Runner for the command.Runner and program name. -func NewRunner(delegate command.Runner, programName string, programArgs ...string) pluginrpc.Runner { - return newRunner(delegate, programName, programArgs...) +// NewRunner returns a new pluginrpc.Runner for the program name. +func NewRunner(programName string, programArgs ...string) pluginrpc.Runner { + return newRunner(programName, programArgs...) } // NewWasmRunner returns a new pluginrpc.Runner for the wasm.Runtime and program name. diff --git a/private/pkg/pluginrpcutil/runner.go b/private/pkg/pluginrpcutil/runner.go index af29b6af70..258d18a6e2 100644 --- a/private/pkg/pluginrpcutil/runner.go +++ b/private/pkg/pluginrpcutil/runner.go @@ -20,23 +20,20 @@ import ( "os/exec" "slices" - "github.com/bufbuild/buf/private/pkg/command" + "github.com/bufbuild/buf/private/pkg/execext" "pluginrpc.com/pluginrpc" ) type runner struct { - delegate command.Runner programName string programArgs []string } func newRunner( - delegate command.Runner, programName string, programArgs ...string, ) *runner { return &runner{ - delegate: delegate, programName: programName, programArgs: programArgs, } @@ -47,13 +44,13 @@ func (r *runner) Run(ctx context.Context, env pluginrpc.Env) error { if len(r.programArgs) > 0 { args = append(slices.Clone(r.programArgs), env.Args...) } - if err := r.delegate.Run( + if err := execext.Run( ctx, r.programName, - command.RunWithArgs(args...), - command.RunWithStdin(env.Stdin), - command.RunWithStdout(env.Stdout), - command.RunWithStderr(env.Stderr), + execext.WithArgs(args...), + execext.WithStdin(env.Stdin), + execext.WithStdout(env.Stdout), + execext.WithStderr(env.Stderr), ); err != nil { execExitError := &exec.ExitError{} if errors.As(err, &execExitError) { diff --git a/private/pkg/prototesting/prototesting.go b/private/pkg/prototesting/prototesting.go index b1b25f201a..9a8570d4b2 100644 --- a/private/pkg/prototesting/prototesting.go +++ b/private/pkg/prototesting/prototesting.go @@ -25,8 +25,8 @@ import ( "strings" "testing" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/diff" + "github.com/bufbuild/buf/private/pkg/execext" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" @@ -41,7 +41,6 @@ import ( // Only use for testing. func GetProtocFileDescriptorSet( ctx context.Context, - runner command.Runner, roots []string, realFilePaths []string, includeImports bool, @@ -63,7 +62,6 @@ func GetProtocFileDescriptorSet( if err := RunProtoc( ctx, - runner, roots, realFilePaths, includeImports, @@ -99,8 +97,7 @@ func GetProtocFileDescriptorSet( // GetProtocVersion runs protoc --version with RunProtoc and returns the output sans the "libprotoc" prefix func GetProtocVersion(ctx context.Context) (string, error) { var stdout bytes.Buffer - runner := command.NewRunner() - if err := RunProtoc(ctx, runner, nil, nil, false, false, nil, &stdout, "--version"); err != nil { + if err := RunProtoc(ctx, nil, nil, false, false, nil, &stdout, "--version"); err != nil { return "", err } return strings.TrimSpace(strings.TrimPrefix(stdout.String(), "libprotoc")), nil @@ -109,7 +106,6 @@ func GetProtocVersion(ctx context.Context) (string, error) { // RunProtoc runs protoc. func RunProtoc( ctx context.Context, - runner command.Runner, roots []string, realFilePaths []string, includeImports bool, @@ -146,13 +142,17 @@ func RunProtoc( if stdout == nil { stdout = stderr } - if err := runner.Run( + environ := make([]string, 0, len(env)) + for key, value := range env { + environ = append(environ, key+"="+value) + } + if err := execext.Run( ctx, protocBinPath, - command.RunWithArgs(args...), - command.RunWithEnv(env), - command.RunWithStdout(stdout), - command.RunWithStderr(stderr), + execext.WithArgs(args...), + execext.WithEnv(environ), + execext.WithStdout(stdout), + execext.WithStderr(stderr), ); err != nil { return fmt.Errorf("%s returned error: %v %v", protocBinPath, err, stderr.String()) } @@ -162,7 +162,6 @@ func RunProtoc( // DiffFileDescriptorSetsWire diffs the two FileDescriptorSets using proto.MarshalWire. func DiffFileDescriptorSetsWire( ctx context.Context, - runner command.Runner, one *descriptorpb.FileDescriptorSet, two *descriptorpb.FileDescriptorSet, oneName string, @@ -176,7 +175,7 @@ func DiffFileDescriptorSetsWire( if err != nil { return "", err } - output, err := diff.Diff(ctx, runner, oneData, twoData, oneName, twoName) + output, err := diff.Diff(ctx, oneData, twoData, oneName, twoName) if err != nil { return "", err } @@ -186,7 +185,6 @@ func DiffFileDescriptorSetsWire( // DiffFileDescriptorSetsJSON diffs the two FileDescriptorSets using JSON. func DiffFileDescriptorSetsJSON( ctx context.Context, - runner command.Runner, one *descriptorpb.FileDescriptorSet, two *descriptorpb.FileDescriptorSet, oneName string, @@ -208,7 +206,7 @@ func DiffFileDescriptorSetsJSON( if err != nil { return "", err } - output, err := diff.Diff(ctx, runner, oneData, twoData, oneName, twoName) + output, err := diff.Diff(ctx, oneData, twoData, oneName, twoName) if err != nil { return "", err } @@ -227,11 +225,10 @@ func DiffFileDescriptorSetsCompare( // JSON and compare. func AssertFileDescriptorSetsEqual( t *testing.T, - runner command.Runner, one *descriptorpb.FileDescriptorSet, two *descriptorpb.FileDescriptorSet, ) { - diff, err := DiffFileDescriptorSetsJSON(context.Background(), runner, one, two, "buf", "protoc") + diff, err := DiffFileDescriptorSetsJSON(context.Background(), one, two, "buf", "protoc") assert.NoError(t, err) assert.Empty(t, diff) diff = DiffFileDescriptorSetsCompare(one, two) diff --git a/private/pkg/storage/cmd/ddiff/main.go b/private/pkg/storage/cmd/ddiff/main.go index 62df8b663c..1ade10b088 100644 --- a/private/pkg/storage/cmd/ddiff/main.go +++ b/private/pkg/storage/cmd/ddiff/main.go @@ -22,7 +22,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/app/appcmd" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageos" ) @@ -64,7 +63,6 @@ func run(ctx context.Context, container app.Container) error { } return storage.Diff( ctx, - command.NewRunner(), container.Stdout(), oneReadWriteBucket, twoReadWriteBucket, diff --git a/private/pkg/storage/diff.go b/private/pkg/storage/diff.go index f61d51735e..8879b4b8e4 100644 --- a/private/pkg/storage/diff.go +++ b/private/pkg/storage/diff.go @@ -22,7 +22,6 @@ import ( "sort" "strings" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/diff" ) @@ -101,13 +100,12 @@ func DiffWithTransform( // DiffBytes does a diff of the ReadBuckets. func DiffBytes( ctx context.Context, - runner command.Runner, one ReadBucket, two ReadBucket, options ...DiffOption, ) ([]byte, error) { buffer := bytes.NewBuffer(nil) - if err := Diff(ctx, runner, buffer, one, two, options...); err != nil { + if err := Diff(ctx, buffer, one, two, options...); err != nil { return nil, err } return buffer.Bytes(), nil @@ -116,13 +114,12 @@ func DiffBytes( // Diff writes a diff of the ReadBuckets to the Writer. func Diff( ctx context.Context, - runner command.Runner, writer io.Writer, one ReadBucket, two ReadBucket, options ...DiffOption, ) error { - _, err := DiffWithFilenames(ctx, runner, writer, one, two, options...) + _, err := DiffWithFilenames(ctx, writer, one, two, options...) return err } @@ -136,7 +133,6 @@ func Diff( // to change. func DiffWithFilenames( ctx context.Context, - runner command.Runner, writer io.Writer, one ReadBucket, two ReadBucket, @@ -214,7 +210,6 @@ func DiffWithFilenames( } diffData, err := diff.Diff( ctx, - runner, oneData, twoData, oneDiffPath, @@ -257,7 +252,6 @@ func DiffWithFilenames( } diffData, err := diff.Diff( ctx, - runner, nil, twoData, oneDiffPath, diff --git a/private/pkg/storage/storagetesting/storagetesting.go b/private/pkg/storage/storagetesting/storagetesting.go index 6a65ccb307..15d4d291d5 100644 --- a/private/pkg/storage/storagetesting/storagetesting.go +++ b/private/pkg/storage/storagetesting/storagetesting.go @@ -30,7 +30,6 @@ import ( "sync" "testing" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storagearchive" @@ -178,7 +177,6 @@ func RunTestSuite( symlinkLoopDirPath := filepath.Join(storagetestingDirPath, "testdata", "symlink_loop") overlayDirPath := filepath.Join(storagetestingDirPath, "testdata", "overlay") defaultProvider := storageos.NewProvider() - runner := command.NewRunner() for _, prefix := range []string{ "", @@ -1042,7 +1040,6 @@ func RunTestSuite( diff, err := storage.DiffBytes( context.Background(), - runner, readBucketA, readBucketB, storage.DiffWithSuppressTimestamps(), From 5c44d3e7b103f5724eabdaf84eadaaf586961558 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Fri, 1 Nov 2024 14:03:54 -0400 Subject: [PATCH 14/34] Drop go.uber.org/multierr in favor of errors.Join (#3441) --- go.mod | 2 +- private/buf/bufctl/controller.go | 11 ++++--- private/buf/bufcurl/headers.go | 5 ++-- private/buf/buffetch/internal/reader.go | 9 +++--- private/buf/buffetch/internal/writer.go | 3 +- private/buf/bufformat/bufformat.go | 6 ++-- private/buf/bufformat/formatter.go | 11 ++++--- private/buf/bufgen/features.go | 4 +-- private/buf/bufgen/generator.go | 4 --- private/buf/bufmigrate/migrate_builder.go | 3 +- private/buf/bufmigrate/migrator.go | 11 ++++--- private/buf/bufprint/bufprint.go | 4 +-- .../protoc_proxy_handler.go | 5 ++-- private/buf/cmd/buf/command/beta/lsp/lsp.go | 4 +-- .../registry/plugin/pluginpush/pluginpush.go | 11 ++++--- .../buf/cmd/buf/command/breaking/breaking.go | 3 +- .../buf/command/config/internal/internal.go | 3 +- private/buf/cmd/buf/command/curl/curl.go | 3 +- .../buf/command/dep/depupdate/depupdate.go | 4 +-- private/buf/cmd/buf/command/export/export.go | 5 ++-- private/buf/cmd/buf/command/format/format.go | 5 ++-- private/buf/cmd/buf/command/lint/lint.go | 3 +- private/bufpkg/bufcas/file_set.go | 4 +-- private/bufpkg/bufcheck/print.go | 4 +-- private/bufpkg/bufconfig/file.go | 3 +- .../bufimagefuzz/bufimagefuzz_unix_test.go | 4 +-- .../bufimage/parser_accessor_handler.go | 3 +- .../bufmodulestore/module_data_store.go | 13 ++++----- .../bufpkg/bufmodule/module_read_bucket.go | 3 +- .../bufpkg/bufmodule/module_set_builder.go | 4 +-- .../bufpkg/bufmodule/proto_file_tracker.go | 5 ++-- .../bufprotopluginos/response_writer.go | 4 +-- .../bufpkg/bufprotoplugin/response_writer.go | 4 +-- .../bufremotepluginconfig/get.go | 4 +-- .../bufremoteplugindocker/docker.go | 5 ++-- private/bufpkg/bufstyle/analyzer_provider.go | 6 ++-- private/pkg/encoding/encoding.go | 5 ++-- private/pkg/execext/process.go | 4 +-- private/pkg/filepathext/filepathext.go | 4 +-- private/pkg/git/cloner.go | 3 +- .../github/githubtesting/archive_reader.go | 8 ++--- private/pkg/ioext/ioext.go | 7 ++--- private/pkg/oauth2/client.go | 8 ++--- private/pkg/oauth2/client_test.go | 8 +++-- .../pkg/protostat/protostatos/file_walker.go | 5 ++-- .../protostat/protostatstorage/file_walker.go | 4 +-- private/pkg/prototesting/prototesting.go | 6 ++-- private/pkg/storage/copy.go | 8 ++--- .../storage/storagearchive/storagearchive.go | 7 ++--- private/pkg/storage/storageos/bucket.go | 7 ++--- private/pkg/storage/util.go | 12 ++++---- private/pkg/thread/thread.go | 29 ++++++++++++------- private/pkg/tmp/tmp.go | 6 ++-- private/pkg/wasm/runtime.go | 4 +-- 54 files changed, 148 insertions(+), 172 deletions(-) diff --git a/go.mod b/go.mod index b3ac5c60bf..be7ea20de3 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,6 @@ require ( go.lsp.dev/jsonrpc2 v0.10.0 go.lsp.dev/protocol v0.12.0 go.uber.org/atomic v1.11.0 - go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 go.uber.org/zap/exp v0.3.0 golang.org/x/crypto v0.28.0 @@ -119,6 +118,7 @@ require ( go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/mock v0.5.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/text v0.19.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 // indirect diff --git a/private/buf/bufctl/controller.go b/private/buf/bufctl/controller.go index d6c044b7ea..f680f99d21 100644 --- a/private/buf/bufctl/controller.go +++ b/private/buf/bufctl/controller.go @@ -47,7 +47,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/protovalidate-go" - "go.uber.org/multierr" "google.golang.org/protobuf/proto" ) @@ -562,7 +561,7 @@ func (c *controller) PutImage( return err } defer func() { - retErr = multierr.Append(retErr, writeCloser.Close()) + retErr = errors.Join(retErr, writeCloser.Close()) }() _, err = writeCloser.Write(data) return err @@ -692,7 +691,7 @@ func (c *controller) PutMessage( return err } _, err = writeCloser.Write(data) - return multierr.Append(err, writeCloser.Close()) + return errors.Join(err, writeCloser.Close()) } func (c *controller) getImage( @@ -799,7 +798,7 @@ func (c *controller) getWorkspaceForProtoFileRef( return nil, err } defer func() { - retErr = multierr.Append(retErr, readBucketCloser.Close()) + retErr = errors.Join(retErr, readBucketCloser.Close()) }() options := []bufworkspace.WorkspaceBucketOption{ bufworkspace.WithProtoFileTargetPath( @@ -839,7 +838,7 @@ func (c *controller) getWorkspaceForSourceRef( return nil, err } defer func() { - retErr = multierr.Append(retErr, readBucketCloser.Close()) + retErr = errors.Join(retErr, readBucketCloser.Close()) }() options := []bufworkspace.WorkspaceBucketOption{ bufworkspace.WithConfigOverride( @@ -915,7 +914,7 @@ func (c *controller) getImageForMessageRef( return nil, err } defer func() { - retErr = multierr.Append(retErr, readCloser.Close()) + retErr = errors.Join(retErr, readCloser.Close()) }() data, err := io.ReadAll(readCloser) if err != nil { diff --git a/private/buf/bufcurl/headers.go b/private/buf/bufcurl/headers.go index 755730c4a5..831b46f93e 100644 --- a/private/buf/bufcurl/headers.go +++ b/private/buf/bufcurl/headers.go @@ -16,14 +16,13 @@ package bufcurl import ( "bufio" + "errors" "fmt" "io" "net/http" "os" "path/filepath" "strings" - - "go.uber.org/multierr" ) // headersBlockList contains disallowed headers. These are headers that are part @@ -124,7 +123,7 @@ func readHeadersFile(headerFile string, stopAtBlankLine bool, headers http.Heade if f != nil { closeErr := f.Close() if closeErr != nil { - err = multierr.Append(err, ErrorHasFilename(closeErr, headerFile)) + err = errors.Join(err, ErrorHasFilename(closeErr, headerFile)) } } }() diff --git a/private/buf/buffetch/internal/reader.go b/private/buf/buffetch/internal/reader.go index df9e4d5183..25cacd467f 100644 --- a/private/buf/buffetch/internal/reader.go +++ b/private/buf/buffetch/internal/reader.go @@ -42,7 +42,6 @@ import ( "github.com/bufbuild/buf/private/pkg/syserror" "github.com/klauspost/compress/zstd" "github.com/klauspost/pgzip" - "go.uber.org/multierr" ) type reader struct { @@ -123,7 +122,7 @@ func (r *reader) GetReadBucketCloser( if retReadBucketCloser != nil { castReadBucketCloser, ok := retReadBucketCloser.(*readBucketCloser) if !ok { - retErr = multierr.Append( + retErr = errors.Join( retErr, syserror.Newf("expected *readBucketCloser but got %T", retReadBucketCloser), ) @@ -131,7 +130,7 @@ func (r *reader) GetReadBucketCloser( } var err error retReadBucketCloser, err = castReadBucketCloser.copyToInMemory(ctx) - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } }() } @@ -422,7 +421,7 @@ func (r *reader) getFileReadCloserAndSize( } defer func() { if retErr != nil { - retErr = multierr.Append(retErr, readCloser.Close()) + retErr = errors.Join(retErr, readCloser.Close()) } }() if keepFileCompression { @@ -531,7 +530,7 @@ func (r *reader) getFileReadCloserAndSizePotentiallyCompressedHTTP( if response.StatusCode != http.StatusOK { err := fmt.Errorf("got HTTP status code %d", response.StatusCode) if response.Body != nil { - return nil, -1, multierr.Append(err, response.Body.Close()) + return nil, -1, errors.Join(err, response.Body.Close()) } return nil, -1, err } diff --git a/private/buf/buffetch/internal/writer.go b/private/buf/buffetch/internal/writer.go index b01b16cd1f..7989245681 100644 --- a/private/buf/buffetch/internal/writer.go +++ b/private/buf/buffetch/internal/writer.go @@ -26,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/ioext" "github.com/klauspost/compress/zstd" - "go.uber.org/multierr" ) type writer struct { @@ -111,7 +110,7 @@ func (w *writer) putFileWriteCloser( } defer func() { if retErr != nil { - retErr = multierr.Append(retErr, writeCloser.Close()) + retErr = errors.Join(retErr, writeCloser.Close()) } }() if noFileCompression { diff --git a/private/buf/bufformat/bufformat.go b/private/buf/bufformat/bufformat.go index 55e6cde503..d413b868e6 100644 --- a/private/buf/bufformat/bufformat.go +++ b/private/buf/bufformat/bufformat.go @@ -16,6 +16,7 @@ package bufformat import ( "context" + "errors" "io" "github.com/bufbuild/buf/private/bufpkg/bufmodule" @@ -25,7 +26,6 @@ import ( "github.com/bufbuild/protocompile/ast" "github.com/bufbuild/protocompile/parser" "github.com/bufbuild/protocompile/reporter" - "go.uber.org/multierr" ) // FormatModuleSet formats and writes the target files into a read bucket. @@ -56,7 +56,7 @@ func FormatBucket(ctx context.Context, bucket storage.ReadBucket) (_ storage.Rea return err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() fileNode, err := parser.Parse(readObjectCloser.ExternalPath(), readObjectCloser, reporter.NewHandler(nil)) if err != nil { @@ -67,7 +67,7 @@ func FormatBucket(ctx context.Context, bucket storage.ReadBucket) (_ storage.Rea return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() if err := FormatFileNode(writeObjectCloser, fileNode); err != nil { return err diff --git a/private/buf/bufformat/formatter.go b/private/buf/bufformat/formatter.go index 83e74823e3..7a83138607 100644 --- a/private/buf/bufformat/formatter.go +++ b/private/buf/bufformat/formatter.go @@ -25,7 +25,6 @@ import ( "unicode/utf8" "github.com/bufbuild/protocompile/ast" - "go.uber.org/multierr" ) // formatter writes an *ast.FileNode as a .proto file. @@ -127,7 +126,7 @@ func (f *formatter) In() { func (f *formatter) Out() { if f.indent <= 0 { // Unreachable. - f.err = multierr.Append( + f.err = errors.Join( f.err, errors.New("internal error: attempted to decrement indentation at zero"), ) @@ -180,7 +179,7 @@ func (f *formatter) WriteString(elem string) { if !strings.ContainsRune(prevBlockList, f.lastWritten) && !strings.ContainsRune(nextBlockList, first) { if _, err := f.writer.Write([]byte{' '}); err != nil { - f.err = multierr.Append(f.err, err) + f.err = errors.Join(f.err, err) return } } @@ -190,7 +189,7 @@ func (f *formatter) WriteString(elem string) { } f.lastWritten, _ = utf8.DecodeLastRuneInString(elem) if _, err := f.writer.Write([]byte(elem)); err != nil { - f.err = multierr.Append(f.err, err) + f.err = errors.Join(f.err, err) } } @@ -1389,7 +1388,7 @@ func (f *formatter) writeCompositeValueForArrayLiteral( case *ast.MessageLiteralNode: f.writeMessageLiteralForArray(node, lastElement) default: - f.err = multierr.Append(f.err, fmt.Errorf("unexpected array value node %T", node)) + f.err = errors.Join(f.err, fmt.Errorf("unexpected array value node %T", node)) } } @@ -1779,7 +1778,7 @@ func (f *formatter) writeNode(node ast.Node) { case *ast.EmptyDeclNode: // Nothing to do here. default: - f.err = multierr.Append(f.err, fmt.Errorf("unexpected node: %T", node)) + f.err = errors.Join(f.err, fmt.Errorf("unexpected node: %T", node)) } } diff --git a/private/buf/bufgen/features.go b/private/buf/bufgen/features.go index c5e0886d93..e4ab4df780 100644 --- a/private/buf/bufgen/features.go +++ b/private/buf/bufgen/features.go @@ -15,6 +15,7 @@ package bufgen import ( + "errors" "fmt" "log/slog" "sort" @@ -23,7 +24,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/pkg/slicesext" - "go.uber.org/multierr" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/pluginpb" @@ -194,7 +194,7 @@ func checkRequiredFeatures( } } } - return multierr.Combine(errs...) + return errors.Join(errs...) } func featureName(feature pluginpb.CodeGeneratorResponse_Feature) string { diff --git a/private/buf/bufgen/generator.go b/private/buf/bufgen/generator.go index 2832f34864..0786c93f0a 100644 --- a/private/buf/bufgen/generator.go +++ b/private/buf/bufgen/generator.go @@ -37,7 +37,6 @@ import ( "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/thread" - "go.uber.org/multierr" "google.golang.org/protobuf/types/pluginpb" ) @@ -294,9 +293,6 @@ func (g *generator) execPlugins( jobs, thread.ParallelizeWithCancelOnFailure(), ); err != nil { - if errs := multierr.Errors(err); len(errs) > 0 { - return nil, errs[0] - } return nil, err } if err := validateResponses(responses, pluginConfigs); err != nil { diff --git a/private/buf/bufmigrate/migrate_builder.go b/private/buf/bufmigrate/migrate_builder.go index 602a94309a..c321e91aeb 100644 --- a/private/buf/bufmigrate/migrate_builder.go +++ b/private/buf/bufmigrate/migrate_builder.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/google/uuid" - "go.uber.org/multierr" ) type migrateBuilder struct { @@ -89,7 +88,7 @@ func (m *migrateBuilder) addBufGenYAML(ctx context.Context, bufGenYAMLFilePath s return err } defer func() { - retErr = multierr.Append(retErr, file.Close()) + retErr = errors.Join(retErr, file.Close()) }() bufGenYAML, err := bufconfig.ReadBufGenYAMLFile(file) if err != nil { diff --git a/private/buf/bufmigrate/migrator.go b/private/buf/bufmigrate/migrator.go index 0f220c9cad..79f2a83675 100644 --- a/private/buf/bufmigrate/migrator.go +++ b/private/buf/bufmigrate/migrator.go @@ -34,7 +34,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storagemem" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/google/uuid" - "go.uber.org/multierr" ) type migrator struct { @@ -256,7 +255,7 @@ func (m *migrator) getOriginalAndAddedFileBuckets( return nil, nil, err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() if err := bufconfig.WriteBufYAMLFile(writeObjectCloser, migratedBufYAMLFile); err != nil { return nil, nil, err @@ -279,7 +278,7 @@ func (m *migrator) getOriginalAndAddedFileBuckets( return nil, nil, err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() if err := bufconfig.WriteBufLockFile(writeObjectCloser, migratedBufLockFile); err != nil { return nil, nil, err @@ -303,7 +302,7 @@ func (m *migrator) getOriginalAndAddedFileBuckets( return nil, nil, err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() if err := bufconfig.WriteBufGenYAMLFile(writeObjectCloser, migratedBufGenYAMLFile); err != nil { return nil, nil, err @@ -595,7 +594,7 @@ func resolvedDeclaredAndLockedDependencies( return iTime.After(jTime) }) if len(errs) > 0 { - return nil, nil, multierr.Combine(errs...) + return nil, nil, errors.Join(errs...) } depModuleFullNameToResolvedRef[moduleFullName] = refs[0] } @@ -623,7 +622,7 @@ func resolvedDeclaredAndLockedDependencies( return iTime.After(jTime) }) if len(errs) > 0 { - return nil, nil, multierr.Combine(errs...) + return nil, nil, errors.Join(errs...) } resolvedDepModuleKeys = append(resolvedDepModuleKeys, lockKeys[0]) } diff --git a/private/buf/bufprint/bufprint.go b/private/buf/bufprint/bufprint.go index 75b95b573a..e0bd64a359 100644 --- a/private/buf/bufprint/bufprint.go +++ b/private/buf/bufprint/bufprint.go @@ -17,6 +17,7 @@ package bufprint import ( "context" "encoding/json" + "errors" "fmt" "io" "reflect" @@ -32,7 +33,6 @@ import ( "github.com/bufbuild/buf/private/pkg/protostat" "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/syserror" - "go.uber.org/multierr" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -314,7 +314,7 @@ func WithTabWriter( ) (retErr error) { tabWriter := newTabWriter(writer) defer func() { - retErr = multierr.Append(retErr, tabWriter.Flush()) + retErr = errors.Join(retErr, tabWriter.Flush()) }() if err := tabWriter.Write(header...); err != nil { return err diff --git a/private/buf/bufprotopluginexec/protoc_proxy_handler.go b/private/buf/bufprotopluginexec/protoc_proxy_handler.go index 0a06674a95..a41f0aa4ca 100644 --- a/private/buf/bufprotopluginexec/protoc_proxy_handler.go +++ b/private/buf/bufprotopluginexec/protoc_proxy_handler.go @@ -34,7 +34,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/tmp" "github.com/bufbuild/protoplugin" - "go.uber.org/multierr" "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/pluginpb" ) @@ -111,7 +110,7 @@ func (h *protocProxyHandler) Handle( return err } defer func() { - retErr = multierr.Append(retErr, tmpFile.Close()) + retErr = errors.Join(retErr, tmpFile.Close()) }() descriptorFilePath = tmpFile.Path() } @@ -120,7 +119,7 @@ func (h *protocProxyHandler) Handle( return err } defer func() { - retErr = multierr.Append(retErr, tmpDir.Close()) + retErr = errors.Join(retErr, tmpDir.Close()) }() args := slicesext.Concat(h.protocExtraArgs, []string{ fmt.Sprintf("--descriptor_set_in=%s", descriptorFilePath), diff --git a/private/buf/cmd/buf/command/beta/lsp/lsp.go b/private/buf/cmd/buf/command/beta/lsp/lsp.go index 52908c8f81..24f4bec061 100644 --- a/private/buf/cmd/buf/command/beta/lsp/lsp.go +++ b/private/buf/cmd/buf/command/beta/lsp/lsp.go @@ -19,6 +19,7 @@ package lsp import ( "context" + "errors" "fmt" "io" "net" @@ -32,7 +33,6 @@ import ( "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" "go.lsp.dev/jsonrpc2" - "go.uber.org/multierr" ) const ( @@ -111,7 +111,7 @@ func run( return err } defer func() { - retErr = multierr.Append(retErr, wasmRuntime.Close(ctx)) + retErr = errors.Join(retErr, wasmRuntime.Close(ctx)) }() checkClient, err := bufcheck.NewClient( container.Logger(), diff --git a/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go b/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go index ea46bc8357..c9c862f8b2 100644 --- a/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go +++ b/private/buf/cmd/buf/command/beta/registry/plugin/pluginpush/pluginpush.go @@ -48,7 +48,6 @@ import ( "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/go-containerregistry/pkg/v1/remote/transport" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -161,7 +160,7 @@ func run( } defer func() { if err := os.RemoveAll(tmpDir); !os.IsNotExist(err) { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } }() sourceBucket, err = storageProvider.NewReadWriteBucket(tmpDir) @@ -198,7 +197,7 @@ func run( } defer func() { if err := client.Close(); err != nil { - retErr = multierr.Append(retErr, fmt.Errorf("docker client close error: %w", err)) + retErr = errors.Join(retErr, fmt.Errorf("docker client close error: %w", err)) } }() var imageID string @@ -219,7 +218,7 @@ func run( } defer func() { if err := image.Close(); err != nil && !errors.Is(err, storage.ErrClosed) { - retErr = multierr.Append(retErr, fmt.Errorf("docker image close error: %w", err)) + retErr = errors.Join(retErr, fmt.Errorf("docker image close error: %w", err)) } }() imageID = loadResponse.ImageID @@ -365,7 +364,7 @@ func pushImage( // After we're done publishing the image, we delete it to not leave a lot of images left behind. defer func() { if _, err := client.Delete(ctx, createdImage); err != nil { - retErr = multierr.Append(retErr, fmt.Errorf("failed to delete image %q", createdImage)) + retErr = errors.Join(retErr, fmt.Errorf("failed to delete image %q", createdImage)) } }() pushResponse, err := client.Push(ctx, createdImage, authConfig) @@ -516,7 +515,7 @@ func unzipPluginToSourceBucket(ctx context.Context, pluginZip string, size int64 } defer func() { if err := f.Close(); err != nil { - retErr = multierr.Append(retErr, fmt.Errorf("plugin zip close error: %w", err)) + retErr = errors.Join(retErr, fmt.Errorf("plugin zip close error: %w", err)) } }() return storagearchive.Unzip(ctx, f, size, bucket) diff --git a/private/buf/cmd/buf/command/breaking/breaking.go b/private/buf/cmd/buf/command/breaking/breaking.go index 36b4a5cb92..71b699c9a2 100644 --- a/private/buf/cmd/buf/command/breaking/breaking.go +++ b/private/buf/cmd/buf/command/breaking/breaking.go @@ -31,7 +31,6 @@ import ( "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -215,7 +214,7 @@ func run( return err } defer func() { - retErr = multierr.Append(retErr, wasmRuntime.Close(ctx)) + retErr = errors.Join(retErr, wasmRuntime.Close(ctx)) }() var allFileAnnotations []bufanalysis.FileAnnotation for i, imageWithConfig := range imageWithConfigs { diff --git a/private/buf/cmd/buf/command/config/internal/internal.go b/private/buf/cmd/buf/command/config/internal/internal.go index 919607d1a0..f1dfeb5524 100644 --- a/private/buf/cmd/buf/command/config/internal/internal.go +++ b/private/buf/cmd/buf/command/config/internal/internal.go @@ -32,7 +32,6 @@ import ( "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -193,7 +192,7 @@ func lsRun( return err } defer func() { - retErr = multierr.Append(retErr, wasmRuntime.Close(ctx)) + retErr = errors.Join(retErr, wasmRuntime.Close(ctx)) }() client, err := bufcheck.NewClient( container.Logger(), diff --git a/private/buf/cmd/buf/command/curl/curl.go b/private/buf/cmd/buf/command/curl/curl.go index a3d5b216ec..ae69c2674e 100644 --- a/private/buf/cmd/buf/command/curl/curl.go +++ b/private/buf/cmd/buf/command/curl/curl.go @@ -44,7 +44,6 @@ import ( "github.com/quic-go/quic-go" "github.com/quic-go/quic-go/http3" "github.com/spf13/pflag" - "go.uber.org/multierr" "golang.org/x/net/http2" "google.golang.org/protobuf/reflect/protoreflect" ) @@ -952,7 +951,7 @@ func run(ctx context.Context, container appext.Container, f *flags) (err error) } defer func() { if dataReader != nil { - err = multierr.Append(err, dataReader.Close()) + err = errors.Join(err, dataReader.Close()) } }() diff --git a/private/buf/cmd/buf/command/dep/depupdate/depupdate.go b/private/buf/cmd/buf/command/dep/depupdate/depupdate.go index 7c536b0334..4e3bef0749 100644 --- a/private/buf/cmd/buf/command/dep/depupdate/depupdate.go +++ b/private/buf/cmd/buf/command/dep/depupdate/depupdate.go @@ -16,6 +16,7 @@ package depupdate import ( "context" + "errors" "fmt" "log/slog" @@ -28,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -148,7 +148,7 @@ func run( // overlay the new buf.lock file in a union bucket. defer func() { if retErr != nil { - retErr = multierr.Append(retErr, workspaceDepManager.UpdateBufLockFile(ctx, existingDepModuleKeys)) + retErr = errors.Join(retErr, workspaceDepManager.UpdateBufLockFile(ctx, existingDepModuleKeys)) } }() // Edit the buf.lock file with the unpruned dependencies. diff --git a/private/buf/cmd/buf/command/export/export.go b/private/buf/cmd/buf/command/export/export.go index e8dddd31ba..b84da0327c 100644 --- a/private/buf/cmd/buf/command/export/export.go +++ b/private/buf/cmd/buf/command/export/export.go @@ -30,7 +30,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -179,7 +178,7 @@ func run( return syserror.Wrap(err) } if err := storage.CopyReadObject(ctx, readWriteBucket, moduleFile); err != nil { - return multierr.Append(err, moduleFile.Close()) + return errors.Join(err, moduleFile.Close()) } return moduleFile.Close() }, @@ -219,7 +218,7 @@ func run( return syserror.Wrap(err) } if err := storage.CopyReadObject(ctx, readWriteBucket, moduleFile); err != nil { - return multierr.Append(err, moduleFile.Close()) + return errors.Join(err, moduleFile.Close()) } if err := moduleFile.Close(); err != nil { return err diff --git a/private/buf/cmd/buf/command/format/format.go b/private/buf/cmd/buf/command/format/format.go index e991a44f76..102d5ad5f2 100644 --- a/private/buf/cmd/buf/command/format/format.go +++ b/private/buf/cmd/buf/command/format/format.go @@ -36,7 +36,6 @@ import ( "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -371,7 +370,7 @@ func run( return err } defer func() { - retErr = multierr.Append(retErr, file.Close()) + retErr = errors.Join(retErr, file.Close()) }() if _, err := file.ReadFrom(readObject); err != nil { return err @@ -437,7 +436,7 @@ func writeToProtoFile( return err } defer func() { - retErr = multierr.Append(retErr, writeCloser.Close()) + retErr = errors.Join(retErr, writeCloser.Close()) }() return storage.WalkReadObjects( ctx, diff --git a/private/buf/cmd/buf/command/lint/lint.go b/private/buf/cmd/buf/command/lint/lint.go index f0506a930a..496a0d6638 100644 --- a/private/buf/cmd/buf/command/lint/lint.go +++ b/private/buf/cmd/buf/command/lint/lint.go @@ -28,7 +28,6 @@ import ( "github.com/bufbuild/buf/private/pkg/stringutil" "github.com/bufbuild/buf/private/pkg/wasm" "github.com/spf13/pflag" - "go.uber.org/multierr" ) const ( @@ -140,7 +139,7 @@ func run( return err } defer func() { - retErr = multierr.Append(retErr, wasmRuntime.Close(ctx)) + retErr = errors.Join(retErr, wasmRuntime.Close(ctx)) }() var allFileAnnotations []bufanalysis.FileAnnotation for _, imageWithConfig := range imageWithConfigs { diff --git a/private/bufpkg/bufcas/file_set.go b/private/bufpkg/bufcas/file_set.go index 7439ef83c9..0cf135eb86 100644 --- a/private/bufpkg/bufcas/file_set.go +++ b/private/bufpkg/bufcas/file_set.go @@ -16,11 +16,11 @@ package bufcas import ( "context" + "errors" "fmt" "sort" "github.com/bufbuild/buf/private/pkg/storage" - "go.uber.org/multierr" ) // FileSet is a pair of a Manifest and its associated BlobSet. @@ -124,7 +124,7 @@ func PutFileSetToBucket( } blob := fileSet.BlobSet().GetBlob(fileNode.Digest()) if _, err := writeObjectCloser.Write(blob.Content()); err != nil { - return multierr.Append(err, writeObjectCloser.Close()) + return errors.Join(err, writeObjectCloser.Close()) } if err := writeObjectCloser.Close(); err != nil { return err diff --git a/private/bufpkg/bufcheck/print.go b/private/bufpkg/bufcheck/print.go index 10a017c3d9..f7deb19b9a 100644 --- a/private/bufpkg/bufcheck/print.go +++ b/private/bufpkg/bufcheck/print.go @@ -16,6 +16,7 @@ package bufcheck import ( "encoding/json" + "errors" "fmt" "io" "slices" @@ -26,7 +27,6 @@ import ( "buf.build/go/bufplugin/check" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" - "go.uber.org/multierr" ) const ( @@ -119,7 +119,7 @@ func printRulesText(writer io.Writer, rules []Rule, categoriesFunc func(Rule) [] tabWriter := tabwriter.NewWriter(writer, 0, 0, 2, ' ', 0) defer func() { - retErr = multierr.Append(retErr, tabWriter.Flush()) + retErr = errors.Join(retErr, tabWriter.Flush()) }() writer = tabWriter diff --git a/private/bufpkg/bufconfig/file.go b/private/bufpkg/bufconfig/file.go index 58e5603a3b..6c24674505 100644 --- a/private/bufpkg/bufconfig/file.go +++ b/private/bufpkg/bufconfig/file.go @@ -25,7 +25,6 @@ import ( "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" - "go.uber.org/multierr" ) // File is the common interface shared by all config files. @@ -133,7 +132,7 @@ func putFileForPrefix[F File]( return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() return writeFileFunc(writeObjectCloser, f) } diff --git a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go index 90d3e3a008..47482b4034 100644 --- a/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go +++ b/private/bufpkg/bufimage/bufimagefuzz/bufimagefuzz_unix_test.go @@ -19,6 +19,7 @@ package bufimagefuzz import ( "context" + "errors" "fmt" "io/fs" "os" @@ -34,7 +35,6 @@ import ( "github.com/bufbuild/buf/private/pkg/slogext" "github.com/bufbuild/buf/private/pkg/tmp" "github.com/stretchr/testify/require" - "go.uber.org/multierr" "golang.org/x/tools/txtar" "google.golang.org/protobuf/types/descriptorpb" ) @@ -106,7 +106,7 @@ func fuzz(ctx context.Context, data []byte) (_ *fuzzResult, retErr error) { return nil, err } defer func() { - retErr = multierr.Append(retErr, dir.Close()) + retErr = errors.Join(retErr, dir.Close()) }() if err := untxtar(data, dir.Path()); err != nil { return nil, err diff --git a/private/bufpkg/bufimage/parser_accessor_handler.go b/private/bufpkg/bufimage/parser_accessor_handler.go index 496f781689..8d8aedc2af 100644 --- a/private/bufpkg/bufimage/parser_accessor_handler.go +++ b/private/bufpkg/bufimage/parser_accessor_handler.go @@ -25,7 +25,6 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/gen/data/datawkt" "github.com/google/uuid" - "go.uber.org/multierr" ) type parserAccessorHandler struct { @@ -77,7 +76,7 @@ func (p *parserAccessorHandler) Open(path string) (_ io.ReadCloser, retErr error } defer func() { if retErr != nil { - retErr = multierr.Append(retErr, moduleFile.Close()) + retErr = errors.Join(retErr, moduleFile.Close()) } }() if moduleFile.Path() != path { diff --git a/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go b/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go index bfd953e0af..79bc6abce5 100644 --- a/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go +++ b/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go @@ -31,7 +31,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storagearchive" "github.com/bufbuild/buf/private/pkg/storage/storagemem" "github.com/bufbuild/buf/private/pkg/uuidutil" - "go.uber.org/multierr" ) var ( @@ -232,7 +231,7 @@ func (p *moduleDataStore) getModuleDataForModuleKey( defer func() { // Release lock on the module data lock file. if err := unlocker.Unlock(); err != nil { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } }() } @@ -360,7 +359,7 @@ func (p *moduleDataStore) putModuleData( defer func() { if retErr == nil { // Only call the callback if we have had no error. - retErr = multierr.Append(retErr, callback(ctx)) + retErr = errors.Join(retErr, callback(ctx)) } }() } else { @@ -387,7 +386,7 @@ func (p *moduleDataStore) putModuleData( defer func() { if readUnlocker != nil { if err := readUnlocker.Unlock(); err != nil { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } } }() @@ -431,7 +430,7 @@ func (p *moduleDataStore) putModuleData( } defer func() { if err := unlocker.Unlock(); err != nil { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } }() // Before we start writing module data to the cache, we first check to see if module.yaml @@ -559,7 +558,7 @@ func (p *moduleDataStore) getReadBucketForTar( return nil, err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() readWriteBucket := storagemem.NewReadWriteBucket() if err := storagearchive.Untar( @@ -601,7 +600,7 @@ func (p *moduleDataStore) getWriteBucketAndCallbackForTar( return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() return storagearchive.Tar( ctx, diff --git a/private/bufpkg/bufmodule/module_read_bucket.go b/private/bufpkg/bufmodule/module_read_bucket.go index 0d1076c036..1001dad78c 100644 --- a/private/bufpkg/bufmodule/module_read_bucket.go +++ b/private/bufpkg/bufmodule/module_read_bucket.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storagemem" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/protocompile/parser/fastscan" - "go.uber.org/multierr" ) // ModuleReadBucket is an object analogous to storage.ReadBucket that supplements ObjectInfos @@ -607,7 +606,7 @@ func (b *moduleReadBucket) getFastscanResultForPathUncached( return fastscan.Result{}, err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() fastscanResult, err = fastscan.Scan(path, readObjectCloser) if err != nil { diff --git a/private/bufpkg/bufmodule/module_set_builder.go b/private/bufpkg/bufmodule/module_set_builder.go index 3eb81d74d9..0e061a4fd8 100644 --- a/private/bufpkg/bufmodule/module_set_builder.go +++ b/private/bufpkg/bufmodule/module_set_builder.go @@ -16,6 +16,7 @@ package bufmodule import ( "context" + "errors" "log/slog" "sync/atomic" @@ -25,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/google/uuid" - "go.uber.org/multierr" ) var ( @@ -411,7 +411,7 @@ func (b *moduleSetBuilder) Build() (ModuleSet, error) { return nil, errBuildAlreadyCalled } if len(b.errs) > 0 { - return nil, multierr.Combine(b.errs...) + return nil, errors.Join(b.errs...) } if len(b.addedModules) == 0 { // Allow an empty ModuleSet. diff --git a/private/bufpkg/bufmodule/proto_file_tracker.go b/private/bufpkg/bufmodule/proto_file_tracker.go index 3e5bfbcd42..0a1f5baf17 100644 --- a/private/bufpkg/bufmodule/proto_file_tracker.go +++ b/private/bufpkg/bufmodule/proto_file_tracker.go @@ -15,11 +15,11 @@ package bufmodule import ( + "errors" "sort" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" - "go.uber.org/multierr" ) // protoFileTracker tracks if we found a .proto file for each Module tracked, and what the OpaqueIDs @@ -131,8 +131,7 @@ func (t *protoFileTracker) validate() error { for _, duplicateProtoPathError := range duplicateProtoPathErrors { errs = append(errs, duplicateProtoPathError) } - // multierr.Combine special-cases len(errs) == 1, so no need for us to do so. - return multierr.Combine(errs...) + return errors.Join(errs...) } return nil } diff --git a/private/bufpkg/bufprotoplugin/bufprotopluginos/response_writer.go b/private/bufpkg/bufprotoplugin/bufprotopluginos/response_writer.go index 35db22ba06..e6b0ff373d 100644 --- a/private/bufpkg/bufprotoplugin/bufprotopluginos/response_writer.go +++ b/private/bufpkg/bufprotoplugin/bufprotopluginos/response_writer.go @@ -16,6 +16,7 @@ package bufprotopluginos import ( "context" + "errors" "fmt" "log/slog" "os" @@ -28,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage/storagearchive" "github.com/bufbuild/buf/private/pkg/storage/storagemem" "github.com/bufbuild/buf/private/pkg/storage/storageos" - "go.uber.org/multierr" "google.golang.org/protobuf/types/pluginpb" ) @@ -231,7 +231,7 @@ func (w *responseWriter) writeZip( return err } defer func() { - retErr = multierr.Append(retErr, file.Close()) + retErr = errors.Join(retErr, file.Close()) }() // protoc does not compress. return storagearchive.Zip(ctx, readWriteBucket, file, false) diff --git a/private/bufpkg/bufprotoplugin/response_writer.go b/private/bufpkg/bufprotoplugin/response_writer.go index 6f3f78dcba..6e1ead7987 100644 --- a/private/bufpkg/bufprotoplugin/response_writer.go +++ b/private/bufpkg/bufprotoplugin/response_writer.go @@ -18,6 +18,7 @@ import ( "bufio" "bytes" "context" + "errors" "fmt" "io" "io/fs" @@ -27,7 +28,6 @@ import ( "unicode/utf8" "github.com/bufbuild/buf/private/pkg/storage" - "go.uber.org/multierr" "google.golang.org/protobuf/types/pluginpb" ) @@ -83,7 +83,7 @@ func applyInsertionPoint( return err } defer func() { - retErr = multierr.Append(retErr, targetReadObjectCloser.Close()) + retErr = errors.Join(retErr, targetReadObjectCloser.Close()) }() resultData, err := writeInsertionPoint(ctx, file, targetReadObjectCloser) if err != nil { diff --git a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/get.go b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/get.go index 4331b4963f..8fc81e12f4 100644 --- a/private/bufpkg/bufremoteplugin/bufremotepluginconfig/get.go +++ b/private/bufpkg/bufremoteplugin/bufremotepluginconfig/get.go @@ -16,13 +16,13 @@ package bufremotepluginconfig import ( "context" + "errors" "fmt" "io" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/stringutil" - "go.uber.org/multierr" ) func getConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, options []ConfigOption) (_ *Config, retErr error) { @@ -50,7 +50,7 @@ func getConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, opti return nil, err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() data, err := io.ReadAll(readObjectCloser) if err != nil { diff --git a/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker.go b/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker.go index 1dfd14609e..e46a4e34ae 100644 --- a/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker.go +++ b/private/bufpkg/bufremoteplugin/bufremoteplugindocker/docker.go @@ -34,7 +34,6 @@ import ( imagev1 "github.com/docker/docker/image/v1" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/stringid" - "go.uber.org/multierr" ) const ( @@ -121,7 +120,7 @@ func (d *dockerAPIClient) Load(ctx context.Context, image io.Reader) (_ *LoadRes } defer func() { if err := response.Body.Close(); err != nil { - retErr = multierr.Append(retErr, fmt.Errorf("docker load response body close error: %w", err)) + retErr = errors.Join(retErr, fmt.Errorf("docker load response body close error: %w", err)) } }() imageID := "" @@ -180,7 +179,7 @@ func (d *dockerAPIClient) Push(ctx context.Context, image string, auth *Registry return nil, err } defer func() { - retErr = multierr.Append(retErr, pushReader.Close()) + retErr = errors.Join(retErr, pushReader.Close()) }() var imageDigest string pushScanner := bufio.NewScanner(pushReader) diff --git a/private/bufpkg/bufstyle/analyzer_provider.go b/private/bufpkg/bufstyle/analyzer_provider.go index 581253862c..fb473a8f2e 100644 --- a/private/bufpkg/bufstyle/analyzer_provider.go +++ b/private/bufpkg/bufstyle/analyzer_provider.go @@ -15,9 +15,9 @@ package bufstyle import ( + "errors" "path/filepath" - "go.uber.org/multierr" "golang.org/x/tools/go/analysis" ) @@ -81,12 +81,12 @@ func (a *analyzerProvider) modifyAnalyzer(analyzer *analysis.Analyzer) { } absFilePath, err := filepath.Abs(position.Filename) if err != nil { - reportErr = multierr.Append(reportErr, err) + reportErr = errors.Join(reportErr, err) return } relFilePath, err := filepath.Rel(a.absRootDirPath, absFilePath) if err != nil { - reportErr = multierr.Append(reportErr, err) + reportErr = errors.Join(reportErr, err) return } if _, ok := relFilePaths[relFilePath]; !ok { diff --git a/private/pkg/encoding/encoding.go b/private/pkg/encoding/encoding.go index 0fddc370bd..a3f3b5f161 100644 --- a/private/pkg/encoding/encoding.go +++ b/private/pkg/encoding/encoding.go @@ -23,7 +23,6 @@ import ( "io" "strings" - "go.uber.org/multierr" "gopkg.in/yaml.v3" ) @@ -110,7 +109,7 @@ func UnmarshalJSONOrYAMLNonStrict(data []byte, v interface{}) error { } if jsonErr := UnmarshalJSONNonStrict(data, v); jsonErr != nil { if yamlErr := UnmarshalYAMLNonStrict(data, v); yamlErr != nil { - return multierr.Append(jsonErr, yamlErr) + return errors.Join(jsonErr, yamlErr) } } return nil @@ -136,7 +135,7 @@ func MarshalYAML(v interface{}) (_ []byte, retErr error) { buffer := bytes.NewBuffer(nil) yamlEncoder := NewYAMLEncoder(buffer) defer func() { - retErr = multierr.Append(retErr, yamlEncoder.Close()) + retErr = errors.Join(retErr, yamlEncoder.Close()) }() if err := yamlEncoder.Encode(v); err != nil { return nil, err diff --git a/private/pkg/execext/process.go b/private/pkg/execext/process.go index 4b72533e99..6a667ac060 100644 --- a/private/pkg/execext/process.go +++ b/private/pkg/execext/process.go @@ -18,8 +18,6 @@ import ( "context" "errors" "os/exec" - - "go.uber.org/multierr" ) var errWaitAlreadyCalled = errors.New("wait already called on process") @@ -48,7 +46,7 @@ func (p *process) Wait() error { return errWaitAlreadyCalled case <-p.ctx.Done(): // Timed out. Send a kill signal and release our handle to it. - return multierr.Combine(p.ctx.Err(), p.cmd.Process.Kill()) + return errors.Join(p.ctx.Err(), p.cmd.Process.Kill()) } } diff --git a/private/pkg/filepathext/filepathext.go b/private/pkg/filepathext/filepathext.go index 65124620e0..c0b3f6cac1 100644 --- a/private/pkg/filepathext/filepathext.go +++ b/private/pkg/filepathext/filepathext.go @@ -24,12 +24,12 @@ package filepathext // https://github.com/golang/go/blob/master/LICENSE import ( + "errors" "os" "path/filepath" "sort" "github.com/bufbuild/buf/private/pkg/osext" - "go.uber.org/multierr" ) // RealClean does filepath.Clean and filepath.FromSlash, @@ -182,7 +182,7 @@ func readDirNames(dirPath string) (_ []string, retErr error) { return nil, err } defer func() { - retErr = multierr.Append(retErr, file.Close()) + retErr = errors.Join(retErr, file.Close()) }() dirNames, err := file.Readdirnames(-1) if err != nil { diff --git a/private/pkg/git/cloner.go b/private/pkg/git/cloner.go index d79b28e242..f5895c30fa 100644 --- a/private/pkg/git/cloner.go +++ b/private/pkg/git/cloner.go @@ -29,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageos" "github.com/bufbuild/buf/private/pkg/tmp" - "go.uber.org/multierr" ) type cloner struct { @@ -82,7 +81,7 @@ func (c *cloner) CloneToBucket( return err } defer func() { - retErr = multierr.Append(retErr, baseDir.Close()) + retErr = errors.Join(retErr, baseDir.Close()) }() buffer := bytes.NewBuffer(nil) diff --git a/private/pkg/github/githubtesting/archive_reader.go b/private/pkg/github/githubtesting/archive_reader.go index 6428a2cb87..c220f41220 100644 --- a/private/pkg/github/githubtesting/archive_reader.go +++ b/private/pkg/github/githubtesting/archive_reader.go @@ -17,6 +17,7 @@ package githubtesting import ( "compress/gzip" "context" + "errors" "fmt" "log/slog" "net/http" @@ -28,7 +29,6 @@ import ( "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/storage/storagearchive" "github.com/bufbuild/buf/private/pkg/storage/storageos" - "go.uber.org/multierr" ) // since we are in testing, we care less about making sure this times out early @@ -77,7 +77,7 @@ func (a *archiveReader) GetArchive( return err } defer func() { - retErr = multierr.Append(retErr, unlocker.Unlock()) + retErr = errors.Join(retErr, unlocker.Unlock()) }() // check if already exists, if so, do nothing @@ -102,7 +102,7 @@ func (a *archiveReader) GetArchive( return err } defer func() { - retErr = multierr.Append(retErr, response.Body.Close()) + retErr = errors.Join(retErr, response.Body.Close()) }() if response.StatusCode != http.StatusOK { return fmt.Errorf("expected HTTP status code %d to be %d", response.StatusCode, http.StatusOK) @@ -112,7 +112,7 @@ func (a *archiveReader) GetArchive( return err } defer func() { - retErr = multierr.Append(retErr, gzipReader.Close()) + retErr = errors.Join(retErr, gzipReader.Close()) }() if err := os.MkdirAll(outputDirPath, 0755); err != nil { return err diff --git a/private/pkg/ioext/ioext.go b/private/pkg/ioext/ioext.go index dd0676fb7c..e8f3a9ae8a 100644 --- a/private/pkg/ioext/ioext.go +++ b/private/pkg/ioext/ioext.go @@ -17,10 +17,9 @@ package ioext import ( "bytes" + "errors" "io" "sync" - - "go.uber.org/multierr" ) var ( @@ -37,7 +36,7 @@ var ( // ReadAllAndClose reads all the data and then closes the ReadCloser. func ReadAllAndClose(readCloser io.ReadCloser) ([]byte, error) { data, err := io.ReadAll(readCloser) - return data, multierr.Append(err, readCloser.Close()) + return data, errors.Join(err, readCloser.Close()) } // NopWriteCloser returns an io.WriteCloser with a no-op Close method wrapping the provided io.Writer. @@ -137,7 +136,7 @@ type chainCloser struct { func (c chainCloser) Close() error { var err error for _, closer := range c.closers { - err = multierr.Append(err, closer.Close()) + err = errors.Join(err, closer.Close()) } return err } diff --git a/private/pkg/oauth2/client.go b/private/pkg/oauth2/client.go index 4f36a18fa7..dba57514b2 100644 --- a/private/pkg/oauth2/client.go +++ b/private/pkg/oauth2/client.go @@ -25,8 +25,6 @@ import ( "net/http" "strings" "time" - - "go.uber.org/multierr" ) const ( @@ -73,7 +71,7 @@ func (c *Client) RegisterDevice( return nil, err } defer func() { - retErr = multierr.Append(retErr, response.Body.Close()) + retErr = errors.Join(retErr, response.Body.Close()) }() payload := &struct { @@ -111,7 +109,7 @@ func (c *Client) AuthorizeDevice( return nil, err } defer func() { - retErr = multierr.Append(retErr, response.Body.Close()) + retErr = errors.Join(retErr, response.Body.Close()) }() payload := &struct { @@ -175,7 +173,7 @@ func (c *Client) AccessDeviceToken( }{} if err := parseJSONResponse(response, payload); err != nil { if closeErr := response.Body.Close(); closeErr != nil { - err = multierr.Append(err, closeErr) + err = errors.Join(err, closeErr) } return nil, err } diff --git a/private/pkg/oauth2/client_test.go b/private/pkg/oauth2/client_test.go index 9558beea83..5e9e6b0640 100644 --- a/private/pkg/oauth2/client_test.go +++ b/private/pkg/oauth2/client_test.go @@ -106,7 +106,9 @@ func TestRegisterDevice(t *testing.T) { }) output, err := c.RegisterDevice(ctx, test.input) assert.Equal(t, test.output, output) - assert.Equal(t, err, test.err) + if test.err != nil { + assert.EqualError(t, err, test.err.Error()) + } }) } } @@ -169,7 +171,9 @@ func TestAuthorizeDevice(t *testing.T) { }) output, err := c.AuthorizeDevice(ctx, test.input) assert.Equal(t, test.output, output) - assert.Equal(t, err, test.err) + if test.err != nil { + assert.EqualError(t, err, test.err.Error()) + } }) } } diff --git a/private/pkg/protostat/protostatos/file_walker.go b/private/pkg/protostat/protostatos/file_walker.go index 74618411fc..8fef99bccd 100644 --- a/private/pkg/protostat/protostatos/file_walker.go +++ b/private/pkg/protostat/protostatos/file_walker.go @@ -16,11 +16,10 @@ package protostatos import ( "context" + "errors" "io" "os" "path/filepath" - - "go.uber.org/multierr" ) type fileWalker struct { @@ -43,7 +42,7 @@ func (f *fileWalker) Walk(ctx context.Context, fu func(io.Reader) error) error { return err } if err := fu(file); err != nil { - return multierr.Append(err, file.Close()) + return errors.Join(err, file.Close()) } if err := file.Close(); err != nil { return err diff --git a/private/pkg/protostat/protostatstorage/file_walker.go b/private/pkg/protostat/protostatstorage/file_walker.go index a4deb80fa5..115a81c8bb 100644 --- a/private/pkg/protostat/protostatstorage/file_walker.go +++ b/private/pkg/protostat/protostatstorage/file_walker.go @@ -16,10 +16,10 @@ package protostatstorage import ( "context" + "errors" "io" "github.com/bufbuild/buf/private/pkg/storage" - "go.uber.org/multierr" ) type fileWalker struct { @@ -45,7 +45,7 @@ func (f *fileWalker) Walk(ctx context.Context, fu func(io.Reader) error) error { return err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() return fu(readObjectCloser) }, diff --git a/private/pkg/prototesting/prototesting.go b/private/pkg/prototesting/prototesting.go index 9a8570d4b2..cf675b3a67 100644 --- a/private/pkg/prototesting/prototesting.go +++ b/private/pkg/prototesting/prototesting.go @@ -17,6 +17,7 @@ package prototesting import ( "bytes" "context" + "errors" "fmt" "io" "os" @@ -30,7 +31,6 @@ import ( "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" - "go.uber.org/multierr" "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/descriptorpb" ) @@ -53,10 +53,10 @@ func GetProtocFileDescriptorSet( tempFilePath := tempFile.Name() defer func() { if err := tempFile.Close(); err != nil { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } if err := os.Remove(tempFilePath); err != nil { - retErr = multierr.Append(retErr, err) + retErr = errors.Join(retErr, err) } }() diff --git a/private/pkg/storage/copy.go b/private/pkg/storage/copy.go index a9c3486d63..dcae7a2fc5 100644 --- a/private/pkg/storage/copy.go +++ b/private/pkg/storage/copy.go @@ -16,11 +16,11 @@ package storage import ( "context" + "errors" "io" "sync/atomic" "github.com/bufbuild/buf/private/pkg/thread" - "go.uber.org/multierr" ) // Copy copies the bucket at from to the bucket at to. @@ -79,7 +79,7 @@ func CopyReader( return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() _, err = io.Copy(writeObjectCloser, reader) return err @@ -174,7 +174,7 @@ func copyPath( return err } defer func() { - retErr = multierr.Append(err, readObjectCloser.Close()) + retErr = errors.Join(err, readObjectCloser.Close()) }() return copyReadObject(ctx, readObjectCloser, to, toPath, copyExternalAndLocalPaths, atomic) } @@ -196,7 +196,7 @@ func copyReadObject( return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() if copyExternalAndLocalPaths { if err := writeObjectCloser.SetExternalPath(readObject.ExternalPath()); err != nil { diff --git a/private/pkg/storage/storagearchive/storagearchive.go b/private/pkg/storage/storagearchive/storagearchive.go index 549f1b1a1e..b14b2be7ca 100644 --- a/private/pkg/storage/storagearchive/storagearchive.go +++ b/private/pkg/storage/storagearchive/storagearchive.go @@ -28,7 +28,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageutil" "github.com/klauspost/compress/zip" - "go.uber.org/multierr" ) var ( @@ -49,7 +48,7 @@ func Tar( ) (retErr error) { tarWriter := tar.NewWriter(writer) defer func() { - retErr = multierr.Append(retErr, tarWriter.Close()) + retErr = errors.Join(retErr, tarWriter.Close()) }() return storage.WalkReadObjects( ctx, @@ -166,7 +165,7 @@ func Zip( ) (retErr error) { zipWriter := zip.NewWriter(writer) defer func() { - retErr = multierr.Append(retErr, zipWriter.Close()) + retErr = errors.Join(retErr, zipWriter.Close()) }() return storage.WalkReadObjects( ctx, @@ -289,7 +288,7 @@ func copyZipFile( return err } defer func() { - retErr = multierr.Append(retErr, readCloser.Close()) + retErr = errors.Join(retErr, readCloser.Close()) }() return storage.CopyReader(ctx, writeBucket, readCloser, path) } diff --git a/private/pkg/storage/storageos/bucket.go b/private/pkg/storage/storageos/bucket.go index 5639ef81f5..259f99fba8 100644 --- a/private/pkg/storage/storageos/bucket.go +++ b/private/pkg/storage/storageos/bucket.go @@ -26,7 +26,6 @@ import ( "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageutil" "go.uber.org/atomic" - "go.uber.org/multierr" ) // errNotDir is the error returned if a path is not a directory. @@ -393,13 +392,13 @@ func (w *writeObjectCloser) Close() error { err := toStorageError(w.file.Close()) // This is an atomic write operation - we need to rename to the final path if w.path != "" { - atomicWriteErr := multierr.Append(w.writeErr.Load(), err) + atomicWriteErr := errors.Join(w.writeErr.Load(), err) // Failed during Write or Close - remove temporary file without rename if atomicWriteErr != nil { - return toStorageError(multierr.Append(atomicWriteErr, os.Remove(w.file.Name()))) + return toStorageError(errors.Join(atomicWriteErr, os.Remove(w.file.Name()))) } if err := os.Rename(w.file.Name(), w.path); err != nil { - return toStorageError(multierr.Append(err, os.Remove(w.file.Name()))) + return toStorageError(errors.Join(err, os.Remove(w.file.Name()))) } } return err diff --git a/private/pkg/storage/util.go b/private/pkg/storage/util.go index 7b2524ea27..23a336f1d1 100644 --- a/private/pkg/storage/util.go +++ b/private/pkg/storage/util.go @@ -19,8 +19,6 @@ import ( "errors" "io" "sort" - - "go.uber.org/multierr" ) // errIsNotEmpty is used to break out of the Walk function early in IsEmpty. @@ -37,7 +35,7 @@ func ReadPath(ctx context.Context, readBucket ReadBucket, path string) (_ []byte return nil, err } defer func() { - retErr = multierr.Append(retErr, readObject.Close()) + retErr = errors.Join(retErr, readObject.Close()) }() return io.ReadAll(readObject) } @@ -49,7 +47,7 @@ func PutPath(ctx context.Context, writeBucket WriteBucket, path string, data []b return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() _, err = writeObjectCloser.Write(data) return err @@ -62,7 +60,7 @@ func ForReadObject(ctx context.Context, readBucket ReadBucket, path string, f fu return err } defer func() { - retErr = multierr.Append(retErr, readObjectCloser.Close()) + retErr = errors.Join(retErr, readObjectCloser.Close()) }() return f(readObjectCloser) } @@ -74,7 +72,7 @@ func ForWriteObject(ctx context.Context, writeBucket WriteBucket, path string, f return err } defer func() { - retErr = multierr.Append(retErr, writeObjectCloser.Close()) + retErr = errors.Join(retErr, writeObjectCloser.Close()) }() return f(writeObjectCloser) } @@ -95,7 +93,7 @@ func WalkReadObjects( if err != nil { return err } - return multierr.Append(f(readObjectCloser), readObjectCloser.Close()) + return errors.Join(f(readObjectCloser), readObjectCloser.Close()) }, ) } diff --git a/private/pkg/thread/thread.go b/private/pkg/thread/thread.go index f4e37e1107..92cebacaac 100644 --- a/private/pkg/thread/thread.go +++ b/private/pkg/thread/thread.go @@ -16,10 +16,9 @@ package thread import ( "context" + "errors" "runtime" "sync" - - "go.uber.org/multierr" ) var ( @@ -74,9 +73,14 @@ func Parallelize(ctx context.Context, jobs []func(context.Context) error, option defer cancel() } semaphoreC := make(chan struct{}, Parallelism()*multiplier) - var retErr error - var wg sync.WaitGroup + var errs []error var lock sync.Mutex + addError := func(err error) { + lock.Lock() + errs = append(errs, err) + lock.Unlock() + } + var wg sync.WaitGroup var stop bool for _, job := range jobs { if stop { @@ -91,20 +95,18 @@ func Parallelize(ctx context.Context, jobs []func(context.Context) error, option select { case <-ctx.Done(): stop = true - retErr = multierr.Append(retErr, ctx.Err()) + addError(ctx.Err()) case semaphoreC <- struct{}{}: select { case <-ctx.Done(): stop = true - retErr = multierr.Append(retErr, ctx.Err()) + addError(ctx.Err()) default: job := job wg.Add(1) go func() { if err := job(ctx); err != nil { - lock.Lock() - retErr = multierr.Append(retErr, err) - lock.Unlock() + addError(err) if cancel != nil { cancel() } @@ -117,7 +119,14 @@ func Parallelize(ctx context.Context, jobs []func(context.Context) error, option } } wg.Wait() - return retErr + switch len(errs) { + case 0: + return nil + case 1: + return errs[0] + default: + return errors.Join(errs...) + } } // ParallelizeOption is an option to Parallelize. diff --git a/private/pkg/tmp/tmp.go b/private/pkg/tmp/tmp.go index 1ab0928372..00aaec15e7 100644 --- a/private/pkg/tmp/tmp.go +++ b/private/pkg/tmp/tmp.go @@ -19,12 +19,12 @@ package tmp import ( "context" + "errors" "io" "os" "path/filepath" "github.com/bufbuild/buf/private/pkg/uuidutil" - "go.uber.org/multierr" ) // File is a temporary file or directory. @@ -63,9 +63,9 @@ func NewFile(ctx context.Context, reader io.Reader) (File, error) { _ = closer() }() _, err = io.Copy(file, reader) - err = multierr.Append(err, file.Close()) + err = errors.Join(err, file.Close()) if err != nil { - err = multierr.Append(err, closer()) + err = errors.Join(err, closer()) return nil, err } return newFile(closerFunc(closer), absPath), nil diff --git a/private/pkg/wasm/runtime.go b/private/pkg/wasm/runtime.go index d80178847f..837b20fd02 100644 --- a/private/pkg/wasm/runtime.go +++ b/private/pkg/wasm/runtime.go @@ -16,12 +16,12 @@ package wasm import ( "context" + "errors" "fmt" "github.com/tetratelabs/wazero" "github.com/tetratelabs/wazero/api" "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1" - "go.uber.org/multierr" ) const ( @@ -114,7 +114,7 @@ func (r *runtime) Compile(ctx context.Context, moduleName string, moduleWasm []b func (r *runtime) Close(ctx context.Context) error { err := r.runtime.Close(ctx) if r.compilationCache != nil { - err = multierr.Append(err, r.compilationCache.Close(ctx)) + err = errors.Join(err, r.compilationCache.Close(ctx)) } return err } From c26d75849c189b10dbbc8eb17684741a17fe3b76 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Fri, 1 Nov 2024 15:51:02 -0400 Subject: [PATCH 15/34] Drop go.uber.org/atomic in favor of sync/atomic (#3443) --- go.mod | 1 - go.sum | 2 -- private/buf/bufcurl/verbose_transport.go | 2 +- private/pkg/storage/limit.go | 9 +++--- private/pkg/storage/storageos/bucket.go | 30 +++++++++++++++++-- .../storage/storagetesting/storagetesting.go | 2 +- private/pkg/thread/thread_test.go | 6 ++-- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index be7ea20de3..bee7a1ab02 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,6 @@ require ( github.com/tetratelabs/wazero v1.8.1 go.lsp.dev/jsonrpc2 v0.10.0 go.lsp.dev/protocol v0.12.0 - go.uber.org/atomic v1.11.0 go.uber.org/zap v1.27.0 go.uber.org/zap/exp v0.3.0 golang.org/x/crypto v0.28.0 diff --git a/go.sum b/go.sum index c250b660c2..b63176a178 100644 --- a/go.sum +++ b/go.sum @@ -286,8 +286,6 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= diff --git a/private/buf/bufcurl/verbose_transport.go b/private/buf/bufcurl/verbose_transport.go index ecfbe0e427..72e60a765b 100644 --- a/private/buf/bufcurl/verbose_transport.go +++ b/private/buf/bufcurl/verbose_transport.go @@ -24,10 +24,10 @@ import ( "runtime" "sort" "strings" + "sync/atomic" "connectrpc.com/connect" "github.com/bufbuild/buf/private/pkg/verbose" - "go.uber.org/atomic" ) type skipUploadFinishedMessageKey struct{} diff --git a/private/pkg/storage/limit.go b/private/pkg/storage/limit.go index f34669421c..badd79caef 100644 --- a/private/pkg/storage/limit.go +++ b/private/pkg/storage/limit.go @@ -16,8 +16,7 @@ package storage import ( "context" - - "go.uber.org/atomic" + "sync/atomic" ) // LimitWriteBucket returns a [WriteBucket] that writes to [writeBucket] @@ -42,7 +41,7 @@ type limitedWriteBucket struct { func newLimitedWriteBucket(bucket WriteBucket, limit int64) *limitedWriteBucket { return &limitedWriteBucket{ WriteBucket: bucket, - currentSize: atomic.NewInt64(0), + currentSize: &atomic.Int64{}, limit: limit, } } @@ -78,7 +77,7 @@ func (o *limitedWriteObjectCloser) Write(p []byte) (int, error) { writeSize := int64(len(p)) newBucketSize := o.bucketSize.Add(writeSize) if newBucketSize > o.limit { - o.bucketSize.Sub(writeSize) + o.bucketSize.Add(-writeSize) return 0, &errWriteLimitReached{ Limit: o.limit, ExceedingBy: newBucketSize - o.limit, @@ -86,7 +85,7 @@ func (o *limitedWriteObjectCloser) Write(p []byte) (int, error) { } writtenSize, err := o.WriteObjectCloser.Write(p) if int64(writtenSize) < writeSize { - o.bucketSize.Sub(writeSize - int64(writtenSize)) + o.bucketSize.Add(-(writeSize - int64(writtenSize))) } return writtenSize, err } diff --git a/private/pkg/storage/storageos/bucket.go b/private/pkg/storage/storageos/bucket.go index 259f99fba8..64746a4848 100644 --- a/private/pkg/storage/storageos/bucket.go +++ b/private/pkg/storage/storageos/bucket.go @@ -20,12 +20,13 @@ import ( "io/fs" "os" "path/filepath" + "sync/atomic" "github.com/bufbuild/buf/private/pkg/filepathext" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/storage/storageutil" - "go.uber.org/atomic" + "github.com/bufbuild/buf/private/pkg/syserror" ) // errNotDir is the error returned if a path is not a directory. @@ -359,7 +360,7 @@ type writeObjectCloser struct { path string // writeErr contains the first non-nil error caught by a call to Write. // This is returned in Close for atomic writes to prevent writing an incomplete file. - writeErr atomic.Error + writeErr onceError } func newWriteObjectCloser( @@ -375,7 +376,7 @@ func newWriteObjectCloser( func (w *writeObjectCloser) Write(p []byte) (int, error) { n, err := w.file.Write(p) if err != nil { - w.writeErr.CompareAndSwap(nil, err) + w.writeErr.Store(err) } return n, toStorageError(err) } @@ -404,6 +405,29 @@ func (w *writeObjectCloser) Close() error { return err } +// onceError is an object that will only store an error once. +type onceError struct { + err atomic.Value +} + +// Store stores the err. +func (e *onceError) Store(err error) { + e.err.CompareAndSwap(nil, err) +} + +// Load loads the stored error. +func (e *onceError) Load() error { + atomicValue := e.err.Load() + if atomicValue == nil { + return nil + } + err, ok := atomicValue.(error) + if !ok { + return syserror.Newf("expected error but got %T", atomicValue) + } + return err +} + // newErrNotDir returns a new Error for a path not being a directory. func newErrNotDir(path string) *normalpath.Error { return normalpath.NewError(path, errNotDir) diff --git a/private/pkg/storage/storagetesting/storagetesting.go b/private/pkg/storage/storagetesting/storagetesting.go index 15d4d291d5..67438815cd 100644 --- a/private/pkg/storage/storagetesting/storagetesting.go +++ b/private/pkg/storage/storagetesting/storagetesting.go @@ -28,6 +28,7 @@ import ( "sort" "strconv" "sync" + "sync/atomic" "testing" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -38,7 +39,6 @@ import ( "github.com/bufbuild/buf/private/pkg/tmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/atomic" ) const ( diff --git a/private/pkg/thread/thread_test.go b/private/pkg/thread/thread_test.go index 1d35f23f9d..4ef4dedc9e 100644 --- a/private/pkg/thread/thread_test.go +++ b/private/pkg/thread/thread_test.go @@ -16,10 +16,10 @@ package thread import ( "context" + "sync/atomic" "testing" "github.com/stretchr/testify/assert" - "go.uber.org/atomic" ) func TestParallelizeWithImmediateCancellation(t *testing.T) { @@ -35,7 +35,7 @@ func TestParallelizeWithImmediateCancellation(t *testing.T) { ) for i := 0; i < jobsToExecute; i++ { jobs = append(jobs, func(_ context.Context) error { - executed.Inc() + executed.Add(1) return nil }) } @@ -49,7 +49,7 @@ func TestParallelizeWithImmediateCancellation(t *testing.T) { var jobs []func(context.Context) error for i := 0; i < 10; i++ { jobs = append(jobs, func(_ context.Context) error { - executed.Inc() + executed.Add(1) return nil }) } From b760d59a3429d3482872d6959c03c85486b8b951 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Mon, 4 Nov 2024 09:00:02 -0500 Subject: [PATCH 16/34] Improve LSP diagnostic info (#3436) --- private/buf/buflsp/file.go | 2 +- private/buf/buflsp/report.go | 5 ++--- private/buf/buflsp/server.go | 6 +++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/private/buf/buflsp/file.go b/private/buf/buflsp/file.go index b17e61a105..d206fce849 100644 --- a/private/buf/buflsp/file.go +++ b/private/buf/buflsp/file.go @@ -614,7 +614,7 @@ func (f *file) RunLints(ctx context.Context) bool { }, Code: annotation.Type(), Severity: protocol.DiagnosticSeverityError, - Source: "buf lint", + Source: serverName, Message: annotation.Message(), }) } diff --git a/private/buf/buflsp/report.go b/private/buf/buflsp/report.go index 6114146119..a665a549d0 100644 --- a/private/buf/buflsp/report.go +++ b/private/buf/buflsp/report.go @@ -17,8 +17,6 @@ package buflsp import ( - "fmt" - "github.com/bufbuild/protocompile/linker" "github.com/bufbuild/protocompile/parser" "github.com/bufbuild/protocompile/reporter" @@ -79,7 +77,8 @@ func newDiagnostic(err reporter.ErrorWithPos, isWarning bool) protocol.Diagnosti // essentially a bug that will result in worse diagnostics until fixed. Range: protocol.Range{Start: pos, End: pos}, Severity: protocol.DiagnosticSeverityError, - Message: fmt.Sprintf("%s:%d:%d: %s", err.GetPosition().Filename, err.GetPosition().Line, err.GetPosition().Col, err.Unwrap().Error()), + Message: err.Unwrap().Error(), + Source: serverName, } if isWarning { diff --git a/private/buf/buflsp/server.go b/private/buf/buflsp/server.go index e63c34118a..82a34e9cdd 100644 --- a/private/buf/buflsp/server.go +++ b/private/buf/buflsp/server.go @@ -28,6 +28,10 @@ import ( "go.lsp.dev/protocol" ) +const ( + serverName = "buf-lsp" +) + const ( semanticTypeType = iota semanticTypeStruct @@ -82,7 +86,7 @@ func (s *server) Initialize( return nil, err } - info := &protocol.ServerInfo{Name: "buf-lsp"} + info := &protocol.ServerInfo{Name: serverName} if buildInfo, ok := debug.ReadBuildInfo(); ok { info.Version = buildInfo.Main.Version } From 5fb95b870c5122a962328b7959f0f71f462d7eda Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:47:14 -0500 Subject: [PATCH 17/34] Make upgrade (#3446) --- go.mod | 21 +++++---- go.sum | 46 ++++++++++--------- make/go/dep_protoc_gen_go.mk | 4 +- make/go/go.mk | 2 +- .../go/buf/alpha/audit/v1alpha1/event.pb.go | 2 +- .../go/buf/alpha/audit/v1alpha1/service.pb.go | 2 +- .../go/buf/alpha/breaking/v1/config.pb.go | 2 +- .../proto/go/buf/alpha/image/v1/image.pb.go | 2 +- .../proto/go/buf/alpha/lint/v1/config.pb.go | 2 +- .../go/buf/alpha/module/v1alpha1/module.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/admin.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/authn.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/authz.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/convert.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/display.pb.go | 2 +- .../go/buf/alpha/registry/v1alpha1/doc.pb.go | 2 +- .../alpha/registry/v1alpha1/download.pb.go | 2 +- .../registry/v1alpha1/git_metadata.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/github.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/image.pb.go | 2 +- .../alpha/registry/v1alpha1/jsonschema.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/module.pb.go | 2 +- .../registry/v1alpha1/organization.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/owner.pb.go | 2 +- .../registry/v1alpha1/plugin_curation.pb.go | 2 +- .../go/buf/alpha/registry/v1alpha1/push.pb.go | 2 +- .../registry/v1alpha1/recommendation.pb.go | 2 +- .../alpha/registry/v1alpha1/reference.pb.go | 2 +- .../alpha/registry/v1alpha1/repository.pb.go | 2 +- .../registry/v1alpha1/repository_branch.pb.go | 2 +- .../registry/v1alpha1/repository_commit.pb.go | 2 +- .../registry/v1alpha1/repository_tag.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/resolve.pb.go | 2 +- .../alpha/registry/v1alpha1/resource.pb.go | 2 +- .../go/buf/alpha/registry/v1alpha1/role.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/schema.pb.go | 2 +- .../alpha/registry/v1alpha1/scim_token.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/search.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/studio.pb.go | 2 +- .../registry/v1alpha1/studio_request.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/token.pb.go | 2 +- .../go/buf/alpha/registry/v1alpha1/user.pb.go | 2 +- .../v1alpha1/verification_status.pb.go | 2 +- .../buf/alpha/registry/v1alpha1/webhook.pb.go | 2 +- .../go/buf/alpha/studio/v1alpha1/invoke.pb.go | 2 +- .../go/buf/alpha/webhook/v1alpha1/event.pb.go | 2 +- .../go/google/protobuf/cpp_features.pb.go | 2 +- .../go/google/protobuf/java_features.pb.go | 2 +- .../go/grpc/reflection/v1/reflection.pb.go | 2 +- 49 files changed, 83 insertions(+), 80 deletions(-) diff --git a/go.mod b/go.mod index bee7a1ab02..13139b8955 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.0 toolchain go1.23.2 require ( - buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1 + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 @@ -56,17 +56,18 @@ require ( buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/Microsoft/hcsshim v0.12.7 // indirect + github.com/Microsoft/hcsshim v0.12.9 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/containerd v1.7.23 // indirect - github.com/containerd/continuity v0.4.3 // indirect - github.com/containerd/errdefs v0.3.0 // indirect + github.com/containerd/continuity v0.4.4 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect - github.com/containerd/ttrpc v1.2.5 // indirect - github.com/containerd/typeurl/v2 v2.2.0 // indirect + github.com/containerd/ttrpc v1.2.6 // indirect + github.com/containerd/typeurl/v2 v2.2.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect @@ -82,7 +83,7 @@ require ( github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/pprof v0.0.0-20241017200806-017d972448fc // indirect + github.com/google/pprof v0.0.0-20241101162523-b92577c0c142 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -96,7 +97,7 @@ require ( github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/onsi/ginkgo/v2 v2.20.2 // indirect + github.com/onsi/ginkgo/v2 v2.21.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect @@ -120,7 +121,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect google.golang.org/grpc v1.67.1 // indirect ) diff --git a/go.sum b/go.sum index b63176a178..a6953618f7 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1 h1:O31Hu5Oho5suEWOD7FuMU9vfzeQT07ukTu4YuBVjLbw= -buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241023225133-42bdb4b67625.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 h1:APVDdZ4VfUvERVIj//yDjCWV7WezEOiK7+b6gvJ+iAk= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 h1:9wP6ZZYWnF2Z0TxmII7m3XNykxnP4/w8oXeth6ekcRI= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1/go.mod h1:Duw/9JoXkXIydyASnLYIiufkzySThoqavOsF+IihqvM= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 h1:FHQXg3T7S2jp8yc7/bQJgqEH1yza/rrDHXITUK2Tm0g= @@ -26,8 +26,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg6 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.12.7 h1:MP6R1spmjxTE4EU4J3YsrTxn8CjvN9qwjTKJXldFaRg= -github.com/Microsoft/hcsshim v0.12.7/go.mod h1:HPbAuJ9BvQYYZbB4yEQcyGIsTP5L4yHKeO9XO149AEM= +github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg= +github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= @@ -54,20 +54,22 @@ github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGD github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= -github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= -github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= -github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= +github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= -github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU= -github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= -github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsPEmzLso= -github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g= +github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4= +github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/containerd/typeurl/v2 v2.2.1 h1:/X1Kgcz4sKS/NTKQvvRS0pEVpUYqmPTwGQontm9pl0w= +github.com/containerd/typeurl/v2 v2.2.1/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -145,8 +147,8 @@ github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20241017200806-017d972448fc h1:NGyrhhFhwvRAZg02jnYVg3GBQy0qGBKmFQJwaPmpmxs= -github.com/google/pprof v0.0.0-20241017200806-017d972448fc/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20241101162523-b92577c0c142 h1:sAGdeJj0bnMgUNVeUpp6AYlVdCt3/GdI3pGRqsNSQLs= +github.com/google/pprof v0.0.0-20241101162523-b92577c0c142/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -197,10 +199,10 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= -github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -369,10 +371,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 h1:pAjq8XSSzXoP9ya73v/w+9QEAAJNluLrpmMq5qFJQNY= -google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:O6rP0uBq4k0mdi/b4ZEMAZjkhYWhS815kCvaMha4VN8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= 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.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/make/go/dep_protoc_gen_go.mk b/make/go/dep_protoc_gen_go.mk index 17ea695f19..d3a52b54e2 100644 --- a/make/go/dep_protoc_gen_go.mk +++ b/make/go/dep_protoc_gen_go.mk @@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS) $(call _assert_var,CACHE_BIN) # Settable -# https://github.com/protocolbuffers/protobuf-go/releases 20240906 checked 20240916 -PROTOC_GEN_GO_VERSION ?= v1.34.3-0.20240906163944-03df6c145d96 +# https://github.com/protocolbuffers/protobuf-go/releases 20241007 checked 20241007 +PROTOC_GEN_GO_VERSION ?= v1.35.1 GO_GET_PKGS := $(GO_GET_PKGS) \ google.golang.org/protobuf/proto@$(PROTOC_GEN_GO_VERSION) diff --git a/make/go/go.mk b/make/go/go.mk index 107d09f4c2..1c153003c9 100644 --- a/make/go/go.mk +++ b/make/go/go.mk @@ -22,7 +22,7 @@ GO_GET_PKGS ?= # Settable GO_MOD_VERSION ?= 1.22 # Settable -GO_MOD_TOOLCHAIN ?= 1.23.1 +GO_MOD_TOOLCHAIN ?= 1.23.2 # Settable GO_ALL_REPO_PKGS ?= ./cmd/... ./internal/... # Settable diff --git a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go index f539d614f0..c9ebcbd5d3 100644 --- a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go +++ b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/audit/v1alpha1/event.proto diff --git a/private/gen/proto/go/buf/alpha/audit/v1alpha1/service.pb.go b/private/gen/proto/go/buf/alpha/audit/v1alpha1/service.pb.go index 5a070b406b..6b20d595f3 100644 --- a/private/gen/proto/go/buf/alpha/audit/v1alpha1/service.pb.go +++ b/private/gen/proto/go/buf/alpha/audit/v1alpha1/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/audit/v1alpha1/service.proto diff --git a/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go b/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go index fcbc8c63a0..33553345e4 100644 --- a/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go +++ b/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/breaking/v1/config.proto diff --git a/private/gen/proto/go/buf/alpha/image/v1/image.pb.go b/private/gen/proto/go/buf/alpha/image/v1/image.pb.go index 48ce63da4e..8911f3ba79 100644 --- a/private/gen/proto/go/buf/alpha/image/v1/image.pb.go +++ b/private/gen/proto/go/buf/alpha/image/v1/image.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/image/v1/image.proto diff --git a/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go b/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go index 2bcb73bb7e..f6453ed898 100644 --- a/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go +++ b/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/lint/v1/config.proto diff --git a/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go b/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go index 6e5c61435e..01f23eb902 100644 --- a/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go +++ b/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/module/v1alpha1/module.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go index 7f15b78825..e8606c6477 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/admin.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go index 6bfee7234a..193a1268e2 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/authn.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go index ec9f39a4f5..0b1264496a 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/authz.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go index 861027bded..651634851b 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/convert.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go index 8e3727a648..59b07eae44 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/display.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go index ba472dfbcc..0b83d6d287 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/doc.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go index 876b7c5305..6115a78bad 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/download.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/git_metadata.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/git_metadata.pb.go index c21156f5a2..1a27a30687 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/git_metadata.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/git_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/git_metadata.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go index 8c456a62b0..1581806265 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/github.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go index 51531deb6d..111892aa1f 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/image.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go index c247c04da8..61ed99ef4b 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/jsonschema.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go index 12667f3eb7..d00d7b3455 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/module.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go index 9c4ffd6759..42d3f7826d 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/organization.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go index 7c98e35f32..88645f346c 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/owner.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go index 91b67849e2..cc349544ee 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/plugin_curation.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go index feefad5684..6a6920f2a5 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/push.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go index 1b592abec3..a2a267e416 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/recommendation.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go index 6ce5a8f7db..b770a59d1a 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/reference.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go index b5f4bb9a2e..9941b9cbcb 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/repository.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_branch.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_branch.pb.go index ea3aa56cf0..37e380e372 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_branch.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_branch.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/repository_branch.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go index d0ec257022..06d6a551d5 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/repository_commit.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go index 090c4b1f3c..7917db81c0 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/repository_tag.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go index e69929dc4b..cf1d5d0fb5 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/resolve.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go index 2a5db1678f..a69404da38 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/resource.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go index 4ffe989894..1447933469 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/role.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go index fda780d0d9..b89966cace 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/schema.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/scim_token.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/scim_token.pb.go index cfdc2911f2..9c3a579a6a 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/scim_token.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/scim_token.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/scim_token.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go index 8def43bc97..d7d7e84e05 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/search.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go index a187c3e40a..094fb5564b 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/studio.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go index c7be060d38..1041aaba67 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/studio_request.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go index 1b1f0c17da..4cfbf63f5f 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/token.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go index 50d0bd492b..bf62985689 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/user.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go index 44d2c396d3..7be0223fe2 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/verification_status.proto diff --git a/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go b/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go index a9c2c6513c..8a34061523 100644 --- a/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go +++ b/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/registry/v1alpha1/webhook.proto diff --git a/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go b/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go index 483073eaee..a2c979823f 100644 --- a/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go +++ b/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/studio/v1alpha1/invoke.proto diff --git a/private/gen/proto/go/buf/alpha/webhook/v1alpha1/event.pb.go b/private/gen/proto/go/buf/alpha/webhook/v1alpha1/event.pb.go index 3d8ebd9993..de48d934db 100644 --- a/private/gen/proto/go/buf/alpha/webhook/v1alpha1/event.pb.go +++ b/private/gen/proto/go/buf/alpha/webhook/v1alpha1/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: buf/alpha/webhook/v1alpha1/event.proto diff --git a/private/gen/proto/go/google/protobuf/cpp_features.pb.go b/private/gen/proto/go/google/protobuf/cpp_features.pb.go index e4e4352413..160948724e 100644 --- a/private/gen/proto/go/google/protobuf/cpp_features.pb.go +++ b/private/gen/proto/go/google/protobuf/cpp_features.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: google/protobuf/cpp_features.proto diff --git a/private/gen/proto/go/google/protobuf/java_features.pb.go b/private/gen/proto/go/google/protobuf/java_features.pb.go index 5a35b42ed5..fa7eb1386d 100644 --- a/private/gen/proto/go/google/protobuf/java_features.pb.go +++ b/private/gen/proto/go/google/protobuf/java_features.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: google/protobuf/java_features.proto diff --git a/private/gen/proto/go/grpc/reflection/v1/reflection.pb.go b/private/gen/proto/go/grpc/reflection/v1/reflection.pb.go index a4e0de8ffb..3e5acfb3cf 100644 --- a/private/gen/proto/go/grpc/reflection/v1/reflection.pb.go +++ b/private/gen/proto/go/grpc/reflection/v1/reflection.pb.go @@ -21,7 +21,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2-devel +// protoc-gen-go v1.35.1 // protoc (unknown) // source: grpc/reflection/v1/reflection.proto From a361e6a486a1eff342235552f5c2813748ce2107 Mon Sep 17 00:00:00 2001 From: Doria Keung Date: Wed, 6 Nov 2024 11:48:24 -0500 Subject: [PATCH 18/34] Add `clean` key to `buf generate` long description (#3451) Co-authored-by: Stefan VanBuren --- private/buf/cmd/buf/command/generate/generate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/private/buf/cmd/buf/command/generate/generate.go b/private/buf/cmd/buf/command/generate/generate.go index d35213a50e..4eb58710bb 100644 --- a/private/buf/cmd/buf/command/generate/generate.go +++ b/private/buf/cmd/buf/command/generate/generate.go @@ -68,6 +68,10 @@ func NewCommand( # The valid values are v1beta1, v1 and v2. # Required. version: v2 + # When clean is set to true, delete the directories, zip files, and/or jar files specified in the + # "out" field for all plugins before running code generation. Defaults to false. + # Optional. + clean: true # The plugins to run. # Required. plugins: From fdc034f5fba5fee4dc79f09a5451a55374fae17b Mon Sep 17 00:00:00 2001 From: Tommy Ma <33741651+cyinma@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:28:10 -0500 Subject: [PATCH 19/34] Add audit logging event for plugin commit pushed (#3452) --- .../go/buf/alpha/audit/v1alpha1/event.pb.go | 1807 +++++++++-------- proto/buf/alpha/audit/v1alpha1/event.proto | 16 + 2 files changed, 983 insertions(+), 840 deletions(-) diff --git a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go index c9ebcbd5d3..dd2e36bee6 100644 --- a/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go +++ b/private/gen/proto/go/buf/alpha/audit/v1alpha1/event.pb.go @@ -100,6 +100,7 @@ const ( ResourceType_RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR ResourceType = 5 ResourceType_RESOURCE_TYPE_REPOSITORY_COMMIT ResourceType = 6 ResourceType_RESOURCE_TYPE_PLUGIN ResourceType = 7 + ResourceType_RESOURCE_TYPE_PLUGIN_COMMIT ResourceType = 15 ResourceType_RESOURCE_TYPE_CURATED_PLUGIN ResourceType = 8 ResourceType_RESOURCE_TYPE_TOKEN ResourceType = 10 ResourceType_RESOURCE_TYPE_SCIM_TOKEN ResourceType = 11 @@ -120,6 +121,7 @@ var ( 5: "RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR", 6: "RESOURCE_TYPE_REPOSITORY_COMMIT", 7: "RESOURCE_TYPE_PLUGIN", + 15: "RESOURCE_TYPE_PLUGIN_COMMIT", 8: "RESOURCE_TYPE_CURATED_PLUGIN", 10: "RESOURCE_TYPE_TOKEN", 11: "RESOURCE_TYPE_SCIM_TOKEN", @@ -137,6 +139,7 @@ var ( "RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR": 5, "RESOURCE_TYPE_REPOSITORY_COMMIT": 6, "RESOURCE_TYPE_PLUGIN": 7, + "RESOURCE_TYPE_PLUGIN_COMMIT": 15, "RESOURCE_TYPE_CURATED_PLUGIN": 8, "RESOURCE_TYPE_TOKEN": 10, "RESOURCE_TYPE_SCIM_TOKEN": 11, @@ -195,6 +198,7 @@ const ( EventType_EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED EventType = 40 EventType_EVENT_TYPE_PLUGIN_CREATED EventType = 13 EventType_EVENT_TYPE_PLUGIN_DELETED EventType = 14 + EventType_EVENT_TYPE_PLUGIN_COMMIT_PUSHED EventType = 43 EventType_EVENT_TYPE_CURATED_PLUGIN_CREATED EventType = 20 EventType_EVENT_TYPE_CURATED_PLUGIN_DELETED EventType = 31 EventType_EVENT_TYPE_USER_CREATED EventType = 15 @@ -243,6 +247,7 @@ var ( 40: "EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED", 13: "EVENT_TYPE_PLUGIN_CREATED", 14: "EVENT_TYPE_PLUGIN_DELETED", + 43: "EVENT_TYPE_PLUGIN_COMMIT_PUSHED", 20: "EVENT_TYPE_CURATED_PLUGIN_CREATED", 31: "EVENT_TYPE_CURATED_PLUGIN_DELETED", 15: "EVENT_TYPE_USER_CREATED", @@ -288,6 +293,7 @@ var ( "EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED": 40, "EVENT_TYPE_PLUGIN_CREATED": 13, "EVENT_TYPE_PLUGIN_DELETED": 14, + "EVENT_TYPE_PLUGIN_COMMIT_PUSHED": 43, "EVENT_TYPE_CURATED_PLUGIN_CREATED": 20, "EVENT_TYPE_CURATED_PLUGIN_DELETED": 31, "EVENT_TYPE_USER_CREATED": 15, @@ -577,6 +583,7 @@ type Event struct { // *Event_RepositoryDefaultLabelNameChanged // *Event_PluginCreated // *Event_PluginDeleted + // *Event_PluginCommitPushed // *Event_UserCreated // *Event_UserDeactivated // *Event_UserDeleted @@ -791,6 +798,13 @@ func (x *Event) GetPluginDeleted() *PayloadPluginDeleted { return nil } +func (x *Event) GetPluginCommitPushed() *PayloadPluginCommitPushed { + if x, ok := x.GetPayload().(*Event_PluginCommitPushed); ok { + return x.PluginCommitPushed + } + return nil +} + func (x *Event) GetUserCreated() *PayloadUserCreated { if x, ok := x.GetPayload().(*Event_UserCreated); ok { return x.UserCreated @@ -1044,6 +1058,10 @@ type Event_PluginDeleted struct { PluginDeleted *PayloadPluginDeleted `protobuf:"bytes,20,opt,name=plugin_deleted,json=pluginDeleted,proto3,oneof"` } +type Event_PluginCommitPushed struct { + PluginCommitPushed *PayloadPluginCommitPushed `protobuf:"bytes,49,opt,name=plugin_commit_pushed,json=pluginCommitPushed,proto3,oneof"` +} + type Event_UserCreated struct { UserCreated *PayloadUserCreated `protobuf:"bytes,21,opt,name=user_created,json=userCreated,proto3,oneof"` } @@ -1182,6 +1200,8 @@ func (*Event_PluginCreated) isEvent_Payload() {} func (*Event_PluginDeleted) isEvent_Payload() {} +func (*Event_PluginCommitPushed) isEvent_Payload() {} + func (*Event_UserCreated) isEvent_Payload() {} func (*Event_UserDeactivated) isEvent_Payload() {} @@ -2504,6 +2524,88 @@ func (x *PayloadPluginDeleted) GetPluginType() string { return "" } +type PayloadPluginCommitPushed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // owner_id is the id of the owner of the plugin. + OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // owner_name is the name of the owner of the plugin. + OwnerName string `protobuf:"bytes,2,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"` + // plugin_id is the id of the plugin. + PluginId string `protobuf:"bytes,3,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` + // plugin_name is the name of the plugin. + PluginName string `protobuf:"bytes,4,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"` + // p1_digest is the p1 digest of the pushed plugin commit. + P1Digest string `protobuf:"bytes,5,opt,name=p1_digest,json=p1Digest,proto3" json:"p1_digest,omitempty"` +} + +func (x *PayloadPluginCommitPushed) Reset() { + *x = PayloadPluginCommitPushed{} + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PayloadPluginCommitPushed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadPluginCommitPushed) ProtoMessage() {} + +func (x *PayloadPluginCommitPushed) ProtoReflect() protoreflect.Message { + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayloadPluginCommitPushed.ProtoReflect.Descriptor instead. +func (*PayloadPluginCommitPushed) Descriptor() ([]byte, []int) { + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{22} +} + +func (x *PayloadPluginCommitPushed) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *PayloadPluginCommitPushed) GetOwnerName() string { + if x != nil { + return x.OwnerName + } + return "" +} + +func (x *PayloadPluginCommitPushed) GetPluginId() string { + if x != nil { + return x.PluginId + } + return "" +} + +func (x *PayloadPluginCommitPushed) GetPluginName() string { + if x != nil { + return x.PluginName + } + return "" +} + +func (x *PayloadPluginCommitPushed) GetP1Digest() string { + if x != nil { + return x.P1Digest + } + return "" +} + type PayloadUserCreated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2512,7 +2614,7 @@ type PayloadUserCreated struct { func (x *PayloadUserCreated) Reset() { *x = PayloadUserCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2524,7 +2626,7 @@ func (x *PayloadUserCreated) String() string { func (*PayloadUserCreated) ProtoMessage() {} func (x *PayloadUserCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[22] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2537,7 +2639,7 @@ func (x *PayloadUserCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserCreated.ProtoReflect.Descriptor instead. func (*PayloadUserCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{22} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{23} } type PayloadUserReactivated struct { @@ -2548,7 +2650,7 @@ type PayloadUserReactivated struct { func (x *PayloadUserReactivated) Reset() { *x = PayloadUserReactivated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2560,7 +2662,7 @@ func (x *PayloadUserReactivated) String() string { func (*PayloadUserReactivated) ProtoMessage() {} func (x *PayloadUserReactivated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[23] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2573,7 +2675,7 @@ func (x *PayloadUserReactivated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserReactivated.ProtoReflect.Descriptor instead. func (*PayloadUserReactivated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{23} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{24} } type PayloadUserDeactivated struct { @@ -2584,7 +2686,7 @@ type PayloadUserDeactivated struct { func (x *PayloadUserDeactivated) Reset() { *x = PayloadUserDeactivated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2596,7 +2698,7 @@ func (x *PayloadUserDeactivated) String() string { func (*PayloadUserDeactivated) ProtoMessage() {} func (x *PayloadUserDeactivated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[24] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2609,7 +2711,7 @@ func (x *PayloadUserDeactivated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserDeactivated.ProtoReflect.Descriptor instead. func (*PayloadUserDeactivated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{24} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{25} } type PayloadUserDeleted struct { @@ -2620,7 +2722,7 @@ type PayloadUserDeleted struct { func (x *PayloadUserDeleted) Reset() { *x = PayloadUserDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2632,7 +2734,7 @@ func (x *PayloadUserDeleted) String() string { func (*PayloadUserDeleted) ProtoMessage() {} func (x *PayloadUserDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[25] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2645,7 +2747,7 @@ func (x *PayloadUserDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserDeleted.ProtoReflect.Descriptor instead. func (*PayloadUserDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{25} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{26} } type PayloadUserLoggedIn struct { @@ -2656,7 +2758,7 @@ type PayloadUserLoggedIn struct { func (x *PayloadUserLoggedIn) Reset() { *x = PayloadUserLoggedIn{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2668,7 +2770,7 @@ func (x *PayloadUserLoggedIn) String() string { func (*PayloadUserLoggedIn) ProtoMessage() {} func (x *PayloadUserLoggedIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[26] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2681,7 +2783,7 @@ func (x *PayloadUserLoggedIn) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserLoggedIn.ProtoReflect.Descriptor instead. func (*PayloadUserLoggedIn) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{26} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{27} } type PayloadUserLoggedOut struct { @@ -2692,7 +2794,7 @@ type PayloadUserLoggedOut struct { func (x *PayloadUserLoggedOut) Reset() { *x = PayloadUserLoggedOut{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2704,7 +2806,7 @@ func (x *PayloadUserLoggedOut) String() string { func (*PayloadUserLoggedOut) ProtoMessage() {} func (x *PayloadUserLoggedOut) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[27] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2717,7 +2819,7 @@ func (x *PayloadUserLoggedOut) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserLoggedOut.ProtoReflect.Descriptor instead. func (*PayloadUserLoggedOut) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{27} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{28} } // PayloadUserAutoMergedFromNewIdP is the payload for the audit event @@ -2732,7 +2834,7 @@ type PayloadUserAutoMergedFromNewIdP struct { func (x *PayloadUserAutoMergedFromNewIdP) Reset() { *x = PayloadUserAutoMergedFromNewIdP{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2744,7 +2846,7 @@ func (x *PayloadUserAutoMergedFromNewIdP) String() string { func (*PayloadUserAutoMergedFromNewIdP) ProtoMessage() {} func (x *PayloadUserAutoMergedFromNewIdP) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[28] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2757,7 +2859,7 @@ func (x *PayloadUserAutoMergedFromNewIdP) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUserAutoMergedFromNewIdP.ProtoReflect.Descriptor instead. func (*PayloadUserAutoMergedFromNewIdP) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{28} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{29} } type PayloadCuratedPluginCreated struct { @@ -2773,7 +2875,7 @@ type PayloadCuratedPluginCreated struct { func (x *PayloadCuratedPluginCreated) Reset() { *x = PayloadCuratedPluginCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2785,7 +2887,7 @@ func (x *PayloadCuratedPluginCreated) String() string { func (*PayloadCuratedPluginCreated) ProtoMessage() {} func (x *PayloadCuratedPluginCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[29] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2798,7 +2900,7 @@ func (x *PayloadCuratedPluginCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadCuratedPluginCreated.ProtoReflect.Descriptor instead. func (*PayloadCuratedPluginCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{29} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{30} } func (x *PayloadCuratedPluginCreated) GetOwnerId() string { @@ -2828,7 +2930,7 @@ type PayloadCuratedPluginDeleted struct { func (x *PayloadCuratedPluginDeleted) Reset() { *x = PayloadCuratedPluginDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2840,7 +2942,7 @@ func (x *PayloadCuratedPluginDeleted) String() string { func (*PayloadCuratedPluginDeleted) ProtoMessage() {} func (x *PayloadCuratedPluginDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[30] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2853,7 +2955,7 @@ func (x *PayloadCuratedPluginDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadCuratedPluginDeleted.ProtoReflect.Descriptor instead. func (*PayloadCuratedPluginDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{30} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{31} } func (x *PayloadCuratedPluginDeleted) GetOwnerId() string { @@ -2883,7 +2985,7 @@ type PayloadTokenCreated struct { func (x *PayloadTokenCreated) Reset() { *x = PayloadTokenCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2895,7 +2997,7 @@ func (x *PayloadTokenCreated) String() string { func (*PayloadTokenCreated) ProtoMessage() {} func (x *PayloadTokenCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[31] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2908,7 +3010,7 @@ func (x *PayloadTokenCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTokenCreated.ProtoReflect.Descriptor instead. func (*PayloadTokenCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{31} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{32} } func (x *PayloadTokenCreated) GetOwnerId() string { @@ -2936,7 +3038,7 @@ type PayloadTokenDeleted struct { func (x *PayloadTokenDeleted) Reset() { *x = PayloadTokenDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2948,7 +3050,7 @@ func (x *PayloadTokenDeleted) String() string { func (*PayloadTokenDeleted) ProtoMessage() {} func (x *PayloadTokenDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[32] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2961,7 +3063,7 @@ func (x *PayloadTokenDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTokenDeleted.ProtoReflect.Descriptor instead. func (*PayloadTokenDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{32} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{33} } func (x *PayloadTokenDeleted) GetOwnerId() string { @@ -2982,7 +3084,7 @@ type PayloadSCIMTokenCreated struct { func (x *PayloadSCIMTokenCreated) Reset() { *x = PayloadSCIMTokenCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2994,7 +3096,7 @@ func (x *PayloadSCIMTokenCreated) String() string { func (*PayloadSCIMTokenCreated) ProtoMessage() {} func (x *PayloadSCIMTokenCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[33] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3007,7 +3109,7 @@ func (x *PayloadSCIMTokenCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSCIMTokenCreated.ProtoReflect.Descriptor instead. func (*PayloadSCIMTokenCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{33} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{34} } func (x *PayloadSCIMTokenCreated) GetTokenExpiryTime() *timestamppb.Timestamp { @@ -3025,7 +3127,7 @@ type PayloadSCIMTokenDeleted struct { func (x *PayloadSCIMTokenDeleted) Reset() { *x = PayloadSCIMTokenDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3037,7 +3139,7 @@ func (x *PayloadSCIMTokenDeleted) String() string { func (*PayloadSCIMTokenDeleted) ProtoMessage() {} func (x *PayloadSCIMTokenDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[34] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3050,7 +3152,7 @@ func (x *PayloadSCIMTokenDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSCIMTokenDeleted.ProtoReflect.Descriptor instead. func (*PayloadSCIMTokenDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{34} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{35} } type PayloadRepositoryCommitDeleted struct { @@ -3072,7 +3174,7 @@ type PayloadRepositoryCommitDeleted struct { func (x *PayloadRepositoryCommitDeleted) Reset() { *x = PayloadRepositoryCommitDeleted{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3084,7 +3186,7 @@ func (x *PayloadRepositoryCommitDeleted) String() string { func (*PayloadRepositoryCommitDeleted) ProtoMessage() {} func (x *PayloadRepositoryCommitDeleted) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[35] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3097,7 +3199,7 @@ func (x *PayloadRepositoryCommitDeleted) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryCommitDeleted.ProtoReflect.Descriptor instead. func (*PayloadRepositoryCommitDeleted) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{35} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{36} } func (x *PayloadRepositoryCommitDeleted) GetOwnerId() string { @@ -3158,7 +3260,7 @@ type PayloadRepositoryLabelCreated struct { func (x *PayloadRepositoryLabelCreated) Reset() { *x = PayloadRepositoryLabelCreated{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3170,7 +3272,7 @@ func (x *PayloadRepositoryLabelCreated) String() string { func (*PayloadRepositoryLabelCreated) ProtoMessage() {} func (x *PayloadRepositoryLabelCreated) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[36] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3183,7 +3285,7 @@ func (x *PayloadRepositoryLabelCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelCreated.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelCreated) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{36} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{37} } func (x *PayloadRepositoryLabelCreated) GetOwnerId() string { @@ -3254,7 +3356,7 @@ type PayloadRepositoryLabelMoved struct { func (x *PayloadRepositoryLabelMoved) Reset() { *x = PayloadRepositoryLabelMoved{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3266,7 +3368,7 @@ func (x *PayloadRepositoryLabelMoved) String() string { func (*PayloadRepositoryLabelMoved) ProtoMessage() {} func (x *PayloadRepositoryLabelMoved) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[37] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3279,7 +3381,7 @@ func (x *PayloadRepositoryLabelMoved) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelMoved.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelMoved) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{37} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{38} } func (x *PayloadRepositoryLabelMoved) GetOwnerId() string { @@ -3349,7 +3451,7 @@ type PayloadRepositoryLabelArchived struct { func (x *PayloadRepositoryLabelArchived) Reset() { *x = PayloadRepositoryLabelArchived{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3361,7 +3463,7 @@ func (x *PayloadRepositoryLabelArchived) String() string { func (*PayloadRepositoryLabelArchived) ProtoMessage() {} func (x *PayloadRepositoryLabelArchived) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[38] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3374,7 +3476,7 @@ func (x *PayloadRepositoryLabelArchived) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelArchived.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelArchived) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{38} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{39} } func (x *PayloadRepositoryLabelArchived) GetOwnerId() string { @@ -3422,7 +3524,7 @@ type PayloadRepositoryLabelUnarchived struct { func (x *PayloadRepositoryLabelUnarchived) Reset() { *x = PayloadRepositoryLabelUnarchived{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3434,7 +3536,7 @@ func (x *PayloadRepositoryLabelUnarchived) String() string { func (*PayloadRepositoryLabelUnarchived) ProtoMessage() {} func (x *PayloadRepositoryLabelUnarchived) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[39] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3447,7 +3549,7 @@ func (x *PayloadRepositoryLabelUnarchived) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadRepositoryLabelUnarchived.ProtoReflect.Descriptor instead. func (*PayloadRepositoryLabelUnarchived) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{39} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{40} } func (x *PayloadRepositoryLabelUnarchived) GetOwnerId() string { @@ -3491,7 +3593,7 @@ type PayloadServerBreakingChangePolicyEnabled struct { func (x *PayloadServerBreakingChangePolicyEnabled) Reset() { *x = PayloadServerBreakingChangePolicyEnabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3503,7 +3605,7 @@ func (x *PayloadServerBreakingChangePolicyEnabled) String() string { func (*PayloadServerBreakingChangePolicyEnabled) ProtoMessage() {} func (x *PayloadServerBreakingChangePolicyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3516,7 +3618,7 @@ func (x *PayloadServerBreakingChangePolicyEnabled) ProtoReflect() protoreflect.M // Deprecated: Use PayloadServerBreakingChangePolicyEnabled.ProtoReflect.Descriptor instead. func (*PayloadServerBreakingChangePolicyEnabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{40} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{41} } func (x *PayloadServerBreakingChangePolicyEnabled) GetCategory() v1alpha1.BreakingChangeCategory { @@ -3541,7 +3643,7 @@ type PayloadServerBreakingChangePolicyDisabled struct { func (x *PayloadServerBreakingChangePolicyDisabled) Reset() { *x = PayloadServerBreakingChangePolicyDisabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3553,7 +3655,7 @@ func (x *PayloadServerBreakingChangePolicyDisabled) String() string { func (*PayloadServerBreakingChangePolicyDisabled) ProtoMessage() {} func (x *PayloadServerBreakingChangePolicyDisabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3566,7 +3668,7 @@ func (x *PayloadServerBreakingChangePolicyDisabled) ProtoReflect() protoreflect. // Deprecated: Use PayloadServerBreakingChangePolicyDisabled.ProtoReflect.Descriptor instead. func (*PayloadServerBreakingChangePolicyDisabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{41} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{42} } type PayloadServerUniquenessPolicyEnabled struct { @@ -3577,7 +3679,7 @@ type PayloadServerUniquenessPolicyEnabled struct { func (x *PayloadServerUniquenessPolicyEnabled) Reset() { *x = PayloadServerUniquenessPolicyEnabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3589,7 +3691,7 @@ func (x *PayloadServerUniquenessPolicyEnabled) String() string { func (*PayloadServerUniquenessPolicyEnabled) ProtoMessage() {} func (x *PayloadServerUniquenessPolicyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[42] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3602,7 +3704,7 @@ func (x *PayloadServerUniquenessPolicyEnabled) ProtoReflect() protoreflect.Messa // Deprecated: Use PayloadServerUniquenessPolicyEnabled.ProtoReflect.Descriptor instead. func (*PayloadServerUniquenessPolicyEnabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{42} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{43} } type PayloadServerUniquenessPolicyDisabled struct { @@ -3613,7 +3715,7 @@ type PayloadServerUniquenessPolicyDisabled struct { func (x *PayloadServerUniquenessPolicyDisabled) Reset() { *x = PayloadServerUniquenessPolicyDisabled{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3625,7 +3727,7 @@ func (x *PayloadServerUniquenessPolicyDisabled) String() string { func (*PayloadServerUniquenessPolicyDisabled) ProtoMessage() {} func (x *PayloadServerUniquenessPolicyDisabled) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[43] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3638,7 +3740,7 @@ func (x *PayloadServerUniquenessPolicyDisabled) ProtoReflect() protoreflect.Mess // Deprecated: Use PayloadServerUniquenessPolicyDisabled.ProtoReflect.Descriptor instead. func (*PayloadServerUniquenessPolicyDisabled) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{43} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{44} } type PayloadDeviceAuthorizationGrantApproved struct { @@ -3652,7 +3754,7 @@ type PayloadDeviceAuthorizationGrantApproved struct { func (x *PayloadDeviceAuthorizationGrantApproved) Reset() { *x = PayloadDeviceAuthorizationGrantApproved{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3664,7 +3766,7 @@ func (x *PayloadDeviceAuthorizationGrantApproved) String() string { func (*PayloadDeviceAuthorizationGrantApproved) ProtoMessage() {} func (x *PayloadDeviceAuthorizationGrantApproved) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[44] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3677,7 +3779,7 @@ func (x *PayloadDeviceAuthorizationGrantApproved) ProtoReflect() protoreflect.Me // Deprecated: Use PayloadDeviceAuthorizationGrantApproved.ProtoReflect.Descriptor instead. func (*PayloadDeviceAuthorizationGrantApproved) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{44} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{45} } func (x *PayloadDeviceAuthorizationGrantApproved) GetClientId() string { @@ -3698,7 +3800,7 @@ type PayloadDeviceAuthorizationGrantDenied struct { func (x *PayloadDeviceAuthorizationGrantDenied) Reset() { *x = PayloadDeviceAuthorizationGrantDenied{} - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3710,7 +3812,7 @@ func (x *PayloadDeviceAuthorizationGrantDenied) String() string { func (*PayloadDeviceAuthorizationGrantDenied) ProtoMessage() {} func (x *PayloadDeviceAuthorizationGrantDenied) ProtoReflect() protoreflect.Message { - mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[45] + mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3723,7 +3825,7 @@ func (x *PayloadDeviceAuthorizationGrantDenied) ProtoReflect() protoreflect.Mess // Deprecated: Use PayloadDeviceAuthorizationGrantDenied.ProtoReflect.Descriptor instead. func (*PayloadDeviceAuthorizationGrantDenied) Descriptor() ([]byte, []int) { - return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{45} + return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{46} } func (x *PayloadDeviceAuthorizationGrantDenied) GetClientId() string { @@ -3768,7 +3870,7 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xa8, 0x29, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x91, 0x2a, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, @@ -3902,316 +4004,341 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x67, 0x0a, 0x14, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x18, + 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, 0x73, 0x68, 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, 0x73, 0x68, 0x65, 0x64, + 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, - 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x16, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, - 0x0b, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x18, 0x18, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, - 0x64, 0x49, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, - 0x64, 0x49, 0x6e, 0x12, 0x58, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, - 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0d, - 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x6d, 0x0a, - 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, + 0x67, 0x67, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x0f, - 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, - 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x48, 0x00, 0x52, 0x0c, + 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x12, 0x58, 0x0a, 0x0f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, - 0x64, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, - 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x11, 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, + 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, + 0x67, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x6d, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x0f, 0x69, 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x64, + 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x11, 0x69, + 0x64, 0x70, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, + 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x69, - 0x64, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x54, - 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, 0x69, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, 0x69, 0x6d, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x10, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, 0x73, 0x63, 0x69, - 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x63, 0x69, 0x6d, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x12, - 0x73, 0x63, 0x69, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, - 0x63, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, - 0x76, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x22, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x12, 0x73, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x23, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x73, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x16, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, + 0x6f, 0x76, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, - 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x19, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x64, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x64, 0x12, 0x6d, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x5f, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x2d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x12, 0xa5, 0x01, 0x0a, 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x28, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0xa8, 0x01, 0x0a, 0x2e, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x19, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x6d, 0x0a, 0x16, 0x63, 0x75, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0xa5, 0x01, 0x0a, 0x2d, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x26, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x48, 0x00, 0x52, 0x1e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x64, 0x12, 0x98, 0x01, 0x0a, 0x28, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, - 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x24, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x9b, 0x01, - 0x0a, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, - 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, - 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x25, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1d, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x64, 0x70, 0x18, 0x2b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, - 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, - 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x48, 0x00, 0x52, - 0x18, 0x75, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, - 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x70, 0x12, 0x92, 0x01, 0x0a, 0x23, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x20, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x8c, - 0x01, 0x0a, 0x21, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x64, 0x65, - 0x6e, 0x69, 0x65, 0x64, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, + 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x28, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0xa8, 0x01, 0x0a, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1e, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x09, 0x0a, - 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x22, 0xa9, 0x02, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, - 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, - 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x22, 0xe4, 0x03, 0x0a, 0x24, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x48, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6e, 0x65, 0x77, - 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x8c, 0x01, 0x0a, + 0x21, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1e, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x98, 0x01, 0x0a, 0x28, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, + 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, + 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, + 0x52, 0x24, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, + 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x9b, 0x01, 0x0a, 0x29, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x25, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7c, 0x0a, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, + 0x6f, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6e, 0x65, + 0x77, 0x5f, 0x69, 0x64, 0x70, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, + 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x48, 0x00, 0x52, 0x18, 0x75, 0x73, 0x65, 0x72, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, + 0x64, 0x70, 0x12, 0x92, 0x01, 0x0a, 0x23, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, + 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x20, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x18, 0x30, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, + 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, + 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xa9, 0x02, + 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, - 0x6f, 0x6c, 0x65, 0x12, 0x68, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, - 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x68, 0x0a, - 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, - 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x13, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, - 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xab, 0x02, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, - 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, - 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x78, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x7a, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe4, 0x03, 0x0a, 0x24, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, + 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x68, 0x0a, 0x16, + 0x6f, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, + 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x6e, 0x65, 0x77, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xab, 0x02, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x18, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x1d, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x61, 0x0a, 0x12, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x78, + 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x50, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x27, + 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x1d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, + 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x35, 0x5f, 0x64, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x35, 0x44, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x83, 0x02, 0x0a, 0x21, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, @@ -4220,33 +4347,186 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, - 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x62, 0x35, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x62, 0x35, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x83, 0x02, 0x0a, - 0x21, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, + 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x27, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x46, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, + 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, + 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, 0x22, + 0x85, 0x02, 0x0a, 0x23, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, + 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, + 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x56, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x4e, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, + 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x56, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xce, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x33, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x25, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, + 0x12, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x6c, 0x64, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6e, + 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x71, 0x0a, 0x14, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x71, 0x0a, 0x14, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xb0, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x75, 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x31, 0x5f, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x31, 0x44, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x22, 0x14, 0x0a, 0x12, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x75, + 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x65, + 0x77, 0x49, 0x64, 0x50, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, + 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, + 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x30, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x61, 0x0a, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, + 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x46, 0x0a, + 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x22, 0xc7, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x1d, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x9a, + 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, @@ -4255,18 +4535,16 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, - 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x46, - 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x6e, - 0x65, 0x77, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x23, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x19, + 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, + 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x1e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, @@ -4275,371 +4553,217 @@ var file_buf_alpha_audit_v1alpha1_event_proto_rawDesc = []byte{ 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xfe, - 0x01, 0x0a, 0x22, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x4e, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, - 0x4e, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, - 0xce, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6e, - 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x77, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0xbd, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x6f, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x77, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x6e, 0x65, 0x77, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x22, 0x71, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x71, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, - 0x22, 0x14, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x22, 0x16, 0x0a, - 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, - 0x65, 0x64, 0x4f, 0x75, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x46, 0x72, - 0x6f, 0x6d, 0x4e, 0x65, 0x77, 0x49, 0x64, 0x50, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x57, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x75, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x13, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x11, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, - 0x54, 0x69, 0x6d, 0x65, 0x22, 0x30, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x46, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x43, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf1, - 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x49, 0x64, 0x22, 0x9a, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x6f, 0x76, - 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, - 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x72, 0x6f, - 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, - 0xa8, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x20, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, - 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x88, 0x01, 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x22, 0x2b, 0x0a, 0x29, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x26, - 0x0a, 0x24, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, - 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, - 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, - 0x46, 0x0a, 0x27, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x2a, 0x53, 0x0a, - 0x09, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, - 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, - 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, - 0x10, 0x02, 0x2a, 0x82, 0x04, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x4f, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, + 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x73, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x88, 0x01, 0x01, + 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2b, 0x0a, + 0x29, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x72, + 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x26, 0x0a, 0x24, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, + 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x22, 0x27, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x27, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x25, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x2a, 0x53, 0x0a, 0x09, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, - 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, - 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x45, - 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, - 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, - 0x03, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x52, - 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, - 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, - 0x52, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, - 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x4f, - 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, - 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, - 0x49, 0x4e, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, - 0x18, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0b, 0x12, 0x22, 0x0a, 0x1e, 0x52, - 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x0c, 0x12, - 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x0d, 0x12, 0x2c, 0x0a, 0x28, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, - 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x47, 0x52, 0x41, 0x4e, 0x54, 0x10, 0x0e, 0x2a, 0xe6, 0x0d, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, - 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x41, 0x44, - 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, - 0x4e, 0x47, 0x45, 0x44, 0x10, 0x04, 0x12, 0x2a, 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, - 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, - 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x15, 0x12, - 0x2d, 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, + 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, 0x54, 0x4f, 0x52, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x2a, 0xa3, + 0x04, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, + 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x12, 0x28, 0x0a, + 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, + 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, + 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x53, 0x4f, 0x55, + 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x4f, 0x52, 0x59, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, + 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x10, 0x05, 0x12, + 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, + 0x49, 0x54, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x07, 0x12, 0x1f, + 0x0a, 0x1b, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x0f, 0x12, + 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, + 0x08, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, + 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, + 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x0b, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x53, 0x4f, + 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x0c, 0x12, 0x18, 0x0a, 0x14, + 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x10, 0x0d, 0x12, 0x2c, 0x0a, 0x28, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, + 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x41, + 0x4e, 0x54, 0x10, 0x0e, 0x2a, 0x8b, 0x0e, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, + 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, + 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, + 0x10, 0x03, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, + 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x2a, 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, + 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x05, 0x12, + 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, - 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x16, 0x12, 0x21, + 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x15, 0x12, 0x2d, 0x0a, 0x29, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, + 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x50, 0x5f, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x16, 0x12, 0x21, 0x0a, 0x1d, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, - 0x45, 0x44, 0x10, 0x07, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, - 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x2b, 0x0a, - 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, - 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, - 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x09, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, + 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, + 0x07, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, + 0x54, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x45, 0x44, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, - 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x2d, - 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, - 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x2c, 0x0a, - 0x28, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, - 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x34, 0x0a, 0x30, 0x45, + 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x09, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, + 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x4f, 0x4c, + 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x2d, 0x0a, 0x29, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x4c, 0x41, 0x42, - 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, - 0x28, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0d, - 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, - 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x12, - 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, - 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, - 0x47, 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1f, 0x12, 0x1b, 0x0a, - 0x17, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, - 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, - 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, - 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x12, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x45, - 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x17, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, - 0x44, 0x10, 0x18, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, - 0x45, 0x44, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, - 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1b, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, + 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, + 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x2c, 0x0a, 0x28, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, - 0x45, 0x44, 0x10, 0x1c, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, - 0x42, 0x45, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1d, 0x12, 0x25, 0x0a, - 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, - 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4d, 0x4f, 0x56, - 0x45, 0x44, 0x10, 0x1e, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, - 0x42, 0x45, 0x4c, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x26, 0x12, 0x2a, - 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x55, 0x4e, - 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x27, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, - 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, - 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x20, - 0x12, 0x35, 0x0a, 0x31, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, - 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x49, 0x53, - 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x21, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, - 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, - 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x22, 0x12, 0x2f, 0x0a, 0x2b, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, - 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, - 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x23, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, - 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, - 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x24, 0x12, 0x2c, 0x0a, 0x28, + 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x43, + 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x34, 0x0a, 0x30, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, + 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x28, 0x12, 0x1d, + 0x0a, 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, + 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x1d, 0x0a, + 0x19, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, + 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x12, 0x23, 0x0a, 0x1f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, + 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x45, 0x44, 0x10, + 0x2b, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x50, + 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1f, 0x12, + 0x1b, 0x0a, 0x17, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, + 0x45, 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, - 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x25, 0x12, 0x32, 0x0a, 0x2e, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, - 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, - 0x41, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x29, 0x12, 0x30, - 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, - 0x49, 0x43, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x2a, - 0x42, 0x82, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x41, 0xaa, 0x02, 0x18, 0x42, 0x75, 0x66, - 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x5c, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xe2, 0x02, 0x24, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x41, 0x75, 0x64, - 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, + 0x47, 0x47, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x12, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x4f, 0x47, + 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x17, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, + 0x54, 0x45, 0x44, 0x10, 0x18, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x4d, 0x5f, 0x54, 0x4f, 0x4b, + 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x1b, 0x12, 0x28, 0x0a, 0x24, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x44, 0x45, 0x4c, + 0x45, 0x54, 0x45, 0x44, 0x10, 0x1c, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, + 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1d, 0x12, + 0x25, 0x0a, 0x21, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, + 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4d, + 0x4f, 0x56, 0x45, 0x44, 0x10, 0x1e, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, + 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x26, + 0x12, 0x2a, 0x0a, 0x26, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, + 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, + 0x55, 0x4e, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x27, 0x12, 0x34, 0x0a, 0x30, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, + 0x52, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x20, 0x12, 0x35, 0x0a, 0x31, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x49, 0x4e, 0x47, + 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, + 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x21, 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, + 0x52, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, + 0x48, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x22, 0x12, 0x2f, 0x0a, 0x2b, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, + 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x23, 0x12, 0x30, 0x0a, 0x2c, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, + 0x52, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, + 0x49, 0x43, 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x24, 0x12, 0x2c, + 0x0a, 0x28, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, + 0x52, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x44, 0x5f, 0x46, 0x52, + 0x4f, 0x4d, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x25, 0x12, 0x32, 0x0a, 0x2e, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, + 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x47, 0x52, 0x41, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x29, + 0x12, 0x30, 0x0a, 0x2c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, + 0x45, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, + 0x10, 0x2a, 0x42, 0x82, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, + 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x41, 0xaa, 0x02, 0x18, 0x42, + 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x18, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x5c, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xe2, 0x02, 0x24, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x41, + 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x3a, + 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4655,7 +4779,7 @@ func file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP() []byte { } var file_buf_alpha_audit_v1alpha1_event_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_buf_alpha_audit_v1alpha1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_buf_alpha_audit_v1alpha1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_buf_alpha_audit_v1alpha1_event_proto_goTypes = []any{ (ActorType)(0), // 0: buf.alpha.audit.v1alpha1.ActorType (ResourceType)(0), // 1: buf.alpha.audit.v1alpha1.ResourceType @@ -4682,36 +4806,37 @@ var file_buf_alpha_audit_v1alpha1_event_proto_goTypes = []any{ (*PayloadRepositoryDefaultBranchChanged)(nil), // 22: buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged (*PayloadPluginCreated)(nil), // 23: buf.alpha.audit.v1alpha1.PayloadPluginCreated (*PayloadPluginDeleted)(nil), // 24: buf.alpha.audit.v1alpha1.PayloadPluginDeleted - (*PayloadUserCreated)(nil), // 25: buf.alpha.audit.v1alpha1.PayloadUserCreated - (*PayloadUserReactivated)(nil), // 26: buf.alpha.audit.v1alpha1.PayloadUserReactivated - (*PayloadUserDeactivated)(nil), // 27: buf.alpha.audit.v1alpha1.PayloadUserDeactivated - (*PayloadUserDeleted)(nil), // 28: buf.alpha.audit.v1alpha1.PayloadUserDeleted - (*PayloadUserLoggedIn)(nil), // 29: buf.alpha.audit.v1alpha1.PayloadUserLoggedIn - (*PayloadUserLoggedOut)(nil), // 30: buf.alpha.audit.v1alpha1.PayloadUserLoggedOut - (*PayloadUserAutoMergedFromNewIdP)(nil), // 31: buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP - (*PayloadCuratedPluginCreated)(nil), // 32: buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated - (*PayloadCuratedPluginDeleted)(nil), // 33: buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted - (*PayloadTokenCreated)(nil), // 34: buf.alpha.audit.v1alpha1.PayloadTokenCreated - (*PayloadTokenDeleted)(nil), // 35: buf.alpha.audit.v1alpha1.PayloadTokenDeleted - (*PayloadSCIMTokenCreated)(nil), // 36: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated - (*PayloadSCIMTokenDeleted)(nil), // 37: buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted - (*PayloadRepositoryCommitDeleted)(nil), // 38: buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted - (*PayloadRepositoryLabelCreated)(nil), // 39: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated - (*PayloadRepositoryLabelMoved)(nil), // 40: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved - (*PayloadRepositoryLabelArchived)(nil), // 41: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived - (*PayloadRepositoryLabelUnarchived)(nil), // 42: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived - (*PayloadServerBreakingChangePolicyEnabled)(nil), // 43: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled - (*PayloadServerBreakingChangePolicyDisabled)(nil), // 44: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled - (*PayloadServerUniquenessPolicyEnabled)(nil), // 45: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled - (*PayloadServerUniquenessPolicyDisabled)(nil), // 46: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled - (*PayloadDeviceAuthorizationGrantApproved)(nil), // 47: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved - (*PayloadDeviceAuthorizationGrantDenied)(nil), // 48: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied - (*timestamppb.Timestamp)(nil), // 49: google.protobuf.Timestamp - (v1alpha1.OrganizationRole)(0), // 50: buf.alpha.registry.v1alpha1.OrganizationRole - (v1alpha1.OrganizationRoleSource)(0), // 51: buf.alpha.registry.v1alpha1.OrganizationRoleSource - (v1alpha1.Visibility)(0), // 52: buf.alpha.registry.v1alpha1.Visibility - (v1alpha1.RepositoryRole)(0), // 53: buf.alpha.registry.v1alpha1.RepositoryRole - (v1alpha1.BreakingChangeCategory)(0), // 54: buf.alpha.registry.v1alpha1.BreakingChangeCategory + (*PayloadPluginCommitPushed)(nil), // 25: buf.alpha.audit.v1alpha1.PayloadPluginCommitPushed + (*PayloadUserCreated)(nil), // 26: buf.alpha.audit.v1alpha1.PayloadUserCreated + (*PayloadUserReactivated)(nil), // 27: buf.alpha.audit.v1alpha1.PayloadUserReactivated + (*PayloadUserDeactivated)(nil), // 28: buf.alpha.audit.v1alpha1.PayloadUserDeactivated + (*PayloadUserDeleted)(nil), // 29: buf.alpha.audit.v1alpha1.PayloadUserDeleted + (*PayloadUserLoggedIn)(nil), // 30: buf.alpha.audit.v1alpha1.PayloadUserLoggedIn + (*PayloadUserLoggedOut)(nil), // 31: buf.alpha.audit.v1alpha1.PayloadUserLoggedOut + (*PayloadUserAutoMergedFromNewIdP)(nil), // 32: buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP + (*PayloadCuratedPluginCreated)(nil), // 33: buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated + (*PayloadCuratedPluginDeleted)(nil), // 34: buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted + (*PayloadTokenCreated)(nil), // 35: buf.alpha.audit.v1alpha1.PayloadTokenCreated + (*PayloadTokenDeleted)(nil), // 36: buf.alpha.audit.v1alpha1.PayloadTokenDeleted + (*PayloadSCIMTokenCreated)(nil), // 37: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated + (*PayloadSCIMTokenDeleted)(nil), // 38: buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted + (*PayloadRepositoryCommitDeleted)(nil), // 39: buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted + (*PayloadRepositoryLabelCreated)(nil), // 40: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated + (*PayloadRepositoryLabelMoved)(nil), // 41: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved + (*PayloadRepositoryLabelArchived)(nil), // 42: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived + (*PayloadRepositoryLabelUnarchived)(nil), // 43: buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived + (*PayloadServerBreakingChangePolicyEnabled)(nil), // 44: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled + (*PayloadServerBreakingChangePolicyDisabled)(nil), // 45: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled + (*PayloadServerUniquenessPolicyEnabled)(nil), // 46: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled + (*PayloadServerUniquenessPolicyDisabled)(nil), // 47: buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled + (*PayloadDeviceAuthorizationGrantApproved)(nil), // 48: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved + (*PayloadDeviceAuthorizationGrantDenied)(nil), // 49: buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied + (*timestamppb.Timestamp)(nil), // 50: google.protobuf.Timestamp + (v1alpha1.OrganizationRole)(0), // 51: buf.alpha.registry.v1alpha1.OrganizationRole + (v1alpha1.OrganizationRoleSource)(0), // 52: buf.alpha.registry.v1alpha1.OrganizationRoleSource + (v1alpha1.Visibility)(0), // 53: buf.alpha.registry.v1alpha1.Visibility + (v1alpha1.RepositoryRole)(0), // 54: buf.alpha.registry.v1alpha1.RepositoryRole + (v1alpha1.BreakingChangeCategory)(0), // 55: buf.alpha.registry.v1alpha1.BreakingChangeCategory } var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 0, // 0: buf.alpha.audit.v1alpha1.Actor.type:type_name -> buf.alpha.audit.v1alpha1.ActorType @@ -4719,7 +4844,7 @@ var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 2, // 2: buf.alpha.audit.v1alpha1.Event.type:type_name -> buf.alpha.audit.v1alpha1.EventType 3, // 3: buf.alpha.audit.v1alpha1.Event.actor:type_name -> buf.alpha.audit.v1alpha1.Actor 4, // 4: buf.alpha.audit.v1alpha1.Event.resource:type_name -> buf.alpha.audit.v1alpha1.Resource - 49, // 5: buf.alpha.audit.v1alpha1.Event.event_time:type_name -> google.protobuf.Timestamp + 50, // 5: buf.alpha.audit.v1alpha1.Event.event_time:type_name -> google.protobuf.Timestamp 5, // 6: buf.alpha.audit.v1alpha1.Event.metadata:type_name -> buf.alpha.audit.v1alpha1.EventMetadata 7, // 7: buf.alpha.audit.v1alpha1.Event.organization_created:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationCreated 8, // 8: buf.alpha.audit.v1alpha1.Event.organization_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationDeleted @@ -4736,57 +4861,58 @@ var file_buf_alpha_audit_v1alpha1_event_proto_depIdxs = []int32{ 21, // 19: buf.alpha.audit.v1alpha1.Event.repository_default_label_name_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultLabelNameChanged 23, // 20: buf.alpha.audit.v1alpha1.Event.plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadPluginCreated 24, // 21: buf.alpha.audit.v1alpha1.Event.plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadPluginDeleted - 25, // 22: buf.alpha.audit.v1alpha1.Event.user_created:type_name -> buf.alpha.audit.v1alpha1.PayloadUserCreated - 27, // 23: buf.alpha.audit.v1alpha1.Event.user_deactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeactivated - 28, // 24: buf.alpha.audit.v1alpha1.Event.user_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeleted - 29, // 25: buf.alpha.audit.v1alpha1.Event.user_logged_in:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedIn - 30, // 26: buf.alpha.audit.v1alpha1.Event.user_logged_out:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedOut - 32, // 27: buf.alpha.audit.v1alpha1.Event.curated_plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated - 12, // 28: buf.alpha.audit.v1alpha1.Event.idp_group_added:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupAdded - 13, // 29: buf.alpha.audit.v1alpha1.Event.idp_group_removed:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupRemoved - 34, // 30: buf.alpha.audit.v1alpha1.Event.token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenCreated - 35, // 31: buf.alpha.audit.v1alpha1.Event.token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenDeleted - 26, // 32: buf.alpha.audit.v1alpha1.Event.user_reactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserReactivated - 36, // 33: buf.alpha.audit.v1alpha1.Event.scim_token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated - 37, // 34: buf.alpha.audit.v1alpha1.Event.scim_token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted - 38, // 35: buf.alpha.audit.v1alpha1.Event.repository_commit_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted - 39, // 36: buf.alpha.audit.v1alpha1.Event.repository_label_created:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated - 40, // 37: buf.alpha.audit.v1alpha1.Event.repository_label_moved:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved - 41, // 38: buf.alpha.audit.v1alpha1.Event.repository_label_archived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived - 42, // 39: buf.alpha.audit.v1alpha1.Event.repository_label_unarchived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived - 33, // 40: buf.alpha.audit.v1alpha1.Event.curated_plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted - 43, // 41: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled - 44, // 42: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled - 22, // 43: buf.alpha.audit.v1alpha1.Event.repository_default_branch_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged - 45, // 44: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled - 46, // 45: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled - 31, // 46: buf.alpha.audit.v1alpha1.Event.user_auto_merged_from_new_idp:type_name -> buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP - 47, // 47: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_approved:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved - 48, // 48: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_denied:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied - 50, // 49: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 51, // 50: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 50, // 51: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 50, // 52: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 51, // 53: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 51, // 54: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 50, // 55: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole - 51, // 56: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource - 52, // 57: buf.alpha.audit.v1alpha1.PayloadRepositoryCreated.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 52, // 58: buf.alpha.audit.v1alpha1.PayloadRepositoryDeleted.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 53, // 59: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorAdded.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 53, // 60: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 53, // 61: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 53, // 62: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRemoved.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole - 52, // 63: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.old_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 52, // 64: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.new_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility - 49, // 65: buf.alpha.audit.v1alpha1.PayloadTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp - 49, // 66: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp - 54, // 67: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled.category:type_name -> buf.alpha.registry.v1alpha1.BreakingChangeCategory - 68, // [68:68] is the sub-list for method output_type - 68, // [68:68] is the sub-list for method input_type - 68, // [68:68] is the sub-list for extension type_name - 68, // [68:68] is the sub-list for extension extendee - 0, // [0:68] is the sub-list for field type_name + 25, // 22: buf.alpha.audit.v1alpha1.Event.plugin_commit_pushed:type_name -> buf.alpha.audit.v1alpha1.PayloadPluginCommitPushed + 26, // 23: buf.alpha.audit.v1alpha1.Event.user_created:type_name -> buf.alpha.audit.v1alpha1.PayloadUserCreated + 28, // 24: buf.alpha.audit.v1alpha1.Event.user_deactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeactivated + 29, // 25: buf.alpha.audit.v1alpha1.Event.user_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadUserDeleted + 30, // 26: buf.alpha.audit.v1alpha1.Event.user_logged_in:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedIn + 31, // 27: buf.alpha.audit.v1alpha1.Event.user_logged_out:type_name -> buf.alpha.audit.v1alpha1.PayloadUserLoggedOut + 33, // 28: buf.alpha.audit.v1alpha1.Event.curated_plugin_created:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginCreated + 12, // 29: buf.alpha.audit.v1alpha1.Event.idp_group_added:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupAdded + 13, // 30: buf.alpha.audit.v1alpha1.Event.idp_group_removed:type_name -> buf.alpha.audit.v1alpha1.PayloadOrganizationIDPGroupRemoved + 35, // 31: buf.alpha.audit.v1alpha1.Event.token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenCreated + 36, // 32: buf.alpha.audit.v1alpha1.Event.token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadTokenDeleted + 27, // 33: buf.alpha.audit.v1alpha1.Event.user_reactivated:type_name -> buf.alpha.audit.v1alpha1.PayloadUserReactivated + 37, // 34: buf.alpha.audit.v1alpha1.Event.scim_token_created:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated + 38, // 35: buf.alpha.audit.v1alpha1.Event.scim_token_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadSCIMTokenDeleted + 39, // 36: buf.alpha.audit.v1alpha1.Event.repository_commit_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryCommitDeleted + 40, // 37: buf.alpha.audit.v1alpha1.Event.repository_label_created:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelCreated + 41, // 38: buf.alpha.audit.v1alpha1.Event.repository_label_moved:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelMoved + 42, // 39: buf.alpha.audit.v1alpha1.Event.repository_label_archived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelArchived + 43, // 40: buf.alpha.audit.v1alpha1.Event.repository_label_unarchived:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryLabelUnarchived + 34, // 41: buf.alpha.audit.v1alpha1.Event.curated_plugin_deleted:type_name -> buf.alpha.audit.v1alpha1.PayloadCuratedPluginDeleted + 44, // 42: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled + 45, // 43: buf.alpha.audit.v1alpha1.Event.payload_server_breaking_change_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyDisabled + 22, // 44: buf.alpha.audit.v1alpha1.Event.repository_default_branch_changed:type_name -> buf.alpha.audit.v1alpha1.PayloadRepositoryDefaultBranchChanged + 46, // 45: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_enabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyEnabled + 47, // 46: buf.alpha.audit.v1alpha1.Event.payload_server_uniqueness_policy_disabled:type_name -> buf.alpha.audit.v1alpha1.PayloadServerUniquenessPolicyDisabled + 32, // 47: buf.alpha.audit.v1alpha1.Event.user_auto_merged_from_new_idp:type_name -> buf.alpha.audit.v1alpha1.PayloadUserAutoMergedFromNewIdP + 48, // 48: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_approved:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantApproved + 49, // 49: buf.alpha.audit.v1alpha1.Event.device_authorization_grant_denied:type_name -> buf.alpha.audit.v1alpha1.PayloadDeviceAuthorizationGrantDenied + 51, // 50: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 52, // 51: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberAdded.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 51, // 52: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 51, // 53: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 52, // 54: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.old_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 52, // 55: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRoleChanged.new_member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 51, // 56: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole + 52, // 57: buf.alpha.audit.v1alpha1.PayloadOrganizationMemberRemoved.member_role_source:type_name -> buf.alpha.registry.v1alpha1.OrganizationRoleSource + 53, // 58: buf.alpha.audit.v1alpha1.PayloadRepositoryCreated.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 53, // 59: buf.alpha.audit.v1alpha1.PayloadRepositoryDeleted.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 54, // 60: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorAdded.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 54, // 61: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.old_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 54, // 62: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRoleChanged.new_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 54, // 63: buf.alpha.audit.v1alpha1.PayloadRepositoryContributorRemoved.contributor_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole + 53, // 64: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.old_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 53, // 65: buf.alpha.audit.v1alpha1.PayloadRepositoryVisibilityChanged.new_visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility + 50, // 66: buf.alpha.audit.v1alpha1.PayloadTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp + 50, // 67: buf.alpha.audit.v1alpha1.PayloadSCIMTokenCreated.token_expiry_time:type_name -> google.protobuf.Timestamp + 55, // 68: buf.alpha.audit.v1alpha1.PayloadServerBreakingChangePolicyEnabled.category:type_name -> buf.alpha.registry.v1alpha1.BreakingChangeCategory + 69, // [69:69] is the sub-list for method output_type + 69, // [69:69] is the sub-list for method input_type + 69, // [69:69] is the sub-list for extension type_name + 69, // [69:69] is the sub-list for extension extendee + 0, // [0:69] is the sub-list for field type_name } func init() { file_buf_alpha_audit_v1alpha1_event_proto_init() } @@ -4810,6 +4936,7 @@ func file_buf_alpha_audit_v1alpha1_event_proto_init() { (*Event_RepositoryDefaultLabelNameChanged)(nil), (*Event_PluginCreated)(nil), (*Event_PluginDeleted)(nil), + (*Event_PluginCommitPushed)(nil), (*Event_UserCreated)(nil), (*Event_UserDeactivated)(nil), (*Event_UserDeleted)(nil), @@ -4838,14 +4965,14 @@ func file_buf_alpha_audit_v1alpha1_event_proto_init() { (*Event_DeviceAuthorizationGrantApproved)(nil), (*Event_DeviceAuthorizationGrantDenied)(nil), } - file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[40].OneofWrappers = []any{} + file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[41].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buf_alpha_audit_v1alpha1_event_proto_rawDesc, NumEnums: 3, - NumMessages: 46, + NumMessages: 47, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/buf/alpha/audit/v1alpha1/event.proto b/proto/buf/alpha/audit/v1alpha1/event.proto index 23fd304fec..67df286c86 100644 --- a/proto/buf/alpha/audit/v1alpha1/event.proto +++ b/proto/buf/alpha/audit/v1alpha1/event.proto @@ -50,6 +50,7 @@ enum ResourceType { RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR = 5; RESOURCE_TYPE_REPOSITORY_COMMIT = 6; RESOURCE_TYPE_PLUGIN = 7; + RESOURCE_TYPE_PLUGIN_COMMIT = 15; RESOURCE_TYPE_CURATED_PLUGIN = 8; RESOURCE_TYPE_TOKEN = 10; RESOURCE_TYPE_SCIM_TOKEN = 11; @@ -88,6 +89,7 @@ enum EventType { EVENT_TYPE_REPOSITORY_DEFAULT_LABEL_NAME_CHANGED = 40; EVENT_TYPE_PLUGIN_CREATED = 13; EVENT_TYPE_PLUGIN_DELETED = 14; + EVENT_TYPE_PLUGIN_COMMIT_PUSHED = 43; EVENT_TYPE_CURATED_PLUGIN_CREATED = 20; EVENT_TYPE_CURATED_PLUGIN_DELETED = 31; EVENT_TYPE_USER_CREATED = 15; @@ -158,6 +160,7 @@ message Event { PayloadRepositoryDefaultLabelNameChanged repository_default_label_name_changed = 46; PayloadPluginCreated plugin_created = 19; PayloadPluginDeleted plugin_deleted = 20; + PayloadPluginCommitPushed plugin_commit_pushed = 49; PayloadUserCreated user_created = 21; PayloadUserDeactivated user_deactivated = 22; PayloadUserDeleted user_deleted = 23; @@ -375,6 +378,19 @@ message PayloadPluginDeleted { string plugin_type = 3; } +message PayloadPluginCommitPushed { + // owner_id is the id of the owner of the plugin. + string owner_id = 1; + // owner_name is the name of the owner of the plugin. + string owner_name = 2; + // plugin_id is the id of the plugin. + string plugin_id = 3; + // plugin_name is the name of the plugin. + string plugin_name = 4; + // p1_digest is the p1 digest of the pushed plugin commit. + string p1_digest = 5; +} + message PayloadUserCreated {} message PayloadUserReactivated {} From b4916b48be2d94c8f73a3e2d4e6ef6cd7ee2ed43 Mon Sep 17 00:00:00 2001 From: Nimish <85357445+nimish-ks@users.noreply.github.com> Date: Fri, 8 Nov 2024 03:04:35 +0530 Subject: [PATCH 20/34] Add build for armv7 buf binaries (#3450) --- make/buf/scripts/release.bash | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/make/buf/scripts/release.bash b/make/buf/scripts/release.bash index 0d97ae3c12..4d69635ee1 100644 --- a/make/buf/scripts/release.bash +++ b/make/buf/scripts/release.bash @@ -27,6 +27,7 @@ goarch() { x86_64) echo amd64 ;; arm64) echo arm64 ;; aarch64) echo arm64 ;; + armv7) echo arm ;; *) return 1 ;; esac } @@ -83,7 +84,7 @@ mkdir -p "${RELEASE_DIR}" cd "${RELEASE_DIR}" for os in Darwin Linux Windows; do - for arch in x86_64 arm64; do + for arch in x86_64 arm64 armv7; do # our goal is to have the binaries be suffixed with $(uname -s)-$(uname -m) # on mac, this is arm64, on linux, this is aarch64, for historical reasons # this is a hacky way to not have to rewrite this loop (and others below) @@ -100,15 +101,27 @@ for os in Darwin Linux Windows; do buf \ protoc-gen-buf-breaking \ protoc-gen-buf-lint; do - CGO_ENABLED=0 GOOS=$(goos "${os}") GOARCH=$(goarch "${arch}") \ - go build -a -ldflags "-s -w" -trimpath -buildvcs=false -o "${dir}/bin/${binary}${extension}" "${DIR}/cmd/${binary}" + if [ "${arch}" == "armv7" ]; then + if [ "${os}" == "Linux" ]; then + CGO_ENABLED=0 GOOS=$(goos "${os}") GOARCH=$(goarch "${arch}") GOARM=7 \ + go build -a -ldflags "-s -w" -trimpath -buildvcs=false -o "${dir}/bin/${binary}${extension}" "${DIR}/cmd/${binary}" + else + continue + fi + else + CGO_ENABLED=0 GOOS=$(goos "${os}") GOARCH=$(goarch "${arch}") \ + go build -a -ldflags "-s -w" -trimpath -buildvcs=false -o "${dir}/bin/${binary}${extension}" "${DIR}/cmd/${binary}" + fi cp "${dir}/bin/${binary}${extension}" "${binary}-${os}-${arch}${extension}" done done done for os in Darwin Linux Windows; do - for arch in x86_64 arm64; do + for arch in x86_64 arm64 armv7; do + if [ "${arch}" == "armv7" ] && [ "${os}" != "Linux" ]; then + continue + fi if [ "${os}" == "Linux" ] && [ "${arch}" == "arm64" ]; then arch="aarch64" fi @@ -128,7 +141,10 @@ for os in Darwin Linux Windows; do done for os in Darwin Linux; do - for arch in x86_64 arm64; do + for arch in x86_64 arm64 armv7; do + if [ "${arch}" == "armv7" ] && [ "${os}" != "Linux" ]; then + continue + fi if [ "${os}" == "Linux" ] && [ "${arch}" == "arm64" ]; then arch="aarch64" fi From 62082b23190409f8f1b65df7d949af48af7b5a0d Mon Sep 17 00:00:00 2001 From: Doria Keung Date: Fri, 8 Nov 2024 06:41:32 -0500 Subject: [PATCH 21/34] Adjust cache `ModuleDataProvider` to re-retrieve delegate values from store after putting in store (#3449) Co-authored-by: bufdev --- .../bufmodule/bufmodulecache/base_provider.go | 18 ++++++++++++++++++ .../bufmodulecache/module_data_provider.go | 2 ++ 2 files changed, 20 insertions(+) diff --git a/private/bufpkg/bufmodule/bufmodulecache/base_provider.go b/private/bufpkg/bufmodule/bufmodulecache/base_provider.go index ef956edd19..920a27b676 100644 --- a/private/bufpkg/bufmodule/bufmodulecache/base_provider.go +++ b/private/bufpkg/bufmodule/bufmodulecache/base_provider.go @@ -80,6 +80,24 @@ func (p *baseProvider[K, V]) getValuesForKeys(ctx context.Context, keys []K) ([] ); err != nil { return nil, err } + // We are getting the values again so that we retrieve the values from the cache directly. + // This matters for ie ModuleDatas where the storage.Bucket attached will have local paths + // instead of empty local paths if read from the cache. We documment NewModuleDataProvider + // to return a ModuleDataProvider that will always have local paths for returned storage.Buckets, + // if the cache is an on-disk cache. + var delegateNotFoundKeys []K + delegateValues, delegateNotFoundKeys, err = p.storeGetValuesForKeys(ctx, notFoundKeys) + if err != nil { + return nil, err + } + // We need to ensure that all the delegate values can be retrieved from the store. If there + // are unfound keys, we return an error. + if len(delegateNotFoundKeys) > 0 { + return nil, syserror.Newf( + "delegate keys %v not found in the store after putting in the store", + delegateNotFoundKeys, + ) + } p.keysRetrieved.Add(int64(len(keys))) p.keysHit.Add(int64(len(foundValues))) diff --git a/private/bufpkg/bufmodule/bufmodulecache/module_data_provider.go b/private/bufpkg/bufmodule/bufmodulecache/module_data_provider.go index 1cbd006568..098c3d5e1c 100644 --- a/private/bufpkg/bufmodule/bufmodulecache/module_data_provider.go +++ b/private/bufpkg/bufmodule/bufmodulecache/module_data_provider.go @@ -26,6 +26,8 @@ import ( // NewModuleDataProvider returns a new ModuleDataProvider that caches the results of the delegate. // // The ModuleDataStore is used as a cache. +// +// All files in returned [storage.Bucket]s will have local paths if the cache is on-disk. func NewModuleDataProvider( logger *slog.Logger, delegate bufmodule.ModuleDataProvider, From 4343d4358d4bd11d96fb41de36ed46e59955ebee Mon Sep 17 00:00:00 2001 From: Jeff Smick Date: Mon, 11 Nov 2024 09:11:40 -0800 Subject: [PATCH 22/34] Do not format a file that contains an error in the LSP (#3447) Co-authored-by: Doria Keung --- private/buf/buflsp/server.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/private/buf/buflsp/server.go b/private/buf/buflsp/server.go index 82a34e9cdd..c52d2f85ad 100644 --- a/private/buf/buflsp/server.go +++ b/private/buf/buflsp/server.go @@ -208,6 +208,18 @@ func (s *server) Formatting( return nil, fmt.Errorf("received update for file that was not open: %q", params.TextDocument.URI) } + // We check the diagnostics on the file, if there are any build errors, we do not want + // to format an invalid AST, so we skip formatting and return an error for logging. + errorCount := 0 + for _, diagnostic := range file.diagnostics { + if diagnostic.Severity == protocol.DiagnosticSeverityError { + errorCount += 1 + } + } + if errorCount > 0 { + return nil, fmt.Errorf("cannot format file %q, %v error(s) found.", file.uri.Filename(), errorCount) + } + // Currently we have no way to honor any of the parameters. _ = params if file.fileNode == nil { From dae748f54d9dbe238e6bb99d94e6b179881538e5 Mon Sep 17 00:00:00 2001 From: "buf-release-bot[bot]" <116301919+buf-release-bot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:55:02 -0500 Subject: [PATCH 23/34] Make upgrade (#3463) Co-authored-by: github-actions[bot] Co-authored-by: Doria Keung --- go.mod | 39 +++++++++++++++--------------- go.sum | 76 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 60 insertions(+), 55 deletions(-) diff --git a/go.mod b/go.mod index 13139b8955..a4c305f6da 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bufbuild/buf -go 1.22.0 +go 1.22.7 toolchain go1.23.2 @@ -20,7 +20,7 @@ require ( github.com/docker/docker v27.3.1+incompatible github.com/go-chi/chi/v5 v5.1.0 github.com/gofrs/flock v0.12.1 - github.com/google/cel-go v0.21.0 + github.com/google/cel-go v0.22.0 github.com/google/go-cmp v0.6.0 github.com/google/go-containerregistry v0.20.2 github.com/google/uuid v1.6.0 @@ -40,13 +40,13 @@ require ( go.lsp.dev/protocol v0.12.0 go.uber.org/zap v1.27.0 go.uber.org/zap/exp v0.3.0 - golang.org/x/crypto v0.28.0 - golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c - golang.org/x/mod v0.21.0 - golang.org/x/net v0.30.0 - golang.org/x/sync v0.8.0 - golang.org/x/term v0.25.0 - golang.org/x/tools v0.26.0 + golang.org/x/crypto v0.29.0 + golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f + golang.org/x/mod v0.22.0 + golang.org/x/net v0.31.0 + golang.org/x/sync v0.9.0 + golang.org/x/term v0.26.0 + golang.org/x/tools v0.27.0 google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v3 v3.0.1 pluginrpc.com/pluginrpc v0.5.0 @@ -54,6 +54,7 @@ require ( require ( buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 // indirect + cel.dev/expr v0.18.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.12.9 // indirect @@ -67,7 +68,7 @@ require ( github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/containerd/ttrpc v1.2.6 // indirect - github.com/containerd/typeurl/v2 v2.2.1 // indirect + github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect @@ -113,15 +114,15 @@ require ( go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect go.lsp.dev/uri v0.3.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.31.0 // indirect - go.opentelemetry.io/otel/trace v1.31.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect - google.golang.org/grpc v1.67.1 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.20.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.68.0 // indirect ) diff --git a/go.sum b/go.sum index a6953618f7..4883d9bb7f 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ buf.build/go/protoyaml v0.2.0 h1:2g3OHjtLDqXBREIOjpZGHmQ+U/4mkN1YiQjxNB68Ip8= buf.build/go/protoyaml v0.2.0/go.mod h1:L/9QvTDkTWcDTzAL6HMfN+mYC6CmZRm2KnsUA054iL0= buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk= connectrpc.com/connect v1.17.0/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= @@ -68,8 +70,8 @@ github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4= github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= -github.com/containerd/typeurl/v2 v2.2.1 h1:/X1Kgcz4sKS/NTKQvvRS0pEVpUYqmPTwGQontm9pl0w= -github.com/containerd/typeurl/v2 v2.2.1/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= +github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40= +github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -133,8 +135,10 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/cel-go v0.21.0 h1:cl6uW/gxN+Hy50tNYvI691+sXxioCnstFzLp2WO4GCI= -github.com/google/cel-go v0.21.0/go.mod h1:rHUlWCcBKgyEk+eV03RPdZUekPp6YcJwV0FxuUksYxc= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= +github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -270,22 +274,22 @@ go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -301,18 +305,18 @@ go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= -golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -322,16 +326,16 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -342,14 +346,14 @@ golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -360,8 +364,8 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -371,17 +375,17 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= 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.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 10ddcf58041616d64effd67a3bdf0549d25a3e54 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:54:54 -0500 Subject: [PATCH 24/34] Add bufplugin package (#3431) This adds a new package bufplugin which implements types and functions for operating on Buf plugins. --- private/buf/bufcli/errors.go | 14 +- private/buf/bufctl/controller.go | 31 +-- private/buf/buffetch/internal/internal.go | 5 +- private/buf/buffetch/internal/module_ref.go | 10 +- private/buf/buffetch/internal/reader.go | 3 +- private/buf/buffetch/ref_parser.go | 4 +- private/buf/buffetch/ref_parser_test.go | 6 +- private/buf/buflsp/file.go | 2 +- private/buf/buflsp/symbol.go | 2 +- private/buf/bufmigrate/migrate_builder.go | 15 +- private/buf/bufmigrate/migrator.go | 37 +-- private/buf/bufprint/bufprint.go | 12 +- private/buf/bufworkspace/malformed_dep.go | 29 +-- private/buf/bufworkspace/workspace.go | 13 +- .../buf/bufworkspace/workspace_dep_manager.go | 9 +- .../buf/bufworkspace/workspace_provider.go | 17 +- .../buf/bufworkspace/workspace_targeting.go | 13 +- private/buf/bufworkspace/workspace_test.go | 4 +- .../command/config/configinit/configinit.go | 6 +- .../config/configlsmodules/configlsmodules.go | 4 +- .../cmd/buf/command/dep/depgraph/depgraph.go | 14 +- .../cmd/buf/command/dep/internal/internal.go | 17 +- .../buf/cmd/buf/command/lsfiles/lsfiles.go | 2 +- .../cmd/buf/command/mod/modopen/modopen.go | 2 +- .../commit/commitaddlabel/commitaddlabel.go | 14 +- .../registry/commit/commitinfo/commitinfo.go | 10 +- .../registry/commit/commitlist/commitlist.go | 30 +-- .../commit/commitresolve/commitresolve.go | 14 +- .../label/labelarchive/labelarchive.go | 6 +- .../registry/label/labelinfo/labelinfo.go | 6 +- .../registry/label/labellist/labellist.go | 8 +- .../label/labelunarchive/labelunarchive.go | 6 +- .../module/modulecreate/modulecreate.go | 4 +- .../module/moduledelete/moduledelete.go | 4 +- .../module/moduledeprecate/moduledeprecate.go | 4 +- .../registry/module/moduleinfo/moduleinfo.go | 4 +- .../moduleundeprecate/moduleundeprecate.go | 4 +- .../module/moduleupdate/moduleupdate.go | 4 +- .../command/registry/sdk/version/version.go | 14 +- private/buf/cmd/buf/imports_test.go | 9 +- private/buf/cmd/internal/internal.go | 2 +- private/bufpkg/bufcas/digest.go | 57 ++--- private/bufpkg/bufcas/digest_test.go | 3 +- private/bufpkg/bufcas/file_node.go | 31 +-- private/bufpkg/bufcas/manifest.go | 37 +-- private/bufpkg/bufcas/manifest_test.go | 3 +- .../internal/bufcheckserverutil/input_file.go | 4 +- private/bufpkg/bufconfig/buf_lock_file.go | 31 +-- private/bufpkg/bufconfig/buf_yaml_file.go | 48 ++-- .../bufconfig/generate_managed_config.go | 60 ++--- private/bufpkg/bufconfig/module_config.go | 16 +- private/bufpkg/bufimage/bufimage.go | 21 +- .../bufimagemodify/bufimagemodify_test.go | 37 +-- .../bufimage/bufimagemodify/field_option.go | 4 +- .../bufimage/bufimagemodify/override.go | 10 +- .../bufimagetesting/bufimagetesting.go | 6 +- .../bufimage/bufimageutil/bufimageutil.go | 2 +- private/bufpkg/bufimage/build_image.go | 2 +- private/bufpkg/bufimage/image.go | 2 +- private/bufpkg/bufimage/image_file.go | 10 +- .../bufpkg/bufimage/module_image_file_info.go | 5 +- .../bufimage/parser_accessor_handler.go | 43 ++-- private/bufpkg/bufimage/util.go | 6 +- private/bufpkg/bufimage/util_test.go | 6 +- .../well_known_type_image_file_info.go | 4 +- private/bufpkg/bufmodule/added_module.go | 36 +-- private/bufpkg/bufmodule/bufmodule_test.go | 17 +- .../bufmodule/bufmoduleapi/commit_provider.go | 2 +- .../bufpkg/bufmodule/bufmoduleapi/convert.go | 17 +- .../bufmoduleapi/module_data_provider.go | 9 +- .../module_key_for_universal_proto_commit.go | 9 +- .../bufmoduleapi/module_key_provider.go | 13 +- .../bufpkg/bufmodule/bufmoduleapi/registry.go | 17 +- .../bufmoduleapi/universal_proto_commit.go | 3 +- .../bufpkg/bufmodule/bufmoduleapi/uploader.go | 34 +-- .../bufmodulecache/bufmodulecache_test.go | 21 +- .../bufmodule/bufmodulestore/commit_store.go | 7 +- .../bufmodulestore/module_data_store.go | 17 +- .../bufmodulestore/module_data_store_test.go | 13 +- .../bufpkg/bufmodule/bufmodulestore/util.go | 2 +- .../bufmoduletesting/bufmoduletesting.go | 25 +- private/bufpkg/bufmodule/commit.go | 6 +- private/bufpkg/bufmodule/digest.go | 48 ++-- private/bufpkg/bufmodule/errors.go | 66 +----- private/bufpkg/bufmodule/file_info.go | 2 +- private/bufpkg/bufmodule/file_type.go | 13 +- private/bufpkg/bufmodule/graph_provider.go | 2 +- private/bufpkg/bufmodule/module.go | 31 +-- private/bufpkg/bufmodule/module_data.go | 4 +- .../bufpkg/bufmodule/module_data_provider.go | 2 +- private/bufpkg/bufmodule/module_full_name.go | 183 --------------- private/bufpkg/bufmodule/module_key.go | 19 +- .../bufpkg/bufmodule/module_key_provider.go | 6 +- private/bufpkg/bufmodule/module_ref.go | 101 --------- private/bufpkg/bufmodule/module_set.go | 13 +- .../bufpkg/bufmodule/module_set_builder.go | 21 +- .../bufpkg/bufmodule/registry_commit_id.go | 2 +- private/bufpkg/bufmodule/remote_dep.go | 24 +- private/bufpkg/bufparse/bufparse.go | 15 ++ .../parse_error.go => bufparse/errors.go} | 32 ++- private/bufpkg/bufparse/full_name.go | 185 +++++++++++++++ .../bufpkg/{bufmodule => bufparse}/parse.go | 48 ++-- private/bufpkg/bufparse/ref.go | 103 +++++++++ private/bufpkg/bufparse/usage.gen.go | 19 ++ private/bufpkg/bufplugin/bufplugin.go | 15 ++ private/bufpkg/bufplugin/commit.go | 72 ++++++ private/bufpkg/bufplugin/digest.go | 214 ++++++++++++++++++ private/bufpkg/bufplugin/errors.go | 70 ++++++ private/bufpkg/bufplugin/plugin_data.go | 121 ++++++++++ .../bufpkg/bufplugin/plugin_data_provider.go | 57 +++++ private/bufpkg/bufplugin/plugin_key.go | 117 ++++++++++ .../bufpkg/bufplugin/plugin_key_provider.go | 54 +++++ private/bufpkg/bufplugin/usage.gen.go | 19 ++ .../bufpkg/bufprotosource/bufprotosource.go | 10 +- 114 files changed, 1794 insertions(+), 1004 deletions(-) delete mode 100644 private/bufpkg/bufmodule/module_full_name.go delete mode 100644 private/bufpkg/bufmodule/module_ref.go create mode 100644 private/bufpkg/bufparse/bufparse.go rename private/bufpkg/{bufcas/parse_error.go => bufparse/errors.go} (76%) create mode 100644 private/bufpkg/bufparse/full_name.go rename private/bufpkg/{bufmodule => bufparse}/parse.go (54%) create mode 100644 private/bufpkg/bufparse/ref.go create mode 100644 private/bufpkg/bufparse/usage.gen.go create mode 100644 private/bufpkg/bufplugin/bufplugin.go create mode 100644 private/bufpkg/bufplugin/commit.go create mode 100644 private/bufpkg/bufplugin/digest.go create mode 100644 private/bufpkg/bufplugin/errors.go create mode 100644 private/bufpkg/bufplugin/plugin_data.go create mode 100644 private/bufpkg/bufplugin/plugin_data_provider.go create mode 100644 private/bufpkg/bufplugin/plugin_key.go create mode 100644 private/bufpkg/bufplugin/plugin_key_provider.go create mode 100644 private/bufpkg/bufplugin/usage.gen.go diff --git a/private/buf/bufcli/errors.go b/private/buf/bufcli/errors.go index 7d57f4863a..0e0de9344d 100644 --- a/private/buf/bufcli/errors.go +++ b/private/buf/bufcli/errors.go @@ -19,7 +19,7 @@ import ( "fmt" "connectrpc.com/connect" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" ) var ( @@ -72,14 +72,14 @@ func NewModuleNotFoundError(name string) error { return fmt.Errorf(`a module named %q does not exist, use "buf registry module create" to create one`, name) } -// NewModuleRefNotFoundError informs the user that a ModuleRef does not exist. -func NewModuleRefNotFoundError(moduleRef bufmodule.ModuleRef) error { - return fmt.Errorf("%q does not exist", moduleRef) +// NewRefNotFoundError informs the user that a Ref does not exist. +func NewRefNotFoundError(ref bufparse.Ref) error { + return fmt.Errorf("%q does not exist", ref) } -// NewLabelNotFoundError informs the user that a ModuleRef does not exist as a label. -func NewLabelNotFoundError(moduleRef bufmodule.ModuleRef) error { - return fmt.Errorf("label %q does not exist", moduleRef) +// NewLabelNotFoundError informs the user that a Ref does not exist as a label. +func NewLabelNotFoundError(ref bufparse.Ref) error { + return fmt.Errorf("label %q does not exist", ref) } // NewTokenNotFoundError informs the user that a token with diff --git a/private/buf/bufctl/controller.go b/private/buf/bufctl/controller.go index f680f99d21..e22b501de1 100644 --- a/private/buf/bufctl/controller.go +++ b/private/buf/bufctl/controller.go @@ -33,6 +33,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage" "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufreflect" "github.com/bufbuild/buf/private/gen/data/datawkt" imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" @@ -1085,15 +1086,15 @@ func (c *controller) warnUnconfiguredTransitiveImports( if slicesext.Count(workspace.Modules(), bufmodule.Module.IsLocal) == 0 { return nil } - // Construct a struct map of all the ModuleFullName strings of the configured buf.yaml + // Construct a struct map of all the FullName strings of the configured buf.yaml // Module dependencies, and the local Modules. These are considered OK to depend on // for non-imports in the Image. - configuredModuleFullNameStrings, err := slicesext.MapError( + configuredFullNameStrings, err := slicesext.MapError( workspace.ConfiguredDepModuleRefs(), - func(moduleRef bufmodule.ModuleRef) (string, error) { - moduleFullName := moduleRef.ModuleFullName() + func(moduleRef bufparse.Ref) (string, error) { + moduleFullName := moduleRef.FullName() if moduleFullName == nil { - return "", syserror.New("ModuleFullName nil on ModuleRef") + return "", syserror.New("FullName nil on ModuleRef") } return moduleFullName.String(), nil }, @@ -1101,23 +1102,23 @@ func (c *controller) warnUnconfiguredTransitiveImports( if err != nil { return err } - configuredModuleFullNameStringMap := slicesext.ToStructMap(configuredModuleFullNameStrings) + configuredFullNameStringMap := slicesext.ToStructMap(configuredFullNameStrings) for _, localModule := range bufmodule.ModuleSetLocalModules(workspace) { - if moduleFullName := localModule.ModuleFullName(); moduleFullName != nil { - configuredModuleFullNameStringMap[moduleFullName.String()] = struct{}{} + if moduleFullName := localModule.FullName(); moduleFullName != nil { + configuredFullNameStringMap[moduleFullName.String()] = struct{}{} } } - // Construct a map from Image file path -> ModuleFullName string. + // Construct a map from Image file path -> FullName string. // - // If a given file in the Image did not have a ModuleFullName, it came from a local unnamed Module + // If a given file in the Image did not have a FullName, it came from a local unnamed Module // in the Workspace, and we're safe to ignore it with respect to calculating the undeclared // transitive imports. - pathToModuleFullNameString := make(map[string]string) + pathToFullNameString := make(map[string]string) for _, imageFile := range image.Files() { // If nil, this came from a local unnamed Module in the Workspace, and we're safe to ignore. - if moduleFullName := imageFile.ModuleFullName(); moduleFullName != nil { - pathToModuleFullNameString[imageFile.Path()] = moduleFullName.String() + if moduleFullName := imageFile.FullName(); moduleFullName != nil { + pathToFullNameString[imageFile.Path()] = moduleFullName.String() } } @@ -1127,12 +1128,12 @@ func (c *controller) warnUnconfiguredTransitiveImports( continue } for _, importPath := range imageFile.FileDescriptorProto().GetDependency() { - moduleFullNameString, ok := pathToModuleFullNameString[importPath] + moduleFullNameString, ok := pathToFullNameString[importPath] if !ok { // The import was from a local unnamed Module in the Workspace. continue } - if _, ok := configuredModuleFullNameStringMap[moduleFullNameString]; !ok { + if _, ok := configuredFullNameStringMap[moduleFullNameString]; !ok { c.logger.Warn(fmt.Sprintf( `File %q imports %q, which is not in your workspace or in the dependencies declared in your buf.yaml, but is found in transitive dependency %q. Declare %q in the deps key in your buf.yaml.`, diff --git a/private/buf/buffetch/internal/internal.go b/private/buf/buffetch/internal/internal.go index 3bd250ea9b..64e6bd0423 100644 --- a/private/buf/buffetch/internal/internal.go +++ b/private/buf/buffetch/internal/internal.go @@ -25,6 +25,7 @@ import ( "github.com/bufbuild/buf/private/buf/buftarget" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/httpauth" @@ -223,7 +224,7 @@ func NewGitRef( // ModuleRef is a module reference. type ModuleRef interface { Ref - ModuleRef() bufmodule.ModuleRef + ModuleRef() bufparse.Ref moduleRef() } @@ -375,7 +376,7 @@ type ParsedModuleRef interface { // This should only be used for testing. func NewDirectParsedModuleRef( format string, - moduleRef bufmodule.ModuleRef, + moduleRef bufparse.Ref, ) ParsedModuleRef { return newDirectModuleRef( format, diff --git a/private/buf/buffetch/internal/module_ref.go b/private/buf/buffetch/internal/module_ref.go index 9eb21e074d..eba42fb22d 100644 --- a/private/buf/buffetch/internal/module_ref.go +++ b/private/buf/buffetch/internal/module_ref.go @@ -17,7 +17,7 @@ package internal import ( "strings" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app" ) @@ -27,7 +27,7 @@ var ( type moduleRef struct { format string - iModuleRef bufmodule.ModuleRef + iModuleRef bufparse.Ref } func newModuleRef( @@ -46,7 +46,7 @@ func newModuleRef( if strings.Contains(path, "://") { return nil, NewInvalidPathError(format, path) } - moduleRef, err := bufmodule.ParseModuleRef(path) + moduleRef, err := bufparse.ParseRef(path) if err != nil { // TODO: this is dumb return nil, NewInvalidPathError(format, path) @@ -54,7 +54,7 @@ func newModuleRef( return newDirectModuleRef(format, moduleRef), nil } -func newDirectModuleRef(format string, iModuleRef bufmodule.ModuleRef) *moduleRef { +func newDirectModuleRef(format string, iModuleRef bufparse.Ref) *moduleRef { return &moduleRef{ format: format, iModuleRef: iModuleRef, @@ -65,7 +65,7 @@ func (r *moduleRef) Format() string { return r.format } -func (r *moduleRef) ModuleRef() bufmodule.ModuleRef { +func (r *moduleRef) ModuleRef() bufparse.Ref { return r.iModuleRef } diff --git a/private/buf/buffetch/internal/reader.go b/private/buf/buffetch/internal/reader.go index 25cacd467f..e5a4aa7f5b 100644 --- a/private/buf/buffetch/internal/reader.go +++ b/private/buf/buffetch/internal/reader.go @@ -28,6 +28,7 @@ import ( "github.com/bufbuild/buf/private/buf/buftarget" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/httpauth" @@ -397,7 +398,7 @@ func (r *reader) getModuleKey( } moduleKeys, err := r.moduleKeyProvider.GetModuleKeysForModuleRefs( ctx, - []bufmodule.ModuleRef{moduleRef.ModuleRef()}, + []bufparse.Ref{moduleRef.ModuleRef()}, bufmodule.DigestTypeB5, ) if err != nil { diff --git a/private/buf/buffetch/ref_parser.go b/private/buf/buffetch/ref_parser.go index d43f700aa0..9969d99837 100644 --- a/private/buf/buffetch/ref_parser.go +++ b/private/buf/buffetch/ref_parser.go @@ -25,7 +25,7 @@ import ( "github.com/bufbuild/buf/private/buf/buffetch/internal" "github.com/bufbuild/buf/private/bufpkg/bufconfig" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/syserror" ) @@ -837,7 +837,7 @@ func assumeModuleOrDir(path string) (string, error) { if path == "" { return "", errors.New("assumeModuleOrDir: no path given") } - if _, err := bufmodule.ParseModuleRef(path); err == nil { + if _, err := bufparse.ParseRef(path); err == nil { // this is possible to be a module, check if it is a directory though // OK to use os.Stat instead of os.Lstat here fileInfo, err := os.Stat(path) diff --git a/private/buf/buffetch/ref_parser_test.go b/private/buf/buffetch/ref_parser_test.go index 4072adb03f..0e552f2061 100644 --- a/private/buf/buffetch/ref_parser_test.go +++ b/private/buf/buffetch/ref_parser_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/bufbuild/buf/private/buf/buffetch/internal" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app" "github.com/bufbuild/buf/private/pkg/git" "github.com/bufbuild/buf/private/pkg/normalpath" @@ -1442,8 +1442,8 @@ func testNewModuleRef( owner string, name string, ref string, -) bufmodule.ModuleRef { - moduleRef, err := bufmodule.NewModuleRef(registry, owner, name, ref) +) bufparse.Ref { + moduleRef, err := bufparse.NewRef(registry, owner, name, ref) require.NoError(t, err) return moduleRef } diff --git a/private/buf/buflsp/file.go b/private/buf/buflsp/file.go index d206fce849..bbd8d9188a 100644 --- a/private/buf/buflsp/file.go +++ b/private/buf/buflsp/file.go @@ -575,7 +575,7 @@ func (f *file) RunLints(ctx context.Context) bool { return false } - f.lsp.logger.Debug(fmt.Sprintf("running lint for %q in %v", f.uri, module.ModuleFullName())) + f.lsp.logger.Debug(fmt.Sprintf("running lint for %q in %v", f.uri, module.FullName())) lintConfig := workspace.GetLintConfigForOpaqueID(module.OpaqueID()) err := f.lsp.checkClient.Lint( diff --git a/private/buf/buflsp/symbol.go b/private/buf/buflsp/symbol.go index 1d73107849..451f2e43fc 100644 --- a/private/buf/buflsp/symbol.go +++ b/private/buf/buflsp/symbol.go @@ -471,7 +471,7 @@ func (s *symbol) FormatDocs(ctx context.Context) string { if def.file.IsWKT() { bsrHost = "buf.build/protocolbuffers/wellknowntypes" } else if fileInfo, ok := def.file.objectInfo.(bufmodule.FileInfo); ok { - bsrHost = fileInfo.Module().ModuleFullName().String() + bsrHost = fileInfo.Module().FullName().String() } if hasAnchor { bsrTooltip = pkg + "." + strings.Join(path, ".") diff --git a/private/buf/bufmigrate/migrate_builder.go b/private/buf/bufmigrate/migrate_builder.go index c321e91aeb..f668db5da8 100644 --- a/private/buf/bufmigrate/migrate_builder.go +++ b/private/buf/bufmigrate/migrate_builder.go @@ -23,6 +23,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -42,7 +43,7 @@ type migrateBuilder struct { addedModuleDirPaths map[string]struct{} moduleConfigs []bufconfig.ModuleConfig - configuredDepModuleRefs []bufmodule.ModuleRef + configuredDepModuleRefs []bufparse.Ref hasSeenBufLockFile bool depModuleKeys []bufmodule.ModuleKey pathToMigratedBufGenYAMLFile map[string]bufconfig.BufGenYAMLFile @@ -239,7 +240,7 @@ func (m *migrateBuilder) addModule(ctx context.Context, moduleDirPath string) (r return syserror.Newf("expect exactly 1 module config from buf yaml, got %d", len(bufYAMLFile.ModuleConfigs())) } moduleConfig := bufYAMLFile.ModuleConfigs()[0] - moduleFullName := moduleConfig.ModuleFullName() + moduleFullName := moduleConfig.FullName() // If a buf.yaml v1beta1 has a non-empty name and multiple roots, the // resulting buf.yaml v2 should have these roots as module directories, // but they should not share the same module name. Instead we just give @@ -309,7 +310,7 @@ func (m *migrateBuilder) addModule(ctx context.Context, moduleDirPath string) (r } moduleConfig, err = bufconfig.NewModuleConfig( moduleRootRelativeToDestination, - moduleConfig.ModuleFullName(), + moduleConfig.FullName(), // We do not need to handle paths in rootToIncludes, rootToExcludes, lint or breaking config specially, // because the paths are transformed correctly by readBufYAMLFile and writeBufYAMLFile. moduleConfig.RootToIncludes(), @@ -382,12 +383,12 @@ func (m *migrateBuilder) addModule(ctx context.Context, moduleDirPath string) (r func (m *migrateBuilder) appendModuleConfig(moduleConfig bufconfig.ModuleConfig, parentPath string) error { m.moduleConfigs = append(m.moduleConfigs, moduleConfig) - if moduleConfig.ModuleFullName() == nil { + if moduleConfig.FullName() == nil { return nil } - if file, ok := m.moduleFullNameStringToParentPath[moduleConfig.ModuleFullName().String()]; ok { - return fmt.Errorf("module %s is found in both %s and %s", moduleConfig.ModuleFullName(), file, parentPath) + if file, ok := m.moduleFullNameStringToParentPath[moduleConfig.FullName().String()]; ok { + return fmt.Errorf("module %s is found in both %s and %s", moduleConfig.FullName(), file, parentPath) } - m.moduleFullNameStringToParentPath[moduleConfig.ModuleFullName().String()] = parentPath + m.moduleFullNameStringToParentPath[moduleConfig.FullName().String()] = parentPath return nil } diff --git a/private/buf/bufmigrate/migrator.go b/private/buf/bufmigrate/migrator.go index 79f2a83675..f36f21f37c 100644 --- a/private/buf/bufmigrate/migrator.go +++ b/private/buf/bufmigrate/migrator.go @@ -28,6 +28,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufcheck" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -318,9 +319,9 @@ func (m *migrator) buildBufYAMLAndBufLockFiles( migrateBuilder *migrateBuilder, ) (bufconfig.BufYAMLFile, bufconfig.BufLockFile, error) { // module full name --> the list of declared dependencies that are this module. - depModuleToDeclaredRefs := make(map[string][]bufmodule.ModuleRef) + depModuleToDeclaredRefs := make(map[string][]bufparse.Ref) for _, declaredRef := range migrateBuilder.configuredDepModuleRefs { - moduleFullName := declaredRef.ModuleFullName().String() + moduleFullName := declaredRef.FullName().String() // If a declared dependency also shows up in the workspace, it's not a dependency. if _, ok := migrateBuilder.moduleFullNameStringToParentPath[moduleFullName]; ok { continue @@ -330,7 +331,7 @@ func (m *migrator) buildBufYAMLAndBufLockFiles( // module full name --> the list of lock entries that are this module. depModuleToLockEntries := make(map[string][]bufmodule.ModuleKey) for _, lockEntry := range migrateBuilder.depModuleKeys { - moduleFullName := lockEntry.ModuleFullName().String() + moduleFullName := lockEntry.FullName().String() // If a declared dependency also shows up in the workspace, it's not a dependency. // // We are only removing lock entries that are in the workspace. A lock entry @@ -343,7 +344,7 @@ func (m *migrator) buildBufYAMLAndBufLockFiles( // This will be set to false if the duplicate dependencies cannot be resolved locally. areDependenciesResolved := true for depModule, declaredRefs := range depModuleToDeclaredRefs { - refStringToRef := make(map[string]bufmodule.ModuleRef) + refStringToRef := make(map[string]bufparse.Ref) for _, ref := range declaredRefs { // Add ref even if ref.Ref() is empty. Therefore, slicesext.ToValuesMap is not used. refStringToRef[ref.Ref()] = ref @@ -371,7 +372,7 @@ func (m *migrator) buildBufYAMLAndBufLockFiles( } } if areDependenciesResolved { - resolvedDeclaredRefs := make([]bufmodule.ModuleRef, 0, len(depModuleToDeclaredRefs)) + resolvedDeclaredRefs := make([]bufparse.Ref, 0, len(depModuleToDeclaredRefs)) for _, depModuleRefs := range depModuleToDeclaredRefs { // depModuleRefs is guaranteed to have length 1, because areDependenciesResolved is true. resolvedDeclaredRefs = append(resolvedDeclaredRefs, depModuleRefs...) @@ -453,7 +454,7 @@ func (m *migrator) buildBufYAMLAndBufLockFiles( func (m *migrator) getModuleToRefToCommit( ctx context.Context, - moduleRefs []bufmodule.ModuleRef, + moduleRefs []bufparse.Ref, ) (map[string]map[string]bufmodule.Commit, error) { // The module refs that are collected by migrateBuilder is across all modules being // migrated, so there may be duplicates. ModuleKeyProvider errors on duplicate module @@ -461,7 +462,7 @@ func (m *migrator) getModuleToRefToCommit( // so we deduplicate the module refs we are passing here. moduleRefs = slicesext.DeduplicateAny( moduleRefs, - func(moduleRef bufmodule.ModuleRef) string { return moduleRef.String() }, + func(moduleRef bufparse.Ref) string { return moduleRef.String() }, ) moduleKeys, err := m.moduleKeyProvider.GetModuleKeysForModuleRefs(ctx, moduleRefs, bufmodule.DigestTypeB5) if err != nil { @@ -480,7 +481,7 @@ func (m *migrator) getModuleToRefToCommit( // of GetModuleKeysForModuleRefs and GetCommitsForModuleKeys. commit := commits[i] - moduleFullName := moduleRef.ModuleFullName() + moduleFullName := moduleRef.FullName() if moduleToRefToCommit[moduleFullName.String()] == nil { moduleToRefToCommit[moduleFullName.String()] = make(map[string]bufmodule.Commit) } @@ -541,7 +542,7 @@ func (m *migrator) upgradeModuleKeysToB5( b4IndexedModuleKeys, func(indexedModuleKey slicesext.Indexed[bufmodule.ModuleKey]) (bufmodule.CommitKey, error) { return bufmodule.NewCommitKey( - indexedModuleKey.Value.ModuleFullName().Registry(), + indexedModuleKey.Value.FullName().Registry(), indexedModuleKey.Value.CommitID(), bufmodule.DigestTypeB5, ) @@ -559,7 +560,7 @@ func (m *migrator) upgradeModuleKeysToB5( moduleKeyIndex := b4IndexedModuleKeys[i].Index existingModuleKey := moduleKeys[moduleKeyIndex] newModuleKey, err := bufmodule.NewModuleKey( - existingModuleKey.ModuleFullName(), + existingModuleKey.FullName(), existingModuleKey.CommitID(), commit.ModuleKey().Digest, ) @@ -574,10 +575,10 @@ func (m *migrator) upgradeModuleKeysToB5( func resolvedDeclaredAndLockedDependencies( moduleToRefToCommit map[string]map[string]bufmodule.Commit, commitIDToCommit map[uuid.UUID]bufmodule.Commit, - moduleFullNameToDeclaredRefs map[string][]bufmodule.ModuleRef, + moduleFullNameToDeclaredRefs map[string][]bufparse.Ref, moduleFullNameToLockKeys map[string][]bufmodule.ModuleKey, -) ([]bufmodule.ModuleRef, []bufmodule.ModuleKey, error) { - depModuleFullNameToResolvedRef := make(map[string]bufmodule.ModuleRef) +) ([]bufparse.Ref, []bufmodule.ModuleKey, error) { + depFullNameToResolvedRef := make(map[string]bufparse.Ref) for moduleFullName, refs := range moduleFullNameToDeclaredRefs { var errs []error // There are multiple pinned versions of the same dependency, we use the latest one. @@ -596,11 +597,11 @@ func resolvedDeclaredAndLockedDependencies( if len(errs) > 0 { return nil, nil, errors.Join(errs...) } - depModuleFullNameToResolvedRef[moduleFullName] = refs[0] + depFullNameToResolvedRef[moduleFullName] = refs[0] } resolvedDepModuleKeys := make([]bufmodule.ModuleKey, 0, len(moduleFullNameToLockKeys)) for moduleFullName, lockKeys := range moduleFullNameToLockKeys { - resolvedRef, ok := depModuleFullNameToResolvedRef[moduleFullName] + resolvedRef, ok := depFullNameToResolvedRef[moduleFullName] if ok && resolvedRef.Ref() != "" { // If we have already picked a pinned dependency ref for this dependency, // we use that as the lock entry as well. @@ -626,13 +627,13 @@ func resolvedDeclaredAndLockedDependencies( } resolvedDepModuleKeys = append(resolvedDepModuleKeys, lockKeys[0]) } - resolvedDeclaredDependencies := slicesext.MapValuesToSlice(depModuleFullNameToResolvedRef) + resolvedDeclaredDependencies := slicesext.MapValuesToSlice(depFullNameToResolvedRef) // Sort the resolved dependencies for deterministic results. sort.Slice(resolvedDeclaredDependencies, func(i, j int) bool { - return resolvedDeclaredDependencies[i].ModuleFullName().String() < resolvedDeclaredDependencies[j].ModuleFullName().String() + return resolvedDeclaredDependencies[i].FullName().String() < resolvedDeclaredDependencies[j].FullName().String() }) sort.Slice(resolvedDepModuleKeys, func(i, j int) bool { - return resolvedDepModuleKeys[i].ModuleFullName().String() < resolvedDepModuleKeys[j].ModuleFullName().String() + return resolvedDepModuleKeys[i].FullName().String() < resolvedDepModuleKeys[j].FullName().String() }) return resolvedDeclaredDependencies, resolvedDepModuleKeys, nil } diff --git a/private/buf/bufprint/bufprint.go b/private/buf/bufprint/bufprint.go index e0bd64a359..c4e6402816 100644 --- a/private/buf/bufprint/bufprint.go +++ b/private/buf/bufprint/bufprint.go @@ -27,7 +27,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" ownerv1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/protostat" @@ -199,7 +199,7 @@ func PrintEntity(writer io.Writer, format Format, entity Entity) error { } // NewLabelEntity returns a new label entity to print. -func NewLabelEntity(label *modulev1.Label, moduleFullName bufmodule.ModuleFullName) Entity { +func NewLabelEntity(label *modulev1.Label, moduleFullName bufparse.FullName) Entity { var archiveTime *time.Time if label.ArchiveTime != nil { timeValue := label.ArchiveTime.AsTime() @@ -215,7 +215,7 @@ func NewLabelEntity(label *modulev1.Label, moduleFullName bufmodule.ModuleFullNa } // NewCommitEntity returns a new commit entity to print. -func NewCommitEntity(commit *modulev1.Commit, moduleFullName bufmodule.ModuleFullName) Entity { +func NewCommitEntity(commit *modulev1.Commit, moduleFullName bufparse.FullName) Entity { return outputCommit{ Commit: commit.Id, CreateTime: commit.CreateTime.AsTime(), @@ -224,7 +224,7 @@ func NewCommitEntity(commit *modulev1.Commit, moduleFullName bufmodule.ModuleFul } // NewModuleEntity returns a new module entity to print. -func NewModuleEntity(module *modulev1.Module, moduleFullName bufmodule.ModuleFullName) Entity { +func NewModuleEntity(module *modulev1.Module, moduleFullName bufparse.FullName) Entity { return outputModule{ ID: module.Id, Remote: moduleFullName.Registry(), @@ -421,7 +421,7 @@ type outputLabel struct { CreateTime time.Time `json:"create_time,omitempty" bufprint:"Create Time"` ArchiveTime *time.Time `json:"archive_time,omitempty" bufprint:"Archive Time,omitempty"` - moduleFullName bufmodule.ModuleFullName + moduleFullName bufparse.FullName } func (l outputLabel) fullName() string { @@ -432,7 +432,7 @@ type outputCommit struct { Commit string `json:"commit,omitempty" bufprint:"Commit"` CreateTime time.Time `json:"create_time,omitempty" bufprint:"Create Time"` - moduleFullName bufmodule.ModuleFullName + moduleFullName bufparse.FullName } func (c outputCommit) fullName() string { diff --git a/private/buf/bufworkspace/malformed_dep.go b/private/buf/bufworkspace/malformed_dep.go index 520d2d3db4..f343788396 100644 --- a/private/buf/bufworkspace/malformed_dep.go +++ b/private/buf/bufworkspace/malformed_dep.go @@ -18,6 +18,7 @@ import ( "sort" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" ) @@ -43,7 +44,7 @@ type MalformedDep interface { // ModuleRef is the module ref information of the malformed dep. // // Always present. - ModuleRef() bufmodule.ModuleRef + ModuleRef() bufparse.Ref // Type is why this dep was malformed. // // Always present. @@ -54,11 +55,11 @@ type MalformedDep interface { // MalformedDepsForWorkspace gets the MalformedDeps for the workspace. func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { - localModuleFullNameStringMap := slicesext.ToStructMapOmitEmpty( + localFullNameStringMap := slicesext.ToStructMapOmitEmpty( slicesext.Map( bufmodule.ModuleSetLocalModules(workspace), func(module bufmodule.Module) string { - if moduleFullName := module.ModuleFullName(); moduleFullName != nil { + if moduleFullName := module.FullName(); moduleFullName != nil { return moduleFullName.String() } return "" @@ -72,9 +73,9 @@ func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { moduleFullNameStringToRemoteDep, err := slicesext.ToUniqueValuesMapError( remoteDeps, func(remoteDep bufmodule.RemoteDep) (string, error) { - moduleFullName := remoteDep.ModuleFullName() + moduleFullName := remoteDep.FullName() if moduleFullName == nil { - return "", syserror.Newf("ModuleFullName nil on remote Module dependency %q", remoteDep.OpaqueID()) + return "", syserror.Newf("FullName nil on remote Module dependency %q", remoteDep.OpaqueID()) } return moduleFullName.String(), nil }, @@ -84,10 +85,10 @@ func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { } moduleFullNameStringToConfiguredDepModuleRef, err := slicesext.ToUniqueValuesMapError( workspace.ConfiguredDepModuleRefs(), - func(moduleRef bufmodule.ModuleRef) (string, error) { - moduleFullName := moduleRef.ModuleFullName() + func(moduleRef bufparse.Ref) (string, error) { + moduleFullName := moduleRef.FullName() if moduleFullName == nil { - return "", syserror.New("ModuleFullName nil on ModuleRef") + return "", syserror.New("FullName nil on ModuleRef") } return moduleFullName.String(), nil }, @@ -97,7 +98,7 @@ func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { } var malformedDeps []MalformedDep for moduleFullNameString, configuredDepModuleRef := range moduleFullNameStringToConfiguredDepModuleRef { - _, isLocalModule := localModuleFullNameStringMap[moduleFullNameString] + _, isLocalModule := localFullNameStringMap[moduleFullNameString] _, isRemoteDep := moduleFullNameStringToRemoteDep[moduleFullNameString] if !isRemoteDep && !isLocalModule { // The module was in buf.yaml deps, but was not in the remote dep list after @@ -115,8 +116,8 @@ func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { sort.Slice( malformedDeps, func(i int, j int) bool { - return malformedDeps[i].ModuleRef().ModuleFullName().String() < - malformedDeps[j].ModuleRef().ModuleFullName().String() + return malformedDeps[i].ModuleRef().FullName().String() < + malformedDeps[j].ModuleRef().FullName().String() }, ) return malformedDeps, nil @@ -125,12 +126,12 @@ func MalformedDepsForWorkspace(workspace Workspace) ([]MalformedDep, error) { // *** PRIVATE *** type malformedDep struct { - moduleRef bufmodule.ModuleRef + moduleRef bufparse.Ref malformedDepType MalformedDepType } func newMalformedDep( - moduleRef bufmodule.ModuleRef, + moduleRef bufparse.Ref, malformedDepType MalformedDepType, ) *malformedDep { return &malformedDep{ @@ -139,7 +140,7 @@ func newMalformedDep( } } -func (m *malformedDep) ModuleRef() bufmodule.ModuleRef { +func (m *malformedDep) ModuleRef() bufparse.Ref { return m.moduleRef } diff --git a/private/buf/bufworkspace/workspace.go b/private/buf/bufworkspace/workspace.go index afa14b84ba..68ea77ac06 100644 --- a/private/buf/bufworkspace/workspace.go +++ b/private/buf/bufworkspace/workspace.go @@ -17,6 +17,7 @@ package bufworkspace import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slicesext" ) @@ -76,14 +77,14 @@ type Workspace interface { // // These come from buf.yaml files. // - // The ModuleRefs in this list will be unique by ModuleFullName. If there are two ModuleRefs - // in the buf.yaml with the same ModuleFullName but different Refs, an error will be given + // The ModuleRefs in this list will be unique by FullName. If there are two ModuleRefs + // in the buf.yaml with the same FullName but different Refs, an error will be given // at workspace constructions. For example, with v1 buf.yaml, this is a union of the deps in // the buf.yaml files in the workspace. If different buf.yamls had different refs, an error // will be returned - we have no way to resolve what the user intended. // // Sorted. - ConfiguredDepModuleRefs() []bufmodule.ModuleRef + ConfiguredDepModuleRefs() []bufparse.Ref // IsV2 signifies if this module was created from a v2 buf.yaml. // @@ -104,7 +105,7 @@ type workspace struct { opaqueIDToLintConfig map[string]bufconfig.LintConfig opaqueIDToBreakingConfig map[string]bufconfig.BreakingConfig pluginConfigs []bufconfig.PluginConfig - configuredDepModuleRefs []bufmodule.ModuleRef + configuredDepModuleRefs []bufparse.Ref // If true, the workspace was created from v2 buf.yamls. // If false, the workspace was created from defaults, or v1beta1/v1 buf.yamls. @@ -116,7 +117,7 @@ func newWorkspace( opaqueIDToLintConfig map[string]bufconfig.LintConfig, opaqueIDToBreakingConfig map[string]bufconfig.BreakingConfig, pluginConfigs []bufconfig.PluginConfig, - configuredDepModuleRefs []bufmodule.ModuleRef, + configuredDepModuleRefs []bufparse.Ref, isV2 bool, ) *workspace { return &workspace{ @@ -141,7 +142,7 @@ func (w *workspace) PluginConfigs() []bufconfig.PluginConfig { return slicesext.Copy(w.pluginConfigs) } -func (w *workspace) ConfiguredDepModuleRefs() []bufmodule.ModuleRef { +func (w *workspace) ConfiguredDepModuleRefs() []bufparse.Ref { return slicesext.Copy(w.configuredDepModuleRefs) } diff --git a/private/buf/bufworkspace/workspace_dep_manager.go b/private/buf/bufworkspace/workspace_dep_manager.go index ddf6901c2a..1b2f8f5239 100644 --- a/private/buf/bufworkspace/workspace_dep_manager.go +++ b/private/buf/bufworkspace/workspace_dep_manager.go @@ -21,6 +21,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" ) @@ -47,14 +48,14 @@ type WorkspaceDepManager interface { // // These come from buf.yaml files. // - // The ModuleRefs in this list will be unique by ModuleFullName. If there are two ModuleRefs - // in the buf.yaml with the same ModuleFullName but different Refs, an error will be given + // The ModuleRefs in this list will be unique by FullName. If there are two ModuleRefs + // in the buf.yaml with the same FullName but different Refs, an error will be given // at workspace constructions. For example, with v1 buf.yaml, this is a union of the deps in // the buf.yaml files in the workspace. If different buf.yamls had different refs, an error // will be returned - we have no way to resolve what the user intended. // // Sorted. - ConfiguredDepModuleRefs(ctx context.Context) ([]bufmodule.ModuleRef, error) + ConfiguredDepModuleRefs(ctx context.Context) ([]bufparse.Ref, error) isWorkspaceDepManager() } @@ -92,7 +93,7 @@ func newWorkspaceDepManager( } } -func (w *workspaceDepManager) ConfiguredDepModuleRefs(ctx context.Context) ([]bufmodule.ModuleRef, error) { +func (w *workspaceDepManager) ConfiguredDepModuleRefs(ctx context.Context) ([]bufparse.Ref, error) { bufYAMLFile, err := bufconfig.GetBufYAMLFileForPrefix(ctx, w.bucket, w.targetSubDirPath) if err != nil { if !errors.Is(err, fs.ErrNotExist) { diff --git a/private/buf/bufworkspace/workspace_provider.go b/private/buf/bufworkspace/workspace_provider.go index ca3f881afe..a9811072cf 100644 --- a/private/buf/bufworkspace/workspace_provider.go +++ b/private/buf/bufworkspace/workspace_provider.go @@ -24,6 +24,7 @@ import ( "github.com/bufbuild/buf/private/buf/buftarget" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogext" @@ -158,13 +159,13 @@ func (w *workspaceProvider) GetWorkspaceForModuleKey( // If we have more than one ModuleConfig, find the ModuleConfig that matches the // name from the ModuleKey. If none is found, just fall back to the default (ie do nothing here). for _, moduleConfig := range moduleConfigs { - moduleFullName := moduleConfig.ModuleFullName() + moduleFullName := moduleConfig.FullName() if moduleFullName == nil { continue } - if bufmodule.ModuleFullNameEqual(moduleFullName, moduleKey.ModuleFullName()) { + if bufparse.FullNameEqual(moduleFullName, moduleKey.FullName()) { targetModuleConfig = moduleConfig - // We know that the ModuleConfigs are unique by ModuleFullName. + // We know that the ModuleConfigs are unique by FullName. break } } @@ -193,7 +194,7 @@ func (w *workspaceProvider) GetWorkspaceForModuleKey( opaqueIDToLintConfig := make(map[string]bufconfig.LintConfig) opaqueIDToBreakingConfig := make(map[string]bufconfig.BreakingConfig) for _, module := range moduleSet.Modules() { - if bufmodule.ModuleFullNameEqual(module.ModuleFullName(), moduleKey.ModuleFullName()) { + if bufparse.FullNameEqual(module.FullName(), moduleKey.FullName()) { // Set the lint and breaking config for the single targeted Module. opaqueIDToLintConfig[module.OpaqueID()] = targetModuleConfig.LintConfig() opaqueIDToBreakingConfig[module.OpaqueID()] = targetModuleConfig.BreakingConfig() @@ -330,7 +331,7 @@ func (w *workspaceProvider) getWorkspaceForBucketAndModuleDirPathsV1Beta1OrV1( mappedModuleBucket, moduleBucketAndTargeting.bucketID, moduleTargeting.isTargetModule, - bufmodule.LocalModuleWithModuleFullName(moduleConfig.ModuleFullName()), + bufmodule.LocalModuleWithFullName(moduleConfig.FullName()), bufmodule.LocalModuleWithTargetPaths( moduleTargeting.moduleTargetPaths, moduleTargeting.moduleTargetExcludePaths, @@ -434,7 +435,7 @@ func (w *workspaceProvider) getWorkspaceForBucketBufYAMLV2( mappedModuleBucket, moduleBucketAndTargeting.bucketID, moduleTargeting.isTargetModule, - bufmodule.LocalModuleWithModuleFullName(moduleConfig.ModuleFullName()), + bufmodule.LocalModuleWithFullName(moduleConfig.FullName()), bufmodule.LocalModuleWithTargetPaths( moduleTargeting.moduleTargetPaths, moduleTargeting.moduleTargetExcludePaths, @@ -464,8 +465,8 @@ func (w *workspaceProvider) getWorkspaceForBucketModuleSet( moduleSet bufmodule.ModuleSet, bucketIDToModuleConfig map[string]bufconfig.ModuleConfig, pluginConfigs []bufconfig.PluginConfig, - // Expected to already be unique by ModuleFullName. - configuredDepModuleRefs []bufmodule.ModuleRef, + // Expected to already be unique by FullName. + configuredDepModuleRefs []bufparse.Ref, isV2 bool, ) (*workspace, error) { opaqueIDToLintConfig := make(map[string]bufconfig.LintConfig) diff --git a/private/buf/bufworkspace/workspace_targeting.go b/private/buf/bufworkspace/workspace_targeting.go index a9b2b90ca9..ca6063316f 100644 --- a/private/buf/bufworkspace/workspace_targeting.go +++ b/private/buf/bufworkspace/workspace_targeting.go @@ -25,6 +25,7 @@ import ( "github.com/bufbuild/buf/private/buf/buftarget" "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -53,7 +54,7 @@ type workspaceTargeting struct { type v1Targeting struct { bucketIDToModuleConfig map[string]bufconfig.ModuleConfig moduleBucketsAndTargeting []*moduleBucketAndModuleTargeting - allConfiguredDepModuleRefs []bufmodule.ModuleRef + allConfiguredDepModuleRefs []bufparse.Ref } type v2Targeting struct { @@ -296,7 +297,7 @@ func v1WorkspaceTargeting( // directories, and this is a system error - this should be verified before we reach this function. var hadIsTentativelyTargetModule bool var hadIsTargetModule bool - var allConfiguredDepModuleRefs []bufmodule.ModuleRef + var allConfiguredDepModuleRefs []bufparse.Ref bucketIDToModuleConfig := make(map[string]bufconfig.ModuleConfig) // We use this to detect different refs across different files. moduleFullNameStringToConfiguredDepModuleRefString := make(map[string]string) @@ -312,15 +313,15 @@ func v1WorkspaceTargeting( return nil, err } for _, configuredDepModuleRef := range configuredDepModuleRefs { - moduleFullNameString := configuredDepModuleRef.ModuleFullName().String() + moduleFullNameString := configuredDepModuleRef.FullName().String() configuredDepModuleRefString := configuredDepModuleRef.String() existingConfiguredDepModuleRefString, ok := moduleFullNameStringToConfiguredDepModuleRefString[moduleFullNameString] if !ok { - // We haven't encountered a ModuleRef with this ModuleFullName yet, add it. + // We haven't encountered a ModuleRef with this FullName yet, add it. allConfiguredDepModuleRefs = append(allConfiguredDepModuleRefs, configuredDepModuleRef) moduleFullNameStringToConfiguredDepModuleRefString[moduleFullNameString] = configuredDepModuleRefString } else if configuredDepModuleRefString != existingConfiguredDepModuleRefString { - // We encountered the same ModuleRef by ModuleFullName, but with a different Ref. + // We encountered the same ModuleRef by FullName, but with a different Ref. return nil, fmt.Errorf("found different refs for the same module within buf.yaml deps in the workspace: %s %s", configuredDepModuleRefString, existingConfiguredDepModuleRefString) } } @@ -698,7 +699,7 @@ func getModuleConfigAndConfiguredDepModuleRefsV1Beta1OrV1( bucket storage.ReadBucket, moduleDirPath string, overrideBufYAMLFile bufconfig.BufYAMLFile, -) (bufconfig.ModuleConfig, []bufmodule.ModuleRef, error) { +) (bufconfig.ModuleConfig, []bufparse.Ref, error) { var bufYAMLFile bufconfig.BufYAMLFile var err error if overrideBufYAMLFile != nil { diff --git a/private/buf/bufworkspace/workspace_test.go b/private/buf/bufworkspace/workspace_test.go index 3cf3451deb..0006c48217 100644 --- a/private/buf/bufworkspace/workspace_test.go +++ b/private/buf/bufworkspace/workspace_test.go @@ -240,9 +240,9 @@ func TestUnusedDep(t *testing.T) { malformedDeps, err := MalformedDepsForWorkspace(workspace) require.NoError(t, err) require.Equal(t, 2, len(malformedDeps)) - require.Equal(t, "buf.testing/acme/date", malformedDeps[0].ModuleRef().ModuleFullName().String()) + require.Equal(t, "buf.testing/acme/date", malformedDeps[0].ModuleRef().FullName().String()) require.Equal(t, MalformedDepTypeUnused, malformedDeps[0].Type()) - require.Equal(t, "buf.testing/acme/extension", malformedDeps[1].ModuleRef().ModuleFullName().String()) + require.Equal(t, "buf.testing/acme/extension", malformedDeps[1].ModuleRef().FullName().String()) require.Equal(t, MalformedDepTypeUnused, malformedDeps[1].Type()) } diff --git a/private/buf/cmd/buf/command/config/configinit/configinit.go b/private/buf/cmd/buf/command/config/configinit/configinit.go index cc252df60e..9407552072 100644 --- a/private/buf/cmd/buf/command/config/configinit/configinit.go +++ b/private/buf/cmd/buf/command/config/configinit/configinit.go @@ -20,7 +20,7 @@ import ( "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/bufpkg/bufconfig" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/spf13/pflag" @@ -124,9 +124,9 @@ func run( } fileVersion := bufconfig.FileVersionV2 - var moduleFullName bufmodule.ModuleFullName + var moduleFullName bufparse.FullName if container.NumArgs() > 0 { - moduleFullName, err = bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err = bufparse.ParseFullName(container.Arg(0)) if err != nil { return err } diff --git a/private/buf/cmd/buf/command/config/configlsmodules/configlsmodules.go b/private/buf/cmd/buf/command/config/configlsmodules/configlsmodules.go index fc2c04a93f..7ec7257c2f 100644 --- a/private/buf/cmd/buf/command/config/configlsmodules/configlsmodules.go +++ b/private/buf/cmd/buf/command/config/configlsmodules/configlsmodules.go @@ -193,7 +193,7 @@ func getExternalModulesForBufWorkYAMLFile( return nil, syserror.Newf("got BufYAMLFile at %q with FileVersion %v with ModuleConfig that had non-root DirPath %q", dirPath, bufYAMLFile.FileVersion(), moduleConfig.DirPath()) } var name string - if moduleFullName := moduleConfig.ModuleFullName(); moduleFullName != nil { + if moduleFullName := moduleConfig.FullName(); moduleFullName != nil { name = moduleFullName.String() } includes := slicesext.Map(moduleConfig.RootToIncludes()["."], func(include string) string { return normalpath.Join(dirPath, include) }) @@ -222,7 +222,7 @@ func getExternalModulesForBufYAMLFile( externalModules := make([]*externalModule, len(moduleConfigs)) for i, moduleConfig := range moduleConfigs { var name string - if moduleFullName := moduleConfig.ModuleFullName(); moduleFullName != nil { + if moduleFullName := moduleConfig.FullName(); moduleFullName != nil { name = moduleFullName.String() } dirPath := moduleConfig.DirPath() diff --git a/private/buf/cmd/buf/command/dep/depgraph/depgraph.go b/private/buf/cmd/buf/command/dep/depgraph/depgraph.go index 0fcdbede51..396aa0e4c4 100644 --- a/private/buf/cmd/buf/command/dep/depgraph/depgraph.go +++ b/private/buf/cmd/buf/command/dep/depgraph/depgraph.go @@ -204,7 +204,7 @@ func run( } func moduleToString(module bufmodule.Module) string { - if moduleFullName := module.ModuleFullName(); moduleFullName != nil { + if moduleFullName := module.FullName(); moduleFullName != nil { commitID := dashlessCommitIDStringForModule(module) if commitID != "" { return moduleFullName.String() + ":" + commitID @@ -214,10 +214,10 @@ func moduleToString(module bufmodule.Module) string { return module.OpaqueID() } -// moduleFullNameOrOpaqueID returns the ModuleFullName for a module if available, otherwise +// moduleFullNameOrOpaqueID returns the FullName for a module if available, otherwise // it returns the OpaqueID. func moduleFullNameOrOpaqueID(module bufmodule.Module) string { - if moduleFullName := module.ModuleFullName(); moduleFullName != nil { + if moduleFullName := module.FullName(); moduleFullName != nil { return moduleFullName.String() } return module.OpaqueID() @@ -233,7 +233,7 @@ func dashlessCommitIDStringForModule(module bufmodule.Module) string { } type externalModule struct { - // ModuleFullName if remote, OpaqueID if no ModuleFullName + // FullName if remote, OpaqueID if no FullName Name string `json:"name,omitempty" yaml:"name,omitempty"` // Dashless Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` @@ -249,8 +249,8 @@ func (e *externalModule) addDeps( flags *flags, ) error { for _, dep := range deps { - depModuleFullNameOrOpaqueID := moduleFullNameOrOpaqueID(dep) - depExternalModule, ok := moduleFullNameOrOpaqueIDToExternalModule[depModuleFullNameOrOpaqueID] + depFullNameOrOpaqueID := moduleFullNameOrOpaqueID(dep) + depExternalModule, ok := moduleFullNameOrOpaqueIDToExternalModule[depFullNameOrOpaqueID] if ok { // If this dependency has already been seen, we can simply update our current module // and return early. @@ -271,7 +271,7 @@ func (e *externalModule) addDeps( if err := depExternalModule.addDeps(transitiveDeps, graph, moduleFullNameOrOpaqueIDToExternalModule, flags); err != nil { return err } - moduleFullNameOrOpaqueIDToExternalModule[depModuleFullNameOrOpaqueID] = depExternalModule + moduleFullNameOrOpaqueIDToExternalModule[depFullNameOrOpaqueID] = depExternalModule e.Deps = append(e.Deps, depExternalModule) } return nil diff --git a/private/buf/cmd/buf/command/dep/internal/internal.go b/private/buf/cmd/buf/command/dep/internal/internal.go index b68a2e0b62..d5d57cf584 100644 --- a/private/buf/cmd/buf/command/dep/internal/internal.go +++ b/private/buf/cmd/buf/command/dep/internal/internal.go @@ -23,6 +23,7 @@ import ( "github.com/bufbuild/buf/private/buf/bufctl" "github.com/bufbuild/buf/private/buf/bufworkspace" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -33,7 +34,7 @@ import ( func ModuleKeysAndTransitiveDepModuleKeysForModuleRefs( ctx context.Context, container appext.Container, - moduleRefs []bufmodule.ModuleRef, + moduleRefs []bufparse.Ref, digestType bufmodule.DigestType, ) ([]bufmodule.ModuleKey, error) { moduleKeyProvider, err := bufcli.NewModuleKeyProvider(container) @@ -123,7 +124,7 @@ func LogUnusedConfiguredDepsForWorkspace( case bufworkspace.MalformedDepTypeUnused: logger.Warn(fmt.Sprintf( `Module %[1]s is declared in your buf.yaml deps but is unused. This command only modifies buf.lock files, not buf.yaml files. Please remove %[1]s from your buf.yaml deps if it is not needed.`, - malformedDep.ModuleRef().ModuleFullName(), + malformedDep.ModuleRef().FullName(), )) default: return fmt.Errorf("unknown MalformedDepType: %v", t) @@ -166,16 +167,16 @@ func moduleKeysAndTransitiveDepModuleKeysForModuleKeys( // // See comment on Prune. func validateModuleKeysContains(containingModuleKeys []bufmodule.ModuleKey, moduleKeys []bufmodule.ModuleKey) error { - containingModuleFullNameStringToModuleKey, err := getModuleFullNameStringToModuleKey(containingModuleKeys) + containingFullNameStringToModuleKey, err := getFullNameStringToModuleKey(containingModuleKeys) if err != nil { return syserror.Newf("validateModuleKeysContains: containingModuleKeys: %w", err) } - moduleFullNameStringToModuleKey, err := getModuleFullNameStringToModuleKey(moduleKeys) + moduleFullNameStringToModuleKey, err := getFullNameStringToModuleKey(moduleKeys) if err != nil { return syserror.Newf("validateModuleKeysContains: moduleKeys: %w", err) } for moduleFullNameString := range moduleFullNameStringToModuleKey { - if _, ok := containingModuleFullNameStringToModuleKey[moduleFullNameString]; !ok { + if _, ok := containingFullNameStringToModuleKey[moduleFullNameString]; !ok { return fmt.Errorf( `Module %s is detected to be a still-used dependency from your existing buf.lock, but is not a declared dependency in your buf.yaml deps, and is not a transitive dependency of any declared dependency. Add %s to your buf.yaml deps.`, moduleFullNameString, @@ -186,12 +187,12 @@ func validateModuleKeysContains(containingModuleKeys []bufmodule.ModuleKey, modu return nil } -// All ModuleKeys are expected to be unique by ModuleFullName. -func getModuleFullNameStringToModuleKey(moduleKeys []bufmodule.ModuleKey) (map[string]bufmodule.ModuleKey, error) { +// All ModuleKeys are expected to be unique by FullName. +func getFullNameStringToModuleKey(moduleKeys []bufmodule.ModuleKey) (map[string]bufmodule.ModuleKey, error) { return slicesext.ToUniqueValuesMap( moduleKeys, func(moduleKey bufmodule.ModuleKey) string { - return moduleKey.ModuleFullName().String() + return moduleKey.FullName().String() }, ) } diff --git a/private/buf/cmd/buf/command/lsfiles/lsfiles.go b/private/buf/cmd/buf/command/lsfiles/lsfiles.go index 663a4e62cf..aaba9ae531 100644 --- a/private/buf/cmd/buf/command/lsfiles/lsfiles.go +++ b/private/buf/cmd/buf/command/lsfiles/lsfiles.go @@ -262,7 +262,7 @@ type externalImageFileInfo struct { func newExternalImageFileInfo(imageFileInfo bufimage.ImageFileInfo) *externalImageFileInfo { var module string - if moduleFullName := imageFileInfo.ModuleFullName(); moduleFullName != nil { + if moduleFullName := imageFileInfo.FullName(); moduleFullName != nil { module = moduleFullName.String() } var commit string diff --git a/private/buf/cmd/buf/command/mod/modopen/modopen.go b/private/buf/cmd/buf/command/mod/modopen/modopen.go index 2f44fe4b8e..86f511c567 100644 --- a/private/buf/cmd/buf/command/mod/modopen/modopen.go +++ b/private/buf/cmd/buf/command/mod/modopen/modopen.go @@ -75,7 +75,7 @@ func run( if len(moduleConfigs) != 1 { return syserror.Newf("got %d ModuleConfigs for a v1beta1/v1 buf.yaml", len(moduleConfigs)) } - moduleFullName := moduleConfigs[0].ModuleFullName() + moduleFullName := moduleConfigs[0].FullName() if moduleFullName == nil { return fmt.Errorf("%s/buf.yaml has no module name", dirPath) } diff --git a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go b/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go index 685a2ce6c7..54f430fa7a 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go +++ b/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -84,7 +84,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -108,14 +108,14 @@ func run( return err } moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) - labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleRef.ModuleFullName().Registry()) + labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleRef.FullName().Registry()) requestValues := slicesext.Map(labels, func(label string) *modulev1.CreateOrUpdateLabelsRequest_Value { return &modulev1.CreateOrUpdateLabelsRequest_Value{ LabelRef: &modulev1.LabelRef{ Value: &modulev1.LabelRef_Name_{ Name: &modulev1.LabelRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Label: label, }, }, @@ -138,7 +138,7 @@ func run( } if format == bufprint.FormatText { for _, label := range resp.Msg.Labels { - fmt.Fprintf(container.Stdout(), "%s:%s\n", moduleRef.ModuleFullName(), label.Name) + fmt.Fprintf(container.Stdout(), "%s:%s\n", moduleRef.FullName(), label.Name) } return nil } @@ -146,7 +146,7 @@ func run( container.Stdout(), format, slicesext.Map(resp.Msg.Labels, func(label *modulev1.Label) bufprint.Entity { - return bufprint.NewLabelEntity(label, moduleRef.ModuleFullName()) + return bufprint.NewLabelEntity(label, moduleRef.FullName()) })..., ) } diff --git a/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go b/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go index 3a79745df1..58c9efd763 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go +++ b/private/buf/cmd/buf/command/registry/commit/commitinfo/commitinfo.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -74,7 +74,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -94,7 +94,7 @@ func run( if err != nil { return err } - commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) + commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.FullName().Registry()) resp, err := commitServiceClient.GetCommits( ctx, connect.NewRequest( @@ -111,7 +111,7 @@ func run( ) if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } @@ -122,6 +122,6 @@ func run( return bufprint.PrintEntity( container.Stdout(), format, - bufprint.NewCommitEntity(commits[0], moduleRef.ModuleFullName()), + bufprint.NewCommitEntity(commits[0], moduleRef.FullName()), ) } diff --git a/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go b/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go index 292ccc8208..f87fbf8d95 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go +++ b/private/buf/cmd/buf/command/registry/commit/commitlist/commitlist.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -104,7 +104,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -116,7 +116,7 @@ func run( if err != nil { return err } - registry := moduleRef.ModuleFullName().Registry() + registry := moduleRef.FullName().Registry() moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) commitServiceClient := moduleClientProvider.V1CommitServiceClient(registry) labelServiceClient := moduleClientProvider.V1LabelServiceClient(registry) @@ -129,8 +129,8 @@ func run( { Value: &modulev1.ResourceRef_Name_{ Name: &modulev1.ResourceRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Child: &modulev1.ResourceRef_Name_Ref{ Ref: moduleRef.Ref(), }, @@ -143,7 +143,7 @@ func run( ) if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } @@ -159,7 +159,7 @@ func run( format, "", "", - []bufprint.Entity{bufprint.NewCommitEntity(commit, moduleRef.ModuleFullName())}, + []bufprint.Entity{bufprint.NewCommitEntity(commit, moduleRef.FullName())}, ) } if resource.GetModule() != nil { @@ -177,8 +177,8 @@ func run( ResourceRef: &modulev1.ResourceRef{ Value: &modulev1.ResourceRef_Name_{ Name: &modulev1.ResourceRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), }, }, }, @@ -188,7 +188,7 @@ func run( ) if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } @@ -198,7 +198,7 @@ func run( resp.Msg.NextPageToken, nextPageCommand(container, flags, resp.Msg.NextPageToken), slicesext.Map(resp.Msg.Commits, func(commit *modulev1.Commit) bufprint.Entity { - return bufprint.NewCommitEntity(commit, moduleRef.ModuleFullName()) + return bufprint.NewCommitEntity(commit, moduleRef.FullName()) }), ) } @@ -221,8 +221,8 @@ func run( LabelRef: &modulev1.LabelRef{ Value: &modulev1.LabelRef_Name_{ Name: &modulev1.LabelRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Label: moduleRef.Ref(), }, }, @@ -234,7 +234,7 @@ func run( if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { // This should be impossible since we just checked that the ref is a label. - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } @@ -250,7 +250,7 @@ func run( resp.Msg.NextPageToken, nextPageCommand(container, flags, resp.Msg.NextPageToken), slicesext.Map(commits, func(commit *modulev1.Commit) bufprint.Entity { - return bufprint.NewCommitEntity(commit, moduleRef.ModuleFullName()) + return bufprint.NewCommitEntity(commit, moduleRef.FullName()) }), ) } diff --git a/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go b/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go index fccfc7e597..37169a5d7f 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go +++ b/private/buf/cmd/buf/command/registry/commit/commitresolve/commitresolve.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -73,7 +73,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -86,7 +86,7 @@ func run( if err != nil { return err } - commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.ModuleFullName().Registry()) + commitServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1CommitServiceClient(moduleRef.FullName().Registry()) resp, err := commitServiceClient.GetCommits( ctx, connect.NewRequest( @@ -95,8 +95,8 @@ func run( { Value: &modulev1.ResourceRef_Name_{ Name: &modulev1.ResourceRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Child: &modulev1.ResourceRef_Name_Ref{ Ref: moduleRef.Ref(), }, @@ -109,7 +109,7 @@ func run( ) if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } @@ -121,6 +121,6 @@ func run( return bufprint.PrintNames( container.Stdout(), format, - bufprint.NewCommitEntity(commit, moduleRef.ModuleFullName()), + bufprint.NewCommitEntity(commit, moduleRef.FullName()), ) } diff --git a/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go b/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go index 12e2e2fb98..1f55b21f25 100644 --- a/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go +++ b/private/buf/cmd/buf/command/registry/label/labelarchive/labelarchive.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -62,7 +62,7 @@ func run( container appext.Container, _ *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -74,7 +74,7 @@ func run( if err != nil { return err } - moduleFullName := moduleRef.ModuleFullName() + moduleFullName := moduleRef.FullName() labelServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) // ArchiveLabelsResponse is empty. if _, err := labelServiceClient.ArchiveLabels( diff --git a/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go b/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go index 857d010a32..1c8186fa8a 100644 --- a/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go +++ b/private/buf/cmd/buf/command/registry/label/labelinfo/labelinfo.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -73,7 +73,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -90,7 +90,7 @@ func run( return err } moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) - moduleFullName := moduleRef.ModuleFullName() + moduleFullName := moduleRef.FullName() labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleFullName.Registry()) resp, err := labelServiceClient.GetLabels( ctx, diff --git a/private/buf/cmd/buf/command/registry/label/labellist/labellist.go b/private/buf/cmd/buf/command/registry/label/labellist/labellist.go index 5b15eddbcc..ff357f4e44 100644 --- a/private/buf/cmd/buf/command/registry/label/labellist/labellist.go +++ b/private/buf/cmd/buf/command/registry/label/labellist/labellist.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -104,7 +104,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -121,7 +121,7 @@ func run( return err } moduleClientProvider := bufregistryapimodule.NewClientProvider(clientConfig) - moduleFullName := moduleRef.ModuleFullName() + moduleFullName := moduleRef.FullName() labelServiceClient := moduleClientProvider.V1LabelServiceClient(moduleFullName.Registry()) order := modulev1.ListLabelsRequest_ORDER_UPDATE_TIME_DESC if flags.Reverse { @@ -151,7 +151,7 @@ func run( ) if err != nil { if connect.CodeOf(err) == connect.CodeNotFound { - return bufcli.NewModuleRefNotFoundError(moduleRef) + return bufcli.NewRefNotFoundError(moduleRef) } return err } diff --git a/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go b/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go index c104833dad..d2d034fbb9 100644 --- a/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go +++ b/private/buf/cmd/buf/command/registry/label/labelunarchive/labelunarchive.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -62,7 +62,7 @@ func run( container appext.Container, _ *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(container.Arg(0)) + moduleRef, err := bufparse.ParseRef(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -74,7 +74,7 @@ func run( if err != nil { return err } - moduleFullName := moduleRef.ModuleFullName() + moduleFullName := moduleRef.FullName() labelServiceClient := bufregistryapimodule.NewClientProvider(clientConfig).V1LabelServiceClient(moduleFullName.Registry()) // UnarchiveLabelsResponse is empty. if _, err := labelServiceClient.UnarchiveLabels( diff --git a/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go b/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go index 4b274514e2..4d9fbdeb18 100644 --- a/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go +++ b/private/buf/cmd/buf/command/registry/module/modulecreate/modulecreate.go @@ -23,7 +23,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -89,7 +89,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go b/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go index 37b72d307e..669af923b1 100644 --- a/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go +++ b/private/buf/cmd/buf/command/registry/module/moduledelete/moduledelete.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -72,7 +72,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go b/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go index 4ebfd44ea4..7742b81c7e 100644 --- a/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go +++ b/private/buf/cmd/buf/command/registry/module/moduledeprecate/moduledeprecate.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -54,7 +54,7 @@ func newFlags() *flags { func (f *flags) Bind(flagSet *pflag.FlagSet) {} func run(ctx context.Context, container appext.Container, flags *flags) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go b/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go index 19ae1d19db..9ad9c838cb 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go +++ b/private/buf/cmd/buf/command/registry/module/moduleinfo/moduleinfo.go @@ -22,7 +22,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufprint" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -73,7 +73,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go b/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go index 8bca106626..e8d31627c3 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go +++ b/private/buf/cmd/buf/command/registry/module/moduleundeprecate/moduleundeprecate.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -39,7 +39,7 @@ func NewCommand(name string, builder appext.SubCommandBuilder) *appcmd.Command { } func run(ctx context.Context, container appext.Container) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go b/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go index 6e67806e70..f4c66ab26c 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go +++ b/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go @@ -21,7 +21,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" @@ -90,7 +90,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleFullName, err := bufmodule.ParseModuleFullName(container.Arg(0)) + moduleFullName, err := bufparse.ParseFullName(container.Arg(0)) if err != nil { return appcmd.WrapInvalidArgumentError(err) } diff --git a/private/buf/cmd/buf/command/registry/sdk/version/version.go b/private/buf/cmd/buf/command/registry/sdk/version/version.go index cb96d3d61f..7c01c93786 100644 --- a/private/buf/cmd/buf/command/registry/sdk/version/version.go +++ b/private/buf/cmd/buf/command/registry/sdk/version/version.go @@ -20,7 +20,7 @@ import ( "connectrpc.com/connect" "github.com/bufbuild/buf/private/buf/bufcli" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremotepluginref" "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect" registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1" @@ -89,7 +89,7 @@ func run( container appext.Container, flags *flags, ) error { - moduleRef, err := bufmodule.ParseModuleRef(flags.Module) + moduleRef, err := bufparse.ParseRef(flags.Module) if err != nil { return appcmd.WrapInvalidArgumentError(err) } @@ -97,7 +97,7 @@ func run( if err != nil { return appcmd.WrapInvalidArgumentError(err) } - if pluginIdentity.Remote() != moduleRef.ModuleFullName().Registry() { + if pluginIdentity.Remote() != moduleRef.FullName().Registry() { return appcmd.NewInvalidArgumentError("module and plugin must be from the same BSR instance") } @@ -107,12 +107,12 @@ func run( } pluginCurationServiceClient := connectclient.Make( clientConfig, - moduleRef.ModuleFullName().Registry(), + moduleRef.FullName().Registry(), registryv1alpha1connect.NewPluginCurationServiceClient, ) resolveServiceClient := connectclient.Make( clientConfig, - moduleRef.ModuleFullName().Registry(), + moduleRef.FullName().Registry(), registryv1alpha1connect.NewResolveServiceClient, ) getLatestCuratedPluginResponse, err := pluginCurationServiceClient.GetLatestCuratedPlugin( @@ -133,8 +133,8 @@ func run( return fmt.Errorf("plugin %q is not associated with a package ecosystem", flags.Plugin) } moduleReference := ®istryv1alpha1.LocalModuleReference{ - Owner: moduleRef.ModuleFullName().Owner(), - Repository: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Repository: moduleRef.FullName().Name(), Reference: moduleRef.Ref(), } pluginReference := ®istryv1alpha1.GetRemotePackageVersionPlugin{ diff --git a/private/buf/cmd/buf/imports_test.go b/private/buf/cmd/buf/imports_test.go index d80ae08491..7a9fe1f43a 100644 --- a/private/buf/cmd/buf/imports_test.go +++ b/private/buf/cmd/buf/imports_test.go @@ -22,6 +22,7 @@ import ( "github.com/bufbuild/buf/private/buf/bufctl" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appcmd/appcmdtesting" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -51,7 +52,7 @@ func TestValidImportFromCache(t *testing.T) { func TestValidImportFromCorruptedCacheFile(t *testing.T) { t.Parallel() - moduleFullName, err := bufmodule.NewModuleFullName("bufbuild.test", "bufbot", "people") + moduleFullName, err := bufparse.NewFullName("bufbuild.test", "bufbot", "people") require.NoError(t, err) commitID, err := uuidutil.FromDashless("fc7d540124fd42db92511c19a60a1d98") require.NoError(t, err) @@ -60,7 +61,7 @@ func TestValidImportFromCorruptedCacheFile(t *testing.T) { actualDigest, err := bufmodule.ParseDigest("b5:87403abcc5ec8403180536840a46bef8751df78caa8ad4b46939f4673d8bd58663d0f593668651bb2cd23049fedac4989e8b28c7e0e36b9b524f58ab09bf1053") require.NoError(t, err) digestMismatchError := &bufmodule.DigestMismatchError{ - ModuleFullName: moduleFullName, + FullName: moduleFullName, CommitID: commitID, ExpectedDigest: expectedDigest, ActualDigest: actualDigest, @@ -85,7 +86,7 @@ func TestValidImportFromCorruptedCacheFile(t *testing.T) { func TestValidImportFromCorruptedCacheDep(t *testing.T) { t.Parallel() - moduleFullName, err := bufmodule.NewModuleFullName("bufbuild.test", "bufbot", "students") + moduleFullName, err := bufparse.NewFullName("bufbuild.test", "bufbot", "students") require.NoError(t, err) commitID, err := uuidutil.FromDashless("6c776ed5bee54462b06d31fb7f7c16b8") require.NoError(t, err) @@ -94,7 +95,7 @@ func TestValidImportFromCorruptedCacheDep(t *testing.T) { actualDigest, err := bufmodule.ParseDigest("b5:975dad3641303843fb6a06eedf038b0e6ff41da82b8a483920afb36011e0b0a24f720a2407f5e0783389530486ff410b7e132f219add69a5c7324d54f6f89a6c") require.NoError(t, err) digestMismatchError := &bufmodule.DigestMismatchError{ - ModuleFullName: moduleFullName, + FullName: moduleFullName, CommitID: commitID, ExpectedDigest: expectedDigest, ActualDigest: actualDigest, diff --git a/private/buf/cmd/internal/internal.go b/private/buf/cmd/internal/internal.go index 2c06b85599..d81895f8da 100644 --- a/private/buf/cmd/internal/internal.go +++ b/private/buf/cmd/internal/internal.go @@ -58,7 +58,7 @@ func GetModuleConfigForProtocPlugin( // // If we have a v2 buf.yaml, users have to provide a module path or full name, otherwise // we can't deduce what ModuleConfig to use. - if fullName := moduleConfig.ModuleFullName(); fullName != nil && fullName.String() == module { + if fullName := moduleConfig.FullName(); fullName != nil && fullName.String() == module { // Can return here because BufYAMLFile guarantees that module full names are unique across // its module configs. return moduleConfig, nil diff --git a/private/bufpkg/bufcas/digest.go b/private/bufpkg/bufcas/digest.go index 401852da94..45c47cc05b 100644 --- a/private/bufpkg/bufcas/digest.go +++ b/private/bufpkg/bufcas/digest.go @@ -23,6 +23,7 @@ import ( "strconv" "strings" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/shake256" "github.com/bufbuild/buf/private/pkg/syserror" ) @@ -59,15 +60,15 @@ func (d DigestType) String() string { // // This reverses DigestType.String(). // -// Returns an error of type *ParseError if thie string could not be parsed. +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseDigestType(s string) (DigestType, error) { d, ok := stringToDigestType[s] if !ok { - return 0, &ParseError{ - typeString: "digest type", - input: s, - err: fmt.Errorf("unknown type: %q", s), - } + return 0, bufparse.NewParseError( + "digest type", + s, + fmt.Errorf("unknown type: %q", s), + ) } return d, nil } @@ -158,6 +159,8 @@ func DigestWithDigestType(digestType DigestType) DigestOption { // The string is expected to be non-empty, If not, an error is treutned. // // This reverses Digest.String(). +// +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseDigest(s string) (Digest, error) { if s == "" { // This should be considered a system error. @@ -165,34 +168,34 @@ func ParseDigest(s string) (Digest, error) { } digestTypeString, hexValue, ok := strings.Cut(s, ":") if !ok { - return nil, &ParseError{ - typeString: "digest", - input: s, - err: errors.New(`must in the form "digest_type:digest_hex_value"`), - } + return nil, bufparse.NewParseError( + "digest", + s, + errors.New(`must in the form "digest_type:digest_hex_value"`), + ) } digestType, err := ParseDigestType(digestTypeString) if err != nil { - return nil, &ParseError{ - typeString: "digest", - input: s, - err: err, - } + return nil, bufparse.NewParseError( + "digest", + s, + err, + ) } value, err := hex.DecodeString(hexValue) if err != nil { - return nil, &ParseError{ - typeString: "digest", - input: s, - err: errors.New(`could not parse hex: must in the form "digest_type:digest_hex_value"`), - } + return nil, bufparse.NewParseError( + "digest", + s, + errors.New(`could not parse hex: must in the form "digest_type:digest_hex_value"`), + ) } if err := validateDigestParameters(digestType, value); err != nil { - return nil, &ParseError{ - typeString: "digest", - input: s, - err: err, - } + return nil, bufparse.NewParseError( + "digest", + s, + err, + ) } return newDigest(digestType, value), nil } @@ -265,7 +268,7 @@ func validateDigestParameters(digestType DigestType, value []byte) error { } default: // This is really always a system error, but little harm in including it here, even - // though it'll get converted into a ParseError in parse. + // though it'll get converted into a bufparse.ParseError in parse. return syserror.Newf(`unknown digest type: %q`, digestType.String()) } return nil diff --git a/private/bufpkg/bufcas/digest_test.go b/private/bufpkg/bufcas/digest_test.go index ff7d175e41..0dc19025d7 100644 --- a/private/bufpkg/bufcas/digest_test.go +++ b/private/bufpkg/bufcas/digest_test.go @@ -25,6 +25,7 @@ import ( "testing/iotest" "github.com/bufbuild/buf/private/bufpkg/bufcas" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -78,7 +79,7 @@ func TestDigestEqual(t *testing.T) { func testParseDigestError(t *testing.T, digestString string, expectParseError bool) { _, err := bufcas.ParseDigest(digestString) assert.Error(t, err) - parseError := &bufcas.ParseError{} + parseError := &bufparse.ParseError{} isParseError := errors.As(err, &parseError) if expectParseError { assert.True(t, isParseError) diff --git a/private/bufpkg/bufcas/file_node.go b/private/bufpkg/bufcas/file_node.go index 6446af0a49..e3c01db0ae 100644 --- a/private/bufpkg/bufcas/file_node.go +++ b/private/bufpkg/bufcas/file_node.go @@ -19,6 +19,7 @@ import ( "fmt" "strings" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" ) @@ -62,27 +63,27 @@ func NewFileNode(path string, digest Digest) (FileNode, error) { func ParseFileNode(s string) (FileNode, error) { split := strings.Split(s, " ") if len(split) != 2 { - return nil, &ParseError{ - typeString: "file node", - input: s, - err: errors.New(`must in the form "digest[SP][SP]path"`), - } + return nil, bufparse.NewParseError( + "file node", + s, + errors.New(`must in the form "digest[SP][SP]path"`), + ) } digest, err := ParseDigest(split[0]) if err != nil { - return nil, &ParseError{ - typeString: "file node", - input: s, - err: err, - } + return nil, bufparse.NewParseError( + "file node", + s, + err, + ) } path := split[1] if err := validateFileNodeParameters(path, digest); err != nil { - return nil, &ParseError{ - typeString: "file node", - input: s, - err: err, - } + return nil, bufparse.NewParseError( + "file node", + s, + err, + ) } return newFileNode(path, digest), nil } diff --git a/private/bufpkg/bufcas/manifest.go b/private/bufpkg/bufcas/manifest.go index ba0cb71068..e97e7b6e0d 100644 --- a/private/bufpkg/bufcas/manifest.go +++ b/private/bufpkg/bufcas/manifest.go @@ -20,6 +20,8 @@ import ( "fmt" "sort" "strings" + + "github.com/bufbuild/buf/private/bufpkg/bufparse" ) // Manifest is a set of FileNodes. @@ -71,26 +73,28 @@ func NewManifest(fileNodes []FileNode) (Manifest, error) { // ParseManifest parses a Manifest from its string representation. // // This reverses Manifest.String(). +// +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseManifest(s string) (Manifest, error) { var fileNodes []FileNode original := s if len(s) > 0 { if s[len(s)-1] != '\n' { - return nil, &ParseError{ - typeString: "manifest", - input: original, - err: errors.New("did not end with newline"), - } + return nil, bufparse.NewParseError( + "manifest", + original, + errors.New("did not end with newline"), + ) } s = s[:len(s)-1] for i, line := range strings.Split(s, "\n") { fileNode, err := ParseFileNode(line) if err != nil { - return nil, &ParseError{ - typeString: "manifest", - input: original, - err: fmt.Errorf("line %d: %w", i, err), - } + return nil, bufparse.NewParseError( + "manifest", + original, + fmt.Errorf("line %d: %w", i, err), + ) } fileNodes = append(fileNodes, fileNode) } @@ -100,11 +104,11 @@ func ParseManifest(s string) (Manifest, error) { // Validation occurs within getAndValidateManifestPathToFileNode, so we pass nil to that. pathToFileNode, err := getAndValidateManifestPathToFileNode(fileNodes) if err != nil { - return nil, &ParseError{ - typeString: "manifest", - input: original, - err: err, - } + return nil, bufparse.NewParseError( + "manifest", + original, + err, + ) } return newManifest(pathToFileNode), nil } @@ -127,7 +131,8 @@ func ManifestToDigest(manifest Manifest) (Digest, error) { // // # The Blob is assumed to be non-nil // -// This function returns ParseErrors since this is effectively parsing the blob. +// This function returns an error of type *bufparse.ParseError since this is +// effectively parsing the blob. func BlobToManifest(blob Blob) (Manifest, error) { return ParseManifest(string(blob.Content())) } diff --git a/private/bufpkg/bufcas/manifest_test.go b/private/bufpkg/bufcas/manifest_test.go index b622c5e88e..e4e0f4c987 100644 --- a/private/bufpkg/bufcas/manifest_test.go +++ b/private/bufpkg/bufcas/manifest_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -89,7 +90,7 @@ func TestParseManifestError(t *testing.T) { func testParseManifestError(t *testing.T, manifestString string) { _, err := ParseManifest(manifestString) assert.Error(t, err) - parseError := &ParseError{} + parseError := &bufparse.ParseError{} isParseError := errors.As(err, &parseError) assert.True(t, isParseError) assert.Equal(t, manifestString, parseError.Input()) diff --git a/private/bufpkg/bufcheck/bufcheckserver/internal/bufcheckserverutil/input_file.go b/private/bufpkg/bufcheck/bufcheckserver/internal/bufcheckserverutil/input_file.go index d1f15093ee..086b1b639d 100644 --- a/private/bufpkg/bufcheck/bufcheckserver/internal/bufcheckserverutil/input_file.go +++ b/private/bufpkg/bufcheck/bufcheckserver/internal/bufcheckserverutil/input_file.go @@ -16,7 +16,7 @@ package bufcheckserverutil import ( "buf.build/go/bufplugin/descriptor" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/google/uuid" ) @@ -38,7 +38,7 @@ func (i *inputFile) ExternalPath() string { return i.Path() } -func (i *inputFile) ModuleFullName() bufmodule.ModuleFullName { +func (i *inputFile) FullName() bufparse.FullName { return nil } diff --git a/private/bufpkg/bufconfig/buf_lock_file.go b/private/bufpkg/bufconfig/buf_lock_file.go index ace54fd8e5..3eee9d2fb6 100644 --- a/private/bufpkg/bufconfig/buf_lock_file.go +++ b/private/bufpkg/bufconfig/buf_lock_file.go @@ -24,6 +24,7 @@ import ( "time" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -65,8 +66,8 @@ type BufLockFile interface { // DepModuleKeys returns the ModuleKeys representing the dependencies as specified in the buf.lock file. // - // All ModuleKeys will have unique ModuleFullNames. - // ModuleKeys are sorted by ModuleFullName. + // All ModuleKeys will have unique FullNames. + // ModuleKeys are sorted by FullName. // // Files with FileVersionV1Beta1 or FileVersionV1 will only have ModuleKeys with Digests of DigestTypeB4, // while Files with FileVersionV2 will only have ModuleKeys with Digests of DigestTypeB5. @@ -190,7 +191,7 @@ func newBufLockFile( objectData ObjectData, depModuleKeys []bufmodule.ModuleKey, ) (*bufLockFile, error) { - if err := validateNoDuplicateModuleKeysByModuleFullName(depModuleKeys); err != nil { + if err := validateNoDuplicateModuleKeysByFullName(depModuleKeys); err != nil { return nil, err } switch fileVersion { @@ -210,7 +211,7 @@ func newBufLockFile( sort.Slice( depModuleKeys, func(i int, j int) bool { - return depModuleKeys[i].ModuleFullName().String() < depModuleKeys[j].ModuleFullName().String() + return depModuleKeys[i].FullName().String() < depModuleKeys[j].FullName().String() }, ) bufLockFile := &bufLockFile{ @@ -278,7 +279,7 @@ func readBufLockFile( if dep.Repository == "" { return nil, errors.New("repository missing") } - moduleFullName, err := bufmodule.NewModuleFullName( + moduleFullName, err := bufparse.NewFullName( dep.Remote, dep.Owner, dep.Repository, @@ -326,7 +327,7 @@ func readBufLockFile( if dep.Name == "" { return nil, errors.New("no module name specified") } - moduleFullName, err := bufmodule.ParseModuleFullName(dep.Name) + moduleFullName, err := bufparse.ParseFullName(dep.Name) if err != nil { return nil, fmt.Errorf("invalid module name: %w", err) } @@ -383,14 +384,14 @@ func writeBufLockFile( return err } externalBufLockFile.Deps[i] = externalBufLockFileDepV1Beta1V1{ - Remote: depModuleKey.ModuleFullName().Registry(), - Owner: depModuleKey.ModuleFullName().Owner(), - Repository: depModuleKey.ModuleFullName().Name(), + Remote: depModuleKey.FullName().Registry(), + Owner: depModuleKey.FullName().Owner(), + Repository: depModuleKey.FullName().Name(), Commit: uuidutil.ToDashless(depModuleKey.CommitID()), Digest: digest.String(), } } - // No need to sort - depModuleKeys is already sorted by ModuleFullName + // No need to sort - depModuleKeys is already sorted by FullName data, err := encoding.MarshalYAML(&externalBufLockFile) if err != nil { return err @@ -409,12 +410,12 @@ func writeBufLockFile( return err } externalBufLockFile.Deps[i] = externalBufLockFileDepV2{ - Name: depModuleKey.ModuleFullName().String(), + Name: depModuleKey.FullName().String(), Commit: uuidutil.ToDashless(depModuleKey.CommitID()), Digest: digest.String(), } } - // No need to sort - depModuleKeys is already sorted by ModuleFullName + // No need to sort - depModuleKeys is already sorted by FullName data, err := encoding.MarshalYAML(&externalBufLockFile) if err != nil { return err @@ -441,10 +442,10 @@ func getDeprecatedDigestTypeForExternalDigest(externalDigest string) string { return "" } -func validateNoDuplicateModuleKeysByModuleFullName(moduleKeys []bufmodule.ModuleKey) error { +func validateNoDuplicateModuleKeysByFullName(moduleKeys []bufmodule.ModuleKey) error { moduleFullNameStringMap := make(map[string]struct{}) for _, moduleKey := range moduleKeys { - moduleFullNameString := moduleKey.ModuleFullName().String() + moduleFullNameString := moduleKey.FullName().String() if _, ok := moduleFullNameStringMap[moduleFullNameString]; ok { return fmt.Errorf("duplicate module %q attempted to be added to lock file", moduleFullNameString) } @@ -462,7 +463,7 @@ func validateV1AndV1Beta1DepsHaveCommits(bufLockFile BufLockFile) error { return syserror.Newf( "%s lock files require commits, however we did not have a commit for module %q", fileVersion.String(), - depModuleKey.ModuleFullName().String(), + depModuleKey.FullName().String(), ) } } diff --git a/private/bufpkg/bufconfig/buf_yaml_file.go b/private/bufpkg/bufconfig/buf_yaml_file.go index dc3472929f..ebe5abb6be 100644 --- a/private/bufpkg/bufconfig/buf_yaml_file.go +++ b/private/bufpkg/bufconfig/buf_yaml_file.go @@ -25,7 +25,7 @@ import ( "path/filepath" "sort" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -71,7 +71,7 @@ type BufYAMLFile interface { // For v1 buf.yaml, this will only have a single ModuleConfig. // // This will always be non-empty. - // All ModuleConfigs will have unique ModuleFullNames, but not necessarily + // All ModuleConfigs will have unique FullNames, but not necessarily // unique DirPaths. // // The module configs are sorted by DirPath. If two module configs have the @@ -108,9 +108,9 @@ type BufYAMLFile interface { // // These come from buf.yaml files. // - // The ModuleRefs in this list will be unique by ModuleFullName. - // Sorted by ModuleFullName. - ConfiguredDepModuleRefs() []bufmodule.ModuleRef + // The ModuleRefs in this list will be unique by FullName. + // Sorted by FullName. + ConfiguredDepModuleRefs() []bufparse.Ref //IncludeDocsLink specifies whether a top-level comment with a link to our public docs // should be included at the top of the buf.yaml file. IncludeDocsLink() bool @@ -125,7 +125,7 @@ func NewBufYAMLFile( fileVersion FileVersion, moduleConfigs []ModuleConfig, pluginConfigs []PluginConfig, - configuredDepModuleRefs []bufmodule.ModuleRef, + configuredDepModuleRefs []bufparse.Ref, options ...BufYAMLFileOption, ) (BufYAMLFile, error) { bufYAMLFileOptions := newBufYAMLFileOptions() @@ -253,7 +253,7 @@ type bufYAMLFile struct { topLevelLintConfig LintConfig topLevelBreakingConfig BreakingConfig pluginConfigs []PluginConfig - configuredDepModuleRefs []bufmodule.ModuleRef + configuredDepModuleRefs []bufparse.Ref includeDocsLink bool } @@ -264,7 +264,7 @@ func newBufYAMLFile( topLevelLintConfig LintConfig, topLevelBreakingConfig BreakingConfig, pluginConfigs []PluginConfig, - configuredDepModuleRefs []bufmodule.ModuleRef, + configuredDepModuleRefs []bufparse.Ref, includeDocsLink bool, ) (*bufYAMLFile, error) { if (fileVersion == FileVersionV1Beta1 || fileVersion == FileVersionV1) && len(moduleConfigs) > 1 { @@ -290,10 +290,10 @@ func newBufYAMLFile( } } // Zero values are not added to duplicates. - if _, err := bufmodule.ModuleFullNameStringToUniqueValue(moduleConfigs); err != nil { + if _, err := bufparse.FullNameStringToUniqueValue(moduleConfigs); err != nil { return nil, err } - if _, err := bufmodule.ModuleFullNameStringToUniqueValue(configuredDepModuleRefs); err != nil { + if _, err := bufparse.FullNameStringToUniqueValue(configuredDepModuleRefs); err != nil { return nil, err } // Since multiple module configs with the same DirPath are allowed in v2, we need a stable sort @@ -308,8 +308,8 @@ func newBufYAMLFile( sort.Slice( configuredDepModuleRefs, func(i int, j int) bool { - return configuredDepModuleRefs[i].ModuleFullName().String() < - configuredDepModuleRefs[j].ModuleFullName().String() + return configuredDepModuleRefs[i].FullName().String() < + configuredDepModuleRefs[j].FullName().String() }, ) return &bufYAMLFile{ @@ -352,7 +352,7 @@ func (c *bufYAMLFile) PluginConfigs() []PluginConfig { return c.pluginConfigs } -func (c *bufYAMLFile) ConfiguredDepModuleRefs() []bufmodule.ModuleRef { +func (c *bufYAMLFile) ConfiguredDepModuleRefs() []bufparse.Ref { return slicesext.Copy(c.configuredDepModuleRefs) } @@ -394,9 +394,9 @@ func readBufYAMLFile( if fileVersion == FileVersionV1 && len(externalBufYAMLFile.Build.Roots) > 0 { return nil, fmt.Errorf("build.roots cannot be set on version %v: %v", fileVersion, externalBufYAMLFile.Build.Roots) } - var moduleFullName bufmodule.ModuleFullName + var moduleFullName bufparse.FullName if externalBufYAMLFile.Name != "" { - moduleFullName, err = bufmodule.ParseModuleFullName(externalBufYAMLFile.Name) + moduleFullName, err = bufparse.ParseFullName(externalBufYAMLFile.Name) if err != nil { return nil, err } @@ -486,9 +486,9 @@ func readBufYAMLFile( if err != nil { return nil, fmt.Errorf("invalid module path: %w", err) } - var moduleFullName bufmodule.ModuleFullName + var moduleFullName bufparse.FullName if externalModule.Name != "" { - moduleFullName, err = bufmodule.ParseModuleFullName(externalModule.Name) + moduleFullName, err = bufparse.ParseFullName(externalModule.Name) if err != nil { return nil, err } @@ -689,11 +689,11 @@ func writeBufYAMLFile(writer io.Writer, bufYAMLFile BufYAMLFile) error { // Already sorted. externalBufYAMLFile.Deps = slicesext.Map( bufYAMLFile.ConfiguredDepModuleRefs(), - func(moduleRef bufmodule.ModuleRef) string { + func(moduleRef bufparse.Ref) string { return moduleRef.String() }, ) - if moduleFullName := moduleConfig.ModuleFullName(); moduleFullName != nil { + if moduleFullName := moduleConfig.FullName(); moduleFullName != nil { externalBufYAMLFile.Name = moduleFullName.String() } rootToExcludes := moduleConfig.RootToExcludes() @@ -761,7 +761,7 @@ func writeBufYAMLFile(writer io.Writer, bufYAMLFile BufYAMLFile) error { // Already sorted. externalBufYAMLFile.Deps = slicesext.Map( bufYAMLFile.ConfiguredDepModuleRefs(), - func(moduleRef bufmodule.ModuleRef) string { + func(moduleRef bufparse.Ref) string { return moduleRef.String() }, ) @@ -791,7 +791,7 @@ func writeBufYAMLFile(writer io.Writer, bufYAMLFile BufYAMLFile) error { externalModule := externalBufYAMLFileModuleV2{ Path: moduleDirPath, } - if moduleFullName := moduleConfig.ModuleFullName(); moduleFullName != nil { + if moduleFullName := moduleConfig.FullName(); moduleFullName != nil { externalModule.Name = moduleFullName.String() } rootToIncludes := moduleConfig.RootToIncludes() @@ -963,10 +963,10 @@ func getRootToExcludes(roots []string, fullExcludes []string) (map[string][]stri func getConfiguredDepModuleRefsForExternalDeps( externalDeps []string, -) ([]bufmodule.ModuleRef, error) { - configuredDepModuleRefs := make([]bufmodule.ModuleRef, len(externalDeps)) +) ([]bufparse.Ref, error) { + configuredDepModuleRefs := make([]bufparse.Ref, len(externalDeps)) for i, externalDep := range externalDeps { - moduleRef, err := bufmodule.ParseModuleRef(externalDep) + moduleRef, err := bufparse.ParseRef(externalDep) if err != nil { return nil, fmt.Errorf("invalid dep: %w", err) } diff --git a/private/bufpkg/bufconfig/generate_managed_config.go b/private/bufpkg/bufconfig/generate_managed_config.go index 567d7da5ab..8ec74b86ca 100644 --- a/private/bufpkg/bufconfig/generate_managed_config.go +++ b/private/bufpkg/bufconfig/generate_managed_config.go @@ -20,7 +20,7 @@ import ( "strconv" "strings" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" ) @@ -58,16 +58,16 @@ func NewGenerateManagedConfig( // it means for all files/fields the specified options are not modified. // // A ManagedDisableRule is guaranteed to specify at least one of the two aspects. -// i.e. At least one of Path, ModuleFullName, FieldName, FileOption and +// i.e. At least one of Path, FullName, FieldName, FileOption and // FieldOption is not empty. A rule can disable all options for certain files/fields, // disable certains options for all files/fields, or disable certain options for // certain files/fields. To disable all options for all files/fields, turn off managed mode. type ManagedDisableRule interface { // Path returns the file path, relative to its module, to disable managed mode for. Path() string - // ModuleFullName returns the full name string of the module to disable + // FullName returns the full name string of the module to disable // managed mode for. - ModuleFullName() string + FullName() string // FieldName returns the fully qualified name for the field to disable managed // mode for. This is guaranteed to be empty if FileOption is not empty. FieldName() string @@ -101,16 +101,16 @@ func NewManagedDisableRule( // // - The options to modify. Exactly one of FileOption and FieldOption is not empty. // - The value to modify these options with. -// - The files/fields for which the options are modified. If all of Path, ModuleFullName +// - The files/fields for which the options are modified. If all of Path, FullName // - or FieldName are empty, all files/fields are modified. Otherwise, only -// file/fields that match the specified Path, ModuleFullName and FieldName +// file/fields that match the specified Path, FullName and FieldName // is modified. type ManagedOverrideRule interface { // Path is the file path, relative to its module, to disable managed mode for. Path() string - // ModuleFullName is the full name string of the module to disable + // FullName is the full name string of the module to disable // managed mode for. - ModuleFullName() string + FullName() string // FieldName is the fully qualified name for the field to disable managed // mode for. This is guaranteed to be empty is FileOption is not empty. FieldName() string @@ -531,7 +531,7 @@ func newManagedDisableRule( } } if moduleFullName != "" { - if _, err := bufmodule.ParseModuleFullName(moduleFullName); err != nil { + if _, err := bufparse.ParseFullName(moduleFullName); err != nil { return nil, err } } @@ -548,7 +548,7 @@ func (m *managedDisableRule) Path() string { return m.path } -func (m *managedDisableRule) ModuleFullName() string { +func (m *managedDisableRule) FullName() string { return m.moduleFullName } @@ -594,7 +594,7 @@ func newFileOptionManagedOverrideRule( return nil, fmt.Errorf("invalid value %v for %v: %w", value, fileOption, err) } if moduleFullName != "" { - if _, err := bufmodule.ParseModuleFullName(moduleFullName); err != nil { + if _, err := bufparse.ParseFullName(moduleFullName); err != nil { return nil, fmt.Errorf("invalid module name for %v override: %w", fileOption, err) } } @@ -631,7 +631,7 @@ func newFieldOptionManagedOverrideRule( return nil, fmt.Errorf("invalid value %v for %v: %w", value, fieldOption, err) } if moduleFullName != "" { - if _, err := bufmodule.ParseModuleFullName(moduleFullName); err != nil { + if _, err := bufparse.ParseFullName(moduleFullName); err != nil { return nil, fmt.Errorf("invalid module name for %v override: %w", fieldOption, err) } } @@ -653,7 +653,7 @@ func (m *managedOverrideRule) Path() string { return m.path } -func (m *managedOverrideRule) ModuleFullName() string { +func (m *managedOverrideRule) FullName() string { return m.moduleFullName } @@ -677,7 +677,7 @@ func (m *managedOverrideRule) isManagedOverrideRule() {} func disablesAndOverridesFromExceptAndOverrideV1( exceptFileOption FileOption, - exceptModuleFullNames []string, + exceptFullNames []string, overrideFileOption FileOption, moduleFullNameToOverride map[string]string, ) ([]ManagedDisableRule, []ManagedOverrideRule, error) { @@ -685,18 +685,18 @@ func disablesAndOverridesFromExceptAndOverrideV1( disables []ManagedDisableRule overrides []ManagedOverrideRule ) - seenExceptModuleFullNames := make(map[string]struct{}, len(exceptModuleFullNames)) - for _, exceptModuleFullName := range exceptModuleFullNames { - if _, err := bufmodule.ParseModuleFullName(exceptModuleFullName); err != nil { + seenExceptFullNames := make(map[string]struct{}, len(exceptFullNames)) + for _, exceptFullName := range exceptFullNames { + if _, err := bufparse.ParseFullName(exceptFullName); err != nil { return nil, nil, err } - if _, ok := seenExceptModuleFullNames[exceptModuleFullName]; ok { - return nil, nil, fmt.Errorf("%q is defined multiple times in except", exceptModuleFullName) + if _, ok := seenExceptFullNames[exceptFullName]; ok { + return nil, nil, fmt.Errorf("%q is defined multiple times in except", exceptFullName) } - seenExceptModuleFullNames[exceptModuleFullName] = struct{}{} + seenExceptFullNames[exceptFullName] = struct{}{} disable, err := newManagedDisableRule( "", - exceptModuleFullName, + exceptFullName, "", exceptFileOption, FieldOptionUnspecified, @@ -707,19 +707,19 @@ func disablesAndOverridesFromExceptAndOverrideV1( disables = append(disables, disable) } // Sort by keys for deterministic order. - sortedModuleFullNames := slicesext.MapKeysToSortedSlice(moduleFullNameToOverride) - for _, overrideModuleFullName := range sortedModuleFullNames { - if _, err := bufmodule.ParseModuleFullName(overrideModuleFullName); err != nil { + sortedFullNames := slicesext.MapKeysToSortedSlice(moduleFullNameToOverride) + for _, overrideFullName := range sortedFullNames { + if _, err := bufparse.ParseFullName(overrideFullName); err != nil { return nil, nil, err } - if _, ok := seenExceptModuleFullNames[overrideModuleFullName]; ok { - return nil, nil, fmt.Errorf("override %q is already defined as an except", overrideModuleFullName) + if _, ok := seenExceptFullNames[overrideFullName]; ok { + return nil, nil, fmt.Errorf("override %q is already defined as an except", overrideFullName) } override, err := NewManagedOverrideRuleForFileOption( "", - overrideModuleFullName, + overrideFullName, overrideFileOption, - moduleFullNameToOverride[overrideModuleFullName], + moduleFullNameToOverride[overrideFullName], ) if err != nil { return nil, nil, err @@ -791,7 +791,7 @@ func newExternalManagedConfigV2FromGenerateManagedConfig( externalManagedDisableConfigV2{ FileOption: fileOptionName, FieldOption: fieldOptionName, - Module: disable.ModuleFullName(), + Module: disable.FullName(), Path: disable.Path(), Field: disable.FieldName(), }, @@ -816,7 +816,7 @@ func newExternalManagedConfigV2FromGenerateManagedConfig( externalManagedOverrideConfigV2{ FileOption: fileOptionName, FieldOption: fieldOptionName, - Module: override.ModuleFullName(), + Module: override.FullName(), Path: override.Path(), Field: override.FieldName(), Value: value, diff --git a/private/bufpkg/bufconfig/module_config.go b/private/bufpkg/bufconfig/module_config.go index f808ff4e62..3b7f3d6313 100644 --- a/private/bufpkg/bufconfig/module_config.go +++ b/private/bufpkg/bufconfig/module_config.go @@ -18,7 +18,7 @@ import ( "errors" "fmt" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" ) @@ -68,7 +68,7 @@ func init() { // ModuleConfig is configuration for a specific Module. // // ModuleConfigs do not expose BucketID or OpaqueID, however DirPath is effectively BucketID, -// and ModuleFullName -> fallback to DirPath effectively is OpaqueID. Given that it is up to +// and FullName -> fallback to DirPath effectively is OpaqueID. Given that it is up to // the user of this package to decide what to do with these fields, we do not name DirPath as // BucketID, and we do not expose OpaqueID. type ModuleConfig interface { @@ -80,10 +80,10 @@ type ModuleConfig interface { // to the Workspace constructor to come up with a BucketID (likely the directory name // within buf.work.yaml). DirPath() string - // ModuleFullName returns the ModuleFullName for the Module, if available. + // FullName returns the FullName for the Module, if available. // // This may be nil. - ModuleFullName() bufmodule.ModuleFullName + FullName() bufparse.FullName // RootToIncludes contains a map from root to the directories to include for that root. // The keys in RootToIncludes are always the same as those in RooToExcludes. // @@ -152,7 +152,7 @@ type ModuleConfig interface { // NewModuleConfig returns a new ModuleConfig. func NewModuleConfig( dirPath string, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, rootToIncludes map[string][]string, rootToExcludes map[string][]string, lintConfig LintConfig, @@ -172,7 +172,7 @@ func NewModuleConfig( type moduleConfig struct { dirPath string - moduleFullName bufmodule.ModuleFullName + moduleFullName bufparse.FullName rootToIncludes map[string][]string rootToExcludes map[string][]string lintConfig LintConfig @@ -182,7 +182,7 @@ type moduleConfig struct { // All validations are syserrors as we only ever read ModuleConfigs. func newModuleConfig( dirPath string, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, rootToIncludes map[string][]string, rootToExcludes map[string][]string, lintConfig LintConfig, @@ -252,7 +252,7 @@ func (m *moduleConfig) DirPath() string { return m.dirPath } -func (m *moduleConfig) ModuleFullName() bufmodule.ModuleFullName { +func (m *moduleConfig) FullName() bufparse.FullName { return m.moduleFullName } diff --git a/private/bufpkg/bufimage/bufimage.go b/private/bufpkg/bufimage/bufimage.go index 3f3ba08558..18299cb723 100644 --- a/private/bufpkg/bufimage/bufimage.go +++ b/private/bufpkg/bufimage/bufimage.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/gen/data/datawkt" imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/normalpath" @@ -47,18 +48,18 @@ import ( type ImageFileInfo interface { storage.ObjectInfo - // ModuleFullName returns the full name of the Module that this ImageFile came from, + // FullName returns the full name of the Module that this ImageFile came from, // if the ImageFile came from a Module (as opposed to a serialized Protobuf message), - // and if the ModuleFullName was known. + // and if the FullName was known. // // May be nil. Callers should not rely on this value being present. - ModuleFullName() bufmodule.ModuleFullName + FullName() bufparse.FullName // CommitID returns the BSR ID of the Commit of the Module that this ImageFile came from. // if the ImageFile came from a Module (as opposed to a serialized Protobuf message), and // if the CommitID was known.. // // May be empty, that is CommitID() == uuid.Nil may be true. Callers should not rely on this - // value being present. If ModuleFullName is nil, this will always be empty. + // value being present. If FullName is nil, this will always be empty. CommitID() uuid.UUID // Imports returns the imports for this ImageFile. Imports() ([]string, error) @@ -182,7 +183,7 @@ type ImageFile interface { // TODO FUTURE: moduleFullName and commitID should be options since they are optional. func NewImageFile( fileDescriptor protodescriptor.FileDescriptor, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, externalPath string, localPath string, @@ -214,7 +215,7 @@ func ImageFileWithIsImport(imageFile ImageFile, isImport bool) ImageFile { // No need to validate as ImageFile is already validated. return newImageFileNoValidate( imageFile.FileDescriptorProto(), - imageFile.ModuleFullName(), + imageFile.FullName(), imageFile.CommitID(), imageFile.ExternalPath(), imageFile.LocalPath(), @@ -231,7 +232,7 @@ type Image interface { // This contains all files, including imports if available. // The returned files are in correct DAG order. // - // All files that have the same ModuleFullName will also have the same commit, or no commit. + // All files that have the same FullName will also have the same commit, or no commit. // This is enforced at construction time. Files() []ImageFile // GetFile gets the file for the root relative file path. @@ -337,7 +338,7 @@ func CloneImageFile(imageFile ImageFile) (ImageFile, error) { // The other attributes are already immutable, so we don't need to copy them. return NewImageFile( clonedDescriptor, - imageFile.ModuleFullName(), + imageFile.FullName(), imageFile.CommitID(), imageFile.ExternalPath(), imageFile.LocalPath(), @@ -377,7 +378,7 @@ func NewImageForProto(protoImage *imagev1.Image, options ...NewImageForProtoOpti var isImport bool var isSyntaxUnspecified bool var unusedDependencyIndexes []int32 - var moduleFullName bufmodule.ModuleFullName + var moduleFullName bufparse.FullName var commitID uuid.UUID var err error if protoImageFileExtension := protoImageFile.GetBufExtension(); protoImageFileExtension != nil { @@ -386,7 +387,7 @@ func NewImageForProto(protoImage *imagev1.Image, options ...NewImageForProtoOpti unusedDependencyIndexes = protoImageFileExtension.GetUnusedDependency() if protoModuleInfo := protoImageFileExtension.GetModuleInfo(); protoModuleInfo != nil { if protoModuleName := protoModuleInfo.GetName(); protoModuleName != nil { - moduleFullName, err = bufmodule.NewModuleFullName( + moduleFullName, err = bufparse.NewFullName( protoModuleName.GetRemote(), protoModuleName.GetOwner(), protoModuleName.GetRepository(), diff --git a/private/bufpkg/bufimage/bufimagemodify/bufimagemodify_test.go b/private/bufpkg/bufimage/bufimagemodify/bufimagemodify_test.go index 9bfb1d6ac8..d842395f5f 100644 --- a/private/bufpkg/bufimage/bufimagemodify/bufimagemodify_test.go +++ b/private/bufpkg/bufimage/bufimagemodify/bufimagemodify_test.go @@ -25,6 +25,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagetesting" "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slogtestext" "github.com/google/go-cmp/cmp" "github.com/google/uuid" @@ -38,13 +39,13 @@ func TestModifyImage(t *testing.T) { t.Parallel() testcases := []struct { description string - dirPathToModuleFullName map[string]string + dirPathToFullName map[string]string config bufconfig.GenerateManagedConfig filePathToExpectedOptions map[string]*descriptorpb.FileOptions }{ { description: "nil_config", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -74,7 +75,7 @@ func TestModifyImage(t *testing.T) { }, { description: "empty_config", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -154,7 +155,7 @@ func TestModifyImage(t *testing.T) { includeSourceInfo := includeSourceInfo t.Run(testcase.description, func(t *testing.T) { t.Parallel() - image := testGetImageFromDirs(t, testcase.dirPathToModuleFullName, includeSourceInfo) + image := testGetImageFromDirs(t, testcase.dirPathToFullName, includeSourceInfo) err := Modify( image, testcase.config, @@ -180,7 +181,7 @@ func TestModifyImageFile( t.Parallel() testcases := []struct { description string - dirPathToModuleFullName map[string]string + dirPathToFullName map[string]string config bufconfig.GenerateManagedConfig modifyFunc func(internal.MarkSweeper, bufimage.ImageFile, bufconfig.GenerateManagedConfig, ...ModifyOption) error filePathToExpectedOptions map[string]*descriptorpb.FileOptions @@ -188,7 +189,7 @@ func TestModifyImageFile( }{ { description: "cc_enable_arena", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -212,7 +213,7 @@ func TestModifyImageFile( }, { description: "csharp_namespace", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -249,7 +250,7 @@ func TestModifyImageFile( }, { description: "go_package", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -289,7 +290,7 @@ func TestModifyImageFile( }, { description: "java_package_prefix", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -383,7 +384,7 @@ func TestModifyImageFile( }, { description: "java_package_suffix", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -437,7 +438,7 @@ func TestModifyImageFile( }, { description: "java_package", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -490,7 +491,7 @@ func TestModifyImageFile( }, { description: "objc_class_prefix", - dirPathToModuleFullName: map[string]string{ + dirPathToFullName: map[string]string{ filepath.Join("testdata", "foo"): "buf.build/acme/foo", filepath.Join("testdata", "bar"): "buf.build/acme/bar", }, @@ -555,7 +556,7 @@ func TestModifyImageFile( includeSourceInfo := includeSourceInfo t.Run(testcase.description, func(t *testing.T) { t.Parallel() - image := testGetImageFromDirs(t, testcase.dirPathToModuleFullName, includeSourceInfo) + image := testGetImageFromDirs(t, testcase.dirPathToFullName, includeSourceInfo) sweeper := internal.NewMarkSweeper(image) // TODO FUTURE: check include source code info for filePath, expectedOptions := range testcase.filePathToExpectedOptions { @@ -770,7 +771,7 @@ func testGetImageFile( path string, moduleFullName string, ) bufimage.ImageFile { - parsedModuleFullName, err := bufmodule.ParseModuleFullName(moduleFullName) + parsedFullName, err := bufparse.ParseFullName(moduleFullName) require.NoError(t, err) return bufimagetesting.NewImageFile( t, @@ -778,7 +779,7 @@ func testGetImageFile( Name: proto.String(path), Syntax: proto.String("proto3"), }, - parsedModuleFullName, + parsedFullName, uuid.Nil, path, "", @@ -790,11 +791,11 @@ func testGetImageFile( func testGetImageFromDirs( t *testing.T, - dirPathToModuleFullName map[string]string, + dirPathToFullName map[string]string, includeSourceInfo bool, ) bufimage.Image { - moduleDatas := make([]bufmoduletesting.ModuleData, 0, len(dirPathToModuleFullName)) - for dirPath, moduleFullName := range dirPathToModuleFullName { + moduleDatas := make([]bufmoduletesting.ModuleData, 0, len(dirPathToFullName)) + for dirPath, moduleFullName := range dirPathToFullName { moduleDatas = append( moduleDatas, bufmoduletesting.ModuleData{ diff --git a/private/bufpkg/bufimage/bufimagemodify/field_option.go b/private/bufpkg/bufimage/bufimagemodify/field_option.go index b4dcd64e1e..d19e1d8222 100644 --- a/private/bufpkg/bufimage/bufimagemodify/field_option.go +++ b/private/bufpkg/bufimage/bufimagemodify/field_option.go @@ -47,7 +47,7 @@ func modifyJsType( config.Overrides(), func(override bufconfig.ManagedOverrideRule) bool { return override.FieldOption() == bufconfig.FieldOptionJSType && - fileMatchConfig(imageFile, override.Path(), override.ModuleFullName()) + fileMatchConfig(imageFile, override.Path(), override.FullName()) }, ) // Unless specified, js type is not modified. @@ -60,7 +60,7 @@ func modifyJsType( return (disable.FieldOption() == bufconfig.FieldOptionJSType || (disable.FieldOption() == bufconfig.FieldOptionUnspecified && disable.FileOption() == bufconfig.FileOptionUnspecified)) && - fileMatchConfig(imageFile, disable.Path(), disable.ModuleFullName()) + fileMatchConfig(imageFile, disable.Path(), disable.FullName()) }, ) // If the entire file is disabled, skip. diff --git a/private/bufpkg/bufimage/bufimagemodify/override.go b/private/bufpkg/bufimage/bufimagemodify/override.go index 1b0e9d41d8..b819d856fd 100644 --- a/private/bufpkg/bufimage/bufimagemodify/override.go +++ b/private/bufpkg/bufimage/bufimagemodify/override.go @@ -157,7 +157,7 @@ func stringOverrideFromConfig( overrideOptions.suffix = "" } for _, overrideRule := range config.Overrides() { - if !fileMatchConfig(imageFile, overrideRule.Path(), overrideRule.ModuleFullName()) { + if !fileMatchConfig(imageFile, overrideRule.Path(), overrideRule.FullName()) { continue } switch overrideRule.FileOption() { @@ -210,7 +210,7 @@ func overrideFromConfig[T bool | descriptorpb.FileOptions_OptimizeMode]( ) (*T, error) { var override *T for _, overrideRule := range config.Overrides() { - if !fileMatchConfig(imageFile, overrideRule.Path(), overrideRule.ModuleFullName()) { + if !fileMatchConfig(imageFile, overrideRule.Path(), overrideRule.FullName()) { continue } if overrideRule.FileOption() != fileOption { @@ -238,7 +238,7 @@ func isFileOptionDisabledForFile( if disableRule.FieldOption() != bufconfig.FieldOptionUnspecified { continue // FieldOption specified, not a matching rule. } - if !fileMatchConfig(imageFile, disableRule.Path(), disableRule.ModuleFullName()) { + if !fileMatchConfig(imageFile, disableRule.Path(), disableRule.FullName()) { continue } return true @@ -249,12 +249,12 @@ func isFileOptionDisabledForFile( func fileMatchConfig( imageFile bufimage.ImageFile, requiredPath string, - requiredModuleFullName string, + requiredFullName string, ) bool { if requiredPath != "" && !normalpath.EqualsOrContainsPath(requiredPath, imageFile.Path(), normalpath.Relative) { return false } - if requiredModuleFullName != "" && (imageFile.ModuleFullName() == nil || imageFile.ModuleFullName().String() != requiredModuleFullName) { + if requiredFullName != "" && (imageFile.FullName() == nil || imageFile.FullName().String() != requiredFullName) { return false } return true diff --git a/private/bufpkg/bufimage/bufimagetesting/bufimagetesting.go b/private/bufpkg/bufimage/bufimagetesting/bufimagetesting.go index f18e740e72..a6f23420d0 100644 --- a/private/bufpkg/bufimage/bufimagetesting/bufimagetesting.go +++ b/private/bufpkg/bufimage/bufimagetesting/bufimagetesting.go @@ -18,7 +18,7 @@ import ( "testing" "github.com/bufbuild/buf/private/bufpkg/bufimage" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/protodescriptor" "github.com/google/uuid" @@ -33,7 +33,7 @@ import ( func NewImageFile( t testing.TB, fileDescriptor protodescriptor.FileDescriptor, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, commit uuid.UUID, externalPath string, localPath string, @@ -108,7 +108,7 @@ func normalizeImageFiles(t testing.TB, imageFiles []bufimage.ImageFile) []bufima imageFile.FileDescriptorProto().GetName(), imageFile.FileDescriptorProto().GetDependency()..., ), - imageFile.ModuleFullName(), + imageFile.FullName(), imageFile.CommitID(), imageFile.ExternalPath(), imageFile.LocalPath(), diff --git a/private/bufpkg/bufimage/bufimageutil/bufimageutil.go b/private/bufpkg/bufimage/bufimageutil/bufimageutil.go index 152eecd89b..414dbb7ef2 100644 --- a/private/bufpkg/bufimage/bufimageutil/bufimageutil.go +++ b/private/bufpkg/bufimage/bufimageutil/bufimageutil.go @@ -991,7 +991,7 @@ func stripSourceRetentionOptionsFromFile(imageFile bufimage.ImageFile) (bufimage } return bufimage.NewImageFile( updatedFileDescriptor, - imageFile.ModuleFullName(), + imageFile.FullName(), imageFile.CommitID(), imageFile.ExternalPath(), imageFile.LocalPath(), diff --git a/private/bufpkg/bufimage/build_image.go b/private/bufpkg/bufimage/build_image.go index a29555014e..136d88b09f 100644 --- a/private/bufpkg/bufimage/build_image.go +++ b/private/bufpkg/bufimage/build_image.go @@ -346,7 +346,7 @@ func getImageFilesRec( _, syntaxUnspecified := syntaxUnspecifiedFilenames[path] imageFile, err := NewImageFile( fileDescriptorProto, - parserAccessorHandler.ModuleFullName(path), + parserAccessorHandler.FullName(path), parserAccessorHandler.CommitID(path), // if empty, defaults to path parserAccessorHandler.ExternalPath(path), diff --git a/private/bufpkg/bufimage/image.go b/private/bufpkg/bufimage/image.go index 0de02f1378..a35343b30b 100644 --- a/private/bufpkg/bufimage/image.go +++ b/private/bufpkg/bufimage/image.go @@ -48,7 +48,7 @@ func newImage(files []ImageFile, reorder bool, resolver protoencoding.Resolver) return nil, fmt.Errorf("duplicate file: %s", path) } pathToImageFile[path] = file - if moduleFullName := file.ModuleFullName(); moduleFullName != nil { + if moduleFullName := file.FullName(); moduleFullName != nil { moduleFullNameString := moduleFullName.String() existing, ok := moduleFullNameStringToCommitIDAndFilePath[moduleFullNameString] if ok { diff --git a/private/bufpkg/bufimage/image_file.go b/private/bufpkg/bufimage/image_file.go index 32aacd85e4..9830ce8745 100644 --- a/private/bufpkg/bufimage/image_file.go +++ b/private/bufpkg/bufimage/image_file.go @@ -15,7 +15,7 @@ package bufimage import ( - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/protodescriptor" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/google/uuid" @@ -26,7 +26,7 @@ var _ ImageFile = &imageFile{} type imageFile struct { fileDescriptorProto *descriptorpb.FileDescriptorProto - moduleFullName bufmodule.ModuleFullName + moduleFullName bufparse.FullName commitID uuid.UUID externalPath string localPath string @@ -37,7 +37,7 @@ type imageFile struct { func newImageFile( fileDescriptor protodescriptor.FileDescriptor, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, externalPath string, localPath string, @@ -62,7 +62,7 @@ func newImageFile( func newImageFileNoValidate( fileDescriptor protodescriptor.FileDescriptor, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, externalPath string, localPath string, @@ -103,7 +103,7 @@ func (f *imageFile) LocalPath() string { return f.localPath } -func (f *imageFile) ModuleFullName() bufmodule.ModuleFullName { +func (f *imageFile) FullName() bufparse.FullName { return f.moduleFullName } diff --git a/private/bufpkg/bufimage/module_image_file_info.go b/private/bufpkg/bufimage/module_image_file_info.go index a4905e2858..0f5b88baad 100644 --- a/private/bufpkg/bufimage/module_image_file_info.go +++ b/private/bufpkg/bufimage/module_image_file_info.go @@ -16,6 +16,7 @@ package bufimage import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/google/uuid" ) @@ -29,8 +30,8 @@ func newModuleImageFileInfo(fileInfo bufmodule.FileInfo) *moduleImageFileInfo { } } -func (p *moduleImageFileInfo) ModuleFullName() bufmodule.ModuleFullName { - return p.FileInfo.Module().ModuleFullName() +func (p *moduleImageFileInfo) FullName() bufparse.FullName { + return p.FileInfo.Module().FullName() } func (p *moduleImageFileInfo) CommitID() uuid.UUID { diff --git a/private/bufpkg/bufimage/parser_accessor_handler.go b/private/bufpkg/bufimage/parser_accessor_handler.go index 8d8aedc2af..d214e5aa99 100644 --- a/private/bufpkg/bufimage/parser_accessor_handler.go +++ b/private/bufpkg/bufimage/parser_accessor_handler.go @@ -23,19 +23,20 @@ import ( "sync" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/gen/data/datawkt" "github.com/google/uuid" ) type parserAccessorHandler struct { - ctx context.Context - moduleReadBucket bufmodule.ModuleReadBucket - pathToExternalPath map[string]string - pathToLocalPath map[string]string - nonImportPaths map[string]struct{} - pathToModuleFullName map[string]bufmodule.ModuleFullName - pathToCommitID map[string]uuid.UUID - lock sync.RWMutex + ctx context.Context + moduleReadBucket bufmodule.ModuleReadBucket + pathToExternalPath map[string]string + pathToLocalPath map[string]string + nonImportPaths map[string]struct{} + pathToFullName map[string]bufparse.FullName + pathToCommitID map[string]uuid.UUID + lock sync.RWMutex } func newParserAccessorHandler( @@ -43,13 +44,13 @@ func newParserAccessorHandler( moduleReadBucket bufmodule.ModuleReadBucket, ) *parserAccessorHandler { return &parserAccessorHandler{ - ctx: ctx, - moduleReadBucket: moduleReadBucket, - pathToExternalPath: make(map[string]string), - pathToLocalPath: make(map[string]string), - nonImportPaths: make(map[string]struct{}), - pathToModuleFullName: make(map[string]bufmodule.ModuleFullName), - pathToCommitID: make(map[string]uuid.UUID), + ctx: ctx, + moduleReadBucket: moduleReadBucket, + pathToExternalPath: make(map[string]string), + pathToLocalPath: make(map[string]string), + nonImportPaths: make(map[string]struct{}), + pathToFullName: make(map[string]bufparse.FullName), + pathToCommitID: make(map[string]uuid.UUID), } } @@ -87,7 +88,7 @@ func (p *parserAccessorHandler) Open(path string) (_ io.ReadCloser, retErr error path, moduleFile.ExternalPath(), moduleFile.LocalPath(), - moduleFile.Module().ModuleFullName(), + moduleFile.Module().FullName(), moduleFile.Module().CommitID(), ); err != nil { return nil, err @@ -114,11 +115,11 @@ func (p *parserAccessorHandler) LocalPath(path string) string { return p.pathToLocalPath[path] } -// ModuleFullName returns nil if not available. -func (p *parserAccessorHandler) ModuleFullName(path string) bufmodule.ModuleFullName { +// FullName returns nil if not available. +func (p *parserAccessorHandler) FullName(path string) bufparse.FullName { p.lock.RLock() defer p.lock.RUnlock() - return p.pathToModuleFullName[path] // nil is a valid value. + return p.pathToFullName[path] // nil is a valid value. } // CommitID returns empty if not available. @@ -132,7 +133,7 @@ func (p *parserAccessorHandler) addPath( path string, externalPath string, localPath string, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, ) error { p.lock.Lock() @@ -156,7 +157,7 @@ func (p *parserAccessorHandler) addPath( } } if moduleFullName != nil { - p.pathToModuleFullName[path] = moduleFullName + p.pathToFullName[path] = moduleFullName } if commitID != uuid.Nil { p.pathToCommitID[path] = commitID diff --git a/private/bufpkg/bufimage/util.go b/private/bufpkg/bufimage/util.go index a6eb391652..20df2a4507 100644 --- a/private/bufpkg/bufimage/util.go +++ b/private/bufpkg/bufimage/util.go @@ -18,7 +18,7 @@ import ( "errors" "fmt" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/gen/data/datawkt" imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/normalpath" @@ -311,7 +311,7 @@ func imageFileToProtoImageFile(imageFile ImageFile) (*imagev1.ImageFile, error) imageFile.IsImport(), imageFile.IsSyntaxUnspecified(), imageFile.UnusedDependencyIndexes(), - imageFile.ModuleFullName(), + imageFile.FullName(), protoCommitID, ), nil } @@ -321,7 +321,7 @@ func fileDescriptorProtoToProtoImageFile( isImport bool, isSyntaxUnspecified bool, unusedDependencyIndexes []int32, - moduleFullName bufmodule.ModuleFullName, + moduleFullName bufparse.FullName, // Dashless moduleProtoCommitID string, ) *imagev1.ImageFile { diff --git a/private/bufpkg/bufimage/util_test.go b/private/bufpkg/bufimage/util_test.go index 46a8e8da7b..82259447a1 100644 --- a/private/bufpkg/bufimage/util_test.go +++ b/private/bufpkg/bufimage/util_test.go @@ -18,7 +18,7 @@ import ( "bytes" "testing" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1" "github.com/bufbuild/buf/private/pkg/protoencoding" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -143,7 +143,7 @@ func TestImageToProtoPreservesUnrecognizedFields(t *testing.T) { otherData = protowire.AppendFixed32(otherData, 23456) fileDescriptor.ProtoReflect().SetUnknown(otherData) - moduleFullName, err := bufmodule.ParseModuleFullName("buf.build/foo/bar") + moduleFullName, err := bufparse.ParseFullName("buf.build/foo/bar") require.NoError(t, err) commitID, err := uuidutil.New() require.NoError(t, err) @@ -176,7 +176,7 @@ func TestImageToProtoPreservesUnrecognizedFields(t *testing.T) { // if we go back through an image file, we should strip out the // buf extension unknown bytes but preserve the rest - moduleFullName, err = bufmodule.ParseModuleFullName("buf.build/abc/def") + moduleFullName, err = bufparse.ParseFullName("buf.build/abc/def") require.NoError(t, err) // NB: intentionally different metadata commitID2, err := uuidutil.New() diff --git a/private/bufpkg/bufimage/well_known_type_image_file_info.go b/private/bufpkg/bufimage/well_known_type_image_file_info.go index d6a4c0007c..be2d127f06 100644 --- a/private/bufpkg/bufimage/well_known_type_image_file_info.go +++ b/private/bufpkg/bufimage/well_known_type_image_file_info.go @@ -15,7 +15,7 @@ package bufimage import ( - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/storage" "github.com/google/uuid" ) @@ -38,7 +38,7 @@ func newWellKnownTypeImageFileInfo( } } -func (p *wellKnownTypeImageFileInfo) ModuleFullName() bufmodule.ModuleFullName { +func (p *wellKnownTypeImageFileInfo) FullName() bufparse.FullName { return nil } diff --git a/private/bufpkg/bufmodule/added_module.go b/private/bufpkg/bufmodule/added_module.go index 7e54692309..611fa9a333 100644 --- a/private/bufpkg/bufmodule/added_module.go +++ b/private/bufpkg/bufmodule/added_module.go @@ -89,7 +89,7 @@ func (a *addedModule) IsTarget() bool { // OpaqueID returns the OpaqueID of the addedModule. func (a *addedModule) OpaqueID() string { if a.remoteModuleKey != nil { - return a.remoteModuleKey.ModuleFullName().String() + return a.remoteModuleKey.FullName().String() } return a.localModule.OpaqueID() } @@ -121,14 +121,14 @@ func (a *addedModule) ToModule( return nil, syserror.Newf("expected 1 ModuleData, got %d", len(moduleDatas)) } moduleData := moduleDatas[0] - if moduleData.ModuleKey().ModuleFullName() == nil { - return nil, syserror.New("got nil ModuleFullName for a ModuleKey returned from a ModuleDataProvider") + if moduleData.ModuleKey().FullName() == nil { + return nil, syserror.New("got nil FullName for a ModuleKey returned from a ModuleDataProvider") } - if a.remoteModuleKey.ModuleFullName().String() != moduleData.ModuleKey().ModuleFullName().String() { + if a.remoteModuleKey.FullName().String() != moduleData.ModuleKey().FullName().String() { return nil, syserror.Newf( - "mismatched ModuleFullName from ModuleDataProvider: input %q, output %q", - a.remoteModuleKey.ModuleFullName().String(), - moduleData.ModuleKey().ModuleFullName().String(), + "mismatched FullName from ModuleDataProvider: input %q, output %q", + a.remoteModuleKey.FullName().String(), + moduleData.ModuleKey().FullName().String(), ) } return moduleData, nil @@ -255,7 +255,7 @@ func (a *addedModule) ToModule( // To accomplish this, we need to take the dependencies of the declared ModuleKeys (ie what // the Module actually says is in its buf.lock). This function enables us to do that for // digest calculations. Within the Module, we say that if we get a remote Module, use the - // declared ModuleKeys instead of whatever Module we have resolved to for a given ModuleFullName. + // declared ModuleKeys instead of whatever Module we have resolved to for a given FullName. getDeclaredDepModuleKeysB5 := func() ([]ModuleKey, error) { moduleData, err := getModuleData() if err != nil { @@ -288,7 +288,7 @@ func (a *addedModule) ToModule( // from B4 to B5 by using the commit provider. commitKeysToFetch := make([]CommitKey, len(declaredDepModuleKeys)) for i, declaredDepModuleKey := range declaredDepModuleKeys { - commitKey, err := NewCommitKey(declaredDepModuleKey.ModuleFullName().Registry(), declaredDepModuleKey.CommitID(), DigestTypeB5) + commitKey, err := NewCommitKey(declaredDepModuleKey.FullName().Registry(), declaredDepModuleKey.CommitID(), DigestTypeB5) if err != nil { return nil, err } @@ -316,7 +316,7 @@ func (a *addedModule) ToModule( getBucket, "", "", - a.remoteModuleKey.ModuleFullName(), + a.remoteModuleKey.FullName(), a.remoteModuleKey.CommitID(), a.isTarget, false, @@ -343,9 +343,9 @@ func (a *addedModule) ToModule( // // When returned, all modules have unique opaqueIDs and Digests. // -// Note: Modules with the same ModuleFullName will automatically have the same commit and Digest after this, -// as there will be exactly one Module with a given ModuleFullName, given that an OpaqueID will be equal -// for Modules with equal ModuleFullNames. +// Note: Modules with the same FullName will automatically have the same commit and Digest after this, +// as there will be exactly one Module with a given FullName, given that an OpaqueID will be equal +// for Modules with equal FullNames. func getUniqueSortedAddedModulesByOpaqueID( ctx context.Context, commitProvider CommitProvider, @@ -430,9 +430,9 @@ func selectAddedModuleForOpaqueIDIgnoreTargeting( // has already been taken into account. // // All addedModules are assumed to have the same OpaqueID, and therefore the same -// ModuleFullName, since they are remote Modules. We validate this. +// FullName, since they are remote Modules. We validate this. // -// Note that there may be straight duplicates, ie two modules with the same ModuleFullName and CommitID! This +// Note that there may be straight duplicates, ie two modules with the same FullName and CommitID! This // function deduplicates these. // // The ModuleKey with the latest create time is used. @@ -456,13 +456,13 @@ func selectRemoteAddedModuleForOpaqueIDIgnoreTargeting( if moduleFullNameStrings := slicesext.ToUniqueSorted( slicesext.Map( addedModules, - func(addedModule *addedModule) string { return addedModule.remoteModuleKey.ModuleFullName().String() }, + func(addedModule *addedModule) string { return addedModule.remoteModuleKey.FullName().String() }, ), ); len(moduleFullNameStrings) > 1 { - return nil, syserror.Newf("multiple ModuleFullNames detected in selectRemoteAddedModuleForOpaqueIDIgnoreTargeting: %s", strings.Join(moduleFullNameStrings, ", ")) + return nil, syserror.Newf("multiple FullNames detected in selectRemoteAddedModuleForOpaqueIDIgnoreTargeting: %s", strings.Join(moduleFullNameStrings, ", ")) } - // We now know that we have >1 addedModules, and all of them have a remoteModuleKey, and all the remoteModuleKeys have the same ModuleFullName. + // We now know that we have >1 addedModules, and all of them have a remoteModuleKey, and all the remoteModuleKeys have the same FullName. // Now, we deduplicate by commit ID. If we end up with a single Module, we return that, otherwise we select exactly one Module // based on the create time of the corresponding commit ID. diff --git a/private/bufpkg/bufmodule/bufmodule_test.go b/private/bufpkg/bufmodule/bufmodule_test.go index 9efcec6f8e..fedb29d74d 100644 --- a/private/bufpkg/bufmodule/bufmodule_test.go +++ b/private/bufpkg/bufmodule/bufmodule_test.go @@ -21,6 +21,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/dag/dagtest" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogtestext" @@ -92,19 +93,19 @@ func TestBasic(t *testing.T) { // // Remember, the bsrProvider is just acting like a BSR; if we actually want to // say dependencies are part of our workspace, we need to add them! We do so now. - moduleRefExtdep1, err := bufmodule.NewModuleRef("buf.build", "foo", "extdep1", "") + moduleRefExtdep1, err := bufparse.NewRef("buf.build", "foo", "extdep1", "") require.NoError(t, err) - moduleRefExtdep2, err := bufmodule.NewModuleRef("buf.build", "foo", "extdep2", "") + moduleRefExtdep2, err := bufparse.NewRef("buf.build", "foo", "extdep2", "") require.NoError(t, err) - moduleRefExtdep3, err := bufmodule.NewModuleRef("buf.build", "foo", "extdep3", "") + moduleRefExtdep3, err := bufparse.NewRef("buf.build", "foo", "extdep3", "") require.NoError(t, err) - moduleRefExtdep4, err := bufmodule.NewModuleRef("buf.build", "foo", "extdep4", "") + moduleRefExtdep4, err := bufparse.NewRef("buf.build", "foo", "extdep4", "") require.NoError(t, err) - moduleRefModule2, err := bufmodule.NewModuleRef("buf.build", "bar", "module2", "") + moduleRefModule2, err := bufparse.NewRef("buf.build", "bar", "module2", "") require.NoError(t, err) moduleKeys, err := bsrProvider.GetModuleKeysForModuleRefs( ctx, - []bufmodule.ModuleRef{ + []bufparse.Ref{ moduleRefExtdep1, moduleRefExtdep2, moduleRefExtdep3, @@ -138,7 +139,7 @@ func TestBasic(t *testing.T) { // // This module is also in the BSR, but we'll prefer the local sources when // we do ModuleSetBuilder.Build(). - moduleFullName, err := bufmodule.NewModuleFullName("buf.build", "bar", "module2") + moduleFullName, err := bufparse.NewFullName("buf.build", "bar", "module2") require.NoError(t, err) moduleSetBuilder.AddLocalModule( testNewBucketForPathToData( @@ -157,7 +158,7 @@ func TestBasic(t *testing.T) { ), "path/to/module2", true, - bufmodule.LocalModuleWithModuleFullName(moduleFullName), + bufmodule.LocalModuleWithFullName(moduleFullName), // We're going to exclude the files in the foo directory from targeting, // ie foo/module2_excluded.proto. This file will still be in the module, // but will not be marked as a target. diff --git a/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go index d710cec37b..465dfe3145 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/commit_provider.go @@ -84,7 +84,7 @@ func (a *commitProvider) GetCommitsForModuleKeys( registryToIndexedModuleKeys := slicesext.ToIndexedValuesMap( moduleKeys, func(moduleKey bufmodule.ModuleKey) string { - return moduleKey.ModuleFullName().Registry() + return moduleKey.FullName().Registry() }, ) indexedCommits := make([]slicesext.Indexed[bufmodule.Commit], 0, len(moduleKeys)) diff --git a/private/bufpkg/bufmodule/bufmoduleapi/convert.go b/private/bufpkg/bufmodule/bufmoduleapi/convert.go index 30906500cb..6daa5bfb94 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/convert.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/convert.go @@ -23,6 +23,7 @@ import ( modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" "github.com/bufbuild/buf/private/bufpkg/bufcas" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -211,12 +212,12 @@ func commitIDsToV1Beta1ProtoResourceRefs(commitIDs []uuid.UUID) []*modulev1beta1 return slicesext.Map(commitIDs, commitIDToV1Beta1ProtoResourceRef) } -func moduleRefToV1ProtoResourceRef(moduleRef bufmodule.ModuleRef) *modulev1.ResourceRef { +func moduleRefToV1ProtoResourceRef(moduleRef bufparse.Ref) *modulev1.ResourceRef { return &modulev1.ResourceRef{ Value: &modulev1.ResourceRef_Name_{ Name: &modulev1.ResourceRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Child: &modulev1.ResourceRef_Name_Ref{ Ref: moduleRef.Ref(), }, @@ -225,16 +226,16 @@ func moduleRefToV1ProtoResourceRef(moduleRef bufmodule.ModuleRef) *modulev1.Reso } } -func moduleRefsToV1ProtoResourceRefs(moduleRefs []bufmodule.ModuleRef) []*modulev1.ResourceRef { +func moduleRefsToV1ProtoResourceRefs(moduleRefs []bufparse.Ref) []*modulev1.ResourceRef { return slicesext.Map(moduleRefs, moduleRefToV1ProtoResourceRef) } -func moduleRefToV1Beta1ProtoResourceRef(moduleRef bufmodule.ModuleRef) *modulev1beta1.ResourceRef { +func moduleRefToV1Beta1ProtoResourceRef(moduleRef bufparse.Ref) *modulev1beta1.ResourceRef { return &modulev1beta1.ResourceRef{ Value: &modulev1beta1.ResourceRef_Name_{ Name: &modulev1beta1.ResourceRef_Name{ - Owner: moduleRef.ModuleFullName().Owner(), - Module: moduleRef.ModuleFullName().Name(), + Owner: moduleRef.FullName().Owner(), + Module: moduleRef.FullName().Name(), Child: &modulev1beta1.ResourceRef_Name_Ref{ Ref: moduleRef.Ref(), }, @@ -243,7 +244,7 @@ func moduleRefToV1Beta1ProtoResourceRef(moduleRef bufmodule.ModuleRef) *modulev1 } } -func moduleRefsToV1Beta1ProtoResourceRefs(moduleRefs []bufmodule.ModuleRef) []*modulev1beta1.ResourceRef { +func moduleRefsToV1Beta1ProtoResourceRefs(moduleRefs []bufparse.Ref) []*modulev1beta1.ResourceRef { return slicesext.Map(moduleRefs, moduleRefToV1Beta1ProtoResourceRef) } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go index c97c4f7f59..13bdaab04d 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/module_data_provider.go @@ -22,6 +22,7 @@ import ( modulev1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -84,7 +85,7 @@ func (a *moduleDataProvider) GetModuleDatasForModuleKeys( if err != nil { return nil, err } - if _, err := bufmodule.ModuleFullNameStringToUniqueValue(moduleKeys); err != nil { + if _, err := bufparse.FullNameStringToUniqueValue(moduleKeys); err != nil { return nil, err } @@ -95,7 +96,7 @@ func (a *moduleDataProvider) GetModuleDatasForModuleKeys( registryToIndexedModuleKeys := slicesext.ToIndexedValuesMap( moduleKeys, func(moduleKey bufmodule.ModuleKey) string { - return moduleKey.ModuleFullName().Registry() + return moduleKey.FullName().Registry() }, ) indexedModuleDatas := make([]slicesext.Indexed[bufmodule.ModuleData], 0, len(moduleKeys)) @@ -168,7 +169,7 @@ func (a *moduleDataProvider) getIndexedModuleDatasForRegistryAndIndexedModuleKey sort.Slice( depModuleKeys, func(i int, j int) bool { - return depModuleKeys[i].ModuleFullName().String() < depModuleKeys[j].ModuleFullName().String() + return depModuleKeys[i].FullName().String() < depModuleKeys[j].FullName().String() }, ) @@ -276,7 +277,7 @@ func (a *moduleDataProvider) warnIfDeprecated( return err } if v1ProtoModule.State == modulev1.ModuleState_MODULE_STATE_DEPRECATED { - a.logger.Warn(fmt.Sprintf("%s is deprecated", moduleKey.ModuleFullName().String())) + a.logger.Warn(fmt.Sprintf("%s is deprecated", moduleKey.FullName().String())) } return nil } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/module_key_for_universal_proto_commit.go b/private/bufpkg/bufmodule/bufmoduleapi/module_key_for_universal_proto_commit.go index d38a020cea..8a13cb555d 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/module_key_for_universal_proto_commit.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/module_key_for_universal_proto_commit.go @@ -19,6 +19,7 @@ import ( "fmt" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/uuidutil" ) @@ -29,7 +30,7 @@ func getModuleKeyForUniversalProtoCommit( registry string, universalProtoCommit *universalProtoCommit, ) (bufmodule.ModuleKey, error) { - moduleFullName, err := getModuleFullNameForRegistryProtoOwnerIDProtoModuleID( + moduleFullName, err := getFullNameForRegistryProtoOwnerIDProtoModuleID( ctx, v1ProtoModuleProvider, v1ProtoOwnerProvider, @@ -53,7 +54,7 @@ func getModuleKeyForUniversalProtoCommit( ) } -func getModuleFullNameForRegistryProtoOwnerIDProtoModuleID( +func getFullNameForRegistryProtoOwnerIDProtoModuleID( ctx context.Context, v1ProtoModuleProvider *v1ProtoModuleProvider, v1ProtoOwnerProvider *v1ProtoOwnerProvider, @@ -62,7 +63,7 @@ func getModuleFullNameForRegistryProtoOwnerIDProtoModuleID( protoOwnerID string, // Dashless protoModuleID string, -) (bufmodule.ModuleFullName, error) { +) (bufparse.FullName, error) { v1ProtoModule, err := v1ProtoModuleProvider.getV1ProtoModuleForProtoModuleID( ctx, registry, @@ -88,7 +89,7 @@ func getModuleFullNameForRegistryProtoOwnerIDProtoModuleID( default: return nil, fmt.Errorf("proto Owner did not have a User or Organization: %v", v1ProtoOwner) } - return bufmodule.NewModuleFullName( + return bufparse.NewFullName( registry, ownerName, v1ProtoModule.Name, diff --git a/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go b/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go index c1c576ec35..7051a21358 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/module_key_provider.go @@ -19,6 +19,7 @@ import ( "log/slog" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -60,13 +61,13 @@ func newModuleKeyProvider( func (a *moduleKeyProvider) GetModuleKeysForModuleRefs( ctx context.Context, - moduleRefs []bufmodule.ModuleRef, + moduleRefs []bufparse.Ref, digestType bufmodule.DigestType, ) ([]bufmodule.ModuleKey, error) { // Check unique. if _, err := slicesext.ToUniqueValuesMapError( moduleRefs, - func(moduleRef bufmodule.ModuleRef) (string, error) { + func(moduleRef bufparse.Ref) (string, error) { return moduleRef.String(), nil }, ); err != nil { @@ -75,8 +76,8 @@ func (a *moduleKeyProvider) GetModuleKeysForModuleRefs( registryToIndexedModuleRefs := slicesext.ToIndexedValuesMap( moduleRefs, - func(moduleRef bufmodule.ModuleRef) string { - return moduleRef.ModuleFullName().Registry() + func(moduleRef bufparse.Ref) string { + return moduleRef.FullName().Registry() }, ) indexedModuleKeys := make([]slicesext.Indexed[bufmodule.ModuleKey], 0, len(moduleRefs)) @@ -98,7 +99,7 @@ func (a *moduleKeyProvider) GetModuleKeysForModuleRefs( func (a *moduleKeyProvider) getIndexedModuleKeysForRegistryAndIndexedModuleRefs( ctx context.Context, registry string, - indexedModuleRefs []slicesext.Indexed[bufmodule.ModuleRef], + indexedModuleRefs []slicesext.Indexed[bufparse.Ref], digestType bufmodule.DigestType, ) ([]slicesext.Indexed[bufmodule.ModuleKey], error) { universalProtoCommits, err := getUniversalProtoCommitsForRegistryAndModuleRefs(ctx, a.moduleClientProvider, registry, slicesext.IndexedToValues(indexedModuleRefs), digestType) @@ -114,7 +115,7 @@ func (a *moduleKeyProvider) getIndexedModuleKeysForRegistryAndIndexedModuleRefs( } moduleKey, err := bufmodule.NewModuleKey( // Note we don't have to resolve owner_name and module_name since we already have them. - indexedModuleRefs[i].Value.ModuleFullName(), + indexedModuleRefs[i].Value.FullName(), commitID, func() (bufmodule.Digest, error) { // Do not call getModuleKeyForProtoCommit, we already have the owner and module names. diff --git a/private/bufpkg/bufmodule/bufmoduleapi/registry.go b/private/bufpkg/bufmodule/bufmoduleapi/registry.go index 894cb146f7..bcb289047d 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/registry.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/registry.go @@ -19,6 +19,7 @@ import ( "strings" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/gen/data/datalegacyfederation" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -28,8 +29,8 @@ import ( // we have way bigger problems than this hardcoded variable. const defaultPublicRegistry = "buf.build" -type hasModuleFullName interface { - ModuleFullName() bufmodule.ModuleFullName +type hasFullName interface { + FullName() bufparse.FullName } // getPrimarySecondaryRegistry returns the primary and secondary registry for a call that supports @@ -45,7 +46,7 @@ type hasModuleFullName interface { // beyond a non-public registry depending on buf.build. // // This is used to support legacy federation. -func getPrimarySecondaryRegistry[T hasModuleFullName](s []T, publicRegistry string) (string, string, error) { +func getPrimarySecondaryRegistry[T hasFullName](s []T, publicRegistry string) (string, string, error) { if len(s) == 0 { return "", "", syserror.New("must have at least one value in getPrimarySecondaryRegistry") } @@ -71,7 +72,7 @@ func getPrimarySecondaryRegistry[T hasModuleFullName](s []T, publicRegistry stri } } -func isLegacyFederationAllowed[T hasModuleFullName](s []T, additionalLegacyFederationRegistry string) (bool, error) { +func isLegacyFederationAllowed[T hasFullName](s []T, additionalLegacyFederationRegistry string) (bool, error) { registries, err := getRegistries(s) if err != nil { return false, err @@ -93,13 +94,13 @@ func isLegacyFederationAllowed[T hasModuleFullName](s []T, additionalLegacyFeder return false, nil } -func getRegistries[T hasModuleFullName](s []T) ([]string, error) { +func getRegistries[T hasFullName](s []T) ([]string, error) { registryMap, err := slicesext.ToValuesMapError( s, func(e T) (string, error) { - moduleFullName := e.ModuleFullName() + moduleFullName := e.FullName() if moduleFullName == nil { - return "", syserror.Newf("no ModuleFullName for %v", e) + return "", syserror.Newf("no FullName for %v", e) } registry := moduleFullName.Registry() if registry == "" { @@ -123,7 +124,7 @@ func getSingleRegistryForContentModules(contentModules []bufmodule.Module) (stri } var registry string for _, module := range contentModules { - moduleFullName := module.ModuleFullName() + moduleFullName := module.FullName() if moduleFullName == nil { return "", syserror.Newf("expected module name for %s", module.Description()) } diff --git a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go index f2cc9f2555..5ac5740009 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/universal_proto_commit.go @@ -23,6 +23,7 @@ import ( modulev1beta1 "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1" "connectrpc.com/connect" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/bufpkg/bufregistryapi/bufregistryapimodule" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" @@ -123,7 +124,7 @@ func getUniversalProtoCommitsForRegistryAndModuleRefs( bufregistryapimodule.V1Beta1CommitServiceClientProvider }, registry string, - moduleRefs []bufmodule.ModuleRef, + moduleRefs []bufparse.Ref, digestType bufmodule.DigestType, ) ([]*universalProtoCommit, error) { switch digestType { diff --git a/private/bufpkg/bufmodule/bufmoduleapi/uploader.go b/private/bufpkg/bufmodule/bufmoduleapi/uploader.go index ff78d879b4..fef54b8b02 100644 --- a/private/bufpkg/bufmodule/bufmoduleapi/uploader.go +++ b/private/bufpkg/bufmodule/bufmoduleapi/uploader.go @@ -111,7 +111,7 @@ func (a *uploader) Upload( // Only push named modules to the registry. Any dependencies for named modules must have a name. // Local unnamed modules can be excluded if the UploadWithExcludeUnnamed option is set. contentModules, err = slicesext.FilterError(contentModules, func(module bufmodule.Module) (bool, error) { - moduleName := module.ModuleFullName() + moduleName := module.FullName() if moduleName == nil { moduleDescription := module.Description() if uploadOptions.ExcludeUnnamed() { @@ -125,7 +125,7 @@ func (a *uploader) Upload( return false, err } if allDepModuleDescriptions := slicesext.Reduce(deps, func(allDepModuleDescriptions []string, dep bufmodule.ModuleDep) []string { - if moduleName := dep.ModuleFullName(); moduleName == nil { + if moduleName := dep.FullName(); moduleName == nil { return append(allDepModuleDescriptions, dep.Description()) } return allDepModuleDescriptions @@ -202,7 +202,7 @@ func (a *uploader) Upload( strings.Join(slicesext.Map( contentModules, func(module bufmodule.Module) string { - return module.ModuleFullName().String() + return module.FullName().String() }, ), ", "), strings.Join(contentModuleSortedDefaultLabels, ", "), @@ -268,8 +268,8 @@ func (a *uploader) Upload( slicesext.ToValuesMap( remoteDeps, func(remoteDep bufmodule.RemoteDep) string { - // We've already validated two or three times that ModuleFullName is present here. - return remoteDep.ModuleFullName().Registry() + // We've already validated two or three times that FullName is present here. + return remoteDep.FullName().Registry() }, ), ) @@ -336,11 +336,11 @@ func (a *uploader) Upload( commits := make([]bufmodule.Commit, len(universalProtoCommits)) for i, universalProtoCommit := range universalProtoCommits { universalProtoCommit := universalProtoCommit - // This is how we get the ModuleFullName without calling the ModuleService or OwnerService. + // This is how we get the FullName without calling the ModuleService or OwnerService. // // We've maintained ordering throughout this function, so we can do this. // The API returns Commits in the same order as the Contents. - moduleFullName := contentModules[i].ModuleFullName() + moduleFullName := contentModules[i].FullName() commitID, err := uuidutil.FromDashless(universalProtoCommit.ID) if err != nil { return nil, err @@ -384,10 +384,10 @@ func (a *uploader) createContentModuleIfNotExist( { OwnerRef: &ownerv1.OwnerRef{ Value: &ownerv1.OwnerRef_Name{ - Name: contentModule.ModuleFullName().Owner(), + Name: contentModule.FullName().Owner(), }, }, - Name: contentModule.ModuleFullName().Name(), + Name: contentModule.FullName().Name(), Visibility: v1ProtoCreateModuleVisibility, DefaultLabelName: createDefaultLabel, }, @@ -431,8 +431,8 @@ func (a *uploader) validateContentModulesExist( return &modulev1.ModuleRef{ Value: &modulev1.ModuleRef_Name_{ Name: &modulev1.ModuleRef_Name{ - Owner: module.ModuleFullName().Owner(), - Module: module.ModuleFullName().Name(), + Owner: module.FullName().Owner(), + Module: module.FullName().Name(), }, }, } @@ -457,10 +457,10 @@ func getV1Beta1ProtoUploadRequestContent( if !module.IsLocal() { return nil, syserror.New("expected local Module in getProtoLegacyFederationUploadRequestContent") } - if module.ModuleFullName() == nil { + if module.FullName() == nil { return nil, syserror.Newf("expected module name for local module: %s", module.Description()) } - if module.ModuleFullName().Registry() != primaryRegistry { + if module.FullName().Registry() != primaryRegistry { // This should never happen - the upload Modules should already be verified above to come from one registry. return nil, syserror.Newf("attempting to upload content for registry other than %s in getProtoLegacyFederationUploadRequestContent", primaryRegistry) } @@ -474,8 +474,8 @@ func getV1Beta1ProtoUploadRequestContent( ModuleRef: &modulev1beta1.ModuleRef{ Value: &modulev1beta1.ModuleRef_Name_{ Name: &modulev1beta1.ModuleRef_Name{ - Owner: module.ModuleFullName().Owner(), - Module: module.ModuleFullName().Name(), + Owner: module.FullName().Owner(), + Module: module.FullName().Name(), }, }, }, @@ -491,7 +491,7 @@ func getV1Beta1ProtoUploadRequestContent( func remoteDepToV1Beta1ProtoUploadRequestDepRef( remoteDep bufmodule.RemoteDep, ) (*modulev1beta1.UploadRequest_DepRef, error) { - if remoteDep.ModuleFullName() == nil { + if remoteDep.FullName() == nil { return nil, syserror.Newf("expected module name for remote module dependency %q", remoteDep.OpaqueID()) } depCommitID := remoteDep.CommitID() @@ -500,6 +500,6 @@ func remoteDepToV1Beta1ProtoUploadRequestDepRef( } return &modulev1beta1.UploadRequest_DepRef{ CommitId: uuidutil.ToDashless(depCommitID), - Registry: remoteDep.ModuleFullName().Registry(), + Registry: remoteDep.FullName().Registry(), }, nil } diff --git a/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache_test.go b/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache_test.go index d5213a80b1..81a21225c3 100644 --- a/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache_test.go +++ b/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache_test.go @@ -24,6 +24,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulestore" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/filelock" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogtestext" @@ -67,7 +68,7 @@ func TestCommitProviderForModuleKeyBasic(t *testing.T) { slicesext.Map( commits, func(commit bufmodule.Commit) string { - return commit.ModuleKey().ModuleFullName().String() + return commit.ModuleKey().FullName().String() }, ), ) @@ -90,7 +91,7 @@ func TestCommitProviderForModuleKeyBasic(t *testing.T) { slicesext.Map( commits, func(commit bufmodule.Commit) string { - return commit.ModuleKey().ModuleFullName().String() + return commit.ModuleKey().FullName().String() }, ), ) @@ -132,7 +133,7 @@ func TestCommitProviderForCommitKeyBasic(t *testing.T) { slicesext.Map( commits, func(commit bufmodule.Commit) string { - return commit.ModuleKey().ModuleFullName().String() + return commit.ModuleKey().FullName().String() }, ), ) @@ -155,7 +156,7 @@ func TestCommitProviderForCommitKeyBasic(t *testing.T) { slicesext.Map( commits, func(commit bufmodule.Commit) string { - return commit.ModuleKey().ModuleFullName().String() + return commit.ModuleKey().FullName().String() }, ), ) @@ -195,7 +196,7 @@ func TestModuleDataProviderBasic(t *testing.T) { slicesext.Map( moduleDatas, func(moduleData bufmodule.ModuleData) string { - return moduleData.ModuleKey().ModuleFullName().String() + return moduleData.ModuleKey().FullName().String() }, ), ) @@ -218,7 +219,7 @@ func TestModuleDataProviderBasic(t *testing.T) { slicesext.Map( moduleDatas, func(moduleData bufmodule.ModuleData) string { - return moduleData.ModuleKey().ModuleFullName().String() + return moduleData.ModuleKey().FullName().String() }, ), ) @@ -312,15 +313,15 @@ func testGetBSRProviderAndModuleKeys(t *testing.T, ctx context.Context) (bufmodu }, ) require.NoError(t, err) - moduleRefMod1, err := bufmodule.NewModuleRef("buf.build", "foo", "mod1", "") + moduleRefMod1, err := bufparse.NewRef("buf.build", "foo", "mod1", "") require.NoError(t, err) - moduleRefMod2, err := bufmodule.NewModuleRef("buf.build", "foo", "mod2", "") + moduleRefMod2, err := bufparse.NewRef("buf.build", "foo", "mod2", "") require.NoError(t, err) - moduleRefMod3, err := bufmodule.NewModuleRef("buf.build", "foo", "mod3", "") + moduleRefMod3, err := bufparse.NewRef("buf.build", "foo", "mod3", "") require.NoError(t, err) moduleKeys, err := bsrProvider.GetModuleKeysForModuleRefs( ctx, - []bufmodule.ModuleRef{ + []bufparse.Ref{ moduleRefMod1, // Switching order on purpose. moduleRefMod3, diff --git a/private/bufpkg/bufmodule/bufmodulestore/commit_store.go b/private/bufpkg/bufmodule/bufmodulestore/commit_store.go index 057d39b155..f08527c984 100644 --- a/private/bufpkg/bufmodule/bufmodulestore/commit_store.go +++ b/private/bufpkg/bufmodule/bufmodulestore/commit_store.go @@ -24,6 +24,7 @@ import ( "time" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slogext" "github.com/bufbuild/buf/private/pkg/storage" @@ -189,7 +190,7 @@ func (p *commitStore) getCommitForCommitKey( invalidReason = "mismatched digest type" return nil, err } - moduleFullName, err := bufmodule.NewModuleFullName( + moduleFullName, err := bufparse.NewFullName( commitKey.Registry(), externalCommit.Owner, externalCommit.Module, @@ -239,8 +240,8 @@ func (p *commitStore) putCommit( path := getCommitStoreFilePath(commitKey) externalCommit := externalCommit{ Version: externalCommitVersion, - Owner: moduleKey.ModuleFullName().Owner(), - Module: moduleKey.ModuleFullName().Name(), + Owner: moduleKey.FullName().Owner(), + Module: moduleKey.FullName().Name(), CreateTime: createTime, Digest: digest.String(), } diff --git a/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go b/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go index 79bc6abce5..fe3833bb1b 100644 --- a/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go +++ b/private/bufpkg/bufmodule/bufmodulestore/module_data_store.go @@ -22,6 +22,7 @@ import ( "log/slog" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/encoding" "github.com/bufbuild/buf/private/pkg/filelock" "github.com/bufbuild/buf/private/pkg/normalpath" @@ -475,7 +476,7 @@ func (p *moduleDataStore) putModuleData( return err } externalModuleData.Deps[i] = externalModuleDataDep{ - Name: depModuleKey.ModuleFullName().String(), + Name: depModuleKey.FullName().String(), Commit: uuidutil.ToDashless(depModuleKey.CommitID()), Digest: digest.String(), } @@ -626,9 +627,9 @@ func getModuleDataStoreDirPath(moduleKey bufmodule.ModuleKey) (string, error) { } return normalpath.Join( digest.Type().String(), - moduleKey.ModuleFullName().Registry(), - moduleKey.ModuleFullName().Owner(), - moduleKey.ModuleFullName().Name(), + moduleKey.FullName().Registry(), + moduleKey.FullName().Owner(), + moduleKey.FullName().Name(), uuidutil.ToDashless(moduleKey.CommitID()), ), nil } @@ -645,9 +646,9 @@ func getModuleDataStoreTarPath(moduleKey bufmodule.ModuleKey) (string, error) { } return normalpath.Join( digest.Type().String(), - moduleKey.ModuleFullName().Registry(), - moduleKey.ModuleFullName().Owner(), - moduleKey.ModuleFullName().Name(), + moduleKey.FullName().Registry(), + moduleKey.FullName().Owner(), + moduleKey.FullName().Name(), uuidutil.ToDashless(moduleKey.CommitID())+".tar", ), nil } @@ -656,7 +657,7 @@ func getDeclaredDepModuleKeyForExternalModuleDataDep(dep externalModuleDataDep) if dep.Name == "" { return nil, errors.New("no module name specified") } - moduleFullName, err := bufmodule.ParseModuleFullName(dep.Name) + moduleFullName, err := bufparse.ParseFullName(dep.Name) if err != nil { return nil, fmt.Errorf("invalid module name: %w", err) } diff --git a/private/bufpkg/bufmodule/bufmodulestore/module_data_store_test.go b/private/bufpkg/bufmodule/bufmodulestore/module_data_store_test.go index 27ce8a2463..47dc87b613 100644 --- a/private/bufpkg/bufmodule/bufmodulestore/module_data_store_test.go +++ b/private/bufpkg/bufmodule/bufmodulestore/module_data_store_test.go @@ -20,6 +20,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufmodule" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduletesting" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/filelock" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -181,15 +182,15 @@ func testGetModuleKeysAndModuleDatas(t *testing.T, ctx context.Context) ([]bufmo }, ) require.NoError(t, err) - moduleRefMod1, err := bufmodule.NewModuleRef("buf.build", "foo", "mod1", "") + moduleRefMod1, err := bufparse.NewRef("buf.build", "foo", "mod1", "") require.NoError(t, err) - moduleRefMod2, err := bufmodule.NewModuleRef("buf.build", "foo", "mod2", "") + moduleRefMod2, err := bufparse.NewRef("buf.build", "foo", "mod2", "") require.NoError(t, err) - moduleRefMod3, err := bufmodule.NewModuleRef("buf.build", "foo", "mod3", "") + moduleRefMod3, err := bufparse.NewRef("buf.build", "foo", "mod3", "") require.NoError(t, err) moduleKeys, err := bsrProvider.GetModuleKeysForModuleRefs( ctx, - []bufmodule.ModuleRef{ + []bufparse.Ref{ moduleRefMod1, // Switching order on purpose. moduleRefMod3, @@ -234,7 +235,7 @@ func testRequireModuleKeyNamesEqual(t *testing.T, expected []string, actual []bu slicesext.Map( actual, func(value bufmodule.ModuleKey) string { - return value.ModuleFullName().String() + return value.FullName().String() }, ), ) @@ -251,7 +252,7 @@ func testRequireModuleDataNamesEqual(t *testing.T, expected []string, actual []b slicesext.Map( actual, func(value bufmodule.ModuleData) string { - return value.ModuleKey().ModuleFullName().String() + return value.ModuleKey().FullName().String() }, ), ) diff --git a/private/bufpkg/bufmodule/bufmodulestore/util.go b/private/bufpkg/bufmodule/bufmodulestore/util.go index c4d6265904..004132481e 100644 --- a/private/bufpkg/bufmodule/bufmodulestore/util.go +++ b/private/bufpkg/bufmodule/bufmodulestore/util.go @@ -28,7 +28,7 @@ func logDebugModuleKey(ctx context.Context, logger *slog.Logger, moduleKey bufmo message, append( []any{ - slog.String("moduleFullName", moduleKey.ModuleFullName().String()), + slog.String("moduleFullName", moduleKey.FullName().String()), slog.String("commitID", uuidutil.ToDashless(moduleKey.CommitID())), }, fields..., diff --git a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go index 8233e9cf7c..bf649eca9f 100644 --- a/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go +++ b/private/bufpkg/bufmodule/bufmoduletesting/bufmoduletesting.go @@ -23,6 +23,7 @@ import ( "github.com/bufbuild/buf/private/bufpkg/bufconfig" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/dag" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogext" @@ -42,7 +43,7 @@ var ( // // Exactly one of PathToData, Bucket, DirPath must be set. // -// Name is the ModuleFullName string. When creating an OmniProvider, Name is required. +// Name is the FullName string. When creating an OmniProvider, Name is required. // // CommitID is optional, but it must be unique across all ModuleDatas. If CommitID is not set, // a mock commitID is created if Name is set. @@ -87,7 +88,7 @@ func NewOmniProvider( // NewModuleSet returns a new ModuleSet. // // This can be used in cases where ModuleKeyProviders and ModuleDataProviders are not needed, -// and when ModuleFullNames do not matter. +// and when FullNames do not matter. // // Note the ModuleDatas must be self-contained, that is they only import from each other. func NewModuleSet( @@ -99,7 +100,7 @@ func NewModuleSet( // NewModuleSetForDirPath returns a new ModuleSet for the directory path. // // This can be used in cases where ModuleKeyProviders and ModuleDataProviders are not needed, -// and when ModuleFullNames do not matter. +// and when FullNames do not matter. // // Note that this Module cannot have any dependencies. func NewModuleSetForDirPath( @@ -115,7 +116,7 @@ func NewModuleSetForDirPath( // NewModuleSetForPathToData returns a new ModuleSet for the path to data map. // // This can be used in cases where ModuleKeyProviders and ModuleDataProviders are not needed, -// and when ModuleFullNames do not matter. +// and when FullNames do not matter. // // Note that this Module cannot have any dependencies. func NewModuleSetForPathToData( @@ -131,7 +132,7 @@ func NewModuleSetForPathToData( // NewModuleSetForBucket returns a new ModuleSet for the Bucket. // // This can be used in cases where ModuleKeyProviders and ModuleDataProviders are not needed, -// and when ModuleFullNames do not matter. +// and when FullNames do not matter. // // Note that this Module cannot have any dependencies. func NewModuleSetForBucket( @@ -167,12 +168,12 @@ func newOmniProvider( func (o *omniProvider) GetModuleKeysForModuleRefs( ctx context.Context, - moduleRefs []bufmodule.ModuleRef, + moduleRefs []bufparse.Ref, digestType bufmodule.DigestType, ) ([]bufmodule.ModuleKey, error) { moduleKeys := make([]bufmodule.ModuleKey, len(moduleRefs)) for i, moduleRef := range moduleRefs { - module := o.GetModuleForModuleFullName(moduleRef.ModuleFullName()) + module := o.GetModuleForFullName(moduleRef.FullName()) if module == nil { return nil, &fs.PathError{Op: "read", Path: moduleRef.String(), Err: fs.ErrNotExist} } @@ -195,7 +196,7 @@ func (o *omniProvider) GetModuleDatasForModuleKeys( if _, err := bufmodule.UniqueDigestTypeForModuleKeys(moduleKeys); err != nil { return nil, err } - if _, err := bufmodule.ModuleFullNameStringToUniqueValue(moduleKeys); err != nil { + if _, err := bufparse.FullNameStringToUniqueValue(moduleKeys); err != nil { return nil, err } return slicesext.MapError( @@ -280,7 +281,7 @@ func (o *omniProvider) GetGraphForModuleKeys( } modules := make([]bufmodule.Module, len(moduleKeys)) for i, moduleKey := range moduleKeys { - module := o.GetModuleForModuleFullName(moduleKey.ModuleFullName()) + module := o.GetModuleForFullName(moduleKey.FullName()) if module == nil { return nil, &fs.PathError{Op: "read", Path: moduleKey.String(), Err: fs.ErrNotExist} } @@ -298,7 +299,7 @@ func (o *omniProvider) getModuleDataForModuleKey( ctx context.Context, moduleKey bufmodule.ModuleKey, ) (bufmodule.ModuleData, error) { - module := o.GetModuleForModuleFullName(moduleKey.ModuleFullName()) + module := o.GetModuleForFullName(moduleKey.FullName()) if module == nil { return nil, &fs.PathError{Op: "read", Path: moduleKey.String(), Err: fs.ErrNotExist} } @@ -415,7 +416,7 @@ func addModuleDataToModuleSetBuilder( } var localModuleOptions []bufmodule.LocalModuleOption if moduleData.Name != "" { - moduleFullName, err := bufmodule.ParseModuleFullName(moduleData.Name) + moduleFullName, err := bufparse.ParseFullName(moduleData.Name) if err != nil { return err } @@ -434,7 +435,7 @@ func addModuleDataToModuleSetBuilder( commitIDToCreateTime[commitID] = createTime } localModuleOptions = []bufmodule.LocalModuleOption{ - bufmodule.LocalModuleWithModuleFullNameAndCommitID(moduleFullName, commitID), + bufmodule.LocalModuleWithFullNameAndCommitID(moduleFullName, commitID), } } else if requireName { return errors.New("ModuleData.Name was required in this context") diff --git a/private/bufpkg/bufmodule/commit.go b/private/bufpkg/bufmodule/commit.go index a5c57a6d00..91a4c90282 100644 --- a/private/bufpkg/bufmodule/commit.go +++ b/private/bufpkg/bufmodule/commit.go @@ -19,7 +19,7 @@ import ( "time" ) -// Commit represents a Commit on the BSR. +// Commit represents a Commit for a Module on the BSR. type Commit interface { // ModuleKey returns the ModuleKey for the Commit. ModuleKey() ModuleKey @@ -80,7 +80,7 @@ func newCommit( // and call that, but we make a variable to reference the original ModuleKey just for constency. originalModuleKey := moduleKey moduleKey = newModuleKeyNoValidate( - originalModuleKey.ModuleFullName(), + originalModuleKey.FullName(), originalModuleKey.CommitID(), func() (Digest, error) { moduleKeyDigest, err := originalModuleKey.Digest() @@ -89,7 +89,7 @@ func newCommit( } if !DigestEqual(commitOptions.expectedDigest, moduleKeyDigest) { return nil, &DigestMismatchError{ - ModuleFullName: originalModuleKey.ModuleFullName(), + FullName: originalModuleKey.FullName(), CommitID: originalModuleKey.CommitID(), ExpectedDigest: commitOptions.expectedDigest, ActualDigest: moduleKeyDigest, diff --git a/private/bufpkg/bufmodule/digest.go b/private/bufpkg/bufmodule/digest.go index fd49459433..48f49b25a8 100644 --- a/private/bufpkg/bufmodule/digest.go +++ b/private/bufpkg/bufmodule/digest.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/bufbuild/buf/private/bufpkg/bufcas" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" "github.com/bufbuild/buf/private/pkg/syserror" @@ -75,15 +76,15 @@ func (d DigestType) String() string { // // This reverses DigestType.String(). // -// Returns an error of type *ParseError if thie string could not be parsed. +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseDigestType(s string) (DigestType, error) { d, ok := stringToDigestType[s] if !ok { - return 0, &ParseError{ - typeString: "module digest type", - input: s, - err: fmt.Errorf("unknown type: %q", s), - } + return 0, bufparse.NewParseError( + "module digest type", + s, + fmt.Errorf("unknown type: %q", s), + ) } return d, nil } @@ -96,6 +97,7 @@ type Digest interface { fmt.Stringer // Type returns the type of digest. + // // Always a valid value. Type() DigestType // Value returns the digest value. @@ -127,9 +129,11 @@ func NewDigest(digestType DigestType, bufcasDigest bufcas.Digest) (Digest, error // ParseDigest parses a Digest from its string representation. // // A Digest string is of the form typeString:hexValue. -// The string is expected to be non-empty, If not, an error is treutned. +// The string is expected to be non-empty, If not, an error is returned. // // This reverses Digest.String(). +// +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseDigest(s string) (Digest, error) { if s == "" { // This should be considered a system error. @@ -137,27 +141,27 @@ func ParseDigest(s string) (Digest, error) { } digestTypeString, hexValue, ok := strings.Cut(s, ":") if !ok { - return nil, &ParseError{ - typeString: "module digest", - input: s, - err: errors.New(`must in the form "digest_type:digest_hex_value"`), - } + return nil, bufparse.NewParseError( + "module digest", + s, + errors.New(`must in the form "digest_type:digest_hex_value"`), + ) } digestType, err := ParseDigestType(digestTypeString) if err != nil { - return nil, &ParseError{ - typeString: "module digest", - input: s, - err: err, - } + return nil, bufparse.NewParseError( + "module digest", + s, + err, + ) } value, err := hex.DecodeString(hexValue) if err != nil { - return nil, &ParseError{ - typeString: "module digest", - input: s, - err: errors.New(`could not parse hex: must in the form "digest_type:digest_hex_value"`), - } + return nil, bufparse.NewParseError( + "module digest", + s, + errors.New(`could not parse hex: must in the form "digest_type:digest_hex_value"`), + ) } switch digestType { case DigestTypeB4, DigestTypeB5: diff --git a/private/bufpkg/bufmodule/errors.go b/private/bufpkg/bufmodule/errors.go index 50653225fb..cee39b23f3 100644 --- a/private/bufpkg/bufmodule/errors.go +++ b/private/bufpkg/bufmodule/errors.go @@ -19,6 +19,7 @@ import ( "io/fs" "strings" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/uuidutil" "github.com/google/uuid" ) @@ -76,65 +77,6 @@ func (i *ImportNotExistError) Unwrap() error { return fs.ErrNotExist } -// ParseError is an error that occurred during parsing. -// -// This is returned by all Parse.* functions in this package. -type ParseError struct { - // typeString is the user-consumable string representing of the type that was attempted to be parsed. - // - // Users cannot rely on this data being structured. - // Examples: "digest", "digest type". - typeString string - // input is the input string that was attempted to be parsed. - input string - // err is the underlying error. - // - // Err may be a *ParseError itself. - // - // This is an error we may give back to the user, use pretty strings that should - // be read. - err error -} - -// Error implements the error interface. -func (p *ParseError) Error() string { - if p == nil { - return "" - } - var builder strings.Builder - _, _ = builder.WriteString(`could not parse`) - if p.typeString != "" { - _, _ = builder.WriteString(` `) - _, _ = builder.WriteString(p.typeString) - } - if p.input != "" { - _, _ = builder.WriteString(` "`) - _, _ = builder.WriteString(p.input) - _, _ = builder.WriteString(`"`) - } - if p.err != nil { - _, _ = builder.WriteString(`: `) - _, _ = builder.WriteString(p.err.Error()) - } - return builder.String() -} - -// Unwrap returns the underlying error. -func (p *ParseError) Unwrap() error { - if p == nil { - return nil - } - return p.err -} - -// Input returns the input string that was attempted to be parsed. -func (p *ParseError) Input() string { - if p == nil { - return "" - } - return p.input -} - // ModuleCycleError is the error returned if a cycle is detected in module dependencies. type ModuleCycleError struct { // Descriptions are the module descriptions that represent the cycle. @@ -222,7 +164,7 @@ func (n *NoProtoFilesError) Error() string { // DigestMismatchError is the error returned if the Digest of a downloaded Module or Commit // does not match the expected digest in a buf.lock file. type DigestMismatchError struct { - ModuleFullName ModuleFullName + FullName bufparse.FullName CommitID uuid.UUID ExpectedDigest Digest ActualDigest Digest @@ -235,9 +177,9 @@ func (m *DigestMismatchError) Error() string { } var builder strings.Builder _, _ = builder.WriteString(`*** Digest verification failed`) - if m.ModuleFullName != nil { + if m.FullName != nil { _, _ = builder.WriteString(` for "`) - _, _ = builder.WriteString(m.ModuleFullName.String()) + _, _ = builder.WriteString(m.FullName.String()) if m.CommitID != uuid.Nil { _, _ = builder.WriteString(`:`) _, _ = builder.WriteString(uuidutil.ToDashless(m.CommitID)) diff --git a/private/bufpkg/bufmodule/file_info.go b/private/bufpkg/bufmodule/file_info.go index fdb66d34bd..4dbbfb3100 100644 --- a/private/bufpkg/bufmodule/file_info.go +++ b/private/bufpkg/bufmodule/file_info.go @@ -24,7 +24,7 @@ import ( // FileInfo is the file info for a Module file. // // It comprises the typical storage.ObjectInfo, along with a pointer back to the Module. -// This allows callers to figure out i.e. the ModuleFullName, Commit, as well as any other +// This allows callers to figure out i.e. the FullName, Commit, as well as any other // data it may need. type FileInfo interface { storage.ObjectInfo diff --git a/private/bufpkg/bufmodule/file_type.go b/private/bufpkg/bufmodule/file_type.go index c773a26977..e20fd582f1 100644 --- a/private/bufpkg/bufmodule/file_type.go +++ b/private/bufpkg/bufmodule/file_type.go @@ -18,6 +18,7 @@ import ( "fmt" "strconv" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" ) @@ -54,15 +55,15 @@ func (c FileType) String() string { // // This reverses FileType.String(). // -// Returns an error of type *ParseError if thie string could not be parsed. +// Returns an error of type *bufparse.ParseError if the string could not be parsed. func ParseFileType(s string) (FileType, error) { c, ok := stringToFileType[s] if !ok { - return 0, &ParseError{ - typeString: "module file type", - input: s, - err: fmt.Errorf("unknown type: %q", s), - } + return 0, bufparse.NewParseError( + "module file type", + s, + fmt.Errorf("unknown type: %q", s), + ) } return c, nil } diff --git a/private/bufpkg/bufmodule/graph_provider.go b/private/bufpkg/bufmodule/graph_provider.go index 4052bcb8b6..1fd25501a3 100644 --- a/private/bufpkg/bufmodule/graph_provider.go +++ b/private/bufpkg/bufmodule/graph_provider.go @@ -32,7 +32,7 @@ type GraphProvider interface { // // The key will be the ModuleKey.CommitID(). // - // The input ModuleKeys are expected to be unique by ModuleFullName. The implementation + // The input ModuleKeys are expected to be unique by FullName. The implementation // may error if this is not the case. // // The input ModuleKeys are expected to have the same DigestType. The implementation diff --git a/private/bufpkg/bufmodule/module.go b/private/bufpkg/bufmodule/module.go index 408dad2b54..6928a26807 100644 --- a/private/bufpkg/bufmodule/module.go +++ b/private/bufpkg/bufmodule/module.go @@ -18,6 +18,7 @@ import ( "context" "sync" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/storage" @@ -55,7 +56,7 @@ type Module interface { // It's uniqueness property only applies to the lifetime of the Module, and only within // Modules commonly built from a ModuleSetBuilder. // - // If two Modules have the same ModuleFullName, they will have the same OpaqueID. + // If two Modules have the same FullName, they will have the same OpaqueID. OpaqueID() string // BucketID is an unstructured ID that represents the Bucket that this Module was constructed // with via ModuleSetProvider. @@ -71,14 +72,14 @@ type Module interface { // // May be empty if a Module was not constructed with a Bucket via a ModuleSetProvider. BucketID() string - // ModuleFullName returns the full name of the Module. + // FullName returns the full name of the Module. // // May be nil. Callers should not rely on this value being present. // However, this is always present for remote Modules. // - // At least one of ModuleFullName and BucketID will always be present. Use OpaqueID + // At least one of FullName and BucketID will always be present. Use OpaqueID // as an always-present identifier. - ModuleFullName() ModuleFullName + FullName() bufparse.FullName // CommitID returns the BSR ID of the Commit. // // It is up to the caller to convert this to a dashless ID when necessary. @@ -86,7 +87,7 @@ type Module interface { // May be empty, that is CommitID() == uuid.Nil may be true. // Callers should not rely on this value being present. // - // If ModuleFullName is nil, this will always be empty. + // If FullName is nil, this will always be empty. CommitID() uuid.UUID // Description returns a human-readable description of the Module. // @@ -121,7 +122,7 @@ type Module interface { // This list is pruned - only Modules that this Module actually depends on (either directly or transitively) // via import statements within its .proto files will be returned. // - // Dependencies with the same ModuleFullName will always have the same Commits and Digests. + // Dependencies with the same FullName will always have the same Commits and Digests. // // Sorted by OpaqueID. ModuleDeps() ([]ModuleDep, error) @@ -159,7 +160,7 @@ type Module interface { // dependencies specified in a buf.lock (with no correspoding Module in the Workspace), // or a DepNode in a CreateCommitRequest with no corresponding ModuleNode. // - // Remote Modules will always have ModuleFullNames. + // Remote Modules will always have FullNames. IsLocal() bool // V1Beta1OrV1BufYAMLObjectData returns the original source buf.yaml associated with this Module, if the @@ -199,10 +200,10 @@ type Module interface { // ModuleToModuleKey returns a new ModuleKey for the given Module. // -// The given Module must have a ModuleFullName and CommitID, otherwise this will return error. +// The given Module must have a FullName and CommitID, otherwise this will return error. func ModuleToModuleKey(module Module, digestType DigestType) (ModuleKey, error) { return newModuleKey( - module.ModuleFullName(), + module.FullName(), module.CommitID(), func() (Digest, error) { return module.Digest(digestType) @@ -233,7 +234,7 @@ type module struct { getBucket func() (storage.ReadBucket, error) bucketID string description string - moduleFullName ModuleFullName + moduleFullName bufparse.FullName commitID uuid.UUID isTarget bool isLocal bool @@ -254,7 +255,7 @@ func newModule( syncOnceValuesGetBucketWithStorageMatcherApplied func() (storage.ReadBucket, error), bucketID string, description string, - moduleFullName ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, isTarget bool, isLocal bool, @@ -336,7 +337,7 @@ func newModule( func (m *module) OpaqueID() string { // We know that one of bucketID and moduleFullName are present via construction. // - // Prefer moduleFullName since modules with the same ModuleFullName should have the same OpaqueID. + // Prefer moduleFullName since modules with the same FullName should have the same OpaqueID. if m.moduleFullName != nil { return m.moduleFullName.String() } @@ -347,7 +348,7 @@ func (m *module) BucketID() string { return m.bucketID } -func (m *module) ModuleFullName() ModuleFullName { +func (m *module) FullName() bufparse.FullName { return m.moduleFullName } @@ -465,7 +466,7 @@ func newGetDigestFuncForModuleAndDigestType(module *module, digestType DigestTyp } moduleDepFullNames := make(map[string]struct{}, len(moduleDeps)) for _, dep := range moduleDeps { - fullName := dep.ModuleFullName() + fullName := dep.FullName() if fullName == nil { return nil, syserror.Newf("remote module dependencies should have full names") } @@ -473,7 +474,7 @@ func newGetDigestFuncForModuleAndDigestType(module *module, digestType DigestTyp } prunedDepModuleKeys := make([]ModuleKey, 0, len(declaredDepModuleKeys)) for _, dep := range declaredDepModuleKeys { - if _, ok := moduleDepFullNames[dep.ModuleFullName().String()]; ok { + if _, ok := moduleDepFullNames[dep.FullName().String()]; ok { prunedDepModuleKeys = append(prunedDepModuleKeys, dep) } } diff --git a/private/bufpkg/bufmodule/module_data.go b/private/bufpkg/bufmodule/module_data.go index e6be42d571..2d9e76e69f 100644 --- a/private/bufpkg/bufmodule/module_data.go +++ b/private/bufpkg/bufmodule/module_data.go @@ -85,8 +85,6 @@ func NewModuleData( // *** PRIVATE *** -// moduleData - type moduleData struct { moduleKey ModuleKey getBucket func() (storage.ReadBucket, error) @@ -166,7 +164,7 @@ func newModuleData( } if !DigestEqual(expectedDigest, actualDigest) { return &DigestMismatchError{ - ModuleFullName: moduleKey.ModuleFullName(), + FullName: moduleKey.FullName(), CommitID: moduleKey.CommitID(), ExpectedDigest: expectedDigest, ActualDigest: actualDigest, diff --git a/private/bufpkg/bufmodule/module_data_provider.go b/private/bufpkg/bufmodule/module_data_provider.go index 8648fe3ba0..1a149f27b4 100644 --- a/private/bufpkg/bufmodule/module_data_provider.go +++ b/private/bufpkg/bufmodule/module_data_provider.go @@ -30,7 +30,7 @@ type ModuleDataProvider interface { // // Returned ModuleDatas will be in the same order as the input ModuleKeys. // - // The input ModuleKeys are expected to be unique by ModuleFullName. The implementation + // The input ModuleKeys are expected to be unique by FullName. The implementation // may error if this is not the case. // // The input ModuleKeys are expected to have the same DigestType. The implementation diff --git a/private/bufpkg/bufmodule/module_full_name.go b/private/bufpkg/bufmodule/module_full_name.go deleted file mode 100644 index 03b00fd4bd..0000000000 --- a/private/bufpkg/bufmodule/module_full_name.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package bufmodule - -import ( - "errors" - "fmt" - "strings" - - "github.com/bufbuild/buf/private/pkg/netext" -) - -// ModuleFullName represents the full name of the Module, including its registry, owner, and name. -type ModuleFullName interface { - // String returns "registry/owner/name". - fmt.Stringer - - // Registry returns the hostname of the BSR instance that this Module is contained within. - Registry() string - // Owner returns the name of the user or organization that owns this Module. - Owner() string - // Name returns the name of the Module. - Name() string - - isModuleFullName() -} - -// NewModuleFullName returns a new ModuleFullName for the given components. -func NewModuleFullName( - registry string, - owner string, - name string, -) (ModuleFullName, error) { - return newModuleFullName( - registry, - owner, - name, - ) -} - -// ParseModuleFullName parses a ModuleFullName from a string in the form "registry/owner/name". -func ParseModuleFullName(moduleFullNameString string) (ModuleFullName, error) { - // parseModuleFullNameComponents returns ParseErrors. - registry, owner, name, err := parseModuleFullNameComponents(moduleFullNameString) - if err != nil { - return nil, err - } - if err := validateModuleFullNameParameters(registry, owner, name); err != nil { - return nil, &ParseError{ - typeString: "module name", - input: moduleFullNameString, - err: err, - } - } - // We don't rely on constructors for ParseErrors. - return NewModuleFullName(registry, owner, name) -} - -// ModuleFullNameEqual returns true if the ModuleFullNames are equal. -func ModuleFullNameEqual(one ModuleFullName, two ModuleFullName) bool { - if (one == nil) != (two == nil) { - return false - } - if one == nil { - return true - } - return one.String() == two.String() -} - -// HasModuleFullName is any type that has a ModuleFullName() function. -type HasModuleFullName interface { - // ModuleFullName returns the ModuleullName. - // - // May be empty. - ModuleFullName() ModuleFullName -} - -// ModuleFullNameStringToValue maps the values that implement HasModuleFullName to a map -// from ModuleFullName string to the unique value that has this ModuleFullName. -// -// If any value has a nil ModuleFullName, this value is not added to the map. Therefore, -// for types that potentially have a nil ModuleFullName, you cannot reply on this function -// returning a map of the same length as the input values. -// -// Returns error if there are values with duplicate ModuleFullNames. -func ModuleFullNameStringToUniqueValue[T HasModuleFullName, S ~[]T](values S) (map[string]T, error) { - m := make(map[string]T, len(values)) - for _, value := range values { - moduleFullName := value.ModuleFullName() - if moduleFullName == nil { - continue - } - existingValue, ok := m[moduleFullName.String()] - if ok { - return nil, fmt.Errorf( - "duplicate module names in input: %q, %q", - existingValue.ModuleFullName().String(), - moduleFullName.String(), - ) - } - m[moduleFullName.String()] = value - } - return m, nil -} - -// *** PRIVATE *** - -type moduleFullName struct { - registry string - owner string - name string -} - -func newModuleFullName( - registry string, - owner string, - name string, -) (*moduleFullName, error) { - if err := validateModuleFullNameParameters(registry, owner, name); err != nil { - return nil, err - } - return &moduleFullName{ - registry: registry, - owner: owner, - name: name, - }, nil -} - -func (m *moduleFullName) Registry() string { - return m.registry -} - -func (m *moduleFullName) Owner() string { - return m.owner -} - -func (m *moduleFullName) Name() string { - return m.name -} - -func (m *moduleFullName) String() string { - return m.registry + "/" + m.owner + "/" + m.name -} - -func (*moduleFullName) isModuleFullName() {} - -func validateModuleFullNameParameters( - registry string, - owner string, - name string, -) error { - if registry == "" { - return errors.New("registry is empty") - } - if _, err := netext.ValidateHostname(registry); err != nil { - return fmt.Errorf("registry %q is not a valid hostname: %w", registry, err) - } - if owner == "" { - return errors.New("owner is empty") - } - if strings.Contains(owner, "/") { - return fmt.Errorf("owner %q cannot contain slashes", owner) - } - if name == "" { - return errors.New("name is empty") - } - if strings.Contains(name, "/") { - return fmt.Errorf("name %q cannot contain slashes", name) - } - return nil -} diff --git a/private/bufpkg/bufmodule/module_key.go b/private/bufpkg/bufmodule/module_key.go index 73241bb9e1..a0679e747c 100644 --- a/private/bufpkg/bufmodule/module_key.go +++ b/private/bufpkg/bufmodule/module_key.go @@ -20,6 +20,7 @@ import ( "strings" "sync" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/syserror" "github.com/bufbuild/buf/private/pkg/uuidutil" @@ -35,10 +36,10 @@ type ModuleKey interface { // String returns "registry/owner/name:dashlessCommitID". fmt.Stringer - // ModuleFullName returns the full name of the Module. + // FullName returns the full name of the Module. // // Always present. - ModuleFullName() ModuleFullName + FullName() bufparse.FullName // CommitID returns the ID of the Commit. // // It is up to the caller to convert this to a dashless ID when necessary. @@ -61,7 +62,7 @@ type ModuleKey interface { // *not* validate the digest. If you need to validate the digest, call Digest() and evaluate // the returned error. func NewModuleKey( - moduleFullName ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, getDigest func() (Digest, error), ) (ModuleKey, error) { @@ -107,25 +108,25 @@ func ModuleKeyToCommitKey(moduleKey ModuleKey) (CommitKey, error) { if err != nil { return nil, err } - return newCommitKey(moduleKey.ModuleFullName().Registry(), moduleKey.CommitID(), digest.Type()) + return newCommitKey(moduleKey.FullName().Registry(), moduleKey.CommitID(), digest.Type()) } // *** PRIVATE *** type moduleKey struct { - moduleFullName ModuleFullName + moduleFullName bufparse.FullName commitID uuid.UUID getDigest func() (Digest, error) } func newModuleKey( - moduleFullName ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, getDigest func() (Digest, error), ) (*moduleKey, error) { if moduleFullName == nil { - return nil, errors.New("nil ModuleFullName when constructing ModuleKey") + return nil, errors.New("nil FullName when constructing ModuleKey") } if commitID == uuid.Nil { return nil, errors.New("empty commitID when constructing ModuleKey") @@ -134,7 +135,7 @@ func newModuleKey( } func newModuleKeyNoValidate( - moduleFullName ModuleFullName, + moduleFullName bufparse.FullName, commitID uuid.UUID, getDigest func() (Digest, error), ) *moduleKey { @@ -145,7 +146,7 @@ func newModuleKeyNoValidate( } } -func (m *moduleKey) ModuleFullName() ModuleFullName { +func (m *moduleKey) FullName() bufparse.FullName { return m.moduleFullName } diff --git a/private/bufpkg/bufmodule/module_key_provider.go b/private/bufpkg/bufmodule/module_key_provider.go index 369f2be43c..096e521a08 100644 --- a/private/bufpkg/bufmodule/module_key_provider.go +++ b/private/bufpkg/bufmodule/module_key_provider.go @@ -16,6 +16,8 @@ package bufmodule import ( "context" + + "github.com/bufbuild/buf/private/bufpkg/bufparse" ) // ModuleKeyProvider provides ModuleKeys for ModuleRefs. @@ -24,11 +26,11 @@ type ModuleKeyProvider interface { // // Returned ModuleKeys will be in the same order as the input ModuleRefs. // - // The input ModuleRefs are expected to be unique by ModuleFullName. The implementation + // The input ModuleRefs are expected to be unique by FullName. The implementation // may error if this is not the case. // // If there is no error, the length of the ModuleKeys returned will match the length of the ModuleRefs. // If there is an error, no ModuleKeys will be returned. // If any ModuleRef is not found, an error with fs.ErrNotExist will be returned. - GetModuleKeysForModuleRefs(context.Context, []ModuleRef, DigestType) ([]ModuleKey, error) + GetModuleKeysForModuleRefs(context.Context, []bufparse.Ref, DigestType) ([]ModuleKey, error) } diff --git a/private/bufpkg/bufmodule/module_ref.go b/private/bufpkg/bufmodule/module_ref.go deleted file mode 100644 index 8ef19f4824..0000000000 --- a/private/bufpkg/bufmodule/module_ref.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package bufmodule - -import ( - "errors" - "fmt" -) - -// ModuleRef is an unresolved reference to a Module. -type ModuleRef interface { - // String returns "registry/owner/name[:ref]". - fmt.Stringer - - // ModuleFullName returns the full name of the Module. - // - // Always present. - ModuleFullName() ModuleFullName - // Ref returns the reference within the Module. - // - // May be a label or dashless commitID. - // - // May be empty, in which case this references the commit of the default label of the Module. - Ref() string - - isModuleRef() -} - -// NewModuleRef returns a new ModuleRef for the given compoonents. -func NewModuleRef( - registry string, - owner string, - name string, - ref string, -) (ModuleRef, error) { - moduleFullName, err := NewModuleFullName(registry, owner, name) - if err != nil { - return nil, err - } - return newModuleRef(moduleFullName, ref) -} - -// ParseModuleRef parses a ModuleRef from a string in the form "registry/owner/name[:ref]". -func ParseModuleRef(moduleRefString string) (ModuleRef, error) { - // Returns ParseErrors. - registry, owner, name, ref, err := parseModuleRefComponents(moduleRefString) - if err != nil { - return nil, err - } - // We don't rely on constructors for ParseErrors. - return NewModuleRef(registry, owner, name, ref) -} - -// *** PRIVATE *** - -type moduleRef struct { - moduleFullName ModuleFullName - ref string -} - -func newModuleRef( - moduleFullName ModuleFullName, - ref string, -) (*moduleRef, error) { - if moduleFullName == nil { - return nil, errors.New("nil ModuleFullName when constructing ModuleRef") - } - return &moduleRef{ - moduleFullName: moduleFullName, - ref: ref, - }, nil -} - -func (m *moduleRef) ModuleFullName() ModuleFullName { - return m.moduleFullName -} - -func (m *moduleRef) Ref() string { - return m.ref -} - -func (m *moduleRef) String() string { - if m.ref == "" { - return m.moduleFullName.String() - } - return m.moduleFullName.String() + ":" + m.ref -} - -func (*moduleRef) isModuleRef() {} diff --git a/private/bufpkg/bufmodule/module_set.go b/private/bufpkg/bufmodule/module_set.go index cd3cd0d1ba..a89fa00d03 100644 --- a/private/bufpkg/bufmodule/module_set.go +++ b/private/bufpkg/bufmodule/module_set.go @@ -20,6 +20,7 @@ import ( "io/fs" "sort" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/cache" "github.com/bufbuild/buf/private/pkg/dag" "github.com/bufbuild/buf/private/pkg/slicesext" @@ -45,10 +46,10 @@ type ModuleSet interface { // These will be sorted by OpaqueID. Modules() []Module - // GetModuleForModuleFullName gets the Module for the ModuleFullName, if it exists. + // GetModuleForFullName gets the Module for the FullName, if it exists. // - // Returns nil if there is no Module with the given ModuleFullName. - GetModuleForModuleFullName(moduleFullName ModuleFullName) Module + // Returns nil if there is no Module with the given FullName. + GetModuleForFullName(moduleFullName bufparse.FullName) Module // GetModuleForOpaqueID gets the Module for the OpaqueID, if it exists. // // Returns nil if there is no Module with the given OpaqueID. However, as long @@ -267,11 +268,11 @@ func newModuleSet( bucketIDToModule := make(map[string]Module, len(modules)) commitIDToModule := make(map[uuid.UUID]Module, len(modules)) for _, module := range modules { - if moduleFullName := module.ModuleFullName(); moduleFullName != nil { + if moduleFullName := module.FullName(); moduleFullName != nil { moduleFullNameString := moduleFullName.String() if _, ok := moduleFullNameStringToModule[moduleFullNameString]; ok { // This should never happen. - return nil, syserror.Newf("duplicate ModuleFullName %q when constructing ModuleSet", moduleFullNameString) + return nil, syserror.Newf("duplicate FullName %q when constructing ModuleSet", moduleFullNameString) } moduleFullNameStringToModule[moduleFullNameString] = module } @@ -323,7 +324,7 @@ func (m *moduleSet) Modules() []Module { return c } -func (m *moduleSet) GetModuleForModuleFullName(moduleFullName ModuleFullName) Module { +func (m *moduleSet) GetModuleForFullName(moduleFullName bufparse.FullName) Module { return m.moduleFullNameStringToModule[moduleFullName.String()] } diff --git a/private/bufpkg/bufmodule/module_set_builder.go b/private/bufpkg/bufmodule/module_set_builder.go index 0e061a4fd8..819141c55c 100644 --- a/private/bufpkg/bufmodule/module_set_builder.go +++ b/private/bufpkg/bufmodule/module_set_builder.go @@ -20,6 +20,7 @@ import ( "log/slog" "sync/atomic" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/slicesext" "github.com/bufbuild/buf/private/pkg/slogext" @@ -57,8 +58,8 @@ type ModuleSetBuilder interface { // The Bucket used to construct the module will only be read for .proto files, // license file(s), and documentation file(s). // - // The BucketID is required. If LocalModuleWithModuleFullName.* is used, the OpaqueID will - // use this ModuleFullName, otherwise the OpaqueID will be the BucketID. + // The BucketID is required. If LocalModuleWithFullName.* is used, the OpaqueID will + // use this FullName, otherwise the OpaqueID will be the BucketID. // // The dependencies of the Module are unknown, since bufmodule does not parse configuration, // and therefore the dependencies of the Module are *not* automatically added to the ModuleSet. @@ -78,7 +79,7 @@ type ModuleSetBuilder interface { // The ModuleDataProvider given to the ModuleSetBuilder at construction time will be used to // retrieve this Module. // - // The resulting Module will not have a BucketID but will always have a ModuleFullName. + // The resulting Module will not have a BucketID but will always have a FullName. // // The dependencies of the Module will are *not* automatically added to the ModuleSet. // It is the caller's responsibility to add transitive dependencies. @@ -158,18 +159,18 @@ func NewModuleSetForRemoteModule( // LocalModuleOption is an option for AddLocalModule. type LocalModuleOption func(*localModuleOptions) -// LocalModuleWithModuleFullName returns a new LocalModuleOption that adds the given ModuleFullName to the result Module. +// LocalModuleWithFullName returns a new LocalModuleOption that adds the given FullName to the result Module. // -// Use LocalModuleWithModuleFullNameAndCommitID if you'd also like to add a CommitID. -func LocalModuleWithModuleFullName(moduleFullName ModuleFullName) LocalModuleOption { +// Use LocalModuleWithFullNameAndCommitID if you'd also like to add a CommitID. +func LocalModuleWithFullName(moduleFullName bufparse.FullName) LocalModuleOption { return func(localModuleOptions *localModuleOptions) { localModuleOptions.moduleFullName = moduleFullName } } -// LocalModuleWithModuleFullName returns a new LocalModuleOption that adds the given ModuleFullName and CommitID +// LocalModuleWithFullName returns a new LocalModuleOption that adds the given FullName and CommitID // to the result Module. -func LocalModuleWithModuleFullNameAndCommitID(moduleFullName ModuleFullName, commitID uuid.UUID) LocalModuleOption { +func LocalModuleWithFullNameAndCommitID(moduleFullName bufparse.FullName, commitID uuid.UUID) LocalModuleOption { return func(localModuleOptions *localModuleOptions) { localModuleOptions.moduleFullName = moduleFullName localModuleOptions.commitID = commitID @@ -320,7 +321,7 @@ func (b *moduleSetBuilder) AddLocalModule( option(localModuleOptions) } if localModuleOptions.moduleFullName == nil && localModuleOptions.commitID != uuid.Nil { - return b.addError(syserror.New("cannot set commitID without ModuleFullName when calling AddLocalModule")) + return b.addError(syserror.New("cannot set commitID without FullName when calling AddLocalModule")) } if !isTarget && (len(localModuleOptions.targetPaths) > 0 || len(localModuleOptions.targetExcludePaths) > 0) { return b.addError(syserror.Newf("cannot set TargetPaths for a non-target Module when calling AddLocalModule, bucketID=%q, targetPaths=%v, targetExcludePaths=%v", bucketID, localModuleOptions.targetPaths, localModuleOptions.targetExcludePaths)) @@ -447,7 +448,7 @@ func (b *moduleSetBuilder) addError(err error) *moduleSetBuilder { func (*moduleSetBuilder) isModuleSetBuilder() {} type localModuleOptions struct { - moduleFullName ModuleFullName + moduleFullName bufparse.FullName commitID uuid.UUID description string targetPaths []string diff --git a/private/bufpkg/bufmodule/registry_commit_id.go b/private/bufpkg/bufmodule/registry_commit_id.go index b6d3fa548c..be53a59f9d 100644 --- a/private/bufpkg/bufmodule/registry_commit_id.go +++ b/private/bufpkg/bufmodule/registry_commit_id.go @@ -35,7 +35,7 @@ func NewRegistryCommitID(registry string, commitID uuid.UUID) RegistryCommitID { // ModuleKeyToRegistryCommitID converts the ModuleKey to a RegistryCommitID. func ModuleKeyToRegistryCommitID(moduleKey ModuleKey) RegistryCommitID { return NewRegistryCommitID( - moduleKey.ModuleFullName().Registry(), + moduleKey.FullName().Registry(), moduleKey.CommitID(), ) } diff --git a/private/bufpkg/bufmodule/remote_dep.go b/private/bufpkg/bufmodule/remote_dep.go index 365f2a89c3..0ec236067b 100644 --- a/private/bufpkg/bufmodule/remote_dep.go +++ b/private/bufpkg/bufmodule/remote_dep.go @@ -28,7 +28,7 @@ import ( // We don't care about targeting here - we want to know the remote dependencies for // purposes such as figuring out what dependencies are unused and can be pruned. type RemoteDep interface { - // All RemoteDeps will have a ModuleFullName, as they are remote. + // All RemoteDeps will have a FullName, as they are remote. Module // IsDirect returns true if the remote dependency is a direct dependency of a Module in the ModuleSet. @@ -39,7 +39,7 @@ type RemoteDep interface { // RemoteDepsForModuleSet returns the remote dependencies of the local Modules in the ModuleSet. // -// Sorted by ModuleFullName. +// Sorted by FullName. // // TODO FUTURE: This needs a LOT of testing. func RemoteDepsForModuleSet(moduleSet ModuleSet) ([]RemoteDep, error) { @@ -48,7 +48,7 @@ func RemoteDepsForModuleSet(moduleSet ModuleSet) ([]RemoteDep, error) { // RemoteDepsForModules returns the remote dependencies of the local Modules. // -// Sorted by ModuleFullName. +// Sorted by FullName. // // This is used in situations where we have already filtered a ModuleSet down to a specific // set of modules, such as in the Uploader. Generally, you want to use RemoteDepsForModuleSet. @@ -59,7 +59,7 @@ func RemoteDepsForModuleSet(moduleSet ModuleSet) ([]RemoteDep, error) { // TODO FUTURE: This needs a LOT of testing. func RemoteDepsForModules(modules []Module) ([]RemoteDep, error) { visitedOpaqueIDs := make(map[string]struct{}) - remoteDepModuleFullNameStringsThatAreDirectDepsOfLocal := make(map[string]struct{}) + remoteDepFullNameStringsThatAreDirectDepsOfLocal := make(map[string]struct{}) var remoteDepModules []Module for _, module := range modules { if !module.IsLocal() { @@ -73,13 +73,13 @@ func RemoteDepsForModules(modules []Module) ([]RemoteDep, error) { if moduleDep.IsLocal() { continue } - moduleDepFullName := moduleDep.ModuleFullName() + moduleDepFullName := moduleDep.FullName() if moduleDepFullName == nil { // Just a sanity check. - return nil, syserror.New("remote module did not have a ModuleFullName") + return nil, syserror.New("remote module did not have a FullName") } if moduleDep.IsDirect() { - remoteDepModuleFullNameStringsThatAreDirectDepsOfLocal[moduleDepFullName.String()] = struct{}{} + remoteDepFullNameStringsThatAreDirectDepsOfLocal[moduleDepFullName.String()] = struct{}{} } iRemoteDepModules, err := remoteDepsForModuleSetRec( moduleDep, @@ -93,12 +93,12 @@ func RemoteDepsForModules(modules []Module) ([]RemoteDep, error) { } remoteDeps := make([]RemoteDep, len(remoteDepModules)) for i, remoteDepModule := range remoteDepModules { - moduleFullName := remoteDepModule.ModuleFullName() + moduleFullName := remoteDepModule.FullName() if moduleFullName == nil { // Just a sanity check. - return nil, syserror.New("remote module did not have a ModuleFullName") + return nil, syserror.New("remote module did not have a FullName") } - _, isDirect := remoteDepModuleFullNameStringsThatAreDirectDepsOfLocal[moduleFullName.String()] + _, isDirect := remoteDepFullNameStringsThatAreDirectDepsOfLocal[moduleFullName.String()] remoteDeps[i] = newRemoteDep(remoteDepModule, isDirect) } sort.Slice( @@ -138,9 +138,9 @@ func remoteDepsForModuleSetRec( if remoteModule.IsLocal() { return nil, syserror.New("only pass remote modules to remoteDepsForModuleSetRec") } - if remoteModule.ModuleFullName() == nil { + if remoteModule.FullName() == nil { // Just a sanity check. - return nil, syserror.New("ModuleFullName is nil for a remote Module") + return nil, syserror.New("FullName is nil for a remote Module") } opaqueID := remoteModule.OpaqueID() if _, ok := visitedOpaqueIDs[opaqueID]; ok { diff --git a/private/bufpkg/bufparse/bufparse.go b/private/bufpkg/bufparse/bufparse.go new file mode 100644 index 0000000000..bd0d7468b5 --- /dev/null +++ b/private/bufpkg/bufparse/bufparse.go @@ -0,0 +1,15 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufparse diff --git a/private/bufpkg/bufcas/parse_error.go b/private/bufpkg/bufparse/errors.go similarity index 76% rename from private/bufpkg/bufcas/parse_error.go rename to private/bufpkg/bufparse/errors.go index 647cbb71cb..74e78b1fc4 100644 --- a/private/bufpkg/bufcas/parse_error.go +++ b/private/bufpkg/bufparse/errors.go @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -package bufcas +package bufparse -import ( - "strings" -) +import "strings" // ParseError is an error that occurred during parsing. // @@ -38,8 +36,24 @@ type ParseError struct { err error } +// NewParseError returns a new ParseError. +// +// typeString is the user-consumable string representing of the type that was attempted to be parsed. +// input is the input string that was attempted to be parsed. +// err is the underlying error. +func NewParseError(typeString string, input string, err error) *ParseError { + return &ParseError{ + typeString: typeString, + input: input, + err: err, + } +} + // Error implements the error interface. func (p *ParseError) Error() string { + if p == nil { + return "" + } var builder strings.Builder _, _ = builder.WriteString(`could not parse`) if p.typeString != "" { @@ -59,9 +73,17 @@ func (p *ParseError) Error() string { } // Unwrap returns the underlying error. -func (p *ParseError) Unwrap() error { return p.err } +func (p *ParseError) Unwrap() error { + if p == nil { + return nil + } + return p.err +} // Input returns the input string that was attempted to be parsed. func (p *ParseError) Input() string { + if p == nil { + return "" + } return p.input } diff --git a/private/bufpkg/bufparse/full_name.go b/private/bufpkg/bufparse/full_name.go new file mode 100644 index 0000000000..8eaec34a7e --- /dev/null +++ b/private/bufpkg/bufparse/full_name.go @@ -0,0 +1,185 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufparse + +import ( + "errors" + "fmt" + "strings" + + "github.com/bufbuild/buf/private/pkg/netext" +) + +// FullName represents the full name of the entity, including its registry, owner, and name. +type FullName interface { + // String returns "registry/owner/name". + fmt.Stringer + + // Registry returns the hostname of the BSR instance that this is contained within. + Registry() string + // Owner returns the name of the user or organization that owns this . + Owner() string + // Name returns the name of the . + Name() string + + isFullName() +} + +// NewFullName returns a new FullName for the given components. +func NewFullName( + registry string, + owner string, + name string, +) (FullName, error) { + return newFullName( + registry, + owner, + name, + ) +} + +// ParseFullName parses a FullName from a string in the form "registry/owner/name". +// +// Returns an error of type *ParseError if the string could not be parsed. +func ParseFullName(fullNameString string) (FullName, error) { + // parseFullNameComponents returns ParseErrors. + registry, owner, name, err := parseFullNameComponents(fullNameString) + if err != nil { + return nil, err + } + if err := validateFullNameParameters(registry, owner, name); err != nil { + return nil, NewParseError( + "full name", + fullNameString, + err, + ) + } + // We don't rely on constructors for ParseErrors. + return NewFullName(registry, owner, name) +} + +// FullNameEqual returns true if the FullNames are equal. +func FullNameEqual(one FullName, two FullName) bool { + if (one == nil) != (two == nil) { + return false + } + if one == nil { + return true + } + return one.String() == two.String() +} + +// HasFullName is any type that has a FullName() function. +type HasFullName interface { + // FullName returns the ullName. + // + // May be empty. + FullName() FullName +} + +// FullNameStringToValue maps the values that implement HasFullName to a map +// from FullName string to the unique value that has this FullName. +// +// If any value has a nil FullName, this value is not added to the map. Therefore, +// for types that potentially have a nil FullName, you cannot reply on this function +// returning a map of the same length as the input values. +// +// Returns error if there are values with duplicate FullNames. +func FullNameStringToUniqueValue[T HasFullName, S ~[]T](values S) (map[string]T, error) { + m := make(map[string]T, len(values)) + for _, value := range values { + fullName := value.FullName() + if fullName == nil { + continue + } + existingValue, ok := m[fullName.String()] + if ok { + return nil, fmt.Errorf( + "duplicate full names in input: %q, %q", + existingValue.FullName().String(), + fullName.String(), + ) + } + m[fullName.String()] = value + } + return m, nil +} + +// *** PRIVATE *** + +type fullName struct { + registry string + owner string + name string +} + +func newFullName( + registry string, + owner string, + name string, +) (*fullName, error) { + if err := validateFullNameParameters(registry, owner, name); err != nil { + return nil, err + } + return &fullName{ + registry: registry, + owner: owner, + name: name, + }, nil +} + +func (m *fullName) Registry() string { + return m.registry +} + +func (m *fullName) Owner() string { + return m.owner +} + +func (m *fullName) Name() string { + return m.name +} + +func (m *fullName) String() string { + return m.registry + "/" + m.owner + "/" + m.name +} + +func (*fullName) isFullName() {} + +func validateFullNameParameters( + registry string, + owner string, + name string, +) error { + if registry == "" { + return errors.New("registry is empty") + } + if _, err := netext.ValidateHostname(registry); err != nil { + return fmt.Errorf("registry %q is not a valid hostname: %w", registry, err) + } + if owner == "" { + return errors.New("owner is empty") + } + if strings.Contains(owner, "/") { + return fmt.Errorf("owner %q cannot contain slashes", owner) + } + if name == "" { + return errors.New("name is empty") + } + if strings.Contains(name, "/") { + return fmt.Errorf("name %q cannot contain slashes", name) + } + return nil +} diff --git a/private/bufpkg/bufmodule/parse.go b/private/bufpkg/bufparse/parse.go similarity index 54% rename from private/bufpkg/bufmodule/parse.go rename to private/bufpkg/bufparse/parse.go index 50052983cb..e6ee14ed15 100644 --- a/private/bufpkg/bufmodule/parse.go +++ b/private/bufpkg/bufparse/parse.go @@ -12,38 +12,38 @@ // See the License for the specific language governing permissions and // limitations under the License. -package bufmodule +package bufparse import ( "errors" "strings" ) -func parseModuleFullNameComponents(path string) (registry string, owner string, name string, err error) { +func parseFullNameComponents(path string) (registry string, owner string, name string, err error) { slashSplit := strings.Split(path, "/") if len(slashSplit) != 3 { - return "", "", "", newInvalidModuleFullNameStringError(path) + return "", "", "", newInvalidFullNameStringError(path) } registry = strings.TrimSpace(slashSplit[0]) if registry == "" { - return "", "", "", newInvalidModuleFullNameStringError(path) + return "", "", "", newInvalidFullNameStringError(path) } owner = strings.TrimSpace(slashSplit[1]) if owner == "" { - return "", "", "", newInvalidModuleFullNameStringError(path) + return "", "", "", newInvalidFullNameStringError(path) } name = strings.TrimSpace(slashSplit[2]) if name == "" { - return "", "", "", newInvalidModuleFullNameStringError(path) + return "", "", "", newInvalidFullNameStringError(path) } return registry, owner, name, nil } -func parseModuleRefComponents(path string) (registry string, owner string, name string, ref string, err error) { +func parseRefComponents(path string) (registry string, owner string, name string, ref string, err error) { // split by the first "/" to separate the registry and remaining part slashSplit := strings.SplitN(path, "/", 2) if len(slashSplit) != 2 { - return "", "", "", "", newInvalidModuleRefStringError(path) + return "", "", "", "", newInvalidRefStringError(path) } registry, rest := slashSplit[0], slashSplit[1] // split the remaining part by ":" to separate the reference @@ -54,30 +54,30 @@ func parseModuleRefComponents(path string) (registry string, owner string, name case 2: ref = strings.TrimSpace(colonSplit[1]) if ref == "" { - return "", "", "", "", newInvalidModuleRefStringError(path) + return "", "", "", "", newInvalidRefStringError(path) } default: - return "", "", "", "", newInvalidModuleRefStringError(path) + return "", "", "", "", newInvalidRefStringError(path) } - registry, owner, name, err = parseModuleFullNameComponents(registry + "/" + colonSplit[0]) + registry, owner, name, err = parseFullNameComponents(registry + "/" + colonSplit[0]) if err != nil { - return "", "", "", "", newInvalidModuleRefStringError(path) + return "", "", "", "", newInvalidRefStringError(path) } return registry, owner, name, ref, nil } -func newInvalidModuleFullNameStringError(s string) error { - return &ParseError{ - typeString: "module name", - input: s, - err: errors.New("must be in the form registry/owner/name"), - } +func newInvalidFullNameStringError(s string) error { + return NewParseError( + "full name", + s, + errors.New("must be in the form registry/owner/name"), + ) } -func newInvalidModuleRefStringError(s string) error { - return &ParseError{ - typeString: "module reference", - input: s, - err: errors.New("must be in the form registry/owner/name[:ref]"), - } +func newInvalidRefStringError(s string) error { + return NewParseError( + "reference", + s, + errors.New("must be in the form registry/owner/name[:ref]"), + ) } diff --git a/private/bufpkg/bufparse/ref.go b/private/bufpkg/bufparse/ref.go new file mode 100644 index 0000000000..c14b33ffea --- /dev/null +++ b/private/bufpkg/bufparse/ref.go @@ -0,0 +1,103 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufparse + +import ( + "errors" + "fmt" +) + +// Ref is an unresolved reference to an entity. +type Ref interface { + // String returns "registry/owner/name[:ref]". + fmt.Stringer + + // FullName returns the full name of the . + // + // Always present. + FullName() FullName + // Ref returns the reference within the . + // + // May be a label or dashless commitID. + // + // May be empty, in which case this references the commit of the default label of the . + Ref() string + + isRef() +} + +// NewRef returns a new Ref for the given compoonents. +func NewRef( + registry string, + owner string, + name string, + ref string, +) (Ref, error) { + fullName, err := NewFullName(registry, owner, name) + if err != nil { + return nil, err + } + return newRef(fullName, ref) +} + +// ParseRef parses a Ref from a string in the form "registry/owner/name[:ref]". +// +// Returns an error of type *ParseError if the string could not be parsed. +func ParseRef(refString string) (Ref, error) { + // Returns ParseErrors. + registry, owner, name, ref, err := parseRefComponents(refString) + if err != nil { + return nil, err + } + // We don't rely on constructors for ParseErrors. + return NewRef(registry, owner, name, ref) +} + +// *** PRIVATE *** + +type ref struct { + fullName FullName + reference string +} + +func newRef( + fullName FullName, + reference string, +) (*ref, error) { + if fullName == nil { + return nil, errors.New("nil FullName when constructing Ref") + } + return &ref{ + fullName: fullName, + reference: reference, + }, nil +} + +func (m *ref) FullName() FullName { + return m.fullName +} + +func (m *ref) Ref() string { + return m.reference +} + +func (m *ref) String() string { + if m.reference == "" { + return m.fullName.String() + } + return m.fullName.String() + ":" + m.reference +} + +func (*ref) isRef() {} diff --git a/private/bufpkg/bufparse/usage.gen.go b/private/bufpkg/bufparse/usage.gen.go new file mode 100644 index 0000000000..f0a3423dc8 --- /dev/null +++ b/private/bufpkg/bufparse/usage.gen.go @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated. DO NOT EDIT. + +package bufparse + +import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/bufpkg/bufplugin/bufplugin.go b/private/bufpkg/bufplugin/bufplugin.go new file mode 100644 index 0000000000..71d95b056a --- /dev/null +++ b/private/bufpkg/bufplugin/bufplugin.go @@ -0,0 +1,15 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin diff --git a/private/bufpkg/bufplugin/commit.go b/private/bufpkg/bufplugin/commit.go new file mode 100644 index 0000000000..412a6721f0 --- /dev/null +++ b/private/bufpkg/bufplugin/commit.go @@ -0,0 +1,72 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "sync" + "time" +) + +// Commit represents a Commit for a Plugin on the BSR. +type Commit interface { + // PluginKey returns the PluginKey for the Commit. + PluginKey() PluginKey + // CreateTime returns the time the Commit was created on the BSR. + CreateTime() (time.Time, error) + + isCommit() +} + +// NewCommit returns a new Commit. +func NewCommit( + pluginKey PluginKey, + getCreateTime func() (time.Time, error), +) Commit { + return newCommit( + pluginKey, + getCreateTime, + ) +} + +// *** PRIVATE *** + +type commit struct { + pluginKey PluginKey + getCreateTime func() (time.Time, error) +} + +func newCommit( + pluginKey PluginKey, + getCreateTime func() (time.Time, error), +) *commit { + return &commit{ + pluginKey: pluginKey, + getCreateTime: sync.OnceValues(getCreateTime), + } +} + +func (c *commit) PluginKey() PluginKey { + return c.pluginKey +} + +func (c *commit) CreateTime() (time.Time, error) { + // This may invoke tamper-proofing per newCommit construction. + if _, err := c.pluginKey.Digest(); err != nil { + return time.Time{}, err + } + return c.getCreateTime() +} + +func (*commit) isCommit() {} diff --git a/private/bufpkg/bufplugin/digest.go b/private/bufpkg/bufplugin/digest.go new file mode 100644 index 0000000000..150af5a20c --- /dev/null +++ b/private/bufpkg/bufplugin/digest.go @@ -0,0 +1,214 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "bytes" + "encoding/hex" + "errors" + "fmt" + "strconv" + "strings" + + "github.com/bufbuild/buf/private/bufpkg/bufcas" + "github.com/bufbuild/buf/private/bufpkg/bufparse" + "github.com/bufbuild/buf/private/pkg/syserror" +) + +const ( + // DigestTypeP1 represents the p1 plugin digest type. + // + // The string value of this is "p1". + DigestTypeP1 DigestType = iota + 1 +) + +var ( + // AllDigestTypes are all known DigestTypes. + AllDigestTypes = []DigestType{ + DigestTypeP1, + } + digestTypeToString = map[DigestType]string{ + DigestTypeP1: "p1", + } + stringToDigestType = map[string]DigestType{ + "p1": DigestTypeP1, + } +) + +// DigestType is a type of digest. +type DigestType int + +// ParseDigestType parses a DigestType from its string representation. +// +// This reverses DigestType.String(). +// +// Returns an error of type *bufparse.ParseError if the string could not be parsed. +func ParseDigestType(s string) (DigestType, error) { + d, ok := stringToDigestType[s] + if !ok { + return 0, bufparse.NewParseError( + "plugin digest type", + s, + fmt.Errorf("unknown type: %q", s), + ) + } + return d, nil +} + +// String prints the string representation of the DigestType. +func (d DigestType) String() string { + s, ok := digestTypeToString[d] + if !ok { + return strconv.Itoa(int(d)) + } + return s +} + +// Digest is a digest of some content. +// +// It consists of a DigestType and a digest value. +type Digest interface { + // String() prints typeString:hexValue. + fmt.Stringer + + // Type returns the type of digest. + // + // Always a valid value. + Type() DigestType + // Value returns the digest value. + // + // Always non-empty. + Value() []byte + + isDigest() +} + +// NewDigest creates a new Digest. +func NewDigest(digestType DigestType, bufcasDigest bufcas.Digest) (Digest, error) { + switch digestType { + case DigestTypeP1: + if bufcasDigest.Type() != bufcas.DigestTypeShake256 { + return nil, syserror.Newf( + "trying to create a %v Digest for a cas Digest of type %v", + digestType, + bufcasDigest.Type(), + ) + } + return newDigest(digestType, bufcasDigest), nil + default: + // This is a system error. + return nil, syserror.Newf("unknown DigestType: %v", digestType) + } +} + +// ParseDigest parses a Digest from its string representation. +// +// A Digest string is of the form typeString:hexValue. +// The string is expected to be non-empty, If not, an error is returned. +// +// This reverses Digest.String(). +// +// Returns an error of type *bufparse.ParseError if the string could not be parsed. +func ParseDigest(s string) (Digest, error) { + if s == "" { + // This should be considered a system error. + return nil, errors.New("empty string passed to ParseDigest") + } + digestTypeString, hexValue, ok := strings.Cut(s, ":") + if !ok { + return nil, bufparse.NewParseError( + "plugin digest", + s, + errors.New(`must be in the form "digest_type:digest_hex_value"`), + ) + } + digestType, err := ParseDigestType(digestTypeString) + if err != nil { + return nil, bufparse.NewParseError( + "plugin digest", + digestTypeString, + err, + ) + } + value, err := hex.DecodeString(hexValue) + if err != nil { + return nil, bufparse.NewParseError( + "plugin digest", + s, + errors.New(`could not parse hex: must in the form "digest_type:digest_hex_value"`), + ) + } + switch digestType { + case DigestTypeP1: + bufcasDigest, err := bufcas.NewDigest(value) + if err != nil { + return nil, err + } + return NewDigest(digestType, bufcasDigest) + default: + return nil, syserror.Newf("unknown DigestType: %v", digestType) + } +} + +// DigestEqual returns true if the given Digests are considered equal. +// +// If both Digests are nil, this returns true. +// +// This checks both the DigestType and Digest value. +func DigestEqual(a Digest, b Digest) bool { + if (a == nil) != (b == nil) { + return false + } + if a == nil { + return true + } + if a.Type() != b.Type() { + return false + } + return bytes.Equal(a.Value(), b.Value()) +} + +/// *** PRIVATE *** + +type digest struct { + digestType DigestType + bufcasDigest bufcas.Digest + // Cache as we call String pretty often. + // We could do this lazily but not worth it. + stringValue string +} + +// validation should occur outside of this function. +func newDigest(digestType DigestType, bufcasDigest bufcas.Digest) *digest { + return &digest{ + digestType: digestType, + bufcasDigest: bufcasDigest, + stringValue: digestType.String() + ":" + hex.EncodeToString(bufcasDigest.Value()), + } +} + +func (d *digest) Type() DigestType { + return d.digestType +} + +func (d *digest) Value() []byte { + return d.bufcasDigest.Value() +} + +func (d *digest) String() string { + return d.stringValue +} + +func (*digest) isDigest() {} diff --git a/private/bufpkg/bufplugin/errors.go b/private/bufpkg/bufplugin/errors.go new file mode 100644 index 0000000000..14cc206d25 --- /dev/null +++ b/private/bufpkg/bufplugin/errors.go @@ -0,0 +1,70 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "strings" + + "github.com/bufbuild/buf/private/bufpkg/bufparse" + "github.com/bufbuild/buf/private/pkg/uuidutil" + "github.com/google/uuid" +) + +// DigestMismatchError is the error returned if the Digest of a downloaded Plugin or Commit +// does not match the expected digest in a buf.lock file. +type DigestMismatchError struct { + FullName bufparse.FullName + CommitID uuid.UUID + ExpectedDigest Digest + ActualDigest Digest +} + +// Error implements the error interface. +func (m *DigestMismatchError) Error() string { + if m == nil { + return "" + } + var builder strings.Builder + _, _ = builder.WriteString(`*** Digest verification failed`) + if m.FullName != nil { + _, _ = builder.WriteString(` for "`) + _, _ = builder.WriteString(m.FullName.String()) + if m.CommitID != uuid.Nil { + _, _ = builder.WriteString(`:`) + _, _ = builder.WriteString(uuidutil.ToDashless(m.CommitID)) + } + _, _ = builder.WriteString(`"`) + } + _, _ = builder.WriteString(` ***`) + _, _ = builder.WriteString("\n") + if m.ExpectedDigest != nil && m.ActualDigest != nil { + _, _ = builder.WriteString("\t") + _, _ = builder.WriteString(`Expected digest (from buf.lock): "`) + _, _ = builder.WriteString(m.ExpectedDigest.String()) + _, _ = builder.WriteString(`"`) + _, _ = builder.WriteString("\n") + _, _ = builder.WriteString("\t") + _, _ = builder.WriteString(`Actual digest: "`) + _, _ = builder.WriteString(m.ActualDigest.String()) + _, _ = builder.WriteString(`"`) + _, _ = builder.WriteString("\n") + } + _, _ = builder.WriteString("\t") + _, _ = builder.WriteString(`This may be the result of a hand-edited or corrupted buf.lock file, a corrupted local cache, and/or an attack.`) + _, _ = builder.WriteString("\n") + _, _ = builder.WriteString("\t") + _, _ = builder.WriteString(`To clear your local cache, run "buf registry cc".`) + return builder.String() +} diff --git a/private/bufpkg/bufplugin/plugin_data.go b/private/bufpkg/bufplugin/plugin_data.go new file mode 100644 index 0000000000..330c252b2e --- /dev/null +++ b/private/bufpkg/bufplugin/plugin_data.go @@ -0,0 +1,121 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "bytes" + "context" + "sync" + + "github.com/bufbuild/buf/private/bufpkg/bufcas" +) + +// PluginData presents the raw Plugin data read by PluginKey. +// +// A PluginData generally represents the data on a Plugin read from the BSR API +// or a cache. +// +// Tamper-proofing is done as part of every function. +type PluginData interface { + // PluginKey used to downoad this PluginData. + // + // The Digest from this PluginKey is used for tamper-proofing. It will be checked + // against the actual data downloaded before Data() returns. + PluginKey() PluginKey + // Data returns the bytes of the Plugin as a Wasm module. + // + // This is the raw bytes of the Wasm module in an uncompressed form. + Data() ([]byte, error) + + isPluginData() +} + +// NewPluginData returns a new PluginData. +// +// getData is expected to be lazily-loaded function where possible. +func NewPluginData( + ctx context.Context, + pluginKey PluginKey, + getData func() ([]byte, error), +) (PluginData, error) { + return newPluginData( + ctx, + pluginKey, + getData, + ) +} + +// *** PRIVATE *** + +type pluginData struct { + pluginKey PluginKey + getData func() ([]byte, error) + + checkDigest func() error +} + +func newPluginData( + ctx context.Context, + pluginKey PluginKey, + getData func() ([]byte, error), +) (*pluginData, error) { + pluginData := &pluginData{ + pluginKey: pluginKey, + getData: getData, + } + pluginData.checkDigest = sync.OnceValue(func() error { + pluginData, err := pluginData.getData() + if err != nil { + return err + } + bufcasDigest, err := bufcas.NewDigestForContent( + bytes.NewReader(pluginData), + ) + if err != nil { + return err + } + actualDigest, err := NewDigest(DigestTypeP1, bufcasDigest) + if err != nil { + return err + } + expectedDigest, err := pluginKey.Digest() + if err != nil { + return err + } + if !DigestEqual(actualDigest, expectedDigest) { + return &DigestMismatchError{ + FullName: pluginKey.FullName(), + CommitID: pluginKey.CommitID(), + ExpectedDigest: expectedDigest, + ActualDigest: actualDigest, + } + } + return nil + }) + return pluginData, nil +} + +func (p *pluginData) PluginKey() PluginKey { + return p.pluginKey +} + +func (p *pluginData) Data() ([]byte, error) { + if err := p.checkDigest(); err != nil { + return nil, err + } + return p.getData() +} + +func (*pluginData) isPluginData() {} diff --git a/private/bufpkg/bufplugin/plugin_data_provider.go b/private/bufpkg/bufplugin/plugin_data_provider.go new file mode 100644 index 0000000000..e8786cb128 --- /dev/null +++ b/private/bufpkg/bufplugin/plugin_data_provider.go @@ -0,0 +1,57 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "context" + "io/fs" +) + +var ( + // NopPluginDataProvider is a no-op PluginDataProvider. + NopPluginDataProvider PluginDataProvider = nopPluginDataProvider{} +) + +// PluginDataProvider provides PluginsDatas. +type PluginDataProvider interface { + // GetPluginDatasForPluginKeys gets the PluginDatas for the PluginKeys. + // + // Returned PluginDatas will be in the same order as the input PluginKeys. + // + // The input PluginKeys are expected to be unique by FullName. The implementation + // may error if this is not the case. + // + // The input PluginKeys are expected to have the same DigestType. The implementation + // may error if this is not the case. + // + // If there is no error, the length of the PluginDatas returned will match the length of the PluginKeys. + // If there is an error, no PluginDatas will be returned. + // If any PluginKey is not found, an error with fs.ErrNotExist will be returned. + GetPluginDatasForPluginKeys( + context.Context, + []PluginKey, + ) ([]PluginData, error) +} + +// *** PRIVATE *** + +type nopPluginDataProvider struct{} + +func (nopPluginDataProvider) GetPluginDatasForPluginKeys( + context.Context, + []PluginKey, +) ([]PluginData, error) { + return nil, fs.ErrNotExist +} diff --git a/private/bufpkg/bufplugin/plugin_key.go b/private/bufpkg/bufplugin/plugin_key.go new file mode 100644 index 0000000000..d78f140584 --- /dev/null +++ b/private/bufpkg/bufplugin/plugin_key.go @@ -0,0 +1,117 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "errors" + "fmt" + "sync" + + "github.com/bufbuild/buf/private/bufpkg/bufparse" + "github.com/bufbuild/buf/private/pkg/uuidutil" + "github.com/google/uuid" +) + +// PluginKey provides identifying information for a Plugin. +// +// PluginKeys are returned from PluginKeyProviders, and represent a Plugin's complete +// identity. They also match to what we store in buf.lock files. PluginKeys can be used +// to get Plugins via a PluginProvider. +type PluginKey interface { + // String returns "registry/owner/name:dashlessCommitID". + fmt.Stringer + + // FullName returns the full name of the Plugin. + // + // Always present. + FullName() bufparse.FullName + // CommitID returns the ID of the Commit. + // + // It is up to the caller to convert this to a dashless ID when necessary. + // + // Always present, that is CommitID() == uuid.Nil will always be false. + CommitID() uuid.UUID + // Digest returns the Plugin digest. + // + // Note this is *not* a bufcas.Digest - this is a Digest. + // bufcas.Digests are a lower-level type that just deal in terms of + // files and content. A PluginDigest is a specific algorithm applied to + // the Plugin data. + Digest() (Digest, error) + + isPluginKey() +} + +// NewPluginKey returns a new PluginKey. +// +// The Digest will be loaded lazily if needed. Note this means that NewPluginKey does +// *not* validate the digest. If you need to validate the digset, call Digest() and evaluate +// the returned error. +func NewPluginKey( + pluginFullName bufparse.FullName, + commitID uuid.UUID, + getDigest func() (Digest, error), +) (PluginKey, error) { + return newPluginKey( + pluginFullName, + commitID, + getDigest, + ) +} + +// ** PRIVATE ** + +type pluginKey struct { + pluginFullName bufparse.FullName + commitID uuid.UUID + + getDigest func() (Digest, error) +} + +func newPluginKey( + pluginFullName bufparse.FullName, + commitID uuid.UUID, + getDigest func() (Digest, error), +) (*pluginKey, error) { + if pluginFullName == nil { + return nil, errors.New("nil FullName when constructing PluginKey") + } + if commitID == uuid.Nil { + return nil, errors.New("empty commitID when constructing PluginKey") + } + return &pluginKey{ + pluginFullName: pluginFullName, + commitID: commitID, + getDigest: sync.OnceValues(getDigest), + }, nil +} + +func (p *pluginKey) FullName() bufparse.FullName { + return p.pluginFullName +} + +func (p *pluginKey) CommitID() uuid.UUID { + return p.commitID +} + +func (p *pluginKey) Digest() (Digest, error) { + return p.getDigest() +} + +func (p *pluginKey) String() string { + return p.pluginFullName.String() + ":" + uuidutil.ToDashless(p.commitID) +} + +func (*pluginKey) isPluginKey() {} diff --git a/private/bufpkg/bufplugin/plugin_key_provider.go b/private/bufpkg/bufplugin/plugin_key_provider.go new file mode 100644 index 0000000000..fcde880280 --- /dev/null +++ b/private/bufpkg/bufplugin/plugin_key_provider.go @@ -0,0 +1,54 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bufplugin + +import ( + "context" + "io/fs" + + "github.com/bufbuild/buf/private/bufpkg/bufparse" +) + +var ( + // NopPluginKeyProvider is a no-op PluginKeyProvider. + NopPluginKeyProvider PluginKeyProvider = nopPluginKeyProvider{} +) + +// PluginKeyProvider provides PluginKeys for bufparse.Refs. +type PluginKeyProvider interface { + // GetPluginKeysForPluginRefs gets the PluginKets for the given PluginRefs. + // + // Returned PluginKeys will be in the same order as the input PluginRefs. + // + // The input PluginRefs are expected to be unique by FullName. The implementation + // may error if this is not the case. + // + // If there is no error, the length of the PluginKeys returned will match the length of the Refs. + // If there is an error, no PluginKeys will be returned. + // If any PluginRef is not found, an error with fs.ErrNotExist will be returned. + GetPluginKeysForPluginRefs(context.Context, []bufparse.Ref, DigestType) ([]PluginKey, error) +} + +// *** PRIVATE *** + +type nopPluginKeyProvider struct{} + +func (nopPluginKeyProvider) GetPluginKeysForPluginRefs( + context.Context, + []bufparse.Ref, + DigestType, +) ([]PluginKey, error) { + return nil, fs.ErrNotExist +} diff --git a/private/bufpkg/bufplugin/usage.gen.go b/private/bufpkg/bufplugin/usage.gen.go new file mode 100644 index 0000000000..6ffd8bf974 --- /dev/null +++ b/private/bufpkg/bufplugin/usage.gen.go @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated. DO NOT EDIT. + +package bufplugin + +import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/bufpkg/bufprotosource/bufprotosource.go b/private/bufpkg/bufprotosource/bufprotosource.go index 664225812e..4c3be081b1 100644 --- a/private/bufpkg/bufprotosource/bufprotosource.go +++ b/private/bufpkg/bufprotosource/bufprotosource.go @@ -29,7 +29,7 @@ import ( "sort" "strconv" - "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/bufpkg/bufparse" "github.com/bufbuild/buf/private/pkg/normalpath" "github.com/bufbuild/buf/private/pkg/protodescriptor" "github.com/google/uuid" @@ -247,16 +247,16 @@ type FileInfo interface { // RootDirPath: proto // ExternalPath: /foo/bar/proto/one/one.proto ExternalPath() string - // ModuleFullName is the module that this file came from. + // FullName is the module that this file came from. // // Note this *can* be nil if we did not build from a named module. // All code must assume this can be nil. // Note that nil checking should work since the backing type is always a pointer. - ModuleFullName() bufmodule.ModuleFullName + FullName() bufparse.FullName // CommitID is the commit for the module that this file came from. // - // This will only be set if ModuleFullName is set, but may not be set - // even if ModuleFullName is set, that is commit is optional information + // This will only be set if FullName is set, but may not be set + // even if FullName is set, that is commit is optional information // even if we know what module this file came from. CommitID() uuid.UUID // IsImport returns true if this file is an import. From 5fda66b080c26ebf292fa8b69883ecde73f4abe0 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:04:16 -0500 Subject: [PATCH 25/34] Move registry commit and label commands under modules (#3454) --- CHANGELOG.md | 5 +- private/buf/cmd/buf/buf.go | 84 +++++++++++++------ .../registry/label/labelarchive/usage.gen.go | 19 ----- .../registry/label/labelinfo/usage.gen.go | 19 ----- .../registry/label/labellist/usage.gen.go | 19 ----- .../label/labelunarchive/usage.gen.go | 19 ----- .../modulecommitaddlabel.go} | 10 ++- .../modulecommitaddlabel/usage.gen.go | 19 +++++ .../modulecommitinfo/modulecommitinfo.go} | 10 ++- .../modulecommitinfo}/usage.gen.go | 2 +- .../modulecommitlist/modulecommitlist.go} | 6 +- .../modulecommitlist}/usage.gen.go | 2 +- .../modulecommitresolve.go} | 10 ++- .../modulecommitresolve/usage.gen.go | 19 +++++ .../modulelabelarchive/modulelabelarchive.go} | 10 ++- .../modulelabelarchive/usage.gen.go | 19 +++++ .../modulelabelinfo/modulelabelinfo.go} | 10 ++- .../modulelabel/modulelabelinfo}/usage.gen.go | 2 +- .../modulelabellist/modulelabellist.go} | 10 ++- .../modulelabel/modulelabellist}/usage.gen.go | 2 +- .../modulelabelunarchive.go} | 10 ++- .../modulelabelunarchive/usage.gen.go | 19 +++++ 22 files changed, 188 insertions(+), 137 deletions(-) delete mode 100644 private/buf/cmd/buf/command/registry/label/labelarchive/usage.gen.go delete mode 100644 private/buf/cmd/buf/command/registry/label/labelinfo/usage.gen.go delete mode 100644 private/buf/cmd/buf/command/registry/label/labellist/usage.gen.go delete mode 100644 private/buf/cmd/buf/command/registry/label/labelunarchive/usage.gen.go rename private/buf/cmd/buf/command/registry/{commit/commitaddlabel/commitaddlabel.go => module/modulecommit/modulecommitaddlabel/modulecommitaddlabel.go} (95%) create mode 100644 private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitaddlabel/usage.gen.go rename private/buf/cmd/buf/command/registry/{commit/commitinfo/commitinfo.go => module/modulecommit/modulecommitinfo/modulecommitinfo.go} (94%) rename private/buf/cmd/buf/command/registry/{commit/commitresolve => module/modulecommit/modulecommitinfo}/usage.gen.go (96%) rename private/buf/cmd/buf/command/registry/{commit/commitlist/commitlist.go => module/modulecommit/modulecommitlist/modulecommitlist.go} (98%) rename private/buf/cmd/buf/command/registry/{commit/commitinfo => module/modulecommit/modulecommitlist}/usage.gen.go (96%) rename private/buf/cmd/buf/command/registry/{commit/commitresolve/commitresolve.go => module/modulecommit/modulecommitresolve/modulecommitresolve.go} (93%) create mode 100644 private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitresolve/usage.gen.go rename private/buf/cmd/buf/command/registry/{label/labelarchive/labelarchive.go => module/modulelabel/modulelabelarchive/modulelabelarchive.go} (93%) create mode 100644 private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelarchive/usage.gen.go rename private/buf/cmd/buf/command/registry/{label/labelinfo/labelinfo.go => module/modulelabel/modulelabelinfo/modulelabelinfo.go} (94%) rename private/buf/cmd/buf/command/registry/{commit/commitlist => module/modulelabel/modulelabelinfo}/usage.gen.go (96%) rename private/buf/cmd/buf/command/registry/{label/labellist/labellist.go => module/modulelabel/modulelabellist/modulelabellist.go} (96%) rename private/buf/cmd/buf/command/registry/{commit/commitaddlabel => module/modulelabel/modulelabellist}/usage.gen.go (96%) rename private/buf/cmd/buf/command/registry/{label/labelunarchive/labelunarchive.go => module/modulelabel/modulelabelunarchive/modulelabelunarchive.go} (93%) create mode 100644 private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelunarchive/usage.gen.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 137fefaf96..f04f4f3dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## [Unreleased] -- No changes yet. +- Move `buf registry commit` to `buf registry module commit`. Command + `buf registry commit` is now deprecated. +- Move `buf registry label` to `buf registry module label`. Command + `buf registry label` is now deprecated. ## [v1.46.0] - 2024-10-29 diff --git a/private/buf/cmd/buf/buf.go b/private/buf/cmd/buf/buf.go index 277c88d653..57dcc15bfc 100644 --- a/private/buf/cmd/buf/buf.go +++ b/private/buf/cmd/buf/buf.go @@ -63,18 +63,18 @@ import ( "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules" "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen" "github.com/bufbuild/buf/private/buf/cmd/buf/command/push" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/commit/commitaddlabel" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/commit/commitinfo" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/commit/commitlist" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/commit/commitresolve" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/label/labelarchive" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/label/labelinfo" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/label/labellist" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/label/labelunarchive" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitaddlabel" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitinfo" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitlist" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitresolve" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulecreate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduledelete" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduledeprecate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleinfo" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelarchive" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelinfo" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabellist" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelunarchive" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleundeprecate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleupdate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationcreate" @@ -151,20 +151,20 @@ func NewRootCommand(name string) *appcmd.Command { }, { Use: "mod", - Short: `Manage Buf modules. All commands are deprecated and have moved to the "buf config", "buf dep", or "buf registry" subcommands.`, - Deprecated: `All commands are deprecated and have moved to the "buf config", "buf dep", or "buf registry" subcommands.`, + Short: `Manage Buf modules, all commands are deprecated and have moved to the "buf config", "buf dep", or "buf registry" subcommands.`, + Deprecated: `all commands are deprecated and have moved to the "buf config", "buf dep", or "buf registry" subcommands.`, Hidden: true, SubCommands: []*appcmd.Command{ // Deprecated and hidden. - configinit.NewCommand("init", builder, `use "buf config init" instead. However, "buf mod init" will continue to work.`, true, true), + configinit.NewCommand("init", builder, deprecatedMessage("buf config init", "buf mod init"), true, true), // Deprecated and hidden. - depprune.NewCommand("prune", builder, `use "buf dep prune" instead. However, "buf mod update" will continue to work.`, true), + depprune.NewCommand("prune", builder, deprecatedMessage("buf dep prune", "buf mod update"), true), // Deprecated and hidden. - depupdate.NewCommand("update", builder, `use "buf dep update" instead. However, "buf mod update" will continue to work.`, true), + depupdate.NewCommand("update", builder, deprecatedMessage("buf dep update", "buf mod update"), true), // Deprecated and hidden. modopen.NewCommand("open", builder), // Deprecated and hidden. - registrycc.NewCommand("clear-cache", builder, `use "buf registry cc" instead. However, "buf mod clear-cache" will continue to work.`, true, "cc"), + registrycc.NewCommand("clear-cache", builder, deprecatedMessage("buf registry cc", "buf mod clear-cache"), true, "cc"), // Deprecated and hidden. modlslintrules.NewCommand("ls-lint-rules", builder), // Deprecated and hidden. @@ -180,13 +180,15 @@ func NewRootCommand(name string) *appcmd.Command { whoami.NewCommand("whoami", builder), registrycc.NewCommand("cc", builder, ``, false), { - Use: "commit", - Short: "Manage a repository's commits", + Use: "commit", + Short: `Manage a module's commits, all commands are deprecated and have moved to the "buf registry module commit" subcommands`, + Deprecated: `all commands are deprecated and have moved to the "buf registry module commit" subcommands.`, + Hidden: true, SubCommands: []*appcmd.Command{ - commitaddlabel.NewCommand("add-label", builder), - commitinfo.NewCommand("info", builder), - commitlist.NewCommand("list", builder), - commitresolve.NewCommand("resolve", builder), + modulecommitaddlabel.NewCommand("add-label", builder, deprecatedMessage("buf registry module commit add-label", "buf registry commit add-label")), + modulecommitinfo.NewCommand("info", builder, deprecatedMessage("buf registry module commit info", "buf registry commit info")), + modulecommitlist.NewCommand("list", builder, deprecatedMessage("buf registry module commit list", "buf registry commit list")), + modulecommitresolve.NewCommand("resolve", builder, deprecatedMessage("buf registry module commit resolve", "buf registry commit resolve")), }, }, { @@ -197,13 +199,15 @@ func NewRootCommand(name string) *appcmd.Command { }, }, { - Use: "label", - Short: "Manage a module's labels", + Use: "label", + Short: `Manage a module's labels, all commands are deprecated and have moved to the "buf registry module label" subcommands`, + Deprecated: `all commands are deprecated and have moved to the "buf registry module label" subcommands.`, + Hidden: true, SubCommands: []*appcmd.Command{ - labelarchive.NewCommand("archive", builder), - labelinfo.NewCommand("info", builder), - labellist.NewCommand("list", builder), - labelunarchive.NewCommand("unarchive", builder), + modulelabelarchive.NewCommand("archive", builder, deprecatedMessage("buf registry module label archive", "buf registry label archive")), + modulelabelinfo.NewCommand("info", builder, deprecatedMessage("buf registry module label info", "buf registry label info")), + modulelabellist.NewCommand("list", builder, deprecatedMessage("buf registry module label list", "buf registry label list")), + modulelabelunarchive.NewCommand("unarchive", builder, deprecatedMessage("buf registry module label unarchive", "buf registry label unarchive")), }, }, { @@ -220,6 +224,26 @@ func NewRootCommand(name string) *appcmd.Command { Use: "module", Short: "Manage BSR modules", SubCommands: []*appcmd.Command{ + { + Use: "commit", + Short: "Manage a module's commits", + SubCommands: []*appcmd.Command{ + modulecommitaddlabel.NewCommand("add-label", builder, ""), + modulecommitinfo.NewCommand("info", builder, ""), + modulecommitlist.NewCommand("list", builder, ""), + modulecommitresolve.NewCommand("resolve", builder, ""), + }, + }, + { + Use: "label", + Short: "Manage a module's labels", + SubCommands: []*appcmd.Command{ + modulelabelarchive.NewCommand("archive", builder, ""), + modulelabelinfo.NewCommand("info", builder, ""), + modulelabellist.NewCommand("list", builder, ""), + modulelabelunarchive.NewCommand("unarchive", builder, ""), + }, + }, modulecreate.NewCommand("create", builder), moduleinfo.NewCommand("info", builder), moduledelete.NewCommand("delete", builder), @@ -458,3 +482,11 @@ func isPossibleNewCLIOldBSRError(connectErr *connect.Error) bool { return false } } + +// deprecatedMessage returns a message indicating that a command is deprecated. +func deprecatedMessage(newCommand, oldCommand string) string { + return fmt.Sprintf( + `use "%s" instead. However, "%s" will continue to work.`, + newCommand, oldCommand, + ) +} diff --git a/private/buf/cmd/buf/command/registry/label/labelarchive/usage.gen.go b/private/buf/cmd/buf/command/registry/label/labelarchive/usage.gen.go deleted file mode 100644 index 7ecccd9fca..0000000000 --- a/private/buf/cmd/buf/command/registry/label/labelarchive/usage.gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated. DO NOT EDIT. - -package labelarchive - -import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/label/labelinfo/usage.gen.go b/private/buf/cmd/buf/command/registry/label/labelinfo/usage.gen.go deleted file mode 100644 index d25f83e695..0000000000 --- a/private/buf/cmd/buf/command/registry/label/labelinfo/usage.gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated. DO NOT EDIT. - -package labelinfo - -import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/label/labellist/usage.gen.go b/private/buf/cmd/buf/command/registry/label/labellist/usage.gen.go deleted file mode 100644 index 5457c79316..0000000000 --- a/private/buf/cmd/buf/command/registry/label/labellist/usage.gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated. DO NOT EDIT. - -package labellist - -import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/label/labelunarchive/usage.gen.go b/private/buf/cmd/buf/command/registry/label/labelunarchive/usage.gen.go deleted file mode 100644 index 6edcfaad42..0000000000 --- a/private/buf/cmd/buf/command/registry/label/labelunarchive/usage.gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated. DO NOT EDIT. - -package labelunarchive - -import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go b/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitaddlabel/modulecommitaddlabel.go similarity index 95% rename from private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go rename to private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitaddlabel/modulecommitaddlabel.go index 54f430fa7a..1b7c06df45 100644 --- a/private/buf/cmd/buf/command/registry/commit/commitaddlabel/commitaddlabel.go +++ b/private/buf/cmd/buf/command/registry/module/modulecommit/modulecommitaddlabel/modulecommitaddlabel.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package commitaddlabel +package modulecommitaddlabel import ( "context" @@ -40,12 +40,14 @@ const ( func NewCommand( name string, builder appext.SubCommandBuilder, + deprecated string, ) *appcmd.Command { flags := newFlags() return &appcmd.Command{ - Use: name + " --label