Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
// Warn logs a warning message with optional fields.
// Fields should be key-value pairs (e.g., "category", "image", "error", err).
Warn(msg string, fields ...interface{})
// Debug logs a debug message with optional fields.
Debug(msg string, fields ...interface{})
}
Logger defines the interface for structured logging. Implementations can use any logging library (e.g., zerolog, zap, logrus). If nil, no logging is performed.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles DOCX parsing and content extraction.
func NewParserWithLogger ¶
NewParserWithLogger creates a new DOCX parser instance with structured logging.
func (*Parser) Parse ¶
func (p *Parser) Parse(filePath string) (*types.DocumentData, error)
Parse extracts content from a DOCX file and returns structured document data. Warnings are collected for non-fatal issues (e.g., failed image extraction, table extraction issues) and returned in DocumentData.Warnings.
Click to show internal directories.
Click to hide internal directories.