Documentation ¶
Overview ¶
Package ocrv1 is a generated GoMock package.
Index ¶
- 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 *OcrRequest, opts ...grpc.CallOption) (*OcrResponse, error)
- func (m *MockOCRServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*OcrResponse, 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() common.STATUS
- func (x *OCRFile) GetText() string
- func (*OCRFile) ProtoMessage()
- func (x *OCRFile) ProtoReflect() protoreflect.Message
- func (x *OCRFile) Reset()
- func (x *OCRFile) String() string
- func (m *OCRFile) Validate() error
- type OCRFileValidationError
- type OCRServiceClient
- type OCRServiceServer
- type OcrRequest
- func (*OcrRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OcrRequest) GetAsync() bool
- func (x *OcrRequest) GetFileId() []string
- func (x *OcrRequest) GetLanguageId() string
- func (x *OcrRequest) GetProperties() map[string]string
- func (x *OcrRequest) GetReferenceId() string
- func (*OcrRequest) ProtoMessage()
- func (x *OcrRequest) ProtoReflect() protoreflect.Message
- func (x *OcrRequest) Reset()
- func (x *OcrRequest) String() string
- func (m *OcrRequest) Validate() error
- type OcrRequestValidationError
- type OcrResponse
- func (*OcrResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OcrResponse) GetReferenceId() string
- func (x *OcrResponse) GetResult() []*OCRFile
- func (*OcrResponse) ProtoMessage()
- func (x *OcrResponse) ProtoReflect() protoreflect.Message
- func (x *OcrResponse) Reset()
- func (x *OcrResponse) String() string
- func (m *OcrResponse) Validate() error
- type OcrResponseValidationError
- func (e OcrResponseValidationError) Cause() error
- func (e OcrResponseValidationError) Error() string
- func (e OcrResponseValidationError) ErrorName() string
- func (e OcrResponseValidationError) Field() string
- func (e OcrResponseValidationError) Key() bool
- func (e OcrResponseValidationError) Reason() string
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatusRequest) GetReferenceId() string
- func (*StatusRequest) ProtoMessage()
- func (x *StatusRequest) ProtoReflect() protoreflect.Message
- func (x *StatusRequest) Reset()
- func (x *StatusRequest) String() string
- func (m *StatusRequest) Validate() error
- type StatusRequestValidationError
- func (e StatusRequestValidationError) Cause() error
- func (e StatusRequestValidationError) Error() string
- func (e StatusRequestValidationError) ErrorName() string
- func (e StatusRequestValidationError) Field() string
- func (e StatusRequestValidationError) Key() bool
- func (e StatusRequestValidationError) Reason() string
- type UnimplementedOCRServiceServer
- type UnsafeOCRServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_ocr_proto protoreflect.FileDescriptor
var OCRService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "apis.OCRService", HandlerType: (*OCRServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Recognize", Handler: _OCRService_Recognize_Handler, }, { MethodName: "Status", Handler: _OCRService_Status_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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 ¶ added in v1.2.1
type MockOCRServiceClient struct {
// contains filtered or unexported fields
}
MockOCRServiceClient is a mock of OCRServiceClient interface.
func NewMockOCRServiceClient ¶ added in v1.2.1
func NewMockOCRServiceClient(ctrl *gomock.Controller) *MockOCRServiceClient
NewMockOCRServiceClient creates a new mock instance.
func (*MockOCRServiceClient) EXPECT ¶ added in v1.2.1
func (m *MockOCRServiceClient) EXPECT() *MockOCRServiceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOCRServiceClient) Recognize ¶ added in v1.2.1
func (m *MockOCRServiceClient) Recognize(ctx context.Context, in *OcrRequest, opts ...grpc.CallOption) (*OcrResponse, error)
Recognize mocks base method.
func (*MockOCRServiceClient) Status ¶ added in v1.2.1
func (m *MockOCRServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*OcrResponse, error)
Status mocks base method.
type MockOCRServiceClientMockRecorder ¶ added in v1.2.1
type MockOCRServiceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockOCRServiceClientMockRecorder is the mock recorder for MockOCRServiceClient.
func (*MockOCRServiceClientMockRecorder) Recognize ¶ added in v1.2.1
func (mr *MockOCRServiceClientMockRecorder) Recognize(ctx, in interface{}, opts ...interface{}) *gomock.Call
Recognize indicates an expected call of Recognize.
func (*MockOCRServiceClientMockRecorder) Status ¶ added in v1.2.1
func (mr *MockOCRServiceClientMockRecorder) Status(ctx, in interface{}, opts ...interface{}) *gomock.Call
Status indicates an expected call of Status.
type MockOCRServiceServer ¶ added in v1.2.1
type MockOCRServiceServer struct {
// contains filtered or unexported fields
}
MockOCRServiceServer is a mock of OCRServiceServer interface.
func NewMockOCRServiceServer ¶ added in v1.2.1
func NewMockOCRServiceServer(ctrl *gomock.Controller) *MockOCRServiceServer
NewMockOCRServiceServer creates a new mock instance.
func (*MockOCRServiceServer) EXPECT ¶ added in v1.2.1
func (m *MockOCRServiceServer) EXPECT() *MockOCRServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOCRServiceServer) Recognize ¶ added in v1.2.1
func (m *MockOCRServiceServer) Recognize(arg0 context.Context, arg1 *OcrRequest) (*OcrResponse, error)
Recognize mocks base method.
func (*MockOCRServiceServer) Status ¶ added in v1.2.1
func (m *MockOCRServiceServer) Status(arg0 context.Context, arg1 *StatusRequest) (*OcrResponse, error)
Status mocks base method.
type MockOCRServiceServerMockRecorder ¶ added in v1.2.1
type MockOCRServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockOCRServiceServerMockRecorder is the mock recorder for MockOCRServiceServer.
func (*MockOCRServiceServerMockRecorder) Recognize ¶ added in v1.2.1
func (mr *MockOCRServiceServerMockRecorder) Recognize(arg0, arg1 interface{}) *gomock.Call
Recognize indicates an expected call of Recognize.
func (*MockOCRServiceServerMockRecorder) Status ¶ added in v1.2.1
func (mr *MockOCRServiceServerMockRecorder) Status(arg0, arg1 interface{}) *gomock.Call
Status indicates an expected call of Status.
type MockUnsafeOCRServiceServer ¶ added in v1.2.1
type MockUnsafeOCRServiceServer struct {
// contains filtered or unexported fields
}
MockUnsafeOCRServiceServer is a mock of UnsafeOCRServiceServer interface.
func NewMockUnsafeOCRServiceServer ¶ added in v1.2.1
func NewMockUnsafeOCRServiceServer(ctrl *gomock.Controller) *MockUnsafeOCRServiceServer
NewMockUnsafeOCRServiceServer creates a new mock instance.
func (*MockUnsafeOCRServiceServer) EXPECT ¶ added in v1.2.1
func (m *MockUnsafeOCRServiceServer) EXPECT() *MockUnsafeOCRServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUnsafeOCRServiceServerMockRecorder ¶ added in v1.2.1
type MockUnsafeOCRServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnsafeOCRServiceServerMockRecorder is the mock recorder for MockUnsafeOCRServiceServer.
type OCRClient ¶
type OCRClient struct {
// contains filtered or unexported fields
}
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 NewOCRClient ¶
NewOCRClient creates a new ocr client. The service that an application uses to perform ocr requests
func (*OCRClient) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
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 common.STATUS `protobuf:"varint,3,opt,name=status,proto3,enum=apis.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 OCRFileValidationError ¶
type OCRFileValidationError struct {
// contains filtered or unexported fields
}
OCRFileValidationError is the validation error returned by OCRFile.Validate if the designated constraints aren't met.
func (OCRFileValidationError) Cause ¶
func (e OCRFileValidationError) Cause() error
Cause function returns cause value.
func (OCRFileValidationError) Error ¶
func (e OCRFileValidationError) Error() string
Error satisfies the builtin error interface
func (OCRFileValidationError) ErrorName ¶
func (e OCRFileValidationError) ErrorName() string
ErrorName returns error name.
func (OCRFileValidationError) Field ¶
func (e OCRFileValidationError) Field() string
Field function returns field value.
func (OCRFileValidationError) Key ¶
func (e OCRFileValidationError) Key() bool
Key function returns key value.
func (OCRFileValidationError) Reason ¶
func (e OCRFileValidationError) Reason() string
Reason function returns reason value.
type OCRServiceClient ¶
type OCRServiceClient interface { // Perform a new ocr process request Recognize(ctx context.Context, in *OcrRequest, opts ...grpc.CallOption) (*OcrResponse, error) // Check the status of request if queued Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*OcrResponse, 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, *OcrRequest) (*OcrResponse, error) // Check the status of request if queued Status(context.Context, *StatusRequest) (*OcrResponse, error) // contains filtered or unexported methods }
OCRServiceServer is the server API for OCRService service. All implementations must embed UnimplementedOCRServiceServer for forward compatibility
type OcrRequest ¶
type OcrRequest 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 (*OcrRequest) Descriptor
deprecated
func (*OcrRequest) Descriptor() ([]byte, []int)
Deprecated: Use OcrRequest.ProtoReflect.Descriptor instead.
func (*OcrRequest) GetAsync ¶
func (x *OcrRequest) GetAsync() bool
func (*OcrRequest) GetFileId ¶
func (x *OcrRequest) GetFileId() []string
func (*OcrRequest) GetLanguageId ¶
func (x *OcrRequest) GetLanguageId() string
func (*OcrRequest) GetProperties ¶
func (x *OcrRequest) GetProperties() map[string]string
func (*OcrRequest) GetReferenceId ¶
func (x *OcrRequest) GetReferenceId() string
func (*OcrRequest) ProtoMessage ¶
func (*OcrRequest) ProtoMessage()
func (*OcrRequest) ProtoReflect ¶
func (x *OcrRequest) ProtoReflect() protoreflect.Message
func (*OcrRequest) Reset ¶
func (x *OcrRequest) Reset()
func (*OcrRequest) String ¶
func (x *OcrRequest) String() string
func (*OcrRequest) Validate ¶
func (m *OcrRequest) Validate() error
Validate checks the field values on OcrRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type OcrRequestValidationError ¶
type OcrRequestValidationError struct {
// contains filtered or unexported fields
}
OcrRequestValidationError is the validation error returned by OcrRequest.Validate if the designated constraints aren't met.
func (OcrRequestValidationError) Cause ¶
func (e OcrRequestValidationError) Cause() error
Cause function returns cause value.
func (OcrRequestValidationError) Error ¶
func (e OcrRequestValidationError) Error() string
Error satisfies the builtin error interface
func (OcrRequestValidationError) ErrorName ¶
func (e OcrRequestValidationError) ErrorName() string
ErrorName returns error name.
func (OcrRequestValidationError) Field ¶
func (e OcrRequestValidationError) Field() string
Field function returns field value.
func (OcrRequestValidationError) Key ¶
func (e OcrRequestValidationError) Key() bool
Key function returns key value.
func (OcrRequestValidationError) Reason ¶
func (e OcrRequestValidationError) Reason() string
Reason function returns reason value.
type OcrResponse ¶
type OcrResponse 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 (*OcrResponse) Descriptor
deprecated
func (*OcrResponse) Descriptor() ([]byte, []int)
Deprecated: Use OcrResponse.ProtoReflect.Descriptor instead.
func (*OcrResponse) GetReferenceId ¶
func (x *OcrResponse) GetReferenceId() string
func (*OcrResponse) GetResult ¶
func (x *OcrResponse) GetResult() []*OCRFile
func (*OcrResponse) ProtoMessage ¶
func (*OcrResponse) ProtoMessage()
func (*OcrResponse) ProtoReflect ¶
func (x *OcrResponse) ProtoReflect() protoreflect.Message
func (*OcrResponse) Reset ¶
func (x *OcrResponse) Reset()
func (*OcrResponse) String ¶
func (x *OcrResponse) String() string
func (*OcrResponse) Validate ¶
func (m *OcrResponse) Validate() error
Validate checks the field values on OcrResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type OcrResponseValidationError ¶
type OcrResponseValidationError struct {
// contains filtered or unexported fields
}
OcrResponseValidationError is the validation error returned by OcrResponse.Validate if the designated constraints aren't met.
func (OcrResponseValidationError) Cause ¶
func (e OcrResponseValidationError) Cause() error
Cause function returns cause value.
func (OcrResponseValidationError) Error ¶
func (e OcrResponseValidationError) Error() string
Error satisfies the builtin error interface
func (OcrResponseValidationError) ErrorName ¶
func (e OcrResponseValidationError) ErrorName() string
ErrorName returns error name.
func (OcrResponseValidationError) Field ¶
func (e OcrResponseValidationError) Field() string
Field function returns field value.
func (OcrResponseValidationError) Key ¶
func (e OcrResponseValidationError) Key() bool
Key function returns key value.
func (OcrResponseValidationError) Reason ¶
func (e OcrResponseValidationError) Reason() string
Reason function returns reason value.
type StatusRequest ¶
type StatusRequest struct { ReferenceId string `protobuf:"bytes,1,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` // contains filtered or unexported fields }
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetReferenceId ¶
func (x *StatusRequest) GetReferenceId() 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
func (*StatusRequest) Validate ¶
func (m *StatusRequest) Validate() error
Validate checks the field values on StatusRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type StatusRequestValidationError ¶
type StatusRequestValidationError struct {
// contains filtered or unexported fields
}
StatusRequestValidationError is the validation error returned by StatusRequest.Validate if the designated constraints aren't met.
func (StatusRequestValidationError) Cause ¶
func (e StatusRequestValidationError) Cause() error
Cause function returns cause value.
func (StatusRequestValidationError) Error ¶
func (e StatusRequestValidationError) Error() string
Error satisfies the builtin error interface
func (StatusRequestValidationError) ErrorName ¶
func (e StatusRequestValidationError) ErrorName() string
ErrorName returns error name.
func (StatusRequestValidationError) Field ¶
func (e StatusRequestValidationError) Field() string
Field function returns field value.
func (StatusRequestValidationError) Key ¶
func (e StatusRequestValidationError) Key() bool
Key function returns key value.
func (StatusRequestValidationError) Reason ¶
func (e StatusRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedOCRServiceServer ¶
type UnimplementedOCRServiceServer struct { }
UnimplementedOCRServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOCRServiceServer) Recognize ¶
func (UnimplementedOCRServiceServer) Recognize(context.Context, *OcrRequest) (*OcrResponse, error)
func (UnimplementedOCRServiceServer) Status ¶
func (UnimplementedOCRServiceServer) Status(context.Context, *StatusRequest) (*OcrResponse, 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.