guesser

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL