Documentation ¶
Overview ¶
Package ocrv1 is a generated GoMock package.
Index ¶
- Constants
- Variables
- func RegisterOCRServiceServer(s grpc.ServiceRegistrar, srv OCRServiceServer)
- func ToContext(ctx context.Context, ocrClient *OCRClient) context.Context
- type MockOCRServiceClient
- func (m *MockOCRServiceClient) EXPECT() *MockOCRServiceClientMockRecorder
- func (m *MockOCRServiceClient) Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error)
- func (m *MockOCRServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
- type MockOCRServiceClientMockRecorder
- type MockOCRServiceServer
- type MockOCRServiceServerMockRecorder
- type MockUnsafeOCRServiceServer
- type MockUnsafeOCRServiceServerMockRecorder
- type OCRClient
- type OCRFile
- func (*OCRFile) Descriptor() ([]byte, []int)deprecated
- func (x *OCRFile) GetFileId() string
- func (x *OCRFile) GetLanguage() string
- func (x *OCRFile) GetProperties() map[string]string
- func (x *OCRFile) GetStatus() v1.STATUS
- func (x *OCRFile) GetText() string
- func (*OCRFile) ProtoMessage()
- func (x *OCRFile) ProtoReflect() protoreflect.Message
- func (x *OCRFile) Reset()
- func (x *OCRFile) String() string
- type OCRServiceClient
- type OCRServiceServer
- type RecognizeRequest
- func (*RecognizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RecognizeRequest) GetAsync() bool
- func (x *RecognizeRequest) GetFileId() []string
- func (x *RecognizeRequest) GetLanguageId() string
- func (x *RecognizeRequest) GetProperties() map[string]string
- func (x *RecognizeRequest) GetReferenceId() string
- func (*RecognizeRequest) ProtoMessage()
- func (x *RecognizeRequest) ProtoReflect() protoreflect.Message
- func (x *RecognizeRequest) Reset()
- func (x *RecognizeRequest) String() string
- type RecognizeResponse
- func (*RecognizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RecognizeResponse) GetReferenceId() string
- func (x *RecognizeResponse) GetResult() []*OCRFile
- func (*RecognizeResponse) ProtoMessage()
- func (x *RecognizeResponse) ProtoReflect() protoreflect.Message
- func (x *RecognizeResponse) Reset()
- func (x *RecognizeResponse) String() string
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatusRequest) GetExtras() map[string]string
- func (x *StatusRequest) GetId() string
- func (*StatusRequest) ProtoMessage()
- func (x *StatusRequest) ProtoReflect() protoreflect.Message
- func (x *StatusRequest) Reset()
- func (x *StatusRequest) String() string
- type StatusResponse
- type UnimplementedOCRServiceServer
- type UnsafeOCRServiceServer
Constants ¶
const ( OCRService_Recognize_FullMethodName = "/ocr.v1.OCRService/Recognize" OCRService_Status_FullMethodName = "/ocr.v1.OCRService/Status" )
Variables ¶
var File_ocr_v1_ocr_proto protoreflect.FileDescriptor
var OCRService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ocr.v1.OCRService", HandlerType: (*OCRServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Recognize", Handler: _OCRService_Recognize_Handler, }, { MethodName: "Status", Handler: _OCRService_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ocr/v1/ocr.proto", }
OCRService_ServiceDesc is the grpc.ServiceDesc for OCRService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOCRServiceServer ¶
func RegisterOCRServiceServer(s grpc.ServiceRegistrar, srv OCRServiceServer)
Types ¶
type MockOCRServiceClient ¶
type MockOCRServiceClient struct {
// contains filtered or unexported fields
}
MockOCRServiceClient is a mock of OCRServiceClient interface.
func NewMockOCRServiceClient ¶
func NewMockOCRServiceClient(ctrl *gomock.Controller) *MockOCRServiceClient
NewMockOCRServiceClient creates a new mock instance.
func (*MockOCRServiceClient) EXPECT ¶
func (m *MockOCRServiceClient) EXPECT() *MockOCRServiceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOCRServiceClient) Recognize ¶
func (m *MockOCRServiceClient) Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error)
Recognize mocks base method.
func (*MockOCRServiceClient) Status ¶
func (m *MockOCRServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
Status mocks base method.
type MockOCRServiceClientMockRecorder ¶
type MockOCRServiceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockOCRServiceClientMockRecorder is the mock recorder for MockOCRServiceClient.
type MockOCRServiceServer ¶
type MockOCRServiceServer struct {
// contains filtered or unexported fields
}
MockOCRServiceServer is a mock of OCRServiceServer interface.
func NewMockOCRServiceServer ¶
func NewMockOCRServiceServer(ctrl *gomock.Controller) *MockOCRServiceServer
NewMockOCRServiceServer creates a new mock instance.
func (*MockOCRServiceServer) EXPECT ¶
func (m *MockOCRServiceServer) EXPECT() *MockOCRServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOCRServiceServer) Recognize ¶
func (m *MockOCRServiceServer) Recognize(arg0 context.Context, arg1 *RecognizeRequest) (*RecognizeResponse, error)
Recognize mocks base method.
func (*MockOCRServiceServer) Status ¶
func (m *MockOCRServiceServer) Status(arg0 context.Context, arg1 *StatusRequest) (*StatusResponse, error)
Status mocks base method.
type MockOCRServiceServerMockRecorder ¶
type MockOCRServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockOCRServiceServerMockRecorder is the mock recorder for MockOCRServiceServer.
type MockUnsafeOCRServiceServer ¶
type MockUnsafeOCRServiceServer struct {
// contains filtered or unexported fields
}
MockUnsafeOCRServiceServer is a mock of UnsafeOCRServiceServer interface.
func NewMockUnsafeOCRServiceServer ¶
func NewMockUnsafeOCRServiceServer(ctrl *gomock.Controller) *MockUnsafeOCRServiceServer
NewMockUnsafeOCRServiceServer creates a new mock instance.
func (*MockUnsafeOCRServiceServer) EXPECT ¶
func (m *MockUnsafeOCRServiceServer) EXPECT() *MockUnsafeOCRServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUnsafeOCRServiceServerMockRecorder ¶
type MockUnsafeOCRServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnsafeOCRServiceServerMockRecorder is the mock recorder for MockUnsafeOCRServiceServer.
type OCRClient ¶
type OCRClient struct { *common.GrpcClientBase // The gRPC API Client. Client OCRServiceClient }
OCRClient is a Client for interacting with the profile service API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func FromContext ¶
func Init ¶ added in v1.9.1
func Init(cBase *common.GrpcClientBase, service OCRServiceClient) *OCRClient
func NewOCRClient ¶
NewOCRClient creates a new ocr Client. The service that an application uses to perform ocr requests
func (*OCRClient) StatusCheck ¶
type OCRFile ¶
type OCRFile struct { FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` Status v1.STATUS `protobuf:"varint,3,opt,name=status,proto3,enum=common.v1.STATUS" json:"status,omitempty"` Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` Properties map[string]string `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
func (*OCRFile) Descriptor
deprecated
func (*OCRFile) GetLanguage ¶
func (*OCRFile) GetProperties ¶
func (*OCRFile) ProtoMessage ¶
func (*OCRFile) ProtoMessage()
func (*OCRFile) ProtoReflect ¶
func (x *OCRFile) ProtoReflect() protoreflect.Message
type OCRServiceClient ¶
type OCRServiceClient interface { // Perform a new ocr process request Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) // Check the status of request if queued Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) }
OCRServiceClient is the client API for OCRService 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 NewOCRServiceClient ¶
func NewOCRServiceClient(cc grpc.ClientConnInterface) OCRServiceClient
type OCRServiceServer ¶
type OCRServiceServer interface { // Perform a new ocr process request Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) // Check the status of request if queued Status(context.Context, *StatusRequest) (*StatusResponse, error) // contains filtered or unexported methods }
OCRServiceServer is the server API for OCRService service. All implementations must embed UnimplementedOCRServiceServer for forward compatibility
type RecognizeRequest ¶
type RecognizeRequest struct { ReferenceId string `protobuf:"bytes,1,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` LanguageId string `protobuf:"bytes,2,opt,name=language_id,json=languageId,proto3" json:"language_id,omitempty"` Properties map[string]string `` /* 161-byte string literal not displayed */ Async bool `protobuf:"varint,4,opt,name=async,proto3" json:"async,omitempty"` FileId []string `protobuf:"bytes,5,rep,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` // contains filtered or unexported fields }
Request to determine text found in a file
func (*RecognizeRequest) Descriptor
deprecated
func (*RecognizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecognizeRequest.ProtoReflect.Descriptor instead.
func (*RecognizeRequest) GetAsync ¶
func (x *RecognizeRequest) GetAsync() bool
func (*RecognizeRequest) GetFileId ¶
func (x *RecognizeRequest) GetFileId() []string
func (*RecognizeRequest) GetLanguageId ¶
func (x *RecognizeRequest) GetLanguageId() string
func (*RecognizeRequest) GetProperties ¶
func (x *RecognizeRequest) GetProperties() map[string]string
func (*RecognizeRequest) GetReferenceId ¶
func (x *RecognizeRequest) GetReferenceId() string
func (*RecognizeRequest) ProtoMessage ¶
func (*RecognizeRequest) ProtoMessage()
func (*RecognizeRequest) ProtoReflect ¶
func (x *RecognizeRequest) ProtoReflect() protoreflect.Message
func (*RecognizeRequest) Reset ¶
func (x *RecognizeRequest) Reset()
func (*RecognizeRequest) String ¶
func (x *RecognizeRequest) String() string
type RecognizeResponse ¶
type RecognizeResponse struct { ReferenceId string `protobuf:"bytes,1,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` Result []*OCRFile `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*RecognizeResponse) Descriptor
deprecated
func (*RecognizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use RecognizeResponse.ProtoReflect.Descriptor instead.
func (*RecognizeResponse) GetReferenceId ¶
func (x *RecognizeResponse) GetReferenceId() string
func (*RecognizeResponse) GetResult ¶
func (x *RecognizeResponse) GetResult() []*OCRFile
func (*RecognizeResponse) ProtoMessage ¶
func (*RecognizeResponse) ProtoMessage()
func (*RecognizeResponse) ProtoReflect ¶
func (x *RecognizeResponse) ProtoReflect() protoreflect.Message
func (*RecognizeResponse) Reset ¶
func (x *RecognizeResponse) Reset()
func (*RecognizeResponse) String ¶
func (x *RecognizeResponse) String() string
type StatusRequest ¶
type StatusRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Extras map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetExtras ¶
func (x *StatusRequest) GetExtras() map[string]string
func (*StatusRequest) GetId ¶
func (x *StatusRequest) GetId() string
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type StatusResponse ¶
type StatusResponse struct { Data *RecognizeResponse `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetData ¶
func (x *StatusResponse) GetData() *RecognizeResponse
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedOCRServiceServer ¶
type UnimplementedOCRServiceServer struct { }
UnimplementedOCRServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOCRServiceServer) Recognize ¶
func (UnimplementedOCRServiceServer) Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error)
func (UnimplementedOCRServiceServer) Status ¶
func (UnimplementedOCRServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
type UnsafeOCRServiceServer ¶
type UnsafeOCRServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOCRServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OCRServiceServer will result in compilation errors.