Documentation ¶
Index ¶
- func ConvertToPDF(base64Encoded, fileExtension string) (string, error)
- func Init(bc base.Component) *component
- type CSVToMarkdownTransformer
- type ConvertDocumentToImagesInput
- type ConvertDocumentToImagesOutput
- type ConvertDocumentToMarkdownInput
- type ConvertDocumentToMarkdownOutput
- type ConvertToTextInput
- type ConvertToTextOutput
- type DocxDocToMarkdownTransformer
- type HTMLToMarkdownTransformer
- type MarkdownTransformer
- type MarkdownTransformerGetterFunc
- type PDFToMarkdownTransformer
- type PptPptxToMarkdownTransformer
- type XlsToMarkdownTransformer
- type XlsxToMarkdownTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToPDF ¶
Types ¶
type CSVToMarkdownTransformer ¶
type CSVToMarkdownTransformer struct {
Base64EncodedText string
}
func (CSVToMarkdownTransformer) Transform ¶
func (t CSVToMarkdownTransformer) Transform() (converterOutput, error)
type ConvertDocumentToImagesOutput ¶
type ConvertDocumentToImagesOutput struct { Images []string `json:"images"` Filenames []string `json:"filenames"` }
func ConvertDocumentToImage ¶
func ConvertDocumentToImage(inputStruct *ConvertDocumentToImagesInput) (*ConvertDocumentToImagesOutput, error)
type ConvertDocumentToMarkdownOutput ¶
type ConvertDocumentToMarkdownOutput struct { Body string `json:"body"` Filename string `json:"filename"` Images []string `json:"images,omitempty"` Error string `json:"error,omitempty"` AllPageImages []string `json:"all-page-images,omitempty"` }
func ConvertDocumentToMarkdown ¶
func ConvertDocumentToMarkdown(inputStruct *ConvertDocumentToMarkdownInput, transformerGetter MarkdownTransformerGetterFunc) (*ConvertDocumentToMarkdownOutput, error)
type ConvertToTextInput ¶
type ConvertToTextInput struct { // Document: Document to convert Document string `json:"document"` Filename string `json:"filename"` }
ConvertToTextInput defines the input for convert to text task
type ConvertToTextOutput ¶
type ConvertToTextOutput struct { // Body: Plain text converted from the document Body string `json:"body"` // Meta: Metadata extracted from the document Meta map[string]string `json:"meta"` // MSecs: Time taken to convert the document MSecs uint32 `json:"msecs"` // Error: Error message if any during the conversion process Error string `json:"error"` Filename string `json:"filename"` }
ConvertToTextOutput defines the output for convert to text task
func ConvertToText ¶
func ConvertToText(input ConvertToTextInput) (ConvertToTextOutput, error)
type DocxDocToMarkdownTransformer ¶
type DocxDocToMarkdownTransformer struct { Base64EncodedText string FileExtension string DisplayImageTag bool DisplayAllPageImage bool PDFConvertFunc func(string, bool, bool) (converterOutput, error) }
func (DocxDocToMarkdownTransformer) Transform ¶
func (t DocxDocToMarkdownTransformer) Transform() (converterOutput, error)
type HTMLToMarkdownTransformer ¶
type HTMLToMarkdownTransformer struct { Base64EncodedText string FileExtension string DisplayImageTag bool }
func (HTMLToMarkdownTransformer) Transform ¶
func (t HTMLToMarkdownTransformer) Transform() (converterOutput, error)
type MarkdownTransformer ¶
type MarkdownTransformer interface {
Transform() (converterOutput, error)
}
func GetMarkdownTransformer ¶
func GetMarkdownTransformer(fileExtension string, inputStruct *ConvertDocumentToMarkdownInput) (MarkdownTransformer, error)
type MarkdownTransformerGetterFunc ¶
type MarkdownTransformerGetterFunc func(fileExtension string, inputStruct *ConvertDocumentToMarkdownInput) (MarkdownTransformer, error)
type PDFToMarkdownTransformer ¶
type PDFToMarkdownTransformer struct { Base64EncodedText string FileExtension string DisplayImageTag bool DisplayAllPageImage bool PDFConvertFunc func(string, bool, bool) (converterOutput, error) }
func (PDFToMarkdownTransformer) Transform ¶
func (t PDFToMarkdownTransformer) Transform() (converterOutput, error)
type PptPptxToMarkdownTransformer ¶
type PptPptxToMarkdownTransformer struct { Base64EncodedText string FileExtension string DisplayImageTag bool DisplayAllPageImage bool PDFConvertFunc func(string, bool, bool) (converterOutput, error) }
func (PptPptxToMarkdownTransformer) Transform ¶
func (t PptPptxToMarkdownTransformer) Transform() (converterOutput, error)
type XlsToMarkdownTransformer ¶
type XlsToMarkdownTransformer struct {
Base64EncodedText string
}
func (XlsToMarkdownTransformer) Transform ¶
func (t XlsToMarkdownTransformer) Transform() (converterOutput, error)
type XlsxToMarkdownTransformer ¶
type XlsxToMarkdownTransformer struct {
Base64EncodedText string
}
func (XlsxToMarkdownTransformer) Transform ¶
func (t XlsxToMarkdownTransformer) Transform() (converterOutput, error)
Click to show internal directories.
Click to hide internal directories.