blob: 87d00844e6800b9a7fdc4fcc12fc38c8b731c87e [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/schema.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 (
SchemaService_GetSchema_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.SchemaService/GetSchema"
SchemaService_ConvertMessage_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.SchemaService/ConvertMessage"
)
// SchemaServiceClient is the client API for SchemaService 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 SchemaServiceClient interface {
// GetSchema allows the caller to download a schema for one or more requested
// types, RPC services, or RPC methods.
GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error)
// ConvertMessage allows the caller to convert a given message data blob from
// one format to another by referring to a type schema for the blob.
ConvertMessage(ctx context.Context, in *ConvertMessageRequest, opts ...grpc.CallOption) (*ConvertMessageResponse, error)
}
type schemaServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSchemaServiceClient(cc grpc.ClientConnInterface) SchemaServiceClient {
return &schemaServiceClient{cc}
}
func (c *schemaServiceClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) {
out := new(GetSchemaResponse)
err := c.cc.Invoke(ctx, SchemaService_GetSchema_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schemaServiceClient) ConvertMessage(ctx context.Context, in *ConvertMessageRequest, opts ...grpc.CallOption) (*ConvertMessageResponse, error) {
out := new(ConvertMessageResponse)
err := c.cc.Invoke(ctx, SchemaService_ConvertMessage_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SchemaServiceServer is the server API for SchemaService service.
// All implementations must embed UnimplementedSchemaServiceServer
// for forward compatibility
type SchemaServiceServer interface {
// GetSchema allows the caller to download a schema for one or more requested
// types, RPC services, or RPC methods.
GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
// ConvertMessage allows the caller to convert a given message data blob from
// one format to another by referring to a type schema for the blob.
ConvertMessage(context.Context, *ConvertMessageRequest) (*ConvertMessageResponse, error)
mustEmbedUnimplementedSchemaServiceServer()
}
// UnimplementedSchemaServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSchemaServiceServer struct {
}
func (UnimplementedSchemaServiceServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
func (UnimplementedSchemaServiceServer) ConvertMessage(context.Context, *ConvertMessageRequest) (*ConvertMessageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ConvertMessage not implemented")
}
func (UnimplementedSchemaServiceServer) mustEmbedUnimplementedSchemaServiceServer() {}
// UnsafeSchemaServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SchemaServiceServer will
// result in compilation errors.
type UnsafeSchemaServiceServer interface {
mustEmbedUnimplementedSchemaServiceServer()
}
func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer) {
s.RegisterService(&SchemaService_ServiceDesc, srv)
}
func _SchemaService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchemaServiceServer).GetSchema(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchemaService_GetSchema_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchemaServiceServer).GetSchema(ctx, req.(*GetSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchemaService_ConvertMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConvertMessageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchemaServiceServer).ConvertMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SchemaService_ConvertMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchemaServiceServer).ConvertMessage(ctx, req.(*ConvertMessageRequest))
}
return interceptor(ctx, in, info, handler)
}
// SchemaService_ServiceDesc is the grpc.ServiceDesc for SchemaService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SchemaService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bufman.dubbo.apache.org.registry.v1alpha1.SchemaService",
HandlerType: (*SchemaServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSchema",
Handler: _SchemaService_GetSchema_Handler,
},
{
MethodName: "ConvertMessage",
Handler: _SchemaService_ConvertMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "registry/v1alpha1/schema.proto",
}