Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPdfProcessorServer(s grpc.ServiceRegistrar, srv PdfProcessorServer)
- type Document
- func (*Document) Descriptor() ([]byte, []int)deprecated
- func (x *Document) GetDocuments() []*Document
- func (x *Document) GetPages() []*Image
- func (x *Document) GetTitle() string
- func (*Document) ProtoMessage()
- func (x *Document) ProtoReflect() protoreflect.Message
- func (x *Document) Reset()
- func (x *Document) String() string
- type Image
- type Pdf
- func (*Pdf) Descriptor() ([]byte, []int)deprecated
- func (x *Pdf) GetContent() []byte
- func (x *Pdf) GetMethod() Pdf_Method
- func (x *Pdf) GetMethodName() string
- func (x *Pdf) GetPageNumbers() []uint32
- func (*Pdf) ProtoMessage()
- func (x *Pdf) ProtoReflect() protoreflect.Message
- func (x *Pdf) Reset()
- func (x *Pdf) String() string
- type PdfProcessorClient
- type PdfProcessorServer
- type PdfProcessor_ConvertPdfToImageClient
- type PdfProcessor_ConvertPdfToImageServer
- type Pdf_Method
- type Rotate
- type UnimplementedPdfProcessorServer
- type UnsafePdfProcessorServer
Constants ¶
const ( PdfProcessor_ConvertPdfToImage_FullMethodName = "/processor.PdfProcessor/ConvertPdfToImage" PdfProcessor_RotateImage_FullMethodName = "/processor.PdfProcessor/RotateImage" PdfProcessor_CreatePdf_FullMethodName = "/processor.PdfProcessor/CreatePdf" )
Variables ¶
var ( Pdf_Method_name = map[int32]string{ 0: "AUTO", 1: "EXTRACT", 2: "RASTERIZE", 4: "EXPLICIT", } Pdf_Method_value = map[string]int32{ "AUTO": 0, "EXTRACT": 1, "RASTERIZE": 2, "EXPLICIT": 4, } )
Enum value maps for Pdf_Method.
var File_processor_proto protoreflect.FileDescriptor
var PdfProcessor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "processor.PdfProcessor", HandlerType: (*PdfProcessorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RotateImage", Handler: _PdfProcessor_RotateImage_Handler, }, { MethodName: "CreatePdf", Handler: _PdfProcessor_CreatePdf_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ConvertPdfToImage", Handler: _PdfProcessor_ConvertPdfToImage_Handler, ServerStreams: true, }, }, Metadata: "processor.proto", }
PdfProcessor_ServiceDesc is the grpc.ServiceDesc for PdfProcessor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPdfProcessorServer ¶
func RegisterPdfProcessorServer(s grpc.ServiceRegistrar, srv PdfProcessorServer)
Types ¶
type Document ¶
type Document struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Documents []*Document `protobuf:"bytes,2,rep,name=documents,proto3" json:"documents,omitempty"` Pages []*Image `protobuf:"bytes,3,rep,name=pages,proto3" json:"pages,omitempty"` // contains filtered or unexported fields }
func (*Document) Descriptor
deprecated
func (*Document) GetDocuments ¶
func (*Document) ProtoMessage ¶
func (*Document) ProtoMessage()
func (*Document) ProtoReflect ¶
func (x *Document) ProtoReflect() protoreflect.Message
type Image ¶
type Image struct { Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"` Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Image) Descriptor
deprecated
func (*Image) GetContent ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) ProtoReflect ¶
func (x *Image) ProtoReflect() protoreflect.Message
type Pdf ¶
type Pdf struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Method Pdf_Method `protobuf:"varint,2,opt,name=method,proto3,enum=processor.Pdf_Method" json:"method,omitempty"` MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // Method name when EXPLICIT is selected. PageNumbers []uint32 `protobuf:"varint,4,rep,packed,name=page_numbers,json=pageNumbers,proto3" json:"page_numbers,omitempty"` // Page numbers which should be processed // contains filtered or unexported fields }
func (*Pdf) Descriptor
deprecated
func (*Pdf) GetContent ¶
func (*Pdf) GetMethod ¶
func (x *Pdf) GetMethod() Pdf_Method
func (*Pdf) GetMethodName ¶
func (*Pdf) GetPageNumbers ¶
func (*Pdf) ProtoMessage ¶
func (*Pdf) ProtoMessage()
func (*Pdf) ProtoReflect ¶
func (x *Pdf) ProtoReflect() protoreflect.Message
type PdfProcessorClient ¶
type PdfProcessorClient interface { // Convert the pages of a PDF file to images. // // Convert the pages of a PDF file to images. ConvertPdfToImage(ctx context.Context, in *Pdf, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Image], error) RotateImage(ctx context.Context, in *Rotate, opts ...grpc.CallOption) (*Image, error) CreatePdf(ctx context.Context, in *Document, opts ...grpc.CallOption) (*Pdf, error) }
PdfProcessorClient is the client API for PdfProcessor 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.
func NewPdfProcessorClient ¶
func NewPdfProcessorClient(cc grpc.ClientConnInterface) PdfProcessorClient
type PdfProcessorServer ¶
type PdfProcessorServer interface { // Convert the pages of a PDF file to images. // // Convert the pages of a PDF file to images. ConvertPdfToImage(*Pdf, grpc.ServerStreamingServer[Image]) error RotateImage(context.Context, *Rotate) (*Image, error) CreatePdf(context.Context, *Document) (*Pdf, error) // contains filtered or unexported methods }
PdfProcessorServer is the server API for PdfProcessor service. All implementations must embed UnimplementedPdfProcessorServer for forward compatibility.
type PdfProcessor_ConvertPdfToImageClient ¶
type PdfProcessor_ConvertPdfToImageClient = grpc.ServerStreamingClient[Image]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PdfProcessor_ConvertPdfToImageServer ¶
type PdfProcessor_ConvertPdfToImageServer = grpc.ServerStreamingServer[Image]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Pdf_Method ¶
type Pdf_Method int32
const ( Pdf_AUTO Pdf_Method = 0 Pdf_EXTRACT Pdf_Method = 1 Pdf_RASTERIZE Pdf_Method = 2 Pdf_EXPLICIT Pdf_Method = 4 )
func (Pdf_Method) Descriptor ¶
func (Pdf_Method) Descriptor() protoreflect.EnumDescriptor
func (Pdf_Method) Enum ¶
func (x Pdf_Method) Enum() *Pdf_Method
func (Pdf_Method) EnumDescriptor
deprecated
func (Pdf_Method) EnumDescriptor() ([]byte, []int)
Deprecated: Use Pdf_Method.Descriptor instead.
func (Pdf_Method) Number ¶
func (x Pdf_Method) Number() protoreflect.EnumNumber
func (Pdf_Method) String ¶
func (x Pdf_Method) String() string
func (Pdf_Method) Type ¶
func (Pdf_Method) Type() protoreflect.EnumType
type Rotate ¶
type Rotate struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Degree float64 `protobuf:"fixed64,2,opt,name=degree,proto3" json:"degree,omitempty"` // contains filtered or unexported fields }
func (*Rotate) Descriptor
deprecated
func (*Rotate) GetContent ¶
func (*Rotate) ProtoMessage ¶
func (*Rotate) ProtoMessage()
func (*Rotate) ProtoReflect ¶
func (x *Rotate) ProtoReflect() protoreflect.Message
type UnimplementedPdfProcessorServer ¶
type UnimplementedPdfProcessorServer struct{}
UnimplementedPdfProcessorServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPdfProcessorServer) ConvertPdfToImage ¶
func (UnimplementedPdfProcessorServer) ConvertPdfToImage(*Pdf, grpc.ServerStreamingServer[Image]) error
func (UnimplementedPdfProcessorServer) RotateImage ¶
type UnsafePdfProcessorServer ¶
type UnsafePdfProcessorServer interface {
// contains filtered or unexported methods
}
UnsafePdfProcessorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PdfProcessorServer will result in compilation errors.