Path: blob/main/components/public-api/go/experimental/v1/dummy_grpc.pb.go
2501 views
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Code generated by protoc-gen-go-grpc. DO NOT EDIT.5// versions:6// - protoc-gen-go-grpc v1.2.07// - protoc (unknown)8// source: gitpod/experimental/v1/dummy.proto910package v11112import (13context "context"14grpc "google.golang.org/grpc"15codes "google.golang.org/grpc/codes"16status "google.golang.org/grpc/status"17)1819// This is a compile-time assertion to ensure that this generated file20// is compatible with the grpc package it is being compiled against.21// Requires gRPC-Go v1.32.0 or later.22const _ = grpc.SupportPackageIsVersion72324// HelloServiceClient is the client API for HelloService service.25//26// 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.27type HelloServiceClient interface {28// Unary RPCs where the client sends a single request to the server and gets a29// single response back, just like a normal function call.30SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error)31// Server streaming RPCs where the client sends a request to the server and32// gets a stream to read a sequence of messages back.33LotsOfReplies(ctx context.Context, in *LotsOfRepliesRequest, opts ...grpc.CallOption) (HelloService_LotsOfRepliesClient, error)34}3536type helloServiceClient struct {37cc grpc.ClientConnInterface38}3940func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient {41return &helloServiceClient{cc}42}4344func (c *helloServiceClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) {45out := new(SayHelloResponse)46err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.HelloService/SayHello", in, out, opts...)47if err != nil {48return nil, err49}50return out, nil51}5253func (c *helloServiceClient) LotsOfReplies(ctx context.Context, in *LotsOfRepliesRequest, opts ...grpc.CallOption) (HelloService_LotsOfRepliesClient, error) {54stream, err := c.cc.NewStream(ctx, &HelloService_ServiceDesc.Streams[0], "/gitpod.experimental.v1.HelloService/LotsOfReplies", opts...)55if err != nil {56return nil, err57}58x := &helloServiceLotsOfRepliesClient{stream}59if err := x.ClientStream.SendMsg(in); err != nil {60return nil, err61}62if err := x.ClientStream.CloseSend(); err != nil {63return nil, err64}65return x, nil66}6768type HelloService_LotsOfRepliesClient interface {69Recv() (*LotsOfRepliesResponse, error)70grpc.ClientStream71}7273type helloServiceLotsOfRepliesClient struct {74grpc.ClientStream75}7677func (x *helloServiceLotsOfRepliesClient) Recv() (*LotsOfRepliesResponse, error) {78m := new(LotsOfRepliesResponse)79if err := x.ClientStream.RecvMsg(m); err != nil {80return nil, err81}82return m, nil83}8485// HelloServiceServer is the server API for HelloService service.86// All implementations must embed UnimplementedHelloServiceServer87// for forward compatibility88type HelloServiceServer interface {89// Unary RPCs where the client sends a single request to the server and gets a90// single response back, just like a normal function call.91SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)92// Server streaming RPCs where the client sends a request to the server and93// gets a stream to read a sequence of messages back.94LotsOfReplies(*LotsOfRepliesRequest, HelloService_LotsOfRepliesServer) error95mustEmbedUnimplementedHelloServiceServer()96}9798// UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.99type UnimplementedHelloServiceServer struct {100}101102func (UnimplementedHelloServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) {103return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")104}105func (UnimplementedHelloServiceServer) LotsOfReplies(*LotsOfRepliesRequest, HelloService_LotsOfRepliesServer) error {106return status.Errorf(codes.Unimplemented, "method LotsOfReplies not implemented")107}108func (UnimplementedHelloServiceServer) mustEmbedUnimplementedHelloServiceServer() {}109110// UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service.111// Use of this interface is not recommended, as added methods to HelloServiceServer will112// result in compilation errors.113type UnsafeHelloServiceServer interface {114mustEmbedUnimplementedHelloServiceServer()115}116117func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer) {118s.RegisterService(&HelloService_ServiceDesc, srv)119}120121func _HelloService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {122in := new(SayHelloRequest)123if err := dec(in); err != nil {124return nil, err125}126if interceptor == nil {127return srv.(HelloServiceServer).SayHello(ctx, in)128}129info := &grpc.UnaryServerInfo{130Server: srv,131FullMethod: "/gitpod.experimental.v1.HelloService/SayHello",132}133handler := func(ctx context.Context, req interface{}) (interface{}, error) {134return srv.(HelloServiceServer).SayHello(ctx, req.(*SayHelloRequest))135}136return interceptor(ctx, in, info, handler)137}138139func _HelloService_LotsOfReplies_Handler(srv interface{}, stream grpc.ServerStream) error {140m := new(LotsOfRepliesRequest)141if err := stream.RecvMsg(m); err != nil {142return err143}144return srv.(HelloServiceServer).LotsOfReplies(m, &helloServiceLotsOfRepliesServer{stream})145}146147type HelloService_LotsOfRepliesServer interface {148Send(*LotsOfRepliesResponse) error149grpc.ServerStream150}151152type helloServiceLotsOfRepliesServer struct {153grpc.ServerStream154}155156func (x *helloServiceLotsOfRepliesServer) Send(m *LotsOfRepliesResponse) error {157return x.ServerStream.SendMsg(m)158}159160// HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service.161// It's only intended for direct use with grpc.RegisterService,162// and not to be introspected or modified (even as a copy)163var HelloService_ServiceDesc = grpc.ServiceDesc{164ServiceName: "gitpod.experimental.v1.HelloService",165HandlerType: (*HelloServiceServer)(nil),166Methods: []grpc.MethodDesc{167{168MethodName: "SayHello",169Handler: _HelloService_SayHello_Handler,170},171},172Streams: []grpc.StreamDesc{173{174StreamName: "LotsOfReplies",175Handler: _HelloService_LotsOfReplies_Handler,176ServerStreams: true,177},178},179Metadata: "gitpod/experimental/v1/dummy.proto",180}181182183