service.pb.go 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: service.proto
  3. package passportpb
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/gogo/protobuf/gogoproto"
  8. import (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ context.Context
  23. var _ grpc.ClientConn
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the grpc package it is being compiled against.
  26. const _ = grpc.SupportPackageIsVersion4
  27. // PassportClient is the client API for Passport service.
  28. //
  29. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  30. type PassportClient interface {
  31. // The UserInfo service responds to incoming requests which who want to get user info.
  32. // rpc GetUserInfo (UserInfoRequest) returns (UserInfoReply) {}
  33. SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
  34. }
  35. type passportClient struct {
  36. cc *grpc.ClientConn
  37. }
  38. func NewPassportClient(cc *grpc.ClientConn) PassportClient {
  39. return &passportClient{cc}
  40. }
  41. func (c *passportClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
  42. out := new(HelloReply)
  43. err := c.cc.Invoke(ctx, "/passportpb.Passport/SayHello", in, out, opts...)
  44. if err != nil {
  45. return nil, err
  46. }
  47. return out, nil
  48. }
  49. // PassportServer is the server API for Passport service.
  50. type PassportServer interface {
  51. // The UserInfo service responds to incoming requests which who want to get user info.
  52. // rpc GetUserInfo (UserInfoRequest) returns (UserInfoReply) {}
  53. SayHello(context.Context, *HelloRequest) (*HelloReply, error)
  54. }
  55. func RegisterPassportServer(s *grpc.Server, srv PassportServer) {
  56. s.RegisterService(&_Passport_serviceDesc, srv)
  57. }
  58. func _Passport_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  59. in := new(HelloRequest)
  60. if err := dec(in); err != nil {
  61. return nil, err
  62. }
  63. if interceptor == nil {
  64. return srv.(PassportServer).SayHello(ctx, in)
  65. }
  66. info := &grpc.UnaryServerInfo{
  67. Server: srv,
  68. FullMethod: "/passportpb.Passport/SayHello",
  69. }
  70. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  71. return srv.(PassportServer).SayHello(ctx, req.(*HelloRequest))
  72. }
  73. return interceptor(ctx, in, info, handler)
  74. }
  75. var _Passport_serviceDesc = grpc.ServiceDesc{
  76. ServiceName: "passportpb.Passport",
  77. HandlerType: (*PassportServer)(nil),
  78. Methods: []grpc.MethodDesc{
  79. {
  80. MethodName: "SayHello",
  81. Handler: _Passport_SayHello_Handler,
  82. },
  83. },
  84. Streams: []grpc.StreamDesc{},
  85. Metadata: "service.proto",
  86. }
  87. func init() { proto.RegisterFile("service.proto", fileDescriptor_service_2517343fe8a91299) }
  88. var fileDescriptor_service_2517343fe8a91299 = []byte{
  89. // 151 bytes of a gzipped FileDescriptorProto
  90. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2a,
  91. 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2a, 0x48, 0x2c, 0x2e, 0x2e,
  92. 0xc8, 0x2f, 0x2a, 0x29, 0x48, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce,
  93. 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c,
  94. 0x30, 0x0b, 0xa2, 0x55, 0x4a, 0x20, 0x23, 0x35, 0x27, 0x27, 0xbf, 0x3c, 0xbf, 0x28, 0x27, 0x05,
  95. 0x22, 0x62, 0xe4, 0xc5, 0xc5, 0x11, 0x00, 0x35, 0x4e, 0xc8, 0x8e, 0x8b, 0x23, 0x38, 0xb1, 0xd2,
  96. 0x03, 0xa4, 0x44, 0x48, 0x42, 0x0f, 0x61, 0x8b, 0x1e, 0x58, 0x28, 0x28, 0xb5, 0xb0, 0x34, 0xb5,
  97. 0xb8, 0x44, 0x4a, 0x0c, 0x8b, 0x4c, 0x41, 0x4e, 0xa5, 0x12, 0x83, 0x93, 0xc0, 0x8f, 0x87, 0x72,
  98. 0x8c, 0x51, 0x48, 0xce, 0x4b, 0x62, 0x03, 0x5b, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x44,
  99. 0xff, 0xa0, 0xf9, 0xc2, 0x00, 0x00, 0x00,
  100. }