Documentation
¶
Index ¶
- Variables
- func DailyUpdatePing(url string)
- func FBWebhook(w http.ResponseWriter, r *http.Request)
- func PingURL(url string)
- type Attachment
- type Button
- type CTA
- type DeliveryData
- type Element
- type Entry
- type GetStartedTemplate
- type IncomingMessage
- type Message
- type MessageData
- type OutgoingAttachmentData
- type OutgoingMessage
- type OutgoingMessageData
- type Payload
- type Postback
- type ReadData
- type Recipient
- type Sender
Constants ¶
This section is empty.
Variables ¶
var RedisInstance *redisutil.RedisInstance
var Subcribers []string
Functions ¶
func DailyUpdatePing ¶
func DailyUpdatePing(url string)
Types ¶
type Attachment ¶
type Attachment struct {
Type string `json:"type,omitempty"`
Payload Payload `json:"payload,omitempty"`
}
Attachment represents attachment data of a message exchanged on Messenger
type Button ¶
type Button struct {
Type string `json:"type,omitempty"`
URL string `json:"url,omitempty"`
Title string `json:"title,omitempty"`
Payload string `json:"payload,omitempty"`
}
Button represents button of a message on Messenger
type CTA ¶
type CTA struct {
Payload string `json:"payload,omitempty"`
}
CTA represents call to action payload information of a message
type DeliveryData ¶
type DeliveryData struct {
MIDs []string `json:"mids,omitempty"`
Watermark big.Int `json:"watermark,omitempty"`
Sequence int `json:"seq,omitempty"`
}
DeliveryData represents delivery data of a message exchanged on Messenger
type Element ¶
type Element struct {
Title string `json:"title,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
ItemURL string `json:"item_url,,omitempty"`
ImageURL string `json:"image_url,omitempty"`
Buttons []Button `json:"buttons,omitempty"`
}
Element represents element of a message on Messenger
type Entry ¶
type Entry struct {
ID string `json:"id,omitempty"`
Time big.Int `json:"time,omitempty"`
Messaging []Message `json:"messaging,omitempty"`
}
Entry represents each message entry sent by user on Messenger
type GetStartedTemplate ¶
type GetStartedTemplate struct {
SettingType string `json:"setting_type,omitempty"`
ThreadState string `json:"thread_state,omitempty"`
CallToActions []CTA `json:"call_to_actions,omitempty"`
}
GetStartedTemplate Button initialization
type IncomingMessage ¶
type IncomingMessage struct {
Object string `json:"object,omitempty"`
Entries *[]Entry `json:"entry,omitempty"`
}
IncomingMessage represents incoming message sent by user on Messenger
type Message ¶
type Message struct {
Sender Sender `json:"sender,omitempty"`
Recipient Recipient `json:"recipient,omitempty"`
Timestamp big.Int `json:"timestamp,omitempty"`
MessageData MessageData `json:"message,omitempty"`
Read ReadData `json:"read,omitempty"`
Delivery DeliveryData `json:"delivery,omitempty"`
Postback *Postback `json:"postback,omitempty"`
}
Message represents message exchanged on Messenger
type MessageData ¶
type MessageData struct {
IsEcho bool `json:"is_echo,omitempty"`
AppID big.Int `json:"app_id,omitempty"`
MID string `json:"mid,omitempty"`
Sequence int `json:"seq,omitempty"`
StickerID *big.Int `json:"sticker_id,omitempty"`
Text string `json:"text,omitempty"`
Attachments *[]Attachment `json:"attachments,omitempty"`
}
MessageData represents message data of a message exchanged on Messenger
type OutgoingAttachmentData ¶
type OutgoingAttachmentData struct {
Type string `json:"type,omitempty"`
Payload *Payload `json:"payload,omitempty"`
}
OutgoingAttachmentData represents outgoing attachment data to be sent back to user on Messenger
type OutgoingMessage ¶
type OutgoingMessage struct {
Recipient Recipient `json:"recipient,omitempty"`
Message *OutgoingMessageData `json:"message,omitempty"`
SenderAction string `json:"sender_action,omitempty"`
}
OutgoingMessage represents outgoing message to be sent back to user on Messenger
type OutgoingMessageData ¶
type OutgoingMessageData struct {
Text string `json:"text,omitempty"`
Attachment *OutgoingAttachmentData `json:"attachment,omitempty"`
}
OutgoingMessageData represents outgoing message data to be sent back to user on Messenger
type Payload ¶
type Payload struct {
TemplateType string `json:"template_type,omitempty"`
Elements *[]Element `json:"elements,omitempty"`
URL string `json:"url,omitempty"`
StickerID *big.Int `json:"sticker_id,omitempty"`
}
Payload represents payload data of a message exchanged on Messenger
type Postback ¶
type Postback struct {
Payload string `json:"payload,omitempty"`
}
Postback represents postback data sent by user on Messenger
type ReadData ¶
type ReadData struct {
Watermark big.Int `json:"watermark,omitempty"`
Sequence int `json:"seq,omitempty"`
}
ReadData represents read data of a message exchanged on Messenger