Documentation ¶
Index ¶
- Constants
- type BaseTemplate
- type BodyTemplate1
- type BodyTemplate2
- type BodyTemplate3
- type BodyTemplate4
- type BodyTemplate5
- type Image
- type ListItem
- func (this *ListItem) SetImage(image *Image) *ListItem
- func (this *ListItem) SetImageUrl(url string) *ListItem
- func (this *ListItem) SetPlainPrimaryText(text string) *ListItem
- func (this *ListItem) SetPlainSecondaryText(text string) *ListItem
- func (this *ListItem) SetPlainTertiary(text string) *ListItem
- type ListTemplate
- type ListTemplate1
- type ListTemplate2
- type Text
- type TextImageTemplate
Constants ¶
View Source
const ( PLAIN_TEXT = "PlainText" RICH_TEXT = "RichText" )
View Source
const ( BOTTOM_LEFT_POSITION = "BOTTOM-LEFT" CENTER = "CENTER" TOP_LEFT = "TOP-LEFT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseTemplate ¶
type BaseTemplate struct { directive.BaseDirective Token string `json:"token"` BackgroundImage *Image `json:"backgroundImage,omitempty"` Title string `json:"title"` }
func (*BaseTemplate) SetBackgroundImage ¶
func (this *BaseTemplate) SetBackgroundImage(background *Image)
func (*BaseTemplate) SetBackgroundImageUrl ¶
func (this *BaseTemplate) SetBackgroundImageUrl(url string)
func (*BaseTemplate) SetTitle ¶
func (this *BaseTemplate) SetTitle(title string)
type BodyTemplate1 ¶
type BodyTemplate1 struct { BaseTemplate TextContent struct { Position string `json:"position"` Text *Text `json:"text"` } `json:"textContent"` }
func NewBodyTemplate1 ¶
func NewBodyTemplate1() *BodyTemplate1
func (*BodyTemplate1) SetContentPosition ¶
func (this *BodyTemplate1) SetContentPosition(position string) *BodyTemplate1
func (*BodyTemplate1) SetPlainContent ¶
func (this *BodyTemplate1) SetPlainContent(content string) *BodyTemplate1
type BodyTemplate2 ¶
type BodyTemplate2 struct {
TextImageTemplate
}
func NewBodyTemplate2 ¶
func NewBodyTemplate2() *BodyTemplate2
type BodyTemplate3 ¶
type BodyTemplate3 struct {
TextImageTemplate
}
func NewBodyTemplate3 ¶
func NewBodyTemplate3() *BodyTemplate3
type BodyTemplate4 ¶
type BodyTemplate4 struct {
TextImageTemplate
}
func NewBodyTemplate4 ¶
func NewBodyTemplate4() *BodyTemplate4
type BodyTemplate5 ¶
type BodyTemplate5 struct { BaseTemplate Images []*Image `json:"images"` }
func NewBodyTemplate5 ¶
func NewBodyTemplate5() *BodyTemplate5
func (*BodyTemplate5) AddImage ¶
func (this *BodyTemplate5) AddImage(image *Image) *BodyTemplate5
type Image ¶
type ListItem ¶
type ListItem struct { Token string `json:"token"` Image *Image `json:"image,omitempty"` TextContent struct { PrimaryText *Text `json:"primaryText"` SecondaryText *Text `json:"secondaryText"` TertiaryText *Text `json:"tertiaryText,omitempty"` } `json:"textContent"` }
func NewListItem ¶
func NewListItem() *ListItem
func (*ListItem) SetImageUrl ¶
func (*ListItem) SetPlainPrimaryText ¶
func (*ListItem) SetPlainSecondaryText ¶
func (*ListItem) SetPlainTertiary ¶
type ListTemplate ¶
type ListTemplate struct { BaseTemplate ListItems []*ListItem `json:"listItems"` }
func (*ListTemplate) AddItem ¶
func (this *ListTemplate) AddItem(listItem *ListItem)
type ListTemplate1 ¶
type ListTemplate1 struct {
ListTemplate
}
func NewListTemplate1 ¶
func NewListTemplate1() *ListTemplate1
type ListTemplate2 ¶
type ListTemplate2 struct {
ListTemplate
}
func NewListTemplate2 ¶
func NewListTemplate2() *ListTemplate2
type TextImageTemplate ¶
type TextImageTemplate struct { BaseTemplate Content *Text `json:"content"` Image *Image `json:"image"` }
func (*TextImageTemplate) SetImage ¶
func (this *TextImageTemplate) SetImage(image *Image)
func (*TextImageTemplate) SetImageUrl ¶
func (this *TextImageTemplate) SetImageUrl(url string)
func (*TextImageTemplate) SetPlainContent ¶
func (this *TextImageTemplate) SetPlainContent(content string)
Click to show internal directories.
Click to hide internal directories.