Files
protobuf/gen/proto/go/printer/v1/pdf_invoice_grpc.pb.go
2022-05-31 09:30:19 +02:00

104 lines
3.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: printer/v1/pdf_invoice.proto
package v1
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
// PrinterServiceClient is the client API for PrinterService 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 PrinterServiceClient interface {
InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error)
}
type printerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPrinterServiceClient(cc grpc.ClientConnInterface) PrinterServiceClient {
return &printerServiceClient{cc}
}
func (c *printerServiceClient) InvoiceGen(ctx context.Context, in *Invoice, opts ...grpc.CallOption) (*DocumentResponse, error) {
out := new(DocumentResponse)
err := c.cc.Invoke(ctx, "/printer.v1.invoice.PrinterService/InvoiceGen", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PrinterServiceServer is the server API for PrinterService service.
// All implementations should embed UnimplementedPrinterServiceServer
// for forward compatibility
type PrinterServiceServer interface {
InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error)
}
// UnimplementedPrinterServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPrinterServiceServer struct {
}
func (UnimplementedPrinterServiceServer) InvoiceGen(context.Context, *Invoice) (*DocumentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InvoiceGen not implemented")
}
// UnsafePrinterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PrinterServiceServer will
// result in compilation errors.
type UnsafePrinterServiceServer interface {
mustEmbedUnimplementedPrinterServiceServer()
}
func RegisterPrinterServiceServer(s grpc.ServiceRegistrar, srv PrinterServiceServer) {
s.RegisterService(&PrinterService_ServiceDesc, srv)
}
func _PrinterService_InvoiceGen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Invoice)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PrinterServiceServer).InvoiceGen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/printer.v1.invoice.PrinterService/InvoiceGen",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrinterServiceServer).InvoiceGen(ctx, req.(*Invoice))
}
return interceptor(ctx, in, info, handler)
}
// PrinterService_ServiceDesc is the grpc.ServiceDesc for PrinterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrinterService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "printer.v1.invoice.PrinterService",
HandlerType: (*PrinterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "InvoiceGen",
Handler: _PrinterService_InvoiceGen_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "printer/v1/pdf_invoice.proto",
}