// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.1 // source: server.proto package api 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 const ( AstonTest_Ping_FullMethodName = "/astontest.AstonTest/Ping" ) // AstonTestClient is the client API for AstonTest 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 AstonTestClient interface { Ping(ctx context.Context, opts ...grpc.CallOption) (AstonTest_PingClient, error) } type astonTestClient struct { cc grpc.ClientConnInterface } func NewAstonTestClient(cc grpc.ClientConnInterface) AstonTestClient { return &astonTestClient{cc} } func (c *astonTestClient) Ping(ctx context.Context, opts ...grpc.CallOption) (AstonTest_PingClient, error) { stream, err := c.cc.NewStream(ctx, &AstonTest_ServiceDesc.Streams[0], AstonTest_Ping_FullMethodName, opts...) if err != nil { return nil, err } x := &astonTestPingClient{stream} return x, nil } type AstonTest_PingClient interface { Send(*PingPong) error Recv() (*PingPong, error) grpc.ClientStream } type astonTestPingClient struct { grpc.ClientStream } func (x *astonTestPingClient) Send(m *PingPong) error { return x.ClientStream.SendMsg(m) } func (x *astonTestPingClient) Recv() (*PingPong, error) { m := new(PingPong) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // AstonTestServer is the server API for AstonTest service. // All implementations must embed UnimplementedAstonTestServer // for forward compatibility type AstonTestServer interface { Ping(AstonTest_PingServer) error mustEmbedUnimplementedAstonTestServer() } // UnimplementedAstonTestServer must be embedded to have forward compatible implementations. type UnimplementedAstonTestServer struct { } func (UnimplementedAstonTestServer) Ping(AstonTest_PingServer) error { return status.Errorf(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedAstonTestServer) mustEmbedUnimplementedAstonTestServer() {} // UnsafeAstonTestServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AstonTestServer will // result in compilation errors. type UnsafeAstonTestServer interface { mustEmbedUnimplementedAstonTestServer() } func RegisterAstonTestServer(s grpc.ServiceRegistrar, srv AstonTestServer) { s.RegisterService(&AstonTest_ServiceDesc, srv) } func _AstonTest_Ping_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(AstonTestServer).Ping(&astonTestPingServer{stream}) } type AstonTest_PingServer interface { Send(*PingPong) error Recv() (*PingPong, error) grpc.ServerStream } type astonTestPingServer struct { grpc.ServerStream } func (x *astonTestPingServer) Send(m *PingPong) error { return x.ServerStream.SendMsg(m) } func (x *astonTestPingServer) Recv() (*PingPong, error) { m := new(PingPong) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // AstonTest_ServiceDesc is the grpc.ServiceDesc for AstonTest service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AstonTest_ServiceDesc = grpc.ServiceDesc{ ServiceName: "astontest.AstonTest", HandlerType: (*AstonTestServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Ping", Handler: _AstonTest_Ping_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "server.proto", }