summaryrefslogtreecommitdiff
path: root/chat/messages.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-03-25 16:04:45 +0100
committerKevin Chabowski <kevin@kch42.de>2014-03-25 16:04:45 +0100
commit96973a17b3e2301bb3d9f3b1d3f3c1b80f918fb1 (patch)
tree29e961eaf6df00158cdd9a69a327cf8bb829c707 /chat/messages.go
parent966c17bb84866f10fc9e995df4107ed11ed2bdce (diff)
downloadsimplechat-96973a17b3e2301bb3d9f3b1d3f3c1b80f918fb1.tar.gz
simplechat-96973a17b3e2301bb3d9f3b1d3f3c1b80f918fb1.tar.bz2
simplechat-96973a17b3e2301bb3d9f3b1d3f3c1b80f918fb1.zip
Documenting the new chat package. Also fixing access rights
Diffstat (limited to 'chat/messages.go')
-rw-r--r--chat/messages.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/chat/messages.go b/chat/messages.go
index 793fc6c..f03eae0 100644
--- a/chat/messages.go
+++ b/chat/messages.go
@@ -5,6 +5,7 @@ import (
"errors"
)
+// MsgType describes the purpose of a message
type MsgType int
const (
@@ -26,6 +27,7 @@ func (mt *MsgType) MarshalJSON() ([]byte, error) {
return nil, errors.New("Unknown message type")
}
+// Message represents a message that can be sent to a buddy. The Text field has no meaning, if Type != MsgChat.
type Message struct {
Type MsgType `json:"type"`
User string `json:"user"`