transfer_grpc.pb.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.19.4
  5. // source: pb/transfer.proto
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // TransferClient is the client API for Transfer service.
  18. //
  19. // 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.
  20. type TransferClient interface {
  21. Invoke(ctx context.Context, in *TransferReq, opts ...grpc.CallOption) (*TransferResp, error)
  22. }
  23. type transferClient struct {
  24. cc grpc.ClientConnInterface
  25. }
  26. func NewTransferClient(cc grpc.ClientConnInterface) TransferClient {
  27. return &transferClient{cc}
  28. }
  29. func (c *transferClient) Invoke(ctx context.Context, in *TransferReq, opts ...grpc.CallOption) (*TransferResp, error) {
  30. out := new(TransferResp)
  31. err := c.cc.Invoke(ctx, "/pb.Transfer/invoke", in, out, opts...)
  32. if err != nil {
  33. return nil, err
  34. }
  35. return out, nil
  36. }
  37. // TransferServer is the server API for Transfer service.
  38. // All implementations must embed UnimplementedTransferServer
  39. // for forward compatibility
  40. type TransferServer interface {
  41. Invoke(context.Context, *TransferReq) (*TransferResp, error)
  42. mustEmbedUnimplementedTransferServer()
  43. }
  44. // UnimplementedTransferServer must be embedded to have forward compatible implementations.
  45. type UnimplementedTransferServer struct {
  46. }
  47. func (UnimplementedTransferServer) Invoke(context.Context, *TransferReq) (*TransferResp, error) {
  48. return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
  49. }
  50. func (UnimplementedTransferServer) mustEmbedUnimplementedTransferServer() {}
  51. // UnsafeTransferServer may be embedded to opt out of forward compatibility for this service.
  52. // Use of this interface is not recommended, as added methods to TransferServer will
  53. // result in compilation errors.
  54. type UnsafeTransferServer interface {
  55. mustEmbedUnimplementedTransferServer()
  56. }
  57. func RegisterTransferServer(s grpc.ServiceRegistrar, srv TransferServer) {
  58. s.RegisterService(&Transfer_ServiceDesc, srv)
  59. }
  60. func _Transfer_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  61. in := new(TransferReq)
  62. if err := dec(in); err != nil {
  63. return nil, err
  64. }
  65. if interceptor == nil {
  66. return srv.(TransferServer).Invoke(ctx, in)
  67. }
  68. info := &grpc.UnaryServerInfo{
  69. Server: srv,
  70. FullMethod: "/pb.Transfer/invoke",
  71. }
  72. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  73. return srv.(TransferServer).Invoke(ctx, req.(*TransferReq))
  74. }
  75. return interceptor(ctx, in, info, handler)
  76. }
  77. // Transfer_ServiceDesc is the grpc.ServiceDesc for Transfer service.
  78. // It's only intended for direct use with grpc.RegisterService,
  79. // and not to be introspected or modified (even as a copy)
  80. var Transfer_ServiceDesc = grpc.ServiceDesc{
  81. ServiceName: "pb.Transfer",
  82. HandlerType: (*TransferServer)(nil),
  83. Methods: []grpc.MethodDesc{
  84. {
  85. MethodName: "invoke",
  86. Handler: _Transfer_Invoke_Handler,
  87. },
  88. },
  89. Streams: []grpc.StreamDesc{},
  90. Metadata: "pb/transfer.proto",
  91. }