1176 lines
44 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: extensions/ext/ext.proto
package ext
import (
proto "github.com/golang/protobuf/proto"
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"
prototype "github.com/golang/protobuf/v2/reflect/prototype"
protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Enum int32
const (
Enum_ZERO Enum = 0
)
func (e Enum) Type() protoreflect.EnumType {
return xxx_Ext_protoFile_EnumTypes[0]
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 (e Enum) Number() protoreflect.EnumNumber {
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
return protoreflect.EnumNumber(e)
}
var Enum_name = map[int32]string{
0: "ZERO",
}
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 proto.EnumName(Enum_name, int32(x))
}
func (x *Enum) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Enum_value, data, "Enum")
if err != nil {
return err
}
*x = Enum(value)
return nil
}
func (Enum) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []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:"-"`
}
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
type xxx_Message struct{ m *Message }
func (m *Message) ProtoReflect() protoreflect.Message {
return xxx_Message{m}
}
func (m xxx_Message) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[0].Type
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 xxx_Message) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[0].KnownFieldsOf(m.m)
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 xxx_Message) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[0].UnknownFieldsOf(m.m)
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 xxx_Message) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{0}
}
func (m *Message) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Message.Unmarshal(m, b)
}
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
}
func (m *Message) XXX_Merge(src proto.Message) {
xxx_messageInfo_Message.Merge(m, src)
}
func (m *Message) XXX_Size() int {
return xxx_messageInfo_Message.Size(m)
}
func (m *Message) XXX_DiscardUnknown() {
xxx_messageInfo_Message.DiscardUnknown(m)
}
var xxx_messageInfo_Message proto.InternalMessageInfo
func (m *Message) GetData() []byte {
if m != nil {
return m.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:"-"`
}
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
type xxx_ExtensionGroup struct{ m *ExtensionGroup }
func (m *ExtensionGroup) ProtoReflect() protoreflect.Message {
return xxx_ExtensionGroup{m}
}
func (m xxx_ExtensionGroup) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[1].Type
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 xxx_ExtensionGroup) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[1].KnownFieldsOf(m.m)
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 xxx_ExtensionGroup) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[1].UnknownFieldsOf(m.m)
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 xxx_ExtensionGroup) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *ExtensionGroup) Reset() { *m = ExtensionGroup{} }
func (m *ExtensionGroup) String() string { return proto.CompactTextString(m) }
func (*ExtensionGroup) ProtoMessage() {}
func (*ExtensionGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{1}
}
func (m *ExtensionGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtensionGroup.Unmarshal(m, b)
}
func (m *ExtensionGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExtensionGroup.Marshal(b, m, deterministic)
}
func (m *ExtensionGroup) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExtensionGroup.Merge(m, src)
}
func (m *ExtensionGroup) XXX_Size() int {
return xxx_messageInfo_ExtensionGroup.Size(m)
}
func (m *ExtensionGroup) XXX_DiscardUnknown() {
xxx_messageInfo_ExtensionGroup.DiscardUnknown(m)
}
var xxx_messageInfo_ExtensionGroup proto.InternalMessageInfo
func (m *ExtensionGroup) GetExtensionGroup() string {
if m != nil && m.ExtensionGroup != nil {
return *m.ExtensionGroup
}
return ""
}
// Extend in the scope of another type.
type ExtendingMessage struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
type xxx_ExtendingMessage struct{ m *ExtendingMessage }
func (m *ExtendingMessage) ProtoReflect() protoreflect.Message {
return xxx_ExtendingMessage{m}
}
func (m xxx_ExtendingMessage) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[2].Type
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 xxx_ExtendingMessage) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[2].KnownFieldsOf(m.m)
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 xxx_ExtendingMessage) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[2].UnknownFieldsOf(m.m)
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 xxx_ExtendingMessage) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *ExtendingMessage) Reset() { *m = ExtendingMessage{} }
func (m *ExtendingMessage) String() string { return proto.CompactTextString(m) }
func (*ExtendingMessage) ProtoMessage() {}
func (*ExtendingMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{2}
}
func (m *ExtendingMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendingMessage.Unmarshal(m, b)
}
func (m *ExtendingMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExtendingMessage.Marshal(b, m, deterministic)
}
func (m *ExtendingMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExtendingMessage.Merge(m, src)
}
func (m *ExtendingMessage) XXX_Size() int {
return xxx_messageInfo_ExtendingMessage.Size(m)
}
func (m *ExtendingMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ExtendingMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ExtendingMessage proto.InternalMessageInfo
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:"-"`
}
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
type xxx_RepeatedGroup struct{ m *RepeatedGroup }
func (m *RepeatedGroup) ProtoReflect() protoreflect.Message {
return xxx_RepeatedGroup{m}
}
func (m xxx_RepeatedGroup) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[3].Type
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 xxx_RepeatedGroup) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[3].KnownFieldsOf(m.m)
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 xxx_RepeatedGroup) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[3].UnknownFieldsOf(m.m)
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 xxx_RepeatedGroup) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *RepeatedGroup) Reset() { *m = RepeatedGroup{} }
func (m *RepeatedGroup) String() string { return proto.CompactTextString(m) }
func (*RepeatedGroup) ProtoMessage() {}
func (*RepeatedGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{3}
}
func (m *RepeatedGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepeatedGroup.Unmarshal(m, b)
}
func (m *RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepeatedGroup.Marshal(b, m, deterministic)
}
func (m *RepeatedGroup) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepeatedGroup.Merge(m, src)
}
func (m *RepeatedGroup) XXX_Size() int {
return xxx_messageInfo_RepeatedGroup.Size(m)
}
func (m *RepeatedGroup) XXX_DiscardUnknown() {
xxx_messageInfo_RepeatedGroup.DiscardUnknown(m)
}
var xxx_messageInfo_RepeatedGroup proto.InternalMessageInfo
func (m *RepeatedGroup) GetRepeatedXGroup() []string {
if m != nil {
return m.RepeatedXGroup
}
return nil
}
// An extension of an extension.
type Extendable struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
type xxx_Extendable struct{ m *Extendable }
func (m *Extendable) ProtoReflect() protoreflect.Message {
return xxx_Extendable{m}
}
func (m xxx_Extendable) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[4].Type
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 xxx_Extendable) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[4].KnownFieldsOf(m.m)
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 xxx_Extendable) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[4].UnknownFieldsOf(m.m)
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 xxx_Extendable) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *Extendable) Reset() { *m = Extendable{} }
func (m *Extendable) String() string { return proto.CompactTextString(m) }
func (*Extendable) ProtoMessage() {}
func (*Extendable) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{4}
}
var extRange_Extendable = []proto.ExtensionRange{
{Start: 1, End: 536870911},
}
func (*Extendable) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_Extendable
}
func (m *Extendable) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Extendable.Unmarshal(m, b)
}
func (m *Extendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Extendable.Marshal(b, m, deterministic)
}
func (m *Extendable) XXX_Merge(src proto.Message) {
xxx_messageInfo_Extendable.Merge(m, src)
}
func (m *Extendable) XXX_Size() int {
return xxx_messageInfo_Extendable.Size(m)
}
func (m *Extendable) XXX_DiscardUnknown() {
xxx_messageInfo_Extendable.DiscardUnknown(m)
}
var xxx_messageInfo_Extendable proto.InternalMessageInfo
// Message set wire format.
type MessageSetWireFormatExtension struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
type xxx_MessageSetWireFormatExtension struct {
m *MessageSetWireFormatExtension
}
func (m *MessageSetWireFormatExtension) ProtoReflect() protoreflect.Message {
return xxx_MessageSetWireFormatExtension{m}
}
func (m xxx_MessageSetWireFormatExtension) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[5].Type
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 xxx_MessageSetWireFormatExtension) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[5].KnownFieldsOf(m.m)
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 xxx_MessageSetWireFormatExtension) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[5].UnknownFieldsOf(m.m)
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 xxx_MessageSetWireFormatExtension) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *MessageSetWireFormatExtension) Reset() { *m = MessageSetWireFormatExtension{} }
func (m *MessageSetWireFormatExtension) String() string { return proto.CompactTextString(m) }
func (*MessageSetWireFormatExtension) ProtoMessage() {}
func (*MessageSetWireFormatExtension) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{5}
}
func (m *MessageSetWireFormatExtension) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MessageSetWireFormatExtension.Unmarshal(m, b)
}
func (m *MessageSetWireFormatExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MessageSetWireFormatExtension.Marshal(b, m, deterministic)
}
func (m *MessageSetWireFormatExtension) XXX_Merge(src proto.Message) {
xxx_messageInfo_MessageSetWireFormatExtension.Merge(m, src)
}
func (m *MessageSetWireFormatExtension) XXX_Size() int {
return xxx_messageInfo_MessageSetWireFormatExtension.Size(m)
}
func (m *MessageSetWireFormatExtension) XXX_DiscardUnknown() {
xxx_messageInfo_MessageSetWireFormatExtension.DiscardUnknown(m)
}
var xxx_messageInfo_MessageSetWireFormatExtension proto.InternalMessageInfo
type Message_M struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
type xxx_Message_M struct{ m *Message_M }
func (m *Message_M) ProtoReflect() protoreflect.Message {
return xxx_Message_M{m}
}
func (m xxx_Message_M) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[6].Type
}
func (m xxx_Message_M) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[6].KnownFieldsOf(m.m)
}
func (m xxx_Message_M) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[6].UnknownFieldsOf(m.m)
}
func (m xxx_Message_M) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *Message_M) Reset() { *m = Message_M{} }
func (m *Message_M) String() string { return proto.CompactTextString(m) }
func (*Message_M) ProtoMessage() {}
func (*Message_M) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{0, 0}
}
func (m *Message_M) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Message_M.Unmarshal(m, b)
}
func (m *Message_M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Message_M.Marshal(b, m, deterministic)
}
func (m *Message_M) XXX_Merge(src proto.Message) {
xxx_messageInfo_Message_M.Merge(m, src)
}
func (m *Message_M) XXX_Size() int {
return xxx_messageInfo_Message_M.Size(m)
}
func (m *Message_M) XXX_DiscardUnknown() {
xxx_messageInfo_Message_M.DiscardUnknown(m)
}
var xxx_messageInfo_Message_M proto.InternalMessageInfo
type ExtendingMessage_ExtendingMessageSubmessage struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
type xxx_ExtendingMessage_ExtendingMessageSubmessage struct {
m *ExtendingMessage_ExtendingMessageSubmessage
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) ProtoReflect() protoreflect.Message {
return xxx_ExtendingMessage_ExtendingMessageSubmessage{m}
}
func (m xxx_ExtendingMessage_ExtendingMessageSubmessage) Type() protoreflect.MessageType {
return xxx_Ext_protoFile_MessageTypes[7].Type
}
func (m xxx_ExtendingMessage_ExtendingMessageSubmessage) KnownFields() protoreflect.KnownFields {
return xxx_Ext_protoFile_MessageTypes[7].KnownFieldsOf(m.m)
}
func (m xxx_ExtendingMessage_ExtendingMessageSubmessage) UnknownFields() protoreflect.UnknownFields {
return xxx_Ext_protoFile_MessageTypes[7].UnknownFieldsOf(m.m)
}
func (m xxx_ExtendingMessage_ExtendingMessageSubmessage) Interface() protoreflect.ProtoMessage {
return m.m
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) Reset() {
*m = ExtendingMessage_ExtendingMessageSubmessage{}
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) String() string {
return proto.CompactTextString(m)
}
func (*ExtendingMessage_ExtendingMessageSubmessage) ProtoMessage() {}
func (*ExtendingMessage_ExtendingMessageSubmessage) Descriptor() ([]byte, []int) {
return fileDescriptor_bf470ef4907b23cb, []int{2, 0}
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage.Unmarshal(m, b)
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage.Marshal(b, m, deterministic)
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage.Merge(m, src)
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_Size() int {
return xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage.Size(m)
}
func (m *ExtendingMessage_ExtendingMessageSubmessage) XXX_DiscardUnknown() {
xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage.DiscardUnknown(m)
}
var xxx_messageInfo_ExtendingMessage_ExtendingMessageSubmessage proto.InternalMessageInfo
var E_ExtensionBool = &proto.ExtensionDesc{
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",
}
var E_ExtensionEnum = &proto.ExtensionDesc{
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",
}
var E_ExtensionInt32 = &proto.ExtensionDesc{
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",
}
var E_ExtensionSint32 = &proto.ExtensionDesc{
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",
}
var E_ExtensionUint32 = &proto.ExtensionDesc{
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",
}
var E_ExtensionInt64 = &proto.ExtensionDesc{
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",
}
var E_ExtensionSint64 = &proto.ExtensionDesc{
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",
}
var E_ExtensionUint64 = &proto.ExtensionDesc{
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",
}
var E_ExtensionSfixed32 = &proto.ExtensionDesc{
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",
}
var E_ExtensionFixed32 = &proto.ExtensionDesc{
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",
}
var E_ExtensionFloat = &proto.ExtensionDesc{
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",
}
var E_ExtensionSfixed64 = &proto.ExtensionDesc{
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",
}
var E_ExtensionFixed64 = &proto.ExtensionDesc{
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",
}
var E_ExtensionDouble = &proto.ExtensionDesc{
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",
}
var E_ExtensionString = &proto.ExtensionDesc{
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",
}
var E_ExtensionBytes = &proto.ExtensionDesc{
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",
}
var E_Extension_Message = &proto.ExtensionDesc{
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",
}
var E_Extension_MessageM = &proto.ExtensionDesc{
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",
}
var E_Extensiongroup = &proto.ExtensionDesc{
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",
}
var E_ExtraMessage = &proto.ExtensionDesc{
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",
}
var E_RepeatedXBool = &proto.ExtensionDesc{
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",
}
var E_RepeatedXEnum = &proto.ExtensionDesc{
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",
}
var E_RepeatedXInt32 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXSint32 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXUint32 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXInt64 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXSint64 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXUint64 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXSfixed32 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXFixed32 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXFloat = &proto.ExtensionDesc{
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",
}
var E_RepeatedXSfixed64 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXFixed64 = &proto.ExtensionDesc{
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",
}
var E_RepeatedXDouble = &proto.ExtensionDesc{
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",
}
var E_RepeatedXString = &proto.ExtensionDesc{
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",
}
var E_RepeatedXBytes = &proto.ExtensionDesc{
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",
}
var E_RepeatedX_Message = &proto.ExtensionDesc{
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",
}
var E_Repeatedgroup = &proto.ExtensionDesc{
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",
}
var E_ExtendableField = &proto.ExtensionDesc{
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",
}
var E_ExtendableStringField = &proto.ExtensionDesc{
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",
}
var E_MessageSetExtension = &proto.ExtensionDesc{
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",
}
var E_ExtendingMessage_ExtendingMessageString = &proto.ExtensionDesc{
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",
}
var E_ExtendingMessage_ExtendingMessageSubmessage = &proto.ExtensionDesc{
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",
}
var E_MessageSetWireFormatExtension_MessageSetExtension = &proto.ExtensionDesc{
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",
}
func init() {
proto.RegisterFile("extensions/ext/ext.proto", fileDescriptor_bf470ef4907b23cb)
proto.RegisterEnum("goproto.protoc.extension.ext.Enum", Enum_name, Enum_value)
proto.RegisterType((*Message)(nil), "goproto.protoc.extension.ext.Message")
proto.RegisterType((*ExtensionGroup)(nil), "goproto.protoc.extension.ext.ExtensionGroup")
proto.RegisterType((*ExtendingMessage)(nil), "goproto.protoc.extension.ext.ExtendingMessage")
proto.RegisterType((*RepeatedGroup)(nil), "goproto.protoc.extension.ext.RepeatedGroup")
proto.RegisterType((*Extendable)(nil), "goproto.protoc.extension.ext.Extendable")
proto.RegisterType((*MessageSetWireFormatExtension)(nil), "goproto.protoc.extension.ext.MessageSetWireFormatExtension")
proto.RegisterType((*Message_M)(nil), "goproto.protoc.extension.ext.Message.M")
proto.RegisterType((*ExtendingMessage_ExtendingMessageSubmessage)(nil), "goproto.protoc.extension.ext.ExtendingMessage.ExtendingMessageSubmessage")
proto.RegisterExtension(E_ExtensionBool)
proto.RegisterExtension(E_ExtensionEnum)
proto.RegisterExtension(E_ExtensionInt32)
proto.RegisterExtension(E_ExtensionSint32)
proto.RegisterExtension(E_ExtensionUint32)
proto.RegisterExtension(E_ExtensionInt64)
proto.RegisterExtension(E_ExtensionSint64)
proto.RegisterExtension(E_ExtensionUint64)
proto.RegisterExtension(E_ExtensionSfixed32)
proto.RegisterExtension(E_ExtensionFixed32)
proto.RegisterExtension(E_ExtensionFloat)
proto.RegisterExtension(E_ExtensionSfixed64)
proto.RegisterExtension(E_ExtensionFixed64)
proto.RegisterExtension(E_ExtensionDouble)
proto.RegisterExtension(E_ExtensionString)
proto.RegisterExtension(E_ExtensionBytes)
proto.RegisterExtension(E_Extension_Message)
proto.RegisterExtension(E_Extension_MessageM)
proto.RegisterExtension(E_Extensiongroup)
proto.RegisterExtension(E_ExtraMessage)
proto.RegisterExtension(E_RepeatedXBool)
proto.RegisterExtension(E_RepeatedXEnum)
proto.RegisterExtension(E_RepeatedXInt32)
proto.RegisterExtension(E_RepeatedXSint32)
proto.RegisterExtension(E_RepeatedXUint32)
proto.RegisterExtension(E_RepeatedXInt64)
proto.RegisterExtension(E_RepeatedXSint64)
proto.RegisterExtension(E_RepeatedXUint64)
proto.RegisterExtension(E_RepeatedXSfixed32)
proto.RegisterExtension(E_RepeatedXFixed32)
proto.RegisterExtension(E_RepeatedXFloat)
proto.RegisterExtension(E_RepeatedXSfixed64)
proto.RegisterExtension(E_RepeatedXFixed64)
proto.RegisterExtension(E_RepeatedXDouble)
proto.RegisterExtension(E_RepeatedXString)
proto.RegisterExtension(E_RepeatedXBytes)
proto.RegisterExtension(E_RepeatedX_Message)
proto.RegisterExtension(E_Repeatedgroup)
proto.RegisterExtension(E_ExtendableField)
proto.RegisterExtension(E_ExtendableStringField)
proto.RegisterExtension(E_MessageSetExtension)
proto.RegisterExtension(E_ExtendingMessage_ExtendingMessageString)
proto.RegisterExtension(E_ExtendingMessage_ExtendingMessageSubmessage)
proto.RegisterExtension(E_MessageSetWireFormatExtension_MessageSetExtension)
}
var fileDescriptor_bf470ef4907b23cb = []byte{
// 1120 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcb, 0x6e, 0xdb, 0x46,
0x14, 0x86, 0x3b, 0x92, 0x12, 0x2b, 0x53, 0xcb, 0x96, 0x18, 0x24, 0x15, 0x04, 0x17, 0x18, 0x08,
0x28, 0x32, 0x75, 0x1b, 0x09, 0x60, 0x05, 0x01, 0x65, 0x77, 0x46, 0xed, 0xc0, 0x0b, 0xa1, 0x28,
0x0d, 0xc3, 0x4e, 0xba, 0x60, 0x29, 0x73, 0xc4, 0xb0, 0x95, 0x48, 0x97, 0x97, 0x44, 0x5d, 0x34,
0x10, 0xfa, 0x04, 0x7d, 0x8f, 0xa2, 0xf7, 0x5b, 0x7a, 0xdf, 0xb6, 0x8b, 0x6e, 0xfa, 0x44, 0xc1,
0xcc, 0xf0, 0x32, 0xa4, 0x64, 0x45, 0x43, 0x20, 0x0b, 0x09, 0xe4, 0x90, 0xfa, 0xce, 0xe1, 0x7f,
0x8e, 0xf8, 0x1f, 0x12, 0xb6, 0xc9, 0x3c, 0x24, 0x6e, 0xe0, 0x78, 0x6e, 0xd0, 0x27, 0xf3, 0x90,
0x7e, 0x7a, 0x97, 0xbe, 0x17, 0x7a, 0xca, 0x9e, 0xed, 0xb1, 0x0d, 0xbe, 0x7b, 0xd1, 0x4b, 0x4f,
0xa4, 0x5b, 0x9d, 0x8e, 0xf0, 0xbb, 0xb1, 0x19, 0x10, 0xf6, 0xc5, 0x4f, 0xed, 0xec, 0xe5, 0x99,
0xbe, 0xc9, 0xbf, 0xf9, 0xd1, 0x6e, 0x17, 0x6e, 0x8d, 0x48, 0x10, 0x98, 0x36, 0x51, 0x14, 0x58,
0xb3, 0xcc, 0xd0, 0x6c, 0x03, 0x04, 0xf0, 0xb6, 0xce, 0xb6, 0x3b, 0x55, 0x08, 0x46, 0xdd, 0xb7,
0xe1, 0xce, 0x61, 0xc2, 0xb8, 0xe7, 0x7b, 0xd1, 0xa5, 0x72, 0x07, 0xee, 0xa6, 0x54, 0xc3, 0xa6,
0x4b, 0xed, 0x39, 0x02, 0xf8, 0x86, 0xbe, 0x43, 0x72, 0x27, 0x76, 0xff, 0xaf, 0xc0, 0x26, 0xfb,
0xad, 0xe5, 0xb8, 0x76, 0x1c, 0xa8, 0xb3, 0x07, 0x3b, 0xc5, 0xb5, 0x93, 0x68, 0x3c, 0xe3, 0x5b,
0x2a, 0x89, 0x55, 0xa0, 0x47, 0x8d, 0x78, 0xd1, 0x08, 0x42, 0xdf, 0x71, 0x6d, 0x65, 0xbf, 0x77,
0xa5, 0x0c, 0xec, 0x8a, 0x0f, 0xcc, 0x80, 0xc4, 0xc4, 0xf6, 0x3f, 0x80, 0x65, 0x74, 0x9b, 0x14,
0x43, 0x31, 0x94, 0xfa, 0x14, 0xc0, 0xbd, 0x15, 0x71, 0xd2, 0x3c, 0xa4, 0x62, 0xfd, 0x4b, 0x63,
0xbd, 0xac, 0x1e, 0xf7, 0xd6, 0x55, 0xa9, 0x57, 0xbc, 0xe8, 0xde, 0xd5, 0x2a, 0xe8, 0x1d, 0x72,
0xe5, 0xb1, 0xae, 0x06, 0x1b, 0x3a, 0xb9, 0x24, 0x66, 0x48, 0x2c, 0x5e, 0x8e, 0xd7, 0x61, 0xd3,
0x8f, 0x17, 0x8c, 0x79, 0x5c, 0x8f, 0xbf, 0x2b, 0xa8, 0x4a, 0x0b, 0x92, 0x1c, 0x38, 0xe7, 0x05,
0xb9, 0x0d, 0x21, 0x8f, 0x6a, 0x8e, 0xa7, 0x64, 0xbf, 0x5e, 0x07, 0xcd, 0xc5, 0x62, 0xb1, 0xa8,
0x74, 0xff, 0x03, 0xf0, 0xd5, 0x24, 0x12, 0x09, 0xcf, 0x1c, 0x9f, 0x1c, 0x79, 0xfe, 0xcc, 0x0c,
0xd3, 0xc2, 0xab, 0x5f, 0x02, 0x78, 0x2b, 0x95, 0x89, 0x84, 0x46, 0x7a, 0x6d, 0x8a, 0xf6, 0x1c,
0xa5, 0x56, 0x71, 0x13, 0xe5, 0x2c, 0x26, 0xdc, 0x3b, 0xeb, 0x85, 0x5b, 0x9b, 0x98, 0x7e, 0x73,
0x96, 0x1e, 0x4e, 0x17, 0xf7, 0x9b, 0xb0, 0x76, 0xe8, 0x46, 0x33, 0xa5, 0x0e, 0x6b, 0x0f, 0x0e,
0xf5, 0xf7, 0x9a, 0x2f, 0x69, 0xef, 0xc3, 0xac, 0x39, 0x8d, 0xb1, 0xe7, 0x4d, 0xa5, 0x2a, 0x4c,
0x10, 0xc0, 0x75, 0xbd, 0x91, 0x9e, 0x71, 0xe0, 0x79, 0x53, 0x2d, 0x12, 0x91, 0x84, 0x86, 0x93,
0x41, 0x4e, 0x10, 0xc0, 0x3b, 0x6a, 0xf7, 0x39, 0x3d, 0xe3, 0x46, 0x33, 0x21, 0x2c, 0xdd, 0xd5,
0x4e, 0xc4, 0x7f, 0x9f, 0xe3, 0x86, 0x6f, 0xa9, 0x52, 0x71, 0x6d, 0x04, 0xf0, 0x35, 0xe1, 0x9f,
0x7a, 0x4c, 0x09, 0xda, 0x29, 0x6c, 0x66, 0xd0, 0x40, 0x9e, 0xfa, 0x10, 0x01, 0xdc, 0xd2, 0xb3,
0xc4, 0x4e, 0x9c, 0x65, 0x6c, 0x24, 0x8f, 0x75, 0x10, 0xc0, 0x0d, 0x01, 0x7b, 0xca, 0xb1, 0x45,
0x09, 0x86, 0x03, 0x29, 0xea, 0x47, 0x08, 0xe0, 0x6a, 0x5e, 0x82, 0xe1, 0x60, 0x59, 0x02, 0x49,
0xea, 0xc7, 0x08, 0x60, 0xa5, 0x20, 0x41, 0x11, 0x1b, 0xc9, 0x63, 0xa7, 0x08, 0xe0, 0x5a, 0x41,
0x82, 0xe1, 0x40, 0xbb, 0x0f, 0x15, 0x21, 0xdb, 0x89, 0x33, 0x27, 0x96, 0xa4, 0xb6, 0x33, 0x04,
0xf0, 0xae, 0xde, 0xca, 0xf2, 0x8d, 0x21, 0xda, 0x19, 0xcc, 0x16, 0x8d, 0x32, 0x64, 0x17, 0x01,
0xbc, 0xa5, 0x67, 0x97, 0x7d, 0x14, 0x83, 0x73, 0x65, 0x9b, 0x4c, 0x3d, 0x33, 0x94, 0xc2, 0x7a,
0x08, 0xe0, 0x8a, 0x50, 0xb6, 0x23, 0x4a, 0x58, 0x25, 0x84, 0xa4, 0xc2, 0x97, 0x08, 0xe0, 0xe6,
0x92, 0x10, 0xc3, 0xc1, 0x0a, 0x21, 0x24, 0xc9, 0x9f, 0x20, 0x80, 0xaf, 0x17, 0x85, 0x28, 0xf6,
0x84, 0xe5, 0x45, 0xe3, 0xa9, 0x9c, 0xe1, 0xf8, 0x08, 0x60, 0x20, 0xf4, 0xc4, 0xbb, 0x0c, 0x51,
0xe8, 0x60, 0x79, 0xcf, 0x0c, 0x98, 0x65, 0x0a, 0x1d, 0xcc, 0x10, 0xf9, 0xb2, 0x8d, 0x3f, 0x0d,
0x49, 0x20, 0x45, 0x0d, 0xd9, 0x40, 0x91, 0x95, 0xed, 0x80, 0x12, 0xb4, 0x27, 0xa2, 0xb6, 0xa3,
0x12, 0xa6, 0x1b, 0x31, 0xeb, 0x78, 0x6d, 0x23, 0xeb, 0x10, 0x4a, 0x10, 0xaf, 0x68, 0x9f, 0x03,
0xb1, 0x6f, 0xe2, 0xd5, 0x91, 0x54, 0x06, 0x8f, 0x58, 0x06, 0x77, 0x36, 0xca, 0xa0, 0x37, 0x12,
0x1a, 0x2c, 0x89, 0xa6, 0x2d, 0x80, 0x60, 0x21, 0xcc, 0xb8, 0xa5, 0x12, 0x78, 0x8c, 0x00, 0x86,
0xea, 0x9b, 0x1b, 0x8c, 0x1d, 0xe9, 0x48, 0xa6, 0x17, 0xe2, 0x69, 0x9f, 0xc1, 0x06, 0x1b, 0x08,
0x8d, 0x32, 0x83, 0xcf, 0x0d, 0xa6, 0xc0, 0xfa, 0x04, 0x7c, 0x93, 0xa6, 0xe0, 0x9b, 0x49, 0x29,
0xb6, 0x89, 0xb0, 0x47, 0x7b, 0x4b, 0x98, 0x5d, 0xa4, 0x7d, 0xf9, 0x2b, 0x3a, 0xe6, 0xd4, 0xf5,
0x46, 0x3a, 0xe6, 0x30, 0x63, 0x7e, 0x9c, 0x83, 0x4a, 0x3b, 0xf3, 0xd7, 0x14, 0xba, 0xa1, 0x35,
0xa7, 0x81, 0x99, 0x35, 0x9f, 0xe6, 0x26, 0x31, 0x79, 0xbb, 0xfb, 0x86, 0x46, 0xbe, 0x26, 0x4c,
0x6d, 0xdc, 0x9c, 0xcf, 0x60, 0x4b, 0xc0, 0x96, 0x70, 0xe7, 0x6f, 0x29, 0xb7, 0xa5, 0xa7, 0xaa,
0x9c, 0xc7, 0xf6, 0x9c, 0x07, 0x97, 0xf0, 0xe7, 0xef, 0x28, 0xb8, 0x21, 0x80, 0x4f, 0x53, 0xdf,
0xcf, 0x0b, 0x21, 0x79, 0xe3, 0xfc, 0x9e, 0x72, 0xab, 0x79, 0x21, 0xf8, 0x0d, 0xb9, 0x20, 0x84,
0x24, 0xf7, 0x07, 0xca, 0x55, 0x0a, 0x42, 0x2c, 0x81, 0x4b, 0xb8, 0xf4, 0x8f, 0x14, 0x5c, 0x2b,
0x08, 0x31, 0x1c, 0x68, 0x1f, 0xc0, 0x9b, 0x62, 0xc6, 0x65, 0xdc, 0xf4, 0x27, 0x8a, 0xde, 0xd5,
0x5b, 0x59, 0xce, 0x89, 0x51, 0xdf, 0x87, 0x8a, 0x00, 0x2f, 0xc3, 0xfe, 0x99, 0xb2, 0xb7, 0xf4,
0xb4, 0x58, 0xe7, 0x89, 0x55, 0xe7, 0x0b, 0x28, 0xef, 0xd5, 0xbf, 0x50, 0x70, 0x45, 0x28, 0x20,
0x37, 0xeb, 0x55, 0x72, 0x48, 0x2a, 0xfd, 0x94, 0x92, 0x9b, 0x4b, 0x72, 0xf0, 0x91, 0xa8, 0x28,
0x87, 0x24, 0xfb, 0x57, 0xca, 0xbe, 0x5e, 0x94, 0x63, 0xa9, 0x3f, 0x4a, 0x38, 0xf6, 0x6f, 0x94,
0x0c, 0x84, 0xfe, 0x88, 0x2d, 0xbb, 0xd0, 0xd1, 0xf2, 0x9e, 0xfd, 0x3b, 0x7f, 0xd0, 0x13, 0x3a,
0x9a, 0x9b, 0x76, 0xbe, 0x80, 0xf2, 0xae, 0xfd, 0x07, 0xe5, 0x6e, 0x0b, 0x05, 0xe4, 0xb6, 0xbd,
0x00, 0x39, 0x91, 0xcb, 0x18, 0xf7, 0x9f, 0x94, 0xbc, 0xb9, 0x73, 0xa7, 0x09, 0x24, 0x96, 0xf1,
0x04, 0xa6, 0x77, 0x5d, 0x79, 0xcb, 0xfc, 0x8b, 0x06, 0x87, 0xea, 0x1b, 0xeb, 0x83, 0xe7, 0x9e,
0xaf, 0xf5, 0x7c, 0x38, 0x2a, 0x01, 0x1f, 0x27, 0xd8, 0x43, 0xb4, 0x31, 0x71, 0xc8, 0xd4, 0x92,
0xca, 0xe1, 0x8b, 0x2a, 0xb3, 0x4d, 0xbc, 0xc9, 0xeb, 0x02, 0x1a, 0x22, 0x9e, 0xc8, 0xd8, 0xf6,
0x11, 0x8d, 0xa6, 0x7d, 0x08, 0x5f, 0x11, 0x32, 0xe0, 0x5d, 0x13, 0x27, 0xb2, 0x31, 0xb5, 0xcd,
0x5f, 0x90, 0xdc, 0xca, 0x40, 0xbc, 0x73, 0x78, 0x84, 0x17, 0xf3, 0xb8, 0x4f, 0x5e, 0xcc, 0xe3,
0xfe, 0xc1, 0xf1, 0x83, 0x7b, 0xb6, 0x13, 0x3e, 0x8c, 0xc6, 0xbd, 0x0b, 0x6f, 0xd6, 0xb7, 0xbd,
0xa9, 0xe9, 0xda, 0x7d, 0x06, 0x1f, 0x47, 0x93, 0xfe, 0x23, 0xb5, 0x7f, 0x31, 0xb3, 0xf8, 0xfe,
0xc5, 0x5d, 0x9b, 0xb8, 0x77, 0x6d, 0xaf, 0x1f, 0x92, 0x20, 0xb4, 0xcc, 0x90, 0xbd, 0x0e, 0x13,
0xde, 0x8f, 0x3d, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x33, 0x5c, 0xd7, 0x84, 0x13, 0x00, 0x00,
}
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 init() {
xxx_Ext_protoFile_FileDesc.Enums = xxx_Ext_protoFile_EnumDescs[0:1]
xxx_Ext_protoFile_FileDesc.Messages = xxx_Ext_protoFile_MessageDescs[0:6]
xxx_Ext_protoFile_MessageDescs[0].Messages = xxx_Ext_protoFile_MessageDescs[6:7]
xxx_Ext_protoFile_MessageDescs[2].Messages = xxx_Ext_protoFile_MessageDescs[7:8]
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 err error
Ext_protoFile, err = prototype.NewFile(&xxx_Ext_protoFile_FileDesc)
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
if err != nil {
panic(err)
}
}
const _ = protoimpl.EnforceVersion(protoimpl.Version - 0)
var Ext_protoFile protoreflect.FileDescriptor
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_Ext_protoFile_FileDesc = prototype.File{
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
Syntax: protoreflect.Proto2,
Path: "extensions/ext/ext.proto",
Package: "goproto.protoc.extension.ext",
Imports: []protoreflect.FileImport{
{FileDescriptor: prototype.PlaceholderFile("extensions/base/base.proto", "goproto.protoc.extension.base")},
{FileDescriptor: prototype.PlaceholderFile("extensions/extra/extra.proto", "goproto.protoc.extension.extra")},
},
}
var xxx_Ext_protoFile_EnumTypes = [1]protoreflect.EnumType{
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
prototype.GoEnum(
xxx_Ext_protoFile_EnumDescs[0].Reference(),
func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.Enum {
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
return Enum(n)
},
),
}
var xxx_Ext_protoFile_EnumDescs = [1]prototype.Enum{
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
{
Name: "Enum",
Values: []prototype.EnumValue{
{Name: "ZERO", Number: 0},
},
},
}
var xxx_Ext_protoFile_MessageTypes = [8]protoimpl.MessageType{
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
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[0].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_Message{new(Message)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[1].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_ExtensionGroup{new(ExtensionGroup)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[2].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_ExtendingMessage{new(ExtendingMessage)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[3].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_RepeatedGroup{new(RepeatedGroup)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[4].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_Extendable{new(Extendable)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[5].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_MessageSetWireFormatExtension{new(MessageSetWireFormatExtension)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[6].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_Message_M{new(Message_M)}
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
},
)},
{Type: prototype.GoMessage(
xxx_Ext_protoFile_MessageDescs[7].Reference(),
func(protoreflect.MessageType) protoreflect.Message {
return xxx_ExtendingMessage_ExtendingMessageSubmessage{new(ExtendingMessage_ExtendingMessageSubmessage)}
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_Ext_protoFile_MessageDescs = [8]prototype.Message{
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
{
Name: "Message",
Fields: []prototype.Field{
{
Name: "data",
Number: 1,
Cardinality: protoreflect.Optional,
Kind: protoreflect.BytesKind,
JSONName: "data",
IsPacked: prototype.False,
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
},
},
},
{
Name: "ExtensionGroup",
Fields: []prototype.Field{
{
Name: "extension_group",
Number: 120,
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "extensionGroup",
IsPacked: prototype.False,
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
},
},
},
{
Name: "ExtendingMessage",
},
{
Name: "RepeatedGroup",
Fields: []prototype.Field{
{
Name: "repeated_x_group",
Number: 319,
Cardinality: protoreflect.Repeated,
Kind: protoreflect.StringKind,
JSONName: "repeatedXGroup",
IsPacked: prototype.False,
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
},
},
},
{
Name: "Extendable",
ExtensionRanges: [][2]protoreflect.FieldNumber{{1, 536870912}},
},
{
Name: "MessageSetWireFormatExtension",
},
{
Name: "M",
},
{
Name: "ExtendingMessageSubmessage",
},
}