mirror of
https://github.com/netscrawler/protoss.git
synced 2025-05-06 16:09:53 +00:00
111 lines
3.7 KiB
Go
111 lines
3.7 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.4.0
|
|
// - protoc v5.27.1
|
|
// source: changeAPI/changeAPI.proto
|
|
|
|
package cnvrtv1
|
|
|
|
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.62.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion8
|
|
|
|
const (
|
|
Converter_Convert_FullMethodName = "/cnvrt.Converter/Convert"
|
|
)
|
|
|
|
// ConverterClient is the client API for Converter 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 ConverterClient interface {
|
|
Convert(ctx context.Context, in *ConvertRequest, opts ...grpc.CallOption) (*ConvertResponse, error)
|
|
}
|
|
|
|
type converterClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewConverterClient(cc grpc.ClientConnInterface) ConverterClient {
|
|
return &converterClient{cc}
|
|
}
|
|
|
|
func (c *converterClient) Convert(ctx context.Context, in *ConvertRequest, opts ...grpc.CallOption) (*ConvertResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ConvertResponse)
|
|
err := c.cc.Invoke(ctx, Converter_Convert_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ConverterServer is the server API for Converter service.
|
|
// All implementations must embed UnimplementedConverterServer
|
|
// for forward compatibility
|
|
type ConverterServer interface {
|
|
Convert(context.Context, *ConvertRequest) (*ConvertResponse, error)
|
|
mustEmbedUnimplementedConverterServer()
|
|
}
|
|
|
|
// UnimplementedConverterServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedConverterServer struct {
|
|
}
|
|
|
|
func (UnimplementedConverterServer) Convert(context.Context, *ConvertRequest) (*ConvertResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Convert not implemented")
|
|
}
|
|
func (UnimplementedConverterServer) mustEmbedUnimplementedConverterServer() {}
|
|
|
|
// UnsafeConverterServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ConverterServer will
|
|
// result in compilation errors.
|
|
type UnsafeConverterServer interface {
|
|
mustEmbedUnimplementedConverterServer()
|
|
}
|
|
|
|
func RegisterConverterServer(s grpc.ServiceRegistrar, srv ConverterServer) {
|
|
s.RegisterService(&Converter_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Converter_Convert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConvertRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConverterServer).Convert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Converter_Convert_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConverterServer).Convert(ctx, req.(*ConvertRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Converter_ServiceDesc is the grpc.ServiceDesc for Converter service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Converter_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "cnvrt.Converter",
|
|
HandlerType: (*ConverterServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Convert",
|
|
Handler: _Converter_Convert_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "changeAPI/changeAPI.proto",
|
|
}
|