Explorar el Código

[dev] multi/multi*.pb.go: add these files and remove them from .gitignore.

Change-Id: I11370c095fcb2638ef5a050e6a843517107da107
Damien Neil hace 8 años
padre
commit
025a21d09b

+ 0 - 1
.gitignore

@@ -12,5 +12,4 @@ core
 _obj
 _test
 _testmain.go
-protoc-gen-go/testdata/multi/*.pb.go
 _conformance/_conformance

+ 107 - 0
protoc-gen-go/testdata/multi/multi1.pb.go

@@ -0,0 +1,107 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: multi/multi1.proto
+
+/*
+Package multitest is a generated protocol buffer package.
+
+It is generated from these files:
+	multi/multi1.proto
+	multi/multi2.proto
+	multi/multi3.proto
+
+It has these top-level messages:
+	Multi1
+	Multi2
+	Multi3
+*/
+package multitest
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// 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.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type Multi1 struct {
+	Multi2               *Multi2         `protobuf:"bytes,1,req,name=multi2" json:"multi2,omitempty"`
+	Color                *Multi2_Color   `protobuf:"varint,2,opt,name=color,enum=multitest.Multi2_Color" json:"color,omitempty"`
+	HatType              *Multi3_HatType `protobuf:"varint,3,opt,name=hat_type,json=hatType,enum=multitest.Multi3_HatType" json:"hat_type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *Multi1) Reset()                    { *m = Multi1{} }
+func (m *Multi1) String() string            { return proto.CompactTextString(m) }
+func (*Multi1) ProtoMessage()               {}
+func (*Multi1) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (m *Multi1) Unmarshal(b []byte) error {
+	return xxx_messageInfo_Multi1.Unmarshal(m, b)
+}
+func (m *Multi1) Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Multi1.Marshal(b, m, deterministic)
+}
+func (dst *Multi1) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi1.Merge(dst, src)
+}
+func (m *Multi1) XXX_Size() int {
+	return xxx_messageInfo_Multi1.Size(m)
+}
+func (m *Multi1) XXX_DiscardUnknown() {
+	xxx_messageInfo_Multi1.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Multi1 proto.InternalMessageInfo
+
+func (m *Multi1) GetMulti2() *Multi2 {
+	if m != nil {
+		return m.Multi2
+	}
+	return nil
+}
+
+func (m *Multi1) GetColor() Multi2_Color {
+	if m != nil && m.Color != nil {
+		return *m.Color
+	}
+	return Multi2_BLUE
+}
+
+func (m *Multi1) GetHatType() Multi3_HatType {
+	if m != nil && m.HatType != nil {
+		return *m.HatType
+	}
+	return Multi3_FEDORA
+}
+
+func init() {
+	proto.RegisterType((*Multi1)(nil), "multitest.Multi1")
+}
+
+func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor0) }
+
+var fileDescriptor0 = []byte{
+	// 200 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
+	0xc9, 0xd4, 0x07, 0x93, 0x86, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
+	0x6a, 0x71, 0x89, 0x14, 0xb2, 0xb4, 0x11, 0x44, 0x1a, 0x45, 0xcc, 0x18, 0x22, 0xa6, 0x34, 0x83,
+	0x91, 0x8b, 0xcd, 0x17, 0x6c, 0x86, 0x90, 0x26, 0x17, 0x1b, 0x44, 0xb9, 0x04, 0xa3, 0x02, 0x93,
+	0x06, 0xb7, 0x91, 0xa0, 0x1e, 0xdc, 0x38, 0x3d, 0xb0, 0x12, 0xa3, 0x20, 0xa8, 0x02, 0x21, 0x5d,
+	0x2e, 0xd6, 0xe4, 0xfc, 0x9c, 0xfc, 0x22, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x71, 0x0c,
+	0x95, 0x7a, 0xce, 0x20, 0xe9, 0x20, 0x88, 0x2a, 0x21, 0x13, 0x2e, 0x8e, 0x8c, 0xc4, 0x92, 0xf8,
+	0x92, 0xca, 0x82, 0x54, 0x09, 0x66, 0xb0, 0x0e, 0x49, 0x74, 0x1d, 0xc6, 0x7a, 0x1e, 0x89, 0x25,
+	0x21, 0x95, 0x05, 0xa9, 0x41, 0xec, 0x19, 0x10, 0x86, 0x93, 0x73, 0x94, 0x63, 0x7a, 0x66, 0x49,
+	0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e, 0xba, 0x3e, 0xd8,
+	0xd5, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a, 0xbe, 0x3e, 0xc8,
+	0xa0, 0x94, 0xc4, 0x92, 0x44, 0x88, 0xe7, 0xac, 0xe1, 0x86, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff,
+	0x60, 0x7d, 0xfc, 0x9f, 0x27, 0x01, 0x00, 0x00,
+}

+ 118 - 0
protoc-gen-go/testdata/multi/multi2.pb.go

@@ -0,0 +1,118 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: multi/multi2.proto
+
+package multitest
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+type Multi2_Color int32
+
+const (
+	Multi2_BLUE  Multi2_Color = 1
+	Multi2_GREEN Multi2_Color = 2
+	Multi2_RED   Multi2_Color = 3
+)
+
+var Multi2_Color_name = map[int32]string{
+	1: "BLUE",
+	2: "GREEN",
+	3: "RED",
+}
+var Multi2_Color_value = map[string]int32{
+	"BLUE":  1,
+	"GREEN": 2,
+	"RED":   3,
+}
+
+func (x Multi2_Color) Enum() *Multi2_Color {
+	p := new(Multi2_Color)
+	*p = x
+	return p
+}
+func (x Multi2_Color) String() string {
+	return proto.EnumName(Multi2_Color_name, int32(x))
+}
+func (x *Multi2_Color) UnmarshalJSON(data []byte) error {
+	value, err := proto.UnmarshalJSONEnum(Multi2_Color_value, data, "Multi2_Color")
+	if err != nil {
+		return err
+	}
+	*x = Multi2_Color(value)
+	return nil
+}
+func (Multi2_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
+
+type Multi2 struct {
+	RequiredValue        *int32        `protobuf:"varint,1,req,name=required_value,json=requiredValue" json:"required_value,omitempty"`
+	Color                *Multi2_Color `protobuf:"varint,2,opt,name=color,enum=multitest.Multi2_Color" json:"color,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *Multi2) Reset()                    { *m = Multi2{} }
+func (m *Multi2) String() string            { return proto.CompactTextString(m) }
+func (*Multi2) ProtoMessage()               {}
+func (*Multi2) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
+func (m *Multi2) Unmarshal(b []byte) error {
+	return xxx_messageInfo_Multi2.Unmarshal(m, b)
+}
+func (m *Multi2) Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Multi2.Marshal(b, m, deterministic)
+}
+func (dst *Multi2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi2.Merge(dst, src)
+}
+func (m *Multi2) XXX_Size() int {
+	return xxx_messageInfo_Multi2.Size(m)
+}
+func (m *Multi2) XXX_DiscardUnknown() {
+	xxx_messageInfo_Multi2.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Multi2 proto.InternalMessageInfo
+
+func (m *Multi2) GetRequiredValue() int32 {
+	if m != nil && m.RequiredValue != nil {
+		return *m.RequiredValue
+	}
+	return 0
+}
+
+func (m *Multi2) GetColor() Multi2_Color {
+	if m != nil && m.Color != nil {
+		return *m.Color
+	}
+	return Multi2_BLUE
+}
+
+func init() {
+	proto.RegisterType((*Multi2)(nil), "multitest.Multi2")
+	proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value)
+}
+
+func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor1) }
+
+var fileDescriptor1 = []byte{
+	// 202 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
+	0xc9, 0xd4, 0x07, 0x93, 0x46, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
+	0x6a, 0x71, 0x89, 0x52, 0x2b, 0x23, 0x17, 0x9b, 0x2f, 0x58, 0x4e, 0x48, 0x95, 0x8b, 0xaf, 0x28,
+	0xb5, 0xb0, 0x34, 0xb3, 0x28, 0x35, 0x25, 0xbe, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x51, 0x81,
+	0x49, 0x83, 0x35, 0x88, 0x17, 0x26, 0x1a, 0x06, 0x12, 0x14, 0xd2, 0xe5, 0x62, 0x4d, 0xce, 0xcf,
+	0xc9, 0x2f, 0x92, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x33, 0x12, 0xd7, 0x83, 0x1b, 0xa6, 0x07, 0x31,
+	0x48, 0xcf, 0x19, 0x24, 0x1d, 0x04, 0x51, 0xa5, 0xa4, 0xca, 0xc5, 0x0a, 0xe6, 0x0b, 0x71, 0x70,
+	0xb1, 0x38, 0xf9, 0x84, 0xba, 0x0a, 0x30, 0x0a, 0x71, 0x72, 0xb1, 0xba, 0x07, 0xb9, 0xba, 0xfa,
+	0x09, 0x30, 0x09, 0xb1, 0x73, 0x31, 0x07, 0xb9, 0xba, 0x08, 0x30, 0x3b, 0x39, 0x47, 0x39, 0xa6,
+	0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5,
+	0xeb, 0x83, 0x5d, 0x9b, 0x54, 0x9a, 0x06, 0x61, 0x24, 0xeb, 0xa6, 0xa7, 0xe6, 0xe9, 0xa6, 0xe7,
+	0xeb, 0x83, 0xec, 0x4a, 0x49, 0x2c, 0x49, 0x84, 0x78, 0xca, 0x1a, 0x6e, 0x3f, 0x20, 0x00, 0x00,
+	0xff, 0xff, 0x49, 0x3b, 0x52, 0x44, 0xec, 0x00, 0x00, 0x00,
+}

+ 105 - 0
protoc-gen-go/testdata/multi/multi3.pb.go

@@ -0,0 +1,105 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: multi/multi3.proto
+
+package multitest
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+type Multi3_HatType int32
+
+const (
+	Multi3_FEDORA Multi3_HatType = 1
+	Multi3_FEZ    Multi3_HatType = 2
+)
+
+var Multi3_HatType_name = map[int32]string{
+	1: "FEDORA",
+	2: "FEZ",
+}
+var Multi3_HatType_value = map[string]int32{
+	"FEDORA": 1,
+	"FEZ":    2,
+}
+
+func (x Multi3_HatType) Enum() *Multi3_HatType {
+	p := new(Multi3_HatType)
+	*p = x
+	return p
+}
+func (x Multi3_HatType) String() string {
+	return proto.EnumName(Multi3_HatType_name, int32(x))
+}
+func (x *Multi3_HatType) UnmarshalJSON(data []byte) error {
+	value, err := proto.UnmarshalJSONEnum(Multi3_HatType_value, data, "Multi3_HatType")
+	if err != nil {
+		return err
+	}
+	*x = Multi3_HatType(value)
+	return nil
+}
+func (Multi3_HatType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
+
+type Multi3 struct {
+	HatType              *Multi3_HatType `protobuf:"varint,1,opt,name=hat_type,json=hatType,enum=multitest.Multi3_HatType" json:"hat_type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *Multi3) Reset()                    { *m = Multi3{} }
+func (m *Multi3) String() string            { return proto.CompactTextString(m) }
+func (*Multi3) ProtoMessage()               {}
+func (*Multi3) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
+func (m *Multi3) Unmarshal(b []byte) error {
+	return xxx_messageInfo_Multi3.Unmarshal(m, b)
+}
+func (m *Multi3) Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Multi3.Marshal(b, m, deterministic)
+}
+func (dst *Multi3) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Multi3.Merge(dst, src)
+}
+func (m *Multi3) XXX_Size() int {
+	return xxx_messageInfo_Multi3.Size(m)
+}
+func (m *Multi3) XXX_DiscardUnknown() {
+	xxx_messageInfo_Multi3.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Multi3 proto.InternalMessageInfo
+
+func (m *Multi3) GetHatType() Multi3_HatType {
+	if m != nil && m.HatType != nil {
+		return *m.HatType
+	}
+	return Multi3_FEDORA
+}
+
+func init() {
+	proto.RegisterType((*Multi3)(nil), "multitest.Multi3")
+	proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value)
+}
+
+func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor2) }
+
+var fileDescriptor2 = []byte{
+	// 170 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
+	0xc9, 0xd4, 0x07, 0x93, 0xc6, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
+	0x6a, 0x71, 0x89, 0x52, 0x1c, 0x17, 0x9b, 0x2f, 0x58, 0x4a, 0xc8, 0x84, 0x8b, 0x23, 0x23, 0xb1,
+	0x24, 0xbe, 0xa4, 0xb2, 0x20, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x52, 0x0f, 0xae,
+	0x4e, 0x0f, 0xa2, 0x48, 0xcf, 0x23, 0xb1, 0x24, 0xa4, 0xb2, 0x20, 0x35, 0x88, 0x3d, 0x03, 0xc2,
+	0x50, 0x92, 0xe3, 0x62, 0x87, 0x8a, 0x09, 0x71, 0x71, 0xb1, 0xb9, 0xb9, 0xba, 0xf8, 0x07, 0x39,
+	0x0a, 0x30, 0x0a, 0xb1, 0x73, 0x31, 0xbb, 0xb9, 0x46, 0x09, 0x30, 0x39, 0x39, 0x47, 0x39, 0xa6,
+	0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5,
+	0xeb, 0x83, 0x5d, 0x91, 0x54, 0x9a, 0x06, 0x61, 0x24, 0xeb, 0xa6, 0xa7, 0xe6, 0xe9, 0xa6, 0xe7,
+	0xeb, 0x83, 0x2c, 0x4a, 0x49, 0x2c, 0x49, 0x84, 0x38, 0xd6, 0x1a, 0x6e, 0x39, 0x20, 0x00, 0x00,
+	0xff, 0xff, 0xd5, 0xa4, 0x1a, 0x0e, 0xc4, 0x00, 0x00, 0x00,
+}