Documentation ¶
Index ¶
Constants ¶
View Source
const ( UserOutPutTUserTraffic = iota UserOutPutTypeLogInfo UserOutPutTypeLogErr UserOutPutTypeLogWarn UserOutPutTUserServerMessage UserOutPutTUserCommandOutput UserOutPutTypeFERunFunction UserOutPutTPM UserOutPutTChannel UserOutPutTUserTest UserOutPutTUserInputReq )
These are the different message types that can be sent to user, the purpose of this is to make it easy for consumer to react
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server interface { RemoveUser(nickName string) error AddChannel(channelName string) GetChannelCount() int RemoveUserFromChannel(nickName, channelName string) error BroadcastInChannel(channelName, message string) error GetChannelUsers(channelName string) (map[string]bool, error) }
Server hosts chats
type User ¶
type User interface { SetOutgoing(messageType int, message string) SetOutgoingf(messageType int, format string, a ...interface{}) GetChannel() string GetNickName() string Ignore(nickName string) SetChannel(name string) HasIgnored(nickName string) bool Disconnect() error }
User is a connected user
Click to show internal directories.
Click to hide internal directories.