Documentation
¶
Index ¶
- Constants
- Variables
- type BMPParser
- type BMPParserResult
- type BMPParserStreamResult
- func (r *BMPParserStreamResult) Error() error
- func (r *BMPParserStreamResult) Path() string
- func (r *BMPParserStreamResult) Progress() uint8
- func (r *BMPParserStreamResult) Stage() ParseProgressStage
- func (r *BMPParserStreamResult) String() string
- func (r *BMPParserStreamResult) SubResult() StreamResult
- type CompositeParser
- func (p *CompositeParser) AddParsers(parsers ...Parser)
- func (p *CompositeParser) Parse(ctx context.Context, file io.Reader, path string) Result
- func (p *CompositeParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
- func (p *CompositeParser) SupportedMimeTypes() []string
- type CompositeParserResult
- type CompositeParserStreamResult
- func (r *CompositeParserStreamResult) Error() error
- func (r *CompositeParserStreamResult) Path() string
- func (r *CompositeParserStreamResult) Progress() uint8
- func (r *CompositeParserStreamResult) Stage() ParseProgressStage
- func (r *CompositeParserStreamResult) String() string
- func (r *CompositeParserStreamResult) SubResult() StreamResult
- type EMLParser
- type EMLParserResult
- type EMLParserStreamResult
- func (r *EMLParserStreamResult) Error() error
- func (r *EMLParserStreamResult) Path() string
- func (r *EMLParserStreamResult) Progress() uint8
- func (r *EMLParserStreamResult) Stage() ParseProgressStage
- func (r *EMLParserStreamResult) String() string
- func (r *EMLParserStreamResult) SubResult() StreamResult
- type ErrMimeTypeNotSupported
- type GIFParser
- type GIFParserResult
- type GIFParserStreamResult
- func (r *GIFParserStreamResult) Error() error
- func (r *GIFParserStreamResult) Path() string
- func (r *GIFParserStreamResult) Progress() uint8
- func (r *GIFParserStreamResult) Stage() ParseProgressStage
- func (r *GIFParserStreamResult) String() string
- func (r *GIFParserStreamResult) SubResult() StreamResult
- type JPEGParser
- type JPEGParserResult
- type JPEGParserStreamResult
- func (r *JPEGParserStreamResult) Error() error
- func (r *JPEGParserStreamResult) Path() string
- func (r *JPEGParserStreamResult) Progress() uint8
- func (r *JPEGParserStreamResult) Stage() ParseProgressStage
- func (r *JPEGParserStreamResult) String() string
- func (r *JPEGParserStreamResult) SubResult() StreamResult
- type PDFParser
- type PDFParserResult
- type PDFParserResultPage
- type PDFParserStreamResult
- func (r *PDFParserStreamResult) Error() error
- func (r *PDFParserStreamResult) Path() string
- func (r *PDFParserStreamResult) Progress() uint8
- func (r *PDFParserStreamResult) Stage() ParseProgressStage
- func (r *PDFParserStreamResult) String() string
- func (r *PDFParserStreamResult) SubResult() StreamResult
- type PDFParserStreamResultPage
- type PNGParser
- type PNGParserResult
- type PNGParserStreamResult
- func (r *PNGParserStreamResult) Error() error
- func (r *PNGParserStreamResult) Path() string
- func (r *PNGParserStreamResult) Progress() uint8
- func (r *PNGParserStreamResult) Stage() ParseProgressStage
- func (r *PNGParserStreamResult) String() string
- func (r *PNGParserStreamResult) SubResult() StreamResult
- type ParseProgressStage
- type Parser
- type RAWBGRAParser
- type RAWBGRAParserResult
- type RAWBGRAParserStreamResult
- func (r *RAWBGRAParserStreamResult) Error() error
- func (r *RAWBGRAParserStreamResult) Path() string
- func (r *RAWBGRAParserStreamResult) Progress() uint8
- func (r *RAWBGRAParserStreamResult) Stage() ParseProgressStage
- func (r *RAWBGRAParserStreamResult) String() string
- func (r *RAWBGRAParserStreamResult) SubResult() StreamResult
- type Result
- type StreamResult
- type TARParser
- type TARParserResult
- type TARParserStreamResult
- func (r *TARParserStreamResult) Error() error
- func (r *TARParserStreamResult) Path() string
- func (r *TARParserStreamResult) Progress() uint8
- func (r *TARParserStreamResult) Stage() ParseProgressStage
- func (r *TARParserStreamResult) String() string
- func (r *TARParserStreamResult) SubResult() StreamResult
- type TIFFParserStreamResult
- func (r *TIFFParserStreamResult) Error() error
- func (r *TIFFParserStreamResult) Path() string
- func (r *TIFFParserStreamResult) Progress() uint8
- func (r *TIFFParserStreamResult) Stage() ParseProgressStage
- func (r *TIFFParserStreamResult) String() string
- func (r *TIFFParserStreamResult) SubResult() StreamResult
- type TiffParser
- type TiffParserResult
- type WEBPParserStreamResult
- func (r *WEBPParserStreamResult) Error() error
- func (r *WEBPParserStreamResult) Path() string
- func (r *WEBPParserStreamResult) Progress() uint8
- func (r *WEBPParserStreamResult) Stage() ParseProgressStage
- func (r *WEBPParserStreamResult) String() string
- func (r *WEBPParserStreamResult) SubResult() StreamResult
- type WebPParser
- type WebPParserResult
Constants ¶
View Source
const FeaturePDFEnabled = false
Variables ¶
View Source
var ErrBadFile = errors.New("bad file or corrupted")
View Source
var ErrParserDisabled = errors.New("parser disabled")
Functions ¶
This section is empty.
Types ¶
type BMPParser ¶
type BMPParser struct {
// contains filtered or unexported fields
}
Parses `image/bmp` files
func NewBMPParser ¶
func (*BMPParser) ParseStream ¶ added in v0.0.10
func (*BMPParser) SupportedMimeTypes ¶
type BMPParserResult ¶
type BMPParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*BMPParserResult) Error ¶
func (r *BMPParserResult) Error() error
func (*BMPParserResult) Path ¶ added in v0.0.10
func (r *BMPParserResult) Path() string
func (*BMPParserResult) String ¶
func (r *BMPParserResult) String() string
func (*BMPParserResult) Subfiles ¶ added in v0.0.10
func (r *BMPParserResult) Subfiles() []Result
type BMPParserStreamResult ¶ added in v0.0.10
type BMPParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*BMPParserStreamResult) Error ¶ added in v0.0.10
func (r *BMPParserStreamResult) Error() error
func (*BMPParserStreamResult) Path ¶ added in v0.0.10
func (r *BMPParserStreamResult) Path() string
func (*BMPParserStreamResult) Progress ¶ added in v0.0.10
func (r *BMPParserStreamResult) Progress() uint8
func (*BMPParserStreamResult) Stage ¶ added in v0.0.10
func (r *BMPParserStreamResult) Stage() ParseProgressStage
func (*BMPParserStreamResult) String ¶ added in v0.0.10
func (r *BMPParserStreamResult) String() string
func (*BMPParserStreamResult) SubResult ¶ added in v0.0.10
func (r *BMPParserStreamResult) SubResult() StreamResult
type CompositeParser ¶
type CompositeParser struct {
// contains filtered or unexported fields
}
func NewCompositeParser ¶
func NewCompositeParser(parsers ...Parser) *CompositeParser
func (*CompositeParser) AddParsers ¶
func (p *CompositeParser) AddParsers(parsers ...Parser)
func (*CompositeParser) ParseStream ¶ added in v0.0.10
func (p *CompositeParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
func (*CompositeParser) SupportedMimeTypes ¶
func (p *CompositeParser) SupportedMimeTypes() []string
type CompositeParserResult ¶
type CompositeParserResult struct { FullPath string `json:"path"` Err error `json:"error"` MimeType string `json:"mimeType"` Inner Result `json:"inner"` }
func (*CompositeParserResult) Error ¶
func (r *CompositeParserResult) Error() error
func (*CompositeParserResult) Path ¶ added in v0.0.10
func (r *CompositeParserResult) Path() string
func (*CompositeParserResult) String ¶
func (r *CompositeParserResult) String() string
func (*CompositeParserResult) Subfiles ¶ added in v0.0.10
func (r *CompositeParserResult) Subfiles() []Result
type CompositeParserStreamResult ¶ added in v0.0.10
type CompositeParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` MimeType string `json:"mimeType"` Inner StreamResult `json:"inner"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*CompositeParserStreamResult) Error ¶ added in v0.0.10
func (r *CompositeParserStreamResult) Error() error
func (*CompositeParserStreamResult) Path ¶ added in v0.0.10
func (r *CompositeParserStreamResult) Path() string
func (*CompositeParserStreamResult) Progress ¶ added in v0.0.10
func (r *CompositeParserStreamResult) Progress() uint8
func (*CompositeParserStreamResult) Stage ¶ added in v0.0.10
func (r *CompositeParserStreamResult) Stage() ParseProgressStage
func (*CompositeParserStreamResult) String ¶ added in v0.0.10
func (r *CompositeParserStreamResult) String() string
func (*CompositeParserStreamResult) SubResult ¶ added in v0.0.10
func (r *CompositeParserStreamResult) SubResult() StreamResult
type EMLParser ¶ added in v0.0.10
type EMLParser struct {
// contains filtered or unexported fields
}
Parses `message/rfc822` files (.eml)
func NewEMLParser ¶ added in v0.0.10
func (*EMLParser) ParseStream ¶ added in v0.0.10
func (*EMLParser) SupportedMimeTypes ¶ added in v0.0.10
type EMLParserResult ¶ added in v0.0.10
type EMLParserResult struct { FullPath string `json:"path"` Headers map[string][]string `json:"headers"` Text string `json:"text"` Err error `json:"error"` Attachments []Result `json:"attachments"` }
func (*EMLParserResult) Error ¶ added in v0.0.10
func (r *EMLParserResult) Error() error
func (*EMLParserResult) Path ¶ added in v0.0.10
func (r *EMLParserResult) Path() string
func (*EMLParserResult) String ¶ added in v0.0.10
func (r *EMLParserResult) String() string
func (*EMLParserResult) Subfiles ¶ added in v0.0.10
func (r *EMLParserResult) Subfiles() []Result
type EMLParserStreamResult ¶ added in v0.0.10
type EMLParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentPartHeader mail.PartHeader `json:"subResultHeader"` CurrentPart StreamResult `json:"subResult"` Err error `json:"error"` }
func (*EMLParserStreamResult) Error ¶ added in v0.0.10
func (r *EMLParserStreamResult) Error() error
func (*EMLParserStreamResult) Path ¶ added in v0.0.10
func (r *EMLParserStreamResult) Path() string
func (*EMLParserStreamResult) Progress ¶ added in v0.0.10
func (r *EMLParserStreamResult) Progress() uint8
func (*EMLParserStreamResult) Stage ¶ added in v0.0.10
func (r *EMLParserStreamResult) Stage() ParseProgressStage
func (*EMLParserStreamResult) String ¶ added in v0.0.10
func (r *EMLParserStreamResult) String() string
func (*EMLParserStreamResult) SubResult ¶ added in v0.0.10
func (r *EMLParserStreamResult) SubResult() StreamResult
type ErrMimeTypeNotSupported ¶
func (*ErrMimeTypeNotSupported) Error ¶
func (e *ErrMimeTypeNotSupported) Error() string
type GIFParser ¶
type GIFParser struct {
// contains filtered or unexported fields
}
Parses `image/gif` files. Only decodes first frame
func NewGIFParser ¶
func (*GIFParser) ParseStream ¶ added in v0.0.10
func (*GIFParser) SupportedMimeTypes ¶
type GIFParserResult ¶
type GIFParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*GIFParserResult) Error ¶
func (r *GIFParserResult) Error() error
func (*GIFParserResult) Path ¶ added in v0.0.10
func (r *GIFParserResult) Path() string
func (*GIFParserResult) String ¶
func (r *GIFParserResult) String() string
func (*GIFParserResult) Subfiles ¶ added in v0.0.10
func (r *GIFParserResult) Subfiles() []Result
type GIFParserStreamResult ¶ added in v0.0.10
type GIFParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*GIFParserStreamResult) Error ¶ added in v0.0.10
func (r *GIFParserStreamResult) Error() error
func (*GIFParserStreamResult) Path ¶ added in v0.0.10
func (r *GIFParserStreamResult) Path() string
func (*GIFParserStreamResult) Progress ¶ added in v0.0.10
func (r *GIFParserStreamResult) Progress() uint8
func (*GIFParserStreamResult) Stage ¶ added in v0.0.10
func (r *GIFParserStreamResult) Stage() ParseProgressStage
func (*GIFParserStreamResult) String ¶ added in v0.0.10
func (r *GIFParserStreamResult) String() string
func (*GIFParserStreamResult) SubResult ¶ added in v0.0.10
func (r *GIFParserStreamResult) SubResult() StreamResult
type JPEGParser ¶
type JPEGParser struct {
// contains filtered or unexported fields
}
Parses `image/jpeg` files
func NewJPEGParser ¶
func NewJPEGParser(ocrProvider ocr.Provider) *JPEGParser
func (*JPEGParser) ParseStream ¶ added in v0.0.10
func (p *JPEGParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
func (*JPEGParser) SupportedMimeTypes ¶
func (p *JPEGParser) SupportedMimeTypes() []string
type JPEGParserResult ¶
type JPEGParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*JPEGParserResult) Error ¶
func (r *JPEGParserResult) Error() error
func (*JPEGParserResult) Path ¶ added in v0.0.10
func (r *JPEGParserResult) Path() string
func (*JPEGParserResult) String ¶
func (r *JPEGParserResult) String() string
func (*JPEGParserResult) Subfiles ¶ added in v0.0.10
func (r *JPEGParserResult) Subfiles() []Result
type JPEGParserStreamResult ¶ added in v0.0.10
type JPEGParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*JPEGParserStreamResult) Error ¶ added in v0.0.10
func (r *JPEGParserStreamResult) Error() error
func (*JPEGParserStreamResult) Path ¶ added in v0.0.10
func (r *JPEGParserStreamResult) Path() string
func (*JPEGParserStreamResult) Progress ¶ added in v0.0.10
func (r *JPEGParserStreamResult) Progress() uint8
func (*JPEGParserStreamResult) Stage ¶ added in v0.0.10
func (r *JPEGParserStreamResult) Stage() ParseProgressStage
func (*JPEGParserStreamResult) String ¶ added in v0.0.10
func (r *JPEGParserStreamResult) String() string
func (*JPEGParserStreamResult) SubResult ¶ added in v0.0.10
func (r *JPEGParserStreamResult) SubResult() StreamResult
type PDFParser ¶
type PDFParser struct { }
Parses `application/pdf` files
func NewPDFParser ¶
func (*PDFParser) ParseStream ¶ added in v0.0.10
func (*PDFParser) SupportedMimeTypes ¶
type PDFParserResult ¶
type PDFParserResult struct { Metadata string `json:"metadata"` Pages []PDFParserResultPage `json:"pages"` Err error `json:"error"` }
func (*PDFParserResult) Error ¶
func (r *PDFParserResult) Error() error
func (*PDFParserResult) Path ¶ added in v0.0.10
func (r *PDFParserResult) Path() string
func (*PDFParserResult) String ¶
func (r *PDFParserResult) String() string
func (*PDFParserResult) Subfiles ¶ added in v0.0.10
func (r *PDFParserResult) Subfiles() []Result
type PDFParserResultPage ¶
type PDFParserStreamResult ¶ added in v0.0.10
type PDFParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Metadata string `json:"metadata"` Pages []PDFParserStreamResultPage `json:"pages"` Subfile StreamResult `json:"subfile"` Err error `json:"error"` }
func (*PDFParserStreamResult) Error ¶ added in v0.0.10
func (r *PDFParserStreamResult) Error() error
func (*PDFParserStreamResult) Path ¶ added in v0.0.10
func (r *PDFParserStreamResult) Path() string
func (*PDFParserStreamResult) Progress ¶ added in v0.0.10
func (r *PDFParserStreamResult) Progress() uint8
func (*PDFParserStreamResult) Stage ¶ added in v0.0.10
func (r *PDFParserStreamResult) Stage() ParseProgressStage
func (*PDFParserStreamResult) String ¶ added in v0.0.10
func (r *PDFParserStreamResult) String() string
func (*PDFParserStreamResult) SubResult ¶ added in v0.0.10
func (r *PDFParserStreamResult) SubResult() StreamResult
type PDFParserStreamResultPage ¶ added in v0.0.10
type PDFParserStreamResultPage struct { Text string `json:"text"` Images []StreamResult `json:"images"` }
type PNGParser ¶
type PNGParser struct {
// contains filtered or unexported fields
}
Parses `image/png` files
func NewPNGParser ¶
func (*PNGParser) ParseStream ¶ added in v0.0.10
func (*PNGParser) SupportedMimeTypes ¶
type PNGParserResult ¶
type PNGParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*PNGParserResult) Error ¶
func (r *PNGParserResult) Error() error
func (*PNGParserResult) Path ¶ added in v0.0.10
func (r *PNGParserResult) Path() string
func (*PNGParserResult) String ¶
func (r *PNGParserResult) String() string
func (*PNGParserResult) Subfiles ¶ added in v0.0.10
func (r *PNGParserResult) Subfiles() []Result
type PNGParserStreamResult ¶ added in v0.0.10
type PNGParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*PNGParserStreamResult) Error ¶ added in v0.0.10
func (r *PNGParserStreamResult) Error() error
func (*PNGParserStreamResult) Path ¶ added in v0.0.10
func (r *PNGParserStreamResult) Path() string
func (*PNGParserStreamResult) Progress ¶ added in v0.0.10
func (r *PNGParserStreamResult) Progress() uint8
func (*PNGParserStreamResult) Stage ¶ added in v0.0.10
func (r *PNGParserStreamResult) Stage() ParseProgressStage
func (*PNGParserStreamResult) String ¶ added in v0.0.10
func (r *PNGParserStreamResult) String() string
func (*PNGParserStreamResult) SubResult ¶ added in v0.0.10
func (r *PNGParserStreamResult) SubResult() StreamResult
type ParseProgressStage ¶ added in v0.0.10
type ParseProgressStage string
const ProgressCompleted ParseProgressStage = "COMPLETED"
Raises on the end of file parsing
const ProgressNew ParseProgressStage = "NEW"
const ProgressUpdate ParseProgressStage = "UPDATE"
Indicates that
type Parser ¶
type Parser interface { // Returns list of supported mime types by this parser SupportedMimeTypes() []string // Parse file. Thread safe. Use path to track subfiles or use file name as hint for mime type detection. Parse(ctx context.Context, file io.Reader, path string) Result // Parse file. Thread safe. Use path to track subfiles or use file name as hint for mime type detection. Return chanel that streams results. ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult }
type RAWBGRAParser ¶ added in v0.0.8
type RAWBGRAParser struct {
// contains filtered or unexported fields
}
Parses internal `image/file2llm-raw-bgra` streams
func NewRAWBGRAParser ¶ added in v0.0.8
func NewRAWBGRAParser(ocrProvider ocr.Provider) *RAWBGRAParser
func (*RAWBGRAParser) ParseStream ¶ added in v0.0.10
func (p *RAWBGRAParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
func (*RAWBGRAParser) SupportedMimeTypes ¶ added in v0.0.8
func (p *RAWBGRAParser) SupportedMimeTypes() []string
type RAWBGRAParserResult ¶ added in v0.0.8
type RAWBGRAParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*RAWBGRAParserResult) Error ¶ added in v0.0.8
func (r *RAWBGRAParserResult) Error() error
func (*RAWBGRAParserResult) Path ¶ added in v0.0.10
func (r *RAWBGRAParserResult) Path() string
func (*RAWBGRAParserResult) String ¶ added in v0.0.8
func (r *RAWBGRAParserResult) String() string
func (*RAWBGRAParserResult) Subfiles ¶ added in v0.0.10
func (r *RAWBGRAParserResult) Subfiles() []Result
type RAWBGRAParserStreamResult ¶ added in v0.0.10
type RAWBGRAParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*RAWBGRAParserStreamResult) Error ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) Error() error
func (*RAWBGRAParserStreamResult) Path ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) Path() string
func (*RAWBGRAParserStreamResult) Progress ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) Progress() uint8
func (*RAWBGRAParserStreamResult) Stage ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) Stage() ParseProgressStage
func (*RAWBGRAParserStreamResult) String ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) String() string
func (*RAWBGRAParserStreamResult) SubResult ¶ added in v0.0.10
func (r *RAWBGRAParserStreamResult) SubResult() StreamResult
type Result ¶
type Result interface { // Get full path to the file Path() string // Convert entire result to LLM readable string String() string // Not empty if there where error Error() error // Parsed subfiles. For example files inside archives Subfiles() []Result }
Parsing result
type StreamResult ¶ added in v0.0.10
type StreamResult interface { // Get full path to the file Path() string // Current file processing progress Stage() ParseProgressStage // Progress in percents from 0 to 100 Progress() uint8 // Underlying result SubResult() StreamResult // Convert entire result to LLM readable string String() string // Not empty if there where error Error() error }
type TARParser ¶ added in v0.0.10
type TARParser struct {
// contains filtered or unexported fields
}
func NewTARParser ¶ added in v0.0.10
func (*TARParser) ParseStream ¶ added in v0.0.10
func (*TARParser) SupportedMimeTypes ¶ added in v0.0.10
type TARParserResult ¶ added in v0.0.10
type TARParserResult struct { FullPath string `json:"path"` SubfilesResults []Result `json:"subfiles"` Err error `json:"error"` }
func (*TARParserResult) Error ¶ added in v0.0.10
func (r *TARParserResult) Error() error
func (*TARParserResult) Path ¶ added in v0.0.10
func (r *TARParserResult) Path() string
func (*TARParserResult) String ¶ added in v0.0.10
func (r *TARParserResult) String() string
func (*TARParserResult) Subfiles ¶ added in v0.0.10
func (r *TARParserResult) Subfiles() []Result
type TARParserStreamResult ¶ added in v0.0.10
type TARParserStreamResult struct { FullPath string `json:"path"` CurrentStage ParseProgressStage `json:"stage"` CurrentSubfile StreamResult `json:"subResult"` Err error `json:"error"` }
func (*TARParserStreamResult) Error ¶ added in v0.0.10
func (r *TARParserStreamResult) Error() error
func (*TARParserStreamResult) Path ¶ added in v0.0.10
func (r *TARParserStreamResult) Path() string
func (*TARParserStreamResult) Progress ¶ added in v0.0.10
func (r *TARParserStreamResult) Progress() uint8
func (*TARParserStreamResult) Stage ¶ added in v0.0.10
func (r *TARParserStreamResult) Stage() ParseProgressStage
func (*TARParserStreamResult) String ¶ added in v0.0.10
func (r *TARParserStreamResult) String() string
func (*TARParserStreamResult) SubResult ¶ added in v0.0.10
func (r *TARParserStreamResult) SubResult() StreamResult
type TIFFParserStreamResult ¶ added in v0.0.10
type TIFFParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*TIFFParserStreamResult) Error ¶ added in v0.0.10
func (r *TIFFParserStreamResult) Error() error
func (*TIFFParserStreamResult) Path ¶ added in v0.0.10
func (r *TIFFParserStreamResult) Path() string
func (*TIFFParserStreamResult) Progress ¶ added in v0.0.10
func (r *TIFFParserStreamResult) Progress() uint8
func (*TIFFParserStreamResult) Stage ¶ added in v0.0.10
func (r *TIFFParserStreamResult) Stage() ParseProgressStage
func (*TIFFParserStreamResult) String ¶ added in v0.0.10
func (r *TIFFParserStreamResult) String() string
func (*TIFFParserStreamResult) SubResult ¶ added in v0.0.10
func (r *TIFFParserStreamResult) SubResult() StreamResult
type TiffParser ¶
type TiffParser struct {
// contains filtered or unexported fields
}
Parses `image/tiff` files
func NewTiffParser ¶
func NewTiffParser(ocrProvider ocr.Provider) *TiffParser
func (*TiffParser) ParseStream ¶ added in v0.0.10
func (p *TiffParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
func (*TiffParser) SupportedMimeTypes ¶
func (p *TiffParser) SupportedMimeTypes() []string
type TiffParserResult ¶
type TiffParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*TiffParserResult) Error ¶
func (r *TiffParserResult) Error() error
func (*TiffParserResult) Path ¶ added in v0.0.10
func (r *TiffParserResult) Path() string
func (*TiffParserResult) String ¶
func (r *TiffParserResult) String() string
func (*TiffParserResult) Subfiles ¶ added in v0.0.10
func (r *TiffParserResult) Subfiles() []Result
type WEBPParserStreamResult ¶ added in v0.0.10
type WEBPParserStreamResult struct { FullPath string `json:"path"` Text string `json:"text"` CurrentStage ParseProgressStage `json:"stage"` CurrentProgress uint8 `json:"progress"` Err error `json:"error"` }
func (*WEBPParserStreamResult) Error ¶ added in v0.0.10
func (r *WEBPParserStreamResult) Error() error
func (*WEBPParserStreamResult) Path ¶ added in v0.0.10
func (r *WEBPParserStreamResult) Path() string
func (*WEBPParserStreamResult) Progress ¶ added in v0.0.10
func (r *WEBPParserStreamResult) Progress() uint8
func (*WEBPParserStreamResult) Stage ¶ added in v0.0.10
func (r *WEBPParserStreamResult) Stage() ParseProgressStage
func (*WEBPParserStreamResult) String ¶ added in v0.0.10
func (r *WEBPParserStreamResult) String() string
func (*WEBPParserStreamResult) SubResult ¶ added in v0.0.10
func (r *WEBPParserStreamResult) SubResult() StreamResult
type WebPParser ¶
type WebPParser struct {
// contains filtered or unexported fields
}
Parses `image/webp` files
func NewWebPParser ¶
func NewWebPParser(ocrProvider ocr.Provider) *WebPParser
func (*WebPParser) ParseStream ¶ added in v0.0.10
func (p *WebPParser) ParseStream(ctx context.Context, file io.Reader, path string) chan StreamResult
func (*WebPParser) SupportedMimeTypes ¶
func (p *WebPParser) SupportedMimeTypes() []string
type WebPParserResult ¶
type WebPParserResult struct { FullPath string `json:"path"` Text string `json:"text"` Err error `json:"error"` }
func (*WebPParserResult) Error ¶
func (r *WebPParserResult) Error() error
func (*WebPParserResult) Path ¶ added in v0.0.10
func (r *WebPParserResult) Path() string
func (*WebPParserResult) String ¶
func (r *WebPParserResult) String() string
func (*WebPParserResult) Subfiles ¶ added in v0.0.10
func (r *WebPParserResult) Subfiles() []Result
Source Files
¶
Click to show internal directories.
Click to hide internal directories.