Documentation ¶
Index ¶
- Constants
- type Action
- type ActionOpenUrl
- type AdaptiveCard
- type BackgroundImage
- type BlockElementHeight
- type ChoiceInputStyle
- type Colors
- type Element
- type ElementImage
- type ElementMedia
- type ElementMediaSource
- type ElementOrFallbackOption
- type ElementTextBlock
- type ElementTextRun
- type Elements
- type FontSize
- type FontType
- type FontWeight
- type HorizontalAlignment
- type ISelectAction
- type ImageFillMode
- type ImageSize
- type ImageStyle
- type InputChoice
- type InputChoiceSet
- type InputDate
- type InputNumber
- type InputText
- type InputTime
- type InputToggle
- type Spacing
- type TextInputStyle
Constants ¶
View Source
const ( TypeAdaptiveCard = "AdaptiveCard" SchemaURL = "http://adaptivecards.io/schemas/adaptive-card.json" SchemaVersion13 = "1.3" )
View Source
const ( ElementTypeImage = "Image" ElementTypeMedia = "Media" ElementTypeRichTextBlock = "RichTextBlock" ElementTypeTextBlock = "TextBlock" ElementTypeTextRun = "TextRun" )
View Source
const ( TextInputStyleText TextInputStyle = "text" TextInputStyleTel = "tel" TextInputStyleURL = "url" TextInputStyleEmail = "email" )
View Source
const ( ImageFillModeCover ImageFillMode = "covers" ImageFillModeRepeatHorizontally = "repeatHorizontally" ImageFillModeRepeatVertically = "repeatVertically" ImageFillModeRepeat = "repeat" )
View Source
const (
TypeActionOpenUrl = "Action.OpenUrl"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionOpenUrl ¶
type ActionOpenUrl struct { Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` URL string `json:"url,omitempty"` }
func NewActionOpenUrl ¶
func NewActionOpenUrl(url, title string) ActionOpenUrl
func (ActionOpenUrl) Action ¶
func (action ActionOpenUrl) Action() string
type AdaptiveCard ¶
type AdaptiveCard struct { Type string `json:"type"` Version string `json:"version"` Body Elements `json:"body,omitempty"` Actions []Action `json:"actions,omitempty"` FallbackText string `json:"fallbackText,omitempty"` Lang string `json:"lang,omitempty"` MinHeight string `json:"minHeight,omitempty"` Schema string `json:"$schema,omitempty"` Speak string `json:"speak,omitempty"` }
func NewAdaptiveCard ¶
func NewAdaptiveCard() *AdaptiveCard
func Parse ¶ added in v0.3.0
func Parse(card []byte) (*AdaptiveCard, error)
func ReadFile ¶ added in v0.3.0
func ReadFile(filename string) (*AdaptiveCard, error)
func (*AdaptiveCard) Inflate ¶
func (card *AdaptiveCard) Inflate(makeVisible bool)
type BackgroundImage ¶
type BackgroundImage struct { URL string `json:"url"` FillMode ImageFillMode `json:"value"` }
type BlockElementHeight ¶
type BlockElementHeight string
const ( BlockElementHeightAuto BlockElementHeight = "auto" BlockElementHeightStretch BlockElementHeight = "stretch" )
type ChoiceInputStyle ¶
type ChoiceInputStyle string
const ( ChoiceInputStyleCompact ChoiceInputStyle = "compact" ChoiceInputStyleExpanded = "expanded" )
type ElementImage ¶
type ElementImage struct { AltText string `json:"altText,omitempty"` BackgroundColor string `json:"backgroundColor,omitempty"` Height string `json:"height,omitempty"` HorizontalAlignment HorizontalAlignment `json:"horizontalAlignment,omitempty"` SelectAction ISelectAction `json:"selectAction,omitempty"` Size ImageSize `json:"size,omitempty"` Style ImageStyle `json:"style,omitempty"` Type string `json:"type"` URL string `json:"url,omitempty"` Width string `json:"width,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` ID string `json:"id,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` }
func (ElementImage) ElementID ¶
func (el ElementImage) ElementID() string
func (ElementImage) FallbackOption ¶
func (el ElementImage) FallbackOption() bool
func (ElementImage) GetType ¶ added in v0.2.4
func (el ElementImage) GetType() string
func (ElementImage) SetVisibility ¶ added in v0.2.4
func (el ElementImage) SetVisibility(visible bool)
type ElementMedia ¶
type ElementMedia struct { Type string `json:"type"` AltText string `json:"altText,omitempty"` Poster string `json:"poster,omitempty"` Sources []ElementMediaSource `json:"sources,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` ID string `json:"id,omitempty"` IsVisible bool `json:"isVisible"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` }
func (ElementMedia) ElementID ¶
func (el ElementMedia) ElementID() string
func (ElementMedia) FallbackOption ¶
func (el ElementMedia) FallbackOption() bool
func (ElementMedia) GetType ¶ added in v0.2.5
func (el ElementMedia) GetType() string
func (ElementMedia) SetVisibility ¶ added in v0.2.4
func (el ElementMedia) SetVisibility(visible bool)
type ElementMediaSource ¶
type ElementOrFallbackOption ¶
type ElementTextBlock ¶
type ElementTextBlock struct { Type string `json:"type"` Text string `json:"text"` Color Colors `json:"color,omitempty"` FontType FontType `json:"fontType,omitempty"` HorizontalAlignment HorizontalAlignment `json:"horizontalAlignment,omitempty"` IsSubtle bool `json:"isSubtle,omitempty"` MaxLines int `json:"maxLines,omitempty"` Size FontSize `json:"size,omitempty"` Weight FontWeight `json:"weight,omitempty"` Wrap bool `json:"wrap,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` ID string `json:"id,omitempty"` IsVisible bool `json:"isVisible"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` Requires map[string]string `json:"requires,omitempty"` Width string `json:"width,omitempty"` }
func (ElementTextBlock) ElementID ¶
func (el ElementTextBlock) ElementID() string
func (ElementTextBlock) FallbackOption ¶
func (el ElementTextBlock) FallbackOption() bool
func (ElementTextBlock) GetType ¶ added in v0.2.4
func (el ElementTextBlock) GetType() string
func (ElementTextBlock) SetVisibility ¶ added in v0.2.4
func (el ElementTextBlock) SetVisibility(visible bool)
type ElementTextRun ¶
type ElementTextRun struct { Type string `json:"type"` Text string `json:"text"` Color Colors `json:"color,omitempty"` FontType FontType `json:"fontType,omitempty"` Highlight bool `json:"highlight,omitempty"` IsSubtle bool `json:"isSubtle,omitempty"` Italic bool `json:"italic,omitempty"` SelectAction ISelectAction `json:"selectAction,omitempty"` Size FontSize `json:"fontSize,omitempty"` Strikethrough bool `json:"strikethrough,omitempty"` Underline bool `json:"underline,omitempty"` Weight FontWeight `json:"fontWeight,omitempty"` }
type Elements ¶ added in v0.3.0
type Elements []Element
func (*Elements) UnmarshalJSON ¶ added in v0.3.0
type FontWeight ¶
type FontWeight string
const ( FontWeightDefault FontWeight = "" FontWeightLighter FontWeight = "Lighter" FontWeightBolder FontWeight = "Bolder" )
type HorizontalAlignment ¶
type HorizontalAlignment string
type ISelectAction ¶
type ISelectAction string
const ( ISelectActionOpenURL ISelectAction = "Action.OpenUrl" ISelectActionSubmit ISelectAction = "Action.Submit" ISelectActionToggleVisibility ISelectAction = "Action.ToggleVisibility" )
type ImageFillMode ¶
type ImageFillMode string
type ImageStyle ¶
type ImageStyle string
type InputChoice ¶
type InputChoiceSet ¶
type InputChoiceSet struct { Type string `json:"type"` // must be "Input.Date" Choices []InputChoice `json:"choices"` ID string `json:"id"` IsMultiSelect bool `json:"isMultiSelect,omitempty"` Style string `json:"style,omitempty"` Value string `json:"value,omitempty"` Placeholder string `json:"placeholder,omitempty"` Wrap bool `json:"wrap,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type InputDate ¶
type InputDate struct { Type string `json:"type"` // must be "Input.Date" ID string `json:"id"` Max string `json:"max,omitempty"` Min string `json:"min,omitempty"` Placeholder string `json:"placeholder,omitempty"` Value string `json:"value,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type InputNumber ¶
type InputNumber struct { Type string `json:"type"` // must be "Input.Date" ID string `json:"id"` Max int `json:"max,omitempty"` Min int `json:"min,omitempty"` Placeholder string `json:"placeholder,omitempty"` Value int `json:"value,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type InputText ¶
type InputText struct { Type string `json:"type"` // must be "Input.Date" ID string `json:"id"` IsMultiline string `json:"isMultiline,omitempty"` MaxLength int `json:"maxLength,omitempty"` Placeholder string `json:"placeholder,omitempty"` Regex string `json:"regex,omitempty"` Style TextInputStyle `json:"style,omitempty"` InlineAction ISelectAction `json:"inlineAction,omitempty"` Value string `json:"value,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type InputTime ¶
type InputTime struct { Type string `json:"type"` // must be "Input.Date" ID string `json:"id"` Max string `json:"max,omitempty"` Min string `json:"min,omitempty"` Placeholder string `json:"placeholder,omitempty"` Value string `json:"value,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type InputToggle ¶
type InputToggle struct { Type string `json:"type"` // must be "Input.Date" Title string `json:"title"` ID string `json:"id"` Value string `json:"value,omitempty"` ValueOff string `json:"valueOff,omitempty"` ValueOn string `json:"valueOn,omitempty"` Wrap string `json:"wrap,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` IsRequired bool `json:"isRequired"` Label string `json:"label,omitempty"` Fallback ElementOrFallbackOption `json:"fallback,omitempty"` Height BlockElementHeight `json:"height,omitempty"` Separator bool `json:"separator,omitempty"` Spacing Spacing `json:"spacing,omitempty"` IsVisible bool `json:"isVisible"` Requires map[string]string `json:"requires,omitempty"` }
type TextInputStyle ¶
type TextInputStyle string
Source Files ¶
- action.go
- action_openurl.go
- adaptivecard.go
- constants_common.go
- element.go
- element_fallbackoption.go
- element_image.go
- element_media.go
- element_mediasource.go
- element_textblock.go
- element_textrun.go
- input_choice.go
- input_date.go
- input_number.go
- input_text.go
- input_time.go
- input_toggle.go
- type_backgroundimage.go
Click to show internal directories.
Click to hide internal directories.