neighbor.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. package impl
  2. import (
  3. "context"
  4. "git.getensh.com/common/gopkgs/tasker/rpctasker"
  5. "property-garden/impl/v1/neighbor"
  6. pb_v1 "property-garden/pb/v1"
  7. )
  8. //
  9. func (c *Rcvr) NeighborClassAdd(ctx context.Context, req *pb_v1.NeighborClassAddRequest) (reply *pb_v1.NeighborClassAddReply, err error) {
  10. t1 := func() error {
  11. reply, err = neighbor.NeighborClassAdd(ctx, req)
  12. return err
  13. }
  14. return reply, rpctasker.Exec(ctx, t1)
  15. }
  16. func (c *Rcvr) NeighborClassDel(ctx context.Context, req *pb_v1.NeighborClassDelRequest) (reply *pb_v1.NeighborClassDelReply, err error) {
  17. t1 := func() error {
  18. reply, err = neighbor.NeighborClassDel(ctx, req)
  19. return err
  20. }
  21. return reply, rpctasker.Exec(ctx, t1)
  22. }
  23. func (c *Rcvr) NeighborClassUpdate(ctx context.Context, req *pb_v1.NeighborClassUpdateRequest) (reply *pb_v1.NeighborClassUpdateReply, err error) {
  24. t1 := func() error {
  25. reply, err = neighbor.NeighborClassUpdate(ctx, req)
  26. return err
  27. }
  28. return reply, rpctasker.Exec(ctx, t1)
  29. }
  30. func (c *Rcvr) NeighborClassList(ctx context.Context, req *pb_v1.NeighborClassListRequest) (reply *pb_v1.NeighborClassListReply, err error) {
  31. t1 := func() error {
  32. reply, err = neighbor.NeighborClassList(ctx, req)
  33. return err
  34. }
  35. return reply, rpctasker.Exec(ctx, t1)
  36. }
  37. func (c *Rcvr) NeighborArticleAdd(ctx context.Context, req *pb_v1.NeighborArticleAddRequest) (reply *pb_v1.NeighborArticleAddReply, err error) {
  38. t1 := func() error {
  39. reply, err = neighbor.NeighborArticleAdd(ctx, req)
  40. return err
  41. }
  42. return reply, rpctasker.Exec(ctx, t1)
  43. }
  44. func (c *Rcvr) NeighborArticleDel(ctx context.Context, req *pb_v1.NeighborArticleDelRequest) (reply *pb_v1.NeighborArticleDelReply, err error) {
  45. t1 := func() error {
  46. reply, err = neighbor.NeighborArticleDel(ctx, req)
  47. return err
  48. }
  49. return reply, rpctasker.Exec(ctx, t1)
  50. }
  51. func (c *Rcvr) NeighborArticleUpdate(ctx context.Context, req *pb_v1.NeighborArticleUpdateRequest) (reply *pb_v1.NeighborArticleUpdateReply, err error) {
  52. t1 := func() error {
  53. reply, err = neighbor.NeighborArticleUpdate(ctx, req)
  54. return err
  55. }
  56. return reply, rpctasker.Exec(ctx, t1)
  57. }
  58. func (c *Rcvr) NeighborArticleList(ctx context.Context, req *pb_v1.NeighborArticleListRequest) (reply *pb_v1.NeighborArticleListReply, err error) {
  59. t1 := func() error {
  60. reply, err = neighbor.NeighborArticleList(ctx, req)
  61. return err
  62. }
  63. return reply, rpctasker.Exec(ctx, t1)
  64. }
  65. func (c *Rcvr) NeighborCommentAdd(ctx context.Context, req *pb_v1.NeighborCommentAddRequest) (reply *pb_v1.NeighborCommentAddReply, err error) {
  66. t1 := func() error {
  67. reply, err = neighbor.NeighborCommentAdd(ctx, req)
  68. return err
  69. }
  70. return reply, rpctasker.Exec(ctx, t1)
  71. }
  72. func (c *Rcvr) NeighborCommentDel(ctx context.Context, req *pb_v1.NeighborCommentDelRequest) (reply *pb_v1.NeighborCommentDelReply, err error) {
  73. t1 := func() error {
  74. reply, err = neighbor.NeighborCommentDel(ctx, req)
  75. return err
  76. }
  77. return reply, rpctasker.Exec(ctx, t1)
  78. }
  79. func (c *Rcvr) NeighborCommentUpdate(ctx context.Context, req *pb_v1.NeighborCommentUpdateRequest) (reply *pb_v1.NeighborCommentUpdateReply, err error) {
  80. t1 := func() error {
  81. reply, err = neighbor.NeighborCommentUpdate(ctx, req)
  82. return err
  83. }
  84. return reply, rpctasker.Exec(ctx, t1)
  85. }
  86. func (c *Rcvr) NeighborCommentList(ctx context.Context, req *pb_v1.NeighborCommentListRequest) (reply *pb_v1.NeighborCommentListReply, err error) {
  87. t1 := func() error {
  88. reply, err = neighbor.NeighborCommentList(ctx, req)
  89. return err
  90. }
  91. return reply, rpctasker.Exec(ctx, t1)
  92. }
  93. func (c *Rcvr) NeighborLike(ctx context.Context, req *pb_v1.NeighborLikeRequest) (reply *pb_v1.NeighborLikeReply, err error) {
  94. t1 := func() error {
  95. reply, err = neighbor.NeighborLike(ctx, req)
  96. return err
  97. }
  98. return reply, rpctasker.Exec(ctx, t1)
  99. }