Documentation ¶
Index ¶
- func Bounce(errorCode int, info *messageInfo, extraData *map[string]string)
- func DecryptRecipientHeader(header string) (string, error)
- func GetOrgEncryptionKey(domain string) (ezn.CryptoString, error)
- func GetOrgVerificationKey(domain string) (ezn.CryptoString, error)
- func InitDelivery()
- func IsWorkspaceRegistered(wid string) bool
- func LastWorkspaceUpdate(wid string) int64
- func PushMessage(sender string, recipientDomain string, path string)
- func RegisterWorkspace(wid string) error
- func ShutdownDelivery()
- func UpdateWorkspace(wid string, timestamp int64) error
- type Attachment
- type Envelope
- type MsgBody
- type RecipientInfo
- type SealedEnvelope
- type SenderInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptRecipientHeader ¶
DecryptRecipient assumes that the file passed to it has a recipient section which can be decrypted by the servers Primary Encryption Key. This implies that the server is the destination for the message, so it returns the workspace ID of the recipient.
func GetOrgEncryptionKey ¶
func GetOrgEncryptionKey(domain string) (ezn.CryptoString, error)
GetOrgEncryptionKey obtains an organization's encryption key and returns it as a CryptoString
func GetOrgVerificationKey ¶
func GetOrgVerificationKey(domain string) (ezn.CryptoString, error)
GetOrgEncryptionKey obtains an organization's verification key and returns it as a CryptoString
func InitDelivery ¶
func InitDelivery()
func IsWorkspaceRegistered ¶
IsWorkspaceRegisters checks to see if a client has been monitoring the workspace
func LastWorkspaceUpdate ¶
Gets the UTC UNIX timestamp of the last new message notification for the workspace. If none has occurred, then -1 in returned.
func PushMessage ¶
PushMessage enqueues a message for delivery
func RegisterWorkspace ¶
RegisterWorkspace ensures that the workspace update list has a specific workspace ID. If it has already been registered, nothing happens.
func ShutdownDelivery ¶
func ShutdownDelivery()
func UpdateWorkspace ¶
UpdateWorkspace updates the timestamp for the last new message for a workspace
Types ¶
type Attachment ¶
type Envelope ¶
type Envelope struct { Type string Version string Receiver RecipientInfo Sender SenderInfo Date string PayloadKey string }
type RecipientInfo ¶
type SealedEnvelope ¶
type SealedEnvelope struct { Type string Version string Receiver string Sender string Date string PayloadKey string }
func ReadMessageHeader ¶
func ReadMessageHeader(localPath string) (SealedEnvelope, error)
ReadMessageHeader loads from a file the message data up to, but not including, the payload and returns a SealedEnvelope instance so that it may be processed for delivery