plugins

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 0 Imported by: 0

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 Channel

type Channel interface {
	AddUser(nickName string)
	GetName() string
	GetUserCount() int
}

Channel is an interface for a chat channel

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL