activity_grpc.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package activity
  3. import (
  4. context "context"
  5. grpc "google.golang.org/grpc"
  6. codes "google.golang.org/grpc/codes"
  7. status "google.golang.org/grpc/status"
  8. emptypb "google.golang.org/protobuf/types/known/emptypb"
  9. )
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the grpc package it is being compiled against.
  12. // Requires gRPC-Go v1.32.0 or later.
  13. const _ = grpc.SupportPackageIsVersion7
  14. // ActivityClient is the client API for Activity service.
  15. //
  16. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  17. type ActivityClient interface {
  18. // 签到列表
  19. FindSignInList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindSignInListReply, error)
  20. // 签到
  21. Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  22. // 补签双倍
  23. GetSignDouble(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
  24. // 查询任务列表
  25. FindTaskList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindTaskListReply, error)
  26. // 完成任务
  27. FinishTask(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  28. // 获取任务奖励
  29. GetTaskCredit(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  30. }
  31. type activityClient struct {
  32. cc grpc.ClientConnInterface
  33. }
  34. func NewActivityClient(cc grpc.ClientConnInterface) ActivityClient {
  35. return &activityClient{cc}
  36. }
  37. func (c *activityClient) FindSignInList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindSignInListReply, error) {
  38. out := new(FindSignInListReply)
  39. err := c.cc.Invoke(ctx, "/api.activity.Activity/FindSignInList", in, out, opts...)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return out, nil
  44. }
  45. func (c *activityClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  46. out := new(emptypb.Empty)
  47. err := c.cc.Invoke(ctx, "/api.activity.Activity/Sign", in, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *activityClient) GetSignDouble(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  54. out := new(emptypb.Empty)
  55. err := c.cc.Invoke(ctx, "/api.activity.Activity/GetSignDouble", in, out, opts...)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *activityClient) FindTaskList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindTaskListReply, error) {
  62. out := new(FindTaskListReply)
  63. err := c.cc.Invoke(ctx, "/api.activity.Activity/FindTaskList", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *activityClient) FinishTask(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  70. out := new(emptypb.Empty)
  71. err := c.cc.Invoke(ctx, "/api.activity.Activity/FinishTask", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *activityClient) GetTaskCredit(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  78. out := new(emptypb.Empty)
  79. err := c.cc.Invoke(ctx, "/api.activity.Activity/GetTaskCredit", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. // ActivityServer is the server API for Activity service.
  86. // All implementations must embed UnimplementedActivityServer
  87. // for forward compatibility
  88. type ActivityServer interface {
  89. // 签到列表
  90. FindSignInList(context.Context, *emptypb.Empty) (*FindSignInListReply, error)
  91. // 签到
  92. Sign(context.Context, *SignRequest) (*emptypb.Empty, error)
  93. // 补签双倍
  94. GetSignDouble(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
  95. // 查询任务列表
  96. FindTaskList(context.Context, *emptypb.Empty) (*FindTaskListReply, error)
  97. // 完成任务
  98. FinishTask(context.Context, *TaskRequest) (*emptypb.Empty, error)
  99. // 获取任务奖励
  100. GetTaskCredit(context.Context, *TaskRequest) (*emptypb.Empty, error)
  101. mustEmbedUnimplementedActivityServer()
  102. }
  103. // UnimplementedActivityServer must be embedded to have forward compatible implementations.
  104. type UnimplementedActivityServer struct {
  105. }
  106. func (UnimplementedActivityServer) FindSignInList(context.Context, *emptypb.Empty) (*FindSignInListReply, error) {
  107. return nil, status.Errorf(codes.Unimplemented, "method FindSignInList not implemented")
  108. }
  109. func (UnimplementedActivityServer) Sign(context.Context, *SignRequest) (*emptypb.Empty, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
  111. }
  112. func (UnimplementedActivityServer) GetSignDouble(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
  113. return nil, status.Errorf(codes.Unimplemented, "method GetSignDouble not implemented")
  114. }
  115. func (UnimplementedActivityServer) FindTaskList(context.Context, *emptypb.Empty) (*FindTaskListReply, error) {
  116. return nil, status.Errorf(codes.Unimplemented, "method FindTaskList not implemented")
  117. }
  118. func (UnimplementedActivityServer) FinishTask(context.Context, *TaskRequest) (*emptypb.Empty, error) {
  119. return nil, status.Errorf(codes.Unimplemented, "method FinishTask not implemented")
  120. }
  121. func (UnimplementedActivityServer) GetTaskCredit(context.Context, *TaskRequest) (*emptypb.Empty, error) {
  122. return nil, status.Errorf(codes.Unimplemented, "method GetTaskCredit not implemented")
  123. }
  124. func (UnimplementedActivityServer) mustEmbedUnimplementedActivityServer() {}
  125. // UnsafeActivityServer may be embedded to opt out of forward compatibility for this service.
  126. // Use of this interface is not recommended, as added methods to ActivityServer will
  127. // result in compilation errors.
  128. type UnsafeActivityServer interface {
  129. mustEmbedUnimplementedActivityServer()
  130. }
  131. func RegisterActivityServer(s grpc.ServiceRegistrar, srv ActivityServer) {
  132. s.RegisterService(&Activity_ServiceDesc, srv)
  133. }
  134. func _Activity_FindSignInList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  135. in := new(emptypb.Empty)
  136. if err := dec(in); err != nil {
  137. return nil, err
  138. }
  139. if interceptor == nil {
  140. return srv.(ActivityServer).FindSignInList(ctx, in)
  141. }
  142. info := &grpc.UnaryServerInfo{
  143. Server: srv,
  144. FullMethod: "/api.activity.Activity/FindSignInList",
  145. }
  146. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  147. return srv.(ActivityServer).FindSignInList(ctx, req.(*emptypb.Empty))
  148. }
  149. return interceptor(ctx, in, info, handler)
  150. }
  151. func _Activity_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  152. in := new(SignRequest)
  153. if err := dec(in); err != nil {
  154. return nil, err
  155. }
  156. if interceptor == nil {
  157. return srv.(ActivityServer).Sign(ctx, in)
  158. }
  159. info := &grpc.UnaryServerInfo{
  160. Server: srv,
  161. FullMethod: "/api.activity.Activity/Sign",
  162. }
  163. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  164. return srv.(ActivityServer).Sign(ctx, req.(*SignRequest))
  165. }
  166. return interceptor(ctx, in, info, handler)
  167. }
  168. func _Activity_GetSignDouble_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  169. in := new(emptypb.Empty)
  170. if err := dec(in); err != nil {
  171. return nil, err
  172. }
  173. if interceptor == nil {
  174. return srv.(ActivityServer).GetSignDouble(ctx, in)
  175. }
  176. info := &grpc.UnaryServerInfo{
  177. Server: srv,
  178. FullMethod: "/api.activity.Activity/GetSignDouble",
  179. }
  180. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  181. return srv.(ActivityServer).GetSignDouble(ctx, req.(*emptypb.Empty))
  182. }
  183. return interceptor(ctx, in, info, handler)
  184. }
  185. func _Activity_FindTaskList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  186. in := new(emptypb.Empty)
  187. if err := dec(in); err != nil {
  188. return nil, err
  189. }
  190. if interceptor == nil {
  191. return srv.(ActivityServer).FindTaskList(ctx, in)
  192. }
  193. info := &grpc.UnaryServerInfo{
  194. Server: srv,
  195. FullMethod: "/api.activity.Activity/FindTaskList",
  196. }
  197. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  198. return srv.(ActivityServer).FindTaskList(ctx, req.(*emptypb.Empty))
  199. }
  200. return interceptor(ctx, in, info, handler)
  201. }
  202. func _Activity_FinishTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  203. in := new(TaskRequest)
  204. if err := dec(in); err != nil {
  205. return nil, err
  206. }
  207. if interceptor == nil {
  208. return srv.(ActivityServer).FinishTask(ctx, in)
  209. }
  210. info := &grpc.UnaryServerInfo{
  211. Server: srv,
  212. FullMethod: "/api.activity.Activity/FinishTask",
  213. }
  214. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  215. return srv.(ActivityServer).FinishTask(ctx, req.(*TaskRequest))
  216. }
  217. return interceptor(ctx, in, info, handler)
  218. }
  219. func _Activity_GetTaskCredit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  220. in := new(TaskRequest)
  221. if err := dec(in); err != nil {
  222. return nil, err
  223. }
  224. if interceptor == nil {
  225. return srv.(ActivityServer).GetTaskCredit(ctx, in)
  226. }
  227. info := &grpc.UnaryServerInfo{
  228. Server: srv,
  229. FullMethod: "/api.activity.Activity/GetTaskCredit",
  230. }
  231. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  232. return srv.(ActivityServer).GetTaskCredit(ctx, req.(*TaskRequest))
  233. }
  234. return interceptor(ctx, in, info, handler)
  235. }
  236. // Activity_ServiceDesc is the grpc.ServiceDesc for Activity service.
  237. // It's only intended for direct use with grpc.RegisterService,
  238. // and not to be introspected or modified (even as a copy)
  239. var Activity_ServiceDesc = grpc.ServiceDesc{
  240. ServiceName: "api.activity.Activity",
  241. HandlerType: (*ActivityServer)(nil),
  242. Methods: []grpc.MethodDesc{
  243. {
  244. MethodName: "FindSignInList",
  245. Handler: _Activity_FindSignInList_Handler,
  246. },
  247. {
  248. MethodName: "Sign",
  249. Handler: _Activity_Sign_Handler,
  250. },
  251. {
  252. MethodName: "GetSignDouble",
  253. Handler: _Activity_GetSignDouble_Handler,
  254. },
  255. {
  256. MethodName: "FindTaskList",
  257. Handler: _Activity_FindTaskList_Handler,
  258. },
  259. {
  260. MethodName: "FinishTask",
  261. Handler: _Activity_FinishTask_Handler,
  262. },
  263. {
  264. MethodName: "GetTaskCredit",
  265. Handler: _Activity_GetTaskCredit_Handler,
  266. },
  267. },
  268. Streams: []grpc.StreamDesc{},
  269. Metadata: "activity.proto",
  270. }