用户接口远程调用
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.

708 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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 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. UpdateUserCache(in *Request, out *Response) error
  450. GetBusinessInfo(in *Request, out *Response) error
  451. GetAddressInfo(in *Request, out *Response) error
  452. GetUserScore(in *Request, out *Response) error
  453. GetUserRedEnvelope(in *Request, out *Response) error
  454. AddUserScore(in *Request, out *Response) error
  455. UpdateUserScore(in *Request, out *Response) error
  456. AddUserScoreLog(in *Request, out *Response) error
  457. AddUserUpgrade(in *Request, out *Response) error
  458. UpdateUserUpgrade(in *Request, out *Response) error
  459. AddUserUpgradeLog(in *Request, out *Response) error
  460. AddUserRedEnvelope(in *Request, out *Response) error
  461. UpdateUserRedEnvelope(in *Request, out *Response) error
  462. AddUserRedEnvelopeLog(in *Request, out *Response) error
  463. AddUserCoupon(in *Request, out *Response) error
  464. UpdateUserCoupon(in *Request, out *Response) error
  465. Fans(in *Request, out *Response) error
  466. }
  467. // AcceptUserServiceClient accepts connections on the listener and serves requests
  468. // for each incoming connection. Accept blocks; the caller typically
  469. // invokes it in a go statement.
  470. func AcceptUserServiceClient(lis net.Listener, x UserService) {
  471. srv := rpc.NewServer()
  472. if err := srv.RegisterName("UserService", x); err != nil {
  473. log.Fatal(err)
  474. }
  475. for {
  476. conn, err := lis.Accept()
  477. if err != nil {
  478. log.Fatalf("lis.Accept(): %v\n", err)
  479. }
  480. go srv.ServeCodec(protorpc.NewServerCodec(conn))
  481. }
  482. }
  483. // RegisterUserService publish the given UserService implementation on the server.
  484. func RegisterUserService(srv *rpc.Server, x UserService) error {
  485. if err := srv.RegisterName("UserService", x); err != nil {
  486. return err
  487. }
  488. return nil
  489. }
  490. // NewUserServiceServer returns a new UserService Server.
  491. func NewUserServiceServer(x UserService) *rpc.Server {
  492. srv := rpc.NewServer()
  493. if err := srv.RegisterName("UserService", x); err != nil {
  494. log.Fatal(err)
  495. }
  496. return srv
  497. }
  498. // ListenAndServeUserService listen announces on the local network address laddr
  499. // and serves the given UserService implementation.
  500. func ListenAndServeUserService(network, addr string, x UserService) error {
  501. lis, err := net.Listen(network, addr)
  502. if err != nil {
  503. return err
  504. }
  505. defer lis.Close()
  506. srv := rpc.NewServer()
  507. if err := srv.RegisterName("UserService", x); err != nil {
  508. return err
  509. }
  510. for {
  511. conn, err := lis.Accept()
  512. if err != nil {
  513. log.Fatalf("lis.Accept(): %v\n", err)
  514. }
  515. go srv.ServeCodec(protorpc.NewServerCodec(conn))
  516. }
  517. }
  518. type UserServiceClient struct {
  519. *rpc.Client
  520. }
  521. // NewUserServiceClient returns a UserService rpc.Client and stub to handle
  522. // requests to the set of UserService at the other end of the connection.
  523. func NewUserServiceClient(conn io.ReadWriteCloser) (*UserServiceClient, *rpc.Client) {
  524. c := rpc.NewClientWithCodec(protorpc.NewClientCodec(conn))
  525. return &UserServiceClient{c}, c
  526. }
  527. func (c *UserServiceClient) GetByToken(in *UserRequest, out *UserResponse) error {
  528. return c.Call("UserService.GetByToken", in, out)
  529. }
  530. func (c *UserServiceClient) Login(in *LoginRequest, out *LoginResponse) error {
  531. return c.Call("UserService.Login", in, out)
  532. }
  533. func (c *UserServiceClient) GetByUsername(in *UserInfoByUsername, out *UserResponse) error {
  534. return c.Call("UserService.GetByUsername", in, out)
  535. }
  536. func (c *UserServiceClient) GetByUsercode(in *UserInfoByUsercode, out *UserResponse) error {
  537. return c.Call("UserService.GetByUsercode", in, out)
  538. }
  539. func (c *UserServiceClient) BindThird(in *Request, out *Response) error {
  540. return c.Call("UserService.BindThird", in, out)
  541. }
  542. func (c *UserServiceClient) GetThird(in *Request, out *Response) error {
  543. return c.Call("UserService.GetThird", in, out)
  544. }
  545. func (c *UserServiceClient) GetUserThird(in *Request, out *Response) error {
  546. return c.Call("UserService.GetUserThird", in, out)
  547. }
  548. func (c *UserServiceClient) GetBusiness(in *Request, out *Response) error {
  549. return c.Call("UserService.GetBusiness", in, out)
  550. }
  551. func (c *UserServiceClient) GetById(in *Request, out *Response) error {
  552. return c.Call("UserService.GetById", in, out)
  553. }
  554. func (c *UserServiceClient) UpdateUserCache(in *Request, out *Response) error {
  555. return c.Call("UserService.UpdateUserCache", in, out)
  556. }
  557. func (c *UserServiceClient) GetBusinessInfo(in *Request, out *Response) error {
  558. return c.Call("UserService.GetBusinessInfo", in, out)
  559. }
  560. func (c *UserServiceClient) GetAddressInfo(in *Request, out *Response) error {
  561. return c.Call("UserService.GetAddressInfo", in, out)
  562. }
  563. func (c *UserServiceClient) GetUserScore(in *Request, out *Response) error {
  564. return c.Call("UserService.GetUserScore", in, out)
  565. }
  566. func (c *UserServiceClient) GetUserRedEnvelope(in *Request, out *Response) error {
  567. return c.Call("UserService.GetUserRedEnvelope", in, out)
  568. }
  569. func (c *UserServiceClient) AddUserScore(in *Request, out *Response) error {
  570. return c.Call("UserService.AddUserScore", in, out)
  571. }
  572. func (c *UserServiceClient) UpdateUserScore(in *Request, out *Response) error {
  573. return c.Call("UserService.UpdateUserScore", in, out)
  574. }
  575. func (c *UserServiceClient) AddUserScoreLog(in *Request, out *Response) error {
  576. return c.Call("UserService.AddUserScoreLog", in, out)
  577. }
  578. func (c *UserServiceClient) AddUserUpgrade(in *Request, out *Response) error {
  579. return c.Call("UserService.AddUserUpgrade", in, out)
  580. }
  581. func (c *UserServiceClient) UpdateUserUpgrade(in *Request, out *Response) error {
  582. return c.Call("UserService.UpdateUserUpgrade", in, out)
  583. }
  584. func (c *UserServiceClient) AddUserUpgradeLog(in *Request, out *Response) error {
  585. return c.Call("UserService.AddUserUpgradeLog", in, out)
  586. }
  587. func (c *UserServiceClient) AddUserRedEnvelope(in *Request, out *Response) error {
  588. return c.Call("UserService.AddUserRedEnvelope", in, out)
  589. }
  590. func (c *UserServiceClient) UpdateUserRedEnvelope(in *Request, out *Response) error {
  591. return c.Call("UserService.UpdateUserRedEnvelope", in, out)
  592. }
  593. func (c *UserServiceClient) AddUserRedEnvelopeLog(in *Request, out *Response) error {
  594. return c.Call("UserService.AddUserRedEnvelopeLog", in, out)
  595. }
  596. func (c *UserServiceClient) AddUserCoupon(in *Request, out *Response) error {
  597. return c.Call("UserService.AddUserCoupon", in, out)
  598. }
  599. func (c *UserServiceClient) UpdateUserCoupon(in *Request, out *Response) error {
  600. return c.Call("UserService.UpdateUserCoupon", in, out)
  601. }
  602. func (c *UserServiceClient) Fans(in *Request, out *Response) error {
  603. return c.Call("UserService.Fans", in, out)
  604. }
  605. // DialUserService connects to an UserService at the specified network address.
  606. func DialUserService(network, addr string) (*UserServiceClient, *rpc.Client, error) {
  607. c, err := protorpc.Dial(network, addr)
  608. if err != nil {
  609. return nil, nil, err
  610. }
  611. return &UserServiceClient{c}, c, nil
  612. }
  613. // DialUserServiceTimeout connects to an UserService at the specified network address.
  614. func DialUserServiceTimeout(network, addr string,
  615. timeout time.Duration) (*UserServiceClient, *rpc.Client, error) {
  616. c, err := protorpc.DialTimeout(network, addr, timeout)
  617. if err != nil {
  618. return nil, nil, err
  619. }
  620. return &UserServiceClient{c}, c, nil
  621. }