Versions in this module Expand all Collapse all v0 v0.1.0 Aug 17, 2026 Changes in this version + const FileTypeAAC + const FileTypeBMP + const FileTypeCSV + const FileTypeDOC + const FileTypeDOCX + const FileTypeEML + const FileTypeEPUB + const FileTypeFLAC + const FileTypeGIF + const FileTypeHTML + const FileTypeICS + const FileTypeJPEG + const FileTypeJPG + const FileTypeJSON + const FileTypeLOG + const FileTypeM4A + const FileTypeMD + const FileTypeMDX + const FileTypeMHT + const FileTypeMHTML + const FileTypeMP3 + const FileTypeODP + const FileTypeODS + const FileTypeODT + const FileTypeOGG + const FileTypePDF + const FileTypePNG + const FileTypePPT + const FileTypePPTX + const FileTypeRTF + const FileTypeSVG + const FileTypeTIF + const FileTypeTIFF + const FileTypeTOML + const FileTypeTSV + const FileTypeTXT + const FileTypeUnknown + const FileTypeVCF + const FileTypeWAV + const FileTypeWEBP + const FileTypeXLS + const FileTypeXLSX + const FileTypeXML + const FileTypeYAML + const FileTypeYML + var ErrEmptyInput = errors.New("empty input") + var ErrUnsupportedFileType = errors.New("unsupported file type") + func DetectFileType(req *ParseRequest) string + func SupportedDocumentNotes() []string + type ASRParser struct + SampleRate int + func ASRParserFromEnv() *ASRParser + func NewASRParser(engine base.Engine) *ASRParser + func (p *ASRParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *ASRParser) Provider() string + func (p *ASRParser) SetEngine(engine base.Engine) + func (p *ASRParser) SupportedTypes() []string + type CSVParser struct + func (p *CSVParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *CSVParser) Provider() string + func (p *CSVParser) SupportedTypes() []string + type DOCParser struct + func (p *DOCParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *DOCParser) Provider() string + func (p *DOCParser) SupportedTypes() []string + type DOCXParser struct + func (p *DOCXParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *DOCXParser) Provider() string + func (p *DOCXParser) SupportedTypes() []string + type EMLParser struct + func (p *EMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *EMLParser) Provider() string + func (p *EMLParser) SupportedTypes() []string + type EPUBParser struct + func (p *EPUBParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *EPUBParser) Provider() string + func (p *EPUBParser) SupportedTypes() []string + type HTMLParser struct + func (p *HTMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *HTMLParser) Provider() string + func (p *HTMLParser) SupportedTypes() []string + type ICSParser struct + func (p *ICSParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *ICSParser) Provider() string + func (p *ICSParser) SupportedTypes() []string + type JSONParser struct + func (p *JSONParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *JSONParser) Provider() string + func (p *JSONParser) SupportedTypes() []string + type LOGParser struct + func (p *LOGParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *LOGParser) Provider() string + func (p *LOGParser) SupportedTypes() []string + type MDXParser struct + func (p *MDXParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *MDXParser) Provider() string + func (p *MDXParser) SupportedTypes() []string + type MHTMLParser struct + func (p *MHTMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *MHTMLParser) Provider() string + func (p *MHTMLParser) SupportedTypes() []string + type MarkdownParser struct + func NewMarkdownParser() *MarkdownParser + func (p *MarkdownParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *MarkdownParser) Provider() string + func (p *MarkdownParser) SupportedTypes() []string + type OCRParser struct + Driver ocr.Provider + Language string + func (p *OCRParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *OCRParser) Provider() string + func (p *OCRParser) SupportedTypes() []string + type ODTParser struct + func (p *ODTParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *ODTParser) Provider() string + func (p *ODTParser) SupportedTypes() []string + type PDFParser struct + func (p *PDFParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *PDFParser) Provider() string + func (p *PDFParser) SupportedTypes() []string + type PPTXParser struct + func (p *PPTXParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *PPTXParser) Provider() string + func (p *PPTXParser) SupportedTypes() []string + type ParseOptions struct + IncludeHidden bool + IncludeTables bool + MaxTextLength int + PreserveLineBreaks bool + type ParsePreviewMeta struct + CharCount int + Format string + Metadata map[string]any + Preview string + func ParseBytesWithMeta(ctx context.Context, fileName string, content []byte, opts *ParseOptions) (string, *ParsePreviewMeta, error) + type ParseRequest struct + Content []byte + ContentType string + FileName string + FileType string + Metadata map[string]any + Path string + Reader io.Reader + type ParseResult struct + FileName string + FileType string + Metadata map[string]any + ParsedAt time.Time + Sections []Section + Text string + func ParseAuto(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func ParseBytes(ctx context.Context, fileName string, content []byte, opts *ParseOptions) (*ParseResult, error) + func ParsePath(ctx context.Context, path string, opts *ParseOptions) (*ParseResult, error) + type Parser interface + Parse func(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + Provider func() string + SupportedTypes func() []string + type RTFParser struct + func (p *RTFParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *RTFParser) Provider() string + func (p *RTFParser) SupportedTypes() []string + type Router struct + func DefaultRouter() *Router + func NewRouter(parsers ...Parser) *Router + func (r *Router) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (r *Router) Register(p Parser) error + type SVGParser struct + func (p *SVGParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *SVGParser) Provider() string + func (p *SVGParser) SupportedTypes() []string + type Section struct + Index int + Metadata map[string]any + Text string + Title string + Type SectionType + type SectionType string + const SectionTypeDocument + const SectionTypePage + const SectionTypeSheet + const SectionTypeSlide + const SectionTypeUnknown + type SupportedDocumentFormat struct + Description string + Extension string + func SupportedDocumentFormats() []SupportedDocumentFormat + type TOMLParser struct + func (p *TOMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *TOMLParser) Provider() string + func (p *TOMLParser) SupportedTypes() []string + type TSVParser struct + func (p *TSVParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *TSVParser) Provider() string + func (p *TSVParser) SupportedTypes() []string + type TXTParser struct + func (p *TXTParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *TXTParser) Provider() string + func (p *TXTParser) SupportedTypes() []string + type VCFParser struct + func (p *VCFParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *VCFParser) Provider() string + func (p *VCFParser) SupportedTypes() []string + type XLSXParser struct + func (p *XLSXParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *XLSXParser) Provider() string + func (p *XLSXParser) SupportedTypes() []string + type XMLParser struct + func (p *XMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *XMLParser) Provider() string + func (p *XMLParser) SupportedTypes() []string + type YAMLParser struct + func (p *YAMLParser) Parse(ctx context.Context, req *ParseRequest, opts *ParseOptions) (*ParseResult, error) + func (p *YAMLParser) Provider() string + func (p *YAMLParser) SupportedTypes() []string