Path: blob/main/components/public-api/go/v1/scm_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/scm.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// SCMServiceClient is the client API for SCMService 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 SCMServiceClient interface {28// SearchSCMTokens allows clients to retrieve SCM tokens based on the29// specified host.30SearchSCMTokens(ctx context.Context, in *SearchSCMTokensRequest, opts ...grpc.CallOption) (*SearchSCMTokensResponse, error)31// GuessTokenScopes allows clients to retrieve scopes their SCM token would32// require for the specified git command.33GuessTokenScopes(ctx context.Context, in *GuessTokenScopesRequest, opts ...grpc.CallOption) (*GuessTokenScopesResponse, error)34// SearchRepositories allows clients to search for suggested repositories of35// SCM providers they are connected with.36SearchRepositories(ctx context.Context, in *SearchRepositoriesRequest, opts ...grpc.CallOption) (*SearchRepositoriesResponse, error)37// ListSuggestedRepositories allows clients to list suggested repositories38// based on recent workspaces and accessible repo configurations.39ListSuggestedRepositories(ctx context.Context, in *ListSuggestedRepositoriesRequest, opts ...grpc.CallOption) (*ListSuggestedRepositoriesResponse, error)40}4142type sCMServiceClient struct {43cc grpc.ClientConnInterface44}4546func NewSCMServiceClient(cc grpc.ClientConnInterface) SCMServiceClient {47return &sCMServiceClient{cc}48}4950func (c *sCMServiceClient) SearchSCMTokens(ctx context.Context, in *SearchSCMTokensRequest, opts ...grpc.CallOption) (*SearchSCMTokensResponse, error) {51out := new(SearchSCMTokensResponse)52err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/SearchSCMTokens", in, out, opts...)53if err != nil {54return nil, err55}56return out, nil57}5859func (c *sCMServiceClient) GuessTokenScopes(ctx context.Context, in *GuessTokenScopesRequest, opts ...grpc.CallOption) (*GuessTokenScopesResponse, error) {60out := new(GuessTokenScopesResponse)61err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/GuessTokenScopes", in, out, opts...)62if err != nil {63return nil, err64}65return out, nil66}6768func (c *sCMServiceClient) SearchRepositories(ctx context.Context, in *SearchRepositoriesRequest, opts ...grpc.CallOption) (*SearchRepositoriesResponse, error) {69out := new(SearchRepositoriesResponse)70err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/SearchRepositories", in, out, opts...)71if err != nil {72return nil, err73}74return out, nil75}7677func (c *sCMServiceClient) ListSuggestedRepositories(ctx context.Context, in *ListSuggestedRepositoriesRequest, opts ...grpc.CallOption) (*ListSuggestedRepositoriesResponse, error) {78out := new(ListSuggestedRepositoriesResponse)79err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/ListSuggestedRepositories", in, out, opts...)80if err != nil {81return nil, err82}83return out, nil84}8586// SCMServiceServer is the server API for SCMService service.87// All implementations must embed UnimplementedSCMServiceServer88// for forward compatibility89type SCMServiceServer interface {90// SearchSCMTokens allows clients to retrieve SCM tokens based on the91// specified host.92SearchSCMTokens(context.Context, *SearchSCMTokensRequest) (*SearchSCMTokensResponse, error)93// GuessTokenScopes allows clients to retrieve scopes their SCM token would94// require for the specified git command.95GuessTokenScopes(context.Context, *GuessTokenScopesRequest) (*GuessTokenScopesResponse, error)96// SearchRepositories allows clients to search for suggested repositories of97// SCM providers they are connected with.98SearchRepositories(context.Context, *SearchRepositoriesRequest) (*SearchRepositoriesResponse, error)99// ListSuggestedRepositories allows clients to list suggested repositories100// based on recent workspaces and accessible repo configurations.101ListSuggestedRepositories(context.Context, *ListSuggestedRepositoriesRequest) (*ListSuggestedRepositoriesResponse, error)102mustEmbedUnimplementedSCMServiceServer()103}104105// UnimplementedSCMServiceServer must be embedded to have forward compatible implementations.106type UnimplementedSCMServiceServer struct {107}108109func (UnimplementedSCMServiceServer) SearchSCMTokens(context.Context, *SearchSCMTokensRequest) (*SearchSCMTokensResponse, error) {110return nil, status.Errorf(codes.Unimplemented, "method SearchSCMTokens not implemented")111}112func (UnimplementedSCMServiceServer) GuessTokenScopes(context.Context, *GuessTokenScopesRequest) (*GuessTokenScopesResponse, error) {113return nil, status.Errorf(codes.Unimplemented, "method GuessTokenScopes not implemented")114}115func (UnimplementedSCMServiceServer) SearchRepositories(context.Context, *SearchRepositoriesRequest) (*SearchRepositoriesResponse, error) {116return nil, status.Errorf(codes.Unimplemented, "method SearchRepositories not implemented")117}118func (UnimplementedSCMServiceServer) ListSuggestedRepositories(context.Context, *ListSuggestedRepositoriesRequest) (*ListSuggestedRepositoriesResponse, error) {119return nil, status.Errorf(codes.Unimplemented, "method ListSuggestedRepositories not implemented")120}121func (UnimplementedSCMServiceServer) mustEmbedUnimplementedSCMServiceServer() {}122123// UnsafeSCMServiceServer may be embedded to opt out of forward compatibility for this service.124// Use of this interface is not recommended, as added methods to SCMServiceServer will125// result in compilation errors.126type UnsafeSCMServiceServer interface {127mustEmbedUnimplementedSCMServiceServer()128}129130func RegisterSCMServiceServer(s grpc.ServiceRegistrar, srv SCMServiceServer) {131s.RegisterService(&SCMService_ServiceDesc, srv)132}133134func _SCMService_SearchSCMTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {135in := new(SearchSCMTokensRequest)136if err := dec(in); err != nil {137return nil, err138}139if interceptor == nil {140return srv.(SCMServiceServer).SearchSCMTokens(ctx, in)141}142info := &grpc.UnaryServerInfo{143Server: srv,144FullMethod: "/gitpod.v1.SCMService/SearchSCMTokens",145}146handler := func(ctx context.Context, req interface{}) (interface{}, error) {147return srv.(SCMServiceServer).SearchSCMTokens(ctx, req.(*SearchSCMTokensRequest))148}149return interceptor(ctx, in, info, handler)150}151152func _SCMService_GuessTokenScopes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {153in := new(GuessTokenScopesRequest)154if err := dec(in); err != nil {155return nil, err156}157if interceptor == nil {158return srv.(SCMServiceServer).GuessTokenScopes(ctx, in)159}160info := &grpc.UnaryServerInfo{161Server: srv,162FullMethod: "/gitpod.v1.SCMService/GuessTokenScopes",163}164handler := func(ctx context.Context, req interface{}) (interface{}, error) {165return srv.(SCMServiceServer).GuessTokenScopes(ctx, req.(*GuessTokenScopesRequest))166}167return interceptor(ctx, in, info, handler)168}169170func _SCMService_SearchRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {171in := new(SearchRepositoriesRequest)172if err := dec(in); err != nil {173return nil, err174}175if interceptor == nil {176return srv.(SCMServiceServer).SearchRepositories(ctx, in)177}178info := &grpc.UnaryServerInfo{179Server: srv,180FullMethod: "/gitpod.v1.SCMService/SearchRepositories",181}182handler := func(ctx context.Context, req interface{}) (interface{}, error) {183return srv.(SCMServiceServer).SearchRepositories(ctx, req.(*SearchRepositoriesRequest))184}185return interceptor(ctx, in, info, handler)186}187188func _SCMService_ListSuggestedRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {189in := new(ListSuggestedRepositoriesRequest)190if err := dec(in); err != nil {191return nil, err192}193if interceptor == nil {194return srv.(SCMServiceServer).ListSuggestedRepositories(ctx, in)195}196info := &grpc.UnaryServerInfo{197Server: srv,198FullMethod: "/gitpod.v1.SCMService/ListSuggestedRepositories",199}200handler := func(ctx context.Context, req interface{}) (interface{}, error) {201return srv.(SCMServiceServer).ListSuggestedRepositories(ctx, req.(*ListSuggestedRepositoriesRequest))202}203return interceptor(ctx, in, info, handler)204}205206// SCMService_ServiceDesc is the grpc.ServiceDesc for SCMService service.207// It's only intended for direct use with grpc.RegisterService,208// and not to be introspected or modified (even as a copy)209var SCMService_ServiceDesc = grpc.ServiceDesc{210ServiceName: "gitpod.v1.SCMService",211HandlerType: (*SCMServiceServer)(nil),212Methods: []grpc.MethodDesc{213{214MethodName: "SearchSCMTokens",215Handler: _SCMService_SearchSCMTokens_Handler,216},217{218MethodName: "GuessTokenScopes",219Handler: _SCMService_GuessTokenScopes_Handler,220},221{222MethodName: "SearchRepositories",223Handler: _SCMService_SearchRepositories_Handler,224},225{226MethodName: "ListSuggestedRepositories",227Handler: _SCMService_ListSuggestedRepositories_Handler,228},229},230Streams: []grpc.StreamDesc{},231Metadata: "gitpod/v1/scm.proto",232}233234235