aboutsummaryrefslogtreecommitdiff
path: root/connector/connector.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/connector.go')
-rw-r--r--connector/connector.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/connector/connector.go b/connector/connector.go
index 9ff5d49..2b54258 100644
--- a/connector/connector.go
+++ b/connector/connector.go
@@ -8,11 +8,11 @@ package connector
- A connector represents a connection to an outgoing service (IRC, XMPP, etc)
It satisfies a generic interface representing the actions that can be called
(send messages, join room, etc)
-
+
- A handler represents a consumer of events happening on a connection
It satisfies a generic interface representing the events that can happend
(message received, rooms autojoined, etc)
-
+
- A connector implements a given protocol that has an identifier
Each protocol identifier determines a namespace for user identifiers
and room identifiers which are globally unique for all connections using
@@ -82,6 +82,7 @@ type Handler interface {
}
type EventType int
+
const (
EVENT_JOIN EventType = iota
EVENT_LEAVE
@@ -114,12 +115,12 @@ type Event struct {
type UserInfo struct {
DisplayName string
- Avatar MediaObject
+ Avatar MediaObject
}
type RoomInfo struct {
- Name string
- Topic string
+ Name string
+ Topic string
Picture MediaObject
}