proto

package
v0.0.0-...-316f095 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ocr_srv_ocr_proto protoreflect.FileDescriptor
View Source
var OCR_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ocr.OCR",
	HandlerType: (*OCRServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExtractText",
			Handler:    _OCR_ExtractText_Handler,
		},
		{
			MethodName: "ExtractValidatorText",
			Handler:    _OCR_ExtractValidatorText_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ocr-srv/ocr.proto",
}

OCR_ServiceDesc is the grpc.ServiceDesc for OCR services. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOCRServer

func RegisterOCRServer(s grpc.ServiceRegistrar, srv OCRServer)

Types

type ExtractTextRequest

type ExtractTextRequest struct {
	Image   []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	IsPaper bool   `protobuf:"varint,2,opt,name=isPaper,proto3" json:"isPaper,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtractTextRequest) Descriptor deprecated

func (*ExtractTextRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExtractTextRequest.ProtoReflect.Descriptor instead.

func (*ExtractTextRequest) GetImage

func (x *ExtractTextRequest) GetImage() []byte

func (*ExtractTextRequest) GetIsPaper

func (x *ExtractTextRequest) GetIsPaper() bool

func (*ExtractTextRequest) ProtoMessage

func (*ExtractTextRequest) ProtoMessage()

func (*ExtractTextRequest) ProtoReflect

func (x *ExtractTextRequest) ProtoReflect() protoreflect.Message

func (*ExtractTextRequest) Reset

func (x *ExtractTextRequest) Reset()

func (*ExtractTextRequest) String

func (x *ExtractTextRequest) String() string

type ExtractTextResponse

type ExtractTextResponse struct {
	Title    string            `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Authors  []string          `protobuf:"bytes,2,rep,name=authors,proto3" json:"authors,omitempty"`
	Abstract string            `protobuf:"bytes,3,opt,name=abstract,proto3" json:"abstract,omitempty"`
	Keywords []string          `protobuf:"bytes,4,rep,name=keywords,proto3" json:"keywords,omitempty"`
	Main     map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ExtractTextResponse) Descriptor deprecated

func (*ExtractTextResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExtractTextResponse.ProtoReflect.Descriptor instead.

func (*ExtractTextResponse) GetAbstract

func (x *ExtractTextResponse) GetAbstract() string

func (*ExtractTextResponse) GetAuthors

func (x *ExtractTextResponse) GetAuthors() []string

func (*ExtractTextResponse) GetKeywords

func (x *ExtractTextResponse) GetKeywords() []string

func (*ExtractTextResponse) GetMain

func (x *ExtractTextResponse) GetMain() map[string]string

func (*ExtractTextResponse) GetTitle

func (x *ExtractTextResponse) GetTitle() string

func (*ExtractTextResponse) ProtoMessage

func (*ExtractTextResponse) ProtoMessage()

func (*ExtractTextResponse) ProtoReflect

func (x *ExtractTextResponse) ProtoReflect() protoreflect.Message

func (*ExtractTextResponse) Reset

func (x *ExtractTextResponse) Reset()

func (*ExtractTextResponse) String

func (x *ExtractTextResponse) String() string

type ExtractValidatorRequest

type ExtractValidatorRequest struct {
	BackSideImage []byte `protobuf:"bytes,1,opt,name=back_side_image,json=backSideImage,proto3" json:"back_side_image,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtractValidatorRequest) Descriptor deprecated

func (*ExtractValidatorRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExtractValidatorRequest.ProtoReflect.Descriptor instead.

func (*ExtractValidatorRequest) GetBackSideImage

func (x *ExtractValidatorRequest) GetBackSideImage() []byte

func (*ExtractValidatorRequest) ProtoMessage

func (*ExtractValidatorRequest) ProtoMessage()

func (*ExtractValidatorRequest) ProtoReflect

func (x *ExtractValidatorRequest) ProtoReflect() protoreflect.Message

func (*ExtractValidatorRequest) Reset

func (x *ExtractValidatorRequest) Reset()

func (*ExtractValidatorRequest) String

func (x *ExtractValidatorRequest) String() string

type ExtractValidatorResponse

type ExtractValidatorResponse struct {
	BackSideInfo *ValidatorBackSideInfo `protobuf:"bytes,1,opt,name=back_side_info,json=backSideInfo,proto3" json:"back_side_info,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtractValidatorResponse) Descriptor deprecated

func (*ExtractValidatorResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExtractValidatorResponse.ProtoReflect.Descriptor instead.

func (*ExtractValidatorResponse) GetBackSideInfo

func (x *ExtractValidatorResponse) GetBackSideInfo() *ValidatorBackSideInfo

func (*ExtractValidatorResponse) ProtoMessage

func (*ExtractValidatorResponse) ProtoMessage()

func (*ExtractValidatorResponse) ProtoReflect

func (x *ExtractValidatorResponse) ProtoReflect() protoreflect.Message

func (*ExtractValidatorResponse) Reset

func (x *ExtractValidatorResponse) Reset()

func (*ExtractValidatorResponse) String

func (x *ExtractValidatorResponse) String() string

type OCRClient

type OCRClient interface {
	ExtractText(ctx context.Context, in *ExtractTextRequest, opts ...grpc.CallOption) (*ExtractTextResponse, error)
	ExtractValidatorText(ctx context.Context, in *ExtractValidatorRequest, opts ...grpc.CallOption) (*ExtractValidatorResponse, error)
}

OCRClient is the client API for OCR services.

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 NewOCRClient

func NewOCRClient(cc grpc.ClientConnInterface) OCRClient

type OCRServer

type OCRServer interface {
	ExtractText(context.Context, *ExtractTextRequest) (*ExtractTextResponse, error)
	ExtractValidatorText(context.Context, *ExtractValidatorRequest) (*ExtractValidatorResponse, error)
	// contains filtered or unexported methods
}

OCRServer is the server API for OCR services. All implementations must embed UnimplementedOCRServer for forward compatibility

type UnimplementedOCRServer

type UnimplementedOCRServer struct {
}

UnimplementedOCRServer must be embedded to have forward compatible implementations.

func (UnimplementedOCRServer) ExtractText

func (UnimplementedOCRServer) ExtractValidatorText

type UnsafeOCRServer

type UnsafeOCRServer interface {
	// contains filtered or unexported methods
}

UnsafeOCRServer may be embedded to opt out of forward compatibility for this services. Use of this interface is not recommended, as added methods to OCRServer will result in compilation errors.

type ValidatorBackSideInfo

type ValidatorBackSideInfo struct {
	Series string                 `protobuf:"bytes,1,opt,name=series,proto3" json:"series,omitempty"`
	Number string                 `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"`
	Date   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidatorBackSideInfo) Descriptor deprecated

func (*ValidatorBackSideInfo) Descriptor() ([]byte, []int)

Deprecated: Use ValidatorBackSideInfo.ProtoReflect.Descriptor instead.

func (*ValidatorBackSideInfo) GetDate

func (*ValidatorBackSideInfo) GetNumber

func (x *ValidatorBackSideInfo) GetNumber() string

func (*ValidatorBackSideInfo) GetSeries

func (x *ValidatorBackSideInfo) GetSeries() string

func (*ValidatorBackSideInfo) ProtoMessage

func (*ValidatorBackSideInfo) ProtoMessage()

func (*ValidatorBackSideInfo) ProtoReflect

func (x *ValidatorBackSideInfo) ProtoReflect() protoreflect.Message

func (*ValidatorBackSideInfo) Reset

func (x *ValidatorBackSideInfo) Reset()

func (*ValidatorBackSideInfo) String

func (x *ValidatorBackSideInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL