base.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.23.0
  4. // protoc v3.11.3
  5. // source: base.proto
  6. package base
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  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. // This is a compile-time assertion that a sufficiently up-to-date version
  21. // of the legacy proto package is being used.
  22. const _ = proto.ProtoPackageIsVersion4
  23. type ErrorCode int32
  24. const (
  25. ErrorCode_OK ErrorCode = 0
  26. ErrorCode_TokenExpire ErrorCode = 1000
  27. )
  28. // Enum value maps for ErrorCode.
  29. var (
  30. ErrorCode_name = map[int32]string{
  31. 0: "OK",
  32. 1000: "TokenExpire",
  33. }
  34. ErrorCode_value = map[string]int32{
  35. "OK": 0,
  36. "TokenExpire": 1000,
  37. }
  38. )
  39. func (x ErrorCode) Enum() *ErrorCode {
  40. p := new(ErrorCode)
  41. *p = x
  42. return p
  43. }
  44. func (x ErrorCode) String() string {
  45. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  46. }
  47. func (ErrorCode) Descriptor() protoreflect.EnumDescriptor {
  48. return file_base_proto_enumTypes[0].Descriptor()
  49. }
  50. func (ErrorCode) Type() protoreflect.EnumType {
  51. return &file_base_proto_enumTypes[0]
  52. }
  53. func (x ErrorCode) Number() protoreflect.EnumNumber {
  54. return protoreflect.EnumNumber(x)
  55. }
  56. // Deprecated: Use ErrorCode.Descriptor instead.
  57. func (ErrorCode) EnumDescriptor() ([]byte, []int) {
  58. return file_base_proto_rawDescGZIP(), []int{0}
  59. }
  60. type DefaultRequest struct {
  61. state protoimpl.MessageState
  62. sizeCache protoimpl.SizeCache
  63. unknownFields protoimpl.UnknownFields
  64. }
  65. func (x *DefaultRequest) Reset() {
  66. *x = DefaultRequest{}
  67. if protoimpl.UnsafeEnabled {
  68. mi := &file_base_proto_msgTypes[0]
  69. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  70. ms.StoreMessageInfo(mi)
  71. }
  72. }
  73. func (x *DefaultRequest) String() string {
  74. return protoimpl.X.MessageStringOf(x)
  75. }
  76. func (*DefaultRequest) ProtoMessage() {}
  77. func (x *DefaultRequest) ProtoReflect() protoreflect.Message {
  78. mi := &file_base_proto_msgTypes[0]
  79. if protoimpl.UnsafeEnabled && x != nil {
  80. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  81. if ms.LoadMessageInfo() == nil {
  82. ms.StoreMessageInfo(mi)
  83. }
  84. return ms
  85. }
  86. return mi.MessageOf(x)
  87. }
  88. // Deprecated: Use DefaultRequest.ProtoReflect.Descriptor instead.
  89. func (*DefaultRequest) Descriptor() ([]byte, []int) {
  90. return file_base_proto_rawDescGZIP(), []int{0}
  91. }
  92. type DefaultReply struct {
  93. state protoimpl.MessageState
  94. sizeCache protoimpl.SizeCache
  95. unknownFields protoimpl.UnknownFields
  96. }
  97. func (x *DefaultReply) Reset() {
  98. *x = DefaultReply{}
  99. if protoimpl.UnsafeEnabled {
  100. mi := &file_base_proto_msgTypes[1]
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. ms.StoreMessageInfo(mi)
  103. }
  104. }
  105. func (x *DefaultReply) String() string {
  106. return protoimpl.X.MessageStringOf(x)
  107. }
  108. func (*DefaultReply) ProtoMessage() {}
  109. func (x *DefaultReply) ProtoReflect() protoreflect.Message {
  110. mi := &file_base_proto_msgTypes[1]
  111. if protoimpl.UnsafeEnabled && x != nil {
  112. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  113. if ms.LoadMessageInfo() == nil {
  114. ms.StoreMessageInfo(mi)
  115. }
  116. return ms
  117. }
  118. return mi.MessageOf(x)
  119. }
  120. // Deprecated: Use DefaultReply.ProtoReflect.Descriptor instead.
  121. func (*DefaultReply) Descriptor() ([]byte, []int) {
  122. return file_base_proto_rawDescGZIP(), []int{1}
  123. }
  124. type SignUpRequest struct {
  125. state protoimpl.MessageState
  126. sizeCache protoimpl.SizeCache
  127. unknownFields protoimpl.UnknownFields
  128. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  129. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  130. }
  131. func (x *SignUpRequest) Reset() {
  132. *x = SignUpRequest{}
  133. if protoimpl.UnsafeEnabled {
  134. mi := &file_base_proto_msgTypes[2]
  135. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  136. ms.StoreMessageInfo(mi)
  137. }
  138. }
  139. func (x *SignUpRequest) String() string {
  140. return protoimpl.X.MessageStringOf(x)
  141. }
  142. func (*SignUpRequest) ProtoMessage() {}
  143. func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
  144. mi := &file_base_proto_msgTypes[2]
  145. if protoimpl.UnsafeEnabled && x != nil {
  146. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  147. if ms.LoadMessageInfo() == nil {
  148. ms.StoreMessageInfo(mi)
  149. }
  150. return ms
  151. }
  152. return mi.MessageOf(x)
  153. }
  154. // Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
  155. func (*SignUpRequest) Descriptor() ([]byte, []int) {
  156. return file_base_proto_rawDescGZIP(), []int{2}
  157. }
  158. func (x *SignUpRequest) GetName() string {
  159. if x != nil {
  160. return x.Name
  161. }
  162. return ""
  163. }
  164. func (x *SignUpRequest) GetPassword() string {
  165. if x != nil {
  166. return x.Password
  167. }
  168. return ""
  169. }
  170. type SignInReply struct {
  171. state protoimpl.MessageState
  172. sizeCache protoimpl.SizeCache
  173. unknownFields protoimpl.UnknownFields
  174. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
  175. }
  176. func (x *SignInReply) Reset() {
  177. *x = SignInReply{}
  178. if protoimpl.UnsafeEnabled {
  179. mi := &file_base_proto_msgTypes[3]
  180. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  181. ms.StoreMessageInfo(mi)
  182. }
  183. }
  184. func (x *SignInReply) String() string {
  185. return protoimpl.X.MessageStringOf(x)
  186. }
  187. func (*SignInReply) ProtoMessage() {}
  188. func (x *SignInReply) ProtoReflect() protoreflect.Message {
  189. mi := &file_base_proto_msgTypes[3]
  190. if protoimpl.UnsafeEnabled && x != nil {
  191. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  192. if ms.LoadMessageInfo() == nil {
  193. ms.StoreMessageInfo(mi)
  194. }
  195. return ms
  196. }
  197. return mi.MessageOf(x)
  198. }
  199. // Deprecated: Use SignInReply.ProtoReflect.Descriptor instead.
  200. func (*SignInReply) Descriptor() ([]byte, []int) {
  201. return file_base_proto_rawDescGZIP(), []int{3}
  202. }
  203. func (x *SignInReply) GetToken() string {
  204. if x != nil {
  205. return x.Token
  206. }
  207. return ""
  208. }
  209. type SignInRequest struct {
  210. state protoimpl.MessageState
  211. sizeCache protoimpl.SizeCache
  212. unknownFields protoimpl.UnknownFields
  213. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  214. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  215. }
  216. func (x *SignInRequest) Reset() {
  217. *x = SignInRequest{}
  218. if protoimpl.UnsafeEnabled {
  219. mi := &file_base_proto_msgTypes[4]
  220. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  221. ms.StoreMessageInfo(mi)
  222. }
  223. }
  224. func (x *SignInRequest) String() string {
  225. return protoimpl.X.MessageStringOf(x)
  226. }
  227. func (*SignInRequest) ProtoMessage() {}
  228. func (x *SignInRequest) ProtoReflect() protoreflect.Message {
  229. mi := &file_base_proto_msgTypes[4]
  230. if protoimpl.UnsafeEnabled && x != nil {
  231. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  232. if ms.LoadMessageInfo() == nil {
  233. ms.StoreMessageInfo(mi)
  234. }
  235. return ms
  236. }
  237. return mi.MessageOf(x)
  238. }
  239. // Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
  240. func (*SignInRequest) Descriptor() ([]byte, []int) {
  241. return file_base_proto_rawDescGZIP(), []int{4}
  242. }
  243. func (x *SignInRequest) GetName() string {
  244. if x != nil {
  245. return x.Name
  246. }
  247. return ""
  248. }
  249. func (x *SignInRequest) GetPassword() string {
  250. if x != nil {
  251. return x.Password
  252. }
  253. return ""
  254. }
  255. var File_base_proto protoreflect.FileDescriptor
  256. var file_base_proto_rawDesc = []byte{
  257. 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x62, 0x61,
  258. 0x73, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71,
  259. 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52,
  260. 0x65, 0x70, 0x6c, 0x79, 0x22, 0x3f, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65,
  261. 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
  262. 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73,
  263. 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73,
  264. 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52,
  265. 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20,
  266. 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, 0x0d, 0x53, 0x69,
  267. 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
  268. 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
  269. 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
  270. 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2a, 0x25, 0x0a, 0x09, 0x45,
  271. 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00,
  272. 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x10,
  273. 0xe8, 0x07, 0x32, 0xa5, 0x01, 0x0a, 0x03, 0x41, 0x70, 0x69, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x69,
  274. 0x67, 0x6e, 0x55, 0x70, 0x12, 0x13, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e,
  275. 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x61, 0x73, 0x65,
  276. 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
  277. 0x32, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12, 0x13, 0x2e, 0x62, 0x61, 0x73, 0x65,
  278. 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
  279. 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6c,
  280. 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x12, 0x14,
  281. 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71,
  282. 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x61,
  283. 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
  284. 0x6f, 0x33,
  285. }
  286. var (
  287. file_base_proto_rawDescOnce sync.Once
  288. file_base_proto_rawDescData = file_base_proto_rawDesc
  289. )
  290. func file_base_proto_rawDescGZIP() []byte {
  291. file_base_proto_rawDescOnce.Do(func() {
  292. file_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_base_proto_rawDescData)
  293. })
  294. return file_base_proto_rawDescData
  295. }
  296. var file_base_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  297. var file_base_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  298. var file_base_proto_goTypes = []interface{}{
  299. (ErrorCode)(0), // 0: base.ErrorCode
  300. (*DefaultRequest)(nil), // 1: base.DefaultRequest
  301. (*DefaultReply)(nil), // 2: base.DefaultReply
  302. (*SignUpRequest)(nil), // 3: base.SignUpRequest
  303. (*SignInReply)(nil), // 4: base.SignInReply
  304. (*SignInRequest)(nil), // 5: base.SignInRequest
  305. }
  306. var file_base_proto_depIdxs = []int32{
  307. 3, // 0: base.Api.SignUp:input_type -> base.SignUpRequest
  308. 5, // 1: base.Api.SignIn:input_type -> base.SignInRequest
  309. 1, // 2: base.Api.SignOut:input_type -> base.DefaultRequest
  310. 2, // 3: base.Api.SignUp:output_type -> base.DefaultReply
  311. 4, // 4: base.Api.SignIn:output_type -> base.SignInReply
  312. 2, // 5: base.Api.SignOut:output_type -> base.DefaultReply
  313. 3, // [3:6] is the sub-list for method output_type
  314. 0, // [0:3] is the sub-list for method input_type
  315. 0, // [0:0] is the sub-list for extension type_name
  316. 0, // [0:0] is the sub-list for extension extendee
  317. 0, // [0:0] is the sub-list for field type_name
  318. }
  319. func init() { file_base_proto_init() }
  320. func file_base_proto_init() {
  321. if File_base_proto != nil {
  322. return
  323. }
  324. if !protoimpl.UnsafeEnabled {
  325. file_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  326. switch v := v.(*DefaultRequest); i {
  327. case 0:
  328. return &v.state
  329. case 1:
  330. return &v.sizeCache
  331. case 2:
  332. return &v.unknownFields
  333. default:
  334. return nil
  335. }
  336. }
  337. file_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  338. switch v := v.(*DefaultReply); i {
  339. case 0:
  340. return &v.state
  341. case 1:
  342. return &v.sizeCache
  343. case 2:
  344. return &v.unknownFields
  345. default:
  346. return nil
  347. }
  348. }
  349. file_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  350. switch v := v.(*SignUpRequest); i {
  351. case 0:
  352. return &v.state
  353. case 1:
  354. return &v.sizeCache
  355. case 2:
  356. return &v.unknownFields
  357. default:
  358. return nil
  359. }
  360. }
  361. file_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  362. switch v := v.(*SignInReply); i {
  363. case 0:
  364. return &v.state
  365. case 1:
  366. return &v.sizeCache
  367. case 2:
  368. return &v.unknownFields
  369. default:
  370. return nil
  371. }
  372. }
  373. file_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  374. switch v := v.(*SignInRequest); i {
  375. case 0:
  376. return &v.state
  377. case 1:
  378. return &v.sizeCache
  379. case 2:
  380. return &v.unknownFields
  381. default:
  382. return nil
  383. }
  384. }
  385. }
  386. type x struct{}
  387. out := protoimpl.TypeBuilder{
  388. File: protoimpl.DescBuilder{
  389. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  390. RawDescriptor: file_base_proto_rawDesc,
  391. NumEnums: 1,
  392. NumMessages: 5,
  393. NumExtensions: 0,
  394. NumServices: 1,
  395. },
  396. GoTypes: file_base_proto_goTypes,
  397. DependencyIndexes: file_base_proto_depIdxs,
  398. EnumInfos: file_base_proto_enumTypes,
  399. MessageInfos: file_base_proto_msgTypes,
  400. }.Build()
  401. File_base_proto = out.File
  402. file_base_proto_rawDesc = nil
  403. file_base_proto_goTypes = nil
  404. file_base_proto_depIdxs = nil
  405. }