Documentation
¶
Index ¶
- Variables
- type DocFactory
- func (df *DocFactory) NewDocFromForkedProcess(r io.Reader, origin string) (*ForkedDoc, error)
- func (df *DocFactory) NewDocFromForkedProcessPath(path, origin string) (*ForkedDoc, error)
- func (df *DocFactory) NewDocFromStream(r io.Reader, size int64, origin string) (cache.Document, error)
- func (df *DocFactory) NewFromBytes(data []byte, origin string) (cache.Document, error)
- func (df *DocFactory) NewFromPath(path, origin string) (cache.Document, error)
- func (df *DocFactory) NewPdfFromBytes(data []byte, origin string) (doc cache.Document, err error)
- func (df *DocFactory) NewPdfFromPath(path, origin string) (doc cache.Document, err error)
- func (df *DocFactory) PdfImpl() pdfImplementation
- type ForkedDoc
- func (d *ForkedDoc) Close()
- func (d *ForkedDoc) Data() *[]byte
- func (d *ForkedDoc) HasNewlines() bool
- func (d *ForkedDoc) MetadataMap() map[string]string
- func (d *ForkedDoc) Pages() int
- func (d *ForkedDoc) Path() string
- func (d *ForkedDoc) StreamText(w io.Writer) error
- func (d *ForkedDoc) Text(i int) (string, bool)
- type PooledDoc
Constants ¶
This section is empty.
Variables ¶
View Source
var AlienationErr error = errors.New("don't know who I am")
AlienationErr indicates that forking a new process is not possible because TES could not find out its own FS path (this is unlikely)
Functions ¶
This section is empty.
Types ¶
type DocFactory ¶
type DocFactory struct {
MaxInMemoryBytes uint64
MaxFileSizeBytes uint64
// contains filtered or unexported fields
}
func (*DocFactory) NewDocFromForkedProcess ¶
NewDocFromForkedProcess creates a Document whose content and metadata is being extracted by a forked subprocess
func (*DocFactory) NewDocFromForkedProcessPath ¶
func (df *DocFactory) NewDocFromForkedProcessPath(path, origin string) (*ForkedDoc, error)
func (*DocFactory) NewDocFromStream ¶
func (*DocFactory) NewFromBytes ¶
func (*DocFactory) NewFromPath ¶
func (df *DocFactory) NewFromPath(path, origin string) (cache.Document, error)
func (*DocFactory) NewPdfFromBytes ¶
NewPdfFromBytes returns a PDF Document parsed by the particular PDF lib that was loaded before
func (*DocFactory) NewPdfFromPath ¶
func (df *DocFactory) NewPdfFromPath(path, origin string) (doc cache.Document, err error)
NewPdfFromPath returns a PDF Document parsed by the particular PDF lib that was loaded before
func (*DocFactory) PdfImpl ¶
func (df *DocFactory) PdfImpl() pdfImplementation
type ForkedDoc ¶
type ForkedDoc struct {
// contains filtered or unexported fields
}
ForkedDoc represents a Document processed by forked subprocess of this service
func (*ForkedDoc) HasNewlines ¶ added in v4.1.0
func (*ForkedDoc) MetadataMap ¶
func (*ForkedDoc) StreamText ¶
StreamText may only be invoked once!
Click to show internal directories.
Click to hide internal directories.