Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api/go/v1/user_grpc.pb.go
2500 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/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 allows to retrieve the current user.
30
GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error)
31
// UpdateUser updates the properties of a user.
32
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
33
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
34
// +internal - only used by the Gitpod Dashboard.
35
SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error)
36
// DeleteUser deletes the specified user.
37
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
38
// VerifyUser markes the specified user as verified.
39
// +admin – only to be used by installation admins
40
VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error)
41
// BlockUser markes the specified user as blocked.
42
// +admin – only to be used by installation admins
43
BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error)
44
// ListUsers markes the specified user as blocked.
45
// +admin – only to be used by installation admins
46
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
47
// GetUser allows to retrieve the specified user.
48
// +admin – only to be used by installation admins
49
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
50
// SetRolesOrPermissions allows to set roles or permissions for the specified user.
51
// +admin – only to be used by installation admins
52
SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error)
53
}
54
55
type userServiceClient struct {
56
cc grpc.ClientConnInterface
57
}
58
59
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
60
return &userServiceClient{cc}
61
}
62
63
func (c *userServiceClient) GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error) {
64
out := new(GetAuthenticatedUserResponse)
65
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetAuthenticatedUser", in, out, opts...)
66
if err != nil {
67
return nil, err
68
}
69
return out, nil
70
}
71
72
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) {
73
out := new(UpdateUserResponse)
74
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/UpdateUser", in, out, opts...)
75
if err != nil {
76
return nil, err
77
}
78
return out, nil
79
}
80
81
func (c *userServiceClient) SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error) {
82
out := new(SetWorkspaceAutoStartOptionsResponse)
83
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions", in, out, opts...)
84
if err != nil {
85
return nil, err
86
}
87
return out, nil
88
}
89
90
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) {
91
out := new(DeleteUserResponse)
92
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/DeleteUser", in, out, opts...)
93
if err != nil {
94
return nil, err
95
}
96
return out, nil
97
}
98
99
func (c *userServiceClient) VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error) {
100
out := new(VerifyUserResponse)
101
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/VerifyUser", in, out, opts...)
102
if err != nil {
103
return nil, err
104
}
105
return out, nil
106
}
107
108
func (c *userServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) {
109
out := new(BlockUserResponse)
110
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/BlockUser", in, out, opts...)
111
if err != nil {
112
return nil, err
113
}
114
return out, nil
115
}
116
117
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
118
out := new(ListUsersResponse)
119
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/ListUsers", in, out, opts...)
120
if err != nil {
121
return nil, err
122
}
123
return out, nil
124
}
125
126
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
127
out := new(GetUserResponse)
128
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetUser", in, out, opts...)
129
if err != nil {
130
return nil, err
131
}
132
return out, nil
133
}
134
135
func (c *userServiceClient) SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error) {
136
out := new(SetRolesOrPermissionsResponse)
137
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetRolesOrPermissions", in, out, opts...)
138
if err != nil {
139
return nil, err
140
}
141
return out, nil
142
}
143
144
// UserServiceServer is the server API for UserService service.
145
// All implementations must embed UnimplementedUserServiceServer
146
// for forward compatibility
147
type UserServiceServer interface {
148
// GetAuthenticatedUser allows to retrieve the current user.
149
GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error)
150
// UpdateUser updates the properties of a user.
151
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
152
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
153
// +internal - only used by the Gitpod Dashboard.
154
SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error)
155
// DeleteUser deletes the specified user.
156
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
157
// VerifyUser markes the specified user as verified.
158
// +admin – only to be used by installation admins
159
VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error)
160
// BlockUser markes the specified user as blocked.
161
// +admin – only to be used by installation admins
162
BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error)
163
// ListUsers markes the specified user as blocked.
164
// +admin – only to be used by installation admins
165
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
166
// GetUser allows to retrieve the specified user.
167
// +admin – only to be used by installation admins
168
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
169
// SetRolesOrPermissions allows to set roles or permissions for the specified user.
170
// +admin – only to be used by installation admins
171
SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error)
172
mustEmbedUnimplementedUserServiceServer()
173
}
174
175
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
176
type UnimplementedUserServiceServer struct {
177
}
178
179
func (UnimplementedUserServiceServer) GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error) {
180
return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticatedUser not implemented")
181
}
182
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) {
183
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
184
}
185
func (UnimplementedUserServiceServer) SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error) {
186
return nil, status.Errorf(codes.Unimplemented, "method SetWorkspaceAutoStartOptions not implemented")
187
}
188
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {
189
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
190
}
191
func (UnimplementedUserServiceServer) VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error) {
192
return nil, status.Errorf(codes.Unimplemented, "method VerifyUser not implemented")
193
}
194
func (UnimplementedUserServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) {
195
return nil, status.Errorf(codes.Unimplemented, "method BlockUser not implemented")
196
}
197
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
198
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
199
}
200
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
201
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
202
}
203
func (UnimplementedUserServiceServer) SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error) {
204
return nil, status.Errorf(codes.Unimplemented, "method SetRolesOrPermissions not implemented")
205
}
206
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
207
208
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
209
// Use of this interface is not recommended, as added methods to UserServiceServer will
210
// result in compilation errors.
211
type UnsafeUserServiceServer interface {
212
mustEmbedUnimplementedUserServiceServer()
213
}
214
215
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
216
s.RegisterService(&UserService_ServiceDesc, srv)
217
}
218
219
func _UserService_GetAuthenticatedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
220
in := new(GetAuthenticatedUserRequest)
221
if err := dec(in); err != nil {
222
return nil, err
223
}
224
if interceptor == nil {
225
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, in)
226
}
227
info := &grpc.UnaryServerInfo{
228
Server: srv,
229
FullMethod: "/gitpod.v1.UserService/GetAuthenticatedUser",
230
}
231
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
232
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, req.(*GetAuthenticatedUserRequest))
233
}
234
return interceptor(ctx, in, info, handler)
235
}
236
237
func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
238
in := new(UpdateUserRequest)
239
if err := dec(in); err != nil {
240
return nil, err
241
}
242
if interceptor == nil {
243
return srv.(UserServiceServer).UpdateUser(ctx, in)
244
}
245
info := &grpc.UnaryServerInfo{
246
Server: srv,
247
FullMethod: "/gitpod.v1.UserService/UpdateUser",
248
}
249
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
250
return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))
251
}
252
return interceptor(ctx, in, info, handler)
253
}
254
255
func _UserService_SetWorkspaceAutoStartOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
256
in := new(SetWorkspaceAutoStartOptionsRequest)
257
if err := dec(in); err != nil {
258
return nil, err
259
}
260
if interceptor == nil {
261
return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, in)
262
}
263
info := &grpc.UnaryServerInfo{
264
Server: srv,
265
FullMethod: "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions",
266
}
267
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
268
return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, req.(*SetWorkspaceAutoStartOptionsRequest))
269
}
270
return interceptor(ctx, in, info, handler)
271
}
272
273
func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
274
in := new(DeleteUserRequest)
275
if err := dec(in); err != nil {
276
return nil, err
277
}
278
if interceptor == nil {
279
return srv.(UserServiceServer).DeleteUser(ctx, in)
280
}
281
info := &grpc.UnaryServerInfo{
282
Server: srv,
283
FullMethod: "/gitpod.v1.UserService/DeleteUser",
284
}
285
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
286
return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest))
287
}
288
return interceptor(ctx, in, info, handler)
289
}
290
291
func _UserService_VerifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
292
in := new(VerifyUserRequest)
293
if err := dec(in); err != nil {
294
return nil, err
295
}
296
if interceptor == nil {
297
return srv.(UserServiceServer).VerifyUser(ctx, in)
298
}
299
info := &grpc.UnaryServerInfo{
300
Server: srv,
301
FullMethod: "/gitpod.v1.UserService/VerifyUser",
302
}
303
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
304
return srv.(UserServiceServer).VerifyUser(ctx, req.(*VerifyUserRequest))
305
}
306
return interceptor(ctx, in, info, handler)
307
}
308
309
func _UserService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
310
in := new(BlockUserRequest)
311
if err := dec(in); err != nil {
312
return nil, err
313
}
314
if interceptor == nil {
315
return srv.(UserServiceServer).BlockUser(ctx, in)
316
}
317
info := &grpc.UnaryServerInfo{
318
Server: srv,
319
FullMethod: "/gitpod.v1.UserService/BlockUser",
320
}
321
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
322
return srv.(UserServiceServer).BlockUser(ctx, req.(*BlockUserRequest))
323
}
324
return interceptor(ctx, in, info, handler)
325
}
326
327
func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
328
in := new(ListUsersRequest)
329
if err := dec(in); err != nil {
330
return nil, err
331
}
332
if interceptor == nil {
333
return srv.(UserServiceServer).ListUsers(ctx, in)
334
}
335
info := &grpc.UnaryServerInfo{
336
Server: srv,
337
FullMethod: "/gitpod.v1.UserService/ListUsers",
338
}
339
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
340
return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))
341
}
342
return interceptor(ctx, in, info, handler)
343
}
344
345
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
346
in := new(GetUserRequest)
347
if err := dec(in); err != nil {
348
return nil, err
349
}
350
if interceptor == nil {
351
return srv.(UserServiceServer).GetUser(ctx, in)
352
}
353
info := &grpc.UnaryServerInfo{
354
Server: srv,
355
FullMethod: "/gitpod.v1.UserService/GetUser",
356
}
357
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
358
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
359
}
360
return interceptor(ctx, in, info, handler)
361
}
362
363
func _UserService_SetRolesOrPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
364
in := new(SetRolesOrPermissionsRequest)
365
if err := dec(in); err != nil {
366
return nil, err
367
}
368
if interceptor == nil {
369
return srv.(UserServiceServer).SetRolesOrPermissions(ctx, in)
370
}
371
info := &grpc.UnaryServerInfo{
372
Server: srv,
373
FullMethod: "/gitpod.v1.UserService/SetRolesOrPermissions",
374
}
375
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
376
return srv.(UserServiceServer).SetRolesOrPermissions(ctx, req.(*SetRolesOrPermissionsRequest))
377
}
378
return interceptor(ctx, in, info, handler)
379
}
380
381
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
382
// It's only intended for direct use with grpc.RegisterService,
383
// and not to be introspected or modified (even as a copy)
384
var UserService_ServiceDesc = grpc.ServiceDesc{
385
ServiceName: "gitpod.v1.UserService",
386
HandlerType: (*UserServiceServer)(nil),
387
Methods: []grpc.MethodDesc{
388
{
389
MethodName: "GetAuthenticatedUser",
390
Handler: _UserService_GetAuthenticatedUser_Handler,
391
},
392
{
393
MethodName: "UpdateUser",
394
Handler: _UserService_UpdateUser_Handler,
395
},
396
{
397
MethodName: "SetWorkspaceAutoStartOptions",
398
Handler: _UserService_SetWorkspaceAutoStartOptions_Handler,
399
},
400
{
401
MethodName: "DeleteUser",
402
Handler: _UserService_DeleteUser_Handler,
403
},
404
{
405
MethodName: "VerifyUser",
406
Handler: _UserService_VerifyUser_Handler,
407
},
408
{
409
MethodName: "BlockUser",
410
Handler: _UserService_BlockUser_Handler,
411
},
412
{
413
MethodName: "ListUsers",
414
Handler: _UserService_ListUsers_Handler,
415
},
416
{
417
MethodName: "GetUser",
418
Handler: _UserService_GetUser_Handler,
419
},
420
{
421
MethodName: "SetRolesOrPermissions",
422
Handler: _UserService_SetRolesOrPermissions_Handler,
423
},
424
},
425
Streams: []grpc.StreamDesc{},
426
Metadata: "gitpod/v1/user.proto",
427
}
428
429