package embeds
import "shirakumo.org/markless/embeds"
This package holds type representations for components.Option s in the components.Embed component as well as shims for the various embed types themselves. Typically you will only interact with the OptionConstructor s and Constructor s of this package to assemble valid embed options and types in the parser.
Index
- func NewAudio() directives.EmbedType
- func NewAutoplay() directives.OptionType
- func NewCaption() directives.OptionType
- func NewDescription() directives.OptionType
- func NewEncoding() directives.OptionType
- func NewEnd() directives.OptionType
- func NewFloat() directives.OptionType
- func NewHeight() directives.OptionType
- func NewImage() directives.EmbedType
- func NewLabel() directives.OptionType
- func NewLanguage() directives.OptionType
- func NewLink() directives.OptionType
- func NewLoop() directives.OptionType
- func NewOptions() directives.OptionType
- func NewSource() directives.EmbedType
- func NewStart() directives.OptionType
- func NewVideo() directives.EmbedType
- func NewWidth() directives.OptionType
- func ReadSource(file string, options []components.Option) (string, error)
- type Audio
- type Autoplay
- type Caption
- type Constructor
- type Description
- type Encoding
- type End
- type Float
- type Height
- type Image
- type Label
- type Language
- type Link
- type Loop
- type OptionConstructor
- type Options
- type Source
- type Start
- type Video
- type Width
Functions
func NewAudio
func NewAudio() directives.EmbedType
func NewAutoplay
func NewAutoplay() directives.OptionType
func NewCaption
func NewCaption() directives.OptionType
func NewDescription
func NewDescription() directives.OptionType
func NewEncoding
func NewEncoding() directives.OptionType
func NewEnd
func NewEnd() directives.OptionType
func NewFloat
func NewFloat() directives.OptionType
func NewHeight
func NewHeight() directives.OptionType
func NewImage
func NewImage() directives.EmbedType
func NewLabel
func NewLabel() directives.OptionType
func NewLanguage
func NewLanguage() directives.OptionType
func NewLink
func NewLink() directives.OptionType
func NewLoop
func NewLoop() directives.OptionType
func NewOptions
func NewOptions() directives.OptionType
func NewSource
func NewSource() directives.EmbedType
func NewStart
func NewStart() directives.OptionType
func NewVideo
func NewVideo() directives.EmbedType
func NewWidth
func NewWidth() directives.OptionType
func ReadSource
func ReadSource(file string, options []components.Option) (string, error)
Types
type Audio
type Audio struct{}
func (*Audio) Create
func (i *Audio) Create(target string, options []components.Option) *components.Embed
func (*Audio) Name
func (i *Audio) Name() string
type Autoplay
type Autoplay struct{}
func (*Autoplay) Create
func (o *Autoplay) Create(args string, p directives.Parser) components.Option
func (*Autoplay) Name
func (o *Autoplay) Name() string
type Caption
type Caption struct { Children []components.Component }
func (*Caption) Create
func (o *Caption) Create(args string, p directives.Parser) components.Option
func (*Caption) Name
func (o *Caption) Name() string
type Constructor
type Constructor func() directives.EmbedType
type Description
type Description struct { components.ValueOption }
func (*Description) Create
func (o *Description) Create(args string, p directives.Parser) components.Option
func (*Description) Name
func (o *Description) Name() string
type Encoding
type Encoding struct { components.ValueOption }
func (*Encoding) Create
func (o *Encoding) Create(args string, p directives.Parser) components.Option
func (*Encoding) Name
func (o *Encoding) Name() string
type End
type End struct { Value int }
func (*End) Create
func (o *End) Create(args string, p directives.Parser) components.Option
func (*End) Name
func (o *End) Name() string
type Float
type Float struct { components.ValueOption }
func (*Float) Create
func (o *Float) Create(args string, p directives.Parser) components.Option
func (*Float) Name
func (o *Float) Name() string
type Height
type Height struct { components.UnitOption }
func (*Height) Create
func (o *Height) Create(args string, p directives.Parser) components.Option
func (*Height) Name
func (o *Height) Name() string
type Image
type Image struct{}
func (*Image) Create
func (i *Image) Create(target string, options []components.Option) *components.Embed
func (*Image) Name
func (i *Image) Name() string
type Label
type Label struct { components.ValueOption }
func (*Label) Create
func (o *Label) Create(args string, p directives.Parser) components.Option
func (*Label) Name
func (o *Label) Name() string
type Language
type Language struct { components.ValueOption }
func (*Language) Create
func (o *Language) Create(args string, p directives.Parser) components.Option
func (*Language) Name
func (o *Language) Name() string
type Link
type Link struct { components.ValueOption }
func (*Link) Create
func (o *Link) Create(args string, p directives.Parser) components.Option
func (*Link) Name
func (o *Link) Name() string
type Loop
type Loop struct{}
func (*Loop) Create
func (o *Loop) Create(args string, p directives.Parser) components.Option
func (*Loop) Name
func (o *Loop) Name() string
type OptionConstructor
type OptionConstructor func() directives.OptionType
type Options
type Options struct { components.ValueOption }
func (*Options) Create
func (o *Options) Create(args string, p directives.Parser) components.Option
func (*Options) Name
func (o *Options) Name() string
type Source
type Source struct{}
func (*Source) Create
func (i *Source) Create(target string, options []components.Option) *components.Embed
func (*Source) Name
func (i *Source) Name() string
type Start
type Start struct { Value int }
func (*Start) Create
func (o *Start) Create(args string, p directives.Parser) components.Option
func (*Start) Name
func (o *Start) Name() string
type Video
type Video struct{}
func (*Video) Create
func (i *Video) Create(target string, options []components.Option) *components.Embed
func (*Video) Name
func (i *Video) Name() string
type Width
type Width struct { components.UnitOption }
func (*Width) Create
func (o *Width) Create(args string, p directives.Parser) components.Option
func (*Width) Name
func (o *Width) Name() string