auth.pb.go 12 KB

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