cwtch/event/common.go

56 lines
1.4 KiB
Go
Raw Normal View History

2019-01-04 21:44:21 +00:00
package event
// Type captures the definition of many common Cwtch application events
type Type string
// Defining Common Event Types
const (
StatusRequest = Type("StatusRequest")
ProtocolEngineStatus = Type("ProtocolEngineStatus")
PeerRequest = Type("PeerRequest")
BlockPeer = Type("BlockPeer")
JoinServer = Type("JoinServer")
ProtocolEngineStartListen = Type("ProtocolEngineStartListen")
ProtocolEngineStopped = Type("ProtocolEngineStopped")
InvitePeerToGroup = Type("InvitePeerToGroup")
NewGroupInvite = Type("NewGroupInvite")
SendMessageToGroup = Type("SendMessagetoGroup")
EncryptedGroupMessage = Type("EncryptedGroupMessage")
NewMessageFromGroup = Type("NewMessageFromGroup")
SendMessageToPeer = Type("SendMessageToPeer")
NewMessageFromPeer = Type("NewMessageFromPeer")
2019-01-21 20:11:40 +00:00
SetProfileName = Type("SetProfileName")
2019-01-22 19:11:25 +00:00
RequestProfileSave = Type("RequestProfileSave")
2019-01-04 21:44:21 +00:00
)
// Field defines common event attributes
type Field string
// Defining Common Field Types
const (
2019-01-21 20:08:03 +00:00
RemotePeer = Field("RemotePeer")
Ciphertext = Field("Ciphertext")
Signature = Field("Signature")
TimestampSent = Field("TimestampSent")
TimestampReceived = Field("TimestampReceived")
2019-01-21 20:08:03 +00:00
Identity = Field("Identity")
GroupID = Field("GroupID")
GroupServer = Field("GroupServer")
GroupInvite = Field("GroupInvite")
ProfileName = Field("ProfileName")
2019-01-21 20:08:03 +00:00
Data = Field("Data")
Error = Field("Error")
)