Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/content-service-api/go/workspace_grpc.pb.go
2496 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 (unknown)
9
// source: workspace.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
// WorkspaceServiceClient is the client API for WorkspaceService 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 WorkspaceServiceClient interface {
29
// WorkspaceDownloadURL provides a URL from where the content of a workspace can be downloaded from
30
WorkspaceDownloadURL(ctx context.Context, in *WorkspaceDownloadURLRequest, opts ...grpc.CallOption) (*WorkspaceDownloadURLResponse, error)
31
// DeleteWorkspace deletes the content of a single workspace
32
DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*DeleteWorkspaceResponse, error)
33
// WorkspaceSnapshotExists checks whether the snapshot exists or not
34
WorkspaceSnapshotExists(ctx context.Context, in *WorkspaceSnapshotExistsRequest, opts ...grpc.CallOption) (*WorkspaceSnapshotExistsResponse, error)
35
}
36
37
type workspaceServiceClient struct {
38
cc grpc.ClientConnInterface
39
}
40
41
func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient {
42
return &workspaceServiceClient{cc}
43
}
44
45
func (c *workspaceServiceClient) WorkspaceDownloadURL(ctx context.Context, in *WorkspaceDownloadURLRequest, opts ...grpc.CallOption) (*WorkspaceDownloadURLResponse, error) {
46
out := new(WorkspaceDownloadURLResponse)
47
err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/WorkspaceDownloadURL", in, out, opts...)
48
if err != nil {
49
return nil, err
50
}
51
return out, nil
52
}
53
54
func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*DeleteWorkspaceResponse, error) {
55
out := new(DeleteWorkspaceResponse)
56
err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/DeleteWorkspace", in, out, opts...)
57
if err != nil {
58
return nil, err
59
}
60
return out, nil
61
}
62
63
func (c *workspaceServiceClient) WorkspaceSnapshotExists(ctx context.Context, in *WorkspaceSnapshotExistsRequest, opts ...grpc.CallOption) (*WorkspaceSnapshotExistsResponse, error) {
64
out := new(WorkspaceSnapshotExistsResponse)
65
err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/WorkspaceSnapshotExists", in, out, opts...)
66
if err != nil {
67
return nil, err
68
}
69
return out, nil
70
}
71
72
// WorkspaceServiceServer is the server API for WorkspaceService service.
73
// All implementations must embed UnimplementedWorkspaceServiceServer
74
// for forward compatibility
75
type WorkspaceServiceServer interface {
76
// WorkspaceDownloadURL provides a URL from where the content of a workspace can be downloaded from
77
WorkspaceDownloadURL(context.Context, *WorkspaceDownloadURLRequest) (*WorkspaceDownloadURLResponse, error)
78
// DeleteWorkspace deletes the content of a single workspace
79
DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*DeleteWorkspaceResponse, error)
80
// WorkspaceSnapshotExists checks whether the snapshot exists or not
81
WorkspaceSnapshotExists(context.Context, *WorkspaceSnapshotExistsRequest) (*WorkspaceSnapshotExistsResponse, error)
82
mustEmbedUnimplementedWorkspaceServiceServer()
83
}
84
85
// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations.
86
type UnimplementedWorkspaceServiceServer struct {
87
}
88
89
func (UnimplementedWorkspaceServiceServer) WorkspaceDownloadURL(context.Context, *WorkspaceDownloadURLRequest) (*WorkspaceDownloadURLResponse, error) {
90
return nil, status.Errorf(codes.Unimplemented, "method WorkspaceDownloadURL not implemented")
91
}
92
func (UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*DeleteWorkspaceResponse, error) {
93
return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented")
94
}
95
func (UnimplementedWorkspaceServiceServer) WorkspaceSnapshotExists(context.Context, *WorkspaceSnapshotExistsRequest) (*WorkspaceSnapshotExistsResponse, error) {
96
return nil, status.Errorf(codes.Unimplemented, "method WorkspaceSnapshotExists not implemented")
97
}
98
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
99
100
// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
101
// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will
102
// result in compilation errors.
103
type UnsafeWorkspaceServiceServer interface {
104
mustEmbedUnimplementedWorkspaceServiceServer()
105
}
106
107
func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {
108
s.RegisterService(&WorkspaceService_ServiceDesc, srv)
109
}
110
111
func _WorkspaceService_WorkspaceDownloadURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
112
in := new(WorkspaceDownloadURLRequest)
113
if err := dec(in); err != nil {
114
return nil, err
115
}
116
if interceptor == nil {
117
return srv.(WorkspaceServiceServer).WorkspaceDownloadURL(ctx, in)
118
}
119
info := &grpc.UnaryServerInfo{
120
Server: srv,
121
FullMethod: "/contentservice.WorkspaceService/WorkspaceDownloadURL",
122
}
123
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
124
return srv.(WorkspaceServiceServer).WorkspaceDownloadURL(ctx, req.(*WorkspaceDownloadURLRequest))
125
}
126
return interceptor(ctx, in, info, handler)
127
}
128
129
func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
130
in := new(DeleteWorkspaceRequest)
131
if err := dec(in); err != nil {
132
return nil, err
133
}
134
if interceptor == nil {
135
return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, in)
136
}
137
info := &grpc.UnaryServerInfo{
138
Server: srv,
139
FullMethod: "/contentservice.WorkspaceService/DeleteWorkspace",
140
}
141
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
142
return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest))
143
}
144
return interceptor(ctx, in, info, handler)
145
}
146
147
func _WorkspaceService_WorkspaceSnapshotExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
148
in := new(WorkspaceSnapshotExistsRequest)
149
if err := dec(in); err != nil {
150
return nil, err
151
}
152
if interceptor == nil {
153
return srv.(WorkspaceServiceServer).WorkspaceSnapshotExists(ctx, in)
154
}
155
info := &grpc.UnaryServerInfo{
156
Server: srv,
157
FullMethod: "/contentservice.WorkspaceService/WorkspaceSnapshotExists",
158
}
159
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
160
return srv.(WorkspaceServiceServer).WorkspaceSnapshotExists(ctx, req.(*WorkspaceSnapshotExistsRequest))
161
}
162
return interceptor(ctx, in, info, handler)
163
}
164
165
// WorkspaceService_ServiceDesc is the grpc.ServiceDesc for WorkspaceService service.
166
// It's only intended for direct use with grpc.RegisterService,
167
// and not to be introspected or modified (even as a copy)
168
var WorkspaceService_ServiceDesc = grpc.ServiceDesc{
169
ServiceName: "contentservice.WorkspaceService",
170
HandlerType: (*WorkspaceServiceServer)(nil),
171
Methods: []grpc.MethodDesc{
172
{
173
MethodName: "WorkspaceDownloadURL",
174
Handler: _WorkspaceService_WorkspaceDownloadURL_Handler,
175
},
176
{
177
MethodName: "DeleteWorkspace",
178
Handler: _WorkspaceService_DeleteWorkspace_Handler,
179
},
180
{
181
MethodName: "WorkspaceSnapshotExists",
182
Handler: _WorkspaceService_WorkspaceSnapshotExists_Handler,
183
},
184
},
185
Streams: []grpc.StreamDesc{},
186
Metadata: "workspace.proto",
187
}
188
189