Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DOCXExtractor ¶
type DOCXExtractor struct{}
DOCXExtractor handles .docx files using stdlib zip+xml — no external license required.
func (*DOCXExtractor) Supports ¶
func (d *DOCXExtractor) Supports(ext string) bool
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher satisfies port.DocumentLoader by routing to the appropriate format-specific extractor based on file extension.
func New ¶
func New() *Dispatcher
New returns a Dispatcher pre-loaded with all supported format extractors.
func (*Dispatcher) Load ¶
func (d *Dispatcher) Load(path string) (string, error)
Load extracts plain text from the file at path. Returns an error if no extractor supports the file extension.
func (*Dispatcher) Supports ¶
func (d *Dispatcher) Supports(ext string) bool
Supports returns true if any registered extractor supports the given extension.
type PDFExtractor ¶
type PDFExtractor struct{}
PDFExtractor handles .pdf files.
func (*PDFExtractor) Supports ¶
func (p *PDFExtractor) Supports(ext string) bool
type TextExtractor ¶
type TextExtractor struct{}
TextExtractor handles .txt, .text, .md, and .markdown files.
func (*TextExtractor) Supports ¶
func (t *TextExtractor) Supports(ext string) bool
Click to show internal directories.
Click to hide internal directories.