Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api/go/v1/ssh_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/ssh.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
// SSHServiceClient is the client API for SSHService 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 SSHServiceClient interface {
29
// ListSSHPublicKeys returns all the ssh public keys for the
30
// authenticated user.
31
ListSSHPublicKeys(ctx context.Context, in *ListSSHPublicKeysRequest, opts ...grpc.CallOption) (*ListSSHPublicKeysResponse, error)
32
// CreateSSHPublicKeys creates an ssh public key for the
33
// authenticated user.
34
CreateSSHPublicKey(ctx context.Context, in *CreateSSHPublicKeyRequest, opts ...grpc.CallOption) (*CreateSSHPublicKeyResponse, error)
35
// DeleteSSHPublicKeys deletes an ssh public key for the
36
// authenticated user.
37
DeleteSSHPublicKey(ctx context.Context, in *DeleteSSHPublicKeyRequest, opts ...grpc.CallOption) (*DeleteSSHPublicKeyResponse, error)
38
}
39
40
type sSHServiceClient struct {
41
cc grpc.ClientConnInterface
42
}
43
44
func NewSSHServiceClient(cc grpc.ClientConnInterface) SSHServiceClient {
45
return &sSHServiceClient{cc}
46
}
47
48
func (c *sSHServiceClient) ListSSHPublicKeys(ctx context.Context, in *ListSSHPublicKeysRequest, opts ...grpc.CallOption) (*ListSSHPublicKeysResponse, error) {
49
out := new(ListSSHPublicKeysResponse)
50
err := c.cc.Invoke(ctx, "/gitpod.v1.SSHService/ListSSHPublicKeys", in, out, opts...)
51
if err != nil {
52
return nil, err
53
}
54
return out, nil
55
}
56
57
func (c *sSHServiceClient) CreateSSHPublicKey(ctx context.Context, in *CreateSSHPublicKeyRequest, opts ...grpc.CallOption) (*CreateSSHPublicKeyResponse, error) {
58
out := new(CreateSSHPublicKeyResponse)
59
err := c.cc.Invoke(ctx, "/gitpod.v1.SSHService/CreateSSHPublicKey", in, out, opts...)
60
if err != nil {
61
return nil, err
62
}
63
return out, nil
64
}
65
66
func (c *sSHServiceClient) DeleteSSHPublicKey(ctx context.Context, in *DeleteSSHPublicKeyRequest, opts ...grpc.CallOption) (*DeleteSSHPublicKeyResponse, error) {
67
out := new(DeleteSSHPublicKeyResponse)
68
err := c.cc.Invoke(ctx, "/gitpod.v1.SSHService/DeleteSSHPublicKey", in, out, opts...)
69
if err != nil {
70
return nil, err
71
}
72
return out, nil
73
}
74
75
// SSHServiceServer is the server API for SSHService service.
76
// All implementations must embed UnimplementedSSHServiceServer
77
// for forward compatibility
78
type SSHServiceServer interface {
79
// ListSSHPublicKeys returns all the ssh public keys for the
80
// authenticated user.
81
ListSSHPublicKeys(context.Context, *ListSSHPublicKeysRequest) (*ListSSHPublicKeysResponse, error)
82
// CreateSSHPublicKeys creates an ssh public key for the
83
// authenticated user.
84
CreateSSHPublicKey(context.Context, *CreateSSHPublicKeyRequest) (*CreateSSHPublicKeyResponse, error)
85
// DeleteSSHPublicKeys deletes an ssh public key for the
86
// authenticated user.
87
DeleteSSHPublicKey(context.Context, *DeleteSSHPublicKeyRequest) (*DeleteSSHPublicKeyResponse, error)
88
mustEmbedUnimplementedSSHServiceServer()
89
}
90
91
// UnimplementedSSHServiceServer must be embedded to have forward compatible implementations.
92
type UnimplementedSSHServiceServer struct {
93
}
94
95
func (UnimplementedSSHServiceServer) ListSSHPublicKeys(context.Context, *ListSSHPublicKeysRequest) (*ListSSHPublicKeysResponse, error) {
96
return nil, status.Errorf(codes.Unimplemented, "method ListSSHPublicKeys not implemented")
97
}
98
func (UnimplementedSSHServiceServer) CreateSSHPublicKey(context.Context, *CreateSSHPublicKeyRequest) (*CreateSSHPublicKeyResponse, error) {
99
return nil, status.Errorf(codes.Unimplemented, "method CreateSSHPublicKey not implemented")
100
}
101
func (UnimplementedSSHServiceServer) DeleteSSHPublicKey(context.Context, *DeleteSSHPublicKeyRequest) (*DeleteSSHPublicKeyResponse, error) {
102
return nil, status.Errorf(codes.Unimplemented, "method DeleteSSHPublicKey not implemented")
103
}
104
func (UnimplementedSSHServiceServer) mustEmbedUnimplementedSSHServiceServer() {}
105
106
// UnsafeSSHServiceServer may be embedded to opt out of forward compatibility for this service.
107
// Use of this interface is not recommended, as added methods to SSHServiceServer will
108
// result in compilation errors.
109
type UnsafeSSHServiceServer interface {
110
mustEmbedUnimplementedSSHServiceServer()
111
}
112
113
func RegisterSSHServiceServer(s grpc.ServiceRegistrar, srv SSHServiceServer) {
114
s.RegisterService(&SSHService_ServiceDesc, srv)
115
}
116
117
func _SSHService_ListSSHPublicKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
118
in := new(ListSSHPublicKeysRequest)
119
if err := dec(in); err != nil {
120
return nil, err
121
}
122
if interceptor == nil {
123
return srv.(SSHServiceServer).ListSSHPublicKeys(ctx, in)
124
}
125
info := &grpc.UnaryServerInfo{
126
Server: srv,
127
FullMethod: "/gitpod.v1.SSHService/ListSSHPublicKeys",
128
}
129
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
130
return srv.(SSHServiceServer).ListSSHPublicKeys(ctx, req.(*ListSSHPublicKeysRequest))
131
}
132
return interceptor(ctx, in, info, handler)
133
}
134
135
func _SSHService_CreateSSHPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
136
in := new(CreateSSHPublicKeyRequest)
137
if err := dec(in); err != nil {
138
return nil, err
139
}
140
if interceptor == nil {
141
return srv.(SSHServiceServer).CreateSSHPublicKey(ctx, in)
142
}
143
info := &grpc.UnaryServerInfo{
144
Server: srv,
145
FullMethod: "/gitpod.v1.SSHService/CreateSSHPublicKey",
146
}
147
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
148
return srv.(SSHServiceServer).CreateSSHPublicKey(ctx, req.(*CreateSSHPublicKeyRequest))
149
}
150
return interceptor(ctx, in, info, handler)
151
}
152
153
func _SSHService_DeleteSSHPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
154
in := new(DeleteSSHPublicKeyRequest)
155
if err := dec(in); err != nil {
156
return nil, err
157
}
158
if interceptor == nil {
159
return srv.(SSHServiceServer).DeleteSSHPublicKey(ctx, in)
160
}
161
info := &grpc.UnaryServerInfo{
162
Server: srv,
163
FullMethod: "/gitpod.v1.SSHService/DeleteSSHPublicKey",
164
}
165
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
166
return srv.(SSHServiceServer).DeleteSSHPublicKey(ctx, req.(*DeleteSSHPublicKeyRequest))
167
}
168
return interceptor(ctx, in, info, handler)
169
}
170
171
// SSHService_ServiceDesc is the grpc.ServiceDesc for SSHService service.
172
// It's only intended for direct use with grpc.RegisterService,
173
// and not to be introspected or modified (even as a copy)
174
var SSHService_ServiceDesc = grpc.ServiceDesc{
175
ServiceName: "gitpod.v1.SSHService",
176
HandlerType: (*SSHServiceServer)(nil),
177
Methods: []grpc.MethodDesc{
178
{
179
MethodName: "ListSSHPublicKeys",
180
Handler: _SSHService_ListSSHPublicKeys_Handler,
181
},
182
{
183
MethodName: "CreateSSHPublicKey",
184
Handler: _SSHService_CreateSSHPublicKey_Handler,
185
},
186
{
187
MethodName: "DeleteSSHPublicKey",
188
Handler: _SSHService_DeleteSSHPublicKey_Handler,
189
},
190
},
191
Streams: []grpc.StreamDesc{},
192
Metadata: "gitpod/v1/ssh.proto",
193
}
194
195