scrip_grpc.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package scrip
  3. import (
  4. context "context"
  5. common "git.ikuban.com/server/pw-protobuf/api/common"
  6. grpc "google.golang.org/grpc"
  7. codes "google.golang.org/grpc/codes"
  8. status "google.golang.org/grpc/status"
  9. emptypb "google.golang.org/protobuf/types/known/emptypb"
  10. )
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the grpc package it is being compiled against.
  13. // Requires gRPC-Go v1.32.0 or later.
  14. const _ = grpc.SupportPackageIsVersion7
  15. // ScripClient is the client API for Scrip service.
  16. //
  17. // 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.
  18. type ScripClient interface {
  19. // 创建纸条
  20. CreateScrip(ctx context.Context, in *common.CreateScripRequest, opts ...grpc.CallOption) (*common.ScripID, error)
  21. // 删除纸条
  22. DeleteScrip(ctx context.Context, in *common.DeleteScripRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  23. // 查询自己的小纸条
  24. FindMyScrip(ctx context.Context, in *common.FindScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error)
  25. // 查询别人的小纸条
  26. FindOtherScrip(ctx context.Context, in *common.FindOtherScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error)
  27. // 查询随机纸条列表
  28. FindRecommendScrip(ctx context.Context, in *common.FindScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error)
  29. // 用户查看纸条
  30. PersonLookScrip(ctx context.Context, in *common.PersonLookScripRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  31. // 用户点击回看
  32. PersonClickLookBack(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.ScripInfo, error)
  33. // 回复小纸条
  34. PersonReplyScrip(ctx context.Context, in *common.ReplyScripRequest, opts ...grpc.CallOption) (*common.ChatRecordInfo, error)
  35. // 用户被拉黑后删除精选中的小纸条
  36. DeleteScripByPersonID(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
  37. }
  38. type scripClient struct {
  39. cc grpc.ClientConnInterface
  40. }
  41. func NewScripClient(cc grpc.ClientConnInterface) ScripClient {
  42. return &scripClient{cc}
  43. }
  44. func (c *scripClient) CreateScrip(ctx context.Context, in *common.CreateScripRequest, opts ...grpc.CallOption) (*common.ScripID, error) {
  45. out := new(common.ScripID)
  46. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/CreateScrip", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *scripClient) DeleteScrip(ctx context.Context, in *common.DeleteScripRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  53. out := new(emptypb.Empty)
  54. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/DeleteScrip", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. func (c *scripClient) FindMyScrip(ctx context.Context, in *common.FindScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error) {
  61. out := new(common.ScripReply)
  62. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/FindMyScrip", in, out, opts...)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return out, nil
  67. }
  68. func (c *scripClient) FindOtherScrip(ctx context.Context, in *common.FindOtherScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error) {
  69. out := new(common.ScripReply)
  70. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/FindOtherScrip", in, out, opts...)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return out, nil
  75. }
  76. func (c *scripClient) FindRecommendScrip(ctx context.Context, in *common.FindScripRequest, opts ...grpc.CallOption) (*common.ScripReply, error) {
  77. out := new(common.ScripReply)
  78. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/FindRecommendScrip", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *scripClient) PersonLookScrip(ctx context.Context, in *common.PersonLookScripRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  85. out := new(emptypb.Empty)
  86. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/PersonLookScrip", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *scripClient) PersonClickLookBack(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.ScripInfo, error) {
  93. out := new(common.ScripInfo)
  94. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/PersonClickLookBack", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. func (c *scripClient) PersonReplyScrip(ctx context.Context, in *common.ReplyScripRequest, opts ...grpc.CallOption) (*common.ChatRecordInfo, error) {
  101. out := new(common.ChatRecordInfo)
  102. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/PersonReplyScrip", in, out, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *scripClient) DeleteScripByPersonID(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  109. out := new(emptypb.Empty)
  110. err := c.cc.Invoke(ctx, "/api.scrip.Scrip/DeleteScripByPersonID", in, out, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. // ScripServer is the server API for Scrip service.
  117. // All implementations must embed UnimplementedScripServer
  118. // for forward compatibility
  119. type ScripServer interface {
  120. // 创建纸条
  121. CreateScrip(context.Context, *common.CreateScripRequest) (*common.ScripID, error)
  122. // 删除纸条
  123. DeleteScrip(context.Context, *common.DeleteScripRequest) (*emptypb.Empty, error)
  124. // 查询自己的小纸条
  125. FindMyScrip(context.Context, *common.FindScripRequest) (*common.ScripReply, error)
  126. // 查询别人的小纸条
  127. FindOtherScrip(context.Context, *common.FindOtherScripRequest) (*common.ScripReply, error)
  128. // 查询随机纸条列表
  129. FindRecommendScrip(context.Context, *common.FindScripRequest) (*common.ScripReply, error)
  130. // 用户查看纸条
  131. PersonLookScrip(context.Context, *common.PersonLookScripRequest) (*emptypb.Empty, error)
  132. // 用户点击回看
  133. PersonClickLookBack(context.Context, *common.PersonParam) (*common.ScripInfo, error)
  134. // 回复小纸条
  135. PersonReplyScrip(context.Context, *common.ReplyScripRequest) (*common.ChatRecordInfo, error)
  136. // 用户被拉黑后删除精选中的小纸条
  137. DeleteScripByPersonID(context.Context, *common.PersonIDParam) (*emptypb.Empty, error)
  138. mustEmbedUnimplementedScripServer()
  139. }
  140. // UnimplementedScripServer must be embedded to have forward compatible implementations.
  141. type UnimplementedScripServer struct {
  142. }
  143. func (UnimplementedScripServer) CreateScrip(context.Context, *common.CreateScripRequest) (*common.ScripID, error) {
  144. return nil, status.Errorf(codes.Unimplemented, "method CreateScrip not implemented")
  145. }
  146. func (UnimplementedScripServer) DeleteScrip(context.Context, *common.DeleteScripRequest) (*emptypb.Empty, error) {
  147. return nil, status.Errorf(codes.Unimplemented, "method DeleteScrip not implemented")
  148. }
  149. func (UnimplementedScripServer) FindMyScrip(context.Context, *common.FindScripRequest) (*common.ScripReply, error) {
  150. return nil, status.Errorf(codes.Unimplemented, "method FindMyScrip not implemented")
  151. }
  152. func (UnimplementedScripServer) FindOtherScrip(context.Context, *common.FindOtherScripRequest) (*common.ScripReply, error) {
  153. return nil, status.Errorf(codes.Unimplemented, "method FindOtherScrip not implemented")
  154. }
  155. func (UnimplementedScripServer) FindRecommendScrip(context.Context, *common.FindScripRequest) (*common.ScripReply, error) {
  156. return nil, status.Errorf(codes.Unimplemented, "method FindRecommendScrip not implemented")
  157. }
  158. func (UnimplementedScripServer) PersonLookScrip(context.Context, *common.PersonLookScripRequest) (*emptypb.Empty, error) {
  159. return nil, status.Errorf(codes.Unimplemented, "method PersonLookScrip not implemented")
  160. }
  161. func (UnimplementedScripServer) PersonClickLookBack(context.Context, *common.PersonParam) (*common.ScripInfo, error) {
  162. return nil, status.Errorf(codes.Unimplemented, "method PersonClickLookBack not implemented")
  163. }
  164. func (UnimplementedScripServer) PersonReplyScrip(context.Context, *common.ReplyScripRequest) (*common.ChatRecordInfo, error) {
  165. return nil, status.Errorf(codes.Unimplemented, "method PersonReplyScrip not implemented")
  166. }
  167. func (UnimplementedScripServer) DeleteScripByPersonID(context.Context, *common.PersonIDParam) (*emptypb.Empty, error) {
  168. return nil, status.Errorf(codes.Unimplemented, "method DeleteScripByPersonID not implemented")
  169. }
  170. func (UnimplementedScripServer) mustEmbedUnimplementedScripServer() {}
  171. // UnsafeScripServer may be embedded to opt out of forward compatibility for this service.
  172. // Use of this interface is not recommended, as added methods to ScripServer will
  173. // result in compilation errors.
  174. type UnsafeScripServer interface {
  175. mustEmbedUnimplementedScripServer()
  176. }
  177. func RegisterScripServer(s grpc.ServiceRegistrar, srv ScripServer) {
  178. s.RegisterService(&Scrip_ServiceDesc, srv)
  179. }
  180. func _Scrip_CreateScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  181. in := new(common.CreateScripRequest)
  182. if err := dec(in); err != nil {
  183. return nil, err
  184. }
  185. if interceptor == nil {
  186. return srv.(ScripServer).CreateScrip(ctx, in)
  187. }
  188. info := &grpc.UnaryServerInfo{
  189. Server: srv,
  190. FullMethod: "/api.scrip.Scrip/CreateScrip",
  191. }
  192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  193. return srv.(ScripServer).CreateScrip(ctx, req.(*common.CreateScripRequest))
  194. }
  195. return interceptor(ctx, in, info, handler)
  196. }
  197. func _Scrip_DeleteScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  198. in := new(common.DeleteScripRequest)
  199. if err := dec(in); err != nil {
  200. return nil, err
  201. }
  202. if interceptor == nil {
  203. return srv.(ScripServer).DeleteScrip(ctx, in)
  204. }
  205. info := &grpc.UnaryServerInfo{
  206. Server: srv,
  207. FullMethod: "/api.scrip.Scrip/DeleteScrip",
  208. }
  209. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  210. return srv.(ScripServer).DeleteScrip(ctx, req.(*common.DeleteScripRequest))
  211. }
  212. return interceptor(ctx, in, info, handler)
  213. }
  214. func _Scrip_FindMyScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  215. in := new(common.FindScripRequest)
  216. if err := dec(in); err != nil {
  217. return nil, err
  218. }
  219. if interceptor == nil {
  220. return srv.(ScripServer).FindMyScrip(ctx, in)
  221. }
  222. info := &grpc.UnaryServerInfo{
  223. Server: srv,
  224. FullMethod: "/api.scrip.Scrip/FindMyScrip",
  225. }
  226. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  227. return srv.(ScripServer).FindMyScrip(ctx, req.(*common.FindScripRequest))
  228. }
  229. return interceptor(ctx, in, info, handler)
  230. }
  231. func _Scrip_FindOtherScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  232. in := new(common.FindOtherScripRequest)
  233. if err := dec(in); err != nil {
  234. return nil, err
  235. }
  236. if interceptor == nil {
  237. return srv.(ScripServer).FindOtherScrip(ctx, in)
  238. }
  239. info := &grpc.UnaryServerInfo{
  240. Server: srv,
  241. FullMethod: "/api.scrip.Scrip/FindOtherScrip",
  242. }
  243. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  244. return srv.(ScripServer).FindOtherScrip(ctx, req.(*common.FindOtherScripRequest))
  245. }
  246. return interceptor(ctx, in, info, handler)
  247. }
  248. func _Scrip_FindRecommendScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  249. in := new(common.FindScripRequest)
  250. if err := dec(in); err != nil {
  251. return nil, err
  252. }
  253. if interceptor == nil {
  254. return srv.(ScripServer).FindRecommendScrip(ctx, in)
  255. }
  256. info := &grpc.UnaryServerInfo{
  257. Server: srv,
  258. FullMethod: "/api.scrip.Scrip/FindRecommendScrip",
  259. }
  260. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  261. return srv.(ScripServer).FindRecommendScrip(ctx, req.(*common.FindScripRequest))
  262. }
  263. return interceptor(ctx, in, info, handler)
  264. }
  265. func _Scrip_PersonLookScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  266. in := new(common.PersonLookScripRequest)
  267. if err := dec(in); err != nil {
  268. return nil, err
  269. }
  270. if interceptor == nil {
  271. return srv.(ScripServer).PersonLookScrip(ctx, in)
  272. }
  273. info := &grpc.UnaryServerInfo{
  274. Server: srv,
  275. FullMethod: "/api.scrip.Scrip/PersonLookScrip",
  276. }
  277. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  278. return srv.(ScripServer).PersonLookScrip(ctx, req.(*common.PersonLookScripRequest))
  279. }
  280. return interceptor(ctx, in, info, handler)
  281. }
  282. func _Scrip_PersonClickLookBack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  283. in := new(common.PersonParam)
  284. if err := dec(in); err != nil {
  285. return nil, err
  286. }
  287. if interceptor == nil {
  288. return srv.(ScripServer).PersonClickLookBack(ctx, in)
  289. }
  290. info := &grpc.UnaryServerInfo{
  291. Server: srv,
  292. FullMethod: "/api.scrip.Scrip/PersonClickLookBack",
  293. }
  294. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  295. return srv.(ScripServer).PersonClickLookBack(ctx, req.(*common.PersonParam))
  296. }
  297. return interceptor(ctx, in, info, handler)
  298. }
  299. func _Scrip_PersonReplyScrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  300. in := new(common.ReplyScripRequest)
  301. if err := dec(in); err != nil {
  302. return nil, err
  303. }
  304. if interceptor == nil {
  305. return srv.(ScripServer).PersonReplyScrip(ctx, in)
  306. }
  307. info := &grpc.UnaryServerInfo{
  308. Server: srv,
  309. FullMethod: "/api.scrip.Scrip/PersonReplyScrip",
  310. }
  311. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  312. return srv.(ScripServer).PersonReplyScrip(ctx, req.(*common.ReplyScripRequest))
  313. }
  314. return interceptor(ctx, in, info, handler)
  315. }
  316. func _Scrip_DeleteScripByPersonID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  317. in := new(common.PersonIDParam)
  318. if err := dec(in); err != nil {
  319. return nil, err
  320. }
  321. if interceptor == nil {
  322. return srv.(ScripServer).DeleteScripByPersonID(ctx, in)
  323. }
  324. info := &grpc.UnaryServerInfo{
  325. Server: srv,
  326. FullMethod: "/api.scrip.Scrip/DeleteScripByPersonID",
  327. }
  328. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  329. return srv.(ScripServer).DeleteScripByPersonID(ctx, req.(*common.PersonIDParam))
  330. }
  331. return interceptor(ctx, in, info, handler)
  332. }
  333. // Scrip_ServiceDesc is the grpc.ServiceDesc for Scrip service.
  334. // It's only intended for direct use with grpc.RegisterService,
  335. // and not to be introspected or modified (even as a copy)
  336. var Scrip_ServiceDesc = grpc.ServiceDesc{
  337. ServiceName: "api.scrip.Scrip",
  338. HandlerType: (*ScripServer)(nil),
  339. Methods: []grpc.MethodDesc{
  340. {
  341. MethodName: "CreateScrip",
  342. Handler: _Scrip_CreateScrip_Handler,
  343. },
  344. {
  345. MethodName: "DeleteScrip",
  346. Handler: _Scrip_DeleteScrip_Handler,
  347. },
  348. {
  349. MethodName: "FindMyScrip",
  350. Handler: _Scrip_FindMyScrip_Handler,
  351. },
  352. {
  353. MethodName: "FindOtherScrip",
  354. Handler: _Scrip_FindOtherScrip_Handler,
  355. },
  356. {
  357. MethodName: "FindRecommendScrip",
  358. Handler: _Scrip_FindRecommendScrip_Handler,
  359. },
  360. {
  361. MethodName: "PersonLookScrip",
  362. Handler: _Scrip_PersonLookScrip_Handler,
  363. },
  364. {
  365. MethodName: "PersonClickLookBack",
  366. Handler: _Scrip_PersonClickLookBack_Handler,
  367. },
  368. {
  369. MethodName: "PersonReplyScrip",
  370. Handler: _Scrip_PersonReplyScrip_Handler,
  371. },
  372. {
  373. MethodName: "DeleteScripByPersonID",
  374. Handler: _Scrip_DeleteScripByPersonID_Handler,
  375. },
  376. },
  377. Streams: []grpc.StreamDesc{},
  378. Metadata: "scrip.proto",
  379. }