blob: dab12355d9f7ded4ec884363dcff573a51af49ba [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/resource.proto
package registryv1alpha1
import (
context "context"
)
import (
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 (
ResourceService_GetResourceByName_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.ResourceService/GetResourceByName"
)
// ResourceServiceClient is the client API for ResourceService 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 ResourceServiceClient interface {
// GetResourceByName takes a resource name and returns the
// resource either as a repository or a plugin.
GetResourceByName(ctx context.Context, in *GetResourceByNameRequest, opts ...grpc.CallOption) (*GetResourceByNameResponse, error)
}
type resourceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewResourceServiceClient(cc grpc.ClientConnInterface) ResourceServiceClient {
return &resourceServiceClient{cc}
}
func (c *resourceServiceClient) GetResourceByName(ctx context.Context, in *GetResourceByNameRequest, opts ...grpc.CallOption) (*GetResourceByNameResponse, error) {
out := new(GetResourceByNameResponse)
err := c.cc.Invoke(ctx, ResourceService_GetResourceByName_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ResourceServiceServer is the server API for ResourceService service.
// All implementations must embed UnimplementedResourceServiceServer
// for forward compatibility
type ResourceServiceServer interface {
// GetResourceByName takes a resource name and returns the
// resource either as a repository or a plugin.
GetResourceByName(context.Context, *GetResourceByNameRequest) (*GetResourceByNameResponse, error)
mustEmbedUnimplementedResourceServiceServer()
}
// UnimplementedResourceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedResourceServiceServer struct {
}
func (UnimplementedResourceServiceServer) GetResourceByName(context.Context, *GetResourceByNameRequest) (*GetResourceByNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResourceByName not implemented")
}
func (UnimplementedResourceServiceServer) mustEmbedUnimplementedResourceServiceServer() {}
// UnsafeResourceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourceServiceServer will
// result in compilation errors.
type UnsafeResourceServiceServer interface {
mustEmbedUnimplementedResourceServiceServer()
}
func RegisterResourceServiceServer(s grpc.ServiceRegistrar, srv ResourceServiceServer) {
s.RegisterService(&ResourceService_ServiceDesc, srv)
}
func _ResourceService_GetResourceByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetResourceByNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceServiceServer).GetResourceByName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ResourceService_GetResourceByName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceServiceServer).GetResourceByName(ctx, req.(*GetResourceByNameRequest))
}
return interceptor(ctx, in, info, handler)
}
// ResourceService_ServiceDesc is the grpc.ServiceDesc for ResourceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ResourceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bufman.dubbo.apache.org.registry.v1alpha1.ResourceService",
HandlerType: (*ResourceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetResourceByName",
Handler: _ResourceService_GetResourceByName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "registry/v1alpha1/resource.proto",
}