Path: blob/main/components/public-api/go/v1/user_grpc.pb.go
2500 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/v1/user.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// UserServiceClient is the client API for UserService 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 UserServiceClient interface {28// GetAuthenticatedUser allows to retrieve the current user.29GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error)30// UpdateUser updates the properties of a user.31UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)32// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.33// +internal - only used by the Gitpod Dashboard.34SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error)35// DeleteUser deletes the specified user.36DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)37// VerifyUser markes the specified user as verified.38// +admin – only to be used by installation admins39VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error)40// BlockUser markes the specified user as blocked.41// +admin – only to be used by installation admins42BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error)43// ListUsers markes the specified user as blocked.44// +admin – only to be used by installation admins45ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)46// GetUser allows to retrieve the specified user.47// +admin – only to be used by installation admins48GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)49// SetRolesOrPermissions allows to set roles or permissions for the specified user.50// +admin – only to be used by installation admins51SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error)52}5354type userServiceClient struct {55cc grpc.ClientConnInterface56}5758func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {59return &userServiceClient{cc}60}6162func (c *userServiceClient) GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error) {63out := new(GetAuthenticatedUserResponse)64err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetAuthenticatedUser", in, out, opts...)65if err != nil {66return nil, err67}68return out, nil69}7071func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) {72out := new(UpdateUserResponse)73err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/UpdateUser", in, out, opts...)74if err != nil {75return nil, err76}77return out, nil78}7980func (c *userServiceClient) SetWorkspaceAutoStartOptions(ctx context.Context, in *SetWorkspaceAutoStartOptionsRequest, opts ...grpc.CallOption) (*SetWorkspaceAutoStartOptionsResponse, error) {81out := new(SetWorkspaceAutoStartOptionsResponse)82err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions", in, out, opts...)83if err != nil {84return nil, err85}86return out, nil87}8889func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) {90out := new(DeleteUserResponse)91err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/DeleteUser", in, out, opts...)92if err != nil {93return nil, err94}95return out, nil96}9798func (c *userServiceClient) VerifyUser(ctx context.Context, in *VerifyUserRequest, opts ...grpc.CallOption) (*VerifyUserResponse, error) {99out := new(VerifyUserResponse)100err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/VerifyUser", in, out, opts...)101if err != nil {102return nil, err103}104return out, nil105}106107func (c *userServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) {108out := new(BlockUserResponse)109err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/BlockUser", in, out, opts...)110if err != nil {111return nil, err112}113return out, nil114}115116func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {117out := new(ListUsersResponse)118err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/ListUsers", in, out, opts...)119if err != nil {120return nil, err121}122return out, nil123}124125func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {126out := new(GetUserResponse)127err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/GetUser", in, out, opts...)128if err != nil {129return nil, err130}131return out, nil132}133134func (c *userServiceClient) SetRolesOrPermissions(ctx context.Context, in *SetRolesOrPermissionsRequest, opts ...grpc.CallOption) (*SetRolesOrPermissionsResponse, error) {135out := new(SetRolesOrPermissionsResponse)136err := c.cc.Invoke(ctx, "/gitpod.v1.UserService/SetRolesOrPermissions", in, out, opts...)137if err != nil {138return nil, err139}140return out, nil141}142143// UserServiceServer is the server API for UserService service.144// All implementations must embed UnimplementedUserServiceServer145// for forward compatibility146type UserServiceServer interface {147// GetAuthenticatedUser allows to retrieve the current user.148GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error)149// UpdateUser updates the properties of a user.150UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)151// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.152// +internal - only used by the Gitpod Dashboard.153SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error)154// DeleteUser deletes the specified user.155DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)156// VerifyUser markes the specified user as verified.157// +admin – only to be used by installation admins158VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error)159// BlockUser markes the specified user as blocked.160// +admin – only to be used by installation admins161BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error)162// ListUsers markes the specified user as blocked.163// +admin – only to be used by installation admins164ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)165// GetUser allows to retrieve the specified user.166// +admin – only to be used by installation admins167GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)168// SetRolesOrPermissions allows to set roles or permissions for the specified user.169// +admin – only to be used by installation admins170SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error)171mustEmbedUnimplementedUserServiceServer()172}173174// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.175type UnimplementedUserServiceServer struct {176}177178func (UnimplementedUserServiceServer) GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error) {179return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticatedUser not implemented")180}181func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) {182return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")183}184func (UnimplementedUserServiceServer) SetWorkspaceAutoStartOptions(context.Context, *SetWorkspaceAutoStartOptionsRequest) (*SetWorkspaceAutoStartOptionsResponse, error) {185return nil, status.Errorf(codes.Unimplemented, "method SetWorkspaceAutoStartOptions not implemented")186}187func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {188return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")189}190func (UnimplementedUserServiceServer) VerifyUser(context.Context, *VerifyUserRequest) (*VerifyUserResponse, error) {191return nil, status.Errorf(codes.Unimplemented, "method VerifyUser not implemented")192}193func (UnimplementedUserServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) {194return nil, status.Errorf(codes.Unimplemented, "method BlockUser not implemented")195}196func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {197return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")198}199func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {200return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")201}202func (UnimplementedUserServiceServer) SetRolesOrPermissions(context.Context, *SetRolesOrPermissionsRequest) (*SetRolesOrPermissionsResponse, error) {203return nil, status.Errorf(codes.Unimplemented, "method SetRolesOrPermissions not implemented")204}205func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}206207// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.208// Use of this interface is not recommended, as added methods to UserServiceServer will209// result in compilation errors.210type UnsafeUserServiceServer interface {211mustEmbedUnimplementedUserServiceServer()212}213214func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {215s.RegisterService(&UserService_ServiceDesc, srv)216}217218func _UserService_GetAuthenticatedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {219in := new(GetAuthenticatedUserRequest)220if err := dec(in); err != nil {221return nil, err222}223if interceptor == nil {224return srv.(UserServiceServer).GetAuthenticatedUser(ctx, in)225}226info := &grpc.UnaryServerInfo{227Server: srv,228FullMethod: "/gitpod.v1.UserService/GetAuthenticatedUser",229}230handler := func(ctx context.Context, req interface{}) (interface{}, error) {231return srv.(UserServiceServer).GetAuthenticatedUser(ctx, req.(*GetAuthenticatedUserRequest))232}233return interceptor(ctx, in, info, handler)234}235236func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {237in := new(UpdateUserRequest)238if err := dec(in); err != nil {239return nil, err240}241if interceptor == nil {242return srv.(UserServiceServer).UpdateUser(ctx, in)243}244info := &grpc.UnaryServerInfo{245Server: srv,246FullMethod: "/gitpod.v1.UserService/UpdateUser",247}248handler := func(ctx context.Context, req interface{}) (interface{}, error) {249return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))250}251return interceptor(ctx, in, info, handler)252}253254func _UserService_SetWorkspaceAutoStartOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {255in := new(SetWorkspaceAutoStartOptionsRequest)256if err := dec(in); err != nil {257return nil, err258}259if interceptor == nil {260return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, in)261}262info := &grpc.UnaryServerInfo{263Server: srv,264FullMethod: "/gitpod.v1.UserService/SetWorkspaceAutoStartOptions",265}266handler := func(ctx context.Context, req interface{}) (interface{}, error) {267return srv.(UserServiceServer).SetWorkspaceAutoStartOptions(ctx, req.(*SetWorkspaceAutoStartOptionsRequest))268}269return interceptor(ctx, in, info, handler)270}271272func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {273in := new(DeleteUserRequest)274if err := dec(in); err != nil {275return nil, err276}277if interceptor == nil {278return srv.(UserServiceServer).DeleteUser(ctx, in)279}280info := &grpc.UnaryServerInfo{281Server: srv,282FullMethod: "/gitpod.v1.UserService/DeleteUser",283}284handler := func(ctx context.Context, req interface{}) (interface{}, error) {285return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest))286}287return interceptor(ctx, in, info, handler)288}289290func _UserService_VerifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {291in := new(VerifyUserRequest)292if err := dec(in); err != nil {293return nil, err294}295if interceptor == nil {296return srv.(UserServiceServer).VerifyUser(ctx, in)297}298info := &grpc.UnaryServerInfo{299Server: srv,300FullMethod: "/gitpod.v1.UserService/VerifyUser",301}302handler := func(ctx context.Context, req interface{}) (interface{}, error) {303return srv.(UserServiceServer).VerifyUser(ctx, req.(*VerifyUserRequest))304}305return interceptor(ctx, in, info, handler)306}307308func _UserService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {309in := new(BlockUserRequest)310if err := dec(in); err != nil {311return nil, err312}313if interceptor == nil {314return srv.(UserServiceServer).BlockUser(ctx, in)315}316info := &grpc.UnaryServerInfo{317Server: srv,318FullMethod: "/gitpod.v1.UserService/BlockUser",319}320handler := func(ctx context.Context, req interface{}) (interface{}, error) {321return srv.(UserServiceServer).BlockUser(ctx, req.(*BlockUserRequest))322}323return interceptor(ctx, in, info, handler)324}325326func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {327in := new(ListUsersRequest)328if err := dec(in); err != nil {329return nil, err330}331if interceptor == nil {332return srv.(UserServiceServer).ListUsers(ctx, in)333}334info := &grpc.UnaryServerInfo{335Server: srv,336FullMethod: "/gitpod.v1.UserService/ListUsers",337}338handler := func(ctx context.Context, req interface{}) (interface{}, error) {339return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))340}341return interceptor(ctx, in, info, handler)342}343344func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {345in := new(GetUserRequest)346if err := dec(in); err != nil {347return nil, err348}349if interceptor == nil {350return srv.(UserServiceServer).GetUser(ctx, in)351}352info := &grpc.UnaryServerInfo{353Server: srv,354FullMethod: "/gitpod.v1.UserService/GetUser",355}356handler := func(ctx context.Context, req interface{}) (interface{}, error) {357return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))358}359return interceptor(ctx, in, info, handler)360}361362func _UserService_SetRolesOrPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {363in := new(SetRolesOrPermissionsRequest)364if err := dec(in); err != nil {365return nil, err366}367if interceptor == nil {368return srv.(UserServiceServer).SetRolesOrPermissions(ctx, in)369}370info := &grpc.UnaryServerInfo{371Server: srv,372FullMethod: "/gitpod.v1.UserService/SetRolesOrPermissions",373}374handler := func(ctx context.Context, req interface{}) (interface{}, error) {375return srv.(UserServiceServer).SetRolesOrPermissions(ctx, req.(*SetRolesOrPermissionsRequest))376}377return interceptor(ctx, in, info, handler)378}379380// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.381// It's only intended for direct use with grpc.RegisterService,382// and not to be introspected or modified (even as a copy)383var UserService_ServiceDesc = grpc.ServiceDesc{384ServiceName: "gitpod.v1.UserService",385HandlerType: (*UserServiceServer)(nil),386Methods: []grpc.MethodDesc{387{388MethodName: "GetAuthenticatedUser",389Handler: _UserService_GetAuthenticatedUser_Handler,390},391{392MethodName: "UpdateUser",393Handler: _UserService_UpdateUser_Handler,394},395{396MethodName: "SetWorkspaceAutoStartOptions",397Handler: _UserService_SetWorkspaceAutoStartOptions_Handler,398},399{400MethodName: "DeleteUser",401Handler: _UserService_DeleteUser_Handler,402},403{404MethodName: "VerifyUser",405Handler: _UserService_VerifyUser_Handler,406},407{408MethodName: "BlockUser",409Handler: _UserService_BlockUser_Handler,410},411{412MethodName: "ListUsers",413Handler: _UserService_ListUsers_Handler,414},415{416MethodName: "GetUser",417Handler: _UserService_GetUser_Handler,418},419{420MethodName: "SetRolesOrPermissions",421Handler: _UserService_SetRolesOrPermissions_Handler,422},423},424Streams: []grpc.StreamDesc{},425Metadata: "gitpod/v1/user.proto",426}427428429