Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api/go/v1/scm_grpc.pb.go
2500 views
1
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
6
// versions:
7
// - protoc-gen-go-grpc v1.2.0
8
// - protoc (unknown)
9
// source: gitpod/v1/scm.proto
10
11
package v1
12
13
import (
14
context "context"
15
grpc "google.golang.org/grpc"
16
codes "google.golang.org/grpc/codes"
17
status "google.golang.org/grpc/status"
18
)
19
20
// This is a compile-time assertion to ensure that this generated file
21
// is compatible with the grpc package it is being compiled against.
22
// Requires gRPC-Go v1.32.0 or later.
23
const _ = grpc.SupportPackageIsVersion7
24
25
// SCMServiceClient is the client API for SCMService service.
26
//
27
// 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.
28
type SCMServiceClient interface {
29
// SearchSCMTokens allows clients to retrieve SCM tokens based on the
30
// specified host.
31
SearchSCMTokens(ctx context.Context, in *SearchSCMTokensRequest, opts ...grpc.CallOption) (*SearchSCMTokensResponse, error)
32
// GuessTokenScopes allows clients to retrieve scopes their SCM token would
33
// require for the specified git command.
34
GuessTokenScopes(ctx context.Context, in *GuessTokenScopesRequest, opts ...grpc.CallOption) (*GuessTokenScopesResponse, error)
35
// SearchRepositories allows clients to search for suggested repositories of
36
// SCM providers they are connected with.
37
SearchRepositories(ctx context.Context, in *SearchRepositoriesRequest, opts ...grpc.CallOption) (*SearchRepositoriesResponse, error)
38
// ListSuggestedRepositories allows clients to list suggested repositories
39
// based on recent workspaces and accessible repo configurations.
40
ListSuggestedRepositories(ctx context.Context, in *ListSuggestedRepositoriesRequest, opts ...grpc.CallOption) (*ListSuggestedRepositoriesResponse, error)
41
}
42
43
type sCMServiceClient struct {
44
cc grpc.ClientConnInterface
45
}
46
47
func NewSCMServiceClient(cc grpc.ClientConnInterface) SCMServiceClient {
48
return &sCMServiceClient{cc}
49
}
50
51
func (c *sCMServiceClient) SearchSCMTokens(ctx context.Context, in *SearchSCMTokensRequest, opts ...grpc.CallOption) (*SearchSCMTokensResponse, error) {
52
out := new(SearchSCMTokensResponse)
53
err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/SearchSCMTokens", in, out, opts...)
54
if err != nil {
55
return nil, err
56
}
57
return out, nil
58
}
59
60
func (c *sCMServiceClient) GuessTokenScopes(ctx context.Context, in *GuessTokenScopesRequest, opts ...grpc.CallOption) (*GuessTokenScopesResponse, error) {
61
out := new(GuessTokenScopesResponse)
62
err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/GuessTokenScopes", in, out, opts...)
63
if err != nil {
64
return nil, err
65
}
66
return out, nil
67
}
68
69
func (c *sCMServiceClient) SearchRepositories(ctx context.Context, in *SearchRepositoriesRequest, opts ...grpc.CallOption) (*SearchRepositoriesResponse, error) {
70
out := new(SearchRepositoriesResponse)
71
err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/SearchRepositories", in, out, opts...)
72
if err != nil {
73
return nil, err
74
}
75
return out, nil
76
}
77
78
func (c *sCMServiceClient) ListSuggestedRepositories(ctx context.Context, in *ListSuggestedRepositoriesRequest, opts ...grpc.CallOption) (*ListSuggestedRepositoriesResponse, error) {
79
out := new(ListSuggestedRepositoriesResponse)
80
err := c.cc.Invoke(ctx, "/gitpod.v1.SCMService/ListSuggestedRepositories", in, out, opts...)
81
if err != nil {
82
return nil, err
83
}
84
return out, nil
85
}
86
87
// SCMServiceServer is the server API for SCMService service.
88
// All implementations must embed UnimplementedSCMServiceServer
89
// for forward compatibility
90
type SCMServiceServer interface {
91
// SearchSCMTokens allows clients to retrieve SCM tokens based on the
92
// specified host.
93
SearchSCMTokens(context.Context, *SearchSCMTokensRequest) (*SearchSCMTokensResponse, error)
94
// GuessTokenScopes allows clients to retrieve scopes their SCM token would
95
// require for the specified git command.
96
GuessTokenScopes(context.Context, *GuessTokenScopesRequest) (*GuessTokenScopesResponse, error)
97
// SearchRepositories allows clients to search for suggested repositories of
98
// SCM providers they are connected with.
99
SearchRepositories(context.Context, *SearchRepositoriesRequest) (*SearchRepositoriesResponse, error)
100
// ListSuggestedRepositories allows clients to list suggested repositories
101
// based on recent workspaces and accessible repo configurations.
102
ListSuggestedRepositories(context.Context, *ListSuggestedRepositoriesRequest) (*ListSuggestedRepositoriesResponse, error)
103
mustEmbedUnimplementedSCMServiceServer()
104
}
105
106
// UnimplementedSCMServiceServer must be embedded to have forward compatible implementations.
107
type UnimplementedSCMServiceServer struct {
108
}
109
110
func (UnimplementedSCMServiceServer) SearchSCMTokens(context.Context, *SearchSCMTokensRequest) (*SearchSCMTokensResponse, error) {
111
return nil, status.Errorf(codes.Unimplemented, "method SearchSCMTokens not implemented")
112
}
113
func (UnimplementedSCMServiceServer) GuessTokenScopes(context.Context, *GuessTokenScopesRequest) (*GuessTokenScopesResponse, error) {
114
return nil, status.Errorf(codes.Unimplemented, "method GuessTokenScopes not implemented")
115
}
116
func (UnimplementedSCMServiceServer) SearchRepositories(context.Context, *SearchRepositoriesRequest) (*SearchRepositoriesResponse, error) {
117
return nil, status.Errorf(codes.Unimplemented, "method SearchRepositories not implemented")
118
}
119
func (UnimplementedSCMServiceServer) ListSuggestedRepositories(context.Context, *ListSuggestedRepositoriesRequest) (*ListSuggestedRepositoriesResponse, error) {
120
return nil, status.Errorf(codes.Unimplemented, "method ListSuggestedRepositories not implemented")
121
}
122
func (UnimplementedSCMServiceServer) mustEmbedUnimplementedSCMServiceServer() {}
123
124
// UnsafeSCMServiceServer may be embedded to opt out of forward compatibility for this service.
125
// Use of this interface is not recommended, as added methods to SCMServiceServer will
126
// result in compilation errors.
127
type UnsafeSCMServiceServer interface {
128
mustEmbedUnimplementedSCMServiceServer()
129
}
130
131
func RegisterSCMServiceServer(s grpc.ServiceRegistrar, srv SCMServiceServer) {
132
s.RegisterService(&SCMService_ServiceDesc, srv)
133
}
134
135
func _SCMService_SearchSCMTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
136
in := new(SearchSCMTokensRequest)
137
if err := dec(in); err != nil {
138
return nil, err
139
}
140
if interceptor == nil {
141
return srv.(SCMServiceServer).SearchSCMTokens(ctx, in)
142
}
143
info := &grpc.UnaryServerInfo{
144
Server: srv,
145
FullMethod: "/gitpod.v1.SCMService/SearchSCMTokens",
146
}
147
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
148
return srv.(SCMServiceServer).SearchSCMTokens(ctx, req.(*SearchSCMTokensRequest))
149
}
150
return interceptor(ctx, in, info, handler)
151
}
152
153
func _SCMService_GuessTokenScopes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
154
in := new(GuessTokenScopesRequest)
155
if err := dec(in); err != nil {
156
return nil, err
157
}
158
if interceptor == nil {
159
return srv.(SCMServiceServer).GuessTokenScopes(ctx, in)
160
}
161
info := &grpc.UnaryServerInfo{
162
Server: srv,
163
FullMethod: "/gitpod.v1.SCMService/GuessTokenScopes",
164
}
165
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
166
return srv.(SCMServiceServer).GuessTokenScopes(ctx, req.(*GuessTokenScopesRequest))
167
}
168
return interceptor(ctx, in, info, handler)
169
}
170
171
func _SCMService_SearchRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
172
in := new(SearchRepositoriesRequest)
173
if err := dec(in); err != nil {
174
return nil, err
175
}
176
if interceptor == nil {
177
return srv.(SCMServiceServer).SearchRepositories(ctx, in)
178
}
179
info := &grpc.UnaryServerInfo{
180
Server: srv,
181
FullMethod: "/gitpod.v1.SCMService/SearchRepositories",
182
}
183
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
184
return srv.(SCMServiceServer).SearchRepositories(ctx, req.(*SearchRepositoriesRequest))
185
}
186
return interceptor(ctx, in, info, handler)
187
}
188
189
func _SCMService_ListSuggestedRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
190
in := new(ListSuggestedRepositoriesRequest)
191
if err := dec(in); err != nil {
192
return nil, err
193
}
194
if interceptor == nil {
195
return srv.(SCMServiceServer).ListSuggestedRepositories(ctx, in)
196
}
197
info := &grpc.UnaryServerInfo{
198
Server: srv,
199
FullMethod: "/gitpod.v1.SCMService/ListSuggestedRepositories",
200
}
201
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
202
return srv.(SCMServiceServer).ListSuggestedRepositories(ctx, req.(*ListSuggestedRepositoriesRequest))
203
}
204
return interceptor(ctx, in, info, handler)
205
}
206
207
// SCMService_ServiceDesc is the grpc.ServiceDesc for SCMService service.
208
// It's only intended for direct use with grpc.RegisterService,
209
// and not to be introspected or modified (even as a copy)
210
var SCMService_ServiceDesc = grpc.ServiceDesc{
211
ServiceName: "gitpod.v1.SCMService",
212
HandlerType: (*SCMServiceServer)(nil),
213
Methods: []grpc.MethodDesc{
214
{
215
MethodName: "SearchSCMTokens",
216
Handler: _SCMService_SearchSCMTokens_Handler,
217
},
218
{
219
MethodName: "GuessTokenScopes",
220
Handler: _SCMService_GuessTokenScopes_Handler,
221
},
222
{
223
MethodName: "SearchRepositories",
224
Handler: _SCMService_SearchRepositories_Handler,
225
},
226
{
227
MethodName: "ListSuggestedRepositories",
228
Handler: _SCMService_ListSuggestedRepositories_Handler,
229
},
230
},
231
Streams: []grpc.StreamDesc{},
232
Metadata: "gitpod/v1/scm.proto",
233
}
234
235