Documentation
¶
Overview ¶
Package document contains Document structs and Parsers prepare for RAG
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReading = errors.New("document is reading")
Functions ¶
This section is empty.
Types ¶
type ClosableDocument ¶
type ClosableDocument interface {
Close() error
}
type File ¶
type File struct {
Document
// contains filtered or unexported fields
}
func (*File) ReadStatus ¶
func (d *File) ReadStatus() ReadStatus
type HTML2MDParser ¶
type HTML2MDParser struct {
// contains filtered or unexported fields
}
HTML2MDParser is a parser which parse html content to markdown
func NewHTML2MDParser ¶
func NewHTML2MDParser(opts ...converter.ConvertOptionFunc) *HTML2MDParser
type Http ¶
type Http struct {
Document
// contains filtered or unexported fields
}
func NewHttp ¶
func NewHttp(opts ...HttpOption) (*Http, error)
func (*Http) ReadStatus ¶
func (h *Http) ReadStatus() ReadStatus
type HttpConfig ¶
type HttpConfig struct {
// contains filtered or unexported fields
}
type HttpOption ¶
type HttpOption func(*HttpConfig)
func WithHttpClient ¶
func WithHttpClient(client *http.Client) HttpOption
func WithHttpMethod ¶
func WithHttpMethod(method string) HttpOption
func WithHttpURL ¶
func WithHttpURL(link string) HttpOption
func WithPayload ¶
func WithPayload(payload io.Reader) HttpOption
type PDFParser ¶
type PDFParser struct {
// contains filtered or unexported fields
}
PDFParser is a parser which parse PDF content to text
func NewPDFParser ¶
func NewPDFParser(opts ...PDFParserOption) *PDFParser
type PDFParserOption ¶
type PDFParserOption func(*PDFParser)
func PDFParserWithPassword ¶
func PDFParserWithPassword(password string) PDFParserOption
type ReadableDocument ¶
Click to show internal directories.
Click to hide internal directories.