Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api/go/experimental/v1/dummy_grpc.pb.go
2501 views
1
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
6
// versions:
7
// - protoc-gen-go-grpc v1.2.0
8
// - protoc (unknown)
9
// source: gitpod/experimental/v1/dummy.proto
10
11
package v1
12
13
import (
14
context "context"
15
grpc "google.golang.org/grpc"
16
codes "google.golang.org/grpc/codes"
17
status "google.golang.org/grpc/status"
18
)
19
20
// This is a compile-time assertion to ensure that this generated file
21
// is compatible with the grpc package it is being compiled against.
22
// Requires gRPC-Go v1.32.0 or later.
23
const _ = grpc.SupportPackageIsVersion7
24
25
// HelloServiceClient is the client API for HelloService service.
26
//
27
// 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.
28
type HelloServiceClient interface {
29
// Unary RPCs where the client sends a single request to the server and gets a
30
// single response back, just like a normal function call.
31
SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error)
32
// Server streaming RPCs where the client sends a request to the server and
33
// gets a stream to read a sequence of messages back.
34
LotsOfReplies(ctx context.Context, in *LotsOfRepliesRequest, opts ...grpc.CallOption) (HelloService_LotsOfRepliesClient, error)
35
}
36
37
type helloServiceClient struct {
38
cc grpc.ClientConnInterface
39
}
40
41
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient {
42
return &helloServiceClient{cc}
43
}
44
45
func (c *helloServiceClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) {
46
out := new(SayHelloResponse)
47
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.HelloService/SayHello", in, out, opts...)
48
if err != nil {
49
return nil, err
50
}
51
return out, nil
52
}
53
54
func (c *helloServiceClient) LotsOfReplies(ctx context.Context, in *LotsOfRepliesRequest, opts ...grpc.CallOption) (HelloService_LotsOfRepliesClient, error) {
55
stream, err := c.cc.NewStream(ctx, &HelloService_ServiceDesc.Streams[0], "/gitpod.experimental.v1.HelloService/LotsOfReplies", opts...)
56
if err != nil {
57
return nil, err
58
}
59
x := &helloServiceLotsOfRepliesClient{stream}
60
if err := x.ClientStream.SendMsg(in); err != nil {
61
return nil, err
62
}
63
if err := x.ClientStream.CloseSend(); err != nil {
64
return nil, err
65
}
66
return x, nil
67
}
68
69
type HelloService_LotsOfRepliesClient interface {
70
Recv() (*LotsOfRepliesResponse, error)
71
grpc.ClientStream
72
}
73
74
type helloServiceLotsOfRepliesClient struct {
75
grpc.ClientStream
76
}
77
78
func (x *helloServiceLotsOfRepliesClient) Recv() (*LotsOfRepliesResponse, error) {
79
m := new(LotsOfRepliesResponse)
80
if err := x.ClientStream.RecvMsg(m); err != nil {
81
return nil, err
82
}
83
return m, nil
84
}
85
86
// HelloServiceServer is the server API for HelloService service.
87
// All implementations must embed UnimplementedHelloServiceServer
88
// for forward compatibility
89
type HelloServiceServer interface {
90
// Unary RPCs where the client sends a single request to the server and gets a
91
// single response back, just like a normal function call.
92
SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
93
// Server streaming RPCs where the client sends a request to the server and
94
// gets a stream to read a sequence of messages back.
95
LotsOfReplies(*LotsOfRepliesRequest, HelloService_LotsOfRepliesServer) error
96
mustEmbedUnimplementedHelloServiceServer()
97
}
98
99
// UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
100
type UnimplementedHelloServiceServer struct {
101
}
102
103
func (UnimplementedHelloServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) {
104
return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
105
}
106
func (UnimplementedHelloServiceServer) LotsOfReplies(*LotsOfRepliesRequest, HelloService_LotsOfRepliesServer) error {
107
return status.Errorf(codes.Unimplemented, "method LotsOfReplies not implemented")
108
}
109
func (UnimplementedHelloServiceServer) mustEmbedUnimplementedHelloServiceServer() {}
110
111
// UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service.
112
// Use of this interface is not recommended, as added methods to HelloServiceServer will
113
// result in compilation errors.
114
type UnsafeHelloServiceServer interface {
115
mustEmbedUnimplementedHelloServiceServer()
116
}
117
118
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer) {
119
s.RegisterService(&HelloService_ServiceDesc, srv)
120
}
121
122
func _HelloService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
123
in := new(SayHelloRequest)
124
if err := dec(in); err != nil {
125
return nil, err
126
}
127
if interceptor == nil {
128
return srv.(HelloServiceServer).SayHello(ctx, in)
129
}
130
info := &grpc.UnaryServerInfo{
131
Server: srv,
132
FullMethod: "/gitpod.experimental.v1.HelloService/SayHello",
133
}
134
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
135
return srv.(HelloServiceServer).SayHello(ctx, req.(*SayHelloRequest))
136
}
137
return interceptor(ctx, in, info, handler)
138
}
139
140
func _HelloService_LotsOfReplies_Handler(srv interface{}, stream grpc.ServerStream) error {
141
m := new(LotsOfRepliesRequest)
142
if err := stream.RecvMsg(m); err != nil {
143
return err
144
}
145
return srv.(HelloServiceServer).LotsOfReplies(m, &helloServiceLotsOfRepliesServer{stream})
146
}
147
148
type HelloService_LotsOfRepliesServer interface {
149
Send(*LotsOfRepliesResponse) error
150
grpc.ServerStream
151
}
152
153
type helloServiceLotsOfRepliesServer struct {
154
grpc.ServerStream
155
}
156
157
func (x *helloServiceLotsOfRepliesServer) Send(m *LotsOfRepliesResponse) error {
158
return x.ServerStream.SendMsg(m)
159
}
160
161
// HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service.
162
// It's only intended for direct use with grpc.RegisterService,
163
// and not to be introspected or modified (even as a copy)
164
var HelloService_ServiceDesc = grpc.ServiceDesc{
165
ServiceName: "gitpod.experimental.v1.HelloService",
166
HandlerType: (*HelloServiceServer)(nil),
167
Methods: []grpc.MethodDesc{
168
{
169
MethodName: "SayHello",
170
Handler: _HelloService_SayHello_Handler,
171
},
172
},
173
Streams: []grpc.StreamDesc{
174
{
175
StreamName: "LotsOfReplies",
176
Handler: _HelloService_LotsOfReplies_Handler,
177
ServerStreams: true,
178
},
179
},
180
Metadata: "gitpod/experimental/v1/dummy.proto",
181
}
182
183