1
0

auth.pb.go 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: auth.proto
  3. package pb
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "google.golang.org/genproto/googleapis/api/annotations"
  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. type AuthStatusRequest struct {
  17. }
  18. func (m *AuthStatusRequest) Reset() { *m = AuthStatusRequest{} }
  19. func (m *AuthStatusRequest) String() string { return proto.CompactTextString(m) }
  20. func (*AuthStatusRequest) ProtoMessage() {}
  21. func (*AuthStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
  22. type AuthAuthenticateRequest struct {
  23. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  24. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
  25. }
  26. func (m *AuthAuthenticateRequest) Reset() { *m = AuthAuthenticateRequest{} }
  27. func (m *AuthAuthenticateRequest) String() string { return proto.CompactTextString(m) }
  28. func (*AuthAuthenticateRequest) ProtoMessage() {}
  29. func (*AuthAuthenticateRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
  30. func (m *AuthAuthenticateRequest) GetUsername() string {
  31. if m != nil {
  32. return m.Username
  33. }
  34. return ""
  35. }
  36. func (m *AuthAuthenticateRequest) GetPassword() string {
  37. if m != nil {
  38. return m.Password
  39. }
  40. return ""
  41. }
  42. type AuthStatusResponse struct {
  43. User *UserResponse_User `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
  44. }
  45. func (m *AuthStatusResponse) Reset() { *m = AuthStatusResponse{} }
  46. func (m *AuthStatusResponse) String() string { return proto.CompactTextString(m) }
  47. func (*AuthStatusResponse) ProtoMessage() {}
  48. func (*AuthStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
  49. func (m *AuthStatusResponse) GetUser() *UserResponse_User {
  50. if m != nil {
  51. return m.User
  52. }
  53. return nil
  54. }
  55. type AuthAuthenticateResponse struct {
  56. Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
  57. }
  58. func (m *AuthAuthenticateResponse) Reset() { *m = AuthAuthenticateResponse{} }
  59. func (m *AuthAuthenticateResponse) String() string { return proto.CompactTextString(m) }
  60. func (*AuthAuthenticateResponse) ProtoMessage() {}
  61. func (*AuthAuthenticateResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
  62. func (m *AuthAuthenticateResponse) GetToken() string {
  63. if m != nil {
  64. return m.Token
  65. }
  66. return ""
  67. }
  68. func init() {
  69. proto.RegisterType((*AuthStatusRequest)(nil), "pb.AuthStatusRequest")
  70. proto.RegisterType((*AuthAuthenticateRequest)(nil), "pb.AuthAuthenticateRequest")
  71. proto.RegisterType((*AuthStatusResponse)(nil), "pb.AuthStatusResponse")
  72. proto.RegisterType((*AuthAuthenticateResponse)(nil), "pb.AuthAuthenticateResponse")
  73. }
  74. // Reference imports to suppress errors if they are not otherwise used.
  75. var _ context.Context
  76. var _ grpc.ClientConn
  77. // This is a compile-time assertion to ensure that this generated file
  78. // is compatible with the grpc package it is being compiled against.
  79. const _ = grpc.SupportPackageIsVersion4
  80. // Client API for AuthService service
  81. type AuthServiceClient interface {
  82. Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error)
  83. Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error)
  84. }
  85. type authServiceClient struct {
  86. cc *grpc.ClientConn
  87. }
  88. func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
  89. return &authServiceClient{cc}
  90. }
  91. func (c *authServiceClient) Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error) {
  92. out := new(AuthStatusResponse)
  93. err := grpc.Invoke(ctx, "/pb.AuthService/Status", in, out, c.cc, opts...)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return out, nil
  98. }
  99. func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error) {
  100. out := new(AuthAuthenticateResponse)
  101. err := grpc.Invoke(ctx, "/pb.AuthService/Authenticate", in, out, c.cc, opts...)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return out, nil
  106. }
  107. // Server API for AuthService service
  108. type AuthServiceServer interface {
  109. Status(context.Context, *AuthStatusRequest) (*AuthStatusResponse, error)
  110. Authenticate(context.Context, *AuthAuthenticateRequest) (*AuthAuthenticateResponse, error)
  111. }
  112. func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) {
  113. s.RegisterService(&_AuthService_serviceDesc, srv)
  114. }
  115. func _AuthService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  116. in := new(AuthStatusRequest)
  117. if err := dec(in); err != nil {
  118. return nil, err
  119. }
  120. if interceptor == nil {
  121. return srv.(AuthServiceServer).Status(ctx, in)
  122. }
  123. info := &grpc.UnaryServerInfo{
  124. Server: srv,
  125. FullMethod: "/pb.AuthService/Status",
  126. }
  127. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  128. return srv.(AuthServiceServer).Status(ctx, req.(*AuthStatusRequest))
  129. }
  130. return interceptor(ctx, in, info, handler)
  131. }
  132. func _AuthService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  133. in := new(AuthAuthenticateRequest)
  134. if err := dec(in); err != nil {
  135. return nil, err
  136. }
  137. if interceptor == nil {
  138. return srv.(AuthServiceServer).Authenticate(ctx, in)
  139. }
  140. info := &grpc.UnaryServerInfo{
  141. Server: srv,
  142. FullMethod: "/pb.AuthService/Authenticate",
  143. }
  144. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  145. return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthAuthenticateRequest))
  146. }
  147. return interceptor(ctx, in, info, handler)
  148. }
  149. var _AuthService_serviceDesc = grpc.ServiceDesc{
  150. ServiceName: "pb.AuthService",
  151. HandlerType: (*AuthServiceServer)(nil),
  152. Methods: []grpc.MethodDesc{
  153. {
  154. MethodName: "Status",
  155. Handler: _AuthService_Status_Handler,
  156. },
  157. {
  158. MethodName: "Authenticate",
  159. Handler: _AuthService_Authenticate_Handler,
  160. },
  161. },
  162. Streams: []grpc.StreamDesc{},
  163. Metadata: "auth.proto",
  164. }
  165. func init() { proto.RegisterFile("auth.proto", fileDescriptor3) }
  166. var fileDescriptor3 = []byte{
  167. // 289 bytes of a gzipped FileDescriptorProto
  168. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x4e, 0xf3, 0x30,
  169. 0x10, 0x85, 0x95, 0xe8, 0xff, 0x2b, 0x98, 0x22, 0xa1, 0x1a, 0x4a, 0x23, 0xd3, 0x45, 0xe5, 0x15,
  170. 0xb0, 0x48, 0xa0, 0xec, 0xd8, 0x20, 0x6e, 0x00, 0x45, 0x1c, 0xc0, 0x29, 0xa3, 0x36, 0x2a, 0xd8,
  171. 0x26, 0x1e, 0x97, 0x3d, 0x57, 0xe0, 0x5a, 0xec, 0xb8, 0x02, 0x07, 0x41, 0xb6, 0x93, 0x2a, 0xa2,
  172. 0x5d, 0x44, 0xca, 0x9b, 0x37, 0xf3, 0xbe, 0xc9, 0x04,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, 0x76, 0xda, 0x06, 0xec, 0xb8, 0x1c, 0x1f, 0xef,
  184. 0x36, 0x1b, 0xc6, 0x24, 0x30, 0xb8, 0x18, 0x6e, 0x18, 0xb2, 0xd3, 0x76, 0x93, 0x5c, 0x94, 0xbd,
  185. 0xf0, 0xc3, 0xae, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x24, 0x8e, 0x73, 0xec, 0x01, 0x00,
  186. 0x00,
  187. }