formats

package
v3.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFormat

func RegisterFormat(f *Format)

RegisterFormat adds a format to the Formats list. This function does not do anything if there is already a format with the given extension.

Types

type Format

type Format struct {
	Glob      string
	Extension string // Needs to include the leading period. Also used as the unique identifier.
	Indexer   IndexerFunc
}

Format represents a handler for an ebook format.

type FormatList

type FormatList []*Format

FormatList represents a list of formats.

var Formats FormatList

Formats is the list of registered formats.

type IndexerFunc

type IndexerFunc func(filename string) (book *models.Book, cover image.Image, err error)

IndexerFunc is a function which takes a filename and returns a Book and a Cover, if it is present.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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