forked from nyaruka/courier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.go
37 lines (29 loc) · 888 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
package courier
// 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
ExternalID() string
SetExternalID(string)
Status() MsgStatusValue
SetStatus(MsgStatusValue)
Logs() []*ChannelLog
AddLog(log *ChannelLog)
}