golang-im聊天
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

business.ext.pb.go 29 KiB

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