media

package
v0.0.0-...-52aaef3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExifMeta

type ExifMeta map[string]string

type Image

type Image struct {
	Reference string `json:"reference"`
	Name      string `json:"name"`
	SourceUrl string `json:"source_url"`
}

type ImageDownloadListener

type ImageDownloadListener struct {
	Vault      *vault.Vault
	HttpClient core.HttpClient
}

func (*ImageDownloadListener) Handle

func (l *ImageDownloadListener) Handle(notification *pq.Notification, m core.NodeManager) (int, error)

type ImageHandler

type ImageHandler struct {
	Vault *vault.Vault
}

func (*ImageHandler) GetDownloadData

func (h *ImageHandler) GetDownloadData(node *core.Node) *core.DownloadData

func (*ImageHandler) GetStruct

func (h *ImageHandler) GetStruct() (core.NodeData, core.NodeMeta)

func (*ImageHandler) Load

func (h *ImageHandler) Load(data []byte, meta []byte, node *core.Node) error

func (*ImageHandler) PostInsert

func (h *ImageHandler) PostInsert(node *core.Node, m core.NodeManager) error

func (*ImageHandler) PostUpdate

func (h *ImageHandler) PostUpdate(node *core.Node, m core.NodeManager) error

func (*ImageHandler) PreInsert

func (h *ImageHandler) PreInsert(node *core.Node, m core.NodeManager) error

func (*ImageHandler) PreUpdate

func (h *ImageHandler) PreUpdate(node *core.Node, m core.NodeManager) error

func (*ImageHandler) StoreStream

func (h *ImageHandler) StoreStream(node *core.Node, r io.Reader) (written int64, err error)

func (*ImageHandler) Validate

func (h *ImageHandler) Validate(node *core.Node, m core.NodeManager, errors core.Errors)

type ImageMeta

type ImageMeta struct {
	Width        int      `json:"width"`
	Height       int      `json:"height"`
	Size         int      `json:"size"`
	ContentType  string   `json:"content_type"`
	Length       int      `json:"length"`
	Exif         ExifMeta `json:"exif"`
	Hash         string   `json:"hash"`
	SourceStatus int      `json:"source_status"`
	SourceError  string   `json:"source_error"`
}

type Youtube

type Youtube struct {
	Vid    string `json:"vid,omitempty"`
	Status int    `json:"status,omitempty"`
	Error  string `json:"error,omitempty"`
}

type YoutubeHandler

type YoutubeHandler struct {
}

func (*YoutubeHandler) GetDownloadData

func (h *YoutubeHandler) GetDownloadData(node *core.Node) *core.DownloadData

func (*YoutubeHandler) GetStruct

func (h *YoutubeHandler) GetStruct() (core.NodeData, core.NodeMeta)

func (*YoutubeHandler) Load

func (h *YoutubeHandler) Load(data []byte, meta []byte, node *core.Node) error

func (*YoutubeHandler) PostInsert

func (h *YoutubeHandler) PostInsert(node *core.Node, m core.NodeManager) error

func (*YoutubeHandler) PostUpdate

func (h *YoutubeHandler) PostUpdate(node *core.Node, m core.NodeManager) error

func (*YoutubeHandler) PreInsert

func (h *YoutubeHandler) PreInsert(node *core.Node, m core.NodeManager) error

func (*YoutubeHandler) PreUpdate

func (h *YoutubeHandler) PreUpdate(node *core.Node, m core.NodeManager) error

func (*YoutubeHandler) StoreStream

func (h *YoutubeHandler) StoreStream(node *core.Node, r io.Reader) (int64, error)

func (*YoutubeHandler) Validate

func (h *YoutubeHandler) Validate(node *core.Node, m core.NodeManager, errors core.Errors)

type YoutubeListener

type YoutubeListener struct {
	HttpClient core.HttpClient
}

func (*YoutubeListener) Handle

func (l *YoutubeListener) Handle(notification *pq.Notification, m core.NodeManager) (int, error)

type YoutubeMeta

type YoutubeMeta struct {
	Type            string `json:"type"`
	Html            string `json:"html"`
	Width           int    `json:"width"`
	Height          int    `json:"height"`
	Version         string `json:"version"`
	Title           string `json:"title"`
	ProviderName    string `json:"provider_name"`
	AuthorName      string `json:"author_name"`
	AuthorUrl       string `json:"author_url"`
	ProviderUrl     string `json:"provider_url"`
	ThumbnailUrl    string `json:"thumbnail_url"`
	ThumbnailWidth  int    `json:"thumbnail_width"`
	ThumbnailHeight int    `json:"thumbnail_height"`
}

Jump to

Keyboard shortcuts

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