Path: blob/main/components/public-api/go/experimental/v1/user_grpc.pb.go
2501 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/experimental/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 gets the user info.29GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error)30// ListSSHKeys lists the public SSH keys.31ListSSHKeys(ctx context.Context, in *ListSSHKeysRequest, opts ...grpc.CallOption) (*ListSSHKeysResponse, error)32// CreateSSHKey adds a public SSH key.33CreateSSHKey(ctx context.Context, in *CreateSSHKeyRequest, opts ...grpc.CallOption) (*CreateSSHKeyResponse, error)34// GetSSHKey retrieves an ssh key by ID.35GetSSHKey(ctx context.Context, in *GetSSHKeyRequest, opts ...grpc.CallOption) (*GetSSHKeyResponse, error)36// DeleteSSHKey removes a public SSH key.37DeleteSSHKey(ctx context.Context, in *DeleteSSHKeyRequest, opts ...grpc.CallOption) (*DeleteSSHKeyResponse, error)38GetGitToken(ctx context.Context, in *GetGitTokenRequest, opts ...grpc.CallOption) (*GetGitTokenResponse, error)39BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error)40}4142type userServiceClient struct {43cc grpc.ClientConnInterface44}4546func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {47return &userServiceClient{cc}48}4950func (c *userServiceClient) GetAuthenticatedUser(ctx context.Context, in *GetAuthenticatedUserRequest, opts ...grpc.CallOption) (*GetAuthenticatedUserResponse, error) {51out := new(GetAuthenticatedUserResponse)52err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetAuthenticatedUser", in, out, opts...)53if err != nil {54return nil, err55}56return out, nil57}5859func (c *userServiceClient) ListSSHKeys(ctx context.Context, in *ListSSHKeysRequest, opts ...grpc.CallOption) (*ListSSHKeysResponse, error) {60out := new(ListSSHKeysResponse)61err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/ListSSHKeys", in, out, opts...)62if err != nil {63return nil, err64}65return out, nil66}6768func (c *userServiceClient) CreateSSHKey(ctx context.Context, in *CreateSSHKeyRequest, opts ...grpc.CallOption) (*CreateSSHKeyResponse, error) {69out := new(CreateSSHKeyResponse)70err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/CreateSSHKey", in, out, opts...)71if err != nil {72return nil, err73}74return out, nil75}7677func (c *userServiceClient) GetSSHKey(ctx context.Context, in *GetSSHKeyRequest, opts ...grpc.CallOption) (*GetSSHKeyResponse, error) {78out := new(GetSSHKeyResponse)79err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetSSHKey", in, out, opts...)80if err != nil {81return nil, err82}83return out, nil84}8586func (c *userServiceClient) DeleteSSHKey(ctx context.Context, in *DeleteSSHKeyRequest, opts ...grpc.CallOption) (*DeleteSSHKeyResponse, error) {87out := new(DeleteSSHKeyResponse)88err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/DeleteSSHKey", in, out, opts...)89if err != nil {90return nil, err91}92return out, nil93}9495func (c *userServiceClient) GetGitToken(ctx context.Context, in *GetGitTokenRequest, opts ...grpc.CallOption) (*GetGitTokenResponse, error) {96out := new(GetGitTokenResponse)97err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/GetGitToken", in, out, opts...)98if err != nil {99return nil, err100}101return out, nil102}103104func (c *userServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) {105out := new(BlockUserResponse)106err := c.cc.Invoke(ctx, "/gitpod.experimental.v1.UserService/BlockUser", in, out, opts...)107if err != nil {108return nil, err109}110return out, nil111}112113// UserServiceServer is the server API for UserService service.114// All implementations must embed UnimplementedUserServiceServer115// for forward compatibility116type UserServiceServer interface {117// GetAuthenticatedUser gets the user info.118GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error)119// ListSSHKeys lists the public SSH keys.120ListSSHKeys(context.Context, *ListSSHKeysRequest) (*ListSSHKeysResponse, error)121// CreateSSHKey adds a public SSH key.122CreateSSHKey(context.Context, *CreateSSHKeyRequest) (*CreateSSHKeyResponse, error)123// GetSSHKey retrieves an ssh key by ID.124GetSSHKey(context.Context, *GetSSHKeyRequest) (*GetSSHKeyResponse, error)125// DeleteSSHKey removes a public SSH key.126DeleteSSHKey(context.Context, *DeleteSSHKeyRequest) (*DeleteSSHKeyResponse, error)127GetGitToken(context.Context, *GetGitTokenRequest) (*GetGitTokenResponse, error)128BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error)129mustEmbedUnimplementedUserServiceServer()130}131132// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.133type UnimplementedUserServiceServer struct {134}135136func (UnimplementedUserServiceServer) GetAuthenticatedUser(context.Context, *GetAuthenticatedUserRequest) (*GetAuthenticatedUserResponse, error) {137return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticatedUser not implemented")138}139func (UnimplementedUserServiceServer) ListSSHKeys(context.Context, *ListSSHKeysRequest) (*ListSSHKeysResponse, error) {140return nil, status.Errorf(codes.Unimplemented, "method ListSSHKeys not implemented")141}142func (UnimplementedUserServiceServer) CreateSSHKey(context.Context, *CreateSSHKeyRequest) (*CreateSSHKeyResponse, error) {143return nil, status.Errorf(codes.Unimplemented, "method CreateSSHKey not implemented")144}145func (UnimplementedUserServiceServer) GetSSHKey(context.Context, *GetSSHKeyRequest) (*GetSSHKeyResponse, error) {146return nil, status.Errorf(codes.Unimplemented, "method GetSSHKey not implemented")147}148func (UnimplementedUserServiceServer) DeleteSSHKey(context.Context, *DeleteSSHKeyRequest) (*DeleteSSHKeyResponse, error) {149return nil, status.Errorf(codes.Unimplemented, "method DeleteSSHKey not implemented")150}151func (UnimplementedUserServiceServer) GetGitToken(context.Context, *GetGitTokenRequest) (*GetGitTokenResponse, error) {152return nil, status.Errorf(codes.Unimplemented, "method GetGitToken not implemented")153}154func (UnimplementedUserServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) {155return nil, status.Errorf(codes.Unimplemented, "method BlockUser not implemented")156}157func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}158159// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.160// Use of this interface is not recommended, as added methods to UserServiceServer will161// result in compilation errors.162type UnsafeUserServiceServer interface {163mustEmbedUnimplementedUserServiceServer()164}165166func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {167s.RegisterService(&UserService_ServiceDesc, srv)168}169170func _UserService_GetAuthenticatedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {171in := new(GetAuthenticatedUserRequest)172if err := dec(in); err != nil {173return nil, err174}175if interceptor == nil {176return srv.(UserServiceServer).GetAuthenticatedUser(ctx, in)177}178info := &grpc.UnaryServerInfo{179Server: srv,180FullMethod: "/gitpod.experimental.v1.UserService/GetAuthenticatedUser",181}182handler := func(ctx context.Context, req interface{}) (interface{}, error) {183return srv.(UserServiceServer).GetAuthenticatedUser(ctx, req.(*GetAuthenticatedUserRequest))184}185return interceptor(ctx, in, info, handler)186}187188func _UserService_ListSSHKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {189in := new(ListSSHKeysRequest)190if err := dec(in); err != nil {191return nil, err192}193if interceptor == nil {194return srv.(UserServiceServer).ListSSHKeys(ctx, in)195}196info := &grpc.UnaryServerInfo{197Server: srv,198FullMethod: "/gitpod.experimental.v1.UserService/ListSSHKeys",199}200handler := func(ctx context.Context, req interface{}) (interface{}, error) {201return srv.(UserServiceServer).ListSSHKeys(ctx, req.(*ListSSHKeysRequest))202}203return interceptor(ctx, in, info, handler)204}205206func _UserService_CreateSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {207in := new(CreateSSHKeyRequest)208if err := dec(in); err != nil {209return nil, err210}211if interceptor == nil {212return srv.(UserServiceServer).CreateSSHKey(ctx, in)213}214info := &grpc.UnaryServerInfo{215Server: srv,216FullMethod: "/gitpod.experimental.v1.UserService/CreateSSHKey",217}218handler := func(ctx context.Context, req interface{}) (interface{}, error) {219return srv.(UserServiceServer).CreateSSHKey(ctx, req.(*CreateSSHKeyRequest))220}221return interceptor(ctx, in, info, handler)222}223224func _UserService_GetSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {225in := new(GetSSHKeyRequest)226if err := dec(in); err != nil {227return nil, err228}229if interceptor == nil {230return srv.(UserServiceServer).GetSSHKey(ctx, in)231}232info := &grpc.UnaryServerInfo{233Server: srv,234FullMethod: "/gitpod.experimental.v1.UserService/GetSSHKey",235}236handler := func(ctx context.Context, req interface{}) (interface{}, error) {237return srv.(UserServiceServer).GetSSHKey(ctx, req.(*GetSSHKeyRequest))238}239return interceptor(ctx, in, info, handler)240}241242func _UserService_DeleteSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {243in := new(DeleteSSHKeyRequest)244if err := dec(in); err != nil {245return nil, err246}247if interceptor == nil {248return srv.(UserServiceServer).DeleteSSHKey(ctx, in)249}250info := &grpc.UnaryServerInfo{251Server: srv,252FullMethod: "/gitpod.experimental.v1.UserService/DeleteSSHKey",253}254handler := func(ctx context.Context, req interface{}) (interface{}, error) {255return srv.(UserServiceServer).DeleteSSHKey(ctx, req.(*DeleteSSHKeyRequest))256}257return interceptor(ctx, in, info, handler)258}259260func _UserService_GetGitToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {261in := new(GetGitTokenRequest)262if err := dec(in); err != nil {263return nil, err264}265if interceptor == nil {266return srv.(UserServiceServer).GetGitToken(ctx, in)267}268info := &grpc.UnaryServerInfo{269Server: srv,270FullMethod: "/gitpod.experimental.v1.UserService/GetGitToken",271}272handler := func(ctx context.Context, req interface{}) (interface{}, error) {273return srv.(UserServiceServer).GetGitToken(ctx, req.(*GetGitTokenRequest))274}275return interceptor(ctx, in, info, handler)276}277278func _UserService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {279in := new(BlockUserRequest)280if err := dec(in); err != nil {281return nil, err282}283if interceptor == nil {284return srv.(UserServiceServer).BlockUser(ctx, in)285}286info := &grpc.UnaryServerInfo{287Server: srv,288FullMethod: "/gitpod.experimental.v1.UserService/BlockUser",289}290handler := func(ctx context.Context, req interface{}) (interface{}, error) {291return srv.(UserServiceServer).BlockUser(ctx, req.(*BlockUserRequest))292}293return interceptor(ctx, in, info, handler)294}295296// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.297// It's only intended for direct use with grpc.RegisterService,298// and not to be introspected or modified (even as a copy)299var UserService_ServiceDesc = grpc.ServiceDesc{300ServiceName: "gitpod.experimental.v1.UserService",301HandlerType: (*UserServiceServer)(nil),302Methods: []grpc.MethodDesc{303{304MethodName: "GetAuthenticatedUser",305Handler: _UserService_GetAuthenticatedUser_Handler,306},307{308MethodName: "ListSSHKeys",309Handler: _UserService_ListSSHKeys_Handler,310},311{312MethodName: "CreateSSHKey",313Handler: _UserService_CreateSSHKey_Handler,314},315{316MethodName: "GetSSHKey",317Handler: _UserService_GetSSHKey_Handler,318},319{320MethodName: "DeleteSSHKey",321Handler: _UserService_DeleteSSHKey_Handler,322},323{324MethodName: "GetGitToken",325Handler: _UserService_GetGitToken_Handler,326},327{328MethodName: "BlockUser",329Handler: _UserService_BlockUser_Handler,330},331},332Streams: []grpc.StreamDesc{},333Metadata: "gitpod/experimental/v1/user.proto",334}335336337