Documentation ¶
Index ¶
- Constants
- type Action
- type ActionBuilder
- func (builder *ActionBuilder) BuildAddTagAction(tagName string) *Action
- func (builder *ActionBuilder) BuildRemoveTagAction(tagName string) *Action
- func (builder *ActionBuilder) BuildSetFieldValueAction(fieldName string, value interface{}) *Action
- func (builder *ActionBuilder) BuildUnsetFieldValueAction(fieldName string) *Action
- type Button
- type ButtonsBuilder
- func (builder *ButtonsBuilder) BuildBuyButton(caption string, customer Customer, product Product, successTarget string) *Button
- func (builder *ButtonsBuilder) BuildCallButton(caption string, phone string) *Button
- func (builder *ButtonsBuilder) BuildCallbackButton(caption string, url string, method string, headers interface{}, ...) *Button
- func (builder *ButtonsBuilder) BuildFlowButton(caption string, target string) *Button
- func (builder *ButtonsBuilder) BuildNodeButton(caption string, target string) *Button
- func (builder *ButtonsBuilder) BuildUrlButton(caption string, url string, webViewSize string) *Button
- type Customer
- type DynamicBlock
- func (dynamicBlock *DynamicBlock) AddAction(action *Action)
- func (dynamicBlock *DynamicBlock) AddActions(actions []*Action)
- func (dynamicBlock *DynamicBlock) AddMessage(message *Message)
- func (dynamicBlock *DynamicBlock) AddMessages(messages []*Message)
- func (dynamicBlock *DynamicBlock) AddQuickReplies(quickReplies []*QuickReply)
- func (dynamicBlock *DynamicBlock) AddQuickReply(quickReply *QuickReply)
- type DynamicBlockBuilder
- type ExternalMessage
- type ExternalMessageBuilder
- type Gallery
- type GalleryBuilder
- type GalleryCard
- type Message
- type MessageBuilder
- func (builder *MessageBuilder) BuildAudioMessage(url string) *Message
- func (builder *MessageBuilder) BuildFileMessage(url string) *Message
- func (builder *MessageBuilder) BuildGalleryMessage(gallery *Gallery) *Message
- func (builder *MessageBuilder) BuildImageMessage(url string) *Message
- func (builder *MessageBuilder) BuildTextMessage(text string) *Message
- func (builder *MessageBuilder) BuildVideoMessage(url string) *Message
- type Product
- type QuickReply
- type QuickReplyBuilder
- func (builder *QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply(caption string, url string, method string, headers interface{}, ...) *QuickReply
- func (builder *QuickReplyBuilder) BuildFlowQuickReply(caption string, target string) *QuickReply
- func (builder *QuickReplyBuilder) BuildNodeQuickReply(caption string, target string) *QuickReply
Constants ¶
View Source
const ( ActionAddTag string = "add_tag" ActionRemoveTag string = "remove_tag" ActionSetFieldValue string = "set_field_value" ActionUnsetFieldValue string = "unset_field_value" )
View Source
const ( ButtonTypeCall string = "call" ButtonTypeUrl string = "url" ButtonTypeFlow string = "flow" ButtonTypeNode string = "node" ButtonTypeBuy string = "buy" ButtonTypeDynamicBlockCallback string = "dynamic_block_callback" )
View Source
const ( WebViewSizeFull string = "full" WebViewSizeMedium string = "medium" WebViewSizeCompact string = "compact" )
View Source
const ( ImageAspectRatioHorizontal string = "horizontal" ImageAspectRationSquare string = "square" )
View Source
const ( MessageTypeText string = "text" MessageTypeImage string = "image" MessageTypeVideo string = "video" MessageTypeAudio string = "audio" MessageTypeFile string = "file" MessageTypeCards string = "cards" )
View Source
const ( QuickReplyTypeNode string = "node" QuickReplyTypeFlow string = "flow" QuickReplyTypeDynamicBlockCallback string = "dynamic_block_callback" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionBuilder ¶
type ActionBuilder struct{}
func (*ActionBuilder) BuildAddTagAction ¶
func (builder *ActionBuilder) BuildAddTagAction(tagName string) *Action
func (*ActionBuilder) BuildRemoveTagAction ¶
func (builder *ActionBuilder) BuildRemoveTagAction(tagName string) *Action
func (*ActionBuilder) BuildSetFieldValueAction ¶
func (builder *ActionBuilder) BuildSetFieldValueAction(fieldName string, value interface{}) *Action
func (*ActionBuilder) BuildUnsetFieldValueAction ¶
func (builder *ActionBuilder) BuildUnsetFieldValueAction(fieldName string) *Action
type Button ¶
type Button struct { Type string `json:"type"` Caption string `json:"caption"` Phone string `json:"phone,omitempty"` Url string `json:"url,omitempty"` Method string `json:"method,omitempty"` WebViewSize string `json:"web_view_size,omitempty"` Target string `json:"target,omitempty"` Customer Customer `json:"customer,omitempty"` Product Product `json:"product,omitempty"` SuccessTarget string `json:"success_target,omitempty"` Headers interface{} `json:"headers,omitempty"` Payload interface{} `json:"payload,omitempty"` }
type ButtonsBuilder ¶
type ButtonsBuilder struct{}
func (*ButtonsBuilder) BuildBuyButton ¶
func (*ButtonsBuilder) BuildCallButton ¶
func (builder *ButtonsBuilder) BuildCallButton(caption string, phone string) *Button
func (*ButtonsBuilder) BuildCallbackButton ¶
func (builder *ButtonsBuilder) BuildCallbackButton(caption string, url string, method string, headers interface{}, payload interface{}) *Button
func (*ButtonsBuilder) BuildFlowButton ¶
func (builder *ButtonsBuilder) BuildFlowButton(caption string, target string) *Button
func (*ButtonsBuilder) BuildNodeButton ¶
func (builder *ButtonsBuilder) BuildNodeButton(caption string, target string) *Button
func (*ButtonsBuilder) BuildUrlButton ¶
func (builder *ButtonsBuilder) BuildUrlButton(caption string, url string, webViewSize string) *Button
type DynamicBlock ¶
type DynamicBlock struct { Version string `json:"version"` Content struct { Messages []*Message `json:"messages"` Actions []*Action `json:"actions,omitempty"` QuickReplies []*QuickReply `json:"quick_replies,omitempty"` } `json:"content"` }
func (*DynamicBlock) AddAction ¶
func (dynamicBlock *DynamicBlock) AddAction(action *Action)
func (*DynamicBlock) AddActions ¶
func (dynamicBlock *DynamicBlock) AddActions(actions []*Action)
func (*DynamicBlock) AddMessage ¶
func (dynamicBlock *DynamicBlock) AddMessage(message *Message)
func (*DynamicBlock) AddMessages ¶
func (dynamicBlock *DynamicBlock) AddMessages(messages []*Message)
func (*DynamicBlock) AddQuickReplies ¶
func (dynamicBlock *DynamicBlock) AddQuickReplies(quickReplies []*QuickReply)
func (*DynamicBlock) AddQuickReply ¶
func (dynamicBlock *DynamicBlock) AddQuickReply(quickReply *QuickReply)
type DynamicBlockBuilder ¶
type DynamicBlockBuilder struct { Messages *MessageBuilder Buttons *ButtonsBuilder Actions *ActionBuilder QuickReply *QuickReplyBuilder Gallery *GalleryBuilder ExternalMessage *ExternalMessageBuilder }
func NewDynamicBlockBuilder ¶
func NewDynamicBlockBuilder() *DynamicBlockBuilder
func (*DynamicBlockBuilder) BuildDynamicBlock ¶
func (builder *DynamicBlockBuilder) BuildDynamicBlock() *DynamicBlock
type ExternalMessage ¶
type ExternalMessageBuilder ¶
type ExternalMessageBuilder struct{}
func (*ExternalMessageBuilder) BuildExternalMessage ¶
func (builder *ExternalMessageBuilder) BuildExternalMessage(url string, method string, headers interface{}, payload interface{}, timeout int64) *ExternalMessage
type Gallery ¶
type Gallery struct { Elements []*GalleryCard `json:"elements"` // contains filtered or unexported fields }
func (*Gallery) AddGalleryCard ¶
func (*Gallery) GetImageAspectRation ¶
func (*Gallery) SetImageAspectRation ¶
type GalleryBuilder ¶
type GalleryBuilder struct{}
func (*GalleryBuilder) NewGallery ¶
func (builder *GalleryBuilder) NewGallery() *Gallery
type GalleryCard ¶
type Message ¶
type Message struct { Type string `json:"type"` Text string `json:"text,omitempty"` Url string `json:"url,omitempty"` Buttons []*Button `json:"buttons,omitempty"` Elements []*GalleryCard `json:"elements,omitempty"` ImageAspectRatio string `json:"image_aspect_ratio"` }
func (*Message) AddButtons ¶
type MessageBuilder ¶
type MessageBuilder struct{}
func (*MessageBuilder) BuildAudioMessage ¶
func (builder *MessageBuilder) BuildAudioMessage(url string) *Message
func (*MessageBuilder) BuildFileMessage ¶
func (builder *MessageBuilder) BuildFileMessage(url string) *Message
func (*MessageBuilder) BuildGalleryMessage ¶
func (builder *MessageBuilder) BuildGalleryMessage(gallery *Gallery) *Message
func (*MessageBuilder) BuildImageMessage ¶
func (builder *MessageBuilder) BuildImageMessage(url string) *Message
func (*MessageBuilder) BuildTextMessage ¶
func (builder *MessageBuilder) BuildTextMessage(text string) *Message
func (*MessageBuilder) BuildVideoMessage ¶
func (builder *MessageBuilder) BuildVideoMessage(url string) *Message
type QuickReply ¶
type QuickReplyBuilder ¶
type QuickReplyBuilder struct{}
func (*QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply ¶
func (builder *QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply(caption string, url string, method string, headers interface{}, payload interface{}) *QuickReply
func (*QuickReplyBuilder) BuildFlowQuickReply ¶
func (builder *QuickReplyBuilder) BuildFlowQuickReply(caption string, target string) *QuickReply
func (*QuickReplyBuilder) BuildNodeQuickReply ¶
func (builder *QuickReplyBuilder) BuildNodeQuickReply(caption string, target string) *QuickReply
Click to show internal directories.
Click to hide internal directories.