services

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (s *ImageService) AddAllowedImage(ctx context.Context, image *types.ImageData) error

func (*ImageService) GetCurrentImage

func (s *ImageService) GetCurrentImage(ctx context.Context) (*types.ImageData, error)

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

Jump to

Keyboard shortcuts

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