Documentation ¶
Index ¶
- type ImageService
- func (s *ImageService) AddAllowedImage(ctx context.Context, image *types.ImageData) error
- func (s *ImageService) GetCurrentImage(ctx context.Context) (*types.ImageData, error)
- func (s *ImageService) ImageIsAllowed(ctx context.Context, imageName string) bool
- func (s *ImageService) SetCurrentImage(ctx context.Context, image *types.ImageData)
- type OCRService
- func (s *OCRService) GetLanguages(sessionId string) []string
- func (s *OCRService) GetPSM(sessionId string) gosseract.PageSegMode
- func (s *OCRService) OcrFromBytes(sessionId string, imageByte []byte) (string, error)
- func (s *OCRService) SetLanguages(sessionId string, languages []string) error
- func (s *OCRService) SetPSM(sessionId string, psm gosseract.PageSegMode) error
- type SessionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶
func NewImageService(sm scs.SessionManager) *ImageService
func (*ImageService) AddAllowedImage ¶
func (*ImageService) GetCurrentImage ¶
func (*ImageService) ImageIsAllowed ¶
func (s *ImageService) ImageIsAllowed(ctx context.Context, imageName string) bool
func (*ImageService) SetCurrentImage ¶
func (s *ImageService) SetCurrentImage(ctx context.Context, image *types.ImageData)
type OCRService ¶
type OCRService struct {
// contains filtered or unexported fields
}
func NewOCRService ¶
func NewOCRService(clientStore *stores.OCRClientStore) *OCRService
func (*OCRService) GetLanguages ¶
func (s *OCRService) GetLanguages(sessionId string) []string
func (*OCRService) GetPSM ¶
func (s *OCRService) GetPSM(sessionId string) gosseract.PageSegMode
func (*OCRService) OcrFromBytes ¶
func (s *OCRService) OcrFromBytes(sessionId string, imageByte []byte) (string, error)
func (*OCRService) SetLanguages ¶
func (s *OCRService) SetLanguages(sessionId string, languages []string) error
func (*OCRService) SetPSM ¶
func (s *OCRService) SetPSM(sessionId string, psm gosseract.PageSegMode) error
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
func NewSessionService ¶
func NewSessionService(sm scs.SessionManager) *SessionService
func (*SessionService) GetOrGenerateId ¶
func (s *SessionService) GetOrGenerateId(ctx context.Context) string
Click to show internal directories.
Click to hide internal directories.