forked from CyCoreSystems/ari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
textMessage.go
27 lines (22 loc) · 982 Bytes
/
textMessage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package ari
// TextMessage needs some verbiage here
type TextMessage interface {
// Send() sends a text message to an endpoint
Send(from, tech, resource, body string, vars map[string]string) error
// SendByURI sends a text message to an endpoint by free-form URI
SendByURI(from, to, body string, vars map[string]string) error
}
// TextMessageData describes text message
type TextMessageData struct {
// Key is the cluster-unique identifier for this text message
Key *Key `json:"key"`
Body string `json:"body"` // The body (text) of the message
From string `json:"from"` // Technology-specific source URI
To string `json:"to"` // Technology-specific destination URI
Variables []TextMessageVariable `json:"variables,omitempty"`
}
// TextMessageVariable describes a key-value pair (associated with a text message)
type TextMessageVariable struct {
Key string `json:"key"`
Value string `json:"value"`
}