mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* UI reorg * generated stuffs * Make it woooooooork * Classier placeholder * Remove unneeded fragment * Introduce `enterprise_onboarding_enabled` flag * move things properly * add ipv6 localhost
428 lines
17 KiB
Go
428 lines
17 KiB
Go
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
|
||
// Licensed under the GNU Affero General Public License (AGPL).
|
||
// See License.AGPL.txt in the project root for license information.
|
||
|
||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
// versions:
|
||
// - protoc-gen-go-grpc v1.2.0
|
||
// - protoc (unknown)
|
||
// source: gitpod/v1/user.proto
|
||
|
||
package v1
|
||
|
||
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
|
||
|
||
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
|
||
// GetAuthenticatedUser allows to retrieve the current user.
|
||
GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error)
|
||
// UpdateUser updates the properties of a user.
|
||
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
|
||
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
|
||
// +internal - only used by the Gitpod Dashboard.
|
||
SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error)
|
||
// DeleteUser deletes the specified user.
|
||
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
|
||
// VerifyUser markes the specified user as verified.
|
||
// +admin – only to be used by installation admins
|
||
VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error)
|
||
// BlockUser markes the specified user as blocked.
|
||
// +admin – only to be used by installation admins
|
||
BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error)
|
||
// ListUsers markes the specified user as blocked.
|
||
// +admin – only to be used by installation admins
|
||
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
|
||
// GetUser allows to retrieve the specified user.
|
||
// +admin – only to be used by installation admins
|
||
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
|
||
// SetRolesOrPermissions allows to set roles or permissions for the specified user.
|
||
// +admin – only to be used by installation admins
|
||
SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error)
|
||
}
|
||
|
||
type userServiceClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
||
return &userServiceClient{cc}
|
||
}
|
||
|
||
func (c *userServiceClient) GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error) {
|
||
out := new(GetAuthenticatedUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetAuthenticatedUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) {
|
||
out := new(UpdateUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/UpdateUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error) {
|
||
out := new(SetWorkspaceAutoStartOptionsResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) {
|
||
out := new(DeleteUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/DeleteUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error) {
|
||
out := new(VerifyUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/VerifyUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) {
|
||
out := new(BlockUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/BlockUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
|
||
out := new(ListUsersResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/ListUsers", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
|
||
out := new(GetUserResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetUser", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *userServiceClient) SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error) {
|
||
out := new(SetRolesOrPermissionsResponse)
|
||
err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetRolesOrPermissions", in, out, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// UserServiceServer is the server API for UserService service.
|
||
// All implementations must embed UnimplementedUserServiceServer
|
||
// for forward compatibility
|
||
type UserServiceServer interface {
|
||
// GetAuthenticatedUser allows to retrieve the current user.
|
||
GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error)
|
||
// UpdateUser updates the properties of a user.
|
||
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
|
||
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
|
||
// +internal - only used by the Gitpod Dashboard.
|
||
SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error)
|
||
// DeleteUser deletes the specified user.
|
||
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
|
||
// VerifyUser markes the specified user as verified.
|
||
// +admin – only to be used by installation admins
|
||
VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error)
|
||
// BlockUser markes the specified user as blocked.
|
||
// +admin – only to be used by installation admins
|
||
BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error)
|
||
// ListUsers markes the specified user as blocked.
|
||
// +admin – only to be used by installation admins
|
||
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
|
||
// GetUser allows to retrieve the specified user.
|
||
// +admin – only to be used by installation admins
|
||
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
|
||
// SetRolesOrPermissions allows to set roles or permissions for the specified user.
|
||
// +admin – only to be used by installation admins
|
||
SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error)
|
||
mustEmbedUnimplementedUserServiceServer()
|
||
}
|
||
|
||
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
|
||
type UnimplementedUserServiceServer struct {
|
||
}
|
||
|
||
func (UnimplementedUserServiceServer) GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticatedUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method SetWorkspaceAutoStartOptions not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method VerifyUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method BlockUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method SetRolesOrPermissions not implemented")
|
||
}
|
||
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
||
|
||
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
||
// result in compilation errors.
|
||
type UnsafeUserServiceServer interface {
|
||
mustEmbedUnimplementedUserServiceServer()
|
||
}
|
||
|
||
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
||
s.RegisterService(&UserService_ServiceDesc, srv)
|
||
}
|
||
|
||
func _UserService_GetAuthenticatedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetAuthenticatedUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/GetAuthenticatedUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).GetAuthenticatedUser(ctx, req.(*GetAuthenticatedUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(UpdateUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).UpdateUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/UpdateUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_SetWorkspaceAutoStartOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(SetWorkspaceAutoStartOptionsRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, req.(*SetWorkspaceAutoStartOptionsRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(DeleteUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).DeleteUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/DeleteUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_VerifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(VerifyUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).VerifyUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/VerifyUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).VerifyUser(ctx, req.(*VerifyUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(BlockUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).BlockUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/BlockUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).BlockUser(ctx, req.(*BlockUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListUsersRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).ListUsers(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/ListUsers",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetUserRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).GetUser(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/GetUser",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _UserService_SetRolesOrPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(SetRolesOrPermissionsRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(UserServiceServer).SetRolesOrPermissions(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: "/gitpod.v1.UserService/SetRolesOrPermissions",
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(UserServiceServer).SetRolesOrPermissions(ctx, req.(*SetRolesOrPermissionsRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var UserService_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "gitpod.v1.UserService",
|
||
HandlerType: (*UserServiceServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "GetAuthenticatedUser",
|
||
Handler: _UserService_GetAuthenticatedUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateUser",
|
||
Handler: _UserService_UpdateUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "SetWorkspaceAutoStartOptions",
|
||
Handler: _UserService_SetWorkspaceAutoStartOptions_Handler,
|
||
},
|
||
{
|
||
MethodName: "DeleteUser",
|
||
Handler: _UserService_DeleteUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "VerifyUser",
|
||
Handler: _UserService_VerifyUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "BlockUser",
|
||
Handler: _UserService_BlockUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListUsers",
|
||
Handler: _UserService_ListUsers_Handler,
|
||
},
|
||
{
|
||
MethodName: "GetUser",
|
||
Handler: _UserService_GetUser_Handler,
|
||
},
|
||
{
|
||
MethodName: "SetRolesOrPermissions",
|
||
Handler: _UserService_SetRolesOrPermissions_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{},
|
||
Metadata: "gitpod/v1/user.proto",
|
||
}
|