Documentation ¶
Index ¶
- type GenericMessage
- type MessageAttachment
- type MessageEntry
- type MessageEvent
- type MessagePayload
- type MessagePayloadElement
- type MessagePayloadElementButton
- type MessageRequestBody
- type MongoUserScore
- type OutgoingGenericMessage
- type OutgoingMessage
- type OutgoingTextMessage
- type PostbackEntry
- type PostbackEvent
- type PostbackPayload
- type PostbackRequestBody
- type Question
- type QuestionAPIResponseBody
- type RedisUserData
- type TextMessage
- type User
- type UserState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericMessage ¶
type GenericMessage struct {
Attachment MessageAttachment `json:"attachment"`
}
type MessageAttachment ¶
type MessageAttachment struct { Type string `json:"type"` Payload MessagePayload `json:"payload"` }
type MessageEntry ¶
type MessageEntry struct {
Messaging []MessageEvent `json:"messaging"`
}
type MessageEvent ¶
type MessageEvent struct { Sender User `json:"sender"` Timestamp int64 `json:"timestamp"` Message TextMessage `json:"message"` }
type MessagePayload ¶
type MessagePayload struct { TemplateType string `json:"template_type"` Elements []MessagePayloadElement `json:"elements"` }
type MessagePayloadElement ¶
type MessagePayloadElement struct { Title string `json:"title"` Subtitle string `json:"subtitle"` Buttons []MessagePayloadElementButton `json:"buttons"` }
type MessageRequestBody ¶
type MessageRequestBody struct { Object string `json:"object"` Entry []MessageEntry `json:"entry"` }
type MongoUserScore ¶
type OutgoingGenericMessage ¶
type OutgoingGenericMessage struct { Recipient User `json:"recipient"` Message GenericMessage `json:"message"` }
type OutgoingMessage ¶
type OutgoingMessage interface { }
type OutgoingTextMessage ¶
type OutgoingTextMessage struct { Recipient User `json:"recipient"` Message TextMessage `json:"message"` }
type PostbackEntry ¶
type PostbackEntry struct {
Messaging []PostbackEvent `json:"messaging"`
}
type PostbackEvent ¶
type PostbackEvent struct { Sender User `json:"sender"` Timestamp int64 `json:"timestamp"` Postback PostbackPayload `json:"postback"` }
type PostbackPayload ¶
type PostbackPayload struct {
Payload string `json:"payload"`
}
type PostbackRequestBody ¶
type PostbackRequestBody struct { Object string `json:"object"` Entry []PostbackEntry `json:"entry"` }
type Question ¶
type Question struct { Category string `json:"category"` Type string `json:"type"` Difficulty string `json:"difficulty"` Question string `json:"question"` CorrectAnswer string `json:"correct_answer"` IncorrectAnswers []string `json:"incorrect_answers"` }
func (Question) ToTextMessage ¶
func (question Question) ToTextMessage() (TextMessage, byte, byte, string)
type QuestionAPIResponseBody ¶
type RedisUserData ¶
type TextMessage ¶
type TextMessage struct {
Text string `json:"text"`
}
Click to show internal directories.
Click to hide internal directories.