2a0be64b4466446239b99a890aa926a72c1adee8.svn-base 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: pb/user.proto
  3. package pb
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type LoginRequest struct {
  23. Username string `protobuf:"bytes,1,opt,name=Username,proto3" json:"Username,omitempty"`
  24. Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
  25. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  26. XXX_unrecognized []byte `json:"-"`
  27. XXX_sizecache int32 `json:"-"`
  28. }
  29. func (m *LoginRequest) Reset() { *m = LoginRequest{} }
  30. func (m *LoginRequest) String() string { return proto.CompactTextString(m) }
  31. func (*LoginRequest) ProtoMessage() {}
  32. func (*LoginRequest) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_c4f917211a932270, []int{0}
  34. }
  35. func (m *LoginRequest) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_LoginRequest.Unmarshal(m, b)
  37. }
  38. func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic)
  40. }
  41. func (m *LoginRequest) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_LoginRequest.Merge(m, src)
  43. }
  44. func (m *LoginRequest) XXX_Size() int {
  45. return xxx_messageInfo_LoginRequest.Size(m)
  46. }
  47. func (m *LoginRequest) XXX_DiscardUnknown() {
  48. xxx_messageInfo_LoginRequest.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_LoginRequest proto.InternalMessageInfo
  51. func (m *LoginRequest) GetUsername() string {
  52. if m != nil {
  53. return m.Username
  54. }
  55. return ""
  56. }
  57. func (m *LoginRequest) GetPassword() string {
  58. if m != nil {
  59. return m.Password
  60. }
  61. return ""
  62. }
  63. type LoginResponse struct {
  64. Ret string `protobuf:"bytes,1,opt,name=Ret,proto3" json:"Ret,omitempty"`
  65. Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
  66. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  67. XXX_unrecognized []byte `json:"-"`
  68. XXX_sizecache int32 `json:"-"`
  69. }
  70. func (m *LoginResponse) Reset() { *m = LoginResponse{} }
  71. func (m *LoginResponse) String() string { return proto.CompactTextString(m) }
  72. func (*LoginResponse) ProtoMessage() {}
  73. func (*LoginResponse) Descriptor() ([]byte, []int) {
  74. return fileDescriptor_c4f917211a932270, []int{1}
  75. }
  76. func (m *LoginResponse) XXX_Unmarshal(b []byte) error {
  77. return xxx_messageInfo_LoginResponse.Unmarshal(m, b)
  78. }
  79. func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  80. return xxx_messageInfo_LoginResponse.Marshal(b, m, deterministic)
  81. }
  82. func (m *LoginResponse) XXX_Merge(src proto.Message) {
  83. xxx_messageInfo_LoginResponse.Merge(m, src)
  84. }
  85. func (m *LoginResponse) XXX_Size() int {
  86. return xxx_messageInfo_LoginResponse.Size(m)
  87. }
  88. func (m *LoginResponse) XXX_DiscardUnknown() {
  89. xxx_messageInfo_LoginResponse.DiscardUnknown(m)
  90. }
  91. var xxx_messageInfo_LoginResponse proto.InternalMessageInfo
  92. func (m *LoginResponse) GetRet() string {
  93. if m != nil {
  94. return m.Ret
  95. }
  96. return ""
  97. }
  98. func (m *LoginResponse) GetErr() string {
  99. if m != nil {
  100. return m.Err
  101. }
  102. return ""
  103. }
  104. func init() {
  105. proto.RegisterType((*LoginRequest)(nil), "pb.LoginRequest")
  106. proto.RegisterType((*LoginResponse)(nil), "pb.LoginResponse")
  107. }
  108. func init() { proto.RegisterFile("pb/user.proto", fileDescriptor_c4f917211a932270) }
  109. var fileDescriptor_c4f917211a932270 = []byte{
  110. // 173 bytes of a gzipped FileDescriptorProto
  111. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x48, 0xd2, 0x2f,
  112. 0x2d, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x72, 0xe3,
  113. 0xe2, 0xf1, 0xc9, 0x4f, 0xcf, 0xcc, 0x0b, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe2,
  114. 0xe2, 0x08, 0x2d, 0x4e, 0x2d, 0xca, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c,
  115. 0x82, 0xf3, 0x41, 0x72, 0x01, 0x89, 0xc5, 0xc5, 0xe5, 0xf9, 0x45, 0x29, 0x12, 0x4c, 0x10, 0x39,
  116. 0x18, 0x5f, 0xc9, 0x98, 0x8b, 0x17, 0x6a, 0x4e, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x00,
  117. 0x17, 0x73, 0x50, 0x6a, 0x09, 0xd4, 0x0c, 0x10, 0x13, 0x24, 0x92, 0x5a, 0x54, 0x04, 0xd5, 0x09,
  118. 0x62, 0x1a, 0xb9, 0x72, 0x71, 0x83, 0x0c, 0x0f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x15, 0x32,
  119. 0xe3, 0xe2, 0x75, 0xce, 0x48, 0x4d, 0xce, 0x86, 0x19, 0x2a, 0x24, 0xa0, 0x57, 0x90, 0xa4, 0x87,
  120. 0xec, 0x3c, 0x29, 0x41, 0x24, 0x11, 0x88, 0x45, 0x4a, 0x0c, 0x49, 0x6c, 0x60, 0xef, 0x18, 0x03,
  121. 0x02, 0x00, 0x00, 0xff, 0xff, 0x47, 0x2f, 0x22, 0x40, 0xdf, 0x00, 0x00, 0x00,
  122. }
  123. // Reference imports to suppress errors if they are not otherwise used.
  124. var _ context.Context
  125. var _ grpc.ClientConn
  126. // This is a compile-time assertion to ensure that this generated file
  127. // is compatible with the grpc package it is being compiled against.
  128. const _ = grpc.SupportPackageIsVersion4
  129. // UserServiceClient is the client API for UserService service.
  130. //
  131. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  132. type UserServiceClient interface {
  133. CheckPassword(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
  134. }
  135. type userServiceClient struct {
  136. cc *grpc.ClientConn
  137. }
  138. func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient {
  139. return &userServiceClient{cc}
  140. }
  141. func (c *userServiceClient) CheckPassword(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
  142. out := new(LoginResponse)
  143. err := c.cc.Invoke(ctx, "/pb.UserService/CheckPassword", in, out, opts...)
  144. if err != nil {
  145. return nil, err
  146. }
  147. return out, nil
  148. }
  149. // UserServiceServer is the server API for UserService service.
  150. type UserServiceServer interface {
  151. CheckPassword(context.Context, *LoginRequest) (*LoginResponse, error)
  152. }
  153. // UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
  154. type UnimplementedUserServiceServer struct {
  155. }
  156. func (*UnimplementedUserServiceServer) CheckPassword(ctx context.Context, req *LoginRequest) (*LoginResponse, error) {
  157. return nil, status.Errorf(codes.Unimplemented, "method CheckPassword not implemented")
  158. }
  159. func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
  160. s.RegisterService(&_UserService_serviceDesc, srv)
  161. }
  162. func _UserService_CheckPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  163. in := new(LoginRequest)
  164. if err := dec(in); err != nil {
  165. return nil, err
  166. }
  167. if interceptor == nil {
  168. return srv.(UserServiceServer).CheckPassword(ctx, in)
  169. }
  170. info := &grpc.UnaryServerInfo{
  171. Server: srv,
  172. FullMethod: "/pb.UserService/CheckPassword",
  173. }
  174. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  175. return srv.(UserServiceServer).CheckPassword(ctx, req.(*LoginRequest))
  176. }
  177. return interceptor(ctx, in, info, handler)
  178. }
  179. var _UserService_serviceDesc = grpc.ServiceDesc{
  180. ServiceName: "pb.UserService",
  181. HandlerType: (*UserServiceServer)(nil),
  182. Methods: []grpc.MethodDesc{
  183. {
  184. MethodName: "CheckPassword",
  185. Handler: _UserService_CheckPassword_Handler,
  186. },
  187. },
  188. Streams: []grpc.StreamDesc{},
  189. Metadata: "pb/user.proto",
  190. }