Documentation ¶
Index ¶
- func GuessDocument(ctx context.Context, d *processor.Document) (processor.DocumentType, processor.FormatType, error)
- func GuessEncoding(ctx context.Context, d *processor.Document) error
- func RegisterDocumentFormatGuesser(g DocumentFormatGuesser, name string) error
- func RegisterDocumentTypeGuesser(g DocumentTypeGuesser, name string) error
- type DocumentFormatGuesser
- type DocumentTypeGuesser
- type IngestPredicatesGuesser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GuessDocument ¶
func GuessDocument(ctx context.Context, d *processor.Document) (processor.DocumentType, processor.FormatType, error)
func GuessEncoding ¶ added in v0.5.0
func RegisterDocumentFormatGuesser ¶
func RegisterDocumentFormatGuesser(g DocumentFormatGuesser, name string) error
func RegisterDocumentTypeGuesser ¶
func RegisterDocumentTypeGuesser(g DocumentTypeGuesser, name string) error
Types ¶
type DocumentFormatGuesser ¶
type DocumentFormatGuesser interface { // GuessFormat returns the format type guessed to processor.FormatUnknown if // it is unable to. GuessFormat(blob []byte) processor.FormatType }
DocumentFormatGuesser guesses the format of the document given a blob
type DocumentTypeGuesser ¶
type DocumentTypeGuesser interface { // GuessDocumentType returns the document type guessed or processor.DocumentUnknown if // it is unable to. Format provided may be processor.FormatUnknown. GuessDocumentType(blob []byte, format processor.FormatType) processor.DocumentType }
DocumentTypeGuesser guesses the document type based on the blob and format given
type IngestPredicatesGuesser ¶ added in v0.1.1
type IngestPredicatesGuesser struct{}
func (*IngestPredicatesGuesser) GuessDocumentType ¶ added in v0.1.1
func (_ *IngestPredicatesGuesser) GuessDocumentType(blob []byte, format processor.FormatType) processor.DocumentType
Click to show internal directories.
Click to hide internal directories.