github.com/hoveychen/protoreflect@v1.4.7-0.20221103114119-0b4b3385ec76/internal/testprotos/pkg/desc_test_pkg.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: pkg/desc_test_pkg.proto 3 4 package pkg 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/protobuf/proto" 9 math "math" 10 ) 11 12 // Reference imports to suppress errors if they are not otherwise used. 13 var _ = proto.Marshal 14 var _ = fmt.Errorf 15 var _ = math.Inf 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the proto package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // proto package needs to be updated. 21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 22 23 type Foo int32 24 25 const ( 26 Foo_ABC Foo = 0 27 Foo_DEF Foo = 1 28 Foo_GHI Foo = 2 29 Foo_JKL Foo = 3 30 Foo_MNO Foo = 4 31 Foo_PQR Foo = 5 32 Foo_STU Foo = 6 33 Foo_VWX Foo = 7 34 Foo_Y_Z Foo = 8 35 ) 36 37 var Foo_name = map[int32]string{ 38 0: "ABC", 39 1: "DEF", 40 2: "GHI", 41 3: "JKL", 42 4: "MNO", 43 5: "PQR", 44 6: "STU", 45 7: "VWX", 46 8: "Y_Z", 47 } 48 49 var Foo_value = map[string]int32{ 50 "ABC": 0, 51 "DEF": 1, 52 "GHI": 2, 53 "JKL": 3, 54 "MNO": 4, 55 "PQR": 5, 56 "STU": 6, 57 "VWX": 7, 58 "Y_Z": 8, 59 } 60 61 func (x Foo) Enum() *Foo { 62 p := new(Foo) 63 *p = x 64 return p 65 } 66 67 func (x Foo) String() string { 68 return proto.EnumName(Foo_name, int32(x)) 69 } 70 71 func (x *Foo) UnmarshalJSON(data []byte) error { 72 value, err := proto.UnmarshalJSONEnum(Foo_value, data, "Foo") 73 if err != nil { 74 return err 75 } 76 *x = Foo(value) 77 return nil 78 } 79 80 func (Foo) EnumDescriptor() ([]byte, []int) { 81 return fileDescriptor_7feb6b94bba39d5d, []int{0} 82 } 83 84 type Bar struct { 85 Baz []Foo `protobuf:"varint,1,rep,name=baz,enum=hoveychen.protoreflect.desc.Foo" json:"baz,omitempty"` 86 XXX_NoUnkeyedLiteral struct{} `json:"-"` 87 XXX_unrecognized []byte `json:"-"` 88 XXX_sizecache int32 `json:"-"` 89 } 90 91 func (m *Bar) Reset() { *m = Bar{} } 92 func (m *Bar) String() string { return proto.CompactTextString(m) } 93 func (*Bar) ProtoMessage() {} 94 func (*Bar) Descriptor() ([]byte, []int) { 95 return fileDescriptor_7feb6b94bba39d5d, []int{0} 96 } 97 98 func (m *Bar) XXX_Unmarshal(b []byte) error { 99 return xxx_messageInfo_Bar.Unmarshal(m, b) 100 } 101 func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 102 return xxx_messageInfo_Bar.Marshal(b, m, deterministic) 103 } 104 func (m *Bar) XXX_Merge(src proto.Message) { 105 xxx_messageInfo_Bar.Merge(m, src) 106 } 107 func (m *Bar) XXX_Size() int { 108 return xxx_messageInfo_Bar.Size(m) 109 } 110 func (m *Bar) XXX_DiscardUnknown() { 111 xxx_messageInfo_Bar.DiscardUnknown(m) 112 } 113 114 var xxx_messageInfo_Bar proto.InternalMessageInfo 115 116 func (m *Bar) GetBaz() []Foo { 117 if m != nil { 118 return m.Baz 119 } 120 return nil 121 } 122 123 func init() { 124 proto.RegisterEnum("hoveychen.protoreflect.desc.Foo", Foo_name, Foo_value) 125 proto.RegisterType((*Bar)(nil), "hoveychen.protoreflect.desc.Bar") 126 } 127 128 func init() { proto.RegisterFile("pkg/desc_test_pkg.proto", fileDescriptor_7feb6b94bba39d5d) } 129 130 var fileDescriptor_7feb6b94bba39d5d = []byte{ 131 // 214 bytes of a gzipped FileDescriptorProto 132 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xc8, 0x4e, 0xd7, 133 0x4f, 0x49, 0x2d, 0x4e, 0x8e, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x2f, 0xc8, 0x4e, 0xd7, 0x2b, 0x28, 134 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xcf, 0xca, 0x28, 0xcd, 0x2d, 0x80, 0x70, 0x8a, 0x52, 0xd3, 0x72, 135 0x52, 0x93, 0x4b, 0xf4, 0x40, 0xea, 0x94, 0x4c, 0xb9, 0x98, 0x9d, 0x12, 0x8b, 0x84, 0xf4, 0xb8, 136 0x98, 0x93, 0x12, 0xab, 0x24, 0x18, 0x15, 0x98, 0x35, 0xf8, 0x8c, 0x64, 0xf4, 0x70, 0xa8, 0xd6, 137 0x73, 0xcb, 0xcf, 0x0f, 0x02, 0x29, 0xd4, 0x0a, 0xe3, 0x62, 0x76, 0xcb, 0xcf, 0x17, 0x62, 0xe7, 138 0x62, 0x76, 0x74, 0x72, 0x16, 0x60, 0x00, 0x31, 0x5c, 0x5c, 0xdd, 0x04, 0x18, 0x41, 0x0c, 0x77, 139 0x0f, 0x4f, 0x01, 0x26, 0x10, 0xc3, 0xcb, 0xdb, 0x47, 0x80, 0x19, 0xc4, 0xf0, 0xf5, 0xf3, 0x17, 140 0x60, 0x01, 0x31, 0x02, 0x02, 0x83, 0x04, 0x58, 0x41, 0x8c, 0xe0, 0x90, 0x50, 0x01, 0x36, 0x10, 141 0x23, 0x2c, 0x3c, 0x42, 0x80, 0x1d, 0xc4, 0x88, 0x8c, 0x8f, 0x12, 0xe0, 0x70, 0xb2, 0x8e, 0xb2, 142 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x3b, 0x43, 0x1f, 0xd9, 143 0x19, 0xfa, 0x99, 0x79, 0x25, 0xa9, 0x45, 0x79, 0x89, 0x39, 0xfa, 0x20, 0x0f, 0x82, 0x65, 0x8a, 144 0xf5, 0x0b, 0xb2, 0xd3, 0xad, 0x0b, 0xb2, 0xd3, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xac, 145 0xa1, 0xc7, 0xfe, 0x00, 0x00, 0x00, 146 }