github.com/CyCoreSystems/ari@v4.8.4+incompatible/textMessage.go (about)

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