Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct {
ID bson.ObjectId `json:"_id" bson:"_id"`
Messages []Message `json:"messages" bson:"messages"`
Observers map[string]chan *Message `json:"observers" bson:"observers"`
StartDate time.Time `json:"startdate" bson:"startdate"`
EndDate time.Time `json:"enddate" bson:"enddate"`
}
Chat is a conversation object that has datatypes for the chat domain (Chat)
type Message ¶
type Message struct {
ID bson.ObjectId `json:"_id" bson:"_id"`
Sender bson.ObjectId `json:"sender" bson:"sender"`
Receiver bson.ObjectId `json:"receiver" bson:"receiver"`
Type string `json:"type" bson:"type"`
Text string `json:"text" bson:"text"`
IsSeen bool `json:"is_seen" bson:"is_seen"`
IsSent bool `json:"is_sent" bson:"is_sent"`
IsReceived bool `json:"is_received" bson:"is_received"`
Timestamp time.Time `json:"timestamp" bson:"timestamp"`
}
Message is a message object that has datatypes for the message domain (Message)
func NewMessage ¶
NewMessage creates a new Message!
Click to show internal directories.
Click to hide internal directories.