docloader

package
v0.5.0-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PluginName    = "docloader"
	PluginVersion = "1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CSV

type CSV struct {
	// contains filtered or unexported fields
}

func NewCSV

func NewCSV(docPath string, option map[string]string) CSV

func (CSV) Load

func (c CSV) Load(_ context.Context) (result []types.FDocument, err error)

type DocLoader

type DocLoader struct {
	// contains filtered or unexported fields
}

func NewDocLoader

func NewDocLoader(spec types.PluginSpec, scope types.PlugScope) *DocLoader

func (DocLoader) Name

func (d DocLoader) Name() string

func (DocLoader) Run

func (d DocLoader) Run(ctx context.Context, request *pluginapi.Request) (*pluginapi.Response, error)

func (DocLoader) Type

func (d DocLoader) Type() types.PluginType

func (DocLoader) Version

func (d DocLoader) Version() string

type HTML

type HTML struct {
	// contains filtered or unexported fields
}

func (HTML) Load

func (h HTML) Load(ctx context.Context) (result []types.FDocument, err error)

type PDF

type PDF struct {
	// contains filtered or unexported fields
}

func (*PDF) Load

func (p *PDF) Load(_ context.Context) ([]types.FDocument, error)

type Parser

type Parser interface {
	Load(ctx context.Context) (result []types.FDocument, err error)
}

func NewHTML

func NewHTML(docPath string, option map[string]string) Parser

func NewPDF

func NewPDF(docPath string, option map[string]string) Parser

func NewText

func NewText(docPath string, option map[string]string) Parser

type Text

type Text struct {
	// contains filtered or unexported fields
}

func (Text) Load

func (l Text) Load(_ context.Context) ([]types.FDocument, error)

Jump to

Keyboard shortcuts

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