用户接口远程调用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

704 lines
20 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
  1. // Code generated by protoc-gen-go.
  2. // source: user.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package userrpc is a generated protocol buffer package.
  6. It is generated from these files:
  7. user.proto
  8. It has these top-level messages:
  9. UserRequest
  10. UserInfoByUsername
  11. UserInfoById
  12. UserInfoByUsercode
  13. UserResponse
  14. LoginRequest
  15. LoginResponse
  16. Request
  17. Response
  18. */
  19. package userrpc
  20. import proto "github.com/chai2010/protorpc/proto"
  21. import math "math"
  22. import "io"
  23. import "log"
  24. import "net"
  25. import "net/rpc"
  26. import "time"
  27. import protorpc "github.com/chai2010/protorpc"
  28. // Reference imports to suppress errors if they are not otherwise used.
  29. var _ = proto.Marshal
  30. var _ = math.Inf
  31. // 使用token查询用户信息请求结构
  32. type UserRequest struct {
  33. Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
  34. Token *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
  35. XXX_unrecognized []byte `json:"-"`
  36. }
  37. func (m *UserRequest) Reset() { *m = UserRequest{} }
  38. func (m *UserRequest) String() string { return proto.CompactTextString(m) }
  39. func (*UserRequest) ProtoMessage() {}
  40. func (m *UserRequest) GetDbname() string {
  41. if m != nil && m.Dbname != nil {
  42. return *m.Dbname
  43. }
  44. return ""
  45. }
  46. func (m *UserRequest) GetToken() string {
  47. if m != nil && m.Token != nil {
  48. return *m.Token
  49. }
  50. return ""
  51. }
  52. // 使用username查询用户信息请求结构
  53. type UserInfoByUsername struct {
  54. Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
  55. Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
  56. XXX_unrecognized []byte `json:"-"`
  57. }
  58. func (m *UserInfoByUsername) Reset() { *m = UserInfoByUsername{} }
  59. func (m *UserInfoByUsername) String() string { return proto.CompactTextString(m) }
  60. func (*UserInfoByUsername) ProtoMessage() {}
  61. func (m *UserInfoByUsername) GetDbname() string {
  62. if m != nil && m.Dbname != nil {
  63. return *m.Dbname
  64. }
  65. return ""
  66. }
  67. func (m *UserInfoByUsername) GetUsername() string {
  68. if m != nil && m.Username != nil {
  69. return *m.Username
  70. }
  71. return ""
  72. }
  73. // 使用userid查询用户信息请求结构
  74. type UserInfoById struct {
  75. Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
  76. Userid *string `protobuf:"bytes,2,opt,name=userid" json:"userid,omitempty"`
  77. XXX_unrecognized []byte `json:"-"`
  78. }
  79. func (m *UserInfoById) Reset() { *m = UserInfoById{} }
  80. func (m *UserInfoById) String() string { return proto.CompactTextString(m) }
  81. func (*UserInfoById) ProtoMessage() {}
  82. func (m *UserInfoById) GetDbname() string {
  83. if m != nil && m.Dbname != nil {
  84. return *m.Dbname
  85. }
  86. return ""
  87. }
  88. func (m *UserInfoById) GetUserid() string {
  89. if m != nil && m.Userid != nil {
  90. return *m.Userid
  91. }
  92. return ""
  93. }
  94. // 使用usercode查询用户信息请求结构
  95. type UserInfoByUsercode struct {
  96. Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
  97. Usercode *string `protobuf:"bytes,2,opt,name=usercode" json:"usercode,omitempty"`
  98. XXX_unrecognized []byte `json:"-"`
  99. }
  100. func (m *UserInfoByUsercode) Reset() { *m = UserInfoByUsercode{} }
  101. func (m *UserInfoByUsercode) String() string { return proto.CompactTextString(m) }
  102. func (*UserInfoByUsercode) ProtoMessage() {}
  103. func (m *UserInfoByUsercode) GetDbname() string {
  104. if m != nil && m.Dbname != nil {
  105. return *m.Dbname
  106. }
  107. return ""
  108. }
  109. func (m *UserInfoByUsercode) GetUsercode() string {
  110. if m != nil && m.Usercode != nil {
  111. return *m.Usercode
  112. }
  113. return ""
  114. }
  115. // 使用token查询用户信息响应结构
  116. type UserResponse struct {
  117. UserId *string `protobuf:"bytes,1,opt,name=user_id" json:"user_id,omitempty"`
  118. Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
  119. Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
  120. Mobile *string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"`
  121. Email *string `protobuf:"bytes,5,opt,name=email" json:"email,omitempty"`
  122. Status *string `protobuf:"bytes,6,opt,name=status" json:"status,omitempty"`
  123. BusinessId *string `protobuf:"bytes,7,opt,name=business_id" json:"business_id,omitempty"`
  124. StoreId *string `protobuf:"bytes,8,opt,name=store_id" json:"store_id,omitempty"`
  125. FansTo *string `protobuf:"bytes,9,opt,name=fans_to" json:"fans_to,omitempty"`
  126. IsVip *string `protobuf:"bytes,10,opt,name=is_vip" json:"is_vip,omitempty"`
  127. Usercode *string `protobuf:"bytes,11,opt,name=usercode" json:"usercode,omitempty"`
  128. GroupId *string `protobuf:"bytes,12,opt,name=group_id" json:"group_id,omitempty"`
  129. Type *string `protobuf:"bytes,13,opt,name=type" json:"type,omitempty"`
  130. ThirdId *string `protobuf:"bytes,14,opt,name=third_id" json:"third_id,omitempty"`
  131. Platform *string `protobuf:"bytes,15,opt,name=platform" json:"platform,omitempty"`
  132. LockFans *string `protobuf:"bytes,16,opt,name=lock_fans" json:"lock_fans,omitempty"`
  133. XXX_unrecognized []byte `json:"-"`
  134. }
  135. func (m *UserResponse) Reset() { *m = UserResponse{} }
  136. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  137. func (*UserResponse) ProtoMessage() {}
  138. func (m *UserResponse) GetUserId() string {
  139. if m != nil && m.UserId != nil {
  140. return *m.UserId
  141. }
  142. return ""
  143. }
  144. func (m *UserResponse) GetUsername() string {
  145. if m != nil && m.Username != nil {
  146. return *m.Username
  147. }
  148. return ""
  149. }
  150. func (m *UserResponse) GetNickname() string {
  151. if m != nil && m.Nickname != nil {
  152. return *m.Nickname
  153. }
  154. return ""
  155. }
  156. func (m *UserResponse) GetMobile() string {
  157. if m != nil && m.Mobile != nil {
  158. return *m.Mobile
  159. }
  160. return ""
  161. }
  162. func (m *UserResponse) GetEmail() string {
  163. if m != nil && m.Email != nil {
  164. return *m.Email
  165. }
  166. return ""
  167. }
  168. func (m *UserResponse) GetStatus() string {
  169. if m != nil && m.Status != nil {
  170. return *m.Status
  171. }
  172. return ""
  173. }
  174. func (m *UserResponse) GetBusinessId() string {
  175. if m != nil && m.BusinessId != nil {
  176. return *m.BusinessId
  177. }
  178. return ""
  179. }
  180. func (m *UserResponse) GetStoreId() string {
  181. if m != nil && m.StoreId != nil {
  182. return *m.StoreId
  183. }
  184. return ""
  185. }
  186. func (m *UserResponse) GetFansTo() string {
  187. if m != nil && m.FansTo != nil {
  188. return *m.FansTo
  189. }
  190. return ""
  191. }
  192. func (m *UserResponse) GetIsVip() string {
  193. if m != nil && m.IsVip != nil {
  194. return *m.IsVip
  195. }
  196. return ""
  197. }
  198. func (m *UserResponse) GetUsercode() string {
  199. if m != nil && m.Usercode != nil {
  200. return *m.Usercode
  201. }
  202. return ""
  203. }
  204. func (m *UserResponse) GetGroupId() string {
  205. if m != nil && m.GroupId != nil {
  206. return *m.GroupId
  207. }
  208. return ""
  209. }
  210. func (m *UserResponse) GetType() string {
  211. if m != nil && m.Type != nil {
  212. return *m.Type
  213. }
  214. return ""
  215. }
  216. func (m *UserResponse) GetThirdId() string {
  217. if m != nil && m.ThirdId != nil {
  218. return *m.ThirdId
  219. }
  220. return ""
  221. }
  222. func (m *UserResponse) GetPlatform() string {
  223. if m != nil && m.Platform != nil {
  224. return *m.Platform
  225. }
  226. return ""
  227. }
  228. func (m *UserResponse) GetLockFans() string {
  229. if m != nil && m.LockFans != nil {
  230. return *m.LockFans
  231. }
  232. return ""
  233. }
  234. // 用户登录请求结构
  235. type LoginRequest struct {
  236. Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
  237. Account *string `protobuf:"bytes,2,opt,name=account" json:"account,omitempty"`
  238. Password *string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"`
  239. XXX_unrecognized []byte `json:"-"`
  240. }
  241. func (m *LoginRequest) Reset() { *m = LoginRequest{} }
  242. func (m *LoginRequest) String() string { return proto.CompactTextString(m) }
  243. func (*LoginRequest) ProtoMessage() {}
  244. func (m *LoginRequest) GetDbname() string {
  245. if m != nil && m.Dbname != nil {
  246. return *m.Dbname
  247. }
  248. return ""
  249. }
  250. func (m *LoginRequest) GetAccount() string {
  251. if m != nil && m.Account != nil {
  252. return *m.Account
  253. }
  254. return ""
  255. }
  256. func (m *LoginRequest) GetPassword() string {
  257. if m != nil && m.Password != nil {
  258. return *m.Password
  259. }
  260. return ""
  261. }
  262. // 使用token查询用户信息响应结构
  263. type LoginResponse struct {
  264. UserId *string `protobuf:"bytes,1,opt,name=user_id" json:"user_id,omitempty"`
  265. Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
  266. Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
  267. Mobile *string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"`
  268. Email *string `protobuf:"bytes,5,opt,name=email" json:"email,omitempty"`
  269. Status *string `protobuf:"bytes,6,opt,name=status" json:"status,omitempty"`
  270. BusinessId *string `protobuf:"bytes,7,opt,name=business_id" json:"business_id,omitempty"`
  271. StoreId *string `protobuf:"bytes,8,opt,name=store_id" json:"store_id,omitempty"`
  272. FansTo *string `protobuf:"bytes,9,opt,name=fans_to" json:"fans_to,omitempty"`
  273. IsVip *string `protobuf:"bytes,10,opt,name=is_vip" json:"is_vip,omitempty"`
  274. Token *string `protobuf:"bytes,11,opt,name=token" json:"token,omitempty"`
  275. Usercode *string `protobuf:"bytes,12,opt,name=usercode" json:"usercode,omitempty"`
  276. GroupId *string `protobuf:"bytes,13,opt,name=group_id" json:"group_id,omitempty"`
  277. Type *string `protobuf:"bytes,14,opt,name=type" json:"type,omitempty"`
  278. ThirdId *string `protobuf:"bytes,15,opt,name=third_id" json:"third_id,omitempty"`
  279. Platform *string `protobuf:"bytes,16,opt,name=platform" json:"platform,omitempty"`
  280. XXX_unrecognized []byte `json:"-"`
  281. }
  282. func (m *LoginResponse) Reset() { *m = LoginResponse{} }
  283. func (m *LoginResponse) String() string { return proto.CompactTextString(m) }
  284. func (*LoginResponse) ProtoMessage() {}
  285. func (m *LoginResponse) GetUserId() string {
  286. if m != nil && m.UserId != nil {
  287. return *m.UserId
  288. }
  289. return ""
  290. }
  291. func (m *LoginResponse) GetUsername() string {
  292. if m != nil && m.Username != nil {
  293. return *m.Username
  294. }
  295. return ""
  296. }
  297. func (m *LoginResponse) GetNickname() string {
  298. if m != nil && m.Nickname != nil {
  299. return *m.Nickname
  300. }
  301. return ""
  302. }
  303. func (m *LoginResponse) GetMobile() string {
  304. if m != nil && m.Mobile != nil {
  305. return *m.Mobile
  306. }
  307. return ""
  308. }
  309. func (m *LoginResponse) GetEmail() string {
  310. if m != nil && m.Email != nil {
  311. return *m.Email
  312. }
  313. return ""
  314. }
  315. func (m *LoginResponse) GetStatus() string {
  316. if m != nil && m.Status != nil {
  317. return *m.Status
  318. }
  319. return ""
  320. }
  321. func (m *LoginResponse) GetBusinessId() string {
  322. if m != nil && m.BusinessId != nil {
  323. return *m.BusinessId
  324. }
  325. return ""
  326. }
  327. func (m *LoginResponse) GetStoreId() string {
  328. if m != nil && m.StoreId != nil {
  329. return *m.StoreId
  330. }
  331. return ""
  332. }
  333. func (m *LoginResponse) GetFansTo() string {
  334. if m != nil && m.FansTo != nil {
  335. return *m.FansTo
  336. }
  337. return ""
  338. }
  339. func (m *LoginResponse) GetIsVip() string {
  340. if m != nil && m.IsVip != nil {
  341. return *m.IsVip
  342. }
  343. return ""
  344. }
  345. func (m *LoginResponse) GetToken() string {
  346. if m != nil && m.Token != nil {
  347. return *m.Token
  348. }
  349. return ""
  350. }
  351. func (m *LoginResponse) GetUsercode() string {
  352. if m != nil && m.Usercode != nil {
  353. return *m.Usercode
  354. }
  355. return ""
  356. }
  357. func (m *LoginResponse) GetGroupId() string {
  358. if m != nil && m.GroupId != nil {
  359. return *m.GroupId
  360. }
  361. return ""
  362. }
  363. func (m *LoginResponse) GetType() string {
  364. if m != nil && m.Type != nil {
  365. return *m.Type
  366. }
  367. return ""
  368. }
  369. func (m *LoginResponse) GetThirdId() string {
  370. if m != nil && m.ThirdId != nil {
  371. return *m.ThirdId
  372. }
  373. return ""
  374. }
  375. func (m *LoginResponse) GetPlatform() string {
  376. if m != nil && m.Platform != nil {
  377. return *m.Platform
  378. }
  379. return ""
  380. }
  381. // 信息请求结构
  382. type Request struct {
  383. Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
  384. Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"`
  385. Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"`
  386. XXX_unrecognized []byte `json:"-"`
  387. }
  388. func (m *Request) Reset() { *m = Request{} }
  389. func (m *Request) String() string { return proto.CompactTextString(m) }
  390. func (*Request) ProtoMessage() {}
  391. func (m *Request) GetData() string {
  392. if m != nil && m.Data != nil {
  393. return *m.Data
  394. }
  395. return ""
  396. }
  397. func (m *Request) GetTime() string {
  398. if m != nil && m.Time != nil {
  399. return *m.Time
  400. }
  401. return ""
  402. }
  403. func (m *Request) GetSign() string {
  404. if m != nil && m.Sign != nil {
  405. return *m.Sign
  406. }
  407. return ""
  408. }
  409. // 信息响应结构
  410. type Response struct {
  411. Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
  412. Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"`
  413. Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"`
  414. XXX_unrecognized []byte `json:"-"`
  415. }
  416. func (m *Response) Reset() { *m = Response{} }
  417. func (m *Response) String() string { return proto.CompactTextString(m) }
  418. func (*Response) ProtoMessage() {}
  419. func (m *Response) GetData() string {
  420. if m != nil && m.Data != nil {
  421. return *m.Data
  422. }
  423. return ""
  424. }
  425. func (m *Response) GetTime() string {
  426. if m != nil && m.Time != nil {
  427. return *m.Time
  428. }
  429. return ""
  430. }
  431. func (m *Response) GetSign() string {
  432. if m != nil && m.Sign != nil {
  433. return *m.Sign
  434. }
  435. return ""
  436. }
  437. func init() {
  438. }
  439. type UserService interface {
  440. GetByToken(in *UserRequest, out *UserResponse) error
  441. Login(in *LoginRequest, out *LoginResponse) error
  442. GetByUsername(in *UserInfoByUsername, out *UserResponse) error
  443. GetByUsercode(in *UserInfoByUsercode, out *UserResponse) error
  444. BindThird(in *Request, out *Response) error
  445. GetThird(in *Request, out *Response) error
  446. GetUserThird(in *Request, out *Response) error
  447. GetBusiness(in *Request, out *Response) error
  448. GetById(in *Request, out *Response) error
  449. GetBusinessInfo(in *Request, out *Response) error
  450. GetAddressInfo(in *Request, out *Response) error
  451. GetUserScore(in *Request, out *Response) error
  452. GetUserRedEnvelope(in *Request, out *Response) error
  453. AddUserScore(in *Request, out *Response) error
  454. UpdateUserScore(in *Request, out *Response) error
  455. AddUserScoreLog(in *Request, out *Response) error
  456. AddUserUpgrade(in *Request, out *Response) error
  457. UpdateUserUpgrade(in *Request, out *Response) error
  458. AddUserUpgradeLog(in *Request, out *Response) error
  459. AddUserRedEnvelope(in *Request, out *Response) error
  460. UpdateUserRedEnvelope(in *Request, out *Response) error
  461. AddUserRedEnvelopeLog(in *Request, out *Response) error
  462. AddUserCoupon(in *Request, out *Response) error
  463. UpdateUserCoupon(in *Request, out *Response) error
  464. FavoriteProduct(in *Request, out *Response) error
  465. }
  466. // AcceptUserServiceClient accepts connections on the listener and serves requests
  467. // for each incoming connection. Accept blocks; the caller typically
  468. // invokes it in a go statement.
  469. func AcceptUserServiceClient(lis net.Listener, x UserService) {
  470. srv := rpc.NewServer()
  471. if err := srv.RegisterName("UserService", x); err != nil {
  472. log.Fatal(err)
  473. }
  474. for {
  475. conn, err := lis.Accept()
  476. if err != nil {
  477. log.Fatalf("lis.Accept(): %v\n", err)
  478. }
  479. go srv.ServeCodec(protorpc.NewServerCodec(conn))
  480. }
  481. }
  482. // RegisterUserService publish the given UserService implementation on the server.
  483. func RegisterUserService(srv *rpc.Server, x UserService) error {
  484. if err := srv.RegisterName("UserService", x); err != nil {
  485. return err
  486. }
  487. return nil
  488. }
  489. // NewUserServiceServer returns a new UserService Server.
  490. func NewUserServiceServer(x UserService) *rpc.Server {
  491. srv := rpc.NewServer()
  492. if err := srv.RegisterName("UserService", x); err != nil {
  493. log.Fatal(err)
  494. }
  495. return srv
  496. }
  497. // ListenAndServeUserService listen announces on the local network address laddr
  498. // and serves the given UserService implementation.
  499. func ListenAndServeUserService(network, addr string, x UserService) error {
  500. lis, err := net.Listen(network, addr)
  501. if err != nil {
  502. return err
  503. }
  504. defer lis.Close()
  505. srv := rpc.NewServer()
  506. if err := srv.RegisterName("UserService", x); err != nil {
  507. return err
  508. }
  509. for {
  510. conn, err := lis.Accept()
  511. if err != nil {
  512. log.Fatalf("lis.Accept(): %v\n", err)
  513. }
  514. go srv.ServeCodec(protorpc.NewServerCodec(conn))
  515. }
  516. }
  517. type UserServiceClient struct {
  518. *rpc.Client
  519. }
  520. // NewUserServiceClient returns a UserService rpc.Client and stub to handle
  521. // requests to the set of UserService at the other end of the connection.
  522. func NewUserServiceClient(conn io.ReadWriteCloser) (*UserServiceClient, *rpc.Client) {
  523. c := rpc.NewClientWithCodec(protorpc.NewClientCodec(conn))
  524. return &UserServiceClient{c}, c
  525. }
  526. func (c *UserServiceClient) GetByToken(in *UserRequest, out *UserResponse) error {
  527. return c.Call("UserService.GetByToken", in, out)
  528. }
  529. func (c *UserServiceClient) Login(in *LoginRequest, out *LoginResponse) error {
  530. return c.Call("UserService.Login", in, out)
  531. }
  532. func (c *UserServiceClient) GetByUsername(in *UserInfoByUsername, out *UserResponse) error {
  533. return c.Call("UserService.GetByUsername", in, out)
  534. }
  535. func (c *UserServiceClient) GetByUsercode(in *UserInfoByUsercode, out *UserResponse) error {
  536. return c.Call("UserService.GetByUsercode", in, out)
  537. }
  538. func (c *UserServiceClient) BindThird(in *Request, out *Response) error {
  539. return c.Call("UserService.BindThird", in, out)
  540. }
  541. func (c *UserServiceClient) GetThird(in *Request, out *Response) error {
  542. return c.Call("UserService.GetThird", in, out)
  543. }
  544. func (c *UserServiceClient) GetUserThird(in *Request, out *Response) error {
  545. return c.Call("UserService.GetUserThird", in, out)
  546. }
  547. func (c *UserServiceClient) GetBusiness(in *Request, out *Response) error {
  548. return c.Call("UserService.GetBusiness", in, out)
  549. }
  550. func (c *UserServiceClient) GetById(in *Request, out *Response) error {
  551. return c.Call("UserService.GetById", in, out)
  552. }
  553. func (c *UserServiceClient) GetBusinessInfo(in *Request, out *Response) error {
  554. return c.Call("UserService.GetBusinessInfo", in, out)
  555. }
  556. func (c *UserServiceClient) GetAddressInfo(in *Request, out *Response) error {
  557. return c.Call("UserService.GetAddressInfo", in, out)
  558. }
  559. func (c *UserServiceClient) GetUserScore(in *Request, out *Response) error {
  560. return c.Call("UserService.GetUserScore", in, out)
  561. }
  562. func (c *UserServiceClient) GetUserRedEnvelope(in *Request, out *Response) error {
  563. return c.Call("UserService.GetUserRedEnvelope", in, out)
  564. }
  565. func (c *UserServiceClient) AddUserScore(in *Request, out *Response) error {
  566. return c.Call("UserService.AddUserScore", in, out)
  567. }
  568. func (c *UserServiceClient) UpdateUserScore(in *Request, out *Response) error {
  569. return c.Call("UserService.UpdateUserScore", in, out)
  570. }
  571. func (c *UserServiceClient) AddUserScoreLog(in *Request, out *Response) error {
  572. return c.Call("UserService.AddUserScoreLog", in, out)
  573. }
  574. func (c *UserServiceClient) AddUserUpgrade(in *Request, out *Response) error {
  575. return c.Call("UserService.AddUserUpgrade", in, out)
  576. }
  577. func (c *UserServiceClient) UpdateUserUpgrade(in *Request, out *Response) error {
  578. return c.Call("UserService.UpdateUserUpgrade", in, out)
  579. }
  580. func (c *UserServiceClient) AddUserUpgradeLog(in *Request, out *Response) error {
  581. return c.Call("UserService.AddUserUpgradeLog", in, out)
  582. }
  583. func (c *UserServiceClient) AddUserRedEnvelope(in *Request, out *Response) error {
  584. return c.Call("UserService.AddUserRedEnvelope", in, out)
  585. }
  586. func (c *UserServiceClient) UpdateUserRedEnvelope(in *Request, out *Response) error {
  587. return c.Call("UserService.UpdateUserRedEnvelope", in, out)
  588. }
  589. func (c *UserServiceClient) AddUserRedEnvelopeLog(in *Request, out *Response) error {
  590. return c.Call("UserService.AddUserRedEnvelopeLog", in, out)
  591. }
  592. func (c *UserServiceClient) AddUserCoupon(in *Request, out *Response) error {
  593. return c.Call("UserService.AddUserCoupon", in, out)
  594. }
  595. func (c *UserServiceClient) UpdateUserCoupon(in *Request, out *Response) error {
  596. return c.Call("UserService.UpdateUserCoupon", in, out)
  597. }
  598. func (c *UserServiceClient) FavoriteProduct(in *Request, out *Response) error {
  599. return c.Call("UserService.FavoriteProduct", in, out)
  600. }
  601. // DialUserService connects to an UserService at the specified network address.
  602. func DialUserService(network, addr string) (*UserServiceClient, *rpc.Client, error) {
  603. c, err := protorpc.Dial(network, addr)
  604. if err != nil {
  605. return nil, nil, err
  606. }
  607. return &UserServiceClient{c}, c, nil
  608. }
  609. // DialUserServiceTimeout connects to an UserService at the specified network address.
  610. func DialUserServiceTimeout(network, addr string,
  611. timeout time.Duration) (*UserServiceClient, *rpc.Client, error) {
  612. c, err := protorpc.DialTimeout(network, addr, timeout)
  613. if err != nil {
  614. return nil, nil, err
  615. }
  616. return &UserServiceClient{c}, c, nil
  617. }