blob: 40fa8451ed4db06607194723b5e870ae41ead3a5 [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: registry/v1alpha1/download.proto
package registryv1alpha1
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
const (
DownloadService_Download_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.DownloadService/Download"
DownloadService_DownloadManifestAndBlobs_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.DownloadService/DownloadManifestAndBlobs"
)
// DownloadServiceClient is the client API for DownloadService 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 DownloadServiceClient interface {
// Download downloads a BSR module.
// NOTE: Newer clients should use DownloadManifestAndBlobs instead.
Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*DownloadResponse, error)
// DownloadManifestAndBlobs downloads a module in the manifest+blobs encoding format.
DownloadManifestAndBlobs(ctx context.Context, in *DownloadManifestAndBlobsRequest, opts ...grpc.CallOption) (*DownloadManifestAndBlobsResponse, error)
}
type downloadServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDownloadServiceClient(cc grpc.ClientConnInterface) DownloadServiceClient {
return &downloadServiceClient{cc}
}
func (c *downloadServiceClient) Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*DownloadResponse, error) {
out := new(DownloadResponse)
err := c.cc.Invoke(ctx, DownloadService_Download_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *downloadServiceClient) DownloadManifestAndBlobs(ctx context.Context, in *DownloadManifestAndBlobsRequest, opts ...grpc.CallOption) (*DownloadManifestAndBlobsResponse, error) {
out := new(DownloadManifestAndBlobsResponse)
err := c.cc.Invoke(ctx, DownloadService_DownloadManifestAndBlobs_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DownloadServiceServer is the server API for DownloadService service.
// All implementations must embed UnimplementedDownloadServiceServer
// for forward compatibility
type DownloadServiceServer interface {
// Download downloads a BSR module.
// NOTE: Newer clients should use DownloadManifestAndBlobs instead.
Download(context.Context, *DownloadRequest) (*DownloadResponse, error)
// DownloadManifestAndBlobs downloads a module in the manifest+blobs encoding format.
DownloadManifestAndBlobs(context.Context, *DownloadManifestAndBlobsRequest) (*DownloadManifestAndBlobsResponse, error)
mustEmbedUnimplementedDownloadServiceServer()
}
// UnimplementedDownloadServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDownloadServiceServer struct {
}
func (UnimplementedDownloadServiceServer) Download(context.Context, *DownloadRequest) (*DownloadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Download not implemented")
}
func (UnimplementedDownloadServiceServer) DownloadManifestAndBlobs(context.Context, *DownloadManifestAndBlobsRequest) (*DownloadManifestAndBlobsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DownloadManifestAndBlobs not implemented")
}
func (UnimplementedDownloadServiceServer) mustEmbedUnimplementedDownloadServiceServer() {}
// UnsafeDownloadServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DownloadServiceServer will
// result in compilation errors.
type UnsafeDownloadServiceServer interface {
mustEmbedUnimplementedDownloadServiceServer()
}
func RegisterDownloadServiceServer(s grpc.ServiceRegistrar, srv DownloadServiceServer) {
s.RegisterService(&DownloadService_ServiceDesc, srv)
}
func _DownloadService_Download_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DownloadServiceServer).Download(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DownloadService_Download_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DownloadServiceServer).Download(ctx, req.(*DownloadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DownloadService_DownloadManifestAndBlobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadManifestAndBlobsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DownloadServiceServer).DownloadManifestAndBlobs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DownloadService_DownloadManifestAndBlobs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DownloadServiceServer).DownloadManifestAndBlobs(ctx, req.(*DownloadManifestAndBlobsRequest))
}
return interceptor(ctx, in, info, handler)
}
// DownloadService_ServiceDesc is the grpc.ServiceDesc for DownloadService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DownloadService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bufman.dubbo.apache.org.registry.v1alpha1.DownloadService",
HandlerType: (*DownloadServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Download",
Handler: _DownloadService_Download_Handler,
},
{
MethodName: "DownloadManifestAndBlobs",
Handler: _DownloadService_DownloadManifestAndBlobs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "registry/v1alpha1/download.proto",
}