-
Notifications
You must be signed in to change notification settings - Fork 70
/
status.go
40 lines (31 loc) · 976 Bytes
/
status.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
28
29
30
31
32
33
34
35
36
37
38
39
40
package courier
import "github.com/nyaruka/gocommon/urns"
// MsgStatus is the status of a message
type MsgStatus string
// Possible values for MsgStatus
const (
MsgStatusPending MsgStatus = "P"
MsgStatusQueued MsgStatus = "Q"
MsgStatusSent MsgStatus = "S"
MsgStatusWired MsgStatus = "W"
MsgStatusErrored MsgStatus = "E"
MsgStatusDelivered MsgStatus = "D"
MsgStatusRead MsgStatus = "R"
MsgStatusFailed MsgStatus = "F"
NilMsgStatus MsgStatus = ""
)
//-----------------------------------------------------------------------------
// StatusUpdate Interface
//-----------------------------------------------------------------------------
// StatusUpdate represents a status update on a message
type StatusUpdate interface {
Event
ChannelUUID() ChannelUUID
MsgID() MsgID
SetURNUpdate(old, new urns.URN) error
URNUpdate() (old, new urns.URN)
ExternalID() string
SetExternalID(string)
Status() MsgStatus
SetStatus(MsgStatus)
}