indexer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package indexer holds the logic for ebook indexation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexStat

type IndexStat int

IndexStat represents indexation outcomes

const (
	// Success relates to successfully indexed books
	Success IndexStat = iota
	// Skipped relates to unchanged books
	Skipped
	// Error means something went wrong during indexation
	Error
)

type Indexer

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

Indexer handles book indexation, it basically holds references to underlying stores

func New

func New(store db.BookIndex, loader ebook.MetadataLoader, coverStore cover.ImageStore) *Indexer

New returns an Indexer created with given stores and loaders

func (*Indexer) Index

func (indexer *Indexer) Index(filePaths []string) map[IndexStat]int

Index ebook for each given path

Jump to

Keyboard shortcuts

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