auth.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: auth.proto
  3. package pb
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. _ "google.golang.org/genproto/googleapis/api/annotations"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. math "math"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  23. type AuthStatusRequest struct {
  24. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  25. XXX_unrecognized []byte `json:"-"`
  26. XXX_sizecache int32 `json:"-"`
  27. }
  28. func (m *AuthStatusRequest) Reset() { *m = AuthStatusRequest{} }
  29. func (m *AuthStatusRequest) String() string { return proto.CompactTextString(m) }
  30. func (*AuthStatusRequest) ProtoMessage() {}
  31. func (*AuthStatusRequest) Descriptor() ([]byte, []int) {
  32. return fileDescriptor_8bbd6f3875b0e874, []int{0}
  33. }
  34. func (m *AuthStatusRequest) XXX_Unmarshal(b []byte) error {
  35. return xxx_messageInfo_AuthStatusRequest.Unmarshal(m, b)
  36. }
  37. func (m *AuthStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  38. return xxx_messageInfo_AuthStatusRequest.Marshal(b, m, deterministic)
  39. }
  40. func (m *AuthStatusRequest) XXX_Merge(src proto.Message) {
  41. xxx_messageInfo_AuthStatusRequest.Merge(m, src)
  42. }
  43. func (m *AuthStatusRequest) XXX_Size() int {
  44. return xxx_messageInfo_AuthStatusRequest.Size(m)
  45. }
  46. func (m *AuthStatusRequest) XXX_DiscardUnknown() {
  47. xxx_messageInfo_AuthStatusRequest.DiscardUnknown(m)
  48. }
  49. var xxx_messageInfo_AuthStatusRequest proto.InternalMessageInfo
  50. type AuthAuthenticateRequest struct {
  51. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  52. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  53. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  54. XXX_unrecognized []byte `json:"-"`
  55. XXX_sizecache int32 `json:"-"`
  56. }
  57. func (m *AuthAuthenticateRequest) Reset() { *m = AuthAuthenticateRequest{} }
  58. func (m *AuthAuthenticateRequest) String() string { return proto.CompactTextString(m) }
  59. func (*AuthAuthenticateRequest) ProtoMessage() {}
  60. func (*AuthAuthenticateRequest) Descriptor() ([]byte, []int) {
  61. return fileDescriptor_8bbd6f3875b0e874, []int{1}
  62. }
  63. func (m *AuthAuthenticateRequest) XXX_Unmarshal(b []byte) error {
  64. return xxx_messageInfo_AuthAuthenticateRequest.Unmarshal(m, b)
  65. }
  66. func (m *AuthAuthenticateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  67. return xxx_messageInfo_AuthAuthenticateRequest.Marshal(b, m, deterministic)
  68. }
  69. func (m *AuthAuthenticateRequest) XXX_Merge(src proto.Message) {
  70. xxx_messageInfo_AuthAuthenticateRequest.Merge(m, src)
  71. }
  72. func (m *AuthAuthenticateRequest) XXX_Size() int {
  73. return xxx_messageInfo_AuthAuthenticateRequest.Size(m)
  74. }
  75. func (m *AuthAuthenticateRequest) XXX_DiscardUnknown() {
  76. xxx_messageInfo_AuthAuthenticateRequest.DiscardUnknown(m)
  77. }
  78. var xxx_messageInfo_AuthAuthenticateRequest proto.InternalMessageInfo
  79. func (m *AuthAuthenticateRequest) GetUsername() string {
  80. if m != nil {
  81. return m.Username
  82. }
  83. return ""
  84. }
  85. func (m *AuthAuthenticateRequest) GetPassword() string {
  86. if m != nil {
  87. return m.Password
  88. }
  89. return ""
  90. }
  91. type AuthStatusResponse struct {
  92. User *UserResponse_User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
  93. IsRoot bool `protobuf:"varint,2,opt,name=is_root,json=isRoot,proto3" json:"is_root,omitempty"`
  94. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  95. XXX_unrecognized []byte `json:"-"`
  96. XXX_sizecache int32 `json:"-"`
  97. }
  98. func (m *AuthStatusResponse) Reset() { *m = AuthStatusResponse{} }
  99. func (m *AuthStatusResponse) String() string { return proto.CompactTextString(m) }
  100. func (*AuthStatusResponse) ProtoMessage() {}
  101. func (*AuthStatusResponse) Descriptor() ([]byte, []int) {
  102. return fileDescriptor_8bbd6f3875b0e874, []int{2}
  103. }
  104. func (m *AuthStatusResponse) XXX_Unmarshal(b []byte) error {
  105. return xxx_messageInfo_AuthStatusResponse.Unmarshal(m, b)
  106. }
  107. func (m *AuthStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  108. return xxx_messageInfo_AuthStatusResponse.Marshal(b, m, deterministic)
  109. }
  110. func (m *AuthStatusResponse) XXX_Merge(src proto.Message) {
  111. xxx_messageInfo_AuthStatusResponse.Merge(m, src)
  112. }
  113. func (m *AuthStatusResponse) XXX_Size() int {
  114. return xxx_messageInfo_AuthStatusResponse.Size(m)
  115. }
  116. func (m *AuthStatusResponse) XXX_DiscardUnknown() {
  117. xxx_messageInfo_AuthStatusResponse.DiscardUnknown(m)
  118. }
  119. var xxx_messageInfo_AuthStatusResponse proto.InternalMessageInfo
  120. func (m *AuthStatusResponse) GetUser() *UserResponse_User {
  121. if m != nil {
  122. return m.User
  123. }
  124. return nil
  125. }
  126. func (m *AuthStatusResponse) GetIsRoot() bool {
  127. if m != nil {
  128. return m.IsRoot
  129. }
  130. return false
  131. }
  132. type AuthAuthenticateResponse struct {
  133. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
  134. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  135. XXX_unrecognized []byte `json:"-"`
  136. XXX_sizecache int32 `json:"-"`
  137. }
  138. func (m *AuthAuthenticateResponse) Reset() { *m = AuthAuthenticateResponse{} }
  139. func (m *AuthAuthenticateResponse) String() string { return proto.CompactTextString(m) }
  140. func (*AuthAuthenticateResponse) ProtoMessage() {}
  141. func (*AuthAuthenticateResponse) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_8bbd6f3875b0e874, []int{3}
  143. }
  144. func (m *AuthAuthenticateResponse) XXX_Unmarshal(b []byte) error {
  145. return xxx_messageInfo_AuthAuthenticateResponse.Unmarshal(m, b)
  146. }
  147. func (m *AuthAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. return xxx_messageInfo_AuthAuthenticateResponse.Marshal(b, m, deterministic)
  149. }
  150. func (m *AuthAuthenticateResponse) XXX_Merge(src proto.Message) {
  151. xxx_messageInfo_AuthAuthenticateResponse.Merge(m, src)
  152. }
  153. func (m *AuthAuthenticateResponse) XXX_Size() int {
  154. return xxx_messageInfo_AuthAuthenticateResponse.Size(m)
  155. }
  156. func (m *AuthAuthenticateResponse) XXX_DiscardUnknown() {
  157. xxx_messageInfo_AuthAuthenticateResponse.DiscardUnknown(m)
  158. }
  159. var xxx_messageInfo_AuthAuthenticateResponse proto.InternalMessageInfo
  160. func (m *AuthAuthenticateResponse) GetToken() string {
  161. if m != nil {
  162. return m.Token
  163. }
  164. return ""
  165. }
  166. func init() {
  167. proto.RegisterType((*AuthStatusRequest)(nil), "pb.AuthStatusRequest")
  168. proto.RegisterType((*AuthAuthenticateRequest)(nil), "pb.AuthAuthenticateRequest")
  169. proto.RegisterType((*AuthStatusResponse)(nil), "pb.AuthStatusResponse")
  170. proto.RegisterType((*AuthAuthenticateResponse)(nil), "pb.AuthAuthenticateResponse")
  171. }
  172. func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
  173. var fileDescriptor_8bbd6f3875b0e874 = []byte{
  174. // 306 bytes of a gzipped FileDescriptorProto
  175. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x41, 0x4e, 0x2a, 0x41,
  176. 0x10, 0xcd, 0x90, 0xff, 0x11, 0x0b, 0x37, 0x36, 0x22, 0x38, 0x10, 0x63, 0x26, 0x2e, 0xd4, 0x05,
  177. 0xa3, 0xb8, 0x73, 0xe7, 0x11, 0x1c, 0x35, 0x71, 0x67, 0x1a, 0xac, 0xc0, 0x44, 0xed, 0x1a, 0xbb,
  178. 0x6a, 0x70, 0xef, 0x15, 0x3c, 0x9a, 0x1e, 0xc1, 0x83, 0x98, 0xee, 0x1e, 0xcc, 0x28, 0x2c, 0x3a,
  179. 0xe9, 0x57, 0xaf, 0xea, 0xbd, 0x97, 0x2a, 0x00, 0x5d, 0xca, 0x7c, 0x54, 0x58, 0x12, 0x52, 0x8d,
  180. 0x62, 0x12, 0x0f, 0x67, 0x44, 0xb3, 0x27, 0x4c, 0x75, 0x91, 0xa7, 0xda, 0x18, 0x12, 0x2d, 0x39,
  181. 0x19, 0x0e, 0x1d, 0x31, 0x94, 0x8c, 0x36, 0xfc, 0x93, 0x0e, 0x6c, 0x5f, 0x96, 0x32, 0xbf, 0x16,
  182. 0x2d, 0x25, 0x67, 0xf8, 0x52, 0x22, 0x4b, 0x72, 0x05, 0x3d, 0x57, 0x74, 0x0f, 0x8d, 0xe4, 0x53,
  183. 0x2d, 0x58, 0x51, 0x2a, 0x86, 0x96, 0x9b, 0x36, 0xfa, 0x19, 0xfb, 0xd1, 0x41, 0x74, 0xb4, 0x99,
  184. 0xfd, 0x60, 0xc7, 0x15, 0x9a, 0xf9, 0x95, 0xec, 0x43, 0xbf, 0x11, 0xb8, 0x25, 0x4e, 0xee, 0x40,
  185. 0xd5, 0x7d, 0xb8, 0x20, 0xc3, 0xa8, 0x8e, 0xe1, 0x9f, 0x9b, 0xf6, 0x4a, 0xed, 0x71, 0x77, 0x54,
  186. 0x4c, 0x46, 0xb7, 0x8c, 0x76, 0xc9, 0x07, 0xe0, 0x5b, 0x54, 0x0f, 0x36, 0x72, 0xbe, 0xb7, 0x44,
  187. 0xe2, 0xb5, 0x5b, 0x59, 0x33, 0xe7, 0x8c, 0x48, 0x92, 0x53, 0xe8, 0xaf, 0x86, 0xad, 0xf4, 0x77,
  188. 0xe0, 0xbf, 0xd0, 0x23, 0x9a, 0x2a, 0x6a, 0x00, 0xe3, 0xcf, 0x08, 0xda, 0x3e, 0x0c, 0xda, 0x45,
  189. 0x3e, 0x45, 0x75, 0x03, 0xcd, 0x90, 0x4b, 0xf9, 0x04, 0x2b, 0xfb, 0x88, 0x77, 0xff, 0x96, 0x83,
  190. 0x7c, 0x32, 0x78, 0xfb, 0xf8, 0x7a, 0x6f, 0x74, 0x55, 0xc7, 0x2f, 0x7a, 0x71, 0x96, 0xba, 0x33,
  191. 0xa4, 0x1c, 0xb4, 0x08, 0xb6, 0xea, 0x99, 0xd4, 0x60, 0x29, 0xb2, 0x66, 0xad, 0xf1, 0x70, 0x3d,
  192. 0x59, 0xf9, 0x1c, 0x7a, 0x9f, 0xfd, 0x64, 0xef, 0x97, 0x8f, 0xae, 0xb5, 0x5e, 0x44, 0x27, 0x93,
  193. 0xa6, 0xbf, 0xe8, 0xf9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xd8, 0x13, 0x0a, 0x0d, 0x02,
  194. 0x00, 0x00,
  195. }
  196. // Reference imports to suppress errors if they are not otherwise used.
  197. var _ context.Context
  198. var _ grpc.ClientConn
  199. // This is a compile-time assertion to ensure that this generated file
  200. // is compatible with the grpc package it is being compiled against.
  201. const _ = grpc.SupportPackageIsVersion4
  202. // AuthServiceClient is the client API for AuthService service.
  203. //
  204. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  205. type AuthServiceClient interface {
  206. Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error)
  207. Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error)
  208. }
  209. type authServiceClient struct {
  210. cc *grpc.ClientConn
  211. }
  212. func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
  213. return &authServiceClient{cc}
  214. }
  215. func (c *authServiceClient) Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error) {
  216. out := new(AuthStatusResponse)
  217. err := c.cc.Invoke(ctx, "/pb.AuthService/Status", in, out, opts...)
  218. if err != nil {
  219. return nil, err
  220. }
  221. return out, nil
  222. }
  223. func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error) {
  224. out := new(AuthAuthenticateResponse)
  225. err := c.cc.Invoke(ctx, "/pb.AuthService/Authenticate", in, out, opts...)
  226. if err != nil {
  227. return nil, err
  228. }
  229. return out, nil
  230. }
  231. // AuthServiceServer is the server API for AuthService service.
  232. type AuthServiceServer interface {
  233. Status(context.Context, *AuthStatusRequest) (*AuthStatusResponse, error)
  234. Authenticate(context.Context, *AuthAuthenticateRequest) (*AuthAuthenticateResponse, error)
  235. }
  236. // UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.
  237. type UnimplementedAuthServiceServer struct {
  238. }
  239. func (*UnimplementedAuthServiceServer) Status(ctx context.Context, req *AuthStatusRequest) (*AuthStatusResponse, error) {
  240. return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
  241. }
  242. func (*UnimplementedAuthServiceServer) Authenticate(ctx context.Context, req *AuthAuthenticateRequest) (*AuthAuthenticateResponse, error) {
  243. return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
  244. }
  245. func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) {
  246. s.RegisterService(&_AuthService_serviceDesc, srv)
  247. }
  248. func _AuthService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  249. in := new(AuthStatusRequest)
  250. if err := dec(in); err != nil {
  251. return nil, err
  252. }
  253. if interceptor == nil {
  254. return srv.(AuthServiceServer).Status(ctx, in)
  255. }
  256. info := &grpc.UnaryServerInfo{
  257. Server: srv,
  258. FullMethod: "/pb.AuthService/Status",
  259. }
  260. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  261. return srv.(AuthServiceServer).Status(ctx, req.(*AuthStatusRequest))
  262. }
  263. return interceptor(ctx, in, info, handler)
  264. }
  265. func _AuthService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  266. in := new(AuthAuthenticateRequest)
  267. if err := dec(in); err != nil {
  268. return nil, err
  269. }
  270. if interceptor == nil {
  271. return srv.(AuthServiceServer).Authenticate(ctx, in)
  272. }
  273. info := &grpc.UnaryServerInfo{
  274. Server: srv,
  275. FullMethod: "/pb.AuthService/Authenticate",
  276. }
  277. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  278. return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthAuthenticateRequest))
  279. }
  280. return interceptor(ctx, in, info, handler)
  281. }
  282. var _AuthService_serviceDesc = grpc.ServiceDesc{
  283. ServiceName: "pb.AuthService",
  284. HandlerType: (*AuthServiceServer)(nil),
  285. Methods: []grpc.MethodDesc{
  286. {
  287. MethodName: "Status",
  288. Handler: _AuthService_Status_Handler,
  289. },
  290. {
  291. MethodName: "Authenticate",
  292. Handler: _AuthService_Authenticate_Handler,
  293. },
  294. },
  295. Streams: []grpc.StreamDesc{},
  296. Metadata: "auth.proto",
  297. }