1249 lines
68 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: extensions/ext/ext.proto
package ext
import (
base "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/base"
extra "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/extensions/extra"
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect"
protoregistry "github.com/golang/protobuf/v2/reflect/protoregistry"
protoiface "github.com/golang/protobuf/v2/runtime/protoiface"
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl"
sync "sync"
)
const _ = protoimpl.EnforceVersion(protoimpl.Version - 0)
type Enum int32
const (
Enum_ZERO Enum = 0
)
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
}
// Deprecated: Use Enum.Type.Values instead.
var Enum_value = map[string]int32{
"ZERO": 0,
}
func (x Enum) Enum() *Enum {
p := new(Enum)
*p = x
return p
}
func (x Enum) String() string {
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
func (Enum) Type() protoreflect.EnumType {
return xxx_File_extensions_ext_ext_proto_enumTypes[0]
}
func (x Enum) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *Enum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
if err != nil {
return err
}
*x = Enum(num)
return nil
}
// Deprecated: Use Enum.Type instead.
func (Enum) EnumDescriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{0}
}
type Message struct {
Data []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *Message) Reset() {
*x = Message{}
}
func (x *Message) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[0].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *Message) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[0].Methods()
}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{0}
}
func (x *Message) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
type ExtensionGroup struct {
ExtensionGroup *string `protobuf:"bytes,120,opt,name=extension_group,json=extensionGroup" json:"extension_group,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *ExtensionGroup) Reset() {
*x = ExtensionGroup{}
}
func (x *ExtensionGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExtensionGroup) ProtoMessage() {}
func (x *ExtensionGroup) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[1].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *ExtensionGroup) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[1].Methods()
}
// Deprecated: Use ExtensionGroup.ProtoReflect.Type instead.
func (*ExtensionGroup) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{1}
}
func (x *ExtensionGroup) GetExtensionGroup() string {
if x != nil && x.ExtensionGroup != nil {
return *x.ExtensionGroup
}
return ""
}
// Extend in the scope of another type.
type ExtendingMessage struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *ExtendingMessage) Reset() {
*x = ExtendingMessage{}
}
func (x *ExtendingMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExtendingMessage) ProtoMessage() {}
func (x *ExtendingMessage) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[2].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *ExtendingMessage) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[2].Methods()
}
// Deprecated: Use ExtendingMessage.ProtoReflect.Type instead.
func (*ExtendingMessage) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{2}
}
type RepeatedGroup struct {
RepeatedXGroup []string `protobuf:"bytes,319,rep,name=repeated_x_group,json=repeatedXGroup" json:"repeated_x_group,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *RepeatedGroup) Reset() {
*x = RepeatedGroup{}
}
func (x *RepeatedGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RepeatedGroup) ProtoMessage() {}
func (x *RepeatedGroup) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[3].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *RepeatedGroup) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[3].Methods()
}
// Deprecated: Use RepeatedGroup.ProtoReflect.Type instead.
func (*RepeatedGroup) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{3}
}
func (x *RepeatedGroup) GetRepeatedXGroup() []string {
if x != nil {
return x.RepeatedXGroup
}
return nil
}
// An extension of an extension.
type Extendable struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_InternalExtensions protoimpl.ExtensionFieldsV1 `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *Extendable) Reset() {
*x = Extendable{}
}
func (x *Extendable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Extendable) ProtoMessage() {}
func (x *Extendable) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[4].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *Extendable) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[4].Methods()
}
// Deprecated: Use Extendable.ProtoReflect.Type instead.
func (*Extendable) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{4}
}
var extRange_Extendable = []protoiface.ExtensionRangeV1{
{Start: 1, End: 536870911},
}
// Deprecated: Use Extendable.ProtoReflect.Type.ExtensionRanges instead.
func (*Extendable) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
return extRange_Extendable
}
// Message set wire format.
type MessageSetWireFormatExtension struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *MessageSetWireFormatExtension) Reset() {
*x = MessageSetWireFormatExtension{}
}
func (x *MessageSetWireFormatExtension) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageSetWireFormatExtension) ProtoMessage() {}
func (x *MessageSetWireFormatExtension) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[5].MessageOf(x)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}
func (m *MessageSetWireFormatExtension) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[5].Methods()
}
// Deprecated: Use MessageSetWireFormatExtension.ProtoReflect.Type instead.
func (*MessageSetWireFormatExtension) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{5}
}
type Message_M struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *Message_M) Reset() {
*x = Message_M{}
}
func (x *Message_M) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Message_M) ProtoMessage() {}
func (x *Message_M) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[6].MessageOf(x)
}
func (m *Message_M) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[6].Methods()
}
// Deprecated: Use Message_M.ProtoReflect.Type instead.
func (*Message_M) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{0, 0}
}
type ExtendingMessage_ExtendingMessageSubmessage struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *ExtendingMessage_ExtendingMessageSubmessage) Reset() {
*x = ExtendingMessage_ExtendingMessageSubmessage{}
}
func (x *ExtendingMessage_ExtendingMessageSubmessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExtendingMessage_ExtendingMessageSubmessage) ProtoMessage() {}
func (x *ExtendingMessage_ExtendingMessageSubmessage) ProtoReflect() protoreflect.Message {
return xxx_File_extensions_ext_ext_proto_messageTypes[7].MessageOf(x)
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_Methods() *protoiface.Methods {
return xxx_File_extensions_ext_ext_proto_messageTypes[7].Methods()
}
// Deprecated: Use ExtendingMessage_ExtendingMessageSubmessage.ProtoReflect.Type instead.
func (*ExtendingMessage_ExtendingMessageSubmessage) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{2, 0}
}
var xxx_File_extensions_ext_ext_proto_extDescs = []protoiface.ExtensionDescV1{
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*bool)(nil),
Field: 101,
Name: "goproto.protoc.extension.ext.extension_bool",
Tag: "varint,101,opt,name=extension_bool",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*Enum)(nil),
Field: 102,
Name: "goproto.protoc.extension.ext.extension_enum",
Tag: "varint,102,opt,name=extension_enum,enum=goproto.protoc.extension.ext.Enum",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int32)(nil),
Field: 103,
Name: "goproto.protoc.extension.ext.extension_int32",
Tag: "varint,103,opt,name=extension_int32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int32)(nil),
Field: 104,
Name: "goproto.protoc.extension.ext.extension_sint32",
Tag: "zigzag32,104,opt,name=extension_sint32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*uint32)(nil),
Field: 105,
Name: "goproto.protoc.extension.ext.extension_uint32",
Tag: "varint,105,opt,name=extension_uint32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int64)(nil),
Field: 106,
Name: "goproto.protoc.extension.ext.extension_int64",
Tag: "varint,106,opt,name=extension_int64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int64)(nil),
Field: 107,
Name: "goproto.protoc.extension.ext.extension_sint64",
Tag: "zigzag64,107,opt,name=extension_sint64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*uint64)(nil),
Field: 108,
Name: "goproto.protoc.extension.ext.extension_uint64",
Tag: "varint,108,opt,name=extension_uint64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int32)(nil),
Field: 109,
Name: "goproto.protoc.extension.ext.extension_sfixed32",
Tag: "fixed32,109,opt,name=extension_sfixed32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*uint32)(nil),
Field: 110,
Name: "goproto.protoc.extension.ext.extension_fixed32",
Tag: "fixed32,110,opt,name=extension_fixed32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*float32)(nil),
Field: 111,
Name: "goproto.protoc.extension.ext.extension_float",
Tag: "fixed32,111,opt,name=extension_float",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*int64)(nil),
Field: 112,
Name: "goproto.protoc.extension.ext.extension_sfixed64",
Tag: "fixed64,112,opt,name=extension_sfixed64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*uint64)(nil),
Field: 113,
Name: "goproto.protoc.extension.ext.extension_fixed64",
Tag: "fixed64,113,opt,name=extension_fixed64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*float64)(nil),
Field: 114,
Name: "goproto.protoc.extension.ext.extension_double",
Tag: "fixed64,114,opt,name=extension_double",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*string)(nil),
Field: 115,
Name: "goproto.protoc.extension.ext.extension_string",
Tag: "bytes,115,opt,name=extension_string",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]byte)(nil),
Field: 116,
Name: "goproto.protoc.extension.ext.extension_bytes",
Tag: "bytes,116,opt,name=extension_bytes",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*Message)(nil),
Field: 117,
Name: "goproto.protoc.extension.ext.extension_Message",
Tag: "bytes,117,opt,name=extension_Message",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*Message_M)(nil),
Field: 118,
Name: "goproto.protoc.extension.ext.extension_MessageM",
Tag: "bytes,118,opt,name=extension_MessageM",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*ExtensionGroup)(nil),
Field: 119,
Name: "goproto.protoc.extension.ext.extensiongroup",
Tag: "group,119,opt,name=ExtensionGroup",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*extra.ExtraMessage)(nil),
Field: 9,
Name: "goproto.protoc.extension.ext.extra_message",
Tag: "bytes,9,opt,name=extra_message",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]bool)(nil),
Field: 301,
Name: "goproto.protoc.extension.ext.repeated_x_bool",
Tag: "varint,301,rep,name=repeated_x_bool",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]Enum)(nil),
Field: 302,
Name: "goproto.protoc.extension.ext.repeated_x_enum",
Tag: "varint,302,rep,name=repeated_x_enum,enum=goproto.protoc.extension.ext.Enum",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int32)(nil),
Field: 303,
Name: "goproto.protoc.extension.ext.repeated_x_int32",
Tag: "varint,303,rep,name=repeated_x_int32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int32)(nil),
Field: 304,
Name: "goproto.protoc.extension.ext.repeated_x_sint32",
Tag: "zigzag32,304,rep,name=repeated_x_sint32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]uint32)(nil),
Field: 305,
Name: "goproto.protoc.extension.ext.repeated_x_uint32",
Tag: "varint,305,rep,name=repeated_x_uint32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int64)(nil),
Field: 306,
Name: "goproto.protoc.extension.ext.repeated_x_int64",
Tag: "varint,306,rep,name=repeated_x_int64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int64)(nil),
Field: 307,
Name: "goproto.protoc.extension.ext.repeated_x_sint64",
Tag: "zigzag64,307,rep,name=repeated_x_sint64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]uint64)(nil),
Field: 308,
Name: "goproto.protoc.extension.ext.repeated_x_uint64",
Tag: "varint,308,rep,name=repeated_x_uint64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int32)(nil),
Field: 309,
Name: "goproto.protoc.extension.ext.repeated_x_sfixed32",
Tag: "fixed32,309,rep,name=repeated_x_sfixed32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]uint32)(nil),
Field: 310,
Name: "goproto.protoc.extension.ext.repeated_x_fixed32",
Tag: "fixed32,310,rep,name=repeated_x_fixed32",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]float32)(nil),
Field: 311,
Name: "goproto.protoc.extension.ext.repeated_x_float",
Tag: "fixed32,311,rep,name=repeated_x_float",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]int64)(nil),
Field: 312,
Name: "goproto.protoc.extension.ext.repeated_x_sfixed64",
Tag: "fixed64,312,rep,name=repeated_x_sfixed64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]uint64)(nil),
Field: 313,
Name: "goproto.protoc.extension.ext.repeated_x_fixed64",
Tag: "fixed64,313,rep,name=repeated_x_fixed64",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]float64)(nil),
Field: 314,
Name: "goproto.protoc.extension.ext.repeated_x_double",
Tag: "fixed64,314,rep,name=repeated_x_double",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]string)(nil),
Field: 315,
Name: "goproto.protoc.extension.ext.repeated_x_string",
Tag: "bytes,315,rep,name=repeated_x_string",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([][]byte)(nil),
Field: 316,
Name: "goproto.protoc.extension.ext.repeated_x_bytes",
Tag: "bytes,316,rep,name=repeated_x_bytes",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]*Message)(nil),
Field: 317,
Name: "goproto.protoc.extension.ext.repeated_x_Message",
Tag: "bytes,317,rep,name=repeated_x_Message",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: ([]*RepeatedGroup)(nil),
Field: 318,
Name: "goproto.protoc.extension.ext.repeatedgroup",
Tag: "group,318,rep,name=RepeatedGroup",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*Extendable)(nil),
Field: 400,
Name: "goproto.protoc.extension.ext.extendable_field",
Tag: "bytes,400,opt,name=extendable_field",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*Extendable)(nil),
ExtensionType: (*string)(nil),
Field: 1,
Name: "goproto.protoc.extension.ext.extendable_string_field",
Tag: "bytes,1,opt,name=extendable_string_field",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.MessageSetWireFormatMessage)(nil),
ExtensionType: (*MessageSetWireFormatExtension)(nil),
Field: 101,
Name: "goproto.protoc.extension.ext.",
Tag: "bytes,101,opt,name=message_set_extension",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*string)(nil),
Field: 200,
Name: "goproto.protoc.extension.ext.ExtendingMessage.extending_message_string",
Tag: "bytes,200,opt,name=extending_message_string",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.BaseMessage)(nil),
ExtensionType: (*ExtendingMessage_ExtendingMessageSubmessage)(nil),
Field: 201,
Name: "goproto.protoc.extension.ext.ExtendingMessage.extending_message_submessage",
Tag: "bytes,201,opt,name=extending_message_submessage",
Filename: "extensions/ext/ext.proto",
},
{
ExtendedType: (*base.MessageSetWireFormatMessage)(nil),
ExtensionType: (*MessageSetWireFormatExtension)(nil),
Field: 100,
Name: "goproto.protoc.extension.ext.MessageSetWireFormatExtension",
Tag: "bytes,100,opt,name=message_set_extension",
Filename: "extensions/ext/ext.proto",
},
}
var (
// extend goproto.protoc.extension.base.BaseMessage { optional bool extension_bool = 101; }
E_ExtensionBool = &xxx_File_extensions_ext_ext_proto_extDescs[0]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.Enum extension_enum = 102; }
E_ExtensionEnum = &xxx_File_extensions_ext_ext_proto_extDescs[1]
// extend goproto.protoc.extension.base.BaseMessage { optional int32 extension_int32 = 103; }
E_ExtensionInt32 = &xxx_File_extensions_ext_ext_proto_extDescs[2]
// extend goproto.protoc.extension.base.BaseMessage { optional sint32 extension_sint32 = 104; }
E_ExtensionSint32 = &xxx_File_extensions_ext_ext_proto_extDescs[3]
// extend goproto.protoc.extension.base.BaseMessage { optional uint32 extension_uint32 = 105; }
E_ExtensionUint32 = &xxx_File_extensions_ext_ext_proto_extDescs[4]
// extend goproto.protoc.extension.base.BaseMessage { optional int64 extension_int64 = 106; }
E_ExtensionInt64 = &xxx_File_extensions_ext_ext_proto_extDescs[5]
// extend goproto.protoc.extension.base.BaseMessage { optional sint64 extension_sint64 = 107; }
E_ExtensionSint64 = &xxx_File_extensions_ext_ext_proto_extDescs[6]
// extend goproto.protoc.extension.base.BaseMessage { optional uint64 extension_uint64 = 108; }
E_ExtensionUint64 = &xxx_File_extensions_ext_ext_proto_extDescs[7]
// extend goproto.protoc.extension.base.BaseMessage { optional sfixed32 extension_sfixed32 = 109; }
E_ExtensionSfixed32 = &xxx_File_extensions_ext_ext_proto_extDescs[8]
// extend goproto.protoc.extension.base.BaseMessage { optional fixed32 extension_fixed32 = 110; }
E_ExtensionFixed32 = &xxx_File_extensions_ext_ext_proto_extDescs[9]
// extend goproto.protoc.extension.base.BaseMessage { optional float extension_float = 111; }
E_ExtensionFloat = &xxx_File_extensions_ext_ext_proto_extDescs[10]
// extend goproto.protoc.extension.base.BaseMessage { optional sfixed64 extension_sfixed64 = 112; }
E_ExtensionSfixed64 = &xxx_File_extensions_ext_ext_proto_extDescs[11]
// extend goproto.protoc.extension.base.BaseMessage { optional fixed64 extension_fixed64 = 113; }
E_ExtensionFixed64 = &xxx_File_extensions_ext_ext_proto_extDescs[12]
// extend goproto.protoc.extension.base.BaseMessage { optional double extension_double = 114; }
E_ExtensionDouble = &xxx_File_extensions_ext_ext_proto_extDescs[13]
// extend goproto.protoc.extension.base.BaseMessage { optional string extension_string = 115; }
E_ExtensionString = &xxx_File_extensions_ext_ext_proto_extDescs[14]
// extend goproto.protoc.extension.base.BaseMessage { optional bytes extension_bytes = 116; }
E_ExtensionBytes = &xxx_File_extensions_ext_ext_proto_extDescs[15]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.Message extension_Message = 117; }
E_Extension_Message = &xxx_File_extensions_ext_ext_proto_extDescs[16]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.Message.M extension_MessageM = 118; }
E_Extension_MessageM = &xxx_File_extensions_ext_ext_proto_extDescs[17]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.ExtensionGroup extensiongroup = 119; }
E_Extensiongroup = &xxx_File_extensions_ext_ext_proto_extDescs[18]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.extra.ExtraMessage extra_message = 9; }
E_ExtraMessage = &xxx_File_extensions_ext_ext_proto_extDescs[19]
// extend goproto.protoc.extension.base.BaseMessage { repeated bool repeated_x_bool = 301; }
E_RepeatedXBool = &xxx_File_extensions_ext_ext_proto_extDescs[20]
// extend goproto.protoc.extension.base.BaseMessage { repeated goproto.protoc.extension.ext.Enum repeated_x_enum = 302; }
E_RepeatedXEnum = &xxx_File_extensions_ext_ext_proto_extDescs[21]
// extend goproto.protoc.extension.base.BaseMessage { repeated int32 repeated_x_int32 = 303; }
E_RepeatedXInt32 = &xxx_File_extensions_ext_ext_proto_extDescs[22]
// extend goproto.protoc.extension.base.BaseMessage { repeated sint32 repeated_x_sint32 = 304; }
E_RepeatedXSint32 = &xxx_File_extensions_ext_ext_proto_extDescs[23]
// extend goproto.protoc.extension.base.BaseMessage { repeated uint32 repeated_x_uint32 = 305; }
E_RepeatedXUint32 = &xxx_File_extensions_ext_ext_proto_extDescs[24]
// extend goproto.protoc.extension.base.BaseMessage { repeated int64 repeated_x_int64 = 306; }
E_RepeatedXInt64 = &xxx_File_extensions_ext_ext_proto_extDescs[25]
// extend goproto.protoc.extension.base.BaseMessage { repeated sint64 repeated_x_sint64 = 307; }
E_RepeatedXSint64 = &xxx_File_extensions_ext_ext_proto_extDescs[26]
// extend goproto.protoc.extension.base.BaseMessage { repeated uint64 repeated_x_uint64 = 308; }
E_RepeatedXUint64 = &xxx_File_extensions_ext_ext_proto_extDescs[27]
// extend goproto.protoc.extension.base.BaseMessage { repeated sfixed32 repeated_x_sfixed32 = 309; }
E_RepeatedXSfixed32 = &xxx_File_extensions_ext_ext_proto_extDescs[28]
// extend goproto.protoc.extension.base.BaseMessage { repeated fixed32 repeated_x_fixed32 = 310; }
E_RepeatedXFixed32 = &xxx_File_extensions_ext_ext_proto_extDescs[29]
// extend goproto.protoc.extension.base.BaseMessage { repeated float repeated_x_float = 311; }
E_RepeatedXFloat = &xxx_File_extensions_ext_ext_proto_extDescs[30]
// extend goproto.protoc.extension.base.BaseMessage { repeated sfixed64 repeated_x_sfixed64 = 312; }
E_RepeatedXSfixed64 = &xxx_File_extensions_ext_ext_proto_extDescs[31]
// extend goproto.protoc.extension.base.BaseMessage { repeated fixed64 repeated_x_fixed64 = 313; }
E_RepeatedXFixed64 = &xxx_File_extensions_ext_ext_proto_extDescs[32]
// extend goproto.protoc.extension.base.BaseMessage { repeated double repeated_x_double = 314; }
E_RepeatedXDouble = &xxx_File_extensions_ext_ext_proto_extDescs[33]
// extend goproto.protoc.extension.base.BaseMessage { repeated string repeated_x_string = 315; }
E_RepeatedXString = &xxx_File_extensions_ext_ext_proto_extDescs[34]
// extend goproto.protoc.extension.base.BaseMessage { repeated bytes repeated_x_bytes = 316; }
E_RepeatedXBytes = &xxx_File_extensions_ext_ext_proto_extDescs[35]
// extend goproto.protoc.extension.base.BaseMessage { repeated goproto.protoc.extension.ext.Message repeated_x_Message = 317; }
E_RepeatedX_Message = &xxx_File_extensions_ext_ext_proto_extDescs[36]
// extend goproto.protoc.extension.base.BaseMessage { repeated goproto.protoc.extension.ext.RepeatedGroup repeatedgroup = 318; }
E_Repeatedgroup = &xxx_File_extensions_ext_ext_proto_extDescs[37]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.Extendable extendable_field = 400; }
E_ExtendableField = &xxx_File_extensions_ext_ext_proto_extDescs[38]
// extend goproto.protoc.extension.ext.Extendable { optional string extendable_string_field = 1; }
E_ExtendableStringField = &xxx_File_extensions_ext_ext_proto_extDescs[39]
// extend goproto.protoc.extension.base.MessageSetWireFormatMessage { optional goproto.protoc.extension.ext.MessageSetWireFormatExtension message_set_extension = 101; }
E_MessageSetExtension = &xxx_File_extensions_ext_ext_proto_extDescs[40]
// extend goproto.protoc.extension.base.BaseMessage { optional string extending_message_string = 200; }
E_ExtendingMessage_ExtendingMessageString = &xxx_File_extensions_ext_ext_proto_extDescs[41]
// extend goproto.protoc.extension.base.BaseMessage { optional goproto.protoc.extension.ext.ExtendingMessage.ExtendingMessageSubmessage extending_message_submessage = 201; }
E_ExtendingMessage_ExtendingMessageSubmessage = &xxx_File_extensions_ext_ext_proto_extDescs[42]
// extend goproto.protoc.extension.base.MessageSetWireFormatMessage { optional goproto.protoc.extension.ext.MessageSetWireFormatExtension message_set_extension = 100; }
E_MessageSetWireFormatExtension_MessageSetExtension = &xxx_File_extensions_ext_ext_proto_extDescs[43]
)
var File_extensions_ext_ext_proto protoreflect.FileDescriptor
var xxx_File_extensions_ext_ext_proto_rawDesc = []byte{
internal/fileinit: generate reflect data structures from raw descriptors This CL takes a significantly different approach to generating support for protobuf reflection. The previous approach involved generating a large number of Go literals to represent the reflection information. While that approach was correct, it resulted in too much binary bloat. The approach taken here initializes the reflection information from the raw descriptor proto, which is a relatively dense representation of the protobuf reflection information. In order to keep initialization cost low, several measures were taken: * At program init, the bare minimum is parsed in order to initialize naming information for enums, messages, extensions, and services declared in the file. This is done because those top-level declarations are often relevant for registration. * Only upon first are most of the other data structures for protobuf reflection actually initialized. * Instead of using proto.Unmarshal, a hand-written unmarshaler is used. This allows us to avoid a dependendency on the descriptor proto and also because the API for the descriptor proto is fundamentally non-performant since it requires an allocation for every primitive field. At a high-level, the new implementation lives in internal/fileinit. Several changes were made to other parts of the repository: * cmd/protoc-gen-go: * Stop compressing the raw descriptors. While compression does reduce the size of the descriptors by approximately 2x, it is a pre-mature optimization since the descriptors themselves are around 1% of the total binary bloat that is due to generated protobufs. * Seeding protobuf reflection from the raw descriptor significantly simplifies the generator implementation since it is no longer responsible for constructing a tree of Go literals to represent the same information. * We remove the generation of the shadow types and instead call protoimpl.MessageType.MessageOf. Unfortunately, this incurs an allocation for every call to ProtoReflect since we need to allocate a tuple that wraps a pointer to the message value, and a pointer to message type. * internal/impl: * We add a MessageType.GoType field and make it required that it is set prior to first use. This is done so that we can avoid calling MessageType.init except for when it is actually needed. The allows code to call (*FooMessage)(nil).ProtoReflect().Type() without fearing that the init code will run, possibly triggering a recursive deadlock (where the init code depends on getting the Type of some dependency which may be declared within the same file). * internal/cmd/generate-types: * The code to generate reflect/prototype/protofile_list_gen.go was copied and altered to generated internal/fileinit.desc_list_gen.go. At a high-level this CL adds significant technical complexity. However, this is offset by several possible future changes: * The prototype package can be drastically simplified. We can probably reimplement internal/legacy to use internal/fileinit instead, allowing us to drop another dependency on the prototype package. As a result, we can probably delete most of the constructor types in that package. * With the prototype package significantly pruned, and the fact that generated code no longer depend on depends on that package, we can consider merging what's left of prototype into protodesc. Change-Id: I6090f023f2e1b6afaf62bd3ae883566242e30715 Reviewed-on: https://go-review.googlesource.com/c/158539 Reviewed-by: Herbie Ong <herbie@google.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-01-18 09:32:24 -08:00
0x0a, 0x18, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x74,
0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x1a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x22, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
0x61, 0x1a, 0x03, 0x0a, 0x01, 0x4d, 0x22, 0x39, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x78, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x22, 0xd2, 0x02, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x0a, 0x1a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64,
0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x32, 0x65, 0x0a, 0x18, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e,
0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65,
0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xc8, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x16, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0xb8, 0x01, 0x0a, 0x1c,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x2e, 0x67,
0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73,
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x49, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x45,
0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x53, 0x75, 0x62, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x1a, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x75, 0x62, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61,
0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0xbf, 0x02, 0x20, 0x03,
0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x22, 0x16, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65,
0x2a, 0x08, 0x08, 0x01, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xcd, 0x01, 0x0a, 0x1d, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a,
0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53,
0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x10, 0x0a, 0x04, 0x45, 0x6e,
0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x3a, 0x51, 0x0a, 0x0e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2a,
0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42,
0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x3a,
0x75, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75,
0x6d, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x66, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65,
0x78, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x53, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x3a, 0x55, 0x0a, 0x10, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12,
0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x68, 0x20, 0x01, 0x28,
0x11, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x3a, 0x55, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x3a, 0x53, 0x0a, 0x0f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67,
0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73,
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x55,
0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x74,
0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61,
0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x6b,
0x20, 0x01, 0x28, 0x12, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53,
0x69, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x55, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x59, 0x0a, 0x12,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64,
0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61,
0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x6d,
0x20, 0x01, 0x28, 0x0f, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53,
0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x3a, 0x57, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67,
0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73,
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x07, 0x52, 0x10,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,
0x3a, 0x53, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c,
0x6f, 0x61, 0x74, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
0x6f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x46, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x59, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x70, 0x20, 0x01, 0x28, 0x10, 0x52, 0x11, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x3a, 0x57, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69,
0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x71, 0x20, 0x01, 0x28, 0x06, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x3a, 0x55, 0x0a, 0x10, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x2e,
0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61,
0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x72, 0x20, 0x01, 0x28, 0x01, 0x52,
0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65,
0x3a, 0x55, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x18, 0x73, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x53, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x7e, 0x0a, 0x11,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x75, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65,
0x78, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x82, 0x01, 0x0a,
0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4d, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x65, 0x78, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x52, 0x11,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x4d, 0x3a, 0x80, 0x01, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x18, 0x77, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x3a, 0x7d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x3a, 0x53, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x78, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0xad, 0x02, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61,
0x74, 0x65, 0x64, 0x58, 0x42, 0x6f, 0x6f, 0x6c, 0x3a, 0x77, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x2a, 0x2e, 0x67, 0x6f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xae, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22,
0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x45, 0x6e, 0x75,
0x6d, 0x3a, 0x55, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f,
0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0xaf, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x58, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2a, 0x2e,
0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61,
0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb0, 0x02, 0x20, 0x03, 0x28, 0x11,
0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x53, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0xb1, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61,
0x74, 0x65, 0x64, 0x58, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x3a, 0x55, 0x0a, 0x10, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a,
0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42,
0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb2, 0x02, 0x20, 0x03, 0x28,
0x03, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x49, 0x6e, 0x74, 0x36,
0x34, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f,
0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0xb3, 0x02, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61,
0x74, 0x65, 0x64, 0x58, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12,
0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb4, 0x02, 0x20, 0x03,
0x28, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x55, 0x69, 0x6e,
0x74, 0x36, 0x34, 0x3a, 0x5b, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x78, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb5, 0x02, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x11, 0x72,
0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,
0x3a, 0x59, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x66,
0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0xb6, 0x02, 0x20, 0x03, 0x28, 0x07, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61,
0x74, 0x65, 0x64, 0x58, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x3a, 0x55, 0x0a, 0x10, 0x72,
0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12,
0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb7, 0x02, 0x20, 0x03,
0x28, 0x02, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x46, 0x6c, 0x6f,
0x61, 0x74, 0x3a, 0x5b, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78,
0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xb8, 0x02, 0x20, 0x03, 0x28, 0x10, 0x52, 0x11, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x3a,
0x59, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x66, 0x69,
0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0xb9, 0x02, 0x20, 0x03, 0x28, 0x06, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x58, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12,
0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xba, 0x02, 0x20, 0x03,
0x28, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x44, 0x6f, 0x75,
0x62, 0x6c, 0x65, 0x3a, 0x57, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x78, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0xbb, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70,
0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x55, 0x0a, 0x10,
0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73,
0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65,
0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xbc, 0x02, 0x20,
0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x42, 0x79,
0x74, 0x65, 0x73, 0x3a, 0x80, 0x01, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x78, 0x5f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0xbd, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e,
0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x58, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x7e, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x18, 0xbe, 0x02, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
0x64, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x80, 0x01, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x2e, 0x67, 0x6f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x90, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28,
0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64,
0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x60, 0x0a, 0x17, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65,
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0xab, 0x01, 0x0a, 0x15,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74,
0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73,
0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x65, 0x78, 0x74,
}
var (
xxx_File_extensions_ext_ext_proto_rawDesc_once sync.Once
xxx_File_extensions_ext_ext_proto_rawDesc_data = xxx_File_extensions_ext_ext_proto_rawDesc
)
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
func xxx_File_extensions_ext_ext_proto_rawDescGZIP() []byte {
xxx_File_extensions_ext_ext_proto_rawDesc_once.Do(func() {
xxx_File_extensions_ext_ext_proto_rawDesc_data = protoimpl.X.CompressGZIP(xxx_File_extensions_ext_ext_proto_rawDesc_data)
})
return xxx_File_extensions_ext_ext_proto_rawDesc_data
}
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
var xxx_File_extensions_ext_ext_proto_enumTypes = make([]protoreflect.EnumType, 1)
var xxx_File_extensions_ext_ext_proto_messageTypes = make([]protoimpl.MessageType, 8)
var xxx_File_extensions_ext_ext_proto_goTypes = []interface{}{
internal/fileinit: generate reflect data structures from raw descriptors This CL takes a significantly different approach to generating support for protobuf reflection. The previous approach involved generating a large number of Go literals to represent the reflection information. While that approach was correct, it resulted in too much binary bloat. The approach taken here initializes the reflection information from the raw descriptor proto, which is a relatively dense representation of the protobuf reflection information. In order to keep initialization cost low, several measures were taken: * At program init, the bare minimum is parsed in order to initialize naming information for enums, messages, extensions, and services declared in the file. This is done because those top-level declarations are often relevant for registration. * Only upon first are most of the other data structures for protobuf reflection actually initialized. * Instead of using proto.Unmarshal, a hand-written unmarshaler is used. This allows us to avoid a dependendency on the descriptor proto and also because the API for the descriptor proto is fundamentally non-performant since it requires an allocation for every primitive field. At a high-level, the new implementation lives in internal/fileinit. Several changes were made to other parts of the repository: * cmd/protoc-gen-go: * Stop compressing the raw descriptors. While compression does reduce the size of the descriptors by approximately 2x, it is a pre-mature optimization since the descriptors themselves are around 1% of the total binary bloat that is due to generated protobufs. * Seeding protobuf reflection from the raw descriptor significantly simplifies the generator implementation since it is no longer responsible for constructing a tree of Go literals to represent the same information. * We remove the generation of the shadow types and instead call protoimpl.MessageType.MessageOf. Unfortunately, this incurs an allocation for every call to ProtoReflect since we need to allocate a tuple that wraps a pointer to the message value, and a pointer to message type. * internal/impl: * We add a MessageType.GoType field and make it required that it is set prior to first use. This is done so that we can avoid calling MessageType.init except for when it is actually needed. The allows code to call (*FooMessage)(nil).ProtoReflect().Type() without fearing that the init code will run, possibly triggering a recursive deadlock (where the init code depends on getting the Type of some dependency which may be declared within the same file). * internal/cmd/generate-types: * The code to generate reflect/prototype/protofile_list_gen.go was copied and altered to generated internal/fileinit.desc_list_gen.go. At a high-level this CL adds significant technical complexity. However, this is offset by several possible future changes: * The prototype package can be drastically simplified. We can probably reimplement internal/legacy to use internal/fileinit instead, allowing us to drop another dependency on the prototype package. As a result, we can probably delete most of the constructor types in that package. * With the prototype package significantly pruned, and the fact that generated code no longer depend on depends on that package, we can consider merging what's left of prototype into protodesc. Change-Id: I6090f023f2e1b6afaf62bd3ae883566242e30715 Reviewed-on: https://go-review.googlesource.com/c/158539 Reviewed-by: Herbie Ong <herbie@google.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-01-18 09:32:24 -08:00
(Enum)(0), // 0: goproto.protoc.extension.ext.Enum
(*Message)(nil), // 1: goproto.protoc.extension.ext.Message
(*ExtensionGroup)(nil), // 2: goproto.protoc.extension.ext.ExtensionGroup
(*ExtendingMessage)(nil), // 3: goproto.protoc.extension.ext.ExtendingMessage
(*RepeatedGroup)(nil), // 4: goproto.protoc.extension.ext.RepeatedGroup
(*Extendable)(nil), // 5: goproto.protoc.extension.ext.Extendable
(*MessageSetWireFormatExtension)(nil), // 6: goproto.protoc.extension.ext.MessageSetWireFormatExtension
(*Message_M)(nil), // 7: goproto.protoc.extension.ext.Message.M
(*ExtendingMessage_ExtendingMessageSubmessage)(nil), // 8: goproto.protoc.extension.ext.ExtendingMessage.ExtendingMessageSubmessage
(*base.BaseMessage)(nil), // 9: goproto.protoc.extension.base.BaseMessage
(*base.MessageSetWireFormatMessage)(nil), // 10: goproto.protoc.extension.base.MessageSetWireFormatMessage
(*extra.ExtraMessage)(nil), // 11: goproto.protoc.extension.extra.ExtraMessage
}
var xxx_File_extensions_ext_ext_proto_depIdxs = []int32{
internal/fileinit: generate reflect data structures from raw descriptors This CL takes a significantly different approach to generating support for protobuf reflection. The previous approach involved generating a large number of Go literals to represent the reflection information. While that approach was correct, it resulted in too much binary bloat. The approach taken here initializes the reflection information from the raw descriptor proto, which is a relatively dense representation of the protobuf reflection information. In order to keep initialization cost low, several measures were taken: * At program init, the bare minimum is parsed in order to initialize naming information for enums, messages, extensions, and services declared in the file. This is done because those top-level declarations are often relevant for registration. * Only upon first are most of the other data structures for protobuf reflection actually initialized. * Instead of using proto.Unmarshal, a hand-written unmarshaler is used. This allows us to avoid a dependendency on the descriptor proto and also because the API for the descriptor proto is fundamentally non-performant since it requires an allocation for every primitive field. At a high-level, the new implementation lives in internal/fileinit. Several changes were made to other parts of the repository: * cmd/protoc-gen-go: * Stop compressing the raw descriptors. While compression does reduce the size of the descriptors by approximately 2x, it is a pre-mature optimization since the descriptors themselves are around 1% of the total binary bloat that is due to generated protobufs. * Seeding protobuf reflection from the raw descriptor significantly simplifies the generator implementation since it is no longer responsible for constructing a tree of Go literals to represent the same information. * We remove the generation of the shadow types and instead call protoimpl.MessageType.MessageOf. Unfortunately, this incurs an allocation for every call to ProtoReflect since we need to allocate a tuple that wraps a pointer to the message value, and a pointer to message type. * internal/impl: * We add a MessageType.GoType field and make it required that it is set prior to first use. This is done so that we can avoid calling MessageType.init except for when it is actually needed. The allows code to call (*FooMessage)(nil).ProtoReflect().Type() without fearing that the init code will run, possibly triggering a recursive deadlock (where the init code depends on getting the Type of some dependency which may be declared within the same file). * internal/cmd/generate-types: * The code to generate reflect/prototype/protofile_list_gen.go was copied and altered to generated internal/fileinit.desc_list_gen.go. At a high-level this CL adds significant technical complexity. However, this is offset by several possible future changes: * The prototype package can be drastically simplified. We can probably reimplement internal/legacy to use internal/fileinit instead, allowing us to drop another dependency on the prototype package. As a result, we can probably delete most of the constructor types in that package. * With the prototype package significantly pruned, and the fact that generated code no longer depend on depends on that package, we can consider merging what's left of prototype into protodesc. Change-Id: I6090f023f2e1b6afaf62bd3ae883566242e30715 Reviewed-on: https://go-review.googlesource.com/c/158539 Reviewed-by: Herbie Ong <herbie@google.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-01-18 09:32:24 -08:00
9, // goproto.protoc.extension.ext.extension_bool:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_enum:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_int32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_sint32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_uint32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_int64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_sint64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_uint64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_sfixed32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_fixed32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_float:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_sfixed64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_fixed64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_double:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_string:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_bytes:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_Message:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extension_MessageM:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extensiongroup:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extra_message:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_bool:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_enum:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_int32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_sint32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_uint32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_int64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_sint64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_uint64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_sfixed32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_fixed32:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_float:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_sfixed64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_fixed64:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_double:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_string:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_bytes:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeated_x_Message:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.repeatedgroup:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.extendable_field:extendee -> goproto.protoc.extension.base.BaseMessage
5, // goproto.protoc.extension.ext.extendable_string_field:extendee -> goproto.protoc.extension.ext.Extendable
10, // goproto.protoc.extension.ext.message_set_extension:extendee -> goproto.protoc.extension.base.MessageSetWireFormatMessage
9, // goproto.protoc.extension.ext.ExtendingMessage.extending_message_string:extendee -> goproto.protoc.extension.base.BaseMessage
9, // goproto.protoc.extension.ext.ExtendingMessage.extending_message_submessage:extendee -> goproto.protoc.extension.base.BaseMessage
10, // goproto.protoc.extension.ext.MessageSetWireFormatExtension.message_set_extension:extendee -> goproto.protoc.extension.base.MessageSetWireFormatMessage
0, // goproto.protoc.extension.ext.extension_enum:type_name -> goproto.protoc.extension.ext.Enum
1, // goproto.protoc.extension.ext.extension_Message:type_name -> goproto.protoc.extension.ext.Message
7, // goproto.protoc.extension.ext.extension_MessageM:type_name -> goproto.protoc.extension.ext.Message.M
2, // goproto.protoc.extension.ext.extensiongroup:type_name -> goproto.protoc.extension.ext.ExtensionGroup
11, // goproto.protoc.extension.ext.extra_message:type_name -> goproto.protoc.extension.extra.ExtraMessage
0, // goproto.protoc.extension.ext.repeated_x_enum:type_name -> goproto.protoc.extension.ext.Enum
1, // goproto.protoc.extension.ext.repeated_x_Message:type_name -> goproto.protoc.extension.ext.Message
4, // goproto.protoc.extension.ext.repeatedgroup:type_name -> goproto.protoc.extension.ext.RepeatedGroup
5, // goproto.protoc.extension.ext.extendable_field:type_name -> goproto.protoc.extension.ext.Extendable
6, // goproto.protoc.extension.ext.message_set_extension:type_name -> goproto.protoc.extension.ext.MessageSetWireFormatExtension
8, // goproto.protoc.extension.ext.ExtendingMessage.extending_message_submessage:type_name -> goproto.protoc.extension.ext.ExtendingMessage.ExtendingMessageSubmessage
6, // goproto.protoc.extension.ext.MessageSetWireFormatExtension.message_set_extension:type_name -> goproto.protoc.extension.ext.MessageSetWireFormatExtension
}
func init() { xxx_File_extensions_ext_ext_proto_init() }
func xxx_File_extensions_ext_ext_proto_init() {
if File_extensions_ext_ext_proto != nil {
return
}
extensionTypes := make([]protoreflect.ExtensionType, 44)
File_extensions_ext_ext_proto = protoimpl.FileBuilder{
RawDescriptor: xxx_File_extensions_ext_ext_proto_rawDesc,
GoTypes: xxx_File_extensions_ext_ext_proto_goTypes,
DependencyIndexes: xxx_File_extensions_ext_ext_proto_depIdxs,
LegacyExtensions: xxx_File_extensions_ext_ext_proto_extDescs,
EnumOutputTypes: xxx_File_extensions_ext_ext_proto_enumTypes,
MessageOutputTypes: xxx_File_extensions_ext_ext_proto_messageTypes,
ExtensionOutputTypes: extensionTypes,
FilesRegistry: protoregistry.GlobalFiles,
TypesRegistry: protoregistry.GlobalTypes,
internal/fileinit: generate reflect data structures from raw descriptors This CL takes a significantly different approach to generating support for protobuf reflection. The previous approach involved generating a large number of Go literals to represent the reflection information. While that approach was correct, it resulted in too much binary bloat. The approach taken here initializes the reflection information from the raw descriptor proto, which is a relatively dense representation of the protobuf reflection information. In order to keep initialization cost low, several measures were taken: * At program init, the bare minimum is parsed in order to initialize naming information for enums, messages, extensions, and services declared in the file. This is done because those top-level declarations are often relevant for registration. * Only upon first are most of the other data structures for protobuf reflection actually initialized. * Instead of using proto.Unmarshal, a hand-written unmarshaler is used. This allows us to avoid a dependendency on the descriptor proto and also because the API for the descriptor proto is fundamentally non-performant since it requires an allocation for every primitive field. At a high-level, the new implementation lives in internal/fileinit. Several changes were made to other parts of the repository: * cmd/protoc-gen-go: * Stop compressing the raw descriptors. While compression does reduce the size of the descriptors by approximately 2x, it is a pre-mature optimization since the descriptors themselves are around 1% of the total binary bloat that is due to generated protobufs. * Seeding protobuf reflection from the raw descriptor significantly simplifies the generator implementation since it is no longer responsible for constructing a tree of Go literals to represent the same information. * We remove the generation of the shadow types and instead call protoimpl.MessageType.MessageOf. Unfortunately, this incurs an allocation for every call to ProtoReflect since we need to allocate a tuple that wraps a pointer to the message value, and a pointer to message type. * internal/impl: * We add a MessageType.GoType field and make it required that it is set prior to first use. This is done so that we can avoid calling MessageType.init except for when it is actually needed. The allows code to call (*FooMessage)(nil).ProtoReflect().Type() without fearing that the init code will run, possibly triggering a recursive deadlock (where the init code depends on getting the Type of some dependency which may be declared within the same file). * internal/cmd/generate-types: * The code to generate reflect/prototype/protofile_list_gen.go was copied and altered to generated internal/fileinit.desc_list_gen.go. At a high-level this CL adds significant technical complexity. However, this is offset by several possible future changes: * The prototype package can be drastically simplified. We can probably reimplement internal/legacy to use internal/fileinit instead, allowing us to drop another dependency on the prototype package. As a result, we can probably delete most of the constructor types in that package. * With the prototype package significantly pruned, and the fact that generated code no longer depend on depends on that package, we can consider merging what's left of prototype into protodesc. Change-Id: I6090f023f2e1b6afaf62bd3ae883566242e30715 Reviewed-on: https://go-review.googlesource.com/c/158539 Reviewed-by: Herbie Ong <herbie@google.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-01-18 09:32:24 -08:00
}.Init()
xxx_File_extensions_ext_ext_proto_rawDesc = nil
xxx_File_extensions_ext_ext_proto_goTypes = nil
xxx_File_extensions_ext_ext_proto_depIdxs = nil
cmd/protoc-gen-go: add support for protobuf reflection Implement support in protoc-gen-go for generating messages and enums that satisfy the v2 protobuf reflection interfaces. Specifically, the following are added: * top-level variable representing the file descriptor * ProtoReflect method on enums (to implement protoV2.Enum) * ProtoReflect method on messages (to implement protoV2.Message) The following are not supported yet: * resolving transitive dependencies for file imports * Extension descriptors * Service descriptors The implementation approach creates a single array for all the message and enum declarations and references sections of that array to complete dependencies. Since protobuf declarations can form a graph (a message may depend on itself), it is difficult to construct a graph as a single literal. One way is to use placeholder descriptors, but that is not efficient as it requires encoding the full name of each dependent enum and message and then later resolving it; thus, both expanding the binary size and also increasing initialization cost. Instead, we add a prototype.{Enum,Message}.Reference method to obtain a descriptor reference for the purposes for satisfying dependencies. As such, nested declarations and dependencies are populated in an init function. Other changes to support the implementation: * Added a protoimpl package to expose the MessageType type and also the MessageTypeOf and EnumTypeOf helper functions. * Added a protogen.File.GoIdent field to provide a suggested variable name for the file descriptor. * Added prototype.{Enum,Message}.Reference that provides a descriptor reference for the purposes for satisfying cyclic dependencies. * Added protoreflect.{Syntax,Cardinality,Kind}.GoString to obtain a Go source identifier that represents the given constant. Change-Id: I9455764882dee6ad10f251901e7d419091e8bf1d Reviewed-on: https://go-review.googlesource.com/c/150074 Reviewed-by: Damien Neil <dneil@google.com>
2018-11-15 14:44:37 -08:00
}