github.com/cloudwego/kitex@v0.9.0/pkg/generic/httppb_test/idl/echo.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.26.0 4 // protoc v3.13.0 5 // source: echo.proto 6 7 package idl 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 type TestEnum int32 24 25 const ( 26 TestEnum_Zero TestEnum = 0 27 TestEnum_First TestEnum = 1 28 ) 29 30 // Enum value maps for TestEnum. 31 var ( 32 TestEnum_name = map[int32]string{ 33 0: "Zero", 34 1: "First", 35 } 36 TestEnum_value = map[string]int32{ 37 "Zero": 0, 38 "First": 1, 39 } 40 ) 41 42 func (x TestEnum) Enum() *TestEnum { 43 p := new(TestEnum) 44 *p = x 45 return p 46 } 47 48 func (x TestEnum) String() string { 49 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 50 } 51 52 func (TestEnum) Descriptor() protoreflect.EnumDescriptor { 53 return file_echo_proto_enumTypes[0].Descriptor() 54 } 55 56 func (TestEnum) Type() protoreflect.EnumType { 57 return &file_echo_proto_enumTypes[0] 58 } 59 60 func (x TestEnum) Number() protoreflect.EnumNumber { 61 return protoreflect.EnumNumber(x) 62 } 63 64 // Deprecated: Use TestEnum.Descriptor instead. 65 func (TestEnum) EnumDescriptor() ([]byte, []int) { 66 return file_echo_proto_rawDescGZIP(), []int{0} 67 } 68 69 type Elem struct { 70 state protoimpl.MessageState 71 sizeCache protoimpl.SizeCache 72 unknownFields protoimpl.UnknownFields 73 74 Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` 75 } 76 77 func (x *Elem) Reset() { 78 *x = Elem{} 79 if protoimpl.UnsafeEnabled { 80 mi := &file_echo_proto_msgTypes[0] 81 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 82 ms.StoreMessageInfo(mi) 83 } 84 } 85 86 func (x *Elem) String() string { 87 return protoimpl.X.MessageStringOf(x) 88 } 89 90 func (*Elem) ProtoMessage() {} 91 92 func (x *Elem) ProtoReflect() protoreflect.Message { 93 mi := &file_echo_proto_msgTypes[0] 94 if protoimpl.UnsafeEnabled && x != nil { 95 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 96 if ms.LoadMessageInfo() == nil { 97 ms.StoreMessageInfo(mi) 98 } 99 return ms 100 } 101 return mi.MessageOf(x) 102 } 103 104 // Deprecated: Use Elem.ProtoReflect.Descriptor instead. 105 func (*Elem) Descriptor() ([]byte, []int) { 106 return file_echo_proto_rawDescGZIP(), []int{0} 107 } 108 109 func (x *Elem) GetOk() bool { 110 if x != nil { 111 return x.Ok 112 } 113 return false 114 } 115 116 type Message struct { 117 state protoimpl.MessageState 118 sizeCache protoimpl.SizeCache 119 unknownFields protoimpl.UnknownFields 120 121 Tiny int32 `protobuf:"varint,1,opt,name=tiny,proto3" json:"tiny,omitempty"` 122 Large int64 `protobuf:"varint,2,opt,name=large,proto3" json:"large,omitempty"` 123 Tenum TestEnum `protobuf:"varint,3,opt,name=tenum,proto3,enum=idl.TestEnum" json:"tenum,omitempty"` 124 Str string `protobuf:"bytes,4,opt,name=str,proto3" json:"str,omitempty"` 125 Elems map[string]*Elem `protobuf:"bytes,5,rep,name=elems,proto3" json:"elems,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 126 Els []*Elem `protobuf:"bytes,6,rep,name=els,proto3" json:"els,omitempty"` // map<int32, Elem> els = 7; 127 } 128 129 func (x *Message) Reset() { 130 *x = Message{} 131 if protoimpl.UnsafeEnabled { 132 mi := &file_echo_proto_msgTypes[1] 133 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 134 ms.StoreMessageInfo(mi) 135 } 136 } 137 138 func (x *Message) String() string { 139 return protoimpl.X.MessageStringOf(x) 140 } 141 142 func (*Message) ProtoMessage() {} 143 144 func (x *Message) ProtoReflect() protoreflect.Message { 145 mi := &file_echo_proto_msgTypes[1] 146 if protoimpl.UnsafeEnabled && x != nil { 147 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 148 if ms.LoadMessageInfo() == nil { 149 ms.StoreMessageInfo(mi) 150 } 151 return ms 152 } 153 return mi.MessageOf(x) 154 } 155 156 // Deprecated: Use Message.ProtoReflect.Descriptor instead. 157 func (*Message) Descriptor() ([]byte, []int) { 158 return file_echo_proto_rawDescGZIP(), []int{1} 159 } 160 161 func (x *Message) GetTiny() int32 { 162 if x != nil { 163 return x.Tiny 164 } 165 return 0 166 } 167 168 func (x *Message) GetLarge() int64 { 169 if x != nil { 170 return x.Large 171 } 172 return 0 173 } 174 175 func (x *Message) GetTenum() TestEnum { 176 if x != nil { 177 return x.Tenum 178 } 179 return TestEnum_Zero 180 } 181 182 func (x *Message) GetStr() string { 183 if x != nil { 184 return x.Str 185 } 186 return "" 187 } 188 189 func (x *Message) GetElems() map[string]*Elem { 190 if x != nil { 191 return x.Elems 192 } 193 return nil 194 } 195 196 func (x *Message) GetEls() []*Elem { 197 if x != nil { 198 return x.Els 199 } 200 return nil 201 } 202 203 var File_echo_proto protoreflect.FileDescriptor 204 205 var file_echo_proto_rawDesc = []byte{ 206 0x0a, 0x0a, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x69, 0x64, 207 0x6c, 0x22, 0x16, 0x0a, 0x04, 0x45, 0x6c, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 208 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0xfb, 0x01, 0x0a, 0x07, 0x4d, 0x65, 209 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6e, 0x79, 0x18, 0x01, 0x20, 210 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x72, 211 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x12, 212 0x23, 0x0a, 0x05, 0x74, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 213 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x74, 214 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 215 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x6c, 0x65, 0x6d, 0x73, 0x18, 216 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 217 0x61, 0x67, 0x65, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 218 0x65, 0x6c, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 219 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x52, 0x03, 0x65, 220 0x6c, 0x73, 0x1a, 0x43, 0x0a, 0x0a, 0x45, 0x6c, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 221 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 222 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 223 0x0b, 0x32, 0x09, 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 224 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x1f, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x45, 225 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x09, 0x0a, 226 0x05, 0x46, 0x69, 0x72, 0x73, 0x74, 0x10, 0x01, 0x32, 0x34, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 227 0x70, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x45, 0x63, 228 0x68, 0x6f, 0x12, 0x0c, 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 229 0x1a, 0x0c, 0x2e, 0x69, 0x64, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x38, 230 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 231 0x75, 0x64, 0x77, 0x65, 0x67, 0x6f, 0x2f, 0x6b, 0x69, 0x74, 0x65, 0x78, 0x2f, 0x70, 0x6b, 0x67, 232 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x70, 0x62, 0x5f, 233 0x74, 0x65, 0x73, 0x74, 0x2f, 0x69, 0x64, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 234 } 235 236 var ( 237 file_echo_proto_rawDescOnce sync.Once 238 file_echo_proto_rawDescData = file_echo_proto_rawDesc 239 ) 240 241 func file_echo_proto_rawDescGZIP() []byte { 242 file_echo_proto_rawDescOnce.Do(func() { 243 file_echo_proto_rawDescData = protoimpl.X.CompressGZIP(file_echo_proto_rawDescData) 244 }) 245 return file_echo_proto_rawDescData 246 } 247 248 var file_echo_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 249 var file_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 250 var file_echo_proto_goTypes = []interface{}{ 251 (TestEnum)(0), // 0: idl.TestEnum 252 (*Elem)(nil), // 1: idl.Elem 253 (*Message)(nil), // 2: idl.Message 254 nil, // 3: idl.Message.ElemsEntry 255 } 256 var file_echo_proto_depIdxs = []int32{ 257 0, // 0: idl.Message.tenum:type_name -> idl.TestEnum 258 3, // 1: idl.Message.elems:type_name -> idl.Message.ElemsEntry 259 1, // 2: idl.Message.els:type_name -> idl.Elem 260 1, // 3: idl.Message.ElemsEntry.value:type_name -> idl.Elem 261 2, // 4: idl.ExampleService.Echo:input_type -> idl.Message 262 2, // 5: idl.ExampleService.Echo:output_type -> idl.Message 263 5, // [5:6] is the sub-list for method output_type 264 4, // [4:5] is the sub-list for method input_type 265 4, // [4:4] is the sub-list for extension type_name 266 4, // [4:4] is the sub-list for extension extendee 267 0, // [0:4] is the sub-list for field type_name 268 } 269 270 func init() { file_echo_proto_init() } 271 func file_echo_proto_init() { 272 if File_echo_proto != nil { 273 return 274 } 275 if !protoimpl.UnsafeEnabled { 276 file_echo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 277 switch v := v.(*Elem); i { 278 case 0: 279 return &v.state 280 case 1: 281 return &v.sizeCache 282 case 2: 283 return &v.unknownFields 284 default: 285 return nil 286 } 287 } 288 file_echo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 289 switch v := v.(*Message); i { 290 case 0: 291 return &v.state 292 case 1: 293 return &v.sizeCache 294 case 2: 295 return &v.unknownFields 296 default: 297 return nil 298 } 299 } 300 } 301 type x struct{} 302 out := protoimpl.TypeBuilder{ 303 File: protoimpl.DescBuilder{ 304 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 305 RawDescriptor: file_echo_proto_rawDesc, 306 NumEnums: 1, 307 NumMessages: 3, 308 NumExtensions: 0, 309 NumServices: 1, 310 }, 311 GoTypes: file_echo_proto_goTypes, 312 DependencyIndexes: file_echo_proto_depIdxs, 313 EnumInfos: file_echo_proto_enumTypes, 314 MessageInfos: file_echo_proto_msgTypes, 315 }.Build() 316 File_echo_proto = out.File 317 file_echo_proto_rawDesc = nil 318 file_echo_proto_goTypes = nil 319 file_echo_proto_depIdxs = nil 320 }