cosmossdk.io/client/v2@v2.0.0-beta.1/internal/testpb/msg_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 3 package testpb 4 5 import ( 6 context "context" 7 grpc "google.golang.org/grpc" 8 codes "google.golang.org/grpc/codes" 9 status "google.golang.org/grpc/status" 10 ) 11 12 // This is a compile-time assertion to ensure that this generated file 13 // is compatible with the grpc package it is being compiled against. 14 // Requires gRPC-Go v1.32.0 or later. 15 const _ = grpc.SupportPackageIsVersion7 16 17 // MsgClient is the client API for Msg 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 MsgClient interface { 21 // Send a request and returns the request as a response. 22 Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallOption) (*MsgResponse, error) 23 } 24 25 type msgClient struct { 26 cc grpc.ClientConnInterface 27 } 28 29 func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { 30 return &msgClient{cc} 31 } 32 33 func (c *msgClient) Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallOption) (*MsgResponse, error) { 34 out := new(MsgResponse) 35 err := c.cc.Invoke(ctx, "/testpb.Msg/Send", in, out, opts...) 36 if err != nil { 37 return nil, err 38 } 39 return out, nil 40 } 41 42 // MsgServer is the server API for Msg service. 43 // All implementations must embed UnimplementedMsgServer 44 // for forward compatibility 45 type MsgServer interface { 46 // Send a request and returns the request as a response. 47 Send(context.Context, *MsgRequest) (*MsgResponse, error) 48 mustEmbedUnimplementedMsgServer() 49 } 50 51 // UnimplementedMsgServer must be embedded to have forward compatible implementations. 52 type UnimplementedMsgServer struct { 53 } 54 55 func (UnimplementedMsgServer) Send(context.Context, *MsgRequest) (*MsgResponse, error) { 56 return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") 57 } 58 func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} 59 60 // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. 61 // Use of this interface is not recommended, as added methods to MsgServer will 62 // result in compilation errors. 63 type UnsafeMsgServer interface { 64 mustEmbedUnimplementedMsgServer() 65 } 66 67 func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { 68 s.RegisterService(&Msg_ServiceDesc, srv) 69 } 70 71 func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 72 in := new(MsgRequest) 73 if err := dec(in); err != nil { 74 return nil, err 75 } 76 if interceptor == nil { 77 return srv.(MsgServer).Send(ctx, in) 78 } 79 info := &grpc.UnaryServerInfo{ 80 Server: srv, 81 FullMethod: "/testpb.Msg/Send", 82 } 83 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 84 return srv.(MsgServer).Send(ctx, req.(*MsgRequest)) 85 } 86 return interceptor(ctx, in, info, handler) 87 } 88 89 // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. 90 // It's only intended for direct use with grpc.RegisterService, 91 // and not to be introspected or modified (even as a copy) 92 var Msg_ServiceDesc = grpc.ServiceDesc{ 93 ServiceName: "testpb.Msg", 94 HandlerType: (*MsgServer)(nil), 95 Methods: []grpc.MethodDesc{ 96 { 97 MethodName: "Send", 98 Handler: _Msg_Send_Handler, 99 }, 100 }, 101 Streams: []grpc.StreamDesc{}, 102 Metadata: "testpb/msg.proto", 103 }