metadata

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageFormat       = "format"
	ImageWidth        = "width"
	ImageHeight       = "height"
	ImageTitle        = "title"
	ImageSummary      = "summary"
	ImageTags         = "tags"
	TextTitle         = "title"
	TextAuthor        = "author"
	TextSummary       = "summary"
	TextLanguage      = "language"
	TextLines         = "lines"
	TextTags          = "tags"
	PDFTitle          = "title"
	PDFAuthor         = "author"
	PDFSubject        = "subject"
	PDFCreator        = "creator"
	PDFProducer       = "producer"
	PDFPages          = "pages"
	VideoDurationSecs = "duration-secs"
	VideoDuration     = "duration"
	VideoDescription  = "description"
	VideoSynopsis     = "synopsis"
	VideoTitle        = "title"
	VideoDirector     = "director"
	VideoYear         = "year"
	AudioDurationSecs = "duration-secs"
	AudioDuration     = "duration"
	AudioTitle        = "title"
	AudioArtist       = "artist"
	AudioAlbum        = "album"
	AudioGenre        = "genre"
	AudioYear         = "year"
	AudioTrack        = "track"
	DateCreated       = "created"
	DateModified      = "modified"
)

Variables

This section is empty.

Functions

func RegisterExtractor

func RegisterExtractor(e Extractor)

Types

type Extractor

type Extractor interface {
	// Return the media type
	MediaType() *regexp.Regexp

	// Extract metadata from the file at the given path
	ExtractMetadata(ctx context.Context, r io.Reader) ([]schema.Meta, error)
}

func Get

func Get(mimeType string) (Extractor, error)

Return metadata for a *schema.Object in a specific backend

type FileReader added in v0.2.3

type FileReader interface {
	io.Reader
	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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