parser.go 313 B

1234567891011121314
  1. package import_service
  2. // ParsedDocument 解析后的文档
  3. type ParsedDocument struct {
  4. Title string
  5. Content string
  6. Metadata map[string]interface{}
  7. }
  8. // DocumentParser 文档解析器接口
  9. type DocumentParser interface {
  10. Parse(filePath string) (*ParsedDocument, error)
  11. Supports(filePath string) bool
  12. }