Path: blob/main/components/public-api/go/v1/token_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/token.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// TokenServiceClient is the client API for TokenService 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 TokenServiceClient interface {28// CreateUserToken creates a new temporary access token for the specified user.29// +admin – only to be used by installation admins30CreateTemporaryAccessToken(ctx context.Context, in *CreateTemporaryAccessTokenRequest, opts ...grpc.CallOption) (*CreateTemporaryAccessTokenResponse, error)31}3233type tokenServiceClient struct {34cc grpc.ClientConnInterface35}3637func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient {38return &tokenServiceClient{cc}39}4041func (c *tokenServiceClient) CreateTemporaryAccessToken(ctx context.Context, in *CreateTemporaryAccessTokenRequest, opts ...grpc.CallOption) (*CreateTemporaryAccessTokenResponse, error) {42out := new(CreateTemporaryAccessTokenResponse)43err := c.cc.Invoke(ctx, "/gitpod.v1.TokenService/CreateTemporaryAccessToken", in, out, opts...)44if err != nil {45return nil, err46}47return out, nil48}4950// TokenServiceServer is the server API for TokenService service.51// All implementations must embed UnimplementedTokenServiceServer52// for forward compatibility53type TokenServiceServer interface {54// CreateUserToken creates a new temporary access token for the specified user.55// +admin – only to be used by installation admins56CreateTemporaryAccessToken(context.Context, *CreateTemporaryAccessTokenRequest) (*CreateTemporaryAccessTokenResponse, error)57mustEmbedUnimplementedTokenServiceServer()58}5960// UnimplementedTokenServiceServer must be embedded to have forward compatible implementations.61type UnimplementedTokenServiceServer struct {62}6364func (UnimplementedTokenServiceServer) CreateTemporaryAccessToken(context.Context, *CreateTemporaryAccessTokenRequest) (*CreateTemporaryAccessTokenResponse, error) {65return nil, status.Errorf(codes.Unimplemented, "method CreateTemporaryAccessToken not implemented")66}67func (UnimplementedTokenServiceServer) mustEmbedUnimplementedTokenServiceServer() {}6869// UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service.70// Use of this interface is not recommended, as added methods to TokenServiceServer will71// result in compilation errors.72type UnsafeTokenServiceServer interface {73mustEmbedUnimplementedTokenServiceServer()74}7576func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer) {77s.RegisterService(&TokenService_ServiceDesc, srv)78}7980func _TokenService_CreateTemporaryAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {81in := new(CreateTemporaryAccessTokenRequest)82if err := dec(in); err != nil {83return nil, err84}85if interceptor == nil {86return srv.(TokenServiceServer).CreateTemporaryAccessToken(ctx, in)87}88info := &grpc.UnaryServerInfo{89Server: srv,90FullMethod: "/gitpod.v1.TokenService/CreateTemporaryAccessToken",91}92handler := func(ctx context.Context, req interface{}) (interface{}, error) {93return srv.(TokenServiceServer).CreateTemporaryAccessToken(ctx, req.(*CreateTemporaryAccessTokenRequest))94}95return interceptor(ctx, in, info, handler)96}9798// TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service.99// It's only intended for direct use with grpc.RegisterService,100// and not to be introspected or modified (even as a copy)101var TokenService_ServiceDesc = grpc.ServiceDesc{102ServiceName: "gitpod.v1.TokenService",103HandlerType: (*TokenServiceServer)(nil),104Methods: []grpc.MethodDesc{105{106MethodName: "CreateTemporaryAccessToken",107Handler: _TokenService_CreateTemporaryAccessToken_Handler,108},109},110Streams: []grpc.StreamDesc{},111Metadata: "gitpod/v1/token.proto",112}113114115