1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: intstore.proto 3 4package intstore 5 6import ( 7 fmt "fmt" 8 9 proto "github.com/golang/protobuf/proto" 10 11 math "math" 12 13 context "golang.org/x/net/context" 14 15 grpc "google.golang.org/grpc" 16) 17 18// Reference imports to suppress errors if they are not otherwise used. 19var _ = proto.Marshal 20var _ = fmt.Errorf 21var _ = math.Inf 22 23// This is a compile-time assertion to ensure that this generated file 24// is compatible with the proto package it is being compiled against. 25// A compilation error at this line likely means your copy of the 26// proto package needs to be updated. 27const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 28 29type Item struct { 30 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 31 Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35} 36 37func (m *Item) Reset() { *m = Item{} } 38func (m *Item) String() string { return proto.CompactTextString(m) } 39func (*Item) ProtoMessage() {} 40func (*Item) Descriptor() ([]byte, []int) { 41 return fileDescriptor_intstore_10c1c94979d47ae6, []int{0} 42} 43func (m *Item) XXX_Unmarshal(b []byte) error { 44 return xxx_messageInfo_Item.Unmarshal(m, b) 45} 46func (m *Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 return xxx_messageInfo_Item.Marshal(b, m, deterministic) 48} 49func (dst *Item) XXX_Merge(src proto.Message) { 50 xxx_messageInfo_Item.Merge(dst, src) 51} 52func (m *Item) XXX_Size() int { 53 return xxx_messageInfo_Item.Size(m) 54} 55func (m *Item) XXX_DiscardUnknown() { 56 xxx_messageInfo_Item.DiscardUnknown(m) 57} 58 59var xxx_messageInfo_Item proto.InternalMessageInfo 60 61func (m *Item) GetName() string { 62 if m != nil { 63 return m.Name 64 } 65 return "" 66} 67 68func (m *Item) GetValue() int32 { 69 if m != nil { 70 return m.Value 71 } 72 return 0 73} 74 75type SetResponse struct { 76 PrevValue int32 `protobuf:"varint,1,opt,name=prev_value,json=prevValue,proto3" json:"prev_value,omitempty"` 77 XXX_NoUnkeyedLiteral struct{} `json:"-"` 78 XXX_unrecognized []byte `json:"-"` 79 XXX_sizecache int32 `json:"-"` 80} 81 82func (m *SetResponse) Reset() { *m = SetResponse{} } 83func (m *SetResponse) String() string { return proto.CompactTextString(m) } 84func (*SetResponse) ProtoMessage() {} 85func (*SetResponse) Descriptor() ([]byte, []int) { 86 return fileDescriptor_intstore_10c1c94979d47ae6, []int{1} 87} 88func (m *SetResponse) XXX_Unmarshal(b []byte) error { 89 return xxx_messageInfo_SetResponse.Unmarshal(m, b) 90} 91func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 92 return xxx_messageInfo_SetResponse.Marshal(b, m, deterministic) 93} 94func (dst *SetResponse) XXX_Merge(src proto.Message) { 95 xxx_messageInfo_SetResponse.Merge(dst, src) 96} 97func (m *SetResponse) XXX_Size() int { 98 return xxx_messageInfo_SetResponse.Size(m) 99} 100func (m *SetResponse) XXX_DiscardUnknown() { 101 xxx_messageInfo_SetResponse.DiscardUnknown(m) 102} 103 104var xxx_messageInfo_SetResponse proto.InternalMessageInfo 105 106func (m *SetResponse) GetPrevValue() int32 { 107 if m != nil { 108 return m.PrevValue 109 } 110 return 0 111} 112 113type GetRequest struct { 114 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 115 XXX_NoUnkeyedLiteral struct{} `json:"-"` 116 XXX_unrecognized []byte `json:"-"` 117 XXX_sizecache int32 `json:"-"` 118} 119 120func (m *GetRequest) Reset() { *m = GetRequest{} } 121func (m *GetRequest) String() string { return proto.CompactTextString(m) } 122func (*GetRequest) ProtoMessage() {} 123func (*GetRequest) Descriptor() ([]byte, []int) { 124 return fileDescriptor_intstore_10c1c94979d47ae6, []int{2} 125} 126func (m *GetRequest) XXX_Unmarshal(b []byte) error { 127 return xxx_messageInfo_GetRequest.Unmarshal(m, b) 128} 129func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 130 return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) 131} 132func (dst *GetRequest) XXX_Merge(src proto.Message) { 133 xxx_messageInfo_GetRequest.Merge(dst, src) 134} 135func (m *GetRequest) XXX_Size() int { 136 return xxx_messageInfo_GetRequest.Size(m) 137} 138func (m *GetRequest) XXX_DiscardUnknown() { 139 xxx_messageInfo_GetRequest.DiscardUnknown(m) 140} 141 142var xxx_messageInfo_GetRequest proto.InternalMessageInfo 143 144func (m *GetRequest) GetName() string { 145 if m != nil { 146 return m.Name 147 } 148 return "" 149} 150 151type Summary struct { 152 Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` 153 XXX_NoUnkeyedLiteral struct{} `json:"-"` 154 XXX_unrecognized []byte `json:"-"` 155 XXX_sizecache int32 `json:"-"` 156} 157 158func (m *Summary) Reset() { *m = Summary{} } 159func (m *Summary) String() string { return proto.CompactTextString(m) } 160func (*Summary) ProtoMessage() {} 161func (*Summary) Descriptor() ([]byte, []int) { 162 return fileDescriptor_intstore_10c1c94979d47ae6, []int{3} 163} 164func (m *Summary) XXX_Unmarshal(b []byte) error { 165 return xxx_messageInfo_Summary.Unmarshal(m, b) 166} 167func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 168 return xxx_messageInfo_Summary.Marshal(b, m, deterministic) 169} 170func (dst *Summary) XXX_Merge(src proto.Message) { 171 xxx_messageInfo_Summary.Merge(dst, src) 172} 173func (m *Summary) XXX_Size() int { 174 return xxx_messageInfo_Summary.Size(m) 175} 176func (m *Summary) XXX_DiscardUnknown() { 177 xxx_messageInfo_Summary.DiscardUnknown(m) 178} 179 180var xxx_messageInfo_Summary proto.InternalMessageInfo 181 182func (m *Summary) GetCount() int32 { 183 if m != nil { 184 return m.Count 185 } 186 return 0 187} 188 189type ListItemsRequest struct { 190 GreaterThan int32 `protobuf:"varint,1,opt,name=greaterThan,proto3" json:"greaterThan,omitempty"` 191 XXX_NoUnkeyedLiteral struct{} `json:"-"` 192 XXX_unrecognized []byte `json:"-"` 193 XXX_sizecache int32 `json:"-"` 194} 195 196func (m *ListItemsRequest) Reset() { *m = ListItemsRequest{} } 197func (m *ListItemsRequest) String() string { return proto.CompactTextString(m) } 198func (*ListItemsRequest) ProtoMessage() {} 199func (*ListItemsRequest) Descriptor() ([]byte, []int) { 200 return fileDescriptor_intstore_10c1c94979d47ae6, []int{4} 201} 202func (m *ListItemsRequest) XXX_Unmarshal(b []byte) error { 203 return xxx_messageInfo_ListItemsRequest.Unmarshal(m, b) 204} 205func (m *ListItemsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 206 return xxx_messageInfo_ListItemsRequest.Marshal(b, m, deterministic) 207} 208func (dst *ListItemsRequest) XXX_Merge(src proto.Message) { 209 xxx_messageInfo_ListItemsRequest.Merge(dst, src) 210} 211func (m *ListItemsRequest) XXX_Size() int { 212 return xxx_messageInfo_ListItemsRequest.Size(m) 213} 214func (m *ListItemsRequest) XXX_DiscardUnknown() { 215 xxx_messageInfo_ListItemsRequest.DiscardUnknown(m) 216} 217 218var xxx_messageInfo_ListItemsRequest proto.InternalMessageInfo 219 220func (m *ListItemsRequest) GetGreaterThan() int32 { 221 if m != nil { 222 return m.GreaterThan 223 } 224 return 0 225} 226 227func init() { 228 proto.RegisterType((*Item)(nil), "intstore.Item") 229 proto.RegisterType((*SetResponse)(nil), "intstore.SetResponse") 230 proto.RegisterType((*GetRequest)(nil), "intstore.GetRequest") 231 proto.RegisterType((*Summary)(nil), "intstore.Summary") 232 proto.RegisterType((*ListItemsRequest)(nil), "intstore.ListItemsRequest") 233} 234 235// Reference imports to suppress errors if they are not otherwise used. 236var _ context.Context 237var _ grpc.ClientConn 238 239// This is a compile-time assertion to ensure that this generated file 240// is compatible with the grpc package it is being compiled against. 241const _ = grpc.SupportPackageIsVersion4 242 243// IntStoreClient is the client API for IntStore service. 244// 245// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 246type IntStoreClient interface { 247 Set(ctx context.Context, in *Item, opts ...grpc.CallOption) (*SetResponse, error) 248 Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Item, error) 249 // A server-to-client streaming RPC. 250 ListItems(ctx context.Context, in *ListItemsRequest, opts ...grpc.CallOption) (IntStore_ListItemsClient, error) 251 // A client-to-server streaming RPC. 252 SetStream(ctx context.Context, opts ...grpc.CallOption) (IntStore_SetStreamClient, error) 253 // A Bidirectional streaming RPC. 254 StreamChat(ctx context.Context, opts ...grpc.CallOption) (IntStore_StreamChatClient, error) 255} 256 257type intStoreClient struct { 258 cc *grpc.ClientConn 259} 260 261func NewIntStoreClient(cc *grpc.ClientConn) IntStoreClient { 262 return &intStoreClient{cc} 263} 264 265func (c *intStoreClient) Set(ctx context.Context, in *Item, opts ...grpc.CallOption) (*SetResponse, error) { 266 out := new(SetResponse) 267 err := c.cc.Invoke(ctx, "/intstore.IntStore/Set", in, out, opts...) 268 if err != nil { 269 return nil, err 270 } 271 return out, nil 272} 273 274func (c *intStoreClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Item, error) { 275 out := new(Item) 276 err := c.cc.Invoke(ctx, "/intstore.IntStore/Get", in, out, opts...) 277 if err != nil { 278 return nil, err 279 } 280 return out, nil 281} 282 283func (c *intStoreClient) ListItems(ctx context.Context, in *ListItemsRequest, opts ...grpc.CallOption) (IntStore_ListItemsClient, error) { 284 stream, err := c.cc.NewStream(ctx, &_IntStore_serviceDesc.Streams[0], "/intstore.IntStore/ListItems", opts...) 285 if err != nil { 286 return nil, err 287 } 288 x := &intStoreListItemsClient{stream} 289 if err := x.ClientStream.SendMsg(in); err != nil { 290 return nil, err 291 } 292 if err := x.ClientStream.CloseSend(); err != nil { 293 return nil, err 294 } 295 return x, nil 296} 297 298type IntStore_ListItemsClient interface { 299 Recv() (*Item, error) 300 grpc.ClientStream 301} 302 303type intStoreListItemsClient struct { 304 grpc.ClientStream 305} 306 307func (x *intStoreListItemsClient) Recv() (*Item, error) { 308 m := new(Item) 309 if err := x.ClientStream.RecvMsg(m); err != nil { 310 return nil, err 311 } 312 return m, nil 313} 314 315func (c *intStoreClient) SetStream(ctx context.Context, opts ...grpc.CallOption) (IntStore_SetStreamClient, error) { 316 stream, err := c.cc.NewStream(ctx, &_IntStore_serviceDesc.Streams[1], "/intstore.IntStore/SetStream", opts...) 317 if err != nil { 318 return nil, err 319 } 320 x := &intStoreSetStreamClient{stream} 321 return x, nil 322} 323 324type IntStore_SetStreamClient interface { 325 Send(*Item) error 326 CloseAndRecv() (*Summary, error) 327 grpc.ClientStream 328} 329 330type intStoreSetStreamClient struct { 331 grpc.ClientStream 332} 333 334func (x *intStoreSetStreamClient) Send(m *Item) error { 335 return x.ClientStream.SendMsg(m) 336} 337 338func (x *intStoreSetStreamClient) CloseAndRecv() (*Summary, error) { 339 if err := x.ClientStream.CloseSend(); err != nil { 340 return nil, err 341 } 342 m := new(Summary) 343 if err := x.ClientStream.RecvMsg(m); err != nil { 344 return nil, err 345 } 346 return m, nil 347} 348 349func (c *intStoreClient) StreamChat(ctx context.Context, opts ...grpc.CallOption) (IntStore_StreamChatClient, error) { 350 stream, err := c.cc.NewStream(ctx, &_IntStore_serviceDesc.Streams[2], "/intstore.IntStore/StreamChat", opts...) 351 if err != nil { 352 return nil, err 353 } 354 x := &intStoreStreamChatClient{stream} 355 return x, nil 356} 357 358type IntStore_StreamChatClient interface { 359 Send(*Item) error 360 Recv() (*Item, error) 361 grpc.ClientStream 362} 363 364type intStoreStreamChatClient struct { 365 grpc.ClientStream 366} 367 368func (x *intStoreStreamChatClient) Send(m *Item) error { 369 return x.ClientStream.SendMsg(m) 370} 371 372func (x *intStoreStreamChatClient) Recv() (*Item, error) { 373 m := new(Item) 374 if err := x.ClientStream.RecvMsg(m); err != nil { 375 return nil, err 376 } 377 return m, nil 378} 379 380// IntStoreServer is the server API for IntStore service. 381type IntStoreServer interface { 382 Set(context.Context, *Item) (*SetResponse, error) 383 Get(context.Context, *GetRequest) (*Item, error) 384 // A server-to-client streaming RPC. 385 ListItems(*ListItemsRequest, IntStore_ListItemsServer) error 386 // A client-to-server streaming RPC. 387 SetStream(IntStore_SetStreamServer) error 388 // A Bidirectional streaming RPC. 389 StreamChat(IntStore_StreamChatServer) error 390} 391 392func RegisterIntStoreServer(s *grpc.Server, srv IntStoreServer) { 393 s.RegisterService(&_IntStore_serviceDesc, srv) 394} 395 396func _IntStore_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 397 in := new(Item) 398 if err := dec(in); err != nil { 399 return nil, err 400 } 401 if interceptor == nil { 402 return srv.(IntStoreServer).Set(ctx, in) 403 } 404 info := &grpc.UnaryServerInfo{ 405 Server: srv, 406 FullMethod: "/intstore.IntStore/Set", 407 } 408 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 409 return srv.(IntStoreServer).Set(ctx, req.(*Item)) 410 } 411 return interceptor(ctx, in, info, handler) 412} 413 414func _IntStore_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 415 in := new(GetRequest) 416 if err := dec(in); err != nil { 417 return nil, err 418 } 419 if interceptor == nil { 420 return srv.(IntStoreServer).Get(ctx, in) 421 } 422 info := &grpc.UnaryServerInfo{ 423 Server: srv, 424 FullMethod: "/intstore.IntStore/Get", 425 } 426 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 427 return srv.(IntStoreServer).Get(ctx, req.(*GetRequest)) 428 } 429 return interceptor(ctx, in, info, handler) 430} 431 432func _IntStore_ListItems_Handler(srv interface{}, stream grpc.ServerStream) error { 433 m := new(ListItemsRequest) 434 if err := stream.RecvMsg(m); err != nil { 435 return err 436 } 437 return srv.(IntStoreServer).ListItems(m, &intStoreListItemsServer{stream}) 438} 439 440type IntStore_ListItemsServer interface { 441 Send(*Item) error 442 grpc.ServerStream 443} 444 445type intStoreListItemsServer struct { 446 grpc.ServerStream 447} 448 449func (x *intStoreListItemsServer) Send(m *Item) error { 450 return x.ServerStream.SendMsg(m) 451} 452 453func _IntStore_SetStream_Handler(srv interface{}, stream grpc.ServerStream) error { 454 return srv.(IntStoreServer).SetStream(&intStoreSetStreamServer{stream}) 455} 456 457type IntStore_SetStreamServer interface { 458 SendAndClose(*Summary) error 459 Recv() (*Item, error) 460 grpc.ServerStream 461} 462 463type intStoreSetStreamServer struct { 464 grpc.ServerStream 465} 466 467func (x *intStoreSetStreamServer) SendAndClose(m *Summary) error { 468 return x.ServerStream.SendMsg(m) 469} 470 471func (x *intStoreSetStreamServer) Recv() (*Item, error) { 472 m := new(Item) 473 if err := x.ServerStream.RecvMsg(m); err != nil { 474 return nil, err 475 } 476 return m, nil 477} 478 479func _IntStore_StreamChat_Handler(srv interface{}, stream grpc.ServerStream) error { 480 return srv.(IntStoreServer).StreamChat(&intStoreStreamChatServer{stream}) 481} 482 483type IntStore_StreamChatServer interface { 484 Send(*Item) error 485 Recv() (*Item, error) 486 grpc.ServerStream 487} 488 489type intStoreStreamChatServer struct { 490 grpc.ServerStream 491} 492 493func (x *intStoreStreamChatServer) Send(m *Item) error { 494 return x.ServerStream.SendMsg(m) 495} 496 497func (x *intStoreStreamChatServer) Recv() (*Item, error) { 498 m := new(Item) 499 if err := x.ServerStream.RecvMsg(m); err != nil { 500 return nil, err 501 } 502 return m, nil 503} 504 505var _IntStore_serviceDesc = grpc.ServiceDesc{ 506 ServiceName: "intstore.IntStore", 507 HandlerType: (*IntStoreServer)(nil), 508 Methods: []grpc.MethodDesc{ 509 { 510 MethodName: "Set", 511 Handler: _IntStore_Set_Handler, 512 }, 513 { 514 MethodName: "Get", 515 Handler: _IntStore_Get_Handler, 516 }, 517 }, 518 Streams: []grpc.StreamDesc{ 519 { 520 StreamName: "ListItems", 521 Handler: _IntStore_ListItems_Handler, 522 ServerStreams: true, 523 }, 524 { 525 StreamName: "SetStream", 526 Handler: _IntStore_SetStream_Handler, 527 ClientStreams: true, 528 }, 529 { 530 StreamName: "StreamChat", 531 Handler: _IntStore_StreamChat_Handler, 532 ServerStreams: true, 533 ClientStreams: true, 534 }, 535 }, 536 Metadata: "intstore.proto", 537} 538 539func init() { proto.RegisterFile("intstore.proto", fileDescriptor_intstore_10c1c94979d47ae6) } 540 541var fileDescriptor_intstore_10c1c94979d47ae6 = []byte{ 542 // 287 bytes of a gzipped FileDescriptorProto 543 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4d, 0x4b, 0xc3, 0x40, 544 0x10, 0xed, 0xf6, 0x43, 0x9b, 0x29, 0x14, 0x1d, 0x2a, 0x94, 0x82, 0x18, 0xf6, 0x94, 0x83, 0x86, 545 0x50, 0xbd, 0x79, 0xf4, 0x50, 0x0a, 0x9e, 0xb2, 0xe2, 0x55, 0x56, 0x19, 0x6c, 0xc1, 0x6c, 0xe2, 546 0xee, 0xa4, 0xe0, 0x9f, 0xf0, 0x37, 0xcb, 0x26, 0x6d, 0x13, 0x1a, 0x6f, 0xfb, 0x66, 0xde, 0xbc, 547 0x79, 0x6f, 0x16, 0xa6, 0x5b, 0xc3, 0x8e, 0x73, 0x4b, 0x71, 0x61, 0x73, 0xce, 0x71, 0x7c, 0xc0, 548 0x32, 0x81, 0xe1, 0x9a, 0x29, 0x43, 0x84, 0xa1, 0xd1, 0x19, 0xcd, 0x45, 0x28, 0xa2, 0x20, 0xad, 549 0xde, 0x38, 0x83, 0xd1, 0x4e, 0x7f, 0x95, 0x34, 0xef, 0x87, 0x22, 0x1a, 0xa5, 0x35, 0x90, 0xb7, 550 0x30, 0x51, 0xc4, 0x29, 0xb9, 0x22, 0x37, 0x8e, 0xf0, 0x1a, 0xa0, 0xb0, 0xb4, 0x7b, 0xab, 0x99, 551 0xa2, 0x62, 0x06, 0xbe, 0xf2, 0x5a, 0xb1, 0x43, 0x80, 0x95, 0x67, 0x7f, 0x97, 0xe4, 0xf8, 0xbf, 552 0x2d, 0xf2, 0x06, 0xce, 0x55, 0x99, 0x65, 0xda, 0xfe, 0xf8, 0x85, 0x1f, 0x79, 0x69, 0x78, 0x2f, 553 0x53, 0x03, 0xf9, 0x00, 0x17, 0xcf, 0x5b, 0xc7, 0xde, 0xa6, 0x3b, 0x08, 0x85, 0x30, 0xf9, 0xb4, 554 0xa4, 0x99, 0xec, 0xcb, 0x46, 0x9b, 0x3d, 0xbf, 0x5d, 0x5a, 0xfe, 0xf6, 0x61, 0xbc, 0x36, 0xac, 555 0x7c, 0x4a, 0x8c, 0x61, 0xa0, 0x88, 0x71, 0x1a, 0x1f, 0xef, 0xe0, 0xd5, 0x16, 0x57, 0x0d, 0x6e, 556 0x45, 0x92, 0x3d, 0xbc, 0x83, 0xc1, 0x8a, 0x18, 0x67, 0x4d, 0xbf, 0x09, 0xb1, 0x38, 0x51, 0x91, 557 0x3d, 0x7c, 0x84, 0xe0, 0xe8, 0x10, 0x17, 0x4d, 0xfb, 0xd4, 0x76, 0x77, 0x34, 0x11, 0xb8, 0x84, 558 0x40, 0x11, 0x2b, 0xb6, 0xa4, 0xb3, 0x8e, 0xc3, 0xcb, 0x96, 0xc3, 0xfa, 0x48, 0xb2, 0x17, 0xf9, 559 0x19, 0xa8, 0x07, 0x9e, 0x36, 0xba, 0x1b, 0xab, 0xb3, 0x25, 0x12, 0x89, 0x78, 0x3f, 0xab, 0xbe, 560 0xfe, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x47, 0xc4, 0x86, 0x0c, 0x02, 0x00, 0x00, 561} 562