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/user_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/user.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
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
29
// GetAuthenticatedUser gets the user info.
30
GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error)
31
// ListSSHKeys lists the public SSH keys.
32
ListSSHKeys(ctx context.Context, in *ListSSHKeysRequest, opts ...grpc.CallOption) (*ListSSHKeysResponse, error)
33
// CreateSSHKey adds a public SSH key.
34
CreateSSHKey(ctx context.Context, in *CreateSSHKeyRequest, opts ...grpc.CallOption) (*CreateSSHKeyResponse, error)
35
// GetSSHKey retrieves an ssh key by ID.
36
GetSSHKey(ctx context.Context, in *GetSSHKeyRequest, opts ...grpc.CallOption) (*GetSSHKeyResponse, error)
37
// DeleteSSHKey removes a public SSH key.
38
DeleteSSHKey(ctx context.Context, in *DeleteSSHKeyRequest, opts ...grpc.CallOption) (*DeleteSSHKeyResponse, error)
39
GetGitToken(ctx context.Context, in *GetGitTokenRequest, opts ...grpc.CallOption) (*GetGitTokenResponse, error)
40
BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error)
41
}
42
43
type userServiceClient struct {
44
cc grpc.ClientConnInterface
45
}
46
47
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
48
return &userServiceClient{cc}
49
}
50
51
func (c *userServiceClient) GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error) {
52
out := new(GetAuthenticatedUserResponse)
53
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetAuthenticatedUser", in, out, opts...)
54
if err != nil {
55
return nil, err
56
}
57
return out, nil
58
}
59
60
func (c *userServiceClient) ListSSHKeys(ctx context.Context, in *ListSSHKeysRequest, opts ...grpc.CallOption) (*ListSSHKeysResponse, error) {
61
out := new(ListSSHKeysResponse)
62
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/ListSSHKeys", in, out, opts...)
63
if err != nil {
64
return nil, err
65
}
66
return out, nil
67
}
68
69
func (c *userServiceClient) CreateSSHKey(ctx context.Context, in *CreateSSHKeyRequest, opts ...grpc.CallOption) (*CreateSSHKeyResponse, error) {
70
out := new(CreateSSHKeyResponse)
71
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/CreateSSHKey", in, out, opts...)
72
if err != nil {
73
return nil, err
74
}
75
return out, nil
76
}
77
78
func (c *userServiceClient) GetSSHKey(ctx context.Context, in *GetSSHKeyRequest, opts ...grpc.CallOption) (*GetSSHKeyResponse, error) {
79
out := new(GetSSHKeyResponse)
80
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetSSHKey", in, out, opts...)
81
if err != nil {
82
return nil, err
83
}
84
return out, nil
85
}
86
87
func (c *userServiceClient) DeleteSSHKey(ctx context.Context, in *DeleteSSHKeyRequest, opts ...grpc.CallOption) (*DeleteSSHKeyResponse, error) {
88
out := new(DeleteSSHKeyResponse)
89
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/DeleteSSHKey", in, out, opts...)
90
if err != nil {
91
return nil, err
92
}
93
return out, nil
94
}
95
96
func (c *userServiceClient) GetGitToken(ctx context.Context, in *GetGitTokenRequest, opts ...grpc.CallOption) (*GetGitTokenResponse, error) {
97
out := new(GetGitTokenResponse)
98
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetGitToken", in, out, opts...)
99
if err != nil {
100
return nil, err
101
}
102
return out, nil
103
}
104
105
func (c *userServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) {
106
out := new(BlockUserResponse)
107
err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/BlockUser", in, out, opts...)
108
if err != nil {
109
return nil, err
110
}
111
return out, nil
112
}
113
114
// UserServiceServer is the server API for UserService service.
115
// All implementations must embed UnimplementedUserServiceServer
116
// for forward compatibility
117
type UserServiceServer interface {
118
// GetAuthenticatedUser gets the user info.
119
GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error)
120
// ListSSHKeys lists the public SSH keys.
121
ListSSHKeys(context.Context, *ListSSHKeysRequest) (*ListSSHKeysResponse, error)
122
// CreateSSHKey adds a public SSH key.
123
CreateSSHKey(context.Context, *CreateSSHKeyRequest) (*CreateSSHKeyResponse, error)
124
// GetSSHKey retrieves an ssh key by ID.
125
GetSSHKey(context.Context, *GetSSHKeyRequest) (*GetSSHKeyResponse, error)
126
// DeleteSSHKey removes a public SSH key.
127
DeleteSSHKey(context.Context, *DeleteSSHKeyRequest) (*DeleteSSHKeyResponse, error)
128
GetGitToken(context.Context, *GetGitTokenRequest) (*GetGitTokenResponse, error)
129
BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error)
130
mustEmbedUnimplementedUserServiceServer()
131
}
132
133
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
134
type UnimplementedUserServiceServer struct {
135
}
136
137
func (UnimplementedUserServiceServer) GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error) {
138
return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticatedUser not implemented")
139
}
140
func (UnimplementedUserServiceServer) ListSSHKeys(context.Context, *ListSSHKeysRequest) (*ListSSHKeysResponse, error) {
141
return nil, status.Errorf(codes.Unimplemented, "method ListSSHKeys not implemented")
142
}
143
func (UnimplementedUserServiceServer) CreateSSHKey(context.Context, *CreateSSHKeyRequest) (*CreateSSHKeyResponse, error) {
144
return nil, status.Errorf(codes.Unimplemented, "method CreateSSHKey not implemented")
145
}
146
func (UnimplementedUserServiceServer) GetSSHKey(context.Context, *GetSSHKeyRequest) (*GetSSHKeyResponse, error) {
147
return nil, status.Errorf(codes.Unimplemented, "method GetSSHKey not implemented")
148
}
149
func (UnimplementedUserServiceServer) DeleteSSHKey(context.Context, *DeleteSSHKeyRequest) (*DeleteSSHKeyResponse, error) {
150
return nil, status.Errorf(codes.Unimplemented, "method DeleteSSHKey not implemented")
151
}
152
func (UnimplementedUserServiceServer) GetGitToken(context.Context, *GetGitTokenRequest) (*GetGitTokenResponse, error) {
153
return nil, status.Errorf(codes.Unimplemented, "method GetGitToken not implemented")
154
}
155
func (UnimplementedUserServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) {
156
return nil, status.Errorf(codes.Unimplemented, "method BlockUser not implemented")
157
}
158
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
159
160
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
161
// Use of this interface is not recommended, as added methods to UserServiceServer will
162
// result in compilation errors.
163
type UnsafeUserServiceServer interface {
164
mustEmbedUnimplementedUserServiceServer()
165
}
166
167
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
168
s.RegisterService(&UserService_ServiceDesc, srv)
169
}
170
171
func _UserService_GetAuthenticatedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
172
in := new(GetAuthenticatedUserRequest)
173
if err := dec(in); err != nil {
174
return nil, err
175
}
176
if interceptor == nil {
177
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, in)
178
}
179
info := &grpc.UnaryServerInfo{
180
Server: srv,
181
FullMethod: "/gitpod.experimental.v1.UserService/GetAuthenticatedUser",
182
}
183
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
184
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, req.(*GetAuthenticatedUserRequest))
185
}
186
return interceptor(ctx, in, info, handler)
187
}
188
189
func _UserService_ListSSHKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
190
in := new(ListSSHKeysRequest)
191
if err := dec(in); err != nil {
192
return nil, err
193
}
194
if interceptor == nil {
195
return srv.(UserServiceServer).ListSSHKeys(ctx, in)
196
}
197
info := &grpc.UnaryServerInfo{
198
Server: srv,
199
FullMethod: "/gitpod.experimental.v1.UserService/ListSSHKeys",
200
}
201
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
202
return srv.(UserServiceServer).ListSSHKeys(ctx, req.(*ListSSHKeysRequest))
203
}
204
return interceptor(ctx, in, info, handler)
205
}
206
207
func _UserService_CreateSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
208
in := new(CreateSSHKeyRequest)
209
if err := dec(in); err != nil {
210
return nil, err
211
}
212
if interceptor == nil {
213
return srv.(UserServiceServer).CreateSSHKey(ctx, in)
214
}
215
info := &grpc.UnaryServerInfo{
216
Server: srv,
217
FullMethod: "/gitpod.experimental.v1.UserService/CreateSSHKey",
218
}
219
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
220
return srv.(UserServiceServer).CreateSSHKey(ctx, req.(*CreateSSHKeyRequest))
221
}
222
return interceptor(ctx, in, info, handler)
223
}
224
225
func _UserService_GetSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
226
in := new(GetSSHKeyRequest)
227
if err := dec(in); err != nil {
228
return nil, err
229
}
230
if interceptor == nil {
231
return srv.(UserServiceServer).GetSSHKey(ctx, in)
232
}
233
info := &grpc.UnaryServerInfo{
234
Server: srv,
235
FullMethod: "/gitpod.experimental.v1.UserService/GetSSHKey",
236
}
237
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
238
return srv.(UserServiceServer).GetSSHKey(ctx, req.(*GetSSHKeyRequest))
239
}
240
return interceptor(ctx, in, info, handler)
241
}
242
243
func _UserService_DeleteSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
244
in := new(DeleteSSHKeyRequest)
245
if err := dec(in); err != nil {
246
return nil, err
247
}
248
if interceptor == nil {
249
return srv.(UserServiceServer).DeleteSSHKey(ctx, in)
250
}
251
info := &grpc.UnaryServerInfo{
252
Server: srv,
253
FullMethod: "/gitpod.experimental.v1.UserService/DeleteSSHKey",
254
}
255
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
256
return srv.(UserServiceServer).DeleteSSHKey(ctx, req.(*DeleteSSHKeyRequest))
257
}
258
return interceptor(ctx, in, info, handler)
259
}
260
261
func _UserService_GetGitToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
262
in := new(GetGitTokenRequest)
263
if err := dec(in); err != nil {
264
return nil, err
265
}
266
if interceptor == nil {
267
return srv.(UserServiceServer).GetGitToken(ctx, in)
268
}
269
info := &grpc.UnaryServerInfo{
270
Server: srv,
271
FullMethod: "/gitpod.experimental.v1.UserService/GetGitToken",
272
}
273
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
274
return srv.(UserServiceServer).GetGitToken(ctx, req.(*GetGitTokenRequest))
275
}
276
return interceptor(ctx, in, info, handler)
277
}
278
279
func _UserService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
280
in := new(BlockUserRequest)
281
if err := dec(in); err != nil {
282
return nil, err
283
}
284
if interceptor == nil {
285
return srv.(UserServiceServer).BlockUser(ctx, in)
286
}
287
info := &grpc.UnaryServerInfo{
288
Server: srv,
289
FullMethod: "/gitpod.experimental.v1.UserService/BlockUser",
290
}
291
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
292
return srv.(UserServiceServer).BlockUser(ctx, req.(*BlockUserRequest))
293
}
294
return interceptor(ctx, in, info, handler)
295
}
296
297
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
298
// It's only intended for direct use with grpc.RegisterService,
299
// and not to be introspected or modified (even as a copy)
300
var UserService_ServiceDesc = grpc.ServiceDesc{
301
ServiceName: "gitpod.experimental.v1.UserService",
302
HandlerType: (*UserServiceServer)(nil),
303
Methods: []grpc.MethodDesc{
304
{
305
MethodName: "GetAuthenticatedUser",
306
Handler: _UserService_GetAuthenticatedUser_Handler,
307
},
308
{
309
MethodName: "ListSSHKeys",
310
Handler: _UserService_ListSSHKeys_Handler,
311
},
312
{
313
MethodName: "CreateSSHKey",
314
Handler: _UserService_CreateSSHKey_Handler,
315
},
316
{
317
MethodName: "GetSSHKey",
318
Handler: _UserService_GetSSHKey_Handler,
319
},
320
{
321
MethodName: "DeleteSSHKey",
322
Handler: _UserService_DeleteSSHKey_Handler,
323
},
324
{
325
MethodName: "GetGitToken",
326
Handler: _UserService_GetGitToken_Handler,
327
},
328
{
329
MethodName: "BlockUser",
330
Handler: _UserService_BlockUser_Handler,
331
},
332
},
333
Streams: []grpc.StreamDesc{},
334
Metadata: "gitpod/experimental/v1/user.proto",
335
}
336
337