Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GosseractClient ¶
type GosseractClient interface { SetImageFromBytes(content []byte) error Text() (string, error) Close() error }
GosseractClient is an interface matching the methods used by gosseract.Client
type OCRProcessor ¶
type OCRProcessor struct {
// contains filtered or unexported fields
}
OCRProcessor holds the OCR client and other related functionality
func NewOCRProcessor ¶
func NewOCRProcessor(logger *log.Logger) *OCRProcessor
NewOCRProcessor initializes a new OCRProcessor
func (*OCRProcessor) Close ¶
func (ocr *OCRProcessor) Close() error
Close closes any resources held by the OCRProcessor
func (*OCRProcessor) UploadHandler ¶
func (ocr *OCRProcessor) UploadHandler(w http.ResponseWriter, r *http.Request, cfg conf.Config)
UploadHandler handles the file upload and text extraction
Click to show internal directories.
Click to hide internal directories.