importer

package
v0.4.16-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backends

func Backends() []string

func Register

func Register(name string, backend func() ImporterBackend)

Types

type Importer

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

func NewImporter

func NewImporter(location string) (*Importer, error)

func (*Importer) Begin

func (importer *Importer) Begin(config string) error

func (*Importer) End

func (importer *Importer) End() error

func (*Importer) Open

func (importer *Importer) Open(pathname string) (io.ReadCloser, error)

func (*Importer) Scan

func (importer *Importer) Scan() (<-chan ImporterRecord, <-chan error, error)

type ImporterBackend

type ImporterBackend interface {
	Begin(config string) error
	Scan() (<-chan ImporterRecord, <-chan error, error)
	Open(pathname string) (io.ReadCloser, error)
	End() error
}

type ImporterRecord

type ImporterRecord struct {
	Pathname string
	Stat     fs.FileInfo
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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