Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/local-app-api/go/localapp_grpc.pb.go
2498 views
1
// Copyright (c) 2023 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 v3.20.1
9
// source: localapp.proto
10
11
package api
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
// LocalAppClient is the client API for LocalApp 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 LocalAppClient interface {
29
TunnelStatus(ctx context.Context, in *TunnelStatusRequest, opts ...grpc.CallOption) (LocalApp_TunnelStatusClient, error)
30
AutoTunnel(ctx context.Context, in *AutoTunnelRequest, opts ...grpc.CallOption) (*AutoTunnelResponse, error)
31
ResolveSSHConnection(ctx context.Context, in *ResolveSSHConnectionRequest, opts ...grpc.CallOption) (*ResolveSSHConnectionResponse, error)
32
}
33
34
type localAppClient struct {
35
cc grpc.ClientConnInterface
36
}
37
38
func NewLocalAppClient(cc grpc.ClientConnInterface) LocalAppClient {
39
return &localAppClient{cc}
40
}
41
42
func (c *localAppClient) TunnelStatus(ctx context.Context, in *TunnelStatusRequest, opts ...grpc.CallOption) (LocalApp_TunnelStatusClient, error) {
43
stream, err := c.cc.NewStream(ctx, &LocalApp_ServiceDesc.Streams[0], "/localapp.LocalApp/TunnelStatus", opts...)
44
if err != nil {
45
return nil, err
46
}
47
x := &localAppTunnelStatusClient{stream}
48
if err := x.ClientStream.SendMsg(in); err != nil {
49
return nil, err
50
}
51
if err := x.ClientStream.CloseSend(); err != nil {
52
return nil, err
53
}
54
return x, nil
55
}
56
57
type LocalApp_TunnelStatusClient interface {
58
Recv() (*TunnelStatusResponse, error)
59
grpc.ClientStream
60
}
61
62
type localAppTunnelStatusClient struct {
63
grpc.ClientStream
64
}
65
66
func (x *localAppTunnelStatusClient) Recv() (*TunnelStatusResponse, error) {
67
m := new(TunnelStatusResponse)
68
if err := x.ClientStream.RecvMsg(m); err != nil {
69
return nil, err
70
}
71
return m, nil
72
}
73
74
func (c *localAppClient) AutoTunnel(ctx context.Context, in *AutoTunnelRequest, opts ...grpc.CallOption) (*AutoTunnelResponse, error) {
75
out := new(AutoTunnelResponse)
76
err := c.cc.Invoke(ctx, "/localapp.LocalApp/AutoTunnel", in, out, opts...)
77
if err != nil {
78
return nil, err
79
}
80
return out, nil
81
}
82
83
func (c *localAppClient) ResolveSSHConnection(ctx context.Context, in *ResolveSSHConnectionRequest, opts ...grpc.CallOption) (*ResolveSSHConnectionResponse, error) {
84
out := new(ResolveSSHConnectionResponse)
85
err := c.cc.Invoke(ctx, "/localapp.LocalApp/ResolveSSHConnection", in, out, opts...)
86
if err != nil {
87
return nil, err
88
}
89
return out, nil
90
}
91
92
// LocalAppServer is the server API for LocalApp service.
93
// All implementations must embed UnimplementedLocalAppServer
94
// for forward compatibility
95
type LocalAppServer interface {
96
TunnelStatus(*TunnelStatusRequest, LocalApp_TunnelStatusServer) error
97
AutoTunnel(context.Context, *AutoTunnelRequest) (*AutoTunnelResponse, error)
98
ResolveSSHConnection(context.Context, *ResolveSSHConnectionRequest) (*ResolveSSHConnectionResponse, error)
99
mustEmbedUnimplementedLocalAppServer()
100
}
101
102
// UnimplementedLocalAppServer must be embedded to have forward compatible implementations.
103
type UnimplementedLocalAppServer struct {
104
}
105
106
func (UnimplementedLocalAppServer) TunnelStatus(*TunnelStatusRequest, LocalApp_TunnelStatusServer) error {
107
return status.Errorf(codes.Unimplemented, "method TunnelStatus not implemented")
108
}
109
func (UnimplementedLocalAppServer) AutoTunnel(context.Context, *AutoTunnelRequest) (*AutoTunnelResponse, error) {
110
return nil, status.Errorf(codes.Unimplemented, "method AutoTunnel not implemented")
111
}
112
func (UnimplementedLocalAppServer) ResolveSSHConnection(context.Context, *ResolveSSHConnectionRequest) (*ResolveSSHConnectionResponse, error) {
113
return nil, status.Errorf(codes.Unimplemented, "method ResolveSSHConnection not implemented")
114
}
115
func (UnimplementedLocalAppServer) mustEmbedUnimplementedLocalAppServer() {}
116
117
// UnsafeLocalAppServer may be embedded to opt out of forward compatibility for this service.
118
// Use of this interface is not recommended, as added methods to LocalAppServer will
119
// result in compilation errors.
120
type UnsafeLocalAppServer interface {
121
mustEmbedUnimplementedLocalAppServer()
122
}
123
124
func RegisterLocalAppServer(s grpc.ServiceRegistrar, srv LocalAppServer) {
125
s.RegisterService(&LocalApp_ServiceDesc, srv)
126
}
127
128
func _LocalApp_TunnelStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
129
m := new(TunnelStatusRequest)
130
if err := stream.RecvMsg(m); err != nil {
131
return err
132
}
133
return srv.(LocalAppServer).TunnelStatus(m, &localAppTunnelStatusServer{stream})
134
}
135
136
type LocalApp_TunnelStatusServer interface {
137
Send(*TunnelStatusResponse) error
138
grpc.ServerStream
139
}
140
141
type localAppTunnelStatusServer struct {
142
grpc.ServerStream
143
}
144
145
func (x *localAppTunnelStatusServer) Send(m *TunnelStatusResponse) error {
146
return x.ServerStream.SendMsg(m)
147
}
148
149
func _LocalApp_AutoTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
150
in := new(AutoTunnelRequest)
151
if err := dec(in); err != nil {
152
return nil, err
153
}
154
if interceptor == nil {
155
return srv.(LocalAppServer).AutoTunnel(ctx, in)
156
}
157
info := &grpc.UnaryServerInfo{
158
Server: srv,
159
FullMethod: "/localapp.LocalApp/AutoTunnel",
160
}
161
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
162
return srv.(LocalAppServer).AutoTunnel(ctx, req.(*AutoTunnelRequest))
163
}
164
return interceptor(ctx, in, info, handler)
165
}
166
167
func _LocalApp_ResolveSSHConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
168
in := new(ResolveSSHConnectionRequest)
169
if err := dec(in); err != nil {
170
return nil, err
171
}
172
if interceptor == nil {
173
return srv.(LocalAppServer).ResolveSSHConnection(ctx, in)
174
}
175
info := &grpc.UnaryServerInfo{
176
Server: srv,
177
FullMethod: "/localapp.LocalApp/ResolveSSHConnection",
178
}
179
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
180
return srv.(LocalAppServer).ResolveSSHConnection(ctx, req.(*ResolveSSHConnectionRequest))
181
}
182
return interceptor(ctx, in, info, handler)
183
}
184
185
// LocalApp_ServiceDesc is the grpc.ServiceDesc for LocalApp service.
186
// It's only intended for direct use with grpc.RegisterService,
187
// and not to be introspected or modified (even as a copy)
188
var LocalApp_ServiceDesc = grpc.ServiceDesc{
189
ServiceName: "localapp.LocalApp",
190
HandlerType: (*LocalAppServer)(nil),
191
Methods: []grpc.MethodDesc{
192
{
193
MethodName: "AutoTunnel",
194
Handler: _LocalApp_AutoTunnel_Handler,
195
},
196
{
197
MethodName: "ResolveSSHConnection",
198
Handler: _LocalApp_ResolveSSHConnection_Handler,
199
},
200
},
201
Streams: []grpc.StreamDesc{
202
{
203
StreamName: "TunnelStatus",
204
Handler: _LocalApp_TunnelStatus_Handler,
205
ServerStreams: true,
206
},
207
},
208
Metadata: "localapp.proto",
209
}
210
211