xfile

package
v0.0.0-...-913df6c Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

func GuessFileTypeFromName

func GuessFileTypeFromName(filename string) (string, error)

func GuessFileTypeFromStream

func GuessFileTypeFromStream(r io.Reader) (string, error)

Types

type Expert

type Expert interface {
	GetName() string
	GetSupportedMIMEs() []string
	Inspect(string, io.Reader) (string, []string, interface{}, error)
}

Expert is a module which is able to extract useful meta information from a stream of data. An expert can call other experts when necessary

type XFile

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

XFile - xfile module

func New

func New() XFile

New() - initialize and return a ready XFile instance

func (XFile) ExtractMetadata

func (xf XFile) ExtractMetadata(fileURI string) (string, *xfileResponse, error)

ExtractMetadata - get meta information from the given file URI

func (XFile) ExtractMetadataFromStream

func (xf XFile) ExtractMetadataFromStream(input io.Reader, fileType string) (*xfileResponse, error)

ExtractMetadataFromStream - given the file type, call for experts to fetch meta information.

Jump to

Keyboard shortcuts

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