-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.go
43 lines (33 loc) · 1 KB
/
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
41
42
43
package courier
import "github.com/nyaruka/gocommon/urns"
// MsgStatusValue is the status of a message
type MsgStatusValue string
// Possible values for MsgStatus
const (
MsgPending MsgStatusValue = "P"
MsgQueued MsgStatusValue = "Q"
MsgSent MsgStatusValue = "S"
MsgWired MsgStatusValue = "W"
MsgErrored MsgStatusValue = "E"
MsgDelivered MsgStatusValue = "D"
MsgFailed MsgStatusValue = "F"
NilMsgStatus MsgStatusValue = ""
)
//-----------------------------------------------------------------------------
// MsgStatusUpdate Interface
//-----------------------------------------------------------------------------
// MsgStatus represents a status update on a message
type MsgStatus interface {
EventID() int64
ChannelUUID() ChannelUUID
ID() MsgID
SetUpdatedURN(old, new urns.URN) error
UpdatedURN() (old, new urns.URN)
HasUpdatedURN() bool
ExternalID() string
SetExternalID(string)
Status() MsgStatusValue
SetStatus(MsgStatusValue)
Logs() []*ChannelLog
AddLog(log *ChannelLog)
}