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