golang-im聊天
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

971 行
31 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.26.0
  4. // protoc v3.14.0
  5. // source: business.ext.proto_back
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  13. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  14. reflect "reflect"
  15. sync "sync"
  16. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type SignInReq struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. PhoneNumber string `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // 手机号
  28. Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 验证码
  29. DeviceId int64 `protobuf:"varint,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // 设备id
  30. MasterId int64 `protobuf:"varint,4,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // 站长id
  31. }
  32. func (x *SignInReq) Reset() {
  33. *x = SignInReq{}
  34. if protoimpl.UnsafeEnabled {
  35. mi := &file_business_ext_proto_msgTypes[0]
  36. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  37. ms.StoreMessageInfo(mi)
  38. }
  39. }
  40. func (x *SignInReq) String() string {
  41. return protoimpl.X.MessageStringOf(x)
  42. }
  43. func (*SignInReq) ProtoMessage() {}
  44. func (x *SignInReq) ProtoReflect() protoreflect.Message {
  45. mi := &file_business_ext_proto_msgTypes[0]
  46. if protoimpl.UnsafeEnabled && x != nil {
  47. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  48. if ms.LoadMessageInfo() == nil {
  49. ms.StoreMessageInfo(mi)
  50. }
  51. return ms
  52. }
  53. return mi.MessageOf(x)
  54. }
  55. // Deprecated: Use SignInReq.ProtoReflect.Descriptor instead.
  56. func (*SignInReq) Descriptor() ([]byte, []int) {
  57. return file_business_ext_proto_rawDescGZIP(), []int{0}
  58. }
  59. func (x *SignInReq) GetPhoneNumber() string {
  60. if x != nil {
  61. return x.PhoneNumber
  62. }
  63. return ""
  64. }
  65. func (x *SignInReq) GetCode() string {
  66. if x != nil {
  67. return x.Code
  68. }
  69. return ""
  70. }
  71. func (x *SignInReq) GetDeviceId() int64 {
  72. if x != nil {
  73. return x.DeviceId
  74. }
  75. return 0
  76. }
  77. func (x *SignInReq) GetMasterId() int64 {
  78. if x != nil {
  79. return x.MasterId
  80. }
  81. return 0
  82. }
  83. type SignInResp struct {
  84. state protoimpl.MessageState
  85. sizeCache protoimpl.SizeCache
  86. unknownFields protoimpl.UnknownFields
  87. IsNew bool `protobuf:"varint,1,opt,name=is_new,json=isNew,proto3" json:"is_new,omitempty"` // 是否是新用户
  88. UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户id
  89. Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` // token
  90. MasterId int64 `protobuf:"varint,4,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // 站长id
  91. }
  92. func (x *SignInResp) Reset() {
  93. *x = SignInResp{}
  94. if protoimpl.UnsafeEnabled {
  95. mi := &file_business_ext_proto_msgTypes[1]
  96. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  97. ms.StoreMessageInfo(mi)
  98. }
  99. }
  100. func (x *SignInResp) String() string {
  101. return protoimpl.X.MessageStringOf(x)
  102. }
  103. func (*SignInResp) ProtoMessage() {}
  104. func (x *SignInResp) ProtoReflect() protoreflect.Message {
  105. mi := &file_business_ext_proto_msgTypes[1]
  106. if protoimpl.UnsafeEnabled && x != nil {
  107. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  108. if ms.LoadMessageInfo() == nil {
  109. ms.StoreMessageInfo(mi)
  110. }
  111. return ms
  112. }
  113. return mi.MessageOf(x)
  114. }
  115. // Deprecated: Use SignInResp.ProtoReflect.Descriptor instead.
  116. func (*SignInResp) Descriptor() ([]byte, []int) {
  117. return file_business_ext_proto_rawDescGZIP(), []int{1}
  118. }
  119. func (x *SignInResp) GetIsNew() bool {
  120. if x != nil {
  121. return x.IsNew
  122. }
  123. return false
  124. }
  125. func (x *SignInResp) GetUserId() int64 {
  126. if x != nil {
  127. return x.UserId
  128. }
  129. return 0
  130. }
  131. func (x *SignInResp) GetToken() string {
  132. if x != nil {
  133. return x.Token
  134. }
  135. return ""
  136. }
  137. func (x *SignInResp) GetMasterId() int64 {
  138. if x != nil {
  139. return x.MasterId
  140. }
  141. return 0
  142. }
  143. type User struct {
  144. state protoimpl.MessageState
  145. sizeCache protoimpl.SizeCache
  146. unknownFields protoimpl.UnknownFields
  147. UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户id
  148. Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称
  149. Sex int32 `protobuf:"varint,3,opt,name=sex,proto3" json:"sex,omitempty"` // 性别
  150. AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // 头像地址
  151. Extra string `protobuf:"bytes,5,opt,name=extra,proto3" json:"extra,omitempty"` // 附加字段
  152. CreateTime int64 `protobuf:"varint,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间
  153. UpdateTime int64 `protobuf:"varint,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // 更新时间
  154. MasterId int64 `protobuf:"varint,8,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"` // 更新时间
  155. }
  156. func (x *User) Reset() {
  157. *x = User{}
  158. if protoimpl.UnsafeEnabled {
  159. mi := &file_business_ext_proto_msgTypes[2]
  160. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  161. ms.StoreMessageInfo(mi)
  162. }
  163. }
  164. func (x *User) String() string {
  165. return protoimpl.X.MessageStringOf(x)
  166. }
  167. func (*User) ProtoMessage() {}
  168. func (x *User) ProtoReflect() protoreflect.Message {
  169. mi := &file_business_ext_proto_msgTypes[2]
  170. if protoimpl.UnsafeEnabled && x != nil {
  171. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  172. if ms.LoadMessageInfo() == nil {
  173. ms.StoreMessageInfo(mi)
  174. }
  175. return ms
  176. }
  177. return mi.MessageOf(x)
  178. }
  179. // Deprecated: Use User.ProtoReflect.Descriptor instead.
  180. func (*User) Descriptor() ([]byte, []int) {
  181. return file_business_ext_proto_rawDescGZIP(), []int{2}
  182. }
  183. func (x *User) GetUserId() int64 {
  184. if x != nil {
  185. return x.UserId
  186. }
  187. return 0
  188. }
  189. func (x *User) GetNickname() string {
  190. if x != nil {
  191. return x.Nickname
  192. }
  193. return ""
  194. }
  195. func (x *User) GetSex() int32 {
  196. if x != nil {
  197. return x.Sex
  198. }
  199. return 0
  200. }
  201. func (x *User) GetAvatarUrl() string {
  202. if x != nil {
  203. return x.AvatarUrl
  204. }
  205. return ""
  206. }
  207. func (x *User) GetExtra() string {
  208. if x != nil {
  209. return x.Extra
  210. }
  211. return ""
  212. }
  213. func (x *User) GetCreateTime() int64 {
  214. if x != nil {
  215. return x.CreateTime
  216. }
  217. return 0
  218. }
  219. func (x *User) GetUpdateTime() int64 {
  220. if x != nil {
  221. return x.UpdateTime
  222. }
  223. return 0
  224. }
  225. func (x *User) GetMasterId() int64 {
  226. if x != nil {
  227. return x.MasterId
  228. }
  229. return 0
  230. }
  231. type GetUserReq struct {
  232. state protoimpl.MessageState
  233. sizeCache protoimpl.SizeCache
  234. unknownFields protoimpl.UnknownFields
  235. UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户id
  236. }
  237. func (x *GetUserReq) Reset() {
  238. *x = GetUserReq{}
  239. if protoimpl.UnsafeEnabled {
  240. mi := &file_business_ext_proto_msgTypes[3]
  241. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  242. ms.StoreMessageInfo(mi)
  243. }
  244. }
  245. func (x *GetUserReq) String() string {
  246. return protoimpl.X.MessageStringOf(x)
  247. }
  248. func (*GetUserReq) ProtoMessage() {}
  249. func (x *GetUserReq) ProtoReflect() protoreflect.Message {
  250. mi := &file_business_ext_proto_msgTypes[3]
  251. if protoimpl.UnsafeEnabled && x != nil {
  252. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  253. if ms.LoadMessageInfo() == nil {
  254. ms.StoreMessageInfo(mi)
  255. }
  256. return ms
  257. }
  258. return mi.MessageOf(x)
  259. }
  260. // Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead.
  261. func (*GetUserReq) Descriptor() ([]byte, []int) {
  262. return file_business_ext_proto_rawDescGZIP(), []int{3}
  263. }
  264. func (x *GetUserReq) GetUserId() int64 {
  265. if x != nil {
  266. return x.UserId
  267. }
  268. return 0
  269. }
  270. type GetUserResp struct {
  271. state protoimpl.MessageState
  272. sizeCache protoimpl.SizeCache
  273. unknownFields protoimpl.UnknownFields
  274. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 用户信息
  275. }
  276. func (x *GetUserResp) Reset() {
  277. *x = GetUserResp{}
  278. if protoimpl.UnsafeEnabled {
  279. mi := &file_business_ext_proto_msgTypes[4]
  280. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  281. ms.StoreMessageInfo(mi)
  282. }
  283. }
  284. func (x *GetUserResp) String() string {
  285. return protoimpl.X.MessageStringOf(x)
  286. }
  287. func (*GetUserResp) ProtoMessage() {}
  288. func (x *GetUserResp) ProtoReflect() protoreflect.Message {
  289. mi := &file_business_ext_proto_msgTypes[4]
  290. if protoimpl.UnsafeEnabled && x != nil {
  291. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  292. if ms.LoadMessageInfo() == nil {
  293. ms.StoreMessageInfo(mi)
  294. }
  295. return ms
  296. }
  297. return mi.MessageOf(x)
  298. }
  299. // Deprecated: Use GetUserResp.ProtoReflect.Descriptor instead.
  300. func (*GetUserResp) Descriptor() ([]byte, []int) {
  301. return file_business_ext_proto_rawDescGZIP(), []int{4}
  302. }
  303. func (x *GetUserResp) GetUser() *User {
  304. if x != nil {
  305. return x.User
  306. }
  307. return nil
  308. }
  309. type UpdateUserReq struct {
  310. state protoimpl.MessageState
  311. sizeCache protoimpl.SizeCache
  312. unknownFields protoimpl.UnknownFields
  313. Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称
  314. Sex int32 `protobuf:"varint,2,opt,name=sex,proto3" json:"sex,omitempty"` // 性别
  315. AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // 头像地址
  316. Extra string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` // 附加字段
  317. }
  318. func (x *UpdateUserReq) Reset() {
  319. *x = UpdateUserReq{}
  320. if protoimpl.UnsafeEnabled {
  321. mi := &file_business_ext_proto_msgTypes[5]
  322. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  323. ms.StoreMessageInfo(mi)
  324. }
  325. }
  326. func (x *UpdateUserReq) String() string {
  327. return protoimpl.X.MessageStringOf(x)
  328. }
  329. func (*UpdateUserReq) ProtoMessage() {}
  330. func (x *UpdateUserReq) ProtoReflect() protoreflect.Message {
  331. mi := &file_business_ext_proto_msgTypes[5]
  332. if protoimpl.UnsafeEnabled && x != nil {
  333. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  334. if ms.LoadMessageInfo() == nil {
  335. ms.StoreMessageInfo(mi)
  336. }
  337. return ms
  338. }
  339. return mi.MessageOf(x)
  340. }
  341. // Deprecated: Use UpdateUserReq.ProtoReflect.Descriptor instead.
  342. func (*UpdateUserReq) Descriptor() ([]byte, []int) {
  343. return file_business_ext_proto_rawDescGZIP(), []int{5}
  344. }
  345. func (x *UpdateUserReq) GetNickname() string {
  346. if x != nil {
  347. return x.Nickname
  348. }
  349. return ""
  350. }
  351. func (x *UpdateUserReq) GetSex() int32 {
  352. if x != nil {
  353. return x.Sex
  354. }
  355. return 0
  356. }
  357. func (x *UpdateUserReq) GetAvatarUrl() string {
  358. if x != nil {
  359. return x.AvatarUrl
  360. }
  361. return ""
  362. }
  363. func (x *UpdateUserReq) GetExtra() string {
  364. if x != nil {
  365. return x.Extra
  366. }
  367. return ""
  368. }
  369. type SearchUserReq struct {
  370. state protoimpl.MessageState
  371. sizeCache protoimpl.SizeCache
  372. unknownFields protoimpl.UnknownFields
  373. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  374. MasterId int64 `protobuf:"varint,2,opt,name=master_id,json=masterId,proto3" json:"master_id,omitempty"`
  375. }
  376. func (x *SearchUserReq) Reset() {
  377. *x = SearchUserReq{}
  378. if protoimpl.UnsafeEnabled {
  379. mi := &file_business_ext_proto_msgTypes[6]
  380. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  381. ms.StoreMessageInfo(mi)
  382. }
  383. }
  384. func (x *SearchUserReq) String() string {
  385. return protoimpl.X.MessageStringOf(x)
  386. }
  387. func (*SearchUserReq) ProtoMessage() {}
  388. func (x *SearchUserReq) ProtoReflect() protoreflect.Message {
  389. mi := &file_business_ext_proto_msgTypes[6]
  390. if protoimpl.UnsafeEnabled && x != nil {
  391. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  392. if ms.LoadMessageInfo() == nil {
  393. ms.StoreMessageInfo(mi)
  394. }
  395. return ms
  396. }
  397. return mi.MessageOf(x)
  398. }
  399. // Deprecated: Use SearchUserReq.ProtoReflect.Descriptor instead.
  400. func (*SearchUserReq) Descriptor() ([]byte, []int) {
  401. return file_business_ext_proto_rawDescGZIP(), []int{6}
  402. }
  403. func (x *SearchUserReq) GetKey() string {
  404. if x != nil {
  405. return x.Key
  406. }
  407. return ""
  408. }
  409. func (x *SearchUserReq) GetMasterId() int64 {
  410. if x != nil {
  411. return x.MasterId
  412. }
  413. return 0
  414. }
  415. type SearchUserResp struct {
  416. state protoimpl.MessageState
  417. sizeCache protoimpl.SizeCache
  418. unknownFields protoimpl.UnknownFields
  419. Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
  420. }
  421. func (x *SearchUserResp) Reset() {
  422. *x = SearchUserResp{}
  423. if protoimpl.UnsafeEnabled {
  424. mi := &file_business_ext_proto_msgTypes[7]
  425. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  426. ms.StoreMessageInfo(mi)
  427. }
  428. }
  429. func (x *SearchUserResp) String() string {
  430. return protoimpl.X.MessageStringOf(x)
  431. }
  432. func (*SearchUserResp) ProtoMessage() {}
  433. func (x *SearchUserResp) ProtoReflect() protoreflect.Message {
  434. mi := &file_business_ext_proto_msgTypes[7]
  435. if protoimpl.UnsafeEnabled && x != nil {
  436. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  437. if ms.LoadMessageInfo() == nil {
  438. ms.StoreMessageInfo(mi)
  439. }
  440. return ms
  441. }
  442. return mi.MessageOf(x)
  443. }
  444. // Deprecated: Use SearchUserResp.ProtoReflect.Descriptor instead.
  445. func (*SearchUserResp) Descriptor() ([]byte, []int) {
  446. return file_business_ext_proto_rawDescGZIP(), []int{7}
  447. }
  448. func (x *SearchUserResp) GetUsers() []*User {
  449. if x != nil {
  450. return x.Users
  451. }
  452. return nil
  453. }
  454. var File_business_ext_proto protoreflect.FileDescriptor
  455. var file_business_ext_proto_rawDesc = []byte{
  456. 0x0a, 0x12, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70,
  457. 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  458. 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x09, 0x53, 0x69,
  459. 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65,
  460. 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70,
  461. 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
  462. 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1b,
  463. 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
  464. 0x03, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
  465. 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
  466. 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e,
  467. 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x77,
  468. 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x17, 0x0a,
  469. 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
  470. 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
  471. 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09,
  472. 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
  473. 0x08, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x04, 0x55, 0x73,
  474. 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
  475. 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e,
  476. 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
  477. 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x03,
  478. 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61,
  479. 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
  480. 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72,
  481. 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1f,
  482. 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20,
  483. 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
  484. 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07,
  485. 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
  486. 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20,
  487. 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x25, 0x0a,
  488. 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x75,
  489. 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
  490. 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
  491. 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
  492. 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65,
  493. 0x72, 0x22, 0x72, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
  494. 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
  495. 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10,
  496. 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x65, 0x78,
  497. 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03,
  498. 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12,
  499. 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
  500. 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x3e, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55,
  501. 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
  502. 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x73, 0x74,
  503. 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x73,
  504. 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55,
  505. 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73,
  506. 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
  507. 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x32, 0xc3, 0x01, 0x0a, 0x0b, 0x42, 0x75, 0x73, 0x69,
  508. 0x6e, 0x65, 0x73, 0x73, 0x45, 0x78, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x49,
  509. 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71,
  510. 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70,
  511. 0x12, 0x2a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x70, 0x62,
  512. 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62,
  513. 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x0a,
  514. 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e,
  515. 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e,
  516. 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x72,
  517. 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x61, 0x72,
  518. 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53,
  519. 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a,
  520. 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72,
  521. 0x6f, 0x74, 0x6f, 0x33,
  522. }
  523. var (
  524. file_business_ext_proto_rawDescOnce sync.Once
  525. file_business_ext_proto_rawDescData = file_business_ext_proto_rawDesc
  526. )
  527. func file_business_ext_proto_rawDescGZIP() []byte {
  528. file_business_ext_proto_rawDescOnce.Do(func() {
  529. file_business_ext_proto_rawDescData = protoimpl.X.CompressGZIP(file_business_ext_proto_rawDescData)
  530. })
  531. return file_business_ext_proto_rawDescData
  532. }
  533. var file_business_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
  534. var file_business_ext_proto_goTypes = []interface{}{
  535. (*SignInReq)(nil), // 0: pb.SignInReq
  536. (*SignInResp)(nil), // 1: pb.SignInResp
  537. (*User)(nil), // 2: pb.User
  538. (*GetUserReq)(nil), // 3: pb.GetUserReq
  539. (*GetUserResp)(nil), // 4: pb.GetUserResp
  540. (*UpdateUserReq)(nil), // 5: pb.UpdateUserReq
  541. (*SearchUserReq)(nil), // 6: pb.SearchUserReq
  542. (*SearchUserResp)(nil), // 7: pb.SearchUserResp
  543. (*Empty)(nil), // 8: pb.Empty
  544. }
  545. var file_business_ext_proto_depIdxs = []int32{
  546. 2, // 0: pb.GetUserResp.user:type_name -> pb.User
  547. 2, // 1: pb.SearchUserResp.users:type_name -> pb.User
  548. 0, // 2: pb.BusinessExt.SignIn:input_type -> pb.SignInReq
  549. 3, // 3: pb.BusinessExt.GetUser:input_type -> pb.GetUserReq
  550. 5, // 4: pb.BusinessExt.UpdateUser:input_type -> pb.UpdateUserReq
  551. 6, // 5: pb.BusinessExt.SearchUser:input_type -> pb.SearchUserReq
  552. 1, // 6: pb.BusinessExt.SignIn:output_type -> pb.SignInResp
  553. 4, // 7: pb.BusinessExt.GetUser:output_type -> pb.GetUserResp
  554. 8, // 8: pb.BusinessExt.UpdateUser:output_type -> pb.Empty
  555. 7, // 9: pb.BusinessExt.SearchUser:output_type -> pb.SearchUserResp
  556. 6, // [6:10] is the sub-list for method output_type
  557. 2, // [2:6] is the sub-list for method input_type
  558. 2, // [2:2] is the sub-list for extension type_name
  559. 2, // [2:2] is the sub-list for extension extendee
  560. 0, // [0:2] is the sub-list for field type_name
  561. }
  562. func init() { file_business_ext_proto_init() }
  563. func file_business_ext_proto_init() {
  564. if File_business_ext_proto != nil {
  565. return
  566. }
  567. file_common_ext_proto_init()
  568. if !protoimpl.UnsafeEnabled {
  569. file_business_ext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  570. switch v := v.(*SignInReq); i {
  571. case 0:
  572. return &v.state
  573. case 1:
  574. return &v.sizeCache
  575. case 2:
  576. return &v.unknownFields
  577. default:
  578. return nil
  579. }
  580. }
  581. file_business_ext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  582. switch v := v.(*SignInResp); i {
  583. case 0:
  584. return &v.state
  585. case 1:
  586. return &v.sizeCache
  587. case 2:
  588. return &v.unknownFields
  589. default:
  590. return nil
  591. }
  592. }
  593. file_business_ext_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  594. switch v := v.(*User); i {
  595. case 0:
  596. return &v.state
  597. case 1:
  598. return &v.sizeCache
  599. case 2:
  600. return &v.unknownFields
  601. default:
  602. return nil
  603. }
  604. }
  605. file_business_ext_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  606. switch v := v.(*GetUserReq); i {
  607. case 0:
  608. return &v.state
  609. case 1:
  610. return &v.sizeCache
  611. case 2:
  612. return &v.unknownFields
  613. default:
  614. return nil
  615. }
  616. }
  617. file_business_ext_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  618. switch v := v.(*GetUserResp); i {
  619. case 0:
  620. return &v.state
  621. case 1:
  622. return &v.sizeCache
  623. case 2:
  624. return &v.unknownFields
  625. default:
  626. return nil
  627. }
  628. }
  629. file_business_ext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
  630. switch v := v.(*UpdateUserReq); i {
  631. case 0:
  632. return &v.state
  633. case 1:
  634. return &v.sizeCache
  635. case 2:
  636. return &v.unknownFields
  637. default:
  638. return nil
  639. }
  640. }
  641. file_business_ext_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
  642. switch v := v.(*SearchUserReq); i {
  643. case 0:
  644. return &v.state
  645. case 1:
  646. return &v.sizeCache
  647. case 2:
  648. return &v.unknownFields
  649. default:
  650. return nil
  651. }
  652. }
  653. file_business_ext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
  654. switch v := v.(*SearchUserResp); i {
  655. case 0:
  656. return &v.state
  657. case 1:
  658. return &v.sizeCache
  659. case 2:
  660. return &v.unknownFields
  661. default:
  662. return nil
  663. }
  664. }
  665. }
  666. type x struct{}
  667. out := protoimpl.TypeBuilder{
  668. File: protoimpl.DescBuilder{
  669. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  670. RawDescriptor: file_business_ext_proto_rawDesc,
  671. NumEnums: 0,
  672. NumMessages: 8,
  673. NumExtensions: 0,
  674. NumServices: 1,
  675. },
  676. GoTypes: file_business_ext_proto_goTypes,
  677. DependencyIndexes: file_business_ext_proto_depIdxs,
  678. MessageInfos: file_business_ext_proto_msgTypes,
  679. }.Build()
  680. File_business_ext_proto = out.File
  681. file_business_ext_proto_rawDesc = nil
  682. file_business_ext_proto_goTypes = nil
  683. file_business_ext_proto_depIdxs = nil
  684. }
  685. // Reference imports to suppress errors if they are not otherwise used.
  686. var _ context.Context
  687. var _ grpc.ClientConnInterface
  688. // This is a compile-time assertion to ensure that this generated file
  689. // is compatible with the grpc package it is being compiled against.
  690. const _ = grpc.SupportPackageIsVersion6
  691. // BusinessExtClient is the client API for BusinessExt service.
  692. //
  693. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  694. type BusinessExtClient interface {
  695. // 登录
  696. SignIn(ctx context.Context, in *SignInReq, opts ...grpc.CallOption) (*SignInResp, error)
  697. // 获取用户信息
  698. GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error)
  699. // 更新用户信息
  700. UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Empty, error)
  701. // 搜索用户(这里简单数据库实现,生产环境建议使用ES)
  702. SearchUser(ctx context.Context, in *SearchUserReq, opts ...grpc.CallOption) (*SearchUserResp, error)
  703. }
  704. type businessExtClient struct {
  705. cc grpc.ClientConnInterface
  706. }
  707. func NewBusinessExtClient(cc grpc.ClientConnInterface) BusinessExtClient {
  708. return &businessExtClient{cc}
  709. }
  710. func (c *businessExtClient) SignIn(ctx context.Context, in *SignInReq, opts ...grpc.CallOption) (*SignInResp, error) {
  711. out := new(SignInResp)
  712. err := c.cc.Invoke(ctx, "/pb.BusinessExt/SignIn", in, out, opts...)
  713. if err != nil {
  714. return nil, err
  715. }
  716. return out, nil
  717. }
  718. func (c *businessExtClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) {
  719. out := new(GetUserResp)
  720. err := c.cc.Invoke(ctx, "/pb.BusinessExt/GetUser", in, out, opts...)
  721. if err != nil {
  722. return nil, err
  723. }
  724. return out, nil
  725. }
  726. func (c *businessExtClient) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Empty, error) {
  727. out := new(Empty)
  728. err := c.cc.Invoke(ctx, "/pb.BusinessExt/UpdateUser", in, out, opts...)
  729. if err != nil {
  730. return nil, err
  731. }
  732. return out, nil
  733. }
  734. func (c *businessExtClient) SearchUser(ctx context.Context, in *SearchUserReq, opts ...grpc.CallOption) (*SearchUserResp, error) {
  735. out := new(SearchUserResp)
  736. err := c.cc.Invoke(ctx, "/pb.BusinessExt/SearchUser", in, out, opts...)
  737. if err != nil {
  738. return nil, err
  739. }
  740. return out, nil
  741. }
  742. // BusinessExtServer is the server API for BusinessExt service.
  743. type BusinessExtServer interface {
  744. // 登录
  745. SignIn(context.Context, *SignInReq) (*SignInResp, error)
  746. // 获取用户信息
  747. GetUser(context.Context, *GetUserReq) (*GetUserResp, error)
  748. // 更新用户信息
  749. UpdateUser(context.Context, *UpdateUserReq) (*Empty, error)
  750. // 搜索用户(这里简单数据库实现,生产环境建议使用ES)
  751. SearchUser(context.Context, *SearchUserReq) (*SearchUserResp, error)
  752. }
  753. // UnimplementedBusinessExtServer can be embedded to have forward compatible implementations.
  754. type UnimplementedBusinessExtServer struct {
  755. }
  756. func (*UnimplementedBusinessExtServer) SignIn(context.Context, *SignInReq) (*SignInResp, error) {
  757. return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented")
  758. }
  759. func (*UnimplementedBusinessExtServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) {
  760. return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
  761. }
  762. func (*UnimplementedBusinessExtServer) UpdateUser(context.Context, *UpdateUserReq) (*Empty, error) {
  763. return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
  764. }
  765. func (*UnimplementedBusinessExtServer) SearchUser(context.Context, *SearchUserReq) (*SearchUserResp, error) {
  766. return nil, status.Errorf(codes.Unimplemented, "method SearchUser not implemented")
  767. }
  768. func RegisterBusinessExtServer(s *grpc.Server, srv BusinessExtServer) {
  769. s.RegisterService(&_BusinessExt_serviceDesc, srv)
  770. }
  771. func _BusinessExt_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  772. in := new(SignInReq)
  773. if err := dec(in); err != nil {
  774. return nil, err
  775. }
  776. if interceptor == nil {
  777. return srv.(BusinessExtServer).SignIn(ctx, in)
  778. }
  779. info := &grpc.UnaryServerInfo{
  780. Server: srv,
  781. FullMethod: "/pb.BusinessExt/SignIn",
  782. }
  783. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  784. return srv.(BusinessExtServer).SignIn(ctx, req.(*SignInReq))
  785. }
  786. return interceptor(ctx, in, info, handler)
  787. }
  788. func _BusinessExt_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  789. in := new(GetUserReq)
  790. if err := dec(in); err != nil {
  791. return nil, err
  792. }
  793. if interceptor == nil {
  794. return srv.(BusinessExtServer).GetUser(ctx, in)
  795. }
  796. info := &grpc.UnaryServerInfo{
  797. Server: srv,
  798. FullMethod: "/pb.BusinessExt/GetUser",
  799. }
  800. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  801. return srv.(BusinessExtServer).GetUser(ctx, req.(*GetUserReq))
  802. }
  803. return interceptor(ctx, in, info, handler)
  804. }
  805. func _BusinessExt_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  806. in := new(UpdateUserReq)
  807. if err := dec(in); err != nil {
  808. return nil, err
  809. }
  810. if interceptor == nil {
  811. return srv.(BusinessExtServer).UpdateUser(ctx, in)
  812. }
  813. info := &grpc.UnaryServerInfo{
  814. Server: srv,
  815. FullMethod: "/pb.BusinessExt/UpdateUser",
  816. }
  817. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  818. return srv.(BusinessExtServer).UpdateUser(ctx, req.(*UpdateUserReq))
  819. }
  820. return interceptor(ctx, in, info, handler)
  821. }
  822. func _BusinessExt_SearchUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  823. in := new(SearchUserReq)
  824. if err := dec(in); err != nil {
  825. return nil, err
  826. }
  827. if interceptor == nil {
  828. return srv.(BusinessExtServer).SearchUser(ctx, in)
  829. }
  830. info := &grpc.UnaryServerInfo{
  831. Server: srv,
  832. FullMethod: "/pb.BusinessExt/SearchUser",
  833. }
  834. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  835. return srv.(BusinessExtServer).SearchUser(ctx, req.(*SearchUserReq))
  836. }
  837. return interceptor(ctx, in, info, handler)
  838. }
  839. var _BusinessExt_serviceDesc = grpc.ServiceDesc{
  840. ServiceName: "pb.BusinessExt",
  841. HandlerType: (*BusinessExtServer)(nil),
  842. Methods: []grpc.MethodDesc{
  843. {
  844. MethodName: "SignIn",
  845. Handler: _BusinessExt_SignIn_Handler,
  846. },
  847. {
  848. MethodName: "GetUser",
  849. Handler: _BusinessExt_GetUser_Handler,
  850. },
  851. {
  852. MethodName: "UpdateUser",
  853. Handler: _BusinessExt_UpdateUser_Handler,
  854. },
  855. {
  856. MethodName: "SearchUser",
  857. Handler: _BusinessExt_SearchUser_Handler,
  858. },
  859. },
  860. Streams: []grpc.StreamDesc{},
  861. Metadata: "business.ext.proto_back",
  862. }