cwtch/model/overlay.go

33 lines
861 B
Go
Raw Normal View History

package model
import (
"time"
)
// MessageWrapper is the canonical Cwtch overlay wrapper
type MessageWrapper struct {
Overlay int `json:"o"`
Data string `json:"d"`
// when the data was assembled
SendTime time.Time `json:"s,omitempty"`
// when the data was transmitted (by protocol engine e.g. over Tor)
TransitTime time.Time `json:"t,omitempty"`
// when the data was received
RecvTime time.Time `json:"r,omitempty"`
}
// OverlayChat is the canonical identifier for chat overlays
const OverlayChat = 1
// OverlayInviteContact is the canonical identifier for the contact invite overlay
const OverlayInviteContact = 100
// OverlayInviteGroup is the canonical identifier for the group invite overlay
const OverlayInviteGroup = 101
// OverlayFileSharing is the canonical identifier for the file sharing overlay
const OverlayFileSharing = 200