Documentation
¶
Overview ¶
Package disgobed wraps the discordgo embed with helper functions to facilitate easier construction. Note that all methods in this module act ByReference, directly changing the embed they are called on, instead of creating and returning a new embed
Index ¶
- type AuthorBuilder
- func (a *AuthorBuilder) Finalize() (*disgord.EmbedAuthor, *[]error)
- func (a *AuthorBuilder) SetIconURL(iconUrl string) *AuthorBuilder
- func (a *AuthorBuilder) SetName(name string) *AuthorBuilder
- func (a *AuthorBuilder) SetProxyIconURL(proxyIconUrl string) *AuthorBuilder
- func (a *AuthorBuilder) SetURL(url string) *AuthorBuilder
- type EmbedBuilder
- func (e *EmbedBuilder) AddField(field *FieldBuilder) *EmbedBuilder
- func (e *EmbedBuilder) AddFields(fields ...*FieldBuilder) *EmbedBuilder
- func (e *EmbedBuilder) AddRawField(field *disgord.EmbedField) *EmbedBuilder
- func (e *EmbedBuilder) AddRawFields(fields ...*disgord.EmbedField) *EmbedBuilder
- func (e *EmbedBuilder) Finalize() (*disgord.Embed, *[]error)
- func (e *EmbedBuilder) Generate() *disgord.Embed
- func (e *EmbedBuilder) InlineAllFields() *EmbedBuilder
- func (e *EmbedBuilder) OutlineAllFields() *EmbedBuilder
- func (e *EmbedBuilder) SetAuthor(author *AuthorBuilder) *EmbedBuilder
- func (e *EmbedBuilder) SetColor(color int) *EmbedBuilder
- func (e *EmbedBuilder) SetCurrentTimestamp() *EmbedBuilder
- func (e *EmbedBuilder) SetCustomTimestamp(t time.Time) *EmbedBuilder
- func (e *EmbedBuilder) SetDescription(desc string) *EmbedBuilder
- func (e *EmbedBuilder) SetFooter(footer *FooterBuilder) *EmbedBuilder
- func (e *EmbedBuilder) SetImage(img *ImageBuilder) *EmbedBuilder
- func (e *EmbedBuilder) SetProvider(provider *ProviderBuilder) *EmbedBuilder
- func (e *EmbedBuilder) SetRawAuthor(author *disgord.EmbedAuthor) *EmbedBuilder
- func (e *EmbedBuilder) SetRawFooter(footer *disgord.EmbedFooter) *EmbedBuilder
- func (e *EmbedBuilder) SetRawImage(img *disgord.EmbedImage) *EmbedBuilder
- func (e *EmbedBuilder) SetRawProvider(provider *disgord.EmbedProvider) *EmbedBuilder
- func (e *EmbedBuilder) SetRawThumbnail(thumb *disgord.EmbedThumbnail) *EmbedBuilder
- func (e *EmbedBuilder) SetRawVideo(vid *disgord.EmbedVideo) *EmbedBuilder
- func (e *EmbedBuilder) SetThumbnail(thumb *ThumbnailBuilder) *EmbedBuilder
- func (e *EmbedBuilder) SetTitle(title string) *EmbedBuilder
- func (e *EmbedBuilder) SetType(embedType string) *EmbedBuilder
- func (e *EmbedBuilder) SetURL(url string) *EmbedBuilder
- func (e *EmbedBuilder) SetVideo(vid *VideoBuilder) *EmbedBuilder
- func (e *EmbedBuilder) Validate(msg *disgord.Message) *[]error
- type FieldBuilder
- type FooterBuilder
- type ImageBuilder
- func (i *ImageBuilder) Finalize() (*disgord.EmbedImage, *[]error)
- func (i *ImageBuilder) SetHW(h int, w int) *ImageBuilder
- func (i *ImageBuilder) SetHeight(h int) *ImageBuilder
- func (i *ImageBuilder) SetProxyURL(proxyUrl string) *ImageBuilder
- func (i *ImageBuilder) SetURL(url string) *ImageBuilder
- func (i *ImageBuilder) SetWidth(w int) *ImageBuilder
- type ProviderBuilder
- type ThumbnailBuilder
- func (t *ThumbnailBuilder) Finalize() (*disgord.EmbedThumbnail, *[]error)
- func (t *ThumbnailBuilder) SetHW(h int, w int) *ThumbnailBuilder
- func (t *ThumbnailBuilder) SetHeight(h int) *ThumbnailBuilder
- func (t *ThumbnailBuilder) SetProxyURL(proxyUrl string) *ThumbnailBuilder
- func (t *ThumbnailBuilder) SetURL(url string) *ThumbnailBuilder
- func (t *ThumbnailBuilder) SetWidth(w int) *ThumbnailBuilder
- type VideoBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorBuilder ¶
type AuthorBuilder struct {
*disgord.EmbedAuthor
Errors *[]error
}
AuthorBuilder wraps the discordgo.MessageEmbedAuthor type and adds features
func NewAuthor ¶
func NewAuthor() *AuthorBuilder
NewAuthor creates and returns a blank author struct
func (*AuthorBuilder) Finalize ¶
func (a *AuthorBuilder) Finalize() (*disgord.EmbedAuthor, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before an author is sent. Finalize will also purge the error cache!
func (*AuthorBuilder) SetIconURL ¶
func (a *AuthorBuilder) SetIconURL(iconUrl string) *AuthorBuilder
SetIconURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the AuthorBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the AuthorBuilder structure (This function fails silently)
func (*AuthorBuilder) SetName ¶
func (a *AuthorBuilder) SetName(name string) *AuthorBuilder
SetName takes a string and sets the AuthorBuilder's name to that value. It then returns the pointer to the AuthorBuilder. The discord API limits AuthorBuilder names to 256 characters, so this function will do nothing if len(name) > 256 (This function fails silently)
func (*AuthorBuilder) SetProxyIconURL ¶
func (a *AuthorBuilder) SetProxyIconURL(proxyIconUrl string) *AuthorBuilder
SetProxyIconURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the AuthorBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the AuthorBuilder structure (This function fails silently)
func (*AuthorBuilder) SetURL ¶
func (a *AuthorBuilder) SetURL(url string) *AuthorBuilder
SetURL sets the author field link to the value given, then returns the pointer to the AuthorBuilder
type EmbedBuilder ¶
EmbedBuilder wraps the disgord.EmbedBuilder type and adds features. Never create it directly, instead use the NewEmbed function
embed := NewEmbed()
and call the methods to set the properties, allowing for chains that look like this
embed := NewEmbed() .SetTitle(`example`) .SetDescription(`test`) .SetURL(`example.com`) .Finalize()
for healthy embedment!
func (*EmbedBuilder) AddField ¶
func (e *EmbedBuilder) AddField(field *FieldBuilder) *EmbedBuilder
AddField takes a FieldBuilder structure and adds it to the embed, then returns the pointer to the embed. Note that the FieldBuilder structure is `Finalize`d once added and should not be changed after being added. The discord API limits embeds to having 25 Fields, so this function will not add any fields if the limit has already been reached. All errors are propagated to the main embed (This function fails silently)
func (*EmbedBuilder) AddFields ¶
func (e *EmbedBuilder) AddFields(fields ...*FieldBuilder) *EmbedBuilder
AddFields takes N FieldBuilder structures and adds them to the embed, then returns the pointer to the embed. Note that FieldBuilder structures are `Finalize`d once added and should not be changed after being added. The discord API limits embeds to having 25 Fields, so this function will add the first items from the list until that limit is reached (This function fails silently)
func (*EmbedBuilder) AddRawField ¶
func (e *EmbedBuilder) AddRawField(field *disgord.EmbedField) *EmbedBuilder
AddRawField takes a disgord.EmbedField structure and adds it to the embed, then returns the pointer to the embed. The discord API limits embeds to having 25 Fields, so this function will not add any fields if the limit has already been reached (This function fails silently)
func (*EmbedBuilder) AddRawFields ¶
func (e *EmbedBuilder) AddRawFields(fields ...*disgord.EmbedField) *EmbedBuilder
AddRawFields takes N disgord.EmbedField structures and adds them to the embed, then returns the pointer to the embed. The discord API limits embeds to having 25 Fields, so this function will add the first items from the list until that limit is reached (This function fails silently)
func (*EmbedBuilder) Finalize ¶
func (e *EmbedBuilder) Finalize() (*disgord.Embed, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before an embed is sent. Finalize will also purge the error cache!
func (*EmbedBuilder) Generate ¶
func (e *EmbedBuilder) Generate() *disgord.Embed
Generate strips aways the extra functions and returns the wrapped type without the cached validation errors. Allows for immediate addition to a message. This method does not purge the error cache
func (*EmbedBuilder) InlineAllFields ¶
func (e *EmbedBuilder) InlineAllFields() *EmbedBuilder
InlineAllFields sets the Inline property on all currently attached fields to true and returns the pointer to the embed
func (*EmbedBuilder) OutlineAllFields ¶
func (e *EmbedBuilder) OutlineAllFields() *EmbedBuilder
OutlineAllFields sets the Inline property on all currently attached fields to false and returns the pointer to the embed
func (*EmbedBuilder) SetAuthor ¶
func (e *EmbedBuilder) SetAuthor(author *AuthorBuilder) *EmbedBuilder
SetAuthor takes an AuthorBuilder structure and sets the embed's author field to it, then returns the pointer to the embed. Note that the AuthorBuilder structure is `Finalize`d once added and should not be changed after being added. All errors are propagated to the main embed
func (*EmbedBuilder) SetColor ¶
func (e *EmbedBuilder) SetColor(color int) *EmbedBuilder
SetColor edits the embed's highlight colour and returns the pointer to the embed. Color values must be between 0 and 16777215 otherwise the change will not be registered (This function fails silently)
func (*EmbedBuilder) SetCurrentTimestamp ¶
func (e *EmbedBuilder) SetCurrentTimestamp() *EmbedBuilder
SetCurrentTimestamp sets the embed's timestamp to the current UTC time in the appropriate discord format and returns the pointer to the embed
func (*EmbedBuilder) SetCustomTimestamp ¶
func (e *EmbedBuilder) SetCustomTimestamp(t time.Time) *EmbedBuilder
SetCustomTimestamp sets the embed's timestamp to that specified by the time.Time structure passed to it. The value stored is the corresponding UTC time in the appropriate discord format. SetCustomTimestamp returns the pointer to the embed
func (*EmbedBuilder) SetDescription ¶
func (e *EmbedBuilder) SetDescription(desc string) *EmbedBuilder
SetDescription edits the embed's description and returns the pointer to the embed. The discord API limits embed descriptions to 2048 characters, so this function will do nothing if len(desc) > 2048 (This function fails silently)
func (*EmbedBuilder) SetFooter ¶
func (e *EmbedBuilder) SetFooter(footer *FooterBuilder) *EmbedBuilder
SetFooter sets the embed's footer property to the FooterBuilder passed to it, then returns the pointer to the embed. Note that the FooterBuilder structure is `Finalize`d once added and should not be changed after being added. FooterBuilder errors will be propagated into the embed struct
func (*EmbedBuilder) SetImage ¶
func (e *EmbedBuilder) SetImage(img *ImageBuilder) *EmbedBuilder
SetImage sets the embed's image property to the ImageBuilder passed to it, then returns the pointer to the embed. Note that the ImageBuilder structure is `Finalize`d once added and should not be changed after being added. ImageBuilder errors will be propagated into the embed struct
func (*EmbedBuilder) SetProvider ¶
func (e *EmbedBuilder) SetProvider(provider *ProviderBuilder) *EmbedBuilder
SetProvider allows you to set the provider of an embed. It will then return the pointer to the embed. See the providerBuilder.go docs for some extra information
func (*EmbedBuilder) SetRawAuthor ¶
func (e *EmbedBuilder) SetRawAuthor(author *disgord.EmbedAuthor) *EmbedBuilder
SetRawAuthor takes a disgord.EmbedAuthor and sets the embed's author field to it, then returns the pointer to the embed
func (*EmbedBuilder) SetRawFooter ¶
func (e *EmbedBuilder) SetRawFooter(footer *disgord.EmbedFooter) *EmbedBuilder
SetRawFooter takes a disgord.EmbedThumbnail and sets the embed's thumbnail field to it, then returns the pointer to the embed
func (*EmbedBuilder) SetRawImage ¶
func (e *EmbedBuilder) SetRawImage(img *disgord.EmbedImage) *EmbedBuilder
SetRawImage takes a disgord.EmbedImage and sets the embed's image field to it, then returns the pointer to the embed
func (*EmbedBuilder) SetRawProvider ¶
func (e *EmbedBuilder) SetRawProvider(provider *disgord.EmbedProvider) *EmbedBuilder
SetRawProvider allows you to set the disgord.EmbedProvider of an embed. It will then return the pointer to the embed. See the providerBuilder.go docs for some extra information
func (*EmbedBuilder) SetRawThumbnail ¶
func (e *EmbedBuilder) SetRawThumbnail(thumb *disgord.EmbedThumbnail) *EmbedBuilder
SetRawThumbnail takes a disgord.EmbedThumbnail and sets the embed's thumbnail field to it, then returns the pointer to the embed
func (*EmbedBuilder) SetRawVideo ¶
func (e *EmbedBuilder) SetRawVideo(vid *disgord.EmbedVideo) *EmbedBuilder
SetRawVideo takes a disgord.EmbedVideo and sets the embed's thumbnail field to it, then returns the pointer to the embed
func (*EmbedBuilder) SetThumbnail ¶
func (e *EmbedBuilder) SetThumbnail(thumb *ThumbnailBuilder) *EmbedBuilder
SetThumbnail takes a ThumbnailBuilder structure and sets the embed's thumbnail field to it, then returns the pointer to the embed. Note that the ThumbnailBuilder structure is `Finalize`d once added and should not be changed after being added
func (*EmbedBuilder) SetTitle ¶
func (e *EmbedBuilder) SetTitle(title string) *EmbedBuilder
SetTitle edits the embed's title and returns the pointer to the embed. The discord API limits embed titles to 256 characters, so this function will do nothing if len(title) > 256 (This function fails silently)
func (*EmbedBuilder) SetType ¶
func (e *EmbedBuilder) SetType(embedType string) *EmbedBuilder
SetType checks if the embed type passed to it is valid. If it is, it sets the embed's type to that, otherwise it does nothing. It then returns the pointer to the embed (This function fails silently)
func (*EmbedBuilder) SetURL ¶
func (e *EmbedBuilder) SetURL(url string) *EmbedBuilder
SetURL edits the embed's main URL and returns the pointer to the embed
func (*EmbedBuilder) SetVideo ¶
func (e *EmbedBuilder) SetVideo(vid *VideoBuilder) *EmbedBuilder
SetVideo sets the embed's video property to the VideoBuilder passed to it, then returns the pointer to the embed. Note that the VideoBuilder structure is `Finalize`d once added and should not be changed after being added
func (*EmbedBuilder) Validate ¶
func (e *EmbedBuilder) Validate(msg *disgord.Message) *[]error
Validate returns whether or not discord is likely accept the embed attached to it. If discord is unlikely to accept the embed, it returns a list of reasons why. If msg is not nil, the checker will also validate `attachment://` urls message
type FieldBuilder ¶
type FieldBuilder struct {
*disgord.EmbedField
Errors *[]error
}
FieldBuilder wraps the disgord.EmbedField type and adds features
func (*FieldBuilder) Finalize ¶
func (f *FieldBuilder) Finalize() (*disgord.EmbedField, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before a field is added. Finalize will also purge the error cache!
func (*FieldBuilder) SetInline ¶
func (f *FieldBuilder) SetInline(isInline bool) *FieldBuilder
SetInline sets whether the field is inline or not then returns the pointer to the FieldBuilder
func (*FieldBuilder) SetName ¶
func (f *FieldBuilder) SetName(name string) *FieldBuilder
SetName sets the name of the field then returns the pointer to the FieldBuilder. The discord API limits FieldBuilder names to 256 characters, so this function will do nothing if len(name) > 256. FieldBuilder names must also not be empty, so this function will do nothing if name == “ (This function fails silently)
func (*FieldBuilder) SetValue ¶
func (f *FieldBuilder) SetValue(val string) *FieldBuilder
SetValue sets the value of the field then returns the pointer to the FieldBuilder. The discord API limits FieldBuilder values to 1024 characters, so this function will do nothing if len(name) > 1024. FieldBuilder values must not be empty, so this function will do nothing if val == “ (This function fails silently)
type FooterBuilder ¶
type FooterBuilder struct {
}
FooterBuilder wraps the disgord.EmbedFooter type and adds features
func (*FooterBuilder) Finalize ¶
func (f *FooterBuilder) Finalize() (*disgord.EmbedFooter, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before a footer is attached. Finalize will also purge the error cache!
func (*FooterBuilder) SetIconURL ¶
func (f *FooterBuilder) SetIconURL(iconUrl string) *FooterBuilder
SetIconURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the FooterBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the FooterBuilder structure (This function fails silently)
func (*FooterBuilder) SetProxyIconURL ¶
func (f *FooterBuilder) SetProxyIconURL(proxyIconUrl string) *FooterBuilder
SetProxyIconURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the FooterBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the FooterBuilder structure (This function fails silently)
func (*FooterBuilder) SetText ¶
func (f *FooterBuilder) SetText(val string) *FooterBuilder
SetText takes a string and sets the FooterBuilder's text to that value. It then returns the pointer to the FooterBuilder. The discord API limits FooterBuilder values to 2048 characters, so this function will do nothing if len(val) > 2048 (This function fails silently)
type ImageBuilder ¶
type ImageBuilder struct {
*disgord.EmbedImage
Errors *[]error
}
ImageBuilder wraps the disgord.EmbedImage type and adds features
func (*ImageBuilder) Finalize ¶
func (i *ImageBuilder) Finalize() (*disgord.EmbedImage, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before an image is sent. Finalize will also purge the error cache!
func (*ImageBuilder) SetHW ¶
func (i *ImageBuilder) SetHW(h int, w int) *ImageBuilder
SetHW sets the image embed height and width to the values given then returns a pointer to the ImageBuilder structure. If either h <= 0 or w <= 0, this operation does nothing (This function fails silently)
func (*ImageBuilder) SetHeight ¶
func (i *ImageBuilder) SetHeight(h int) *ImageBuilder
SetHeight sets the image embed height to the value given then returns a pointer to the ImageBuilder structure. If h <= 0, this operation does nothing (This function fails silently)
func (*ImageBuilder) SetProxyURL ¶
func (i *ImageBuilder) SetProxyURL(proxyUrl string) *ImageBuilder
SetProxyURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the ImageBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the ImageBuilder structure (This function fails silently)
func (*ImageBuilder) SetURL ¶
func (i *ImageBuilder) SetURL(url string) *ImageBuilder
SetURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the ImageBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the ImageBuilder structure (This function fails silently)
func (*ImageBuilder) SetWidth ¶
func (i *ImageBuilder) SetWidth(w int) *ImageBuilder
SetWidth sets the image embed width to the value given then returns a pointer to the ImageBuilder structure. If w <= 0, this operation does nothing (This function fails silently)
type ProviderBuilder ¶
type ProviderBuilder struct {
*disgord.EmbedProvider
Errors *[]error
}
ProviderBuilder wraps the disgord.EmbedProvider type and adds features. ProviderBuilder is an esoteric part of the discord API, and is likely to be deprecated in a future version. It is recommended you don't use it... Use at your own risk. No ProviderBuilder fields are validated
func NewProvider ¶
func NewProvider() *ProviderBuilder
NewProvider creates and returns a pointer to an empty provider struct
func (*ProviderBuilder) Finalize ¶
func (p *ProviderBuilder) Finalize() (*disgord.EmbedProvider, *[]error)
Finalize strips away the extra functions and returns the wrapped type. ProviderBuilder does not perform validation on inputs, so Finalize() should always return nil for its errors
func (*ProviderBuilder) SetName ¶
func (p *ProviderBuilder) SetName(name string) *ProviderBuilder
SetName sets the provider's Name field and returns the pointer to the ProviderBuilder
func (*ProviderBuilder) SetURL ¶
func (p *ProviderBuilder) SetURL(url string) *ProviderBuilder
SetURL sets the provider's URL field and returns the pointer to the ProviderBuilder
type ThumbnailBuilder ¶
type ThumbnailBuilder struct {
*disgord.EmbedThumbnail
Errors *[]error
}
ThumbnailBuilder wraps the disgord.EmbedThumbnail type and adds features
func NewThumbnail ¶
func NewThumbnail() *ThumbnailBuilder
NewThumbnail creates and returns a pointer to a new empty thumbnail
func (*ThumbnailBuilder) Finalize ¶
func (t *ThumbnailBuilder) Finalize() (*disgord.EmbedThumbnail, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before an thumbnail is attached. Finalize will also purge the error cache!
func (*ThumbnailBuilder) SetHW ¶
func (t *ThumbnailBuilder) SetHW(h int, w int) *ThumbnailBuilder
SetHW sets the ThumbnailBuilder embed height and width to the values given then returns a pointer to the ThumbnailBuilder structure. If either h <= 0 or w <= 0, this operation does nothing (This function fails silently)
func (*ThumbnailBuilder) SetHeight ¶
func (t *ThumbnailBuilder) SetHeight(h int) *ThumbnailBuilder
SetHeight sets the ThumbnailBuilder embed height to the value given then returns a pointer to the ThumbnailBuilder structure. If h <= 0, this operation does nothing (This function fails silently)
func (*ThumbnailBuilder) SetProxyURL ¶
func (t *ThumbnailBuilder) SetProxyURL(proxyUrl string) *ThumbnailBuilder
SetProxyURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the ThumbnailBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the ThumbnailBuilder structure (This function fails silently)
func (*ThumbnailBuilder) SetURL ¶
func (t *ThumbnailBuilder) SetURL(url string) *ThumbnailBuilder
SetURL takes an image address string prefixed with https:// / http:// / attachment:// and adds it to the ThumbnailBuilder (if the string does not start with one of these, no URL will be added). It then returns the pointer to the ThumbnailBuilder structure (This function fails silently)
func (*ThumbnailBuilder) SetWidth ¶
func (t *ThumbnailBuilder) SetWidth(w int) *ThumbnailBuilder
SetWidth sets the ThumbnailBuilder embed width to the value given then returns a pointer to the ThumbnailBuilder structure. If w <= 0, this operation does nothing (This function fails silently)
type VideoBuilder ¶
type VideoBuilder struct {
*disgord.EmbedVideo
Errors *[]error
}
VideoBuilder wraps the disgord.EmbedVideo type and adds features. This wrapper ignores MessageEmbedVideo.ProxyURL as the API would ignore that field if present
func (*VideoBuilder) Finalize ¶
func (v *VideoBuilder) Finalize() (*disgord.EmbedVideo, *[]error)
Finalize strips away the extra functions and returns the wrapped type. It should always be called before an thumbnail is attached. Finalize will also purge the error cache!
func (*VideoBuilder) SetHW ¶
func (v *VideoBuilder) SetHW(h int, w int) *VideoBuilder
SetHW sets the video embed height and width to the values given then returns a pointer to the VideoBuilder structure. If either h <= 0 or w <= 0, this operation does nothing (This function fails silently)
func (*VideoBuilder) SetHeight ¶
func (v *VideoBuilder) SetHeight(h int) *VideoBuilder
SetHeight sets the video embed height to the value given then returns a pointer to the VideoBuilder structure. If h <= 0, this operation does nothing (This function fails silently)
func (*VideoBuilder) SetURL ¶
func (v *VideoBuilder) SetURL(url string) *VideoBuilder
SetURL sets the video source url to the value given to it then returns a pointer to the VideoBuilder structure
func (*VideoBuilder) SetWidth ¶
func (v *VideoBuilder) SetWidth(w int) *VideoBuilder
SetWidth sets the video embed width to the value given then returns a pointer to the VideoBuilder structure. If w <= 0, this operation does nothing (This function fails silently)