mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
184 lines
7.3 KiB
Go
184 lines
7.3 KiB
Go
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License-AGPL.txt in the project root for license information.
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// IDEPluginServiceClient is the client API for IDEPluginService service.
|
|
//
|
|
// 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.
|
|
type IDEPluginServiceClient interface {
|
|
// UploadURL provides a URL to which clients can upload the content via HTTP PUT.
|
|
UploadURL(ctx context.Context, in *PluginUploadURLRequest, opts ...grpc.CallOption) (*PluginUploadURLResponse, error)
|
|
// DownloadURL provides a URL from which clients can download the content via HTTP GET.
|
|
DownloadURL(ctx context.Context, in *PluginDownloadURLRequest, opts ...grpc.CallOption) (*PluginDownloadURLResponse, error)
|
|
// PluginHash provides a hash of the plugin
|
|
PluginHash(ctx context.Context, in *PluginHashRequest, opts ...grpc.CallOption) (*PluginHashResponse, error)
|
|
}
|
|
|
|
type iDEPluginServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewIDEPluginServiceClient(cc grpc.ClientConnInterface) IDEPluginServiceClient {
|
|
return &iDEPluginServiceClient{cc}
|
|
}
|
|
|
|
func (c *iDEPluginServiceClient) UploadURL(ctx context.Context, in *PluginUploadURLRequest, opts ...grpc.CallOption) (*PluginUploadURLResponse, error) {
|
|
out := new(PluginUploadURLResponse)
|
|
err := c.cc.Invoke(ctx, "/ideplugin.IDEPluginService/UploadURL", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *iDEPluginServiceClient) DownloadURL(ctx context.Context, in *PluginDownloadURLRequest, opts ...grpc.CallOption) (*PluginDownloadURLResponse, error) {
|
|
out := new(PluginDownloadURLResponse)
|
|
err := c.cc.Invoke(ctx, "/ideplugin.IDEPluginService/DownloadURL", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *iDEPluginServiceClient) PluginHash(ctx context.Context, in *PluginHashRequest, opts ...grpc.CallOption) (*PluginHashResponse, error) {
|
|
out := new(PluginHashResponse)
|
|
err := c.cc.Invoke(ctx, "/ideplugin.IDEPluginService/PluginHash", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// IDEPluginServiceServer is the server API for IDEPluginService service.
|
|
// All implementations must embed UnimplementedIDEPluginServiceServer
|
|
// for forward compatibility
|
|
type IDEPluginServiceServer interface {
|
|
// UploadURL provides a URL to which clients can upload the content via HTTP PUT.
|
|
UploadURL(context.Context, *PluginUploadURLRequest) (*PluginUploadURLResponse, error)
|
|
// DownloadURL provides a URL from which clients can download the content via HTTP GET.
|
|
DownloadURL(context.Context, *PluginDownloadURLRequest) (*PluginDownloadURLResponse, error)
|
|
// PluginHash provides a hash of the plugin
|
|
PluginHash(context.Context, *PluginHashRequest) (*PluginHashResponse, error)
|
|
mustEmbedUnimplementedIDEPluginServiceServer()
|
|
}
|
|
|
|
// UnimplementedIDEPluginServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedIDEPluginServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedIDEPluginServiceServer) UploadURL(context.Context, *PluginUploadURLRequest) (*PluginUploadURLResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadURL not implemented")
|
|
}
|
|
func (UnimplementedIDEPluginServiceServer) DownloadURL(context.Context, *PluginDownloadURLRequest) (*PluginDownloadURLResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DownloadURL not implemented")
|
|
}
|
|
func (UnimplementedIDEPluginServiceServer) PluginHash(context.Context, *PluginHashRequest) (*PluginHashResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PluginHash not implemented")
|
|
}
|
|
func (UnimplementedIDEPluginServiceServer) mustEmbedUnimplementedIDEPluginServiceServer() {}
|
|
|
|
// UnsafeIDEPluginServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to IDEPluginServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeIDEPluginServiceServer interface {
|
|
mustEmbedUnimplementedIDEPluginServiceServer()
|
|
}
|
|
|
|
func RegisterIDEPluginServiceServer(s grpc.ServiceRegistrar, srv IDEPluginServiceServer) {
|
|
s.RegisterService(&IDEPluginService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _IDEPluginService_UploadURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PluginUploadURLRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(IDEPluginServiceServer).UploadURL(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ideplugin.IDEPluginService/UploadURL",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(IDEPluginServiceServer).UploadURL(ctx, req.(*PluginUploadURLRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _IDEPluginService_DownloadURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PluginDownloadURLRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(IDEPluginServiceServer).DownloadURL(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ideplugin.IDEPluginService/DownloadURL",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(IDEPluginServiceServer).DownloadURL(ctx, req.(*PluginDownloadURLRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _IDEPluginService_PluginHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PluginHashRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(IDEPluginServiceServer).PluginHash(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ideplugin.IDEPluginService/PluginHash",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(IDEPluginServiceServer).PluginHash(ctx, req.(*PluginHashRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// IDEPluginService_ServiceDesc is the grpc.ServiceDesc for IDEPluginService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var IDEPluginService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "ideplugin.IDEPluginService",
|
|
HandlerType: (*IDEPluginServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "UploadURL",
|
|
Handler: _IDEPluginService_UploadURL_Handler,
|
|
},
|
|
{
|
|
MethodName: "DownloadURL",
|
|
Handler: _IDEPluginService_DownloadURL_Handler,
|
|
},
|
|
{
|
|
MethodName: "PluginHash",
|
|
Handler: _IDEPluginService_PluginHash_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "ideplugin.proto",
|
|
}
|