rpc.go 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package gorpc
  2. import (
  3. "context"
  4. "go-common/app/service/main/member/model"
  5. "go-common/library/net/rpc"
  6. )
  7. const (
  8. _appid = "account.service.member"
  9. )
  10. var (
  11. _noRes = &struct{}{}
  12. _ RPC = &Service{}
  13. )
  14. // Service is a question service.
  15. type Service struct {
  16. client *rpc.Client2
  17. }
  18. // New new a question service.
  19. func New(c *rpc.ClientConfig) (s *Service) {
  20. s = &Service{}
  21. s.client = rpc.NewDiscoveryCli(_appid, c)
  22. return
  23. }
  24. //go:generate mockgen -source member.go -destination mock.go -package member
  25. // RPC is
  26. type RPC interface {
  27. Exp(c context.Context, arg *model.ArgMid2) (res *model.LevelInfo, err error)
  28. Level(c context.Context, arg *model.ArgMid2) (res *model.LevelInfo, err error)
  29. Log(c context.Context, arg *model.ArgMid2) (res []*model.UserLog, err error)
  30. Stat(c context.Context, arg *model.ArgMid2) (res *model.ExpStat, err error)
  31. UpdateExp(c context.Context, arg *model.ArgAddExp) (err error)
  32. Base(c context.Context, arg *model.ArgMemberMid) (res *model.BaseInfo, err error)
  33. Bases(c context.Context, arg *model.ArgMemberMids) (res map[int64]*model.BaseInfo, err error)
  34. Member(c context.Context, arg *model.ArgMemberMid) (res *model.Member, err error)
  35. Members(c context.Context, arg *model.ArgMemberMids) (res map[int64]*model.Member, err error)
  36. NickUpdated(c context.Context, arg *model.ArgMemberMid) (res bool, err error)
  37. SetNickUpdated(c context.Context, arg *model.ArgMemberMid) (err error)
  38. SetOfficialDoc(c context.Context, arg *model.ArgOfficialDoc) (err error)
  39. SetName(c context.Context, arg *model.ArgUpdateUname) (err error)
  40. SetSign(c context.Context, arg *model.ArgUpdateSign) (err error)
  41. SetBirthday(c context.Context, arg *model.ArgUpdateBirthday) (err error)
  42. SetFace(c context.Context, arg *model.ArgUpdateFace) (err error)
  43. SetSex(c context.Context, arg *model.ArgUpdateSex) (err error)
  44. SetRank(c context.Context, arg *model.ArgUpdateRank) (err error)
  45. OfficialDoc(c context.Context, arg *model.ArgMid) (res *model.OfficialDoc, err error)
  46. Moral(c context.Context, arg *model.ArgMemberMid) (res *model.Moral, err error)
  47. MoralLog(c context.Context, arg *model.ArgMemberMid) (res []*model.UserLog, err error)
  48. AddMoral(c context.Context, arg *model.ArgUpdateMoral) (err error)
  49. BatchAddMoral(c context.Context, arg *model.ArgUpdateMorals) (res map[int64]int64, err error)
  50. AddUserMonitor(c context.Context, arg *model.ArgAddUserMonitor) error
  51. IsInMonitor(c context.Context, arg *model.ArgMid) (bool, error)
  52. AddPropertyReview(c context.Context, arg *model.ArgAddPropertyReview) error
  53. RealnameStatus(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameStatus, err error)
  54. RealnameApplyStatus(c context.Context, arg *model.ArgMemberMid) (res *model.RealnameApplyStatusInfo, err error)
  55. RealnameTelCapture(c context.Context, arg *model.ArgMemberMid) (err error)
  56. RealnameApply(c context.Context, arg *model.ArgRealnameApply) (err error)
  57. }