Path: blob/main/components/content-service-api/go/workspace_grpc.pb.go
2496 views
// Copyright (c) 2023 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: workspace.proto910package api1112import (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// WorkspaceServiceClient is the client API for WorkspaceService 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 WorkspaceServiceClient interface {28// WorkspaceDownloadURL provides a URL from where the content of a workspace can be downloaded from29WorkspaceDownloadURL(ctx context.Context, in *WorkspaceDownloadURLRequest, opts ...grpc.CallOption) (*WorkspaceDownloadURLResponse, error)30// DeleteWorkspace deletes the content of a single workspace31DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*DeleteWorkspaceResponse, error)32// WorkspaceSnapshotExists checks whether the snapshot exists or not33WorkspaceSnapshotExists(ctx context.Context, in *WorkspaceSnapshotExistsRequest, opts ...grpc.CallOption) (*WorkspaceSnapshotExistsResponse, error)34}3536type workspaceServiceClient struct {37cc grpc.ClientConnInterface38}3940func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient {41return &workspaceServiceClient{cc}42}4344func (c *workspaceServiceClient) WorkspaceDownloadURL(ctx context.Context, in *WorkspaceDownloadURLRequest, opts ...grpc.CallOption) (*WorkspaceDownloadURLResponse, error) {45out := new(WorkspaceDownloadURLResponse)46err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/WorkspaceDownloadURL", in, out, opts...)47if err != nil {48return nil, err49}50return out, nil51}5253func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*DeleteWorkspaceResponse, error) {54out := new(DeleteWorkspaceResponse)55err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/DeleteWorkspace", in, out, opts...)56if err != nil {57return nil, err58}59return out, nil60}6162func (c *workspaceServiceClient) WorkspaceSnapshotExists(ctx context.Context, in *WorkspaceSnapshotExistsRequest, opts ...grpc.CallOption) (*WorkspaceSnapshotExistsResponse, error) {63out := new(WorkspaceSnapshotExistsResponse)64err := c.cc.Invoke(ctx, "/contentservice.WorkspaceService/WorkspaceSnapshotExists", in, out, opts...)65if err != nil {66return nil, err67}68return out, nil69}7071// WorkspaceServiceServer is the server API for WorkspaceService service.72// All implementations must embed UnimplementedWorkspaceServiceServer73// for forward compatibility74type WorkspaceServiceServer interface {75// WorkspaceDownloadURL provides a URL from where the content of a workspace can be downloaded from76WorkspaceDownloadURL(context.Context, *WorkspaceDownloadURLRequest) (*WorkspaceDownloadURLResponse, error)77// DeleteWorkspace deletes the content of a single workspace78DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*DeleteWorkspaceResponse, error)79// WorkspaceSnapshotExists checks whether the snapshot exists or not80WorkspaceSnapshotExists(context.Context, *WorkspaceSnapshotExistsRequest) (*WorkspaceSnapshotExistsResponse, error)81mustEmbedUnimplementedWorkspaceServiceServer()82}8384// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations.85type UnimplementedWorkspaceServiceServer struct {86}8788func (UnimplementedWorkspaceServiceServer) WorkspaceDownloadURL(context.Context, *WorkspaceDownloadURLRequest) (*WorkspaceDownloadURLResponse, error) {89return nil, status.Errorf(codes.Unimplemented, "method WorkspaceDownloadURL not implemented")90}91func (UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*DeleteWorkspaceResponse, error) {92return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented")93}94func (UnimplementedWorkspaceServiceServer) WorkspaceSnapshotExists(context.Context, *WorkspaceSnapshotExistsRequest) (*WorkspaceSnapshotExistsResponse, error) {95return nil, status.Errorf(codes.Unimplemented, "method WorkspaceSnapshotExists not implemented")96}97func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}9899// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.100// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will101// result in compilation errors.102type UnsafeWorkspaceServiceServer interface {103mustEmbedUnimplementedWorkspaceServiceServer()104}105106func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {107s.RegisterService(&WorkspaceService_ServiceDesc, srv)108}109110func _WorkspaceService_WorkspaceDownloadURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {111in := new(WorkspaceDownloadURLRequest)112if err := dec(in); err != nil {113return nil, err114}115if interceptor == nil {116return srv.(WorkspaceServiceServer).WorkspaceDownloadURL(ctx, in)117}118info := &grpc.UnaryServerInfo{119Server: srv,120FullMethod: "/contentservice.WorkspaceService/WorkspaceDownloadURL",121}122handler := func(ctx context.Context, req interface{}) (interface{}, error) {123return srv.(WorkspaceServiceServer).WorkspaceDownloadURL(ctx, req.(*WorkspaceDownloadURLRequest))124}125return interceptor(ctx, in, info, handler)126}127128func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {129in := new(DeleteWorkspaceRequest)130if err := dec(in); err != nil {131return nil, err132}133if interceptor == nil {134return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, in)135}136info := &grpc.UnaryServerInfo{137Server: srv,138FullMethod: "/contentservice.WorkspaceService/DeleteWorkspace",139}140handler := func(ctx context.Context, req interface{}) (interface{}, error) {141return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest))142}143return interceptor(ctx, in, info, handler)144}145146func _WorkspaceService_WorkspaceSnapshotExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {147in := new(WorkspaceSnapshotExistsRequest)148if err := dec(in); err != nil {149return nil, err150}151if interceptor == nil {152return srv.(WorkspaceServiceServer).WorkspaceSnapshotExists(ctx, in)153}154info := &grpc.UnaryServerInfo{155Server: srv,156FullMethod: "/contentservice.WorkspaceService/WorkspaceSnapshotExists",157}158handler := func(ctx context.Context, req interface{}) (interface{}, error) {159return srv.(WorkspaceServiceServer).WorkspaceSnapshotExists(ctx, req.(*WorkspaceSnapshotExistsRequest))160}161return interceptor(ctx, in, info, handler)162}163164// WorkspaceService_ServiceDesc is the grpc.ServiceDesc for WorkspaceService service.165// It's only intended for direct use with grpc.RegisterService,166// and not to be introspected or modified (even as a copy)167var WorkspaceService_ServiceDesc = grpc.ServiceDesc{168ServiceName: "contentservice.WorkspaceService",169HandlerType: (*WorkspaceServiceServer)(nil),170Methods: []grpc.MethodDesc{171{172MethodName: "WorkspaceDownloadURL",173Handler: _WorkspaceService_WorkspaceDownloadURL_Handler,174},175{176MethodName: "DeleteWorkspace",177Handler: _WorkspaceService_DeleteWorkspace_Handler,178},179{180MethodName: "WorkspaceSnapshotExists",181Handler: _WorkspaceService_WorkspaceSnapshotExists_Handler,182},183},184Streams: []grpc.StreamDesc{},185Metadata: "workspace.proto",186}187188189