Documentation
¶
Index ¶
- Variables
- func InitORT() error
- func Initialized() bool
- type Converter
- func (c *Converter) ConvertBytes(context.Context, []byte, string) (*documentreader.ConversionResult, error)
- func (c *Converter) ConvertFile(context.Context, string) (*documentreader.ConversionResult, error)
- func (c *Converter) ConvertURL(context.Context, string) (*documentreader.ConversionResult, error)
- func (c *Converter) IsAvailable(context.Context) bool
- func (c *Converter) RenderPage(context.Context, []byte, int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
ErrUnavailable is returned by the fallback build when the native document backend was not compiled in. Build with CGO and the nativedoc tag to enable it.
Functions ¶
func InitORT ¶
func InitORT() error
InitORT reports that ONNX Runtime support is unavailable in this build.
func Initialized ¶
func Initialized() bool
Initialized reports whether ONNX Runtime has been initialized.
Types ¶
type Converter ¶
type Converter struct {
ModelDir string
}
Converter is a placeholder implementation used when the native document backend is not compiled in.
func (*Converter) ConvertBytes ¶
func (c *Converter) ConvertBytes(context.Context, []byte, string) (*documentreader.ConversionResult, error)
ConvertBytes returns ErrUnavailable in non-nativedoc builds.
func (*Converter) ConvertFile ¶
func (c *Converter) ConvertFile(context.Context, string) (*documentreader.ConversionResult, error)
ConvertFile returns ErrUnavailable in non-nativedoc builds.
func (*Converter) ConvertURL ¶
func (c *Converter) ConvertURL(context.Context, string) (*documentreader.ConversionResult, error)
ConvertURL returns ErrUnavailable in non-nativedoc builds.
func (*Converter) IsAvailable ¶
IsAvailable reports whether this converter can process documents.
Click to show internal directories.
Click to hide internal directories.