auth.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.26.0
  4. // protoc v3.12.4
  5. // source: auth.proto
  6. package pb
  7. import (
  8. _ "google.golang.org/genproto/googleapis/api/annotations"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. type AuthStatusRequest struct {
  21. state protoimpl.MessageState
  22. sizeCache protoimpl.SizeCache
  23. unknownFields protoimpl.UnknownFields
  24. }
  25. func (x *AuthStatusRequest) Reset() {
  26. *x = AuthStatusRequest{}
  27. if protoimpl.UnsafeEnabled {
  28. mi := &file_auth_proto_msgTypes[0]
  29. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  30. ms.StoreMessageInfo(mi)
  31. }
  32. }
  33. func (x *AuthStatusRequest) String() string {
  34. return protoimpl.X.MessageStringOf(x)
  35. }
  36. func (*AuthStatusRequest) ProtoMessage() {}
  37. func (x *AuthStatusRequest) ProtoReflect() protoreflect.Message {
  38. mi := &file_auth_proto_msgTypes[0]
  39. if protoimpl.UnsafeEnabled && x != nil {
  40. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  41. if ms.LoadMessageInfo() == nil {
  42. ms.StoreMessageInfo(mi)
  43. }
  44. return ms
  45. }
  46. return mi.MessageOf(x)
  47. }
  48. // Deprecated: Use AuthStatusRequest.ProtoReflect.Descriptor instead.
  49. func (*AuthStatusRequest) Descriptor() ([]byte, []int) {
  50. return file_auth_proto_rawDescGZIP(), []int{0}
  51. }
  52. type AuthAuthenticateRequest struct {
  53. state protoimpl.MessageState
  54. sizeCache protoimpl.SizeCache
  55. unknownFields protoimpl.UnknownFields
  56. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  57. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  58. }
  59. func (x *AuthAuthenticateRequest) Reset() {
  60. *x = AuthAuthenticateRequest{}
  61. if protoimpl.UnsafeEnabled {
  62. mi := &file_auth_proto_msgTypes[1]
  63. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  64. ms.StoreMessageInfo(mi)
  65. }
  66. }
  67. func (x *AuthAuthenticateRequest) String() string {
  68. return protoimpl.X.MessageStringOf(x)
  69. }
  70. func (*AuthAuthenticateRequest) ProtoMessage() {}
  71. func (x *AuthAuthenticateRequest) ProtoReflect() protoreflect.Message {
  72. mi := &file_auth_proto_msgTypes[1]
  73. if protoimpl.UnsafeEnabled && x != nil {
  74. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  75. if ms.LoadMessageInfo() == nil {
  76. ms.StoreMessageInfo(mi)
  77. }
  78. return ms
  79. }
  80. return mi.MessageOf(x)
  81. }
  82. // Deprecated: Use AuthAuthenticateRequest.ProtoReflect.Descriptor instead.
  83. func (*AuthAuthenticateRequest) Descriptor() ([]byte, []int) {
  84. return file_auth_proto_rawDescGZIP(), []int{1}
  85. }
  86. func (x *AuthAuthenticateRequest) GetUsername() string {
  87. if x != nil {
  88. return x.Username
  89. }
  90. return ""
  91. }
  92. func (x *AuthAuthenticateRequest) GetPassword() string {
  93. if x != nil {
  94. return x.Password
  95. }
  96. return ""
  97. }
  98. type AuthStatusResponse struct {
  99. state protoimpl.MessageState
  100. sizeCache protoimpl.SizeCache
  101. unknownFields protoimpl.UnknownFields
  102. User *UserResponse_User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
  103. IsRoot bool `protobuf:"varint,2,opt,name=is_root,json=isRoot,proto3" json:"is_root,omitempty"`
  104. }
  105. func (x *AuthStatusResponse) Reset() {
  106. *x = AuthStatusResponse{}
  107. if protoimpl.UnsafeEnabled {
  108. mi := &file_auth_proto_msgTypes[2]
  109. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  110. ms.StoreMessageInfo(mi)
  111. }
  112. }
  113. func (x *AuthStatusResponse) String() string {
  114. return protoimpl.X.MessageStringOf(x)
  115. }
  116. func (*AuthStatusResponse) ProtoMessage() {}
  117. func (x *AuthStatusResponse) ProtoReflect() protoreflect.Message {
  118. mi := &file_auth_proto_msgTypes[2]
  119. if protoimpl.UnsafeEnabled && x != nil {
  120. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  121. if ms.LoadMessageInfo() == nil {
  122. ms.StoreMessageInfo(mi)
  123. }
  124. return ms
  125. }
  126. return mi.MessageOf(x)
  127. }
  128. // Deprecated: Use AuthStatusResponse.ProtoReflect.Descriptor instead.
  129. func (*AuthStatusResponse) Descriptor() ([]byte, []int) {
  130. return file_auth_proto_rawDescGZIP(), []int{2}
  131. }
  132. func (x *AuthStatusResponse) GetUser() *UserResponse_User {
  133. if x != nil {
  134. return x.User
  135. }
  136. return nil
  137. }
  138. func (x *AuthStatusResponse) GetIsRoot() bool {
  139. if x != nil {
  140. return x.IsRoot
  141. }
  142. return false
  143. }
  144. type AuthAuthenticateResponse struct {
  145. state protoimpl.MessageState
  146. sizeCache protoimpl.SizeCache
  147. unknownFields protoimpl.UnknownFields
  148. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
  149. }
  150. func (x *AuthAuthenticateResponse) Reset() {
  151. *x = AuthAuthenticateResponse{}
  152. if protoimpl.UnsafeEnabled {
  153. mi := &file_auth_proto_msgTypes[3]
  154. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  155. ms.StoreMessageInfo(mi)
  156. }
  157. }
  158. func (x *AuthAuthenticateResponse) String() string {
  159. return protoimpl.X.MessageStringOf(x)
  160. }
  161. func (*AuthAuthenticateResponse) ProtoMessage() {}
  162. func (x *AuthAuthenticateResponse) ProtoReflect() protoreflect.Message {
  163. mi := &file_auth_proto_msgTypes[3]
  164. if protoimpl.UnsafeEnabled && x != nil {
  165. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  166. if ms.LoadMessageInfo() == nil {
  167. ms.StoreMessageInfo(mi)
  168. }
  169. return ms
  170. }
  171. return mi.MessageOf(x)
  172. }
  173. // Deprecated: Use AuthAuthenticateResponse.ProtoReflect.Descriptor instead.
  174. func (*AuthAuthenticateResponse) Descriptor() ([]byte, []int) {
  175. return file_auth_proto_rawDescGZIP(), []int{3}
  176. }
  177. func (x *AuthAuthenticateResponse) GetToken() string {
  178. if x != nil {
  179. return x.Token
  180. }
  181. return ""
  182. }
  183. var File_auth_proto protoreflect.FileDescriptor
  184. var file_auth_proto_rawDesc = []byte{
  185. 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
  186. 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,
  187. 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
  188. 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x75,
  189. 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
  190. 0x51, 0x0a, 0x17, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
  191. 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
  192. 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
  193. 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
  194. 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
  195. 0x72, 0x64, 0x22, 0x58, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
  196. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
  197. 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
  198. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75,
  199. 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02,
  200. 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x30, 0x0a, 0x18,
  201. 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65,
  202. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
  203. 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xd4,
  204. 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54,
  205. 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75,
  206. 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
  207. 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
  208. 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12,
  209. 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x74,
  210. 0x61, 0x74, 0x75, 0x73, 0x12, 0x6f, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
  211. 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75,
  212. 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
  213. 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x65,
  214. 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
  215. 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
  216. 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
  217. 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x1c, 0x5a, 0x1a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
  218. 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x61, 0x64, 0x2f, 0x6f, 0x76, 0x70, 0x6d, 0x2f, 0x61, 0x70, 0x69,
  219. 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  220. }
  221. var (
  222. file_auth_proto_rawDescOnce sync.Once
  223. file_auth_proto_rawDescData = file_auth_proto_rawDesc
  224. )
  225. func file_auth_proto_rawDescGZIP() []byte {
  226. file_auth_proto_rawDescOnce.Do(func() {
  227. file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData)
  228. })
  229. return file_auth_proto_rawDescData
  230. }
  231. var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  232. var file_auth_proto_goTypes = []interface{}{
  233. (*AuthStatusRequest)(nil), // 0: pb.AuthStatusRequest
  234. (*AuthAuthenticateRequest)(nil), // 1: pb.AuthAuthenticateRequest
  235. (*AuthStatusResponse)(nil), // 2: pb.AuthStatusResponse
  236. (*AuthAuthenticateResponse)(nil), // 3: pb.AuthAuthenticateResponse
  237. (*UserResponse_User)(nil), // 4: pb.UserResponse.User
  238. }
  239. var file_auth_proto_depIdxs = []int32{
  240. 4, // 0: pb.AuthStatusResponse.user:type_name -> pb.UserResponse.User
  241. 0, // 1: pb.AuthService.Status:input_type -> pb.AuthStatusRequest
  242. 1, // 2: pb.AuthService.Authenticate:input_type -> pb.AuthAuthenticateRequest
  243. 2, // 3: pb.AuthService.Status:output_type -> pb.AuthStatusResponse
  244. 3, // 4: pb.AuthService.Authenticate:output_type -> pb.AuthAuthenticateResponse
  245. 3, // [3:5] is the sub-list for method output_type
  246. 1, // [1:3] is the sub-list for method input_type
  247. 1, // [1:1] is the sub-list for extension type_name
  248. 1, // [1:1] is the sub-list for extension extendee
  249. 0, // [0:1] is the sub-list for field type_name
  250. }
  251. func init() { file_auth_proto_init() }
  252. func file_auth_proto_init() {
  253. if File_auth_proto != nil {
  254. return
  255. }
  256. file_user_proto_init()
  257. if !protoimpl.UnsafeEnabled {
  258. file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  259. switch v := v.(*AuthStatusRequest); i {
  260. case 0:
  261. return &v.state
  262. case 1:
  263. return &v.sizeCache
  264. case 2:
  265. return &v.unknownFields
  266. default:
  267. return nil
  268. }
  269. }
  270. file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  271. switch v := v.(*AuthAuthenticateRequest); i {
  272. case 0:
  273. return &v.state
  274. case 1:
  275. return &v.sizeCache
  276. case 2:
  277. return &v.unknownFields
  278. default:
  279. return nil
  280. }
  281. }
  282. file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  283. switch v := v.(*AuthStatusResponse); i {
  284. case 0:
  285. return &v.state
  286. case 1:
  287. return &v.sizeCache
  288. case 2:
  289. return &v.unknownFields
  290. default:
  291. return nil
  292. }
  293. }
  294. file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  295. switch v := v.(*AuthAuthenticateResponse); i {
  296. case 0:
  297. return &v.state
  298. case 1:
  299. return &v.sizeCache
  300. case 2:
  301. return &v.unknownFields
  302. default:
  303. return nil
  304. }
  305. }
  306. }
  307. type x struct{}
  308. out := protoimpl.TypeBuilder{
  309. File: protoimpl.DescBuilder{
  310. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  311. RawDescriptor: file_auth_proto_rawDesc,
  312. NumEnums: 0,
  313. NumMessages: 4,
  314. NumExtensions: 0,
  315. NumServices: 1,
  316. },
  317. GoTypes: file_auth_proto_goTypes,
  318. DependencyIndexes: file_auth_proto_depIdxs,
  319. MessageInfos: file_auth_proto_msgTypes,
  320. }.Build()
  321. File_auth_proto = out.File
  322. file_auth_proto_rawDesc = nil
  323. file_auth_proto_goTypes = nil
  324. file_auth_proto_depIdxs = nil
  325. }