media

package
v0.0.0-...-02bf5d9 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateParser

type AggregateParser struct {
	Parsers []MediaParser
}

func (*AggregateParser) Parse

func (p *AggregateParser) Parse(url string) MediaLink
type MediaLink interface {
	EmbedCode() template.HTML
	Key() string
	URL() string
}

type MediaLinkSlice

type MediaLinkSlice []MediaLink

func (MediaLinkSlice) Deduplicate

func (cl MediaLinkSlice) Deduplicate() MediaLinkSlice

type MediaParser

type MediaParser interface {
	Parse(url string) MediaLink
}

func DefaultParser

func DefaultParser() MediaParser
type YoutubeLink struct {
	ID string
}

func (*YoutubeLink) EmbedCode

func (l *YoutubeLink) EmbedCode() template.HTML

func (*YoutubeLink) Key

func (l *YoutubeLink) Key() string

func (*YoutubeLink) URL

func (l *YoutubeLink) URL() string

type YoutubeParser

type YoutubeParser struct {
}

func (*YoutubeParser) Parse

func (p *YoutubeParser) Parse(url string) MediaLink

Jump to

Keyboard shortcuts

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