metadata

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultExtractor

type DefaultExtractor struct {
	Layout string
}

DefaultExtractor extract metadata from all file types, not covered by special extractors

Gets the meta data from the file's name

func NewDefaultExtractor

func NewDefaultExtractor() *DefaultExtractor

NewDefaultExtractor returns new DefaultExtractor's instance

func NewDefaultExtractorWithLayout

func NewDefaultExtractorWithLayout(l string) *DefaultExtractor

NewDefaultExtractorWithLayout returns DefaultExtractor with custom time layout

func (*DefaultExtractor) Extract

func (d *DefaultExtractor) Extract(fp string) (Metadata, error)

Extract returns Metadata from specified filename using its name to parse Time

type Extractor

type Extractor interface {
	Extract(string) (Metadata, error)
}

Extractor interface for Metadata extractors

type JpegExtractor

type JpegExtractor struct {
}

JpegExtractor meta data extractor for the jpeg files

func NewJpegExtractor

func NewJpegExtractor() *JpegExtractor

NewJpegExtractor returns new JpegExtractor

func (*JpegExtractor) Extract

func (j *JpegExtractor) Extract(fp string) (Metadata, error)

Extract returns Metadata from specified jpeg file reading its exif data

TODO: Fallback to default extractor on exif reading/parsing error

type Metadata

type Metadata struct {
	Time time.Time
}

Metadata contains meta data for the files have to be processed

Jump to

Keyboard shortcuts

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