gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/reflection/grpc_testingv3/testv3.pb.go (about) 1 // Code generated by protoc-gen-go. 2 // source: testv3.proto 3 // DO NOT EDIT! 4 5 /* 6 package grpc_testingv3 is a generated protocol buffer package. 7 8 It is generated from these files: 9 10 testv3.proto 11 12 It has these top-level messages: 13 14 SearchResponseV3 15 SearchRequestV3 16 */ 17 package grpc_testingv3 18 19 import proto "github.com/golang/protobuf/proto" 20 import fmt "fmt" 21 import math "math" 22 23 import ( 24 context "context" 25 26 grpc "gitee.com/ks-custle/core-gm/grpc" 27 ) 28 29 // Reference imports to suppress errors if they are not otherwise used. 30 var _ = proto.Marshal 31 var _ = fmt.Errorf 32 var _ = math.Inf 33 34 // This is a compile-time assertion to ensure that this generated file 35 // is compatible with the proto package it is being compiled against. 36 // A compilation error at this line likely means your copy of the 37 // proto package needs to be updated. 38 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 39 40 type SearchResponseV3_State int32 41 42 const ( 43 SearchResponseV3_UNKNOWN SearchResponseV3_State = 0 44 SearchResponseV3_FRESH SearchResponseV3_State = 1 45 SearchResponseV3_STALE SearchResponseV3_State = 2 46 ) 47 48 var SearchResponseV3_State_name = map[int32]string{ 49 0: "UNKNOWN", 50 1: "FRESH", 51 2: "STALE", 52 } 53 var SearchResponseV3_State_value = map[string]int32{ 54 "UNKNOWN": 0, 55 "FRESH": 1, 56 "STALE": 2, 57 } 58 59 func (x SearchResponseV3_State) String() string { 60 return proto.EnumName(SearchResponseV3_State_name, int32(x)) 61 } 62 func (SearchResponseV3_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } 63 64 type SearchResponseV3 struct { 65 Results []*SearchResponseV3_Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` 66 State SearchResponseV3_State `protobuf:"varint,2,opt,name=state,enum=grpc.testingv3.SearchResponseV3_State" json:"state,omitempty"` 67 } 68 69 func (m *SearchResponseV3) Reset() { *m = SearchResponseV3{} } 70 func (m *SearchResponseV3) String() string { return proto.CompactTextString(m) } 71 func (*SearchResponseV3) ProtoMessage() {} 72 func (*SearchResponseV3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 73 74 func (m *SearchResponseV3) GetResults() []*SearchResponseV3_Result { 75 if m != nil { 76 return m.Results 77 } 78 return nil 79 } 80 81 func (m *SearchResponseV3) GetState() SearchResponseV3_State { 82 if m != nil { 83 return m.State 84 } 85 return SearchResponseV3_UNKNOWN 86 } 87 88 type SearchResponseV3_Result struct { 89 Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` 90 Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"` 91 Snippets []string `protobuf:"bytes,3,rep,name=snippets" json:"snippets,omitempty"` 92 Metadata map[string]*SearchResponseV3_Result_Value `protobuf:"bytes,4,rep,name=metadata" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 93 } 94 95 func (m *SearchResponseV3_Result) Reset() { *m = SearchResponseV3_Result{} } 96 func (m *SearchResponseV3_Result) String() string { return proto.CompactTextString(m) } 97 func (*SearchResponseV3_Result) ProtoMessage() {} 98 func (*SearchResponseV3_Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } 99 100 func (m *SearchResponseV3_Result) GetUrl() string { 101 if m != nil { 102 return m.Url 103 } 104 return "" 105 } 106 107 func (m *SearchResponseV3_Result) GetTitle() string { 108 if m != nil { 109 return m.Title 110 } 111 return "" 112 } 113 114 func (m *SearchResponseV3_Result) GetSnippets() []string { 115 if m != nil { 116 return m.Snippets 117 } 118 return nil 119 } 120 121 func (m *SearchResponseV3_Result) GetMetadata() map[string]*SearchResponseV3_Result_Value { 122 if m != nil { 123 return m.Metadata 124 } 125 return nil 126 } 127 128 type SearchResponseV3_Result_Value struct { 129 // Types that are valid to be assigned to Val: 130 // *SearchResponseV3_Result_Value_Str 131 // *SearchResponseV3_Result_Value_Int 132 // *SearchResponseV3_Result_Value_Real 133 Val isSearchResponseV3_Result_Value_Val `protobuf_oneof:"val"` 134 } 135 136 func (m *SearchResponseV3_Result_Value) Reset() { *m = SearchResponseV3_Result_Value{} } 137 func (m *SearchResponseV3_Result_Value) String() string { return proto.CompactTextString(m) } 138 func (*SearchResponseV3_Result_Value) ProtoMessage() {} 139 func (*SearchResponseV3_Result_Value) Descriptor() ([]byte, []int) { 140 return fileDescriptor0, []int{0, 0, 0} 141 } 142 143 type isSearchResponseV3_Result_Value_Val interface { 144 isSearchResponseV3_Result_Value_Val() 145 } 146 147 type SearchResponseV3_Result_Value_Str struct { 148 Str string `protobuf:"bytes,1,opt,name=str,oneof"` 149 } 150 type SearchResponseV3_Result_Value_Int struct { 151 Int int64 `protobuf:"varint,2,opt,name=int,oneof"` 152 } 153 type SearchResponseV3_Result_Value_Real struct { 154 Real float64 `protobuf:"fixed64,3,opt,name=real,oneof"` 155 } 156 157 func (*SearchResponseV3_Result_Value_Str) isSearchResponseV3_Result_Value_Val() {} 158 func (*SearchResponseV3_Result_Value_Int) isSearchResponseV3_Result_Value_Val() {} 159 func (*SearchResponseV3_Result_Value_Real) isSearchResponseV3_Result_Value_Val() {} 160 161 func (m *SearchResponseV3_Result_Value) GetVal() isSearchResponseV3_Result_Value_Val { 162 if m != nil { 163 return m.Val 164 } 165 return nil 166 } 167 168 func (m *SearchResponseV3_Result_Value) GetStr() string { 169 if x, ok := m.GetVal().(*SearchResponseV3_Result_Value_Str); ok { 170 return x.Str 171 } 172 return "" 173 } 174 175 func (m *SearchResponseV3_Result_Value) GetInt() int64 { 176 if x, ok := m.GetVal().(*SearchResponseV3_Result_Value_Int); ok { 177 return x.Int 178 } 179 return 0 180 } 181 182 func (m *SearchResponseV3_Result_Value) GetReal() float64 { 183 if x, ok := m.GetVal().(*SearchResponseV3_Result_Value_Real); ok { 184 return x.Real 185 } 186 return 0 187 } 188 189 // XXX_OneofFuncs is for the internal use of the proto package. 190 func (*SearchResponseV3_Result_Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 191 return _SearchResponseV3_Result_Value_OneofMarshaler, _SearchResponseV3_Result_Value_OneofUnmarshaler, _SearchResponseV3_Result_Value_OneofSizer, []interface{}{ 192 (*SearchResponseV3_Result_Value_Str)(nil), 193 (*SearchResponseV3_Result_Value_Int)(nil), 194 (*SearchResponseV3_Result_Value_Real)(nil), 195 } 196 } 197 198 func _SearchResponseV3_Result_Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 199 m := msg.(*SearchResponseV3_Result_Value) 200 // val 201 switch x := m.Val.(type) { 202 case *SearchResponseV3_Result_Value_Str: 203 b.EncodeVarint(1<<3 | proto.WireBytes) 204 b.EncodeStringBytes(x.Str) 205 case *SearchResponseV3_Result_Value_Int: 206 b.EncodeVarint(2<<3 | proto.WireVarint) 207 b.EncodeVarint(uint64(x.Int)) 208 case *SearchResponseV3_Result_Value_Real: 209 b.EncodeVarint(3<<3 | proto.WireFixed64) 210 b.EncodeFixed64(math.Float64bits(x.Real)) 211 case nil: 212 default: 213 return fmt.Errorf("SearchResponseV3_Result_Value.Val has unexpected type %T", x) 214 } 215 return nil 216 } 217 218 func _SearchResponseV3_Result_Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 219 m := msg.(*SearchResponseV3_Result_Value) 220 switch tag { 221 case 1: // val.str 222 if wire != proto.WireBytes { 223 return true, proto.ErrInternalBadWireType 224 } 225 x, err := b.DecodeStringBytes() 226 m.Val = &SearchResponseV3_Result_Value_Str{x} 227 return true, err 228 case 2: // val.int 229 if wire != proto.WireVarint { 230 return true, proto.ErrInternalBadWireType 231 } 232 x, err := b.DecodeVarint() 233 m.Val = &SearchResponseV3_Result_Value_Int{int64(x)} 234 return true, err 235 case 3: // val.real 236 if wire != proto.WireFixed64 { 237 return true, proto.ErrInternalBadWireType 238 } 239 x, err := b.DecodeFixed64() 240 m.Val = &SearchResponseV3_Result_Value_Real{math.Float64frombits(x)} 241 return true, err 242 default: 243 return false, nil 244 } 245 } 246 247 func _SearchResponseV3_Result_Value_OneofSizer(msg proto.Message) (n int) { 248 m := msg.(*SearchResponseV3_Result_Value) 249 // val 250 switch x := m.Val.(type) { 251 case *SearchResponseV3_Result_Value_Str: 252 n += proto.SizeVarint(1<<3 | proto.WireBytes) 253 n += proto.SizeVarint(uint64(len(x.Str))) 254 n += len(x.Str) 255 case *SearchResponseV3_Result_Value_Int: 256 n += proto.SizeVarint(2<<3 | proto.WireVarint) 257 n += proto.SizeVarint(uint64(x.Int)) 258 case *SearchResponseV3_Result_Value_Real: 259 n += proto.SizeVarint(3<<3 | proto.WireFixed64) 260 n += 8 261 case nil: 262 default: 263 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 264 } 265 return n 266 } 267 268 type SearchRequestV3 struct { 269 Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` 270 } 271 272 func (m *SearchRequestV3) Reset() { *m = SearchRequestV3{} } 273 func (m *SearchRequestV3) String() string { return proto.CompactTextString(m) } 274 func (*SearchRequestV3) ProtoMessage() {} 275 func (*SearchRequestV3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 276 277 func (m *SearchRequestV3) GetQuery() string { 278 if m != nil { 279 return m.Query 280 } 281 return "" 282 } 283 284 func init() { 285 proto.RegisterType((*SearchResponseV3)(nil), "grpc.testingv3.SearchResponseV3") 286 proto.RegisterType((*SearchResponseV3_Result)(nil), "grpc.testingv3.SearchResponseV3.Result") 287 proto.RegisterType((*SearchResponseV3_Result_Value)(nil), "grpc.testingv3.SearchResponseV3.Result.Value") 288 proto.RegisterType((*SearchRequestV3)(nil), "grpc.testingv3.SearchRequestV3") 289 proto.RegisterEnum("grpc.testingv3.SearchResponseV3_State", SearchResponseV3_State_name, SearchResponseV3_State_value) 290 } 291 292 // Reference imports to suppress errors if they are not otherwise used. 293 var _ context.Context 294 var _ grpc.ClientConn 295 296 // This is a compile-time assertion to ensure that this generated file 297 // is compatible with the grpc package it is being compiled against. 298 const _ = grpc.SupportPackageIsVersion3 299 300 // Client API for SearchServiceV3 service 301 302 type SearchServiceV3Client interface { 303 Search(ctx context.Context, in *SearchRequestV3, opts ...grpc.CallOption) (*SearchResponseV3, error) 304 StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchServiceV3_StreamingSearchClient, error) 305 } 306 307 type searchServiceV3Client struct { 308 cc *grpc.ClientConn 309 } 310 311 func NewSearchServiceV3Client(cc *grpc.ClientConn) SearchServiceV3Client { 312 return &searchServiceV3Client{cc} 313 } 314 315 func (c *searchServiceV3Client) Search(ctx context.Context, in *SearchRequestV3, opts ...grpc.CallOption) (*SearchResponseV3, error) { 316 out := new(SearchResponseV3) 317 err := grpc.Invoke(ctx, "/grpc.testingv3.SearchServiceV3/Search", in, out, c.cc, opts...) 318 if err != nil { 319 return nil, err 320 } 321 return out, nil 322 } 323 324 func (c *searchServiceV3Client) StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchServiceV3_StreamingSearchClient, error) { 325 stream, err := grpc.NewClientStream(ctx, &_SearchServiceV3_serviceDesc.Streams[0], c.cc, "/grpc.testingv3.SearchServiceV3/StreamingSearch", opts...) 326 if err != nil { 327 return nil, err 328 } 329 x := &searchServiceV3StreamingSearchClient{stream} 330 return x, nil 331 } 332 333 type SearchServiceV3_StreamingSearchClient interface { 334 Send(*SearchRequestV3) error 335 Recv() (*SearchResponseV3, error) 336 grpc.ClientStream 337 } 338 339 type searchServiceV3StreamingSearchClient struct { 340 grpc.ClientStream 341 } 342 343 func (x *searchServiceV3StreamingSearchClient) Send(m *SearchRequestV3) error { 344 return x.ClientStream.SendMsg(m) 345 } 346 347 func (x *searchServiceV3StreamingSearchClient) Recv() (*SearchResponseV3, error) { 348 m := new(SearchResponseV3) 349 if err := x.ClientStream.RecvMsg(m); err != nil { 350 return nil, err 351 } 352 return m, nil 353 } 354 355 // Server API for SearchServiceV3 service 356 357 type SearchServiceV3Server interface { 358 Search(context.Context, *SearchRequestV3) (*SearchResponseV3, error) 359 StreamingSearch(SearchServiceV3_StreamingSearchServer) error 360 } 361 362 func RegisterSearchServiceV3Server(s *grpc.Server, srv SearchServiceV3Server) { 363 s.RegisterService(&_SearchServiceV3_serviceDesc, srv) 364 } 365 366 func _SearchServiceV3_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 367 in := new(SearchRequestV3) 368 if err := dec(in); err != nil { 369 return nil, err 370 } 371 if interceptor == nil { 372 return srv.(SearchServiceV3Server).Search(ctx, in) 373 } 374 info := &grpc.UnaryServerInfo{ 375 Server: srv, 376 FullMethod: "/grpc.testingv3.SearchServiceV3/Search", 377 } 378 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 379 return srv.(SearchServiceV3Server).Search(ctx, req.(*SearchRequestV3)) 380 } 381 return interceptor(ctx, in, info, handler) 382 } 383 384 func _SearchServiceV3_StreamingSearch_Handler(srv interface{}, stream grpc.ServerStream) error { 385 return srv.(SearchServiceV3Server).StreamingSearch(&searchServiceV3StreamingSearchServer{stream}) 386 } 387 388 type SearchServiceV3_StreamingSearchServer interface { 389 Send(*SearchResponseV3) error 390 Recv() (*SearchRequestV3, error) 391 grpc.ServerStream 392 } 393 394 type searchServiceV3StreamingSearchServer struct { 395 grpc.ServerStream 396 } 397 398 func (x *searchServiceV3StreamingSearchServer) Send(m *SearchResponseV3) error { 399 return x.ServerStream.SendMsg(m) 400 } 401 402 func (x *searchServiceV3StreamingSearchServer) Recv() (*SearchRequestV3, error) { 403 m := new(SearchRequestV3) 404 if err := x.ServerStream.RecvMsg(m); err != nil { 405 return nil, err 406 } 407 return m, nil 408 } 409 410 var _SearchServiceV3_serviceDesc = grpc.ServiceDesc{ 411 ServiceName: "grpc.testingv3.SearchServiceV3", 412 HandlerType: (*SearchServiceV3Server)(nil), 413 Methods: []grpc.MethodDesc{ 414 { 415 MethodName: "Search", 416 Handler: _SearchServiceV3_Search_Handler, 417 }, 418 }, 419 Streams: []grpc.StreamDesc{ 420 { 421 StreamName: "StreamingSearch", 422 Handler: _SearchServiceV3_StreamingSearch_Handler, 423 ServerStreams: true, 424 ClientStreams: true, 425 }, 426 }, 427 Metadata: fileDescriptor0, 428 } 429 430 func init() { proto.RegisterFile("testv3.proto", fileDescriptor0) } 431 432 var fileDescriptor0 = []byte{ 433 // 416 bytes of a gzipped FileDescriptorProto 434 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xd1, 0x6a, 0xd4, 0x40, 435 0x14, 0x86, 0x77, 0x36, 0x9b, 0x6d, 0xf7, 0xac, 0xb6, 0x61, 0xe8, 0x45, 0xc8, 0x8d, 0x61, 0x2f, 436 0x6c, 0x10, 0x0c, 0x92, 0x20, 0x88, 0x78, 0x53, 0x65, 0x65, 0xa1, 0x75, 0xc5, 0x89, 0xae, 0xde, 437 0x8e, 0xeb, 0x61, 0x8d, 0x4d, 0xb3, 0xe9, 0xcc, 0x49, 0x60, 0x9f, 0xc5, 0x17, 0xf1, 0x55, 0x7c, 438 0x1b, 0x99, 0x99, 0xa6, 0x50, 0x41, 0xba, 0x17, 0xde, 0xcd, 0x7f, 0x38, 0xff, 0x37, 0xff, 0x3f, 439 0x24, 0xf0, 0x80, 0x50, 0x53, 0x97, 0xa7, 0x8d, 0xda, 0xd2, 0x96, 0x1f, 0x6d, 0x54, 0xb3, 0x4e, 440 0xcd, 0xa8, 0xac, 0x37, 0x5d, 0x3e, 0xfb, 0x39, 0x82, 0xa0, 0x40, 0xa9, 0xd6, 0xdf, 0x05, 0xea, 441 0x66, 0x5b, 0x6b, 0x5c, 0xe5, 0xfc, 0x0c, 0x0e, 0x14, 0xea, 0xb6, 0x22, 0x1d, 0xb2, 0xd8, 0x4b, 442 0xa6, 0xd9, 0x69, 0x7a, 0xd7, 0x96, 0xfe, 0x6d, 0x49, 0x85, 0xdd, 0x17, 0xbd, 0x8f, 0xbf, 0x02, 443 0x5f, 0x93, 0x24, 0x0c, 0x87, 0x31, 0x4b, 0x8e, 0xb2, 0xc7, 0xf7, 0x02, 0x0a, 0xb3, 0x2d, 0x9c, 444 0x29, 0xfa, 0x3d, 0x84, 0xb1, 0x23, 0xf2, 0x00, 0xbc, 0x56, 0x55, 0x21, 0x8b, 0x59, 0x32, 0x11, 445 0xe6, 0xc8, 0x4f, 0xc0, 0xa7, 0x92, 0x2a, 0x87, 0x9e, 0x08, 0x27, 0x78, 0x04, 0x87, 0xba, 0x2e, 446 0x9b, 0x06, 0x49, 0x87, 0x5e, 0xec, 0x25, 0x13, 0x71, 0xab, 0xf9, 0x07, 0x38, 0xbc, 0x42, 0x92, 447 0xdf, 0x24, 0xc9, 0x70, 0x64, 0x0b, 0x3d, 0xdf, 0xb3, 0x50, 0xfa, 0xee, 0xc6, 0x37, 0xaf, 0x49, 448 0xed, 0xc4, 0x2d, 0x26, 0xba, 0x00, 0x7f, 0x25, 0xab, 0x16, 0x39, 0x07, 0x4f, 0x93, 0x72, 0xf9, 449 0x16, 0x03, 0x61, 0x84, 0x99, 0x95, 0x35, 0xd9, 0x7c, 0x9e, 0x99, 0x95, 0x35, 0xf1, 0x13, 0x18, 450 0x29, 0x94, 0x55, 0xe8, 0xc5, 0x2c, 0x61, 0x8b, 0x81, 0xb0, 0xea, 0xb5, 0x0f, 0x5e, 0x27, 0xab, 451 0xe8, 0x07, 0x3c, 0xbc, 0x73, 0x91, 0x69, 0x7d, 0x89, 0xbb, 0xbe, 0xf5, 0x25, 0xee, 0xf8, 0x1b, 452 0xf0, 0x3b, 0x73, 0xa1, 0xa5, 0x4e, 0xb3, 0xa7, 0xfb, 0x16, 0xb0, 0x29, 0x85, 0xf3, 0xbe, 0x1c, 453 0xbe, 0x60, 0xb3, 0x27, 0xe0, 0xdb, 0xb7, 0xe6, 0x53, 0x38, 0xf8, 0xb4, 0x3c, 0x5f, 0xbe, 0xff, 454 0xbc, 0x0c, 0x06, 0x7c, 0x02, 0xfe, 0x5b, 0x31, 0x2f, 0x16, 0x01, 0x33, 0xc7, 0xe2, 0xe3, 0xd9, 455 0xc5, 0x3c, 0x18, 0xce, 0x4e, 0xe1, 0xb8, 0xe7, 0x5e, 0xb7, 0xa8, 0x69, 0x95, 0x9b, 0xd7, 0xbf, 456 0x6e, 0x51, 0xf5, 0xd9, 0x9c, 0xc8, 0x7e, 0xb1, 0x7e, 0xb3, 0x40, 0xd5, 0x95, 0x6b, 0xf3, 0x15, 457 0x9d, 0xc3, 0xd8, 0x8d, 0xf8, 0xa3, 0x7f, 0x85, 0xbd, 0x81, 0x46, 0xf1, 0x7d, 0x6d, 0xf8, 0x17, 458 0x38, 0x2e, 0x48, 0xa1, 0xbc, 0x2a, 0xeb, 0xcd, 0x7f, 0xa3, 0x26, 0xec, 0x19, 0xfb, 0x3a, 0xb6, 459 0x3f, 0x46, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xed, 0xa2, 0x8d, 0x75, 0x28, 0x03, 0x00, 0x00, 460 }