extractor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package extractor deals with extracting (hence the name - duh!) searchable metadata from the files the Walker has found.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooLarge = errors.New("File is too large")
	ErrNoProbe  = errors.New("No matching probe was found for the given type")
)

ErrTooLarge indicates that a file is too large to be processed. ErrNoProbe indicates we have no probe to get metadata from a file type.

Functions

This section is empty.

Types

type Extractor

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

Extractor wraps the handling of various file types to extract searchable metadata / content from.

func New

func New() (*Extractor, error)

New creates a new Extractor.

func (*Extractor) IsActive

func (ex *Extractor) IsActive() bool

IsActive returns the Extractor's active flag

func (*Extractor) Process

func (ex *Extractor) Process(f *model.File) (*model.FileMeta, error)

Process attempts to extract usable information from a file to use in a search index.

func (*Extractor) Run

func (ex *Extractor) Run()

Run attempts to process all Files in the database that do not have up-to-date Metadata.

func (*Extractor) Stop

func (ex *Extractor) Stop()

Stop clears the Extractor's active flag

Jump to

Keyboard shortcuts

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