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