Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TYPE_MESSAGE webhook type used when a message is received TYPE_MESSAGE = "message" // TYPE_FACT_RESPONSE webhook type used when an untracked fact response is received TYPE_FACT_RESPONSE = "fact_response" // TYPE_CONNECTION webhook type used when a connection is received TYPE_CONNECTION = "connection" // TYPE_REQUEST webhook type used when a request response is received TYPE_REQUEST = "request" TYPE_RAW = "raw" TYPE_VOICE_START = "voice_start" TYPE_VOICE_BUSY = "voice_busy" TYPE_VOICE_STOP = "voice_stop" TYPE_VOICE_ACCEPT = "voice_accept" TYPE_VOICE_SETUP = "voice_setup" TYPE_SIGNATURE = "signature" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Poster ¶
type Poster interface {
Post(url, secret string, p WebhookPayload) error
}
type WebhookPayload ¶
type WebhookPayload struct { // Type is the type of the message. Type string `json:"typ"` // URI is the URI you can fetch more information about the object on the data field. URI string `json:"uri"` // Data the object to be sent. Data interface{} `json:"data"` // Payload the response payload received. Payload map[string]interface{} `json:"payload,omitempty"` }
WebhookPayload represents a the payload that will be resent to the configured webhook URL if provided.
Click to show internal directories.
Click to hide internal directories.