123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v3.19.4
- // source: pb/transfer.proto
- package pb
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // TransferClient is the client API for Transfer service.
- //
- // 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.
- type TransferClient interface {
- Invoke(ctx context.Context, in *TransferReq, opts ...grpc.CallOption) (*TransferResp, error)
- }
- type transferClient struct {
- cc grpc.ClientConnInterface
- }
- func NewTransferClient(cc grpc.ClientConnInterface) TransferClient {
- return &transferClient{cc}
- }
- func (c *transferClient) Invoke(ctx context.Context, in *TransferReq, opts ...grpc.CallOption) (*TransferResp, error) {
- out := new(TransferResp)
- err := c.cc.Invoke(ctx, "/pb.Transfer/invoke", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // TransferServer is the server API for Transfer service.
- // All implementations must embed UnimplementedTransferServer
- // for forward compatibility
- type TransferServer interface {
- Invoke(context.Context, *TransferReq) (*TransferResp, error)
- mustEmbedUnimplementedTransferServer()
- }
- // UnimplementedTransferServer must be embedded to have forward compatible implementations.
- type UnimplementedTransferServer struct {
- }
- func (UnimplementedTransferServer) Invoke(context.Context, *TransferReq) (*TransferResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
- }
- func (UnimplementedTransferServer) mustEmbedUnimplementedTransferServer() {}
- // UnsafeTransferServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to TransferServer will
- // result in compilation errors.
- type UnsafeTransferServer interface {
- mustEmbedUnimplementedTransferServer()
- }
- func RegisterTransferServer(s grpc.ServiceRegistrar, srv TransferServer) {
- s.RegisterService(&Transfer_ServiceDesc, srv)
- }
- func _Transfer_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(TransferReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(TransferServer).Invoke(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.Transfer/invoke",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(TransferServer).Invoke(ctx, req.(*TransferReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Transfer_ServiceDesc is the grpc.ServiceDesc for Transfer service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Transfer_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "pb.Transfer",
- HandlerType: (*TransferServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "invoke",
- Handler: _Transfer_Invoke_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "pb/transfer.proto",
- }
|